From 88e0bbc11cbfd5dff0aa569dcba98f4e7487dd35 Mon Sep 17 00:00:00 2001 From: voidarc Date: Sat, 17 Oct 2026 14:28:04 +0100 Subject: [PATCH] shuffle and added system abstraction --- modules/{ => hosts/host}/default.nix | 4 +--- modules/{ => hosts/host}/system.nix | 2 +- modules/hosts/newHost/newHost.nix | 10 ++++++++++ modules/{ => system}/bootloader.nix | 0 modules/system/default.nix | 11 +++++++++++ modules/{ => system}/networking.nix | 0 modules/{ => system}/user.nix | 0 7 files changed, 23 insertions(+), 4 deletions(-) rename modules/{ => hosts/host}/default.nix (80%) rename modules/{ => hosts/host}/system.nix (72%) create mode 100644 modules/hosts/newHost/newHost.nix rename modules/{ => system}/bootloader.nix (100%) create mode 100644 modules/system/default.nix rename modules/{ => system}/networking.nix (100%) rename modules/{ => system}/user.nix (100%) diff --git a/modules/default.nix b/modules/hosts/host/default.nix similarity index 80% rename from modules/default.nix rename to modules/hosts/host/default.nix index 064fe74..695c6d1 100644 --- a/modules/default.nix +++ b/modules/hosts/host/default.nix @@ -5,10 +5,8 @@ }: { flake.nixosConfigurations.host = inputs.nixpkgs.lib.nixosSystem { modules = with self.nixosModules; [ + hostConfiguration system - user - networking - bootloader ]; }; } diff --git a/modules/system.nix b/modules/hosts/host/system.nix similarity index 72% rename from modules/system.nix rename to modules/hosts/host/system.nix index d7b7bfd..280bba9 100644 --- a/modules/system.nix +++ b/modules/hosts/host/system.nix @@ -1,5 +1,5 @@ {...}: { - flake.nixosModules.system = {pkgs, ...}: { + flake.nixosModules.hostConfiguration = {pkgs, ...}: { environment.systemPackages = with pkgs; [ git ]; diff --git a/modules/hosts/newHost/newHost.nix b/modules/hosts/newHost/newHost.nix new file mode 100644 index 0000000..bf1eeba --- /dev/null +++ b/modules/hosts/newHost/newHost.nix @@ -0,0 +1,10 @@ +{ + self, + inputs, + ... +}: { + flake.nixosConfigurations.newHost = + inputs.nixpkgs.lib.nixosSystem { + + }; +} diff --git a/modules/bootloader.nix b/modules/system/bootloader.nix similarity index 100% rename from modules/bootloader.nix rename to modules/system/bootloader.nix diff --git a/modules/system/default.nix b/modules/system/default.nix new file mode 100644 index 0000000..5b90f0a --- /dev/null +++ b/modules/system/default.nix @@ -0,0 +1,11 @@ +{self, ...}: { + flake.nixosModules.system = {...}: let + modules = with self.nixosModules; [ + user + networking + bootloader + ]; + in { + imports = modules; + }; +} diff --git a/modules/networking.nix b/modules/system/networking.nix similarity index 100% rename from modules/networking.nix rename to modules/system/networking.nix diff --git a/modules/user.nix b/modules/system/user.nix similarity index 100% rename from modules/user.nix rename to modules/system/user.nix