lib.host: Minor cleanup and formatting
This commit is contained in:
parent
51d961484e
commit
fb74112c15
29
lib/host.nix
29
lib/host.nix
@ -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";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user