This commit is contained in:
2026-06-23 21:23:35 +02:00
parent 2626e9fe32
commit d135a15bcd
38 changed files with 354 additions and 876 deletions
+58 -3
View File
@@ -3,10 +3,65 @@
config,
...
}:
let
mkHost =
name: machine:
{ pkgs, ... }:
let
account = config.facts.account;
hmStateVersion = machine.hmStateVersion or machine.stateVersion;
machineFacts = {
displays = { };
portable = false;
sshKeys = { };
syncthingId = null;
}
// machine
// {
inherit name hmStateVersion;
};
in
{
imports = [
config.flake.modules.nixos.${name}
];
facts = {
inherit (config.facts)
account
machines
services
theme
;
machine = machineFacts;
};
networking.hostName = name;
system.stateVersion = machine.stateVersion;
programs.zsh.enable = true;
users.users.${account.name} = {
isNormalUser = true;
home = account.homeDirectory;
extraGroups = [
"wheel"
"networkmanager"
];
shell = pkgs.zsh;
};
home-manager.users.${account.name}.home = {
username = account.name;
homeDirectory = account.homeDirectory;
stateVersion = hmStateVersion;
};
};
in
{
imports = [
inputs.flake-parts.flakeModules.modules
./data.nix
./facts.nix
];
systems = [ "x86_64-linux" ];
@@ -15,9 +70,9 @@
name: machine:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [ (config.repo.helpers.mkHost name machine) ];
modules = [ (mkHost name machine) ];
}
) config.repo.machines;
) config.facts.machines;
perSystem =
{ pkgs, ... }: