From a0d6ca626766fcd2dd7013002d94b60362365c1b Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Fri, 29 Dec 2023 16:43:40 +0100 Subject: [PATCH] flake rewiritte --- flake.lock | 44 ++ flake.nix | 90 +-- modules/asf/default.nix | 42 +- modules/audio/default.nix | 97 ++-- modules/audio/sennheiser-hd660s.nix | 355 ++++++------ modules/auto-update/default.nix | 21 +- modules/bluetooth/default.nix | 16 +- modules/default.nix | 23 + modules/kate/default.nix | 14 - modules/kodi/default.nix | 16 - modules/local/default.nix | 72 +-- modules/minecraft-server/default.nix | 37 +- modules/moodle-dl/default.nix | 35 ++ modules/nix/default.nix | 99 ++-- modules/plasma/6.nix | 33 ++ modules/plasma/default.nix | 47 +- modules/printing/default.nix | 38 +- modules/repo-sync/default.nix | 43 ++ modules/services/moodle-dl/default.nix | 25 - modules/services/repo-sync/default.nix | 33 -- modules/ssh/default.nix | 22 - modules/steam/default.nix | 29 +- modules/theming/default.nix | 11 - modules/users/default.nix | 8 + modules/users/jopejoe1/default.nix | 53 +- modules/users/jopejoe1/home.nix | 757 +++++++++++++------------ modules/users/root/default.nix | 18 +- modules/users/root/home.nix | 151 ++--- modules/web/peertube/default.nix | 11 - systems/inugami/default.nix | 10 + systems/kami/default.nix | 17 + systems/tuny/default.nix | 11 + systems/yokai/default.nix | 49 +- 33 files changed, 1257 insertions(+), 1070 deletions(-) create mode 100644 modules/default.nix delete mode 100644 modules/kate/default.nix delete mode 100644 modules/kodi/default.nix create mode 100644 modules/moodle-dl/default.nix create mode 100644 modules/plasma/6.nix create mode 100644 modules/repo-sync/default.nix delete mode 100644 modules/services/moodle-dl/default.nix delete mode 100644 modules/services/repo-sync/default.nix delete mode 100644 modules/ssh/default.nix delete mode 100644 modules/theming/default.nix create mode 100644 modules/users/default.nix delete mode 100644 modules/web/peertube/default.nix diff --git a/flake.lock b/flake.lock index f3bcc10..c3dc344 100644 --- a/flake.lock +++ b/flake.lock @@ -329,6 +329,27 @@ "type": "github" } }, + "jovian": { + "inputs": { + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1703229133, + "narHash": "sha256-9Mj57V3FgZpQjSNv9b02GIx6GZWNRT8P1ZRKMk7dQK4=", + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "rev": "4d24d2ff927a8b8a698bbacdb1966045bcadf872", + "type": "github" + }, + "original": { + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "type": "github" + } + }, "kde2nix": { "inputs": { "flake-utils": "flake-utils_2", @@ -395,6 +416,28 @@ "type": "github" } }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "jovian", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690328911, + "narHash": "sha256-fxtExYk+aGf2YbjeWQ8JY9/n9dwuEt+ma1eUFzF8Jeo=", + "owner": "zhaofengli", + "repo": "nix-github-actions", + "rev": "96df4a39c52f53cb7098b923224d8ce941b64747", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "ref": "matrix-name", + "repo": "nix-github-actions", + "type": "github" + } + }, "nix-systems": { "locked": { "lastModified": 1681028828, @@ -638,6 +681,7 @@ "flake-utils": "flake-utils", "gitignore": "gitignore", "home-manager": "home-manager", + "jovian": "jovian", "kde2nix": "kde2nix", "libnbtplusplus": "libnbtplusplus", "nix-empty-flake": "nix-empty-flake", diff --git a/flake.nix b/flake.nix index c966688..a5d1312 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,13 @@ description = "jopejoe1 NixOS configuration"; inputs = { - #nixpkgs.url = "/home/jopejoe1/dev/nixpkgs/"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; kde2nix.url = "github:nix-community/kde2nix"; nur.url = "github:nix-community/NUR"; + jovian= { + url = "github:Jovian-Experiments/Jovian-NixOS"; + inputs.nixpkgs.follows = "nixpkgs"; + }; home-manager= { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -24,21 +27,6 @@ url = "github:vinceliuice/Tela-icon-theme"; flake = false; }; - catppuccin-base16 = { - url = "github:catppuccin/base16"; - flake = false; - }; - stylix = { - url = "github:danth/stylix"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.flake-compat.follows = "flake-compat"; - inputs.base16.follows = "base16"; - inputs.home-manager.follows = "home-manager"; - }; - base16 = { - url = "github:SenchoPens/base16.nix"; - }; - # Dependencys @@ -91,11 +79,7 @@ outputs = inputs@{ nixpkgs, - home-manager, - nur, nixos-hardware, - stylix, - kde2nix, ... }: { nixosConfigurations = { @@ -104,24 +88,7 @@ specialArgs = inputs; modules = [ ./systems/kami - ./modules/audio - ./modules/bluetooth - ./modules/local - ./modules/nix - ./modules/plasma - ./modules/printing - #./modules/ssh - ./modules/steam - ./modules/asf - ./modules/minecraft-server - ./modules/kate - #./modules/theming - #./modules/auto-update - ./modules/services/repo-sync - #./modules/services/moodle-dl - ./modules/web/peertube - ./modules/users/jopejoe1 - ./modules/users/root + ./modules ./overlays nixos-hardware.nixosModules.common-cpu-intel nixos-hardware.nixosModules.common-gpu-intel @@ -129,11 +96,6 @@ nixos-hardware.nixosModules.common-pc nixos-hardware.nixosModules.common-hidpi nixos-hardware.nixosModules.common-pc-ssd - nur.nixosModules.nur - home-manager.nixosModules.home-manager - kde2nix.nixosModules.plasma6 - #nyx.nixosModules.default - #stylix.nixosModules.stylix ]; }; yokai = nixpkgs.lib.nixosSystem { @@ -141,20 +103,9 @@ specialArgs = inputs; modules = [ ./systems/yokai - ./modules/audio - ./modules/bluetooth - ./modules/local - ./modules/nix - ./modules/plasma - ./modules/printing - #./modules/ssh - ./modules/users/jopejoe1 - ./modules/users/root + ./modules ./overlays nixos-hardware.nixosModules.pine64-pinebook-pro - nur.nixosModules.nur - home-manager.nixosModules.home-manager - #nyx.nixosModules.default ]; }; inugami = nixpkgs.lib.nixosSystem { @@ -162,17 +113,9 @@ specialArgs = inputs; modules = [ ./systems/inugami - ./modules/audio - ./modules/bluetooth - ./modules/local - ./modules/nix - ./modules/kodi - ./modules/auto-update + ./modules ./overlays nixos-hardware.nixosModules.raspberry-pi-4 - nur.nixosModules.nur - home-manager.nixosModules.home-manager - #nyx.nixosModules.default ]; }; tuny = nixpkgs.lib.nixosSystem { @@ -180,19 +123,20 @@ specialArgs = inputs; modules = [ ./systems/tuny - ./modules/audio - ./modules/bluetooth - ./modules/local - ./modules/nix - ./modules/auto-update - #./overlays + ./modules nixos-hardware.nixosModules.common-cpu-intel #nixos-hardware.nixosModules.common-gpu-nvidia nixos-hardware.nixosModules.common-pc-laptop nixos-hardware.nixosModules.common-pc-laptop-hdd - nur.nixosModules.nur - home-manager.nixosModules.home-manager - #nyx.nixosModules.default + ]; + }; + steamdeck = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ + ./systems/steamdeck + ./modules + ./overlays ]; }; }; diff --git a/modules/asf/default.nix b/modules/asf/default.nix index 0908040..fa7c81a 100644 --- a/modules/asf/default.nix +++ b/modules/asf/default.nix @@ -1,24 +1,34 @@ -{ ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.asf; +in { - services.archisteamfarm = { - enable = true; - web-ui.enable = true; - settings = { - LicenseID = "@asfLicenseID@"; - SteamProtocols = 7; - AutoSteamSaleEvent = true; - }; - bots.jopejoe1 = { - username = "jopejoe1"; - enabled = true; - passwordFile = "/var/lib/asf/pw"; + options.jopejoe1.asf = { + enable = lib.mkEnableOption "Enable ASF"; + }; + + config = lib.mkIf cfg.enable { + services.archisteamfarm = { + enable = true; + web-ui.enable = true; settings = { + LicenseID = "@asfLicenseID@"; + SteamProtocols = 7; AutoSteamSaleEvent = true; - FarmingOrders = 9; - OnlineStatus = 0; - RemoteCommunication = 0; + }; + bots.jopejoe1 = { + username = "jopejoe1"; + enabled = true; + passwordFile = "/var/lib/asf/pw"; + settings = { + AutoSteamSaleEvent = true; + FarmingOrders = 9; + OnlineStatus = 0; + RemoteCommunication = 0; + }; }; }; }; } + diff --git a/modules/audio/default.nix b/modules/audio/default.nix index d223bb2..db61319 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -1,58 +1,63 @@ -{ pkgs, ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.audio; +in { - imports = [ - ./sennheiser-hd660s.nix - ]; + options.jopejoe1.audio = { + enable = lib.mkEnableOption "Enable Audio"; + sennheiser-hd-660s = lib.mkEnableOption "Equalizer for Sennheiser HD 660S"; + }; - security.rtkit.enable = true; + config = lib.mkIf cfg.enable { + security.rtkit.enable = true; - services.pipewire = { - enable = true; - systemWide = true; - alsa = { + services.pipewire = { enable = true; - support32Bit = true; - }; - pulse.enable = true; - jack.enable = true; + systemWide = true; + alsa = { + enable = true; + support32Bit = true; + }; + pulse.enable = true; + jack.enable = true; - wireplumber.enable = true; + wireplumber.enable = true; - extraConfig.pipewire."30-noise-filter" = { - "context.modules" = [{ - name = "libpipewire-module-filter-chain"; - args = { - "node.description" = "Noise Canceling source"; - "media.name" = "Noise Canceling source"; - "filter.graph" = { - nodes = [{ - type = "ladspa"; - name = "rnnoise"; - plugin = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"; - label = "noise_suppressor_mono"; - control = { - "VAD Threshold (%)" = 50.0; - "VAD Grace Period (ms)" = 200; - "Retroactive VAD Grace (ms)" = 0; - }; - }]; + extraConfig.pipewire."30-noise-filter" = { + "context.modules" = [{ + name = "libpipewire-module-filter-chain"; + args = { + "node.description" = "Noise Canceling source"; + "media.name" = "Noise Canceling source"; + "filter.graph" = { + nodes = [{ + type = "ladspa"; + name = "rnnoise"; + plugin = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"; + label = "noise_suppressor_mono"; + control = { + "VAD Threshold (%)" = 50.0; + "VAD Grace Period (ms)" = 200; + "Retroactive VAD Grace (ms)" = 0; + }; + }]; + }; + "capture.props" = { + "node.name" = "capture.rnnoise_source"; + "node.passive" = true; + "audio.rate" = 48000; + }; + "playback.props" = { + "node.name" = "rnnoise_source"; + "media.class" = "Audio/Source"; + "audio.rate" = 48000; + }; }; - "capture.props" = { - "node.name" = "capture.rnnoise_source"; - "node.passive" = true; - "audio.rate" = 48000; - }; - "playback.props" = { - "node.name" = "rnnoise_source"; - "media.class" = "Audio/Source"; - "audio.rate" = 48000; - }; - }; - }]; + }]; + }; }; }; - hardware.pulseaudio.enable = false; + imports = [ ./sennheiser-hd660s.nix ]; } - diff --git a/modules/audio/sennheiser-hd660s.nix b/modules/audio/sennheiser-hd660s.nix index ad969e8..88156c6 100644 --- a/modules/audio/sennheiser-hd660s.nix +++ b/modules/audio/sennheiser-hd660s.nix @@ -1,181 +1,186 @@ -{ pkgs, ... }: +{ pkgs, config, lib, ... }: +let + cfg = config.jopejoe1.audio; +in { - services.pipewire = { - extraConfig.pipewire."20-Senheiser-HD660S" = { - "context.modules" = [{ - name = "libpipewire-module-filter-chain"; - args = { - "node.description" = "Senheiser HD 660 S Equaliser"; - "media.name" = "Senheiser HD 660 S Equaliser"; - "filter.graph" = { - nodes = [ - { - type = "builtin"; - name = "eq_band_1"; - label = "bq_highshelf"; - control = { - "Freq" = 0.0; - "Q" = 1.0; - "Gain" = -6.4; - }; - } - { - type = "builtin"; - name = "eq_band_2"; - label = "bq_lowshelf"; - control = { - "Freq" = 105.0; - "Q" = 0.70; - "Gain" = 6.5; - }; - } - { - type = "builtin"; - name = "eq_band_3"; - label = "bq_peaking"; - control = { - "Freq" = 178.0; - "Q" = 0.49; - "Gain" = -3.2; - }; - } - { - type = "builtin"; - name = "eq_band_4"; - label = "bq_peaking"; - control = { - "Freq" = 1222.0; - "Q" = 2.34; - "Gain" = -2.3; - }; - } - { - type = "builtin"; - name = "eq_band_5"; - label = "bq_peaking"; - control = { - "Freq" = 5470.0; - "Q" = 4.4; - "Gain" = -7.3; - }; - } - { - type = "builtin"; - name = "eq_band_6"; - label = "bq_peaking"; - control = { - "Freq" = 7899.0; - "Q" = 0.68; - "Gain" = 6.5; - }; - } - { - type = "builtin"; - name = "eq_band_7"; - label = "bq_peaking"; - control = { - "Freq" = 784.0; - "Q" = 3.52; - "Gain" = -0.4; - }; - } - { - type = "builtin"; - name = "eq_band_8"; - label = "bq_peaking"; - control = { - "Freq" = 2250.0; - "Q" = 3.58; - "Gain" = 1.3; - }; - } - { - type = "builtin"; - name = "eq_band_9"; - label = "bq_peaking"; - control = { - "Freq" = 3380.0; - "Q" = 2.84; - "Gain" = -0.9; - }; - } - { - type = "builtin"; - name = "eq_band_10"; - label = "bq_peaking"; - control = { - "Freq" = 6701.0; - "Q" = 6.0; - "Gain" = 1.2; - }; - } - { - type = "builtin"; - name = "eq_band_11"; - label = "bq_highshelf"; - control = { - "Freq" = 10000.0; - "Q" = 0.7; - "Gain" = -1.1; - }; - } - ]; - links = [ - { - output = "eq_band_1:Out"; - input = "eq_band_2:In"; - } - { - output = "eq_band_2:Out"; - input = "eq_band_3:In"; - } - { - output = "eq_band_3:Out"; - input = "eq_band_4:In"; - } - { - output = "eq_band_4:Out"; - input = "eq_band_5:In"; - } - { - output = "eq_band_5:Out"; - input = "eq_band_6:In"; - } - { - output = "eq_band_6:Out"; - input = "eq_band_7:In"; - } - { - output = "eq_band_7:Out"; - input = "eq_band_8:In"; - } - { - output = "eq_band_8:Out"; - input = "eq_band_9:In"; - } - { - output = "eq_band_9:Out"; - input = "eq_band_10:In"; - } - { - output = "eq_band_10:Out"; - input = "eq_band_11:In"; - } - ]; + config = lib.mkIf cfg.sennheiser-hd-660s { + services.pipewire = { + extraConfig.pipewire."20-Senheiser-HD660S" = { + "context.modules" = [{ + name = "libpipewire-module-filter-chain"; + args = { + "node.description" = "Senheiser HD 660 S Equaliser"; + "media.name" = "Senheiser HD 660 S Equaliser"; + "filter.graph" = { + nodes = [ + { + type = "builtin"; + name = "eq_band_1"; + label = "bq_highshelf"; + control = { + "Freq" = 0.0; + "Q" = 1.0; + "Gain" = -6.4; + }; + } + { + type = "builtin"; + name = "eq_band_2"; + label = "bq_lowshelf"; + control = { + "Freq" = 105.0; + "Q" = 0.70; + "Gain" = 6.5; + }; + } + { + type = "builtin"; + name = "eq_band_3"; + label = "bq_peaking"; + control = { + "Freq" = 178.0; + "Q" = 0.49; + "Gain" = -3.2; + }; + } + { + type = "builtin"; + name = "eq_band_4"; + label = "bq_peaking"; + control = { + "Freq" = 1222.0; + "Q" = 2.34; + "Gain" = -2.3; + }; + } + { + type = "builtin"; + name = "eq_band_5"; + label = "bq_peaking"; + control = { + "Freq" = 5470.0; + "Q" = 4.4; + "Gain" = -7.3; + }; + } + { + type = "builtin"; + name = "eq_band_6"; + label = "bq_peaking"; + control = { + "Freq" = 7899.0; + "Q" = 0.68; + "Gain" = 6.5; + }; + } + { + type = "builtin"; + name = "eq_band_7"; + label = "bq_peaking"; + control = { + "Freq" = 784.0; + "Q" = 3.52; + "Gain" = -0.4; + }; + } + { + type = "builtin"; + name = "eq_band_8"; + label = "bq_peaking"; + control = { + "Freq" = 2250.0; + "Q" = 3.58; + "Gain" = 1.3; + }; + } + { + type = "builtin"; + name = "eq_band_9"; + label = "bq_peaking"; + control = { + "Freq" = 3380.0; + "Q" = 2.84; + "Gain" = -0.9; + }; + } + { + type = "builtin"; + name = "eq_band_10"; + label = "bq_peaking"; + control = { + "Freq" = 6701.0; + "Q" = 6.0; + "Gain" = 1.2; + }; + } + { + type = "builtin"; + name = "eq_band_11"; + label = "bq_highshelf"; + control = { + "Freq" = 10000.0; + "Q" = 0.7; + "Gain" = -1.1; + }; + } + ]; + links = [ + { + output = "eq_band_1:Out"; + input = "eq_band_2:In"; + } + { + output = "eq_band_2:Out"; + input = "eq_band_3:In"; + } + { + output = "eq_band_3:Out"; + input = "eq_band_4:In"; + } + { + output = "eq_band_4:Out"; + input = "eq_band_5:In"; + } + { + output = "eq_band_5:Out"; + input = "eq_band_6:In"; + } + { + output = "eq_band_6:Out"; + input = "eq_band_7:In"; + } + { + output = "eq_band_7:Out"; + input = "eq_band_8:In"; + } + { + output = "eq_band_8:Out"; + input = "eq_band_9:In"; + } + { + output = "eq_band_9:Out"; + input = "eq_band_10:In"; + } + { + output = "eq_band_10:Out"; + input = "eq_band_11:In"; + } + ]; + }; + "audio.channels" = 2; + "audio.position" = [ "FL" "FR" ]; + "capture.props" = { + "node.name" = "effect_input.eq11"; + "media.class" = "Audio/Sink"; + }; + "playback.props" = { + "node.name" = "effect_output.eq11"; + "node.passive" = true; + }; }; - "audio.channels" = 2; - "audio.position" = [ "FL" "FR" ]; - "capture.props" = { - "node.name" = "effect_input.eq11"; - "media.class" = "Audio/Sink"; - }; - "playback.props" = { - "node.name" = "effect_output.eq11"; - "node.passive" = true; - }; - }; - }]; + }]; + }; }; }; } diff --git a/modules/auto-update/default.nix b/modules/auto-update/default.nix index ee7b45d..899c92b 100644 --- a/modules/auto-update/default.nix +++ b/modules/auto-update/default.nix @@ -1,10 +1,19 @@ -{ lib, pkgs, config, ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.auto-update; +in { - system.autoUpgrade = { - enable = true; - randomizedDelaySec = "30min"; - flake = if config.services.archisteamfarm.enable then "$(${pkgs.coreutils}/bin/rm -rf /var/lib/update-repo && ${lib.getExe pkgs.git} clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/update-repo -q --depth=1 && ${lib.getExe pkgs.git} -C /var/lib/update-repo am /home/jopejoe1/.config/patches/0001-add-liscense.patch -q)/var/lib/update-repo" else "github:jopejoe1/nix-conf"; - dates = "hourly"; + options.jopejoe1.auto-update = { + enable = lib.mkEnableOption "Enable Auto-Updates"; + }; + + config = lib.mkIf cfg.enable { + system.autoUpgrade = { + enable = true; + randomizedDelaySec = "30min"; + flake = if config.services.archisteamfarm.enable then "$(${pkgs.coreutils}/bin/rm -rf /var/lib/update-repo && ${lib.getExe pkgs.git} clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/update-repo -q --depth=1 && ${lib.getExe pkgs.git} -C /var/lib/update-repo am /home/jopejoe1/.config/patches/0001-add-liscense.patch -q)/var/lib/update-repo" else "github:jopejoe1/nix-conf"; + dates = "hourly"; + }; }; } diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix index 23d8b0d..09ceb15 100644 --- a/modules/bluetooth/default.nix +++ b/modules/bluetooth/default.nix @@ -1,7 +1,15 @@ -{ ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.bluetooth; +in { - hardware.bluetooth.enable = true; - hardware.bluetooth.powerOnBoot = true; -} + options.jopejoe1.bluetooth = { + enable = lib.mkEnableOption "Enable Bluetooth"; + }; + config = lib.mkIf cfg.enable { + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + }; +} diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..8a89132 --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,23 @@ +{ self, ... }: + +{ + imports = [ + ./asf + ./audio + ./auto-update + ./bluetooth + ./local + ./minecraft-server + ./moodle-dl + ./nix + ./plasma + ./plasma/6.nix + ./printing + ./repo-sync + ./steam + ./users + self.inputs.kde2nix.nixosModules.plasma6 + self.inputs.nur.nixosModules.nur + self.inputs.home-manager.nixosModules.home-manager + ]; +} diff --git a/modules/kate/default.nix b/modules/kate/default.nix deleted file mode 100644 index 646080a..0000000 --- a/modules/kate/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ pkgs, ... }: - -{ - environment.systemPackages = with pkgs; [ - libsForQt5.kate - nil - nixd - nodePackages_latest.bash-language-server - nodePackages_latest.vscode-html-languageserver-bin - nodePackages_latest.vscode-json-languageserver - python311Packages.python-lsp-server - ]; -} - diff --git a/modules/kodi/default.nix b/modules/kodi/default.nix deleted file mode 100644 index 3f573cd..0000000 --- a/modules/kodi/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, ... }: - -{ - services.cage.user = "kodi"; - services.cage.program = "${pkgs.kodi-wayland.withPackages (p: with p; [ trakt netflix youtube vfs-sftp ])}/bin/kodi-standalone"; - services.cage.enable = true; - - networking.firewall = { - allowedTCPPorts = [ 8080 ]; - allowedUDPPorts = [ 8080 ]; - }; - - users.extraUsers.kodi.isNormalUser = true; -} - - diff --git a/modules/local/default.nix b/modules/local/default.nix index 3bb0f5d..1670f2c 100644 --- a/modules/local/default.nix +++ b/modules/local/default.nix @@ -1,41 +1,49 @@ -{ pkgs, ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.local; +in { - xdg = { - sounds.enable = true; - mime.enable = true; - menus.enable = true; - icons.enable = true; - autostart.enable = true; - portal = { - enable = true; - extraPortals = with pkgs; [ xdg-desktop-portal ]; + options.jopejoe1.local = { + enable = lib.mkEnableOption "Enable Locals"; + }; + + config = lib.mkIf cfg.enable { + xdg = { + sounds.enable = true; + mime.enable = true; + menus.enable = true; + icons.enable = true; + autostart.enable = true; + portal = { + enable = true; + extraPortals = with pkgs; [ xdg-desktop-portal ]; + }; }; - }; - i18n = { - defaultLocale = "en_NZ.UTF-8"; - extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; - LC_CTYPE = "de_DE.UTF-8"; - LC_COLLATE = "de_DE.UTF-8"; - LC_MESSAGES = "en_NZ.UTF-8"; + i18n = { + defaultLocale = "en_NZ.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + LC_CTYPE = "de_DE.UTF-8"; + LC_COLLATE = "de_DE.UTF-8"; + LC_MESSAGES = "en_NZ.UTF-8"; + }; }; - }; - environment.variables = { - LOG_ICONS = "true"; - }; + environment.variables = { + LOG_ICONS = "true"; + }; - fonts.fontDir.enable = true; + fonts.fontDir.enable = true; + }; } - diff --git a/modules/minecraft-server/default.nix b/modules/minecraft-server/default.nix index d212432..f0489ec 100644 --- a/modules/minecraft-server/default.nix +++ b/modules/minecraft-server/default.nix @@ -1,19 +1,28 @@ -{ ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.minecraft-server; +in { - services.minecraft-server = { - enable = true; - eula = true; - openFirewall = true; - declarative = true; - serverProperties = { - difficulty = 3; - enable-rcon = true; - "rcon.password" = "test"; - motd = "\\u00A7cWake up to reality! Nothing ever goes as planned in this accursed world.☯"; - spawn-protection = 0; - level-type = "minecraft:amplified"; - level-name = "amplified_world"; + options.jopejoe1.minecraft-server = { + enable = lib.mkEnableOption "Enable Bluetooth"; + }; + + config = lib.mkIf cfg.enable { + services.minecraft-server = { + enable = true; + eula = true; + openFirewall = true; + declarative = true; + serverProperties = { + difficulty = 3; + enable-rcon = true; + "rcon.password" = "test"; + motd = "\\u00A7cWake up to reality! Nothing ever goes as planned in this accursed world.☯"; + spawn-protection = 0; + level-type = "minecraft:amplified"; + level-name = "amplified_world"; + }; }; }; } diff --git a/modules/moodle-dl/default.nix b/modules/moodle-dl/default.nix new file mode 100644 index 0000000..fd4b549 --- /dev/null +++ b/modules/moodle-dl/default.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.jopejoe1.moodle-dl; +in +{ + options.jopejoe1.moodle-dl = { + enable = lib.mkEnableOption "Enable moodle-dl"; + }; + + config = lib.mkIf cfg.enable { + systemd.timers."moodle-dl" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "5m"; + OnUnitActiveSec = "1h"; + Unit = "moodle-dl.service"; + }; + }; + + systemd.services."moodle-dl" = { + script = '' + ${lib.getExe pkgs.moodle-dl} --path /var/moodle-dl + ${lib.getExe pkgs.git} -C /var/moodle-dl add . + ${lib.getExe pkgs.git} -C /var/moodle-dl commit -m "moodle-dl updated on `$(${pkgs.coreutils}/bin/date)`" + ''; + path = [ pkgs.openssh ]; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + }; + }; +} + diff --git a/modules/nix/default.nix b/modules/nix/default.nix index da4668a..da92bf9 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -1,53 +1,62 @@ -{ pkgs, self, ... }: +{ config, lib, pkgs, self, ... }: +let + cfg = config.jopejoe1.nix; +in { - nix = { - settings = { - substituters = [ - "https://cache.nixos.org" - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - trusted-users = [ "root" ]; - sandbox = true; - require-sigs = true; - max-jobs = "auto"; - auto-optimise-store = true; - allowed-users = [ "*" ]; - experimental-features = [ "nix-command" "flakes" ]; - warn-dirty = false; - use-xdg-base-directories = true; - }; - package = pkgs.nix; - registry = { - home-manager.flake = self.inputs.home-manager; - nixos-hardware.flake = self.inputs.nixos-hardware; - nur.flake = self.inputs.nur; - nixpkgs.flake = self.inputs.nixpkgs; - }; - nixPath = [ "nixpkgs=${self.inputs.nixpkgs}" "nixos-config=/etc/nixos/configuration.nix" "/nix/var/nix/profiles/per-user/root/channels" ]; + options.jopejoe1.nix = { + enable = lib.mkEnableOption "Enable Nix"; }; - environment.systemPackages = with pkgs; [ - deploy-rs - nixfmt - nix-index - nix-prefetch-git - nixpkgs-review - nurl - nix-init - ]; + config = lib.mkIf cfg.enable { + nix = { + settings = { + substituters = [ + "https://cache.nixos.org" + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + trusted-users = [ "root" ]; + sandbox = true; + require-sigs = true; + max-jobs = "auto"; + auto-optimise-store = true; + allowed-users = [ "*" ]; + experimental-features = [ "nix-command" "flakes" ]; + warn-dirty = false; + use-xdg-base-directories = true; + }; + package = pkgs.nix; + registry = { + home-manager.flake = self.inputs.home-manager; + nixos-hardware.flake = self.inputs.nixos-hardware; + nur.flake = self.inputs.nur; + nixpkgs.flake = self.inputs.nixpkgs; + }; + nixPath = [ "nixpkgs=${self.inputs.nixpkgs}" "nixos-config=/etc/nixos/configuration.nix" "/nix/var/nix/profiles/per-user/root/channels" ]; + }; - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - backupFileExtension = "backup"; + environment.systemPackages = with pkgs; [ + deploy-rs + nixfmt + nixpkgs-fmt + nix-index + nix-prefetch-git + nixpkgs-review + nurl + nix-init + ]; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = "backup"; + }; + + system.stateVersion = "24.05"; }; - - system.stateVersion = "24.05"; } - diff --git a/modules/plasma/6.nix b/modules/plasma/6.nix new file mode 100644 index 0000000..3e4a917 --- /dev/null +++ b/modules/plasma/6.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.jopejoe1.plasma6; +in +{ + options.jopejoe1.plasma6 = { + enable = lib.mkEnableOption "Enable KDE Plasma 6"; + }; + + config = lib.mkIf cfg.enable { + services = { + xserver = { + enable = true; + + libinput.enable = true; + + displayManager.sddm = { + enable = true; + enableHidpi = true; + }; + desktopManager.plasma6 = { + enable = true; + }; + }; + }; + + programs.kdeconnect = { + enable = true; + }; + }; +} + diff --git a/modules/plasma/default.nix b/modules/plasma/default.nix index dc2d84c..df0134c 100644 --- a/modules/plasma/default.nix +++ b/modules/plasma/default.nix @@ -1,27 +1,34 @@ -{ pkgs, ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.plasma; +in { - services = { - xserver = { - enable = true; - - libinput.enable = true; - - displayManager.sddm = { - enable = true; - enableHidpi = true; - }; - desktopManager.plasma6 = { - enable = true; - #useQtScaling = true; - }; - }; + options.jopejoe1.plasma = { + enable = lib.mkEnableOption "Enable KDE Plasma"; }; - programs.kdeconnect = { - enable = true; - #package = pkgs.plasma5Packages.kdeconnect-kde; + config = lib.mkIf cfg.enable { + services = { + xserver = { + enable = true; + + libinput.enable = true; + + displayManager.sddm = { + enable = true; + enableHidpi = true; + }; + desktopManager.plasma5 = { + enable = true; + useQtScaling = true; + }; + }; + }; + + programs.kdeconnect = { + enable = true; + }; }; } - diff --git a/modules/printing/default.nix b/modules/printing/default.nix index 05c026e..3fddbfc 100644 --- a/modules/printing/default.nix +++ b/modules/printing/default.nix @@ -1,22 +1,32 @@ -{ pkgs, ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.printing; +in { - services.printing = { - enable = true; - webInterface = true; - drivers = with pkgs; [ hplipWithPlugin ]; + options.jopejoe1.printing = { + enable = lib.mkEnableOption "Enable Printing"; }; - hardware = { - sane = { + config = lib.mkIf cfg.enable { + services.printing = { enable = true; - extraBackends = with pkgs; [ sane-airscan hplipWithPlugin ]; + webInterface = true; + drivers = with pkgs; [ hplipWithPlugin ]; + }; + + hardware = { + sane = { + enable = true; + extraBackends = with pkgs; [ sane-airscan hplipWithPlugin ]; + }; + }; + + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; }; }; - - services.avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; - }; } + diff --git a/modules/repo-sync/default.nix b/modules/repo-sync/default.nix new file mode 100644 index 0000000..135e5a3 --- /dev/null +++ b/modules/repo-sync/default.nix @@ -0,0 +1,43 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.jopejoe1.repo-sync; +in +{ + options.jopejoe1.repo-sync = { + enable = lib.mkEnableOption "Enable Repo Sync"; + }; + + config = lib.mkIf cfg.enable { + systemd.timers."repo-sync" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "5m"; + OnUnitActiveSec = "15m"; + Unit = "repo-sync.service"; + }; + }; + + systemd.services."repo-sync" = { + script = '' + ${lib.getExe pkgs.git} clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/repo-sync + ${lib.getExe pkgs.git} -C /var/lib/repo-sync remote add github git@github.com:jopejoe1/nix-conf.git + ${lib.getExe pkgs.git} -C /var/lib/repo-sync remote add gitlab git@gitlab.com:jopejoe1/nix-conf.git + ${lib.getExe pkgs.git} -C /var/lib/repo-sync pull -r github main + ${lib.getExe pkgs.git} -C /var/lib/repo-sync pull -r gitlab main + ${lib.getExe pkgs.nix} flake update /var/lib/repo-sync + ${lib.getExe pkgs.git} -C /var/lib/repo-sync commit -m "flack.lock updated on `$(${pkgs.coreutils}/bin/date)`" + ${lib.getExe pkgs.git} -C /var/lib/repo-sync push origin + ${lib.getExe pkgs.git} -C /var/lib/repo-sync push github + ${lib.getExe pkgs.git} -C /var/lib/repo-sync push gitlab + ${pkgs.coreutils}/bin/rm -r /var/lib/repo-sync + ''; + path = [ pkgs.openssh ]; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + }; + }; +} + diff --git a/modules/services/moodle-dl/default.nix b/modules/services/moodle-dl/default.nix deleted file mode 100644 index a6c3e15..0000000 --- a/modules/services/moodle-dl/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, pkgs, ... }: - -{ - systemd.timers."moodle-dl" = { - wantedBy = [ "timers.target" ]; - timerConfig = { - OnBootSec = "5m"; - OnUnitActiveSec = "1h"; - Unit = "moodle-dl.service"; - }; - }; - - systemd.services."moodle-dl" = { - script = '' - ${lib.getExe pkgs.moodle-dl} --path /var/moodle-dl - ${lib.getExe pkgs.git} -C /var/moodle-dl add . - ${lib.getExe pkgs.git} -C /var/moodle-dl commit -m "moodle-dl updated on `$(${pkgs.coreutils}/bin/date)`" - ''; - path = [pkgs.openssh]; - serviceConfig = { - Type = "oneshot"; - User = "root"; - }; - }; -} diff --git a/modules/services/repo-sync/default.nix b/modules/services/repo-sync/default.nix deleted file mode 100644 index cea4a49..0000000 --- a/modules/services/repo-sync/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib, pkgs, ... }: - -{ - systemd.timers."repo-sync" = { - wantedBy = [ "timers.target" ]; - timerConfig = { - OnBootSec = "5m"; - OnUnitActiveSec = "15m"; - Unit = "repo-sync.service"; - }; - }; - - systemd.services."repo-sync" = { - script = '' - ${lib.getExe pkgs.git} clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/repo-sync - ${lib.getExe pkgs.git} -C /var/lib/repo-sync remote add github git@github.com:jopejoe1/nix-conf.git - ${lib.getExe pkgs.git} -C /var/lib/repo-sync remote add gitlab git@gitlab.com:jopejoe1/nix-conf.git - ${lib.getExe pkgs.git} -C /var/lib/repo-sync pull -r github main - ${lib.getExe pkgs.git} -C /var/lib/repo-sync pull -r gitlab main - ${lib.getExe pkgs.nix} flake update /var/lib/repo-sync - ${lib.getExe pkgs.git} -C /var/lib/repo-sync commit -m "flack.lock updated on `$(${pkgs.coreutils}/bin/date)`" - ${lib.getExe pkgs.git} -C /var/lib/repo-sync push origin - ${lib.getExe pkgs.git} -C /var/lib/repo-sync push github - ${lib.getExe pkgs.git} -C /var/lib/repo-sync push gitlab - ${pkgs.coreutils}/bin/rm -r /var/lib/repo-sync - ''; - path = [pkgs.openssh]; - serviceConfig = { - Type = "oneshot"; - User = "root"; - }; - }; -} diff --git a/modules/ssh/default.nix b/modules/ssh/default.nix deleted file mode 100644 index f80a42f..0000000 --- a/modules/ssh/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ pkgs, ... }: - -{ - services = { - openssh = { - enable = true; - ports = [ 22 ]; - openFirewall = true; - allowSFTP = true; - settings = { - X11forwarding = true; - PermitRootLogin = "no"; - passwordAuthentication = true; - kbdInteractiveAuthentication = true; - }; - }; - }; - - environment.systemPackages = with pkgs; [ sshfs ]; -} - - diff --git a/modules/steam/default.nix b/modules/steam/default.nix index 5dc9fc8..240f1b7 100644 --- a/modules/steam/default.nix +++ b/modules/steam/default.nix @@ -1,18 +1,23 @@ -{ pkgs, ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.steam; +in { - hardware.steam-hardware.enable = true; - - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; + options.jopejoe1.steam = { + enable = lib.mkEnableOption "Enable Steam"; }; - programs.steam.gamescopeSession.enable = true; + config = lib.mkIf cfg.enable { + hardware.steam-hardware.enable = true; - #chaotic.steam.extraCompatPackages = with pkgs; [ - # luxtorpeda - # proton-ge-custom - #]; + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; + + programs.steam.gamescopeSession.enable = true; + }; } + diff --git a/modules/theming/default.nix b/modules/theming/default.nix deleted file mode 100644 index 6da35a6..0000000 --- a/modules/theming/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{pkgs, self, ...}: - -{ - stylix = { - image = "${pkgs.libsForQt5.breeze-qt5}/share/wallpapers/Next/contents/images_dark/5120x2880.png"; - polarity = "dark"; - base16Scheme = "${self.inputs.catppuccin-base16}/base16/frappe.yaml"; - fonts.emoji.package = pkgs.noto-fonts-color-emoji; - fonts.emoji.name = "Noto Color Emoji"; - }; -} diff --git a/modules/users/default.nix b/modules/users/default.nix new file mode 100644 index 0000000..00935d4 --- /dev/null +++ b/modules/users/default.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + imports = [ + ./root + ./jopejoe1 + ]; +} diff --git a/modules/users/jopejoe1/default.nix b/modules/users/jopejoe1/default.nix index e46cddc..cde9405 100644 --- a/modules/users/jopejoe1/default.nix +++ b/modules/users/jopejoe1/default.nix @@ -1,30 +1,31 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.jopejoe1; +in { - imports = [ - ./home.nix - ]; - - users.users.jopejoe1 = { - isNormalUser = true; - description = "Johannes Jöns"; - initialPassword = "password"; - extraGroups = [ "wheel" "networkmanager" "pipewire" "audio" ]; - uid = 1000; - packages = with pkgs; [ - libsForQt5.kate - libsForQt5.ark - #libreoffice-qt - texlive.combined.scheme-full - ] ++ lib.optionals (config.system == "x86_64-linux") [ - discord - google-chrome - lutris - bottles - ]; - openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCUWMJyy2qq2aacVv/J5raugh7UKEmCs+JpagQh30mYqwLV9YQtOfZ+A3Q1qOOLPHTTciLydsfz8K2jBGXEv49uqz9P33aw63RzSaLdcnXhBJRmZvJ3AujLBKDIo24PLOVasogtu01eyQALTg4npX+qlti2UsxLY5O8E5paFJvJ+5rGE3/34c4xA9xthUm7G7SCSt4AhVXwPGB1tqz1KLqGdTJQhvy80laEDSV4tAYpiabmjhNFKGpf8T7afnw1MzKXz+ba6exBcGaJfy2Q24DLztZsW7fsTE1iCdkbcmos9/jUR6NooKFgDr0M4CL2TVZB5pECSiOev06GMnLt+vpxjFL29YeGMaVMmNCedkL1z1mftbXLEL7934kEK9FpEpSwzbRTJ7iPvfYZuTHiT6fi2Ep7n+zzRS+/ZgDUDLSqZYEBmE4dO4LgcqzOsJo5EgoyLGoqQ4OpvPRY12T3rCWUfEgOCXgToF0WlUyxCaPZCfvUjM4LXNlIy/dtivMxMs8= jopejoe1@yokai" - ]; + options.jopejoe1.jopejoe1 = { + enable = lib.mkEnableOption "Enable jopejoe1 user"; }; -} + config = lib.mkIf cfg.enable { + users.users.jopejoe1 = { + isNormalUser = true; + description = "Johannes Jöns"; + initialPassword = "passwor"; + extraGroups = [ "wheel" "networkmanager" "pipewire" "audio" ]; + uid = 1000; + packages = with pkgs; [ + libsForQt5.kate + libsForQt5.ark + texlive.combined.scheme-full + ] ++ lib.optionals (config.system == "x86_64-linux") [ + discord + lutris + bottles + ]; + }; + }; + + imports = [ ./home.nix ]; +} diff --git a/modules/users/jopejoe1/home.nix b/modules/users/jopejoe1/home.nix index 4a7c4f2..6346a05 100644 --- a/modules/users/jopejoe1/home.nix +++ b/modules/users/jopejoe1/home.nix @@ -1,178 +1,182 @@ { config, pkgs, lib, ... }: -let hcfg = config.home-manager.users.jopejoe1; -in { - home-manager.users.jopejoe1 = { - home = { - # Basic information for home-manager - username = config.users.users.jopejoe1.name; - homeDirectory = config.users.users.jopejoe1.home; +let + cfg = config.jopejoe1.jopejoe1; + hcfg = config.home-manager.users.jopejoe1; +in +{ + config = lib.mkIf cfg.enable { + home-manager.users.jopejoe1 = { + home = { + # Basic information for home-manager + username = config.users.users.jopejoe1.name; + homeDirectory = config.users.users.jopejoe1.home; - # Enviroment variables - sessionVariables = { - XCOMPOSECACHE = "${hcfg.xdg.cacheHome}/X11/xcompos"; - XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority"; - ANDROID_HOME = "${hcfg.xdg.dataHome}/android"; - CUDA_CACHE_PATH = "${hcfg.xdg.cacheHome}/nv"; - GRADLE_USER_HOME = "${hcfg.xdg.dataHome}/gradle"; - KODI_DATA = "${hcfg.xdg.dataHome}/kodi"; - _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${hcfg.xdg.configHome}/java"; - WINEPREFIX = "${hcfg.xdg.dataHome}/wine"; + # Enviroment variables + sessionVariables = { + XCOMPOSECACHE = "${hcfg.xdg.cacheHome}/X11/xcompos"; + XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority"; + ANDROID_HOME = "${hcfg.xdg.dataHome}/android"; + CUDA_CACHE_PATH = "${hcfg.xdg.cacheHome}/nv"; + GRADLE_USER_HOME = "${hcfg.xdg.dataHome}/gradle"; + KODI_DATA = "${hcfg.xdg.dataHome}/kodi"; + _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${hcfg.xdg.configHome}/java"; + WINEPREFIX = "${hcfg.xdg.dataHome}/wine"; + }; + + stateVersion = config.system.stateVersion; }; - stateVersion = config.system.stateVersion; - }; - - accounts.email.accounts = { - main = { - address = "johannes@joens.email"; - flavor = "gmail.com"; - primary = true; - realName = "Johannes Jöns"; - thunderbird.enable = true; - }; - }; - - gtk = { - enable = false; - gtk2.configLocation = "${hcfg.xdg.configHome}/gtk-2.0/gtkrc"; - }; - - # XDG base dirs - xdg = { - enable = true; - mime.enable = true; - cacheHome = "${hcfg.home.homeDirectory}/.cache"; - configHome = "${hcfg.home.homeDirectory}/.config"; - dataHome = "${hcfg.home.homeDirectory}/.local/share"; - stateHome = "${hcfg.home.homeDirectory}/.local/state"; - userDirs = { - enable = true; - createDirectories = true; - desktop = "${hcfg.home.homeDirectory}/Desktop"; - documents = "${hcfg.home.homeDirectory}/Documents"; - download = "${hcfg.home.homeDirectory}/Downloads"; - music = "${hcfg.home.homeDirectory}/Music"; - pictures = "${hcfg.home.homeDirectory}/Pictures"; - publicShare = "${hcfg.home.homeDirectory}/Public"; - templates = "${hcfg.home.homeDirectory}/Templates"; - videos = "${hcfg.home.homeDirectory}/Videos"; - }; - }; - programs = { - home-manager.enable = true; - bash = { - enable = true; - enableCompletion = true; - enableVteIntegration = true; - historyControl = [ "erasedups" "ignoredups" "ignorespace" ]; - historyFile = "${hcfg.xdg.stateHome}/bash/history"; - }; - git = { - enable = true; - package = pkgs.git; - userEmail = "johannes@joens.email"; - userName = "jopejoe1"; - extraConfig = { - core = { - whitespace = [ - "blank-at-eol" - "blank-at-eof" - "space-before-tab" - ]; - }; + accounts.email.accounts = { + main = { + address = "johannes@joens.email"; + flavor = "gmail.com"; + primary = true; + realName = "Johannes Jöns"; + thunderbird.enable = true; }; }; - direnv = { - enable = true; - nix-direnv.enable = true; + + gtk = { + enable = false; + gtk2.configLocation = "${hcfg.xdg.configHome}/gtk-2.0/gtkrc"; }; - firefox = { + + # XDG base dirs + xdg = { enable = true; - package = pkgs.wrapFirefox pkgs.firefox-devedition-unwrapped { - icon = "firefox-devedition"; - nameSuffix = "-devedition"; - pname = "firefox-devedition"; - desktopName = "Firefox DevEdition"; - wmClass = "firefox-devedition"; + mime.enable = true; + cacheHome = "${hcfg.home.homeDirectory}/.cache"; + configHome = "${hcfg.home.homeDirectory}/.config"; + dataHome = "${hcfg.home.homeDirectory}/.local/share"; + stateHome = "${hcfg.home.homeDirectory}/.local/state"; + userDirs = { + enable = true; + createDirectories = true; + desktop = "${hcfg.home.homeDirectory}/Desktop"; + documents = "${hcfg.home.homeDirectory}/Documents"; + download = "${hcfg.home.homeDirectory}/Downloads"; + music = "${hcfg.home.homeDirectory}/Music"; + pictures = "${hcfg.home.homeDirectory}/Pictures"; + publicShare = "${hcfg.home.homeDirectory}/Public"; + templates = "${hcfg.home.homeDirectory}/Templates"; + videos = "${hcfg.home.homeDirectory}/Videos"; }; - policies = { - AppAutoUpdate = false; - BackgroundAppUpdate = false; - CaptivePortal = false; - DefaultDownloadDirectory = "${hcfg.xdg.userDirs.download}"; - DisableAccounts = true; - DisableAppUpdate = true; - DisableFirefoxAccounts = true; - DisableFirefoxStudies = true; - DisableForgetButton = true; - DisableFormHistory = true; - DisableMasterPasswordCreation = true; - DisablePasswordReveal = true; - DisablePocket = true; - DisableSetDesktopBackground = true; - DisableSystemAddonUpdate = true; - DisableTelemetry = true; - DontCheckDefaultBrowser = true; - ExtensionUpdate = false; - HardwareAcceleration = true; - ManualAppUpdateOnly = true; - NoDefaultBookmarks = true; - OfferToSaveLogins = false; - OfferToSaveLoginsDefault = false; - PasswordManagerEnabled = false; - PrimaryPassword = false; - SearchBar = "unified"; - StartDownloadsInTempDirectory = true; - DNSOverHTTPS = { - Enabled = false; - Locked = true; + }; + programs = { + home-manager.enable = true; + bash = { + enable = true; + enableCompletion = true; + enableVteIntegration = true; + historyControl = [ "erasedups" "ignoredups" "ignorespace" ]; + historyFile = "${hcfg.xdg.stateHome}/bash/history"; + }; + git = { + enable = true; + package = pkgs.git; + userEmail = "johannes@joens.email"; + userName = "jopejoe1"; + extraConfig = { + core = { + whitespace = [ + "blank-at-eol" + "blank-at-eof" + "space-before-tab" + ]; + }; }; - EnableTrackingProtection = { - Value = true; - EmailTracking = true; - Cryptomining = true; - Fingerprinting = true; - Locked = true; + }; + direnv = { + enable = true; + nix-direnv.enable = true; + }; + firefox = { + enable = true; + package = pkgs.wrapFirefox pkgs.firefox-devedition-unwrapped { + icon = "firefox-devedition"; + nameSuffix = "-devedition"; + pname = "firefox-devedition"; + desktopName = "Firefox DevEdition"; + wmClass = "firefox-devedition"; }; - FirefoxHome = { - Highlights = false; - Pocket = false; - Search = true; - Snippets = false; - SponsoredPocket = false; - SponsoredTopSites = false; - TopSites = true; - Locked = true; - }; - FirefoxSuggest = { - WebSuggestions = false; - SponsoredSuggestions = false; - ImproveSuggest = false; - Locked = true; - }; - PDFjs = { - Enabled = true; - EnablePermissions = false; - }; - SupportMenu = { - Title = "Localhost"; - URL = "http://localhost"; - }; - UserMessaging = { - WhatsNew = false; - ExtensionRecommendations = false; - FeatureRecommendations = false; - UrlbarInterventions = false; - SkipOnboarding = true; - MoreFromMozilla = false; - Locked = true; - }; - # Extension Settings - "3rdparty" = { - Extensions = { - "uBlock0@raymondhill.net" = { - #adminSettings = { + policies = { + AppAutoUpdate = false; + BackgroundAppUpdate = false; + CaptivePortal = false; + DefaultDownloadDirectory = "${hcfg.xdg.userDirs.download}"; + DisableAccounts = true; + DisableAppUpdate = true; + DisableFirefoxAccounts = true; + DisableFirefoxStudies = true; + DisableForgetButton = true; + DisableFormHistory = true; + DisableMasterPasswordCreation = true; + DisablePasswordReveal = true; + DisablePocket = true; + DisableSetDesktopBackground = true; + DisableSystemAddonUpdate = true; + DisableTelemetry = true; + DontCheckDefaultBrowser = true; + ExtensionUpdate = false; + HardwareAcceleration = true; + ManualAppUpdateOnly = true; + NoDefaultBookmarks = true; + OfferToSaveLogins = false; + OfferToSaveLoginsDefault = false; + PasswordManagerEnabled = false; + PrimaryPassword = false; + SearchBar = "unified"; + StartDownloadsInTempDirectory = true; + DNSOverHTTPS = { + Enabled = false; + Locked = true; + }; + EnableTrackingProtection = { + Value = true; + EmailTracking = true; + Cryptomining = true; + Fingerprinting = true; + Locked = true; + }; + FirefoxHome = { + Highlights = false; + Pocket = false; + Search = true; + Snippets = false; + SponsoredPocket = false; + SponsoredTopSites = false; + TopSites = true; + Locked = true; + }; + FirefoxSuggest = { + WebSuggestions = false; + SponsoredSuggestions = false; + ImproveSuggest = false; + Locked = true; + }; + PDFjs = { + Enabled = true; + EnablePermissions = false; + }; + SupportMenu = { + Title = "Localhost"; + URL = "http://localhost"; + }; + UserMessaging = { + WhatsNew = false; + ExtensionRecommendations = false; + FeatureRecommendations = false; + UrlbarInterventions = false; + SkipOnboarding = true; + MoreFromMozilla = false; + Locked = true; + }; + # Extension Settings + "3rdparty" = { + Extensions = { + "uBlock0@raymondhill.net" = { + #adminSettings = { userSettings = { uiTheme = "dark"; autoUpdate = true; @@ -217,226 +221,227 @@ in { "DEU-0" ]; }; - #}; - }; - }; - }; - profiles = { - default = { - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - ublock-origin - privacy-badger - bitwarden - clearurls - decentraleyes - duckduckgo-privacy-essentials - ghostery - libredirect - privacy-badger - languagetool - #fastforward - return-youtube-dislikes - sponsorblock - augmented-steam - steam-database - refined-github - plasma-integration - #bypass-paywalls-clean - lovely-forks - search-by-image - skip-redirect - terms-of-service-didnt-read - unpaywall - wappalyzer - wayback-machine - modrinthify - ]; - id = 0; - isDefault = true; - name = "default"; - search = { - default = "DuckDuckGo"; - force = true; - engines = { - "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "channel"; - value = "unstable"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - }]; - icon = - "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@np" ]; - }; - "NixOS Modules" = { - urls = [{ - template = "https://search.nixos.org/options"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "channel"; - value = "unstable"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - }]; - icon = - "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@nm" ]; - }; - "NixOS Wiki" = { - urls = [{ - template = "https://nixos.wiki/index.php"; - params = [{ - name = "search"; - value = "{searchTerms}"; - }]; - }]; - icon = - "${hcfg.programs.firefox.profiles.default.search.engines."Nix Packages".icon}"; - definedAliases = [ "@nw" ]; - }; - "Minecraft Wiki" = { - urls = [{ - template = "https://minecraft.wiki/"; - params = [{ - name = "search"; - value = "{searchTerms}"; - }]; - }]; - iconUpdateURL = "https://minecraft.wiki/images/Wiki.png"; - updateInterval = 24 * 60 * 60 * 1000; - definedAliases = [ "@mc" ]; - }; - "Warframe Wiki" = { - urls = [{ - template = "https://warframe.fandom.com/wiki/Special:Search"; - params = [{ - name = "query"; - value = "{searchTerms}"; - }]; - }]; - iconUpdateURL = "https://static.wikia.nocookie.net/warframe/images/e/e6/Site-logo.png"; - updateInterval = 24 * 60 * 60 * 1000; - definedAliases = [ "@wf" ]; - }; - "Bing".metaData.hidden = true; - "Google".metaData.hidden = true; - "eBay".metaData.hidden = true; - "Amazon.de".metaData.hidden = true; - "ToS;DR Search".metaData.hidden = true; - "LibRedirect".metaData.hidden = true; - "Wikipedia (en)".metaData.alias = "@wiki"; + #}; }; }; - settings = { - "privacy.resistFingerprinting" = true; - "privacy.trackingprotection.fingerprinting.enabled" = true; - "privacy.trackingprotection.cryptomining.enabled" = true; - "dom.event.clipboardevents.enabled" = false; - "dom.battery.enabled" = false; - "browser.safebrowsing.phishing.enabled" = false; - "browser.safebrowsing.malware.enabled" = false; - "browser.zoom.siteSpecific" = true; - "config.trim_on_minimize" = true; - "pdfjs.annotationEditorMode" = 0; - "pdfjs.annotationMode" = 2; - "font.name-list.emoji" = lib.strings.concatStringsSep ", " config.fonts.fontconfig.defaultFonts.emoji; - - ## Arkenfox Stuff - "browser.aboutConfig.showWarning" = false; - "browser.newtabpage.activity-stream.showSponsored" = false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; - "extensions.getAddons.showPane" = false; - "extensions.htmlaboutaddons.recommendations.enabled" = false; - "browser.discovery.enabled" = false; - "browser.shopping.experience2023.enabled" = false; - "datareporting.policy.dataSubmissionEnabled" = false; - "datareporting.healthreport.uploadEnabled" = false; - "toolkit.telemetry.unified" = false; - "toolkit.telemetry.enabled" = false; - "toolkit.telemetry.server" = "data:,"; - "toolkit.telemetry.archive.enabled" = false; - "toolkit.telemetry.newProfilePing.enabled" = false; - "toolkit.telemetry.shutdownPingSender.enabled" = false; - "toolkit.telemetry.updatePing.enabled" = false; - "toolkit.telemetry.bhrPing.enabled" = false; - "toolkit.telemetry.firstShutdownPing.enabled" = false; - "toolkit.telemetry.coverage.opt-out" = true; - "toolkit.coverage.opt-out" = true; - "toolkit.coverage.endpoint.base" = ""; - "browser.ping-centre.telemetry" = false; - "browser.newtabpage.activity-stream.feeds.telemetry" = false; - "browser.newtabpage.activity-stream.telemetry" = false; - "app.shield.optoutstudies.enabled" = false; - "app.normandy.enabled" = false; - "app.normandy.api_url" = ""; - "breakpad.reportURL" = ""; - "browser.tabs.crashReporting.sendReport" = false; - "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; - "captivedetect.canonicalURL" = ""; - "network.captive-portal-service.enabled" = false; - "network.connectivity-service.enabled" = false; - "network.prefetch-next" = false; - "network.dns.disablePrefetch" = true; - "network.predictor.enabled" = false; - "network.predictor.enable-prefetch" = false; - "network.http.speculative-parallel-limit" = 0; - "browser.places.speculativeConnect.enabled" = false; - "browser.urlbar.speculativeConnect.enabled" = false; - "browser.urlbar.suggest.quicksuggest.nonsponsored" = false; - "browser.urlbar.suggest.quicksuggest.sponsored" = false; - "browser.formfill.enable" = false; - "browser.download.start_downloads_in_tmp_dir" = true; - "browser.uitour.enabled" = false; - }; }; - dev-edition-default = { - id = 1; - isDefault = false; - name = "dev-edition-default"; - path = "default"; + profiles = { + default = { + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + ublock-origin + privacy-badger + bitwarden + clearurls + decentraleyes + duckduckgo-privacy-essentials + ghostery + libredirect + privacy-badger + languagetool + #fastforward + return-youtube-dislikes + sponsorblock + augmented-steam + steam-database + refined-github + plasma-integration + #bypass-paywalls-clean + lovely-forks + search-by-image + skip-redirect + terms-of-service-didnt-read + unpaywall + wappalyzer + wayback-machine + modrinthify + ]; + id = 0; + isDefault = true; + name = "default"; + search = { + default = "DuckDuckGo"; + force = true; + engines = { + "Nix Packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "channel"; + value = "unstable"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + }]; + icon = + "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; + }; + "NixOS Modules" = { + urls = [{ + template = "https://search.nixos.org/options"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "channel"; + value = "unstable"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + }]; + icon = + "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@nm" ]; + }; + "NixOS Wiki" = { + urls = [{ + template = "https://nixos.wiki/index.php"; + params = [{ + name = "search"; + value = "{searchTerms}"; + }]; + }]; + icon = + "${hcfg.programs.firefox.profiles.default.search.engines."Nix Packages".icon}"; + definedAliases = [ "@nw" ]; + }; + "Minecraft Wiki" = { + urls = [{ + template = "https://minecraft.wiki/"; + params = [{ + name = "search"; + value = "{searchTerms}"; + }]; + }]; + iconUpdateURL = "https://minecraft.wiki/images/Wiki.png"; + updateInterval = 24 * 60 * 60 * 1000; + definedAliases = [ "@mc" ]; + }; + "Warframe Wiki" = { + urls = [{ + template = "https://warframe.fandom.com/wiki/Special:Search"; + params = [{ + name = "query"; + value = "{searchTerms}"; + }]; + }]; + iconUpdateURL = "https://static.wikia.nocookie.net/warframe/images/e/e6/Site-logo.png"; + updateInterval = 24 * 60 * 60 * 1000; + definedAliases = [ "@wf" ]; + }; + "Bing".metaData.hidden = true; + "Google".metaData.hidden = true; + "eBay".metaData.hidden = true; + "Amazon.de".metaData.hidden = true; + "ToS;DR Search".metaData.hidden = true; + "LibRedirect".metaData.hidden = true; + "Wikipedia (en)".metaData.alias = "@wiki"; + }; + }; + settings = { + "privacy.resistFingerprinting" = true; + "privacy.trackingprotection.fingerprinting.enabled" = true; + "privacy.trackingprotection.cryptomining.enabled" = true; + "dom.event.clipboardevents.enabled" = false; + "dom.battery.enabled" = false; + "browser.safebrowsing.phishing.enabled" = false; + "browser.safebrowsing.malware.enabled" = false; + "browser.zoom.siteSpecific" = true; + "config.trim_on_minimize" = true; + "pdfjs.annotationEditorMode" = 0; + "pdfjs.annotationMode" = 2; + "font.name-list.emoji" = lib.strings.concatStringsSep ", " config.fonts.fontconfig.defaultFonts.emoji; + + ## Arkenfox Stuff + "browser.aboutConfig.showWarning" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "extensions.getAddons.showPane" = false; + "extensions.htmlaboutaddons.recommendations.enabled" = false; + "browser.discovery.enabled" = false; + "browser.shopping.experience2023.enabled" = false; + "datareporting.policy.dataSubmissionEnabled" = false; + "datareporting.healthreport.uploadEnabled" = false; + "toolkit.telemetry.unified" = false; + "toolkit.telemetry.enabled" = false; + "toolkit.telemetry.server" = "data:,"; + "toolkit.telemetry.archive.enabled" = false; + "toolkit.telemetry.newProfilePing.enabled" = false; + "toolkit.telemetry.shutdownPingSender.enabled" = false; + "toolkit.telemetry.updatePing.enabled" = false; + "toolkit.telemetry.bhrPing.enabled" = false; + "toolkit.telemetry.firstShutdownPing.enabled" = false; + "toolkit.telemetry.coverage.opt-out" = true; + "toolkit.coverage.opt-out" = true; + "toolkit.coverage.endpoint.base" = ""; + "browser.ping-centre.telemetry" = false; + "browser.newtabpage.activity-stream.feeds.telemetry" = false; + "browser.newtabpage.activity-stream.telemetry" = false; + "app.shield.optoutstudies.enabled" = false; + "app.normandy.enabled" = false; + "app.normandy.api_url" = ""; + "breakpad.reportURL" = ""; + "browser.tabs.crashReporting.sendReport" = false; + "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; + "captivedetect.canonicalURL" = ""; + "network.captive-portal-service.enabled" = false; + "network.connectivity-service.enabled" = false; + "network.prefetch-next" = false; + "network.dns.disablePrefetch" = true; + "network.predictor.enabled" = false; + "network.predictor.enable-prefetch" = false; + "network.http.speculative-parallel-limit" = 0; + "browser.places.speculativeConnect.enabled" = false; + "browser.urlbar.speculativeConnect.enabled" = false; + "browser.urlbar.suggest.quicksuggest.nonsponsored" = false; + "browser.urlbar.suggest.quicksuggest.sponsored" = false; + "browser.formfill.enable" = false; + "browser.download.start_downloads_in_tmp_dir" = true; + "browser.uitour.enabled" = false; + }; + }; + dev-edition-default = { + id = 1; + isDefault = false; + name = "dev-edition-default"; + path = "default"; + }; }; }; }; - }; - programs.neovim = { - enable = true; - defaultEditor = true; - extraPackages = with pkgs; [ - clang-tools - gcc - gopls - nixd - nodePackages.bash-language-server - vscode-langservers-extracted - yaml-language-server - python3Packages.python-lsp-server - shellcheck - ]; + programs.neovim = { + enable = true; + defaultEditor = true; + extraPackages = with pkgs; [ + clang-tools + gcc + gopls + nixd + nodePackages.bash-language-server + vscode-langservers-extracted + yaml-language-server + python3Packages.python-lsp-server + shellcheck + ]; - plugins = with pkgs.vimPlugins; [ - nvim-treesitter.withAllGrammars - nvim-lspconfig - ]; + plugins = with pkgs.vimPlugins; [ + nvim-treesitter.withAllGrammars + nvim-lspconfig + ]; + }; }; }; } diff --git a/modules/users/root/default.nix b/modules/users/root/default.nix index c49b32c..0205af7 100644 --- a/modules/users/root/default.nix +++ b/modules/users/root/default.nix @@ -1,12 +1,20 @@ -{ ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.jopejoe1.root; +in { + options.jopejoe1.root = { + enable = lib.mkEnableOption "Enable root user"; + }; + + config = lib.mkIf cfg.enable { + users.users.root = { + initialPassword = "password"; + }; + }; imports = [ ./home.nix ]; - - users.users.root = { - initialPassword = "password"; - }; } diff --git a/modules/users/root/home.nix b/modules/users/root/home.nix index ec57584..f9b3dcb 100644 --- a/modules/users/root/home.nix +++ b/modules/users/root/home.nix @@ -1,83 +1,88 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: -let hcfg = config.home-manager.users.root; -in { - home-manager.users.root = { - home = { - # Basic information for home-manager - username = "root"; - homeDirectory = "/${hcfg.home.username}"; +let + cfg = config.jopejoe1.root; + hcfg = config.home-manager.users.root; +in +{ + config = lib.mkIf cfg.enable { + home-manager.users.root = { + home = { + # Basic information for home-manager + username = "root"; + homeDirectory = "/${hcfg.home.username}"; - # Enviroment variables - sessionVariables = { - XCOMPOSECACHE = "${hcfg.xdg.cacheHome}/X11/xcompos"; - XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority"; - ANDROID_HOME = "${hcfg.xdg.dataHome}/android"; - CUDA_CACHE_PATH = "${hcfg.xdg.cacheHome}/nv"; - GRADLE_USER_HOME = "${hcfg.xdg.dataHome}/gradle"; - KODI_DATA = "${hcfg.xdg.dataHome}/kodi"; - _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${hcfg.xdg.configHome}/java"; - WINEPREFIX = "${hcfg.xdg.dataHome}/wine"; + # Enviroment variables + sessionVariables = { + XCOMPOSECACHE = "${hcfg.xdg.cacheHome}/X11/xcompos"; + XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority"; + ANDROID_HOME = "${hcfg.xdg.dataHome}/android"; + CUDA_CACHE_PATH = "${hcfg.xdg.cacheHome}/nv"; + GRADLE_USER_HOME = "${hcfg.xdg.dataHome}/gradle"; + KODI_DATA = "${hcfg.xdg.dataHome}/kodi"; + _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${hcfg.xdg.configHome}/java"; + WINEPREFIX = "${hcfg.xdg.dataHome}/wine"; + }; + + stateVersion = config.system.stateVersion; }; - stateVersion = config.system.stateVersion; - }; - - accounts.email.accounts = { - main = { - address = "johannes@joens.email"; - flavor = "gmail.com"; - primary = true; - realName = "Johannes Joens"; - thunderbird.enable = true; - }; - }; - - # XDG base dirs - xdg = { - enable = true; - mime.enable = true; - cacheHome = "${hcfg.home.homeDirectory}/.cache"; - configHome = "${hcfg.home.homeDirectory}/.config"; - dataHome = "${hcfg.home.homeDirectory}/.local/share"; - stateHome = "${hcfg.home.homeDirectory}/.local/state"; - userDirs = { - enable = true; - createDirectories = true; - desktop = "${hcfg.home.homeDirectory}/Desktop"; - documents = "${hcfg.home.homeDirectory}/Documents"; - download = "${hcfg.home.homeDirectory}/Downloads"; - music = "${hcfg.home.homeDirectory}/Music"; - pictures = "${hcfg.home.homeDirectory}/Pictures"; - publicShare = "${hcfg.home.homeDirectory}/Public"; - templates = "${hcfg.home.homeDirectory}/Templates"; - videos = "${hcfg.home.homeDirectory}/Videos"; - }; - }; - - programs = { - home-manager.enable = true; - git = { - enable = true; - package = pkgs.git; - userEmail = "johannes@joens.email"; - userName = "jopejoe1"; - }; - direnv = { - enable = true; - nix-direnv.enable = true; - }; - bash = { - enable = true; - historyFile = "${hcfg.xdg.stateHome}/bash/history"; - shellAliases = { - gc = "nix store gc"; - rb = "git -C /etc/nixos pull && nix flake update /etc/nixos/ && sudo nixos-rebuild switch --impure && git -C /etc/nixos add . && git -C /etc/nixos commit -m 'Updated flake.lock' && git -C /etc/nixos push"; + accounts.email.accounts = { + main = { + address = "johannes@joens.email"; + flavor = "gmail.com"; + primary = true; + realName = "Johannes Joens"; + thunderbird.enable = true; }; }; - zsh.shellAliases = hcfg.programs.bash.shellAliases; - fish.shellAbbrs = hcfg.programs.bash.shellAliases; + # XDG base dirs + xdg = { + enable = true; + mime.enable = true; + cacheHome = "${hcfg.home.homeDirectory}/.cache"; + configHome = "${hcfg.home.homeDirectory}/.config"; + dataHome = "${hcfg.home.homeDirectory}/.local/share"; + stateHome = "${hcfg.home.homeDirectory}/.local/state"; + userDirs = { + enable = true; + createDirectories = true; + desktop = "${hcfg.home.homeDirectory}/Desktop"; + documents = "${hcfg.home.homeDirectory}/Documents"; + download = "${hcfg.home.homeDirectory}/Downloads"; + music = "${hcfg.home.homeDirectory}/Music"; + pictures = "${hcfg.home.homeDirectory}/Pictures"; + publicShare = "${hcfg.home.homeDirectory}/Public"; + templates = "${hcfg.home.homeDirectory}/Templates"; + videos = "${hcfg.home.homeDirectory}/Videos"; + }; + }; + + programs = { + home-manager.enable = true; + git = { + enable = true; + package = pkgs.git; + userEmail = "johannes@joens.email"; + userName = "jopejoe1"; + }; + direnv = { + enable = true; + nix-direnv.enable = true; + }; + bash = { + enable = true; + historyFile = "${hcfg.xdg.stateHome}/bash/history"; + shellAliases = { + gc = "nix store gc"; + rb = "git -C /etc/nixos pull && nix flake update /etc/nixos/ && sudo nixos-rebuild switch --impure && git -C /etc/nixos add . && git -C /etc/nixos commit -m 'Updated flake.lock' && git -C /etc/nixos push"; + }; + }; + zsh.shellAliases = hcfg.programs.bash.shellAliases; + fish.shellAbbrs = hcfg.programs.bash.shellAliases; + + }; }; }; } diff --git a/modules/web/peertube/default.nix b/modules/web/peertube/default.nix deleted file mode 100644 index bbc5982..0000000 --- a/modules/web/peertube/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ ... }: - -{ - services.peertube = { - enable = true; - secrets.secretsFile = "/run/secrets/peertube"; - redis.createLocally = true; - database.createLocally = true; - localDomain = "peertube.local"; - }; -} diff --git a/systems/inugami/default.nix b/systems/inugami/default.nix index 5d9f115..dcdd765 100644 --- a/systems/inugami/default.nix +++ b/systems/inugami/default.nix @@ -5,6 +5,16 @@ ./hardware-configuration.nix ]; + jopejoe1 = { + audio = { + enable = true; + }; + bluetooth.enable = true; + local.enable = true; + nix.enable = true; + root.enable = true; + }; + boot.loader = { grub.enable = false; generic-extlinux-compatible.enable = true; diff --git a/systems/kami/default.nix b/systems/kami/default.nix index 6c0ef03..71e6630 100644 --- a/systems/kami/default.nix +++ b/systems/kami/default.nix @@ -6,6 +6,23 @@ ./hardware.nix ]; + jopejoe1 = { + audio = { + enable = true; + }; + bluetooth.enable = true; + local.enable = true; + nix.enable = true; + plasma6.enable = true; + printing.enable = true; + steam.enable = true; + asf.enable = true; + minecraft-server.enable = true; + repo-sync.enable = true; + jopejoe1.enable = true; + root.enable = true; + }; + networking.hostName = "kami"; networking.hostId = "16c22faf"; services.hardware.openrgb.enable = true; diff --git a/systems/tuny/default.nix b/systems/tuny/default.nix index 14bb52b..fbda156 100644 --- a/systems/tuny/default.nix +++ b/systems/tuny/default.nix @@ -5,6 +5,17 @@ ./hardware-configuration.nix ]; + jopejoe1 = { + audio = { + enable = true; + }; + bluetooth.enable = true; + local.enable = true; + jopejoe1.enable = true; + nix.enable = true; + root.enable = true; + }; + networking.hostName = "tuny"; boot.loader.grub.device = "/dev/sda"; diff --git a/systems/yokai/default.nix b/systems/yokai/default.nix index ee86d54..d517630 100644 --- a/systems/yokai/default.nix +++ b/systems/yokai/default.nix @@ -2,10 +2,24 @@ { imports = - [ # Include the results of the hardware scan. + [ + # Include the results of the hardware scan. ./hardware.nix ]; + jopejoe1 = { + audio = { + enable = true; + }; + bluetooth.enable = true; + local.enable = true; + nix.enable = true; + plasma.enable = true; + printing.enable = true; + jopejoe1.enable = true; + root.enable = true; + }; + networking.hostName = "yokai"; networking.hostId = "af13bbec"; @@ -17,6 +31,39 @@ networking.networkmanager.enable = true; + networking.networkmanager.ensureProfiles.profiles = { + "37C3" = { + connection = { + id = "37C3"; + type = "wifi"; + interface-name = "wlan0"; + }; + wifi = { + mode = "infrastructure"; + ssid = "37C3"; + }; + wifi-security = { + auth-alg = "open"; + key-mgmt = "wpa-eap"; + }; + "802-1x" = { + anonymous-identity = "37C3"; + eap = "ttls;"; + identity = "37C3"; + password = "37C3"; + phase2-auth = "mschapv2"; + }; + ipv4 = { + method = "auto"; + }; + ipv6 = { + addr-gen-mode = "default"; + method = "auto"; + }; + }; + }; + + time.timeZone = "Europe/Berlin"; environment.systemPackages = with pkgs; [