diff --git a/flake.nix b/flake.nix index 9363141..741e9bb 100644 --- a/flake.nix +++ b/flake.nix @@ -29,18 +29,28 @@ rootPath = ./.; in { - nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs rootPath; }; - modules = [ - ./hosts/nixos/configuration.nix - ]; + nixosConfigurations = { + nixos = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs rootPath; }; + modules = [ ./hosts/nixos/configuration.nix ]; + }; + wsl = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs rootPath; }; + modules = [ ./hosts/wsl/configuration.nix ]; + }; }; - homeConfigurations."toast@nixos" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = { inherit inputs rootPath; }; - modules = [ - ./home/toast/home.nix - ]; + + homeConfigurations = { + "toast@nixos" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { inherit inputs rootPath; }; + modules = [ ./home/hosts/nixos.nix ]; + }; + "toast@wsl" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { inherit inputs rootPath; }; + modules = [ ./home/hosts/wsl.nix ]; + }; }; packages.x86_64-linux.default = self.homeConfigurations."toast@nixos".activationPackage; diff --git a/home/hosts/nixos.nix b/home/hosts/nixos.nix new file mode 100644 index 0000000..25d3153 --- /dev/null +++ b/home/hosts/nixos.nix @@ -0,0 +1,26 @@ +{ config, pkgs, inputs, ... }: +{ + imports = [ + inputs.nixvim.homeManagerModules.nixvim + inputs.nixcord.homeModules.nixcord + inputs.nix-flatpak.homeManagerModules.nix-flatpak + inputs.sops-nix.homeManagerModules.sops + ] ++ ( + let + modulesPath = ../modules; + cliModules = builtins.attrNames (builtins.readDir ( modulesPath + "/cli" )); + graphicalModules = builtins.attrNames (builtins.readDir ( modulesPath + "/graphical" )); + in + map (module: modulesPath + "/cli/${module}") cliModules + ++ map (module: modulesPath + "/graphical/${module}") graphicalModules + ); + + home = { + username = "toast"; + homeDirectory = "/home/toast"; + stateVersion = "24.11"; + }; + + nixpkgs.config.allowUnfree = true; + systemd.user.startServices = "sd-switch"; +} diff --git a/home/toast/home.nix b/home/hosts/wsl.nix similarity index 71% rename from home/toast/home.nix rename to home/hosts/wsl.nix index 9fb4c5f..c3271da 100644 --- a/home/toast/home.nix +++ b/home/hosts/wsl.nix @@ -1,4 +1,5 @@ { config, pkgs, inputs, ... }: + { imports = [ inputs.nixvim.homeManagerModules.nixvim @@ -7,10 +8,10 @@ inputs.sops-nix.homeManagerModules.sops ] ++ ( let - modulesPath = ./modules; - moduleFiles = builtins.attrNames (builtins.readDir modulesPath); + modulesPath = ../modules; + cliModules = builtins.attrNames (builtins.readDir (modulesPath + "/cli/")); in - map (module: modulesPath + ("/" + module)) moduleFiles + map (module: modulesPath + "/cli/${module}") cliModules ); home = { diff --git a/home/toast/modules/gemini-cli.nix b/home/modules/cli/gemini.nix similarity index 100% rename from home/toast/modules/gemini-cli.nix rename to home/modules/cli/gemini.nix diff --git a/home/toast/modules/git.nix b/home/modules/cli/git.nix similarity index 100% rename from home/toast/modules/git.nix rename to home/modules/cli/git.nix diff --git a/home/toast/modules/nixvim/default.nix b/home/modules/cli/nixvim/default.nix similarity index 100% rename from home/toast/modules/nixvim/default.nix rename to home/modules/cli/nixvim/default.nix diff --git a/home/toast/modules/nixvim/keymaps.nix b/home/modules/cli/nixvim/keymaps.nix similarity index 100% rename from home/toast/modules/nixvim/keymaps.nix rename to home/modules/cli/nixvim/keymaps.nix diff --git a/home/toast/modules/nixvim/plugins/bufferline.nix b/home/modules/cli/nixvim/plugins/bufferline.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/bufferline.nix rename to home/modules/cli/nixvim/plugins/bufferline.nix diff --git a/home/toast/modules/nixvim/plugins/cmp.nix b/home/modules/cli/nixvim/plugins/cmp.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/cmp.nix rename to home/modules/cli/nixvim/plugins/cmp.nix diff --git a/home/toast/modules/nixvim/plugins/colorizer.nix b/home/modules/cli/nixvim/plugins/colorizer.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/colorizer.nix rename to home/modules/cli/nixvim/plugins/colorizer.nix diff --git a/home/toast/modules/nixvim/plugins/comment.nix b/home/modules/cli/nixvim/plugins/comment.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/comment.nix rename to home/modules/cli/nixvim/plugins/comment.nix diff --git a/home/toast/modules/nixvim/plugins/gitsigns.nix b/home/modules/cli/nixvim/plugins/gitsigns.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/gitsigns.nix rename to home/modules/cli/nixvim/plugins/gitsigns.nix diff --git a/home/toast/modules/nixvim/plugins/lsp.nix b/home/modules/cli/nixvim/plugins/lsp.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/lsp.nix rename to home/modules/cli/nixvim/plugins/lsp.nix diff --git a/home/toast/modules/nixvim/plugins/lualine.nix b/home/modules/cli/nixvim/plugins/lualine.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/lualine.nix rename to home/modules/cli/nixvim/plugins/lualine.nix diff --git a/home/toast/modules/nixvim/plugins/nvim-autopairs.nix b/home/modules/cli/nixvim/plugins/nvim-autopairs.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/nvim-autopairs.nix rename to home/modules/cli/nixvim/plugins/nvim-autopairs.nix diff --git a/home/toast/modules/nixvim/plugins/nvim-tree.nix b/home/modules/cli/nixvim/plugins/nvim-tree.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/nvim-tree.nix rename to home/modules/cli/nixvim/plugins/nvim-tree.nix diff --git a/home/toast/modules/nixvim/plugins/telescope.nix b/home/modules/cli/nixvim/plugins/telescope.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/telescope.nix rename to home/modules/cli/nixvim/plugins/telescope.nix diff --git a/home/toast/modules/nixvim/plugins/treesitter.nix b/home/modules/cli/nixvim/plugins/treesitter.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/treesitter.nix rename to home/modules/cli/nixvim/plugins/treesitter.nix diff --git a/home/toast/modules/nixvim/plugins/wakatime.nix b/home/modules/cli/nixvim/plugins/wakatime.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/wakatime.nix rename to home/modules/cli/nixvim/plugins/wakatime.nix diff --git a/home/toast/modules/nixvim/plugins/web-devicons.nix b/home/modules/cli/nixvim/plugins/web-devicons.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/web-devicons.nix rename to home/modules/cli/nixvim/plugins/web-devicons.nix diff --git a/home/toast/modules/nixvim/plugins/which-key.nix b/home/modules/cli/nixvim/plugins/which-key.nix similarity index 100% rename from home/toast/modules/nixvim/plugins/which-key.nix rename to home/modules/cli/nixvim/plugins/which-key.nix diff --git a/home/toast/modules/sops.nix b/home/modules/cli/sops.nix similarity index 100% rename from home/toast/modules/sops.nix rename to home/modules/cli/sops.nix diff --git a/home/toast/modules/xdg.nix b/home/modules/cli/xdg.nix similarity index 100% rename from home/toast/modules/xdg.nix rename to home/modules/cli/xdg.nix diff --git a/home/toast/modules/yazi.nix b/home/modules/cli/yazi.nix similarity index 100% rename from home/toast/modules/yazi.nix rename to home/modules/cli/yazi.nix diff --git a/home/toast/modules/zsh.nix b/home/modules/cli/zsh.nix similarity index 100% rename from home/toast/modules/zsh.nix rename to home/modules/cli/zsh.nix diff --git a/home/toast/modules/btop.nix b/home/modules/graphical/btop.nix similarity index 100% rename from home/toast/modules/btop.nix rename to home/modules/graphical/btop.nix diff --git a/home/toast/modules/dunst.nix b/home/modules/graphical/dunst.nix similarity index 100% rename from home/toast/modules/dunst.nix rename to home/modules/graphical/dunst.nix diff --git a/home/toast/modules/firefox.nix b/home/modules/graphical/firefox.nix similarity index 100% rename from home/toast/modules/firefox.nix rename to home/modules/graphical/firefox.nix diff --git a/home/toast/modules/fonts.nix b/home/modules/graphical/fonts.nix similarity index 100% rename from home/toast/modules/fonts.nix rename to home/modules/graphical/fonts.nix diff --git a/home/toast/modules/hypridle.nix b/home/modules/graphical/hypridle.nix similarity index 100% rename from home/toast/modules/hypridle.nix rename to home/modules/graphical/hypridle.nix diff --git a/home/toast/modules/hyprland.nix b/home/modules/graphical/hyprland.nix similarity index 100% rename from home/toast/modules/hyprland.nix rename to home/modules/graphical/hyprland.nix diff --git a/home/toast/modules/keepassxc.nix b/home/modules/graphical/keepassxc.nix similarity index 100% rename from home/toast/modules/keepassxc.nix rename to home/modules/graphical/keepassxc.nix diff --git a/home/toast/modules/kitty.nix b/home/modules/graphical/kitty.nix similarity index 100% rename from home/toast/modules/kitty.nix rename to home/modules/graphical/kitty.nix diff --git a/home/toast/modules/mouse-actions/actions/autoclick.nix b/home/modules/graphical/mouse-actions/actions/autoclick.nix similarity index 100% rename from home/toast/modules/mouse-actions/actions/autoclick.nix rename to home/modules/graphical/mouse-actions/actions/autoclick.nix diff --git a/home/toast/modules/mouse-actions/actions/deafen.nix b/home/modules/graphical/mouse-actions/actions/deafen.nix similarity index 100% rename from home/toast/modules/mouse-actions/actions/deafen.nix rename to home/modules/graphical/mouse-actions/actions/deafen.nix diff --git a/home/toast/modules/mouse-actions/actions/default.nix b/home/modules/graphical/mouse-actions/actions/default.nix similarity index 100% rename from home/toast/modules/mouse-actions/actions/default.nix rename to home/modules/graphical/mouse-actions/actions/default.nix diff --git a/home/toast/modules/mouse-actions/actions/sober-lag.nix b/home/modules/graphical/mouse-actions/actions/sober-lag.nix similarity index 100% rename from home/toast/modules/mouse-actions/actions/sober-lag.nix rename to home/modules/graphical/mouse-actions/actions/sober-lag.nix diff --git a/home/toast/modules/mouse-actions/cycle.nix b/home/modules/graphical/mouse-actions/cycle.nix similarity index 100% rename from home/toast/modules/mouse-actions/cycle.nix rename to home/modules/graphical/mouse-actions/cycle.nix diff --git a/home/toast/modules/mouse-actions/default.nix b/home/modules/graphical/mouse-actions/default.nix similarity index 100% rename from home/toast/modules/mouse-actions/default.nix rename to home/modules/graphical/mouse-actions/default.nix diff --git a/home/toast/modules/mouse-actions/run.nix b/home/modules/graphical/mouse-actions/run.nix similarity index 100% rename from home/toast/modules/mouse-actions/run.nix rename to home/modules/graphical/mouse-actions/run.nix diff --git a/home/toast/modules/nixcord.nix b/home/modules/graphical/nixcord.nix similarity index 100% rename from home/toast/modules/nixcord.nix rename to home/modules/graphical/nixcord.nix diff --git a/home/toast/modules/obsidian.nix b/home/modules/graphical/obsidian.nix similarity index 100% rename from home/toast/modules/obsidian.nix rename to home/modules/graphical/obsidian.nix diff --git a/home/toast/modules/powermenu.nix b/home/modules/graphical/powermenu.nix similarity index 100% rename from home/toast/modules/powermenu.nix rename to home/modules/graphical/powermenu.nix diff --git a/home/toast/modules/prismlauncher.nix b/home/modules/graphical/prismlauncher.nix similarity index 100% rename from home/toast/modules/prismlauncher.nix rename to home/modules/graphical/prismlauncher.nix diff --git a/home/toast/modules/tofi.nix b/home/modules/graphical/tofi.nix similarity index 100% rename from home/toast/modules/tofi.nix rename to home/modules/graphical/tofi.nix diff --git a/home/toast/modules/waybar/default.nix b/home/modules/graphical/waybar/default.nix similarity index 100% rename from home/toast/modules/waybar/default.nix rename to home/modules/graphical/waybar/default.nix diff --git a/home/toast/modules/waybar/style.css b/home/modules/graphical/waybar/style.css similarity index 100% rename from home/toast/modules/waybar/style.css rename to home/modules/graphical/waybar/style.css