feat(nixos): add common nixos profile; move hostspec config
This commit is contained in:
parent
6a1aa5f30b
commit
4baf606551
3 changed files with 18 additions and 14 deletions
|
@ -20,7 +20,10 @@ let
|
||||||
value = lib.nixosSystem {
|
value = lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs hostName; };
|
specialArgs = { inherit inputs hostName; };
|
||||||
#TODO: add profiles system
|
#TODO: add profiles system
|
||||||
modules = [ value.extraCfg or { } ];
|
modules = [
|
||||||
|
config.flake.profiles.nixos.common
|
||||||
|
(value.extraCfg or { })
|
||||||
|
] ++ (value.profiles or [ ]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -1,17 +1,9 @@
|
||||||
{ config, ... }:
|
|
||||||
{
|
{
|
||||||
flake.hostSpec.hosts = {
|
flake.hostSpec.hosts."nixos/test".extraCfg = {
|
||||||
"nixos/test".extraCfg = {
|
fileSystems."/" = {
|
||||||
imports = with config.flake.modules.nixos; [ networking ];
|
device = "/dev/sda1";
|
||||||
config = {
|
fsType = "ext4";
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/sda1";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
system.stateVersion = "25.05";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
9
modules/profiles/nixos/common.nix
Normal file
9
modules/profiles/nixos/common.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
flake.profiles.nixos.common =
|
||||||
|
{ hostName, ... }:
|
||||||
|
{
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
networking = { inherit hostName; };
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue