diff --git a/home/default.nix b/config/home-manager/default.nix similarity index 54% rename from home/default.nix rename to config/home-manager/default.nix index 8811c20..8c4543e 100644 --- a/home/default.nix +++ b/config/home-manager/default.nix @@ -1,12 +1,12 @@ -{ +{osConfig, ...}: { imports = [ ./services/udiskie.nix ./terminal ./programs ]; - home = { - username = "nezia"; - homeDirectory = "/home/nezia"; + home = rec { + inherit (osConfig.local.systemVars) username; + homeDirectory = "/home/${username}"; stateVersion = "24.05"; }; diff --git a/home/programs/browsers/default.nix b/config/home-manager/programs/browsers/default.nix similarity index 100% rename from home/programs/browsers/default.nix rename to config/home-manager/programs/browsers/default.nix diff --git a/home/programs/browsers/firefox.nix b/config/home-manager/programs/browsers/firefox.nix similarity index 100% rename from home/programs/browsers/firefox.nix rename to config/home-manager/programs/browsers/firefox.nix diff --git a/home/programs/default.nix b/config/home-manager/programs/default.nix similarity index 100% rename from home/programs/default.nix rename to config/home-manager/programs/default.nix diff --git a/home/programs/editors/helix.nix b/config/home-manager/programs/editors/helix.nix similarity index 100% rename from home/programs/editors/helix.nix rename to config/home-manager/programs/editors/helix.nix diff --git a/home/programs/editors/neovim.nix b/config/home-manager/programs/editors/neovim.nix similarity index 100% rename from home/programs/editors/neovim.nix rename to config/home-manager/programs/editors/neovim.nix diff --git a/home/programs/fuzzel.nix b/config/home-manager/programs/fuzzel.nix similarity index 100% rename from home/programs/fuzzel.nix rename to config/home-manager/programs/fuzzel.nix diff --git a/home/programs/games/default.nix b/config/home-manager/programs/games/default.nix similarity index 100% rename from home/programs/games/default.nix rename to config/home-manager/programs/games/default.nix diff --git a/home/programs/gnome/default.nix b/config/home-manager/programs/gnome/default.nix similarity index 100% rename from home/programs/gnome/default.nix rename to config/home-manager/programs/gnome/default.nix diff --git a/home/programs/hypr/default.nix b/config/home-manager/programs/hypr/default.nix similarity index 100% rename from home/programs/hypr/default.nix rename to config/home-manager/programs/hypr/default.nix diff --git a/home/programs/hypr/idle.nix b/config/home-manager/programs/hypr/idle.nix similarity index 100% rename from home/programs/hypr/idle.nix rename to config/home-manager/programs/hypr/idle.nix diff --git a/home/programs/hypr/land/binds.nix b/config/home-manager/programs/hypr/land/binds.nix similarity index 100% rename from home/programs/hypr/land/binds.nix rename to config/home-manager/programs/hypr/land/binds.nix diff --git a/home/programs/hypr/land/default.nix b/config/home-manager/programs/hypr/land/default.nix similarity index 100% rename from home/programs/hypr/land/default.nix rename to config/home-manager/programs/hypr/land/default.nix diff --git a/home/programs/hypr/lock.nix b/config/home-manager/programs/hypr/lock.nix similarity index 100% rename from home/programs/hypr/lock.nix rename to config/home-manager/programs/hypr/lock.nix diff --git a/home/programs/media/default.nix b/config/home-manager/programs/media/default.nix similarity index 100% rename from home/programs/media/default.nix rename to config/home-manager/programs/media/default.nix diff --git a/home/programs/media/zathura.nix b/config/home-manager/programs/media/zathura.nix similarity index 100% rename from home/programs/media/zathura.nix rename to config/home-manager/programs/media/zathura.nix diff --git a/home/programs/niri/binds.nix b/config/home-manager/programs/niri/binds.nix similarity index 100% rename from home/programs/niri/binds.nix rename to config/home-manager/programs/niri/binds.nix diff --git a/home/programs/niri/default.nix b/config/home-manager/programs/niri/default.nix similarity index 100% rename from home/programs/niri/default.nix rename to config/home-manager/programs/niri/default.nix diff --git a/home/programs/swaybg.nix b/config/home-manager/programs/swaybg.nix similarity index 100% rename from home/programs/swaybg.nix rename to config/home-manager/programs/swaybg.nix diff --git a/home/programs/swayidle.nix b/config/home-manager/programs/swayidle.nix similarity index 100% rename from home/programs/swayidle.nix rename to config/home-manager/programs/swayidle.nix diff --git a/home/programs/swaylock.nix b/config/home-manager/programs/swaylock.nix similarity index 100% rename from home/programs/swaylock.nix rename to config/home-manager/programs/swaylock.nix diff --git a/home/programs/waybar/default.nix b/config/home-manager/programs/waybar/default.nix similarity index 100% rename from home/programs/waybar/default.nix rename to config/home-manager/programs/waybar/default.nix diff --git a/home/programs/waybar/style.css b/config/home-manager/programs/waybar/style.css similarity index 100% rename from home/programs/waybar/style.css rename to config/home-manager/programs/waybar/style.css diff --git a/home/programs/wlogout.nix b/config/home-manager/programs/wlogout.nix similarity index 100% rename from home/programs/wlogout.nix rename to config/home-manager/programs/wlogout.nix diff --git a/home/programs/xdg.nix b/config/home-manager/programs/xdg.nix similarity index 100% rename from home/programs/xdg.nix rename to config/home-manager/programs/xdg.nix diff --git a/home/services/flatpak.nix b/config/home-manager/services/flatpak.nix similarity index 100% rename from home/services/flatpak.nix rename to config/home-manager/services/flatpak.nix diff --git a/home/services/swaync/default.nix b/config/home-manager/services/swaync/default.nix similarity index 100% rename from home/services/swaync/default.nix rename to config/home-manager/services/swaync/default.nix diff --git a/home/services/swaync/style.css b/config/home-manager/services/swaync/style.css similarity index 100% rename from home/services/swaync/style.css rename to config/home-manager/services/swaync/style.css diff --git a/home/services/syncthing.nix b/config/home-manager/services/syncthing.nix similarity index 100% rename from home/services/syncthing.nix rename to config/home-manager/services/syncthing.nix diff --git a/home/services/udiskie.nix b/config/home-manager/services/udiskie.nix similarity index 100% rename from home/services/udiskie.nix rename to config/home-manager/services/udiskie.nix diff --git a/home/terminal/default.nix b/config/home-manager/terminal/default.nix similarity index 100% rename from home/terminal/default.nix rename to config/home-manager/terminal/default.nix diff --git a/home/terminal/emulators/foot.nix b/config/home-manager/terminal/emulators/foot.nix similarity index 100% rename from home/terminal/emulators/foot.nix rename to config/home-manager/terminal/emulators/foot.nix diff --git a/home/terminal/emulators/gnome-terminal.nix b/config/home-manager/terminal/emulators/gnome-terminal.nix similarity index 100% rename from home/terminal/emulators/gnome-terminal.nix rename to config/home-manager/terminal/emulators/gnome-terminal.nix diff --git a/home/terminal/emulators/wezterm.nix b/config/home-manager/terminal/emulators/wezterm.nix similarity index 100% rename from home/terminal/emulators/wezterm.nix rename to config/home-manager/terminal/emulators/wezterm.nix diff --git a/home/terminal/programs/bat.nix b/config/home-manager/terminal/programs/bat.nix similarity index 100% rename from home/terminal/programs/bat.nix rename to config/home-manager/terminal/programs/bat.nix diff --git a/home/terminal/programs/default.nix b/config/home-manager/terminal/programs/default.nix similarity index 100% rename from home/terminal/programs/default.nix rename to config/home-manager/terminal/programs/default.nix diff --git a/home/terminal/programs/direnv.nix b/config/home-manager/terminal/programs/direnv.nix similarity index 100% rename from home/terminal/programs/direnv.nix rename to config/home-manager/terminal/programs/direnv.nix diff --git a/home/terminal/programs/git.nix b/config/home-manager/terminal/programs/git.nix similarity index 100% rename from home/terminal/programs/git.nix rename to config/home-manager/terminal/programs/git.nix diff --git a/home/terminal/programs/gnupg.nix b/config/home-manager/terminal/programs/gnupg.nix similarity index 100% rename from home/terminal/programs/gnupg.nix rename to config/home-manager/terminal/programs/gnupg.nix diff --git a/home/terminal/programs/nix-index.nix b/config/home-manager/terminal/programs/nix-index.nix similarity index 100% rename from home/terminal/programs/nix-index.nix rename to config/home-manager/terminal/programs/nix-index.nix diff --git a/home/terminal/programs/tmux.nix b/config/home-manager/terminal/programs/tmux.nix similarity index 100% rename from home/terminal/programs/tmux.nix rename to config/home-manager/terminal/programs/tmux.nix diff --git a/home/terminal/programs/yazi.nix b/config/home-manager/terminal/programs/yazi.nix similarity index 100% rename from home/terminal/programs/yazi.nix rename to config/home-manager/terminal/programs/yazi.nix diff --git a/home/terminal/shell/default.nix b/config/home-manager/terminal/shell/default.nix similarity index 100% rename from home/terminal/shell/default.nix rename to config/home-manager/terminal/shell/default.nix diff --git a/home/terminal/shell/fish.nix b/config/home-manager/terminal/shell/fish.nix similarity index 100% rename from home/terminal/shell/fish.nix rename to config/home-manager/terminal/shell/fish.nix diff --git a/home/terminal/shell/nushell.nix b/config/home-manager/terminal/shell/nushell.nix similarity index 100% rename from home/terminal/shell/nushell.nix rename to config/home-manager/terminal/shell/nushell.nix diff --git a/home/terminal/shell/starship.nix b/config/home-manager/terminal/shell/starship.nix similarity index 100% rename from home/terminal/shell/starship.nix rename to config/home-manager/terminal/shell/starship.nix diff --git a/home/terminal/shell/zoxide.nix b/config/home-manager/terminal/shell/zoxide.nix similarity index 100% rename from home/terminal/shell/zoxide.nix rename to config/home-manager/terminal/shell/zoxide.nix diff --git a/system/core/boot.nix b/config/nixos/core/boot.nix similarity index 100% rename from system/core/boot.nix rename to config/nixos/core/boot.nix diff --git a/system/core/default.nix b/config/nixos/core/default.nix similarity index 100% rename from system/core/default.nix rename to config/nixos/core/default.nix diff --git a/system/core/lanzaboote.nix b/config/nixos/core/lanzaboote.nix similarity index 100% rename from system/core/lanzaboote.nix rename to config/nixos/core/lanzaboote.nix diff --git a/system/core/networking.nix b/config/nixos/core/networking.nix similarity index 100% rename from system/core/networking.nix rename to config/nixos/core/networking.nix diff --git a/system/core/security.nix b/config/nixos/core/security.nix similarity index 100% rename from system/core/security.nix rename to config/nixos/core/security.nix diff --git a/system/core/users.nix b/config/nixos/core/users.nix similarity index 100% rename from system/core/users.nix rename to config/nixos/core/users.nix diff --git a/system/default.nix b/config/nixos/default.nix similarity index 100% rename from system/default.nix rename to config/nixos/default.nix diff --git a/system/hardware/fprintd.nix b/config/nixos/hardware/fprintd.nix similarity index 100% rename from system/hardware/fprintd.nix rename to config/nixos/hardware/fprintd.nix diff --git a/system/hardware/fwupd.nix b/config/nixos/hardware/fwupd.nix similarity index 100% rename from system/hardware/fwupd.nix rename to config/nixos/hardware/fwupd.nix diff --git a/system/hardware/nvidia.nix b/config/nixos/hardware/nvidia.nix similarity index 100% rename from system/hardware/nvidia.nix rename to config/nixos/hardware/nvidia.nix diff --git a/system/hardware/printing.nix b/config/nixos/hardware/printing.nix similarity index 100% rename from system/hardware/printing.nix rename to config/nixos/hardware/printing.nix diff --git a/system/hardware/uni-sync.nix b/config/nixos/hardware/uni-sync.nix similarity index 100% rename from system/hardware/uni-sync.nix rename to config/nixos/hardware/uni-sync.nix diff --git a/system/hardware/via.nix b/config/nixos/hardware/via.nix similarity index 100% rename from system/hardware/via.nix rename to config/nixos/hardware/via.nix diff --git a/system/network/default.nix b/config/nixos/network/default.nix similarity index 100% rename from system/network/default.nix rename to config/nixos/network/default.nix diff --git a/system/nix/default.nix b/config/nixos/nix/default.nix similarity index 100% rename from system/nix/default.nix rename to config/nixos/nix/default.nix diff --git a/system/nix/nh.nix b/config/nixos/nix/nh.nix similarity index 100% rename from system/nix/nh.nix rename to config/nixos/nix/nh.nix diff --git a/system/nix/nixpkgs.nix b/config/nixos/nix/nixpkgs.nix similarity index 100% rename from system/nix/nixpkgs.nix rename to config/nixos/nix/nixpkgs.nix diff --git a/system/programs/default.nix b/config/nixos/programs/default.nix similarity index 100% rename from system/programs/default.nix rename to config/nixos/programs/default.nix diff --git a/system/programs/fonts.nix b/config/nixos/programs/fonts.nix similarity index 100% rename from system/programs/fonts.nix rename to config/nixos/programs/fonts.nix diff --git a/system/programs/games.nix b/config/nixos/programs/games.nix similarity index 100% rename from system/programs/games.nix rename to config/nixos/programs/games.nix diff --git a/system/programs/gnome.nix b/config/nixos/programs/gnome.nix similarity index 100% rename from system/programs/gnome.nix rename to config/nixos/programs/gnome.nix diff --git a/system/programs/home-manager.nix b/config/nixos/programs/home-manager.nix similarity index 100% rename from system/programs/home-manager.nix rename to config/nixos/programs/home-manager.nix diff --git a/system/programs/hyprland.nix b/config/nixos/programs/hyprland.nix similarity index 100% rename from system/programs/hyprland.nix rename to config/nixos/programs/hyprland.nix diff --git a/system/programs/kde.nix b/config/nixos/programs/kde.nix similarity index 100% rename from system/programs/kde.nix rename to config/nixos/programs/kde.nix diff --git a/system/programs/niri/default.nix b/config/nixos/programs/niri/default.nix similarity index 100% rename from system/programs/niri/default.nix rename to config/nixos/programs/niri/default.nix diff --git a/system/services/brightness.nix b/config/nixos/services/brightness.nix similarity index 100% rename from system/services/brightness.nix rename to config/nixos/services/brightness.nix diff --git a/system/services/default.nix b/config/nixos/services/default.nix similarity index 100% rename from system/services/default.nix rename to config/nixos/services/default.nix diff --git a/system/services/docker.nix b/config/nixos/services/docker.nix similarity index 100% rename from system/services/docker.nix rename to config/nixos/services/docker.nix diff --git a/system/services/documentation.nix b/config/nixos/services/documentation.nix similarity index 100% rename from system/services/documentation.nix rename to config/nixos/services/documentation.nix diff --git a/system/services/flatpak.nix b/config/nixos/services/flatpak.nix similarity index 100% rename from system/services/flatpak.nix rename to config/nixos/services/flatpak.nix diff --git a/system/services/forgejo.nix b/config/nixos/services/forgejo.nix similarity index 100% rename from system/services/forgejo.nix rename to config/nixos/services/forgejo.nix diff --git a/system/services/gnome.nix b/config/nixos/services/gnome.nix similarity index 100% rename from system/services/gnome.nix rename to config/nixos/services/gnome.nix diff --git a/system/services/gnupg.nix b/config/nixos/services/gnupg.nix similarity index 100% rename from system/services/gnupg.nix rename to config/nixos/services/gnupg.nix diff --git a/system/services/greetd.nix b/config/nixos/services/greetd.nix similarity index 95% rename from system/services/greetd.nix rename to config/nixos/services/greetd.nix index 384235c..b96ec92 100644 --- a/system/services/greetd.nix +++ b/config/nixos/services/greetd.nix @@ -1,4 +1,5 @@ { + config, inputs, lib, pkgs, @@ -36,7 +37,7 @@ in { settings = { default_session = { command = "${Hyprland} --config ${hyprlandConfig}"; - user = "nezia"; + user = config.local.systemVars.username; }; }; }; diff --git a/system/services/kanata.nix b/config/nixos/services/kanata.nix similarity index 100% rename from system/services/kanata.nix rename to config/nixos/services/kanata.nix diff --git a/system/services/keyd.nix b/config/nixos/services/keyd.nix similarity index 100% rename from system/services/keyd.nix rename to config/nixos/services/keyd.nix diff --git a/system/services/kmscon.nix b/config/nixos/services/kmscon.nix similarity index 100% rename from system/services/kmscon.nix rename to config/nixos/services/kmscon.nix diff --git a/system/services/logind.nix b/config/nixos/services/logind.nix similarity index 100% rename from system/services/logind.nix rename to config/nixos/services/logind.nix diff --git a/system/services/mail.nix b/config/nixos/services/mail.nix similarity index 100% rename from system/services/mail.nix rename to config/nixos/services/mail.nix diff --git a/system/services/pipewire.nix b/config/nixos/services/pipewire.nix similarity index 100% rename from system/services/pipewire.nix rename to config/nixos/services/pipewire.nix diff --git a/system/services/portfolio.nix b/config/nixos/services/portfolio.nix similarity index 100% rename from system/services/portfolio.nix rename to config/nixos/services/portfolio.nix diff --git a/system/services/power.nix b/config/nixos/services/power.nix similarity index 100% rename from system/services/power.nix rename to config/nixos/services/power.nix diff --git a/system/services/searx.nix b/config/nixos/services/searx.nix similarity index 100% rename from system/services/searx.nix rename to config/nixos/services/searx.nix diff --git a/system/services/syncthing.nix b/config/nixos/services/syncthing.nix similarity index 100% rename from system/services/syncthing.nix rename to config/nixos/services/syncthing.nix diff --git a/hosts/default.nix b/hosts/default.nix index 3f47ac6..4d5f1fd 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,9 +1,9 @@ {inputs, ...}: let - lib' = import ../lib; + lib' = import ../shared/lib; mkSystem = args: inputs.nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs lib';}; - modules = [../modules] ++ args.modules; + modules = [../shared/nixosModules] ++ (args.modules or []); }; in { vamos = mkSystem { diff --git a/hosts/solaire/default.nix b/hosts/solaire/default.nix index 017c33d..0cedde3 100644 --- a/hosts/solaire/default.nix +++ b/hosts/solaire/default.nix @@ -3,8 +3,8 @@ specialArgs, ... }: let - system = "${inputs.self}/system"; - home = "${inputs.self}/home"; + nixos = "${inputs.self}/config/nixos"; + hm = "${inputs.self}/config/home-manager"; in { local.systemVars = { hostName = "solaire"; @@ -15,47 +15,48 @@ in { fullName = "Anthony Rodriguez"; email = "anthony@nezia.dev"; }; + imports = [ ./hardware-configuration.nix ./modules - system - "${system}/hardware/uni-sync.nix" + nixos + "${nixos}/hardware/uni-sync.nix" - "${system}/programs/games.nix" - "${system}/hardware/nvidia.nix" + "${nixos}/programs/games.nix" + "${nixos}/hardware/nvidia.nix" - "${system}/services/logind.nix" - "${system}/services/greetd.nix" + "${nixos}/services/logind.nix" + "${nixos}/services/greetd.nix" - "${system}/programs/hyprland.nix" - "${system}/services/gnome.nix" + "${nixos}/programs/hyprland.nix" + "${nixos}/services/gnome.nix" - "${system}/services/documentation.nix" + "${nixos}/services/documentation.nix" - "${system}/services/flatpak.nix" + "${nixos}/services/flatpak.nix" ]; home-manager = { users.nezia.imports = [ - home - "${home}/services/udiskie.nix" - "${home}/programs/games" + hm + "${hm}/services/udiskie.nix" + "${hm}/programs/games" - "${home}/programs/waybar" - "${home}/programs/fuzzel.nix" - "${home}/programs/hypr" + "${hm}/programs/waybar" + "${hm}/programs/fuzzel.nix" + "${hm}/programs/hypr" - "${home}/services/swaync" - "${home}/programs/swaybg.nix" - "${home}/programs/swaylock.nix" + "${hm}/services/swaync" + "${hm}/programs/swaybg.nix" + "${hm}/programs/swaylock.nix" - "${home}/terminal/emulators/foot.nix" + "${hm}/terminal/emulators/foot.nix" - "${home}/services/flatpak.nix" - "${home}/services/syncthing.nix" + "${hm}/services/flatpak.nix" + "${hm}/services/syncthing.nix" - "${home}/programs/editors/neovim.nix" + "${hm}/programs/editors/neovim.nix" ]; extraSpecialArgs = specialArgs; }; diff --git a/hosts/vamos/default.nix b/hosts/vamos/default.nix index 26c7253..b6be02b 100644 --- a/hosts/vamos/default.nix +++ b/hosts/vamos/default.nix @@ -3,8 +3,8 @@ specialArgs, ... }: let - system = "${inputs.self}/system"; - home = "${inputs.self}/home"; + nixos = "${inputs.self}/config/nixos"; + hm = "${inputs.self}/config/home-manager"; in { local.systemVars = { hostName = "vamos"; @@ -20,42 +20,42 @@ in { ./hardware-configuration.nix ./modules - "${system}" - "${system}/core/lanzaboote.nix" + "${nixos}" + "${nixos}/core/lanzaboote.nix" - "${system}/hardware/fprintd.nix" - "${system}/services/power.nix" - "${system}/services/brightness.nix" + "${nixos}/hardware/fprintd.nix" + "${nixos}/services/power.nix" + "${nixos}/services/brightness.nix" - "${system}/services/logind.nix" - "${system}/services/greetd.nix" - "${system}/services/kanata.nix" + "${nixos}/services/logind.nix" + "${nixos}/services/greetd.nix" + "${nixos}/services/kanata.nix" - "${system}/programs/hyprland.nix" - "${system}/services/gnome.nix" - "${system}/services/mail.nix" + "${nixos}/programs/hyprland.nix" + "${nixos}/services/gnome.nix" + "${nixos}/services/mail.nix" - "${system}/services/documentation.nix" + "${nixos}/services/documentation.nix" ]; home-manager = { users.nezia.imports = [ - "${home}" - "${home}/services/udiskie.nix" + "${hm}" + "${hm}/services/udiskie.nix" - "${home}/programs/hypr" - "${home}/programs/waybar" - "${home}/programs/fuzzel.nix" + "${hm}/programs/hypr" + "${hm}/programs/waybar" + "${hm}/programs/fuzzel.nix" - "${home}/services/swaync" - "${home}/programs/swaybg.nix" - "${home}/programs/wlogout.nix" + "${hm}/services/swaync" + "${hm}/programs/swaybg.nix" + "${hm}/programs/wlogout.nix" - "${home}/services/syncthing.nix" + "${hm}/services/syncthing.nix" - "${home}/programs/editors/neovim.nix" + "${hm}/programs/editors/neovim.nix" - "${home}/terminal/emulators/foot.nix" + "${hm}/terminal/emulators/foot.nix" ]; extraSpecialArgs = specialArgs; }; diff --git a/lib/default.nix b/shared/lib/default.nix similarity index 100% rename from lib/default.nix rename to shared/lib/default.nix diff --git a/modules/default.nix b/shared/nixosModules/default.nix similarity index 100% rename from modules/default.nix rename to shared/nixosModules/default.nix diff --git a/modules/homeVars.nix b/shared/nixosModules/homeVars.nix similarity index 100% rename from modules/homeVars.nix rename to shared/nixosModules/homeVars.nix diff --git a/modules/systemVars.nix b/shared/nixosModules/systemVars.nix similarity index 100% rename from modules/systemVars.nix rename to shared/nixosModules/systemVars.nix diff --git a/modules/theme/default.nix b/shared/nixosModules/theme/default.nix similarity index 99% rename from modules/theme/default.nix rename to shared/nixosModules/theme/default.nix index 8ac4d08..ef0c691 100644 --- a/modules/theme/default.nix +++ b/shared/nixosModules/theme/default.nix @@ -68,7 +68,7 @@ in { description = '' Path to an avatar image (used for hyprlock). ''; - default = ../../assets/avatar.png; + default = ../../../assets/avatar.png; # TODO silly, change this }; }; config = let diff --git a/modules/theme/gtk.nix b/shared/nixosModules/theme/gtk.nix similarity index 100% rename from modules/theme/gtk.nix rename to shared/nixosModules/theme/gtk.nix