|
|
@ -1,18 +1,23 @@ |
|
|
|
{ pkgs, ... }: |
|
|
|
let |
|
|
|
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; |
|
|
|
prefix = "/server/current"; |
|
|
|
in |
|
|
|
{ |
|
|
|
imports = [ |
|
|
|
(import "${home-manager}/nixos") |
|
|
|
]; |
|
|
|
|
|
|
|
systemd.tmpfiles.rules = [ |
|
|
|
"d ${prefix} 0755 root root" |
|
|
|
]; |
|
|
|
|
|
|
|
users.users = |
|
|
|
let |
|
|
|
user = |
|
|
|
{ manager ? false, name, passwd }: { |
|
|
|
isNormalUser = true; |
|
|
|
home = "/server/current/${name}"; |
|
|
|
home = "${prefix}/${name}"; |
|
|
|
createHome = true; |
|
|
|
extraGroups = [ "current" ] ++ |
|
|
|
(if manager then ["docker" "wheel"] else []); |
|
|
@ -31,7 +36,7 @@ in |
|
|
|
user = name: { |
|
|
|
home = { |
|
|
|
username = name; |
|
|
|
homeDirectory = "/server/current/${name}"; |
|
|
|
homeDirectory = "${prefix}/${name}"; |
|
|
|
stateVersion = "22.05"; |
|
|
|
}; |
|
|
|
programs = { |
|
|
|