1
Fork 0

Refactor: Replace users with home

This commit is contained in:
caem 2024-07-25 22:12:51 +02:00
parent 36a22dc58a
commit aaaf4808f3
Signed by: caem
GPG key ID: 69A830D03203405F
65 changed files with 17 additions and 25 deletions

View file

@ -2,13 +2,15 @@
{ {
imports = [ imports = [
../../modules/desktop/apps/communication.nix
../../modules/desktop/apps/games.nix
../../modules/desktop/apps/multimedia.nix
./persist.nix ./persist.nix
./packages/nh.nix
./packages/zsh/zsh.nix ../modules/desktop/apps/communication.nix
./packages/virt-manager.nix ../modules/desktop/apps/games.nix
../modules/desktop/apps/multimedia.nix
../modules/packages/nh.nix
../modules/packages/zsh.nix
../modules/packages/virt-manager.nix
]; ];
environment.variables = { environment.variables = {
@ -20,7 +22,7 @@
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "libvirtd" ]; extraGroups = [ "wheel" "libvirtd" ];
shell = pkgs.zsh; shell = pkgs.zsh;
hashedPasswordFile = "/nix/config/secrets/hu/pass"; hashedPasswordFile = "/nix/config/secrets/pass";
}; };
home-manager = { home-manager = {
@ -32,7 +34,7 @@
home.stateVersion = config.system.stateVersion; home.stateVersion = config.system.stateVersion;
imports = [ imports = [
./packages/zsh/zsh-home.nix ./packages/zsh.nix
./packages/git.nix ./packages/git.nix
./packages/gtk.nix ./packages/gtk.nix
./packages/hyprland.nix ./packages/hyprland.nix
@ -40,9 +42,9 @@
./packages/firefox.nix ./packages/firefox.nix
./packages/rofi.nix ./packages/rofi.nix
./packages/fastfetch.nix ./packages/fastfetch.nix
./packages/nvim/neovim.nix ./packages/nvim.nix
./packages/waybar.nix ./packages/waybar.nix
./packages/virt-manager-home.nix ./packages/virt-manager.nix
]; ];
}; };
}; };

View file

@ -19,7 +19,7 @@
}; };
home.file."${config.xdg.configHome}/nvim" = { home.file."${config.xdg.configHome}/nvim" = {
source = ./config; source = ../../dotfiles/nvim;
recursive = true; recursive = true;
}; };
} }

View file

@ -17,7 +17,7 @@
}; };
home.file."${config.xdg.configHome}/zsh/conf.d" = { home.file."${config.xdg.configHome}/zsh/conf.d" = {
source = ./config/conf.d; source = ../../dotfiles/zsh/conf.d;
recursive = true; recursive = true;
}; };
@ -28,18 +28,8 @@
SYNTAX_PLUGIN="${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" SYNTAX_PLUGIN="${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
AUTOSUGGEST_PLUGIN="${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh" AUTOSUGGEST_PLUGIN="${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
NIX_SHELL_PLUGIN="${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh" NIX_SHELL_PLUGIN="${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh"
# On systems that are not on glibc 2.38, loading fzf-tab will fail. This prevents that.
if [ -f "/lib/x86_64-linux-gnu/libc.so.6" ]; then
GLIBC_VERSION="$(/lib/x86_64-linux-gnu/libc.so.6 | head -n1 | sed -e 's/.* //g' | rev | cut -c2- | rev)"
if [ "$GLIBC_VERSION" = "2.38" ]; then
FZF_TAB_PLUGIN="${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh" FZF_TAB_PLUGIN="${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh"
fi '' + (builtins.readFile ../../dotfiles/zsh/.zshrc);
else
FZF_TAB_PLUGIN="${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh"
fi
'' + (builtins.readFile config/.zshrc);
}; };
} }

View file

@ -9,7 +9,7 @@
../../modules/desktop/environments/hyprland.nix ../../modules/desktop/environments/hyprland.nix
../../modules/system/security.nix ../../modules/system/security.nix
../../users/hu/user.nix ../../home/default.nix
]; ];
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;