modularizing modules ig

This commit is contained in:
martyTF 2025-12-16 16:50:47 +01:00
parent 9c0b46c7d3
commit 3d09e64139
6 changed files with 83 additions and 18 deletions

View file

@ -10,7 +10,10 @@
}:
{
nix.settings.experimental-features = [ "flakes" "nix-command" ];
nix.settings.experimental-features = [
"flakes"
"nix-command"
];
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix

View file

@ -22,22 +22,25 @@
marty-pc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./marty-pc.nix
./configuration.nix
];
};
marty-server = nixpkgs.lib.nixosSystem {
system = "x86_64";
modules = [
./configuration.nix
./marty-server.nix
./configuration.nix
];
};
marty-latitude = nixpkgs.lib.nixosSystem {
system = "x86_64";
modules = [
./configuration.nix
./marty-latitude.nix
./configuration.nix
];
};
};

View file

@ -5,9 +5,30 @@
...
}:
let
modules =
if config.networking.hostName == "marty-pc" then
[
./system/import_system.nix
./modules/imports.nix
]
else if config.networking.hostName == "marty-latitude" then
[
./system/import_system.nix
./modules/imports.nix
]
else if config.networking.hostName == "marty-server" then
[
./system/import_system.nix
./modules/imports.nix
]
else
[ ];
in
{
imports = [
./system/imports.nix
./modules/imports.nix
];
imports = modules;
}

View file

@ -5,10 +5,31 @@
...
}:
let
modules =
if config.networking.hostName == "marty-pc" then
[
./git.nix
./vscodium.nix
./window_manager/imports.nix
]
else if config.networking.hostName == "marty-latitude" then
[
./git.nix
./vscodium.nix
./window_manager/imports.nix
]
else if config.networking.hostName == "marty-server" then
[
./git.nix
]
else
[ ];
in
{
imports = [
./window_manager/imports.nix
./git.nix
./vscodium.nix
];
imports = modules;
}

View file

@ -5,9 +5,26 @@
...
}:
let
modules =
if config.networking.hostName == "marty-pc" then
[
./hyprland.nix
./waybar.nix
]
else if config.networking.hostName == "marty-latitude" then
[
./hyprland.nix
./waybar.nix
]
else if config.networking.hostName == "marty-server" then
[
]
else
[ ];
in
{
imports = [
./hyprland.nix
./waybar.nix
];
imports = modules;
}

View file

@ -5,7 +5,7 @@
...
}:
{
./system/imports.nix ./modules/imports.nix {
imports = [
./boot.nix
];