diff --git a/flake.nix b/flake.nix index 8b73f80..a959ef4 100644 --- a/flake.nix +++ b/flake.nix @@ -223,7 +223,11 @@ "specialArgs" ])); in { - dosei = nixSys "dosei" { }; + dosei = nixSys "dosei" { + modules = [{ + home-manager.users.h7x4.home.uid = 1001; + }]; + }; kasei = nixSys "kasei" { }; europa = nixSys "europa" { }; tsuki = nixSys "tsuki" { diff --git a/home/home.nix b/home/home.nix index 69db8d9..5f456f8 100644 --- a/home/home.nix +++ b/home/home.nix @@ -33,6 +33,7 @@ in { ./modules/colors.nix ./modules/shellAliases.nix + ./modules/uidGid.nix ] ++ optionals graphics [ ./config/gtk.nix diff --git a/home/modules/uidGid.nix b/home/modules/uidGid.nix new file mode 100644 index 0000000..422c9c3 --- /dev/null +++ b/home/modules/uidGid.nix @@ -0,0 +1,13 @@ +{ lib, ... }: +{ + options.home = { + uid = lib.mkOption { + default = 1000; + type = lib.types.ints.between 0 60000; + }; + gid = lib.mkOption { + default = 1000; + type = lib.types.ints.between 0 60000; + }; + }; +} \ No newline at end of file diff --git a/home/programs/atuin.nix b/home/programs/atuin.nix index ebad084..b3cb4eb 100644 --- a/home/programs/atuin.nix +++ b/home/programs/atuin.nix @@ -1,9 +1,7 @@ { config, ... }: let cfg = config.programs.atuin; - - # TODO: retrieve this in a more dynamic and correct manner - xdg_runtime_dir = "/run/user/1000"; + xdg_runtime_dir = "/run/user/${toString config.home.uid}"; in { programs.atuin = {