Working on reshuffling

This commit is contained in:
2026-03-19 10:49:22 +00:00
parent 32d858a6ea
commit 5f292aafbe
3 changed files with 100 additions and 116 deletions
+14 -22
View File
@@ -103,24 +103,32 @@ The Nix flake definition for Droidnix.
outputs = inputs@{ flake-parts, nixpkgs, ... }: outputs = inputs@{ flake-parts, nixpkgs, ... }:
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
flake = { flake = {
nixosConfigurations.traveldroid = nixosConfigurations.traveldroid = nixpkgs.lib.nixosSystem {
nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
# Host-specific configuration
./generated/hosts/traveldroid/traveldroid.nix ./generated/hosts/traveldroid/traveldroid.nix
# Optional boot/hardware
./generated/hosts/traveldroid/boot.nix ./generated/hosts/traveldroid/boot.nix
./generated/hosts/traveldroid/hardware-configuration.nix ./generated/hosts/traveldroid/hardware-configuration.nix
# External modules
inputs.stylix.nixosModules.default inputs.stylix.nixosModules.default
]; inputs.home-manager.nixosModules.home-manager
]
++ builtins.attrValues (inputs.import-tree ./generated/modules);
}; };
}; };
}; };
} }
#+END_SRC #+END_SRC
* Let's define the core of the system * Let's define the core of the system
@@ -408,23 +416,9 @@ in
* First the nix-files that flake really needs and that do not fit wel in the hierarchical structure * First the nix-files that flake really needs and that do not fit wel in the hierarchical structure
** =generated/hosts/traveldroid/traveldroid.nix= ** =generated/hosts/traveldroid/traveldroid.nix=
#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/traveldroid.nix :noweb tangle :mkdirp yes :eval never-html #+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";
# Optional: pass inputs to modules
specialArgs = { inherit inputs; };
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"; networking.hostName = "traveldroid";
system.stateVersion = "25.11"; system.stateVersion = "25.11";
@@ -451,8 +445,6 @@ inputs.nixpkgs.lib.nixosSystem {
# Hardware overrides (host-specific) # Hardware overrides (host-specific)
hardware.nvidia.enable = false; hardware.nvidia.enable = false;
})
];
} }
#+END_SRC #+END_SRC
+12 -4
View File
@@ -31,21 +31,29 @@
outputs = inputs@{ flake-parts, nixpkgs, ... }: outputs = inputs@{ flake-parts, nixpkgs, ... }:
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
flake = { flake = {
nixosConfigurations.traveldroid = nixosConfigurations.traveldroid = nixpkgs.lib.nixosSystem {
nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
# Host-specific configuration
./generated/hosts/traveldroid/traveldroid.nix ./generated/hosts/traveldroid/traveldroid.nix
# Optional boot/hardware
./generated/hosts/traveldroid/boot.nix ./generated/hosts/traveldroid/boot.nix
./generated/hosts/traveldroid/hardware-configuration.nix ./generated/hosts/traveldroid/hardware-configuration.nix
# External modules
inputs.stylix.nixosModules.default inputs.stylix.nixosModules.default
]; inputs.home-manager.nixosModules.home-manager
]
++ builtins.attrValues (inputs.import-tree ./generated/modules);
}; };
}; };
}; };
} }
@@ -1,20 +1,6 @@
{ inputs, ... }: { config, lib, ... }:
inputs.nixpkgs.lib.nixosSystem { {
system = "x86_64-linux";
# Optional: pass inputs to modules
specialArgs = { inherit inputs; };
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"; networking.hostName = "traveldroid";
system.stateVersion = "25.11"; system.stateVersion = "25.11";
@@ -41,6 +27,4 @@ inputs.nixpkgs.lib.nixosSystem {
# Hardware overrides (host-specific) # Hardware overrides (host-specific)
hardware.nvidia.enable = false; hardware.nvidia.enable = false;
})
];
} }