From c4f0a374b2cb1e3481e9dcb6ec6fd18b120e0bcf Mon Sep 17 00:00:00 2001 From: Nate Anderson Date: Mon, 15 Jan 2024 20:11:17 -0700 Subject: [PATCH] Updated config to be alot more robust and make sense where modularity is included --- flake.lock | 45 ++---- flake.nix | 50 ++----- nate/default.nix | 22 +++ nate/desktop-configuration.nix | 81 ++++++++++ .../nate => nate/dotfiles}/Passwords.kdbx | Bin .../nate => nate/dotfiles}/foot/foot.ini | 0 .../nate => nate/dotfiles}/helix/config.toml | 0 .../dotfiles}/helix/languages.toml | 0 .../dotfiles}/kak-lsp/kak-lsp.toml | 0 .../kak/colors/catppuccin_frappe.kak | 0 .../dotfiles}/kak/colors/catppuccin_latte.kak | 0 .../kak/colors/catppuccin_macchiato.kak | 0 .../dotfiles}/kak/colors/catppuccin_mocha.kak | 0 {dotfiles/nate => nate/dotfiles}/kak/kakrc | 0 .../nate => nate/dotfiles}/kak/rc/fzf_git.kak | 0 .../dotfiles}/keepassxc/keepassxc.ini | 0 .../nate => nate/dotfiles}/kitty/kitty.conf | 0 {dotfiles/nate => nate/dotfiles}/mako/config | 0 .../dotfiles}/sway/background.pid | 0 .../nate => nate/dotfiles}/sway/cheatsheet | 0 {dotfiles/nate => nate/dotfiles}/sway/config | 0 .../sway/config.d/application_defaults | 0 .../sway/config.d/autostart_applications | 0 .../dotfiles}/sway/config.d/clamshell | 0 .../dotfiles}/sway/config.d/default | 0 .../dotfiles}/sway/config.d/input | 0 .../dotfiles}/sway/config.d/output | 0 .../dotfiles}/sway/config.d/theme | 0 .../nate => nate/dotfiles}/sway/keyboard.conf | 0 .../dotfiles}/sway/scripts/background.pid | 0 .../dotfiles}/sway/scripts/background.sh | 0 .../dotfiles}/sway/scripts/clamshell.sh | 0 .../dotfiles}/sway/scripts/import-gsettings | 0 .../dotfiles}/sway/scripts/lockman.sh | 0 .../dotfiles}/sway/scripts/scale.sh | 0 .../dotfiles}/sway/scripts/screenshot.sh | 0 .../dotfiles}/sway/scripts/swayfader.py | 0 .../dotfiles}/sway/scripts/weather.sh | 0 .../nate => nate/dotfiles}/sway/swaylock.png | Bin .../Macchiato-hald8-archlinux.png.png | Bin .../Macchiato-hald8-gnu-linux.png.png | Bin .../Macchiato-hald8-ign-0000.png.png | Bin .../Macchiato-hald8-ign_astronaut.png.png | Bin .../Macchiato-hald8-ign_black.jpg.jpg | Bin .../Macchiato-hald8-ign_vaporWave.png.png | Bin .../wallpapers/Macchiato-hald8-waves.jpg.jpg | Bin .../nate => nate/dotfiles}/waybar/config | 0 .../dotfiles}/waybar/scripts/PBPbattery.sh | 0 .../waybar/scripts/keyboard_layout.sh | 0 .../dotfiles}/waybar/scripts/keyhint.sh | 0 .../dotfiles}/waybar/scripts/power-menu.sh | 0 .../dotfiles}/waybar/scripts/weather.sh | 0 .../nate => nate/dotfiles}/waybar/style.css | 0 {dotfiles/nate => nate/dotfiles}/wofi/config | 0 .../nate => nate/dotfiles}/wofi/config.power | 0 .../dotfiles}/wofi/config.screenshot | 0 .../nate => nate/dotfiles}/wofi/style.css | 0 .../dotfiles}/wofi/style.widgets.css | 0 .../nate => nate/dotfiles}/wofi/windows.py | 0 .../modules}/apps/firefox/firefox.nix | 0 .../modules}/home-manager/home.nix | 14 +- {modules => nate/modules}/sway/sway_conf.nix | 0 {modules => nate/modules}/user/main_user.nix | 0 .../nixos}/hardware-configuration.nix | 0 nixos/default.nix | 27 ---- nixos/desktop_configuration.nix | 61 -------- nixos/server_configuration.nix | 141 ------------------ 67 files changed, 137 insertions(+), 304 deletions(-) create mode 100644 nate/default.nix create mode 100644 nate/desktop-configuration.nix rename {dotfiles/nate => nate/dotfiles}/Passwords.kdbx (100%) rename {dotfiles/nate => nate/dotfiles}/foot/foot.ini (100%) rename {dotfiles/nate => nate/dotfiles}/helix/config.toml (100%) rename {dotfiles/nate => nate/dotfiles}/helix/languages.toml (100%) rename {dotfiles/nate => nate/dotfiles}/kak-lsp/kak-lsp.toml (100%) rename {dotfiles/nate => nate/dotfiles}/kak/colors/catppuccin_frappe.kak (100%) rename {dotfiles/nate => nate/dotfiles}/kak/colors/catppuccin_latte.kak (100%) rename {dotfiles/nate => nate/dotfiles}/kak/colors/catppuccin_macchiato.kak (100%) rename {dotfiles/nate => nate/dotfiles}/kak/colors/catppuccin_mocha.kak (100%) rename {dotfiles/nate => nate/dotfiles}/kak/kakrc (100%) rename {dotfiles/nate => nate/dotfiles}/kak/rc/fzf_git.kak (100%) rename {dotfiles/nate => nate/dotfiles}/keepassxc/keepassxc.ini (100%) rename {dotfiles/nate => nate/dotfiles}/kitty/kitty.conf (100%) rename {dotfiles/nate => nate/dotfiles}/mako/config (100%) rename {dotfiles/nate => nate/dotfiles}/sway/background.pid (100%) rename {dotfiles/nate => nate/dotfiles}/sway/cheatsheet (100%) rename {dotfiles/nate => nate/dotfiles}/sway/config (100%) rename {dotfiles/nate => nate/dotfiles}/sway/config.d/application_defaults (100%) rename {dotfiles/nate => nate/dotfiles}/sway/config.d/autostart_applications (100%) rename {dotfiles/nate => nate/dotfiles}/sway/config.d/clamshell (100%) rename {dotfiles/nate => nate/dotfiles}/sway/config.d/default (100%) rename {dotfiles/nate => nate/dotfiles}/sway/config.d/input (100%) rename {dotfiles/nate => nate/dotfiles}/sway/config.d/output (100%) rename {dotfiles/nate => nate/dotfiles}/sway/config.d/theme (100%) rename {dotfiles/nate => nate/dotfiles}/sway/keyboard.conf (100%) rename {dotfiles/nate => nate/dotfiles}/sway/scripts/background.pid (100%) rename {dotfiles/nate => nate/dotfiles}/sway/scripts/background.sh (100%) rename {dotfiles/nate => nate/dotfiles}/sway/scripts/clamshell.sh (100%) rename {dotfiles/nate => nate/dotfiles}/sway/scripts/import-gsettings (100%) rename {dotfiles/nate => nate/dotfiles}/sway/scripts/lockman.sh (100%) rename {dotfiles/nate => nate/dotfiles}/sway/scripts/scale.sh (100%) rename {dotfiles/nate => nate/dotfiles}/sway/scripts/screenshot.sh (100%) rename {dotfiles/nate => nate/dotfiles}/sway/scripts/swayfader.py (100%) rename {dotfiles/nate => nate/dotfiles}/sway/scripts/weather.sh (100%) rename {dotfiles/nate => nate/dotfiles}/sway/swaylock.png (100%) rename {dotfiles/nate => nate/dotfiles}/sway/wallpapers/Macchiato-hald8-archlinux.png.png (100%) rename {dotfiles/nate => nate/dotfiles}/sway/wallpapers/Macchiato-hald8-gnu-linux.png.png (100%) rename {dotfiles/nate => nate/dotfiles}/sway/wallpapers/Macchiato-hald8-ign-0000.png.png (100%) rename {dotfiles/nate => nate/dotfiles}/sway/wallpapers/Macchiato-hald8-ign_astronaut.png.png (100%) rename {dotfiles/nate => nate/dotfiles}/sway/wallpapers/Macchiato-hald8-ign_black.jpg.jpg (100%) rename {dotfiles/nate => nate/dotfiles}/sway/wallpapers/Macchiato-hald8-ign_vaporWave.png.png (100%) rename {dotfiles/nate => nate/dotfiles}/sway/wallpapers/Macchiato-hald8-waves.jpg.jpg (100%) rename {dotfiles/nate => nate/dotfiles}/waybar/config (100%) rename {dotfiles/nate => nate/dotfiles}/waybar/scripts/PBPbattery.sh (100%) rename {dotfiles/nate => nate/dotfiles}/waybar/scripts/keyboard_layout.sh (100%) rename {dotfiles/nate => nate/dotfiles}/waybar/scripts/keyhint.sh (100%) rename {dotfiles/nate => nate/dotfiles}/waybar/scripts/power-menu.sh (100%) rename {dotfiles/nate => nate/dotfiles}/waybar/scripts/weather.sh (100%) rename {dotfiles/nate => nate/dotfiles}/waybar/style.css (100%) rename {dotfiles/nate => nate/dotfiles}/wofi/config (100%) rename {dotfiles/nate => nate/dotfiles}/wofi/config.power (100%) rename {dotfiles/nate => nate/dotfiles}/wofi/config.screenshot (100%) rename {dotfiles/nate => nate/dotfiles}/wofi/style.css (100%) rename {dotfiles/nate => nate/dotfiles}/wofi/style.widgets.css (100%) rename {dotfiles/nate => nate/dotfiles}/wofi/windows.py (100%) rename {modules => nate/modules}/apps/firefox/firefox.nix (100%) rename {modules => nate/modules}/home-manager/home.nix (93%) rename {modules => nate/modules}/sway/sway_conf.nix (100%) rename {modules => nate/modules}/user/main_user.nix (100%) rename {nixos/nate => nate/nixos}/hardware-configuration.nix (100%) delete mode 100644 nixos/default.nix delete mode 100644 nixos/desktop_configuration.nix delete mode 100644 nixos/server_configuration.nix diff --git a/flake.lock b/flake.lock index ae32161..196e8a7 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1702735279, - "narHash": "sha256-SztEzDOE/6bDNnWWvnRbSHPVrgewLwdSei1sxoZFejM=", + "lastModified": 1705269478, + "narHash": "sha256-j7Rp8Y3ckBHOlIzqe0g2+/BVce9SU/dVtn4Eb0rMuY4=", "owner": "nix-community", "repo": "home-manager", - "rev": "e9b9ecef4295a835ab073814f100498716b05a96", + "rev": "846200eb574faa2af808ed02e653c2b8ed51fd71", "type": "github" }, "original": { @@ -20,33 +20,13 @@ "type": "github" } }, - "nix-ld": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1701153607, - "narHash": "sha256-h+odOVyiGmEERMECoFOj5P7FPiMR8IPRzroFA4sKivg=", - "owner": "Mic92", - "repo": "nix-ld", - "rev": "bf5aa84a713c31d95b4307e442e966d6c7fd7ae7", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "nix-ld", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1702312524, - "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=", + "lastModified": 1705133751, + "narHash": "sha256-rCIsyE80jgiOU78gCWN3A0wE0tR2GI5nH6MlS+HaaSQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a9bf124c46ef298113270b1f84a164865987a91c", + "rev": "9b19f5e77dd906cb52dade0b7bd280339d2a1f3d", "type": "github" }, "original": { @@ -58,11 +38,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1702346276, - "narHash": "sha256-eAQgwIWApFQ40ipeOjVSoK4TEHVd6nbSd9fApiHIw5A=", + "lastModified": 1705183652, + "narHash": "sha256-rnfkyUH0x72oHfiSDhuCHDHg3gFgF+lF8zkkg5Zihsw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cf28ee258fd5f9a52de6b9865cdb93a1f96d09b7", + "rev": "428544ae95eec077c7f823b422afae5f174dee4b", "type": "github" }, "original": { @@ -74,11 +54,11 @@ }, "nur": { "locked": { - "lastModified": 1702770334, - "narHash": "sha256-MVILxIF9ZVIk0f9w3yYZpy8auwxgey0MFzdoIFFvQNU=", + "lastModified": 1705283909, + "narHash": "sha256-7F2KyTB4cApsHg7oltJ1r0QFWMjWTOaS9m2IbKFhj6Y=", "owner": "nix-community", "repo": "NUR", - "rev": "1d37444620523278aa163bb9e30104f5d1152061", + "rev": "375b9a949232cd1e31bd89d197a5605a17d2aeb3", "type": "github" }, "original": { @@ -90,7 +70,6 @@ "root": { "inputs": { "home-manager": "home-manager", - "nix-ld": "nix-ld", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable", "nur": "nur" diff --git a/flake.nix b/flake.nix index 81a42ce..8c2203d 100644 --- a/flake.nix +++ b/flake.nix @@ -3,44 +3,24 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11"; - - nix-ld = { - url = "github:Mic92/nix-ld"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - nur.url = "github:nix-community/NUR"; - home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - - # firefox-addons = { - # url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; }; - outputs = { self, nixpkgs, nixpkgs-stable, nix-ld, nur, home-manager, ... } @ inputs: + outputs = { self, nixpkgs, nixpkgs-stable, nur, home-manager, ... } @ inputs: let inherit (self) outputs; system = "x86_64-linux"; - userName = "nate"; - fullName = "Nate Anderson"; - email = "n8r@tuta.io"; - hostName = "winmax"; - desktop = "sway"; - gaming = true; timeZone = "America/Denver"; pkgs = nixpkgs.legacyPackages.${system}; stablePkgs = nixpkgs-stable.legacyPackages.${system}; in { - - nixosConfigurations = { + nixosConfigurations = { nixServer = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ @@ -49,24 +29,22 @@ inputs.home-manager.nixosModules.default ]; }; - nixDesktop = nixpkgs.lib.nixosSystem { + nate = nixpkgs.lib.nixosSystem { # Pass args to desktop configuration specialArgs = { - inherit inputs outputs userName hostName desktop timeZone gaming system; + inherit inputs outputs timeZone system; }; modules = [ - ./nixos/desktop_configuration.nix - # Setup nix-ld - # nix-ld.nixosModules.nix-ld - # Setup home manager - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.${userName} = import ./modules/home-manager/home.nix; - home-manager.extraSpecialArgs = { - inherit inputs outputs userName fullName email hostName desktop gaming; - }; - } + # Setup home manager + inputs.home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.nate = import ./nate/modules/home-manager/home.nix; + home-manager.extraSpecialArgs = { + inherit inputs outputs; + }; + } + ./nate/default.nix ]; }; }; diff --git a/nate/default.nix b/nate/default.nix new file mode 100644 index 0000000..b88fe07 --- /dev/null +++ b/nate/default.nix @@ -0,0 +1,22 @@ +{ config, lib, inputs, outputs, pkgs, system, timeZone, ... }: + let + userName = "nate"; + fullName = "Nate Anderson"; + email = "n8r@tuta.io"; + hostName = "winmax"; + desktop = "sway"; + gaming = true; + in +{ + imports = [ + ./desktop-configuration.nix + ./nixos/hardware-configuration.nix + ]; + + deskCfg = { + userName = userName; + hostName = hostName; + de = desktop; + installGaming = gaming; + }; +} diff --git a/nate/desktop-configuration.nix b/nate/desktop-configuration.nix new file mode 100644 index 0000000..5296bc2 --- /dev/null +++ b/nate/desktop-configuration.nix @@ -0,0 +1,81 @@ +{ config, lib, inputs, outputs, pkgs, timeZone, system, ... }: +let + supportedDesktops = [ "sway" ]; + supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops; + deskCfg = config.deskCfg; +in +{ + options.deskCfg = { + de = lib.mkOption { + default = "sway"; + type = lib.types.str; + description = "Desktop Environment"; + }; + userName = lib.mkOption { + type = lib.types.str; + description = "Main username for system"; + }; + hostName = lib.mkOption { + type = lib.types.str; + description = "Hostname for system"; + }; + installGaming = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Whether to install gaming software or not"; + }; + }; + + imports = [ + modules/user/main_user.nix + modules/sway/sway_conf.nix + + # inputs.nur.hmModules.nur + ]; + + config = { + assertions = [ + { + assertion = builtins.elem deskCfg.de supportedDesktops; + message = "Unsupported desktop environment: ${deskCfg.de}\nSupported DE's: ${supportedDesktopsStr}"; + } + ]; + + nixpkgs.overlays = [ + inputs.nur.overlay + ]; + + + # Enable flakes feature + nix.settings.experimental-features = [ + "nix-command" "flakes" + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = deskCfg.hostName; # Define your hostname. + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + time.timeZone = timeZone; + + main_user = { + enable = true; + userName = deskCfg.userName; + isDesktopUser = true; + }; + + swaywm = { + enable = true; + useNonFree = true; + installGaming = deskCfg.installGaming; + systemPackages = with pkgs; [ + libreoffice + ]; + }; + + system.stateVersion = "23.11"; # Did you read the comment? + }; +} + diff --git a/dotfiles/nate/Passwords.kdbx b/nate/dotfiles/Passwords.kdbx similarity index 100% rename from dotfiles/nate/Passwords.kdbx rename to nate/dotfiles/Passwords.kdbx diff --git a/dotfiles/nate/foot/foot.ini b/nate/dotfiles/foot/foot.ini similarity index 100% rename from dotfiles/nate/foot/foot.ini rename to nate/dotfiles/foot/foot.ini diff --git a/dotfiles/nate/helix/config.toml b/nate/dotfiles/helix/config.toml similarity index 100% rename from dotfiles/nate/helix/config.toml rename to nate/dotfiles/helix/config.toml diff --git a/dotfiles/nate/helix/languages.toml b/nate/dotfiles/helix/languages.toml similarity index 100% rename from dotfiles/nate/helix/languages.toml rename to nate/dotfiles/helix/languages.toml diff --git a/dotfiles/nate/kak-lsp/kak-lsp.toml b/nate/dotfiles/kak-lsp/kak-lsp.toml similarity index 100% rename from dotfiles/nate/kak-lsp/kak-lsp.toml rename to nate/dotfiles/kak-lsp/kak-lsp.toml diff --git a/dotfiles/nate/kak/colors/catppuccin_frappe.kak b/nate/dotfiles/kak/colors/catppuccin_frappe.kak similarity index 100% rename from dotfiles/nate/kak/colors/catppuccin_frappe.kak rename to nate/dotfiles/kak/colors/catppuccin_frappe.kak diff --git a/dotfiles/nate/kak/colors/catppuccin_latte.kak b/nate/dotfiles/kak/colors/catppuccin_latte.kak similarity index 100% rename from dotfiles/nate/kak/colors/catppuccin_latte.kak rename to nate/dotfiles/kak/colors/catppuccin_latte.kak diff --git a/dotfiles/nate/kak/colors/catppuccin_macchiato.kak b/nate/dotfiles/kak/colors/catppuccin_macchiato.kak similarity index 100% rename from dotfiles/nate/kak/colors/catppuccin_macchiato.kak rename to nate/dotfiles/kak/colors/catppuccin_macchiato.kak diff --git a/dotfiles/nate/kak/colors/catppuccin_mocha.kak b/nate/dotfiles/kak/colors/catppuccin_mocha.kak similarity index 100% rename from dotfiles/nate/kak/colors/catppuccin_mocha.kak rename to nate/dotfiles/kak/colors/catppuccin_mocha.kak diff --git a/dotfiles/nate/kak/kakrc b/nate/dotfiles/kak/kakrc similarity index 100% rename from dotfiles/nate/kak/kakrc rename to nate/dotfiles/kak/kakrc diff --git a/dotfiles/nate/kak/rc/fzf_git.kak b/nate/dotfiles/kak/rc/fzf_git.kak similarity index 100% rename from dotfiles/nate/kak/rc/fzf_git.kak rename to nate/dotfiles/kak/rc/fzf_git.kak diff --git a/dotfiles/nate/keepassxc/keepassxc.ini b/nate/dotfiles/keepassxc/keepassxc.ini similarity index 100% rename from dotfiles/nate/keepassxc/keepassxc.ini rename to nate/dotfiles/keepassxc/keepassxc.ini diff --git a/dotfiles/nate/kitty/kitty.conf b/nate/dotfiles/kitty/kitty.conf similarity index 100% rename from dotfiles/nate/kitty/kitty.conf rename to nate/dotfiles/kitty/kitty.conf diff --git a/dotfiles/nate/mako/config b/nate/dotfiles/mako/config similarity index 100% rename from dotfiles/nate/mako/config rename to nate/dotfiles/mako/config diff --git a/dotfiles/nate/sway/background.pid b/nate/dotfiles/sway/background.pid similarity index 100% rename from dotfiles/nate/sway/background.pid rename to nate/dotfiles/sway/background.pid diff --git a/dotfiles/nate/sway/cheatsheet b/nate/dotfiles/sway/cheatsheet similarity index 100% rename from dotfiles/nate/sway/cheatsheet rename to nate/dotfiles/sway/cheatsheet diff --git a/dotfiles/nate/sway/config b/nate/dotfiles/sway/config similarity index 100% rename from dotfiles/nate/sway/config rename to nate/dotfiles/sway/config diff --git a/dotfiles/nate/sway/config.d/application_defaults b/nate/dotfiles/sway/config.d/application_defaults similarity index 100% rename from dotfiles/nate/sway/config.d/application_defaults rename to nate/dotfiles/sway/config.d/application_defaults diff --git a/dotfiles/nate/sway/config.d/autostart_applications b/nate/dotfiles/sway/config.d/autostart_applications similarity index 100% rename from dotfiles/nate/sway/config.d/autostart_applications rename to nate/dotfiles/sway/config.d/autostart_applications diff --git a/dotfiles/nate/sway/config.d/clamshell b/nate/dotfiles/sway/config.d/clamshell similarity index 100% rename from dotfiles/nate/sway/config.d/clamshell rename to nate/dotfiles/sway/config.d/clamshell diff --git a/dotfiles/nate/sway/config.d/default b/nate/dotfiles/sway/config.d/default similarity index 100% rename from dotfiles/nate/sway/config.d/default rename to nate/dotfiles/sway/config.d/default diff --git a/dotfiles/nate/sway/config.d/input b/nate/dotfiles/sway/config.d/input similarity index 100% rename from dotfiles/nate/sway/config.d/input rename to nate/dotfiles/sway/config.d/input diff --git a/dotfiles/nate/sway/config.d/output b/nate/dotfiles/sway/config.d/output similarity index 100% rename from dotfiles/nate/sway/config.d/output rename to nate/dotfiles/sway/config.d/output diff --git a/dotfiles/nate/sway/config.d/theme b/nate/dotfiles/sway/config.d/theme similarity index 100% rename from dotfiles/nate/sway/config.d/theme rename to nate/dotfiles/sway/config.d/theme diff --git a/dotfiles/nate/sway/keyboard.conf b/nate/dotfiles/sway/keyboard.conf similarity index 100% rename from dotfiles/nate/sway/keyboard.conf rename to nate/dotfiles/sway/keyboard.conf diff --git a/dotfiles/nate/sway/scripts/background.pid b/nate/dotfiles/sway/scripts/background.pid similarity index 100% rename from dotfiles/nate/sway/scripts/background.pid rename to nate/dotfiles/sway/scripts/background.pid diff --git a/dotfiles/nate/sway/scripts/background.sh b/nate/dotfiles/sway/scripts/background.sh similarity index 100% rename from dotfiles/nate/sway/scripts/background.sh rename to nate/dotfiles/sway/scripts/background.sh diff --git a/dotfiles/nate/sway/scripts/clamshell.sh b/nate/dotfiles/sway/scripts/clamshell.sh similarity index 100% rename from dotfiles/nate/sway/scripts/clamshell.sh rename to nate/dotfiles/sway/scripts/clamshell.sh diff --git a/dotfiles/nate/sway/scripts/import-gsettings b/nate/dotfiles/sway/scripts/import-gsettings similarity index 100% rename from dotfiles/nate/sway/scripts/import-gsettings rename to nate/dotfiles/sway/scripts/import-gsettings diff --git a/dotfiles/nate/sway/scripts/lockman.sh b/nate/dotfiles/sway/scripts/lockman.sh similarity index 100% rename from dotfiles/nate/sway/scripts/lockman.sh rename to nate/dotfiles/sway/scripts/lockman.sh diff --git a/dotfiles/nate/sway/scripts/scale.sh b/nate/dotfiles/sway/scripts/scale.sh similarity index 100% rename from dotfiles/nate/sway/scripts/scale.sh rename to nate/dotfiles/sway/scripts/scale.sh diff --git a/dotfiles/nate/sway/scripts/screenshot.sh b/nate/dotfiles/sway/scripts/screenshot.sh similarity index 100% rename from dotfiles/nate/sway/scripts/screenshot.sh rename to nate/dotfiles/sway/scripts/screenshot.sh diff --git a/dotfiles/nate/sway/scripts/swayfader.py b/nate/dotfiles/sway/scripts/swayfader.py similarity index 100% rename from dotfiles/nate/sway/scripts/swayfader.py rename to nate/dotfiles/sway/scripts/swayfader.py diff --git a/dotfiles/nate/sway/scripts/weather.sh b/nate/dotfiles/sway/scripts/weather.sh similarity index 100% rename from dotfiles/nate/sway/scripts/weather.sh rename to nate/dotfiles/sway/scripts/weather.sh diff --git a/dotfiles/nate/sway/swaylock.png b/nate/dotfiles/sway/swaylock.png similarity index 100% rename from dotfiles/nate/sway/swaylock.png rename to nate/dotfiles/sway/swaylock.png diff --git a/dotfiles/nate/sway/wallpapers/Macchiato-hald8-archlinux.png.png b/nate/dotfiles/sway/wallpapers/Macchiato-hald8-archlinux.png.png similarity index 100% rename from dotfiles/nate/sway/wallpapers/Macchiato-hald8-archlinux.png.png rename to nate/dotfiles/sway/wallpapers/Macchiato-hald8-archlinux.png.png diff --git a/dotfiles/nate/sway/wallpapers/Macchiato-hald8-gnu-linux.png.png b/nate/dotfiles/sway/wallpapers/Macchiato-hald8-gnu-linux.png.png similarity index 100% rename from dotfiles/nate/sway/wallpapers/Macchiato-hald8-gnu-linux.png.png rename to nate/dotfiles/sway/wallpapers/Macchiato-hald8-gnu-linux.png.png diff --git a/dotfiles/nate/sway/wallpapers/Macchiato-hald8-ign-0000.png.png b/nate/dotfiles/sway/wallpapers/Macchiato-hald8-ign-0000.png.png similarity index 100% rename from dotfiles/nate/sway/wallpapers/Macchiato-hald8-ign-0000.png.png rename to nate/dotfiles/sway/wallpapers/Macchiato-hald8-ign-0000.png.png diff --git a/dotfiles/nate/sway/wallpapers/Macchiato-hald8-ign_astronaut.png.png b/nate/dotfiles/sway/wallpapers/Macchiato-hald8-ign_astronaut.png.png similarity index 100% rename from dotfiles/nate/sway/wallpapers/Macchiato-hald8-ign_astronaut.png.png rename to nate/dotfiles/sway/wallpapers/Macchiato-hald8-ign_astronaut.png.png diff --git a/dotfiles/nate/sway/wallpapers/Macchiato-hald8-ign_black.jpg.jpg b/nate/dotfiles/sway/wallpapers/Macchiato-hald8-ign_black.jpg.jpg similarity index 100% rename from dotfiles/nate/sway/wallpapers/Macchiato-hald8-ign_black.jpg.jpg rename to nate/dotfiles/sway/wallpapers/Macchiato-hald8-ign_black.jpg.jpg diff --git a/dotfiles/nate/sway/wallpapers/Macchiato-hald8-ign_vaporWave.png.png b/nate/dotfiles/sway/wallpapers/Macchiato-hald8-ign_vaporWave.png.png similarity index 100% rename from dotfiles/nate/sway/wallpapers/Macchiato-hald8-ign_vaporWave.png.png rename to nate/dotfiles/sway/wallpapers/Macchiato-hald8-ign_vaporWave.png.png diff --git a/dotfiles/nate/sway/wallpapers/Macchiato-hald8-waves.jpg.jpg b/nate/dotfiles/sway/wallpapers/Macchiato-hald8-waves.jpg.jpg similarity index 100% rename from dotfiles/nate/sway/wallpapers/Macchiato-hald8-waves.jpg.jpg rename to nate/dotfiles/sway/wallpapers/Macchiato-hald8-waves.jpg.jpg diff --git a/dotfiles/nate/waybar/config b/nate/dotfiles/waybar/config similarity index 100% rename from dotfiles/nate/waybar/config rename to nate/dotfiles/waybar/config diff --git a/dotfiles/nate/waybar/scripts/PBPbattery.sh b/nate/dotfiles/waybar/scripts/PBPbattery.sh similarity index 100% rename from dotfiles/nate/waybar/scripts/PBPbattery.sh rename to nate/dotfiles/waybar/scripts/PBPbattery.sh diff --git a/dotfiles/nate/waybar/scripts/keyboard_layout.sh b/nate/dotfiles/waybar/scripts/keyboard_layout.sh similarity index 100% rename from dotfiles/nate/waybar/scripts/keyboard_layout.sh rename to nate/dotfiles/waybar/scripts/keyboard_layout.sh diff --git a/dotfiles/nate/waybar/scripts/keyhint.sh b/nate/dotfiles/waybar/scripts/keyhint.sh similarity index 100% rename from dotfiles/nate/waybar/scripts/keyhint.sh rename to nate/dotfiles/waybar/scripts/keyhint.sh diff --git a/dotfiles/nate/waybar/scripts/power-menu.sh b/nate/dotfiles/waybar/scripts/power-menu.sh similarity index 100% rename from dotfiles/nate/waybar/scripts/power-menu.sh rename to nate/dotfiles/waybar/scripts/power-menu.sh diff --git a/dotfiles/nate/waybar/scripts/weather.sh b/nate/dotfiles/waybar/scripts/weather.sh similarity index 100% rename from dotfiles/nate/waybar/scripts/weather.sh rename to nate/dotfiles/waybar/scripts/weather.sh diff --git a/dotfiles/nate/waybar/style.css b/nate/dotfiles/waybar/style.css similarity index 100% rename from dotfiles/nate/waybar/style.css rename to nate/dotfiles/waybar/style.css diff --git a/dotfiles/nate/wofi/config b/nate/dotfiles/wofi/config similarity index 100% rename from dotfiles/nate/wofi/config rename to nate/dotfiles/wofi/config diff --git a/dotfiles/nate/wofi/config.power b/nate/dotfiles/wofi/config.power similarity index 100% rename from dotfiles/nate/wofi/config.power rename to nate/dotfiles/wofi/config.power diff --git a/dotfiles/nate/wofi/config.screenshot b/nate/dotfiles/wofi/config.screenshot similarity index 100% rename from dotfiles/nate/wofi/config.screenshot rename to nate/dotfiles/wofi/config.screenshot diff --git a/dotfiles/nate/wofi/style.css b/nate/dotfiles/wofi/style.css similarity index 100% rename from dotfiles/nate/wofi/style.css rename to nate/dotfiles/wofi/style.css diff --git a/dotfiles/nate/wofi/style.widgets.css b/nate/dotfiles/wofi/style.widgets.css similarity index 100% rename from dotfiles/nate/wofi/style.widgets.css rename to nate/dotfiles/wofi/style.widgets.css diff --git a/dotfiles/nate/wofi/windows.py b/nate/dotfiles/wofi/windows.py similarity index 100% rename from dotfiles/nate/wofi/windows.py rename to nate/dotfiles/wofi/windows.py diff --git a/modules/apps/firefox/firefox.nix b/nate/modules/apps/firefox/firefox.nix similarity index 100% rename from modules/apps/firefox/firefox.nix rename to nate/modules/apps/firefox/firefox.nix diff --git a/modules/home-manager/home.nix b/nate/modules/home-manager/home.nix similarity index 93% rename from modules/home-manager/home.nix rename to nate/modules/home-manager/home.nix index 9537e71..f2761ad 100644 --- a/modules/home-manager/home.nix +++ b/nate/modules/home-manager/home.nix @@ -1,4 +1,9 @@ -{ inputs, outputs, lib, config, pkgs, userName, fullName, email, hostName, desktop, gaming, ... }: +{ inputs, outputs, lib, config, pkgs, ... }: + let + userName = "nate"; + fullName = "Nathan Anderson"; + email = "n8r@tuta.io"; + in { # nixpkgs.overlays = [ # inputs.nur.overlay @@ -62,6 +67,7 @@ # Better Unix # bat + broot # tree alternative duf fd fzf @@ -101,10 +107,6 @@ # '') ]; - # TODO not working firefox plugins - # extensions = with inputs.firefox-addons.packages.${pkgs.system}; [ ublock-origin bitwarden ]; - - # Home Manager is pretty good at managing dotfiles. The primary way to manage # plain files is through 'home.file'. home.file."${config.xdg.configHome}" = { @@ -112,7 +114,7 @@ # # the Nix store. Activating the configuration will then make '~/.screenrc' a # # symlink to the Nix store copy. # ".screenrc".source = dotfiles/screenrc; - source = ../../nate/dotfiles; + source = ../../dotfiles; recursive = true; # # You can also set the file content immediately. diff --git a/modules/sway/sway_conf.nix b/nate/modules/sway/sway_conf.nix similarity index 100% rename from modules/sway/sway_conf.nix rename to nate/modules/sway/sway_conf.nix diff --git a/modules/user/main_user.nix b/nate/modules/user/main_user.nix similarity index 100% rename from modules/user/main_user.nix rename to nate/modules/user/main_user.nix diff --git a/nixos/nate/hardware-configuration.nix b/nate/nixos/hardware-configuration.nix similarity index 100% rename from nixos/nate/hardware-configuration.nix rename to nate/nixos/hardware-configuration.nix diff --git a/nixos/default.nix b/nixos/default.nix deleted file mode 100644 index 0d14abd..0000000 --- a/nixos/default.nix +++ /dev/null @@ -1,27 +0,0 @@ - -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ config, lib, pkgs, userName, hostName, ... }: - -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ./sway_configuration.nix - # ../modules/user/main_user.nix - # ../modules/sway/sway_conf.nix - ]; - - # Enable flakes feature - nix.settings.experimental-features = [ - "nix-command" "flakes" - ]; - - programs.nix-ld.enable = true; - - - system.stateVersion = "23.11"; # Did you read the comment? -} - diff --git a/nixos/desktop_configuration.nix b/nixos/desktop_configuration.nix deleted file mode 100644 index 57ed600..0000000 --- a/nixos/desktop_configuration.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ config, lib, inputs, outputs, pkgs, userName, hostName, desktop, timeZone, gaming, system, ... }: - -let - supportedDesktops = [ "sway" "kde" ]; - supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops; -in -{ - assertions = [ - { - assertion = builtins.elem desktop supportedDesktops; - message = "Unsupported desktop environment: ${desktop}\nSupported DE's: ${supportedDesktopsStr}"; - } - ]; - - nixpkgs.overlays = [ - inputs.nur.overlay - ]; - - imports = [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ../modules/user/main_user.nix - ../modules/sway/sway_conf.nix - # inputs.nur.hmModules.nur - ]; - - # Enable flakes feature - nix.settings.experimental-features = [ - "nix-command" "flakes" - ]; - - # programs.nix-ld.dev.enable = true; - - # nixpkgs.config.allowUnfree = true; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - networking.hostName = hostName; # Define your hostname. - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - - time.timeZone = timeZone; - - main_user = { - enable = true; - userName = userName; - isDesktopUser = true; - }; - - swaywm = { - enable = desktop == "sway"; - useNonFree = true; - installGaming = gaming; - systemPackages = with pkgs; [ - libreoffice - ]; - }; - - system.stateVersion = "23.11"; # Did you read the comment? -} - diff --git a/nixos/server_configuration.nix b/nixos/server_configuration.nix deleted file mode 100644 index 1769fa8..0000000 --- a/nixos/server_configuration.nix +++ /dev/null @@ -1,141 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ config, lib, pkgs, inputs, ... }: - -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ./modules/user/main_user.nix - inputs.home-manager.nixosModules.default - ]; - - # Enable flakes feature - nix.settings.experimental-features = [ - "nix-command" "flakes" - ]; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # networking.hostName = "nixos"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - - # Set your time zone. - time.timeZone = "America/Denver"; - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # useXkbConfig = true; # use xkb.options in tty. - # }; - - # Enable the X11 windowing system. - # services.xserver.enable = true; - - - - - # Configure keymap in X11 - # services.xserver.xkb.layout = "us"; - # services.xserver.xkb.options = "eurosign:e,caps:escape"; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable sound. - # sound.enable = true; - # hardware.pulseaudio.enable = true; - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - # users.users.nate = { - # initialPassword = "password"; - # extraGroups = [ "wheel" ]; - # isNormalUser = true; - # }; - - # Use main user module - main_user.enable = true; - main_user.userName = "natea"; - - # Sets up programs in /etc/profile instead of ~/.profile - home-manager.useUserPackages = true; - # Uses system nixpkgs instead of private, adds consistency and removes NIX_PATH dependency - home-manager.useGlobalPkgs = true; - - home-manager.users.nate = { pkgs, ... }: { - programs.bash.enable = true; - home.packages = with pkgs; [ - firefox - kakoune - curl - ]; - - home.stateVersion = "23.11"; - }; - - # List packages installed in system profile. To search, run: - # $ nix search wget - # environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget - # ]; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; - - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "23.11"; # Did you read the comment? - -} -