home: add uid/gid options, correctly configure atuin

This commit is contained in:
Oystein Kristoffer Tveit 2024-11-13 17:04:21 +01:00
parent 84c9562bfc
commit fb6cb3f09d
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
4 changed files with 20 additions and 4 deletions

View File

@ -223,7 +223,11 @@
"specialArgs" "specialArgs"
])); ]));
in { in {
dosei = nixSys "dosei" { }; dosei = nixSys "dosei" {
modules = [{
home-manager.users.h7x4.home.uid = 1001;
}];
};
kasei = nixSys "kasei" { }; kasei = nixSys "kasei" { };
europa = nixSys "europa" { }; europa = nixSys "europa" { };
tsuki = nixSys "tsuki" { tsuki = nixSys "tsuki" {

View File

@ -33,6 +33,7 @@ in {
./modules/colors.nix ./modules/colors.nix
./modules/shellAliases.nix ./modules/shellAliases.nix
./modules/uidGid.nix
] ++ optionals graphics [ ] ++ optionals graphics [
./config/gtk.nix ./config/gtk.nix

13
home/modules/uidGid.nix Normal file
View File

@ -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;
};
};
}

View File

@ -1,9 +1,7 @@
{ config, ... }: { config, ... }:
let let
cfg = config.programs.atuin; cfg = config.programs.atuin;
xdg_runtime_dir = "/run/user/${toString config.home.uid}";
# TODO: retrieve this in a more dynamic and correct manner
xdg_runtime_dir = "/run/user/1000";
in in
{ {
programs.atuin = { programs.atuin = {