Move the NixOS config into the user's directory

This commit is contained in:
Bun 2025-04-29 19:11:28 -04:00
parent 9946d500f7
commit 57201099fb
6 changed files with 22 additions and 25 deletions

View file

@ -73,7 +73,7 @@
extraSpecialArgs = inputs; extraSpecialArgs = inputs;
}; };
in { in {
# nh os switch /path --hostname=host # nh os switch /path -H host
nixosConfigurations = { nixosConfigurations = {
tower = mkNix [ ./hosts/tower ] stable; # Main Desktop tower = mkNix [ ./hosts/tower ] stable; # Main Desktop

View file

@ -1,7 +1,7 @@
{ ... }: { config, ... }:
{ {
programs.nh = { programs.nh = {
enable = true; enable = true;
flake = "/etc/nixos"; flake = "${config.home.homeDirectory}/Projects/nixos-config";
}; };
} }

View file

@ -97,23 +97,23 @@
file = { file = {
".local/share/ranger/bookmarks".text = '' ".local/share/ranger/bookmarks".text = ''
# Local files # Local files
h:/home/${config.home.username}/ h:${config.home.homeDirectory}/
k:/home/${config.home.username}/Keepers k:${config.home.homeDirectory}/Keepers
j:/home/${config.home.username}/Downloads j:${config.home.homeDirectory}/Downloads
v:/home/${config.home.username}/Videos v:${config.home.homeDirectory}/Videos
c:/home/${config.home.username}/.config n:${config.home.homeDirectory}/Projects/nixos-config
l:/home/${config.home.username}/.local c:${config.home.homeDirectory}/.config
l:${config.home.homeDirectory}/.local
d:/mnt d:/mnt
p:/persist p:/persist
n:/etc/nixos
# Remote files # Remote files
N:/home/${config.home.username}/Network N:${config.home.homeDirectory}/Network
H:/home/${config.home.username}/Network/Midas/ H:${config.home.homeDirectory}/Network/Midas/
K:/home/${config.home.username}/Network/Midas/Files K:${config.home.homeDirectory}/Network/Midas/Files
M:/home/${config.home.username}/Network/Midas/Music M:${config.home.homeDirectory}/Network/Midas/Music
V:/home/${config.home.username}/Network/Midas/Videos V:${config.home.homeDirectory}/Network/Midas/Videos
P:/home/${config.home.username}/Network/Midas/Photos P:${config.home.homeDirectory}/Network/Midas/Photos
''; '';
}; };
packages = with pkgsStable; [ packages = with pkgsStable; [

View file

@ -2,7 +2,7 @@
{ {
home.shellAliases = { home.shellAliases = {
# NixOS # NixOS
nhs = "nh os switch /etc/nixos"; nhs = "nh os switch";
nixclean = "nix store gc; nix store optimise"; nixclean = "nix store gc; nix store optimise";
nixpurge = "doas nix-collect-garbage --delete-old"; nixpurge = "doas nix-collect-garbage --delete-old";

View file

@ -5,6 +5,7 @@
users.${config.sysusers.main} = { users.${config.sysusers.main} = {
directories = [ directories = [
"Keepers" "Keepers"
"Projects"
"Documents" "Documents"
"Pictures" "Pictures"
"Videos" "Videos"
@ -22,14 +23,14 @@
".config/vesktop" ".config/vesktop"
".config/zsh" ".config/zsh"
".local/share/mpd"
".local/share/nvim/undo"
".local/share/PrismLauncher" ".local/share/PrismLauncher"
".local/share/Steam" ".local/share/Steam"
".local/share/TelegramDesktop" ".local/share/TelegramDesktop"
".local/share/mpd"
".local/share/nvim/undo"
".local/state/wireplumber"
".local/state/lazygit" ".local/state/lazygit"
".local/state/wireplumber"
".cache/nix-index" ".cache/nix-index"

View file

@ -3,13 +3,9 @@
environment.persistence."/persist" = { environment.persistence."/persist" = {
hideMounts = true; hideMounts = true;
directories = [ directories = [
"/etc/nixos"
"/storage" "/storage"
"/var/lib/nixos" "/var/lib/nixos"
]; ];
files = [ files = [ "/etc/machine-id" ];
"/etc/machine-id"
"/root/.gitconfig"
];
}; };
} }