From 3fbbe84dcad7c6a9d7ed156e8d70e9353d560e06 Mon Sep 17 00:00:00 2001 From: lucy Date: Sun, 18 Oct 2026 12:32:12 +0200 Subject: [PATCH 1/6] add boot module --- modules/default.nix | 2 ++ modules/system/agenix/agenix.nix | 7 +++++-- modules/system/core/boot.nix | 22 ++++++++++++++++++++++ modules/system/{ => core}/packages.nix | 0 modules/system/{ => core}/user.nix | 0 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 modules/system/core/boot.nix rename modules/system/{ => core}/packages.nix (100%) rename modules/system/{ => core}/user.nix (100%) diff --git a/modules/default.nix b/modules/default.nix index 9808457..be24619 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -3,6 +3,8 @@ modules = with self.nixosModules; [ user packages + agenix + boot /etc/nixos/hardware-configuration.nix ]; }; diff --git a/modules/system/agenix/agenix.nix b/modules/system/agenix/agenix.nix index c153b55..00e7b55 100644 --- a/modules/system/agenix/agenix.nix +++ b/modules/system/agenix/agenix.nix @@ -1,5 +1,8 @@ -{ ... }: { - flake.nixosModules = { +{inputs, ... }: { + flake.nixosModules.agenix = {config, ...}: { + imports = [ + inputs.agenix.nixosModules.default + ]; age = { enable = true; identityPaths = [ "/var/lib/misc/key.age" ]; diff --git a/modules/system/core/boot.nix b/modules/system/core/boot.nix new file mode 100644 index 0000000..9f14319 --- /dev/null +++ b/modules/system/core/boot.nix @@ -0,0 +1,22 @@ +{ ... }: { + flake.nixosModules.boot = { + options = { + dualBoot = lib.mkOption { + type = lib.types.bool; + default = false; + description = "wether to enable windows boot entry to limine or not"; + }; + }; + boot.loader = { + efi.canTouchEfiVariables = true; + limine = { + enable = true; + extraEntries = lib.mkIf dualBoot '' + /Windows 11 + protocol: efi_boot_entry + entry: Windows Boot Manager + ''; + }; + }; + }; +} diff --git a/modules/system/packages.nix b/modules/system/core/packages.nix similarity index 100% rename from modules/system/packages.nix rename to modules/system/core/packages.nix diff --git a/modules/system/user.nix b/modules/system/core/user.nix similarity index 100% rename from modules/system/user.nix rename to modules/system/core/user.nix From 17c76064b6dff8c6d20e03e9bb82178d95db8e58 Mon Sep 17 00:00:00 2001 From: lucy Date: Sun, 18 Oct 2026 12:43:23 +0200 Subject: [PATCH 2/6] add boilerplate --- modules/default.nix | 9 ++++++++- modules/system/core/boot.nix | 8 ++++---- modules/system/core/system.nix | 26 ++++++++++++++++++++++++++ result | 1 + 4 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 modules/system/core/system.nix create mode 120000 result diff --git a/modules/default.nix b/modules/default.nix index be24619..fcab9a6 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,10 @@ -{ self, inputs, ... }: { +{ + self, + inputs, + config, + ... +}: +{ flake.nixosConfigurations.nerv = inputs.nixpkgs.lib.nixosSystem { modules = with self.nixosModules; [ user @@ -7,5 +13,6 @@ boot /etc/nixos/hardware-configuration.nix ]; + config.dualBoot = true; }; } diff --git a/modules/system/core/boot.nix b/modules/system/core/boot.nix index 9f14319..35e0e3d 100644 --- a/modules/system/core/boot.nix +++ b/modules/system/core/boot.nix @@ -1,5 +1,5 @@ -{ ... }: { - flake.nixosModules.boot = { +{ lib, config, ... }: { + flake.nixosModules.boot = { config, ... }: { options = { dualBoot = lib.mkOption { type = lib.types.bool; @@ -7,11 +7,11 @@ description = "wether to enable windows boot entry to limine or not"; }; }; - boot.loader = { + config.boot.loader = { efi.canTouchEfiVariables = true; limine = { enable = true; - extraEntries = lib.mkIf dualBoot '' + extraEntries = lib.mkIf config.dualBoot '' /Windows 11 protocol: efi_boot_entry entry: Windows Boot Manager diff --git a/modules/system/core/system.nix b/modules/system/core/system.nix new file mode 100644 index 0000000..61a7993 --- /dev/null +++ b/modules/system/core/system.nix @@ -0,0 +1,26 @@ +{ ... }: { + flake.nixosModules.base = { + time.timeZone = "Europe/Berlin"; + i18n.defaultLocale = "en_US.UTF-8"; + i18n.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"; + }; + security = { + rtkit.enable = true; + polkit.enable = true; # polkit + polkit.enablePkexecWrapper = true; + }; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + }; +} diff --git a/result b/result new file mode 120000 index 0000000..73b6688 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/dv2b9jwqaymcsdiw2sp81h3xqfnlkac7-nixos-system-nixos-26.05.20261015.26f4107 \ No newline at end of file From 88a9ce14428489236270b2c681b5ea1482a4d0fa Mon Sep 17 00:00:00 2001 From: lucy Date: Sun, 18 Oct 2026 13:27:39 +0200 Subject: [PATCH 3/6] add core mod --- modules/default.nix | 30 ++++++++++++++------ modules/system/core/{system.nix => core.nix} | 2 +- 2 files changed, 22 insertions(+), 10 deletions(-) rename modules/system/core/{system.nix => core.nix} (95%) diff --git a/modules/default.nix b/modules/default.nix index fcab9a6..187e450 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,18 +1,30 @@ { self, inputs, - config, ... }: +let + mods = with self.nixosModules; [ + user + packages + agenix + boot + core + /etc/nixos/hardware-configuration.nix + ]; +in { flake.nixosConfigurations.nerv = inputs.nixpkgs.lib.nixosSystem { - modules = with self.nixosModules; [ - user - packages - agenix - boot - /etc/nixos/hardware-configuration.nix - ]; - config.dualBoot = true; + modules = + with self.nixosModules; + [ + { + config.dualBoot = true; + } + ] + ++ mods; + }; + flake.nixosConfigurations.seele = inputs.nixpkgs.lib.nixosSystem { + modules = mods; }; } diff --git a/modules/system/core/system.nix b/modules/system/core/core.nix similarity index 95% rename from modules/system/core/system.nix rename to modules/system/core/core.nix index 61a7993..fd74c7f 100644 --- a/modules/system/core/system.nix +++ b/modules/system/core/core.nix @@ -1,5 +1,5 @@ { ... }: { - flake.nixosModules.base = { + flake.nixosModules.core = { time.timeZone = "Europe/Berlin"; i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { From 59f13a5a06de41a3beba9c89a57a12574176e819 Mon Sep 17 00:00:00 2001 From: lucy Date: Sun, 18 Oct 2026 13:31:55 +0200 Subject: [PATCH 4/6] add easyroam module --- modules/default.nix | 1 + modules/services/easyroam.nix | 13 +++++++++++++ modules/system/core/core.nix | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 modules/services/easyroam.nix diff --git a/modules/default.nix b/modules/default.nix index 187e450..58a4da2 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -10,6 +10,7 @@ let agenix boot core + easyroam /etc/nixos/hardware-configuration.nix ]; in diff --git a/modules/services/easyroam.nix b/modules/services/easyroam.nix new file mode 100644 index 0000000..2891250 --- /dev/null +++ b/modules/services/easyroam.nix @@ -0,0 +1,13 @@ +{ ... }: { + flake.nixosModules.easyroam = { config }: { + services.easyroam = { + enable = true; + pkcsFile = config.age.secrets.easyroam.path; + networkmanager.enable = true; + }; + systemd.services.wpa_supplicant = { + wants = [ "easyroam-cert-setup.service" ]; + after = [ "easyroam-cert-setup.service" ]; + }; + }; +} diff --git a/modules/system/core/core.nix b/modules/system/core/core.nix index fd74c7f..5fc22ca 100644 --- a/modules/system/core/core.nix +++ b/modules/system/core/core.nix @@ -16,7 +16,7 @@ security = { rtkit.enable = true; polkit.enable = true; # polkit - polkit.enablePkexecWrapper = true; +# polkit.enablePkexecWrapper = true; }; nix.settings.experimental-features = [ "nix-command" From 5098629ff9a26dd6cf92e31362f79b17e3dcdb11 Mon Sep 17 00:00:00 2001 From: lucy Date: Sun, 18 Oct 2026 13:36:10 +0200 Subject: [PATCH 5/6] add more modules --- modules/result | 1 + modules/services/easyroam.nix | 7 +++++-- modules/services/pipewire.nix | 10 ++++++++++ modules/services/tlp.nix | 8 ++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 120000 modules/result create mode 100644 modules/services/pipewire.nix create mode 100644 modules/services/tlp.nix diff --git a/modules/result b/modules/result new file mode 120000 index 0000000..6c508aa --- /dev/null +++ b/modules/result @@ -0,0 +1 @@ +/nix/store/5jpn9svda3qw6mnzk9gbkzb4q7lg4vdw-nixos-system-nixos-26.05.20261015.26f4107 \ No newline at end of file diff --git a/modules/services/easyroam.nix b/modules/services/easyroam.nix index 2891250..0583bc5 100644 --- a/modules/services/easyroam.nix +++ b/modules/services/easyroam.nix @@ -1,5 +1,8 @@ -{ ... }: { - flake.nixosModules.easyroam = { config }: { +{ inputs, ... }: { + flake.nixosModules.easyroam = { config, ... }: { + imports = [ + inputs.nix-easyroam.nixosModules.nix-easyroam + ]; services.easyroam = { enable = true; pkcsFile = config.age.secrets.easyroam.path; diff --git a/modules/services/pipewire.nix b/modules/services/pipewire.nix new file mode 100644 index 0000000..a026ef5 --- /dev/null +++ b/modules/services/pipewire.nix @@ -0,0 +1,10 @@ +{ ... }: { + flake.nixosModules.pipewire = { + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + }; +} diff --git a/modules/services/tlp.nix b/modules/services/tlp.nix new file mode 100644 index 0000000..814305a --- /dev/null +++ b/modules/services/tlp.nix @@ -0,0 +1,8 @@ +{ ... }: { + flake.nixosModules.tlp = { + services.tlp = { + enable = true; + pd.enable = true; + }; + }; +} From cbb1c2fc26d25743ff4ce414fa2f04c9f9724668 Mon Sep 17 00:00:00 2001 From: lucy Date: Sun, 18 Oct 2026 14:14:32 +0200 Subject: [PATCH 6/6] base structure --- modules/home/default.nix | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 modules/home/default.nix diff --git a/modules/home/default.nix b/modules/home/default.nix new file mode 100644 index 0000000..14fcd00 --- /dev/null +++ b/modules/home/default.nix @@ -0,0 +1,5 @@ +{...}: { + flake.homeModules.lucy = { + + }; +}