diff --git a/Droidnix/README.org b/Droidnix/README.org index 355e5ab99..91ec0c8af 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -102,25 +102,33 @@ The Nix flake definition for Droidnix. }; outputs = inputs@{ flake-parts, nixpkgs, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - systems = [ "x86_64-linux" ]; + flake-parts.lib.mkFlake { inherit inputs; } { - flake = { - nixosConfigurations.traveldroid = - nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; + systems = [ "x86_64-linux" ]; - modules = [ - ./generated/hosts/traveldroid/traveldroid.nix - ./generated/hosts/traveldroid/boot.nix - ./generated/hosts/traveldroid/hardware-configuration.nix - inputs.stylix.nixosModules.default - ]; - }; - }; - }; -} + flake = { + nixosConfigurations.traveldroid = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + + specialArgs = { inherit inputs; }; + + modules = [ + # Host-specific configuration + ./generated/hosts/traveldroid/traveldroid.nix + + # Optional boot/hardware + ./generated/hosts/traveldroid/boot.nix + ./generated/hosts/traveldroid/hardware-configuration.nix + + # External modules + inputs.stylix.nixosModules.default + inputs.home-manager.nixosModules.home-manager + ] + ++ builtins.attrValues (inputs.import-tree ./generated/modules); + }; + }; + }; + } #+END_SRC * Let's define the core of the system @@ -408,51 +416,35 @@ in * First the nix-files that flake really needs and that do not fit wel in the hierarchical structure ** =generated/hosts/traveldroid/traveldroid.nix= #+BEGIN_SRC nix :tangle generated/hosts/traveldroid/traveldroid.nix :noweb tangle :mkdirp yes :eval never-html -{ inputs, ... }: +{ config, lib, ... }: -inputs.nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; +{ + networking.hostName = "traveldroid"; + system.stateVersion = "25.11"; - # Optional: pass inputs to modules - specialArgs = { inherit inputs; }; + boot.loader.grub = { + enable = true; + efiSupport = true; + device = "nodev"; + useOSProber = true; + }; + boot.efi.canTouchEfiVariables = true; - modules = [ - inputs.home-manager.nixosModules.home-manager - ] - ++ builtins.attrValues (import-tree ../modules) - ++ [ - ./hardware-configuration.nix - - # Host-specific hardware and system settings - ({ config, lib, ... }: { - networking.hostName = "traveldroid"; - system.stateVersion = "25.11"; - - boot.loader.grub = { - enable = true; - efiSupport = true; - device = "nodev"; - useOSProber = true; - }; - boot.efi.canTouchEfiVariables = true; - - boot.kernelParams = [ - "systemd.mask=dev-tpm0.device" - "systemd.mask=dev-tpmrm0.device" - ]; - - # User-defined features - mySystem.system.core.enable = true; - - # Desktop environment features - desktop.hyprland.enable = true; - desktop.noctalia.enable = true; - desktop.stylix.enable = true; - - # Hardware overrides (host-specific) - hardware.nvidia.enable = false; - }) + boot.kernelParams = [ + "systemd.mask=dev-tpm0.device" + "systemd.mask=dev-tpmrm0.device" ]; + + # User-defined features + mySystem.system.core.enable = true; + + # Desktop environment features + desktop.hyprland.enable = true; + desktop.noctalia.enable = true; + desktop.stylix.enable = true; + + # Hardware overrides (host-specific) + hardware.nvidia.enable = false; } #+END_SRC diff --git a/Droidnix/flake.nix b/Droidnix/flake.nix index d2b562330..5c3c815c4 100644 --- a/Droidnix/flake.nix +++ b/Droidnix/flake.nix @@ -30,22 +30,30 @@ }; outputs = inputs@{ flake-parts, nixpkgs, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - systems = [ "x86_64-linux" ]; + flake-parts.lib.mkFlake { inherit inputs; } { - flake = { - nixosConfigurations.traveldroid = - nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; + systems = [ "x86_64-linux" ]; - modules = [ - ./generated/hosts/traveldroid/traveldroid.nix - ./generated/hosts/traveldroid/boot.nix - ./generated/hosts/traveldroid/hardware-configuration.nix - inputs.stylix.nixosModules.default - ]; - }; - }; - }; -} + flake = { + nixosConfigurations.traveldroid = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + + specialArgs = { inherit inputs; }; + + modules = [ + # Host-specific configuration + ./generated/hosts/traveldroid/traveldroid.nix + + # Optional boot/hardware + ./generated/hosts/traveldroid/boot.nix + ./generated/hosts/traveldroid/hardware-configuration.nix + + # External modules + inputs.stylix.nixosModules.default + inputs.home-manager.nixosModules.home-manager + ] + ++ builtins.attrValues (inputs.import-tree ./generated/modules); + }; + }; + }; + } diff --git a/Droidnix/generated/hosts/traveldroid/traveldroid.nix b/Droidnix/generated/hosts/traveldroid/traveldroid.nix index 828e64011..7c43a8a49 100644 --- a/Droidnix/generated/hosts/traveldroid/traveldroid.nix +++ b/Droidnix/generated/hosts/traveldroid/traveldroid.nix @@ -1,46 +1,30 @@ -{ inputs, ... }: +{ config, lib, ... }: -inputs.nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; +{ + networking.hostName = "traveldroid"; + system.stateVersion = "25.11"; - # Optional: pass inputs to modules - specialArgs = { inherit inputs; }; + boot.loader.grub = { + enable = true; + efiSupport = true; + device = "nodev"; + useOSProber = true; + }; + boot.efi.canTouchEfiVariables = true; - modules = [ - inputs.home-manager.nixosModules.home-manager - ] - ++ builtins.attrValues (import-tree ../modules) - ++ [ - ./hardware-configuration.nix - - # Host-specific hardware and system settings - ({ config, lib, ... }: { - networking.hostName = "traveldroid"; - system.stateVersion = "25.11"; - - boot.loader.grub = { - enable = true; - efiSupport = true; - device = "nodev"; - useOSProber = true; - }; - boot.efi.canTouchEfiVariables = true; - - boot.kernelParams = [ - "systemd.mask=dev-tpm0.device" - "systemd.mask=dev-tpmrm0.device" - ]; - - # User-defined features - mySystem.system.core.enable = true; - - # Desktop environment features - desktop.hyprland.enable = true; - desktop.noctalia.enable = true; - desktop.stylix.enable = true; - - # Hardware overrides (host-specific) - hardware.nvidia.enable = false; - }) + boot.kernelParams = [ + "systemd.mask=dev-tpm0.device" + "systemd.mask=dev-tpmrm0.device" ]; + + # User-defined features + mySystem.system.core.enable = true; + + # Desktop environment features + desktop.hyprland.enable = true; + desktop.noctalia.enable = true; + desktop.stylix.enable = true; + + # Hardware overrides (host-specific) + hardware.nvidia.enable = false; }