lib.host: Minor cleanup and formatting

This commit is contained in:
Giulio De Pasquale 2023-02-14 21:20:01 +01:00
parent 51d961484e
commit fb74112c15

View File

@ -1,4 +1,14 @@
{ pkgs, nixpkgs, nixos-unstable, unstable, home-manager, system, mkHomeRole, mkSysRole, mkUser, ... }:
{ pkgs
, nixpkgs
, nixos-unstable
, unstable
, home-manager
, system
, mkHomeRole
, mkSysRole
, mkUser
, ...
}:
{
mkHost = { name, users, roles ? [ ], imports ? [ ] }:
@ -22,19 +32,28 @@
(mkSysRole "common")
(mkSysRole "acme")
];
nixpkgs = { inherit pkgs; };
nix.nixPath = [ "nixpkgs=${nixpkgs}" "unstable=${nixos-unstable}" ];
nix.registry.nixpkgs.flake = nixpkgs;
nix.registry.unstable.flake = nixos-unstable;
nix = {
nixPath = [
"nixpkgs=${nixpkgs}"
"unstable=${nixos-unstable}"
];
registry = {
nixpkgs.flake = nixpkgs;
unstable.flake = nixos-unstable;
};
};
users.users.root = { shell = pkgs.zsh; };
home-manager = {
users.root.imports = [ (mkHomeRole "common") ];
users.root.imports = pkgs.lib.singleton (mkHomeRole "common");
extraSpecialArgs.unstable = unstable;
useGlobalPkgs = true;
};
system.stateVersion = "22.11";
}