Browse Source

permissions (hopefully)

master
Juni Kim 2 years ago
parent
commit
531d343a4a
  1. 9
      users.nix

9
users.nix

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

Loading…
Cancel
Save