diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-13 08:36:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-13 08:52:28 +0000 |
commit | 9f55e8bc0fb7cf1b0204652871808130a45e8eee (patch) | |
tree | 94ee10ed32721a43261d3b696d5597b4457b5028 /modules/users | |
parent | 1fb3ddfe362432c508409a81060dfd4bbb2ce31f (diff) | |
download | nixlib-9f55e8bc0fb7cf1b0204652871808130a45e8eee.tar nixlib-9f55e8bc0fb7cf1b0204652871808130a45e8eee.tar.gz nixlib-9f55e8bc0fb7cf1b0204652871808130a45e8eee.tar.bz2 nixlib-9f55e8bc0fb7cf1b0204652871808130a45e8eee.tar.lz nixlib-9f55e8bc0fb7cf1b0204652871808130a45e8eee.tar.xz nixlib-9f55e8bc0fb7cf1b0204652871808130a45e8eee.tar.zst nixlib-9f55e8bc0fb7cf1b0204652871808130a45e8eee.zip |
modules/home: remove
I think when I implemented this I didn't know about tmpfiles.d(5). Now I do, so let's use that instead. I don't think the imperativeNix option is necessary any more since the home directory is created read-only, but if it turns out that .nix-defexpr and .nix-profile are coming back, I can look into the best way to solve that then.
Diffstat (limited to 'modules/users')
-rw-r--r-- | modules/users/default.nix | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/modules/users/default.nix b/modules/users/default.nix index 5f4cd6fe51d6..51d7e840ed95 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ config, lib, pkgs, ... }: let # These defaults should override the NixOS defaults, @@ -6,12 +6,10 @@ let mkDefault = lib.mkOverride ((lib.mkDefault null).priority - 1); in { - imports = [ ../home ]; - users.mutableUsers = false; users.groups.qyliss = {}; users.users.qyliss = { - createHome = true; + createHome = false; description = "Alyssa Ross"; home = mkDefault "/home"; uid = mkDefault 1000; @@ -22,12 +20,9 @@ in { shell = lib.mkDefault pkgs.bash; }; - home.qyliss = { - permissions = "0555"; - group = "qyliss"; - }; - home.qyliss.dirs.state = { - permissions = "0500"; - }; - home.qyliss.dirs."state/cache" = {}; + systemd.tmpfiles.rules = [ + "d ${config.users.users.qyliss.home} 0555 qyliss qyliss" + "d ${config.users.users.qyliss.home}/state 0500 qyliss qyliss" + "d ${config.users.users.qyliss.home}/state/cache 0700 qyliss qyliss" + ]; } |