diff --git a/hosts/common/user/configs/gui/theme/theme.sh b/hosts/common/user/configs/gui/theme/theme.sh index bbbe1fc..7a7037c 100644 --- a/hosts/common/user/configs/gui/theme/theme.sh +++ b/hosts/common/user/configs/gui/theme/theme.sh @@ -1,3 +1,4 @@ +[[ ! -d "${CONFIG}" ]] && mkdir -p "${CONFIG}" [[ ! -L "${CONFIG}"/wallpaper ]] && ln -sf "${DEFAULT_WALLPAPER}" "${CONFIG}"/wallpaper [[ ! -f "${CONFIG}"/mode ]] && echo "${DEFAULT_MODE}" > "${CONFIG}"/mode diff --git a/hosts/eirene/users/nick.nix b/hosts/eirene/users/nick.nix index b32282f..b74c4d8 100644 --- a/hosts/eirene/users/nick.nix +++ b/hosts/eirene/users/nick.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, lib, ... }: let # FIXME: https://github.com/NixOS/nixpkgs/issues/24570 # FIXME: https://github.com/NixOS/nixpkgs/issues/305643 @@ -80,7 +80,7 @@ in hashedPasswordFile = config.sops.secrets."${user}-password".path; extraGroups = [ "wheel" ]; linger = true; - uid = 1000; + uid = lib.strings.toInt (builtins.readFile ../../../users/${user}/uid); }; services.getty.autologinUser = user; diff --git a/scripts/install.sh b/scripts/install.sh index d4a81ef..ff396d4 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -56,7 +56,7 @@ setup_wifi() { select_host() { echo "Available hosts:" - echo $(nix flake show --json | nix shell nixpkgs#jq --command jq -r '.nixosConfigurations | keys[]') + echo $(nix --experimental-features "nix-command flakes" flake show --json | nix --experimental-features "nix-command flakes" shell nixpkgs#jq --command jq -r '.nixosConfigurations | keys[]') echo "Enter host:" read -r host @@ -81,8 +81,13 @@ copy_keys() { cp "./hosts/${host}/secrets/ssh_host_ed25519_key" /mnt/persist/etc/ssh/ssh_host_ed25519_key for user in "${users[@]}"; do - mkdir -p "/mnt/persist/home/${user}/.local/share/sops-nix" - cp "./users/${user}/secrets/key.txt" "/mnt/persist/home/${user}/.local/share/sops-nix/key.txt" + mkdir -p "/mnt/persist/home/${user}/.config/sops-nix" + cp "./users/${user}/secrets/key.txt" "/mnt/persist/home/${user}/.config/sops-nix/key.txt" + + uid=$(cat "./users/${user}/uid") + gid=100 + + chown -R "${uid}:${gid}" "/mnt/persist/home/${user}" done } diff --git a/users/nick/uid b/users/nick/uid new file mode 100644 index 0000000..83b33d2 --- /dev/null +++ b/users/nick/uid @@ -0,0 +1 @@ +1000