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 ? [ ] }:
|
mkHost = { name, users, roles ? [ ], imports ? [ ] }:
|
||||||
@ -22,19 +32,28 @@
|
|||||||
(mkSysRole "common")
|
(mkSysRole "common")
|
||||||
(mkSysRole "acme")
|
(mkSysRole "acme")
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = { inherit pkgs; };
|
nixpkgs = { inherit pkgs; };
|
||||||
|
|
||||||
nix.nixPath = [ "nixpkgs=${nixpkgs}" "unstable=${nixos-unstable}" ];
|
nix = {
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
nixPath = [
|
||||||
nix.registry.unstable.flake = nixos-unstable;
|
"nixpkgs=${nixpkgs}"
|
||||||
|
"unstable=${nixos-unstable}"
|
||||||
|
];
|
||||||
|
registry = {
|
||||||
|
nixpkgs.flake = nixpkgs;
|
||||||
|
unstable.flake = nixos-unstable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
users.users.root = { shell = pkgs.zsh; };
|
users.users.root = { shell = pkgs.zsh; };
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
users.root.imports = [ (mkHomeRole "common") ];
|
users.root.imports = pkgs.lib.singleton (mkHomeRole "common");
|
||||||
extraSpecialArgs.unstable = unstable;
|
extraSpecialArgs.unstable = unstable;
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "22.11";
|
system.stateVersion = "22.11";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user