Add multiple hosts & restructure things
This commit is contained in:
		
							
								
								
									
										12
									
								
								common/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								common/default.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | { config, lib, helpers, ... }: | ||||||
|  |  | ||||||
|  | { | ||||||
|  |   options.custom = { | ||||||
|  |     modules = lib.mkOption { | ||||||
|  |       type = lib.types.listOf lib.types.path; | ||||||
|  |       default = []; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   imports = (helpers.getModules "/default.nix" config.custom.modules); | ||||||
|  | } | ||||||
							
								
								
									
										25
									
								
								common/helpers.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								common/helpers.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | |||||||
|  | { lib, ... }: { | ||||||
|  |   getModules = (filename: modules: | ||||||
|  |     (builtins.filter | ||||||
|  |       (path: builtins.pathExists path) | ||||||
|  |       # (builtins.map | ||||||
|  |       #   (dirname: ./. + ("/" + dirname) + filename) | ||||||
|  |       #   (lib.attrsets.filterAttrs | ||||||
|  |       #     (entry: entry == "directory") | ||||||
|  |       #     (builtins.readDir ../modules) | ||||||
|  |       #   ) | ||||||
|  |       # ) | ||||||
|  |       (builtins.map | ||||||
|  |         (path: path + filename) | ||||||
|  |         modules | ||||||
|  |       ) | ||||||
|  |     ) | ||||||
|  |   ); | ||||||
|  |  | ||||||
|  |   filterModules = (modules: | ||||||
|  |     (builtins.filter | ||||||
|  |       (path: builtins.pathExists path) | ||||||
|  |       modules | ||||||
|  |     ) | ||||||
|  |   ); | ||||||
|  | } | ||||||
							
								
								
									
										70
									
								
								common/home.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								common/home.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,70 @@ | |||||||
|  | { pkgs, config, lib, helpers, ... }: | ||||||
|  |  | ||||||
|  | { | ||||||
|  |   options.custom = { | ||||||
|  |     username = lib.mkOption { | ||||||
|  |       type = lib.types.str; | ||||||
|  |       default = "dakedres"; | ||||||
|  |     }; | ||||||
|  |  | ||||||
|  |     nonFreePackages = lib.mkOption { | ||||||
|  |       type = lib.types.listOf lib.types.str; | ||||||
|  |       default = []; | ||||||
|  |     }; | ||||||
|  |  | ||||||
|  |     wallpaper = lib.mkOption { | ||||||
|  |       type = lib.types.path; | ||||||
|  |     }; | ||||||
|  |  | ||||||
|  |     colors = | ||||||
|  |     let | ||||||
|  |       colorOption = lib.mkOption { | ||||||
|  |         type = lib.types.str; | ||||||
|  |         default = "#000000"; | ||||||
|  |       }; | ||||||
|  |     in | ||||||
|  |     { | ||||||
|  |       base00 = colorOption; | ||||||
|  |       base01 = colorOption; | ||||||
|  |       base02 = colorOption; | ||||||
|  |       base03 = colorOption; | ||||||
|  |       base04 = colorOption; | ||||||
|  |       base05 = colorOption; | ||||||
|  |       base06 = colorOption; | ||||||
|  |       base07 = colorOption; | ||||||
|  |       base08 = colorOption; | ||||||
|  |       base09 = colorOption; | ||||||
|  |       base0A = colorOption; | ||||||
|  |       base0B = colorOption; | ||||||
|  |       base0C = colorOption; | ||||||
|  |       base0D = colorOption; | ||||||
|  |       base0E = colorOption; | ||||||
|  |       base0F = colorOption; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   config = | ||||||
|  |   let | ||||||
|  |     username = config.custom.username; | ||||||
|  |     nonFreePackages = config.custom.nonFreePackages; | ||||||
|  |   in | ||||||
|  |   { | ||||||
|  |     home = { | ||||||
|  |       username = username; | ||||||
|  |       homeDirectory = "/home/${username}"; | ||||||
|  |     }; | ||||||
|  |  | ||||||
|  |     # Unfree packages | ||||||
|  |     nixpkgs.config.allowUnfreePredicate = pkg: | ||||||
|  |       builtins.elem (lib.getName pkg) nonFreePackages; | ||||||
|  |  | ||||||
|  |     home.packages = | ||||||
|  |       map (name: pkgs.${name}) nonFreePackages; | ||||||
|  |  | ||||||
|  |     # Take over my xsession | ||||||
|  |     xsession.enable = true; | ||||||
|  |  | ||||||
|  |     # Let Home Manager install and manage itself. | ||||||
|  |     programs.home-manager.enable = true; | ||||||
|  |   }; | ||||||
|  | } | ||||||
							
								
								
									
										3
									
								
								common/homeOptions.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								common/homeOptions.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | { lib, ... }: { | ||||||
|  |    | ||||||
|  | } | ||||||
							
								
								
									
										24
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								flake.nix
									
									
									
									
									
								
							| @@ -19,15 +19,29 @@ | |||||||
|     let |     let | ||||||
|       system = "x86_64-linux"; |       system = "x86_64-linux"; | ||||||
|       pkgs = nixpkgs.legacyPackages.${system}; |       pkgs = nixpkgs.legacyPackages.${system}; | ||||||
|  |       specialArgs = { | ||||||
|  |         inherit system; | ||||||
|  |         helpers = import ./common/helpers.nix { | ||||||
|  |           inherit inputs; | ||||||
|  |           lib = nixpkgs.lib; | ||||||
|  |         }; | ||||||
|  |       }; | ||||||
|     in |     in | ||||||
|     {     |     {     | ||||||
|  |       nixpkgs.hostPlatform = "x86_64-linux"; | ||||||
|         |         | ||||||
|       nixosConfigurations.default = nixpkgs.lib.nixosSystem { |       nixosConfigurations.vulpes = nixpkgs.lib.nixosSystem { | ||||||
|           specialArgs = { |           inherit specialArgs; | ||||||
|             inherit inputs; |  | ||||||
|           }; |  | ||||||
|           modules = [  |           modules = [  | ||||||
|             ./host/configuration.nix |             ./hosts/vulpes/configuration.nix | ||||||
|  |             inputs.home-manager.nixosModules.default | ||||||
|  |           ]; | ||||||
|  |         }; | ||||||
|  |  | ||||||
|  |       nixosConfigurations.vinegar = nixpkgs.lib.nixosSystem { | ||||||
|  |           inherit specialArgs; | ||||||
|  |           modules = [  | ||||||
|  |             ./hosts/vinegar/configuration.nix | ||||||
|             inputs.home-manager.nixosModules.default |             inputs.home-manager.nixosModules.default | ||||||
|           ]; |           ]; | ||||||
|         }; |         }; | ||||||
|   | |||||||
							
								
								
									
										103
									
								
								home/default.nix
									
									
									
									
									
								
							
							
						
						
									
										103
									
								
								home/default.nix
									
									
									
									
									
								
							| @@ -1,103 +0,0 @@ | |||||||
| { config, pkgs, inputs, ... }: |  | ||||||
|  |  | ||||||
| { |  | ||||||
|   # Home Manager needs a bit of information about you and the paths it should |  | ||||||
|   # manage. |  | ||||||
|   home.username = "dakedres"; |  | ||||||
|   home.homeDirectory = "/home/dakedres"; |  | ||||||
|  |  | ||||||
|   # This value determines the Home Manager release that your configuration is |  | ||||||
|   # compatible with. This helps avoid breakage when a new Home Manager release |  | ||||||
|   # introduces backwards incompatible changes. |  | ||||||
|   # |  | ||||||
|   # You should not change this value, even if you update Home Manager. If you do |  | ||||||
|   # want to update the value, then make sure to first check the Home Manager |  | ||||||
|   # release notes. |  | ||||||
|   home.stateVersion = "23.11"; # Please read the comment before changing. |  | ||||||
|  |  | ||||||
|   nixpkgs.config.allowUnfree = true; |  | ||||||
|   # The home.packages option allows you to install Nix packages into your |  | ||||||
|   # environment. |  | ||||||
|   home.packages = with pkgs; [ |  | ||||||
|     # # It is sometimes useful to fine-tune packages, for example, by applying |  | ||||||
|     # # overrides. You can do that directly here, just don't forget the |  | ||||||
|     # # parentheses. Maybe you want to install Nerd Fonts with a limited number of |  | ||||||
|     # # fonts? |  | ||||||
|     # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) |  | ||||||
|  |  | ||||||
|     # # You can also create simple shell scripts directly inside your |  | ||||||
|     # # configuration. For example, this adds a command 'my-hello' to your |  | ||||||
|     # # environment: |  | ||||||
|     # (pkgs.writeShellScriptBin "my-hello" '' |  | ||||||
|     #   echo "Hello, ${config.home.username}!" |  | ||||||
|     # '') |  | ||||||
|      |  | ||||||
|     # Util |  | ||||||
|     neofetch |  | ||||||
|     bitwarden |  | ||||||
|     qutebrowser |  | ||||||
|     discord |  | ||||||
|  |  | ||||||
|     # Visual |  | ||||||
|     imagemagick |  | ||||||
| 	kate |  | ||||||
|  |  | ||||||
|     # Audio |  | ||||||
|     ncspot |  | ||||||
|      |  | ||||||
|     # Environment |  | ||||||
|     fishPlugins.grc |  | ||||||
|   ]; |  | ||||||
|  |  | ||||||
|   # Home Manager is pretty good at managing dotfiles. The primary way to manage |  | ||||||
|   # plain files is through 'home.file'. |  | ||||||
|   home.file = { |  | ||||||
|     # # Building this configuration will create a copy of 'dotfiles/screenrc' in |  | ||||||
|     # # the Nix store. Activating the configuration will then make '~/.screenrc' a |  | ||||||
|     # # symlink to the Nix store copy. |  | ||||||
|     # ".screenrc".source = dotfiles/screenrc; |  | ||||||
|  |  | ||||||
|     # # You can also set the file content immediately. |  | ||||||
|     # ".gradle/gradle.properties".text = '' |  | ||||||
|     #   org.gradle.console=verbose |  | ||||||
|     #   org.gradle.daemon.idletimeout=3600000 |  | ||||||
|     # ''; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   # Home Manager can also manage your environment variables through |  | ||||||
|   # 'home.sessionVariables'. If you don't want to manage your shell through Home |  | ||||||
|   # Manager then you have to manually source 'hm-session-vars.sh' located at |  | ||||||
|   # either |  | ||||||
|   # |  | ||||||
|   #  ~/.nix-profile/etc/profile.d/hm-session-vars.sh |  | ||||||
|   # |  | ||||||
|   # or |  | ||||||
|   # |  | ||||||
|   #  ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh |  | ||||||
|   # |  | ||||||
|   # or |  | ||||||
|   # |  | ||||||
|   #  /etc/profiles/per-user/dakedres/etc/profile.d/hm-session-vars.sh |  | ||||||
|   # |  | ||||||
|   home.sessionVariables = { |  | ||||||
|     # EDITOR = "emacs"; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   programs.fish = { |  | ||||||
|     enable = true; |  | ||||||
|     interactiveShellInit = '' |  | ||||||
|       set fish_greeting  # Disable greeting |  | ||||||
|     ''; |  | ||||||
|     shellAliases = { |  | ||||||
|       ll = "ls -lh"; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   programs.kitty = { |  | ||||||
|   	enable = true; |  | ||||||
|   	shellIntegration.enableFishIntegration = true; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   # Let Home Manager install and manage itself. |  | ||||||
|   programs.home-manager.enable = true; |  | ||||||
| } |  | ||||||
| @@ -1,7 +0,0 @@ | |||||||
| { config, pkgs, inputs, ... }: |  | ||||||
|  |  | ||||||
| { |  | ||||||
|   homeManager.home.file = { |  | ||||||
|     "testFile".text = "test"; |  | ||||||
|   }; |  | ||||||
| } |  | ||||||
							
								
								
									
										112
									
								
								host/home.nix
									
									
									
									
									
								
							
							
						
						
									
										112
									
								
								host/home.nix
									
									
									
									
									
								
							| @@ -1,112 +0,0 @@ | |||||||
| { pkgs, lib, ... }: |  | ||||||
|  |  | ||||||
| let |  | ||||||
|  |  | ||||||
| terminal = "kitty"; |  | ||||||
| #   newm = inputs.newmpkgs.packages.${system}.newm-atha; |  | ||||||
|  |  | ||||||
| packages = [ |  | ||||||
|   # Utility |  | ||||||
|   pkgs.bitwarden |  | ||||||
|   pkgs.vimiv-qt |  | ||||||
|  |  | ||||||
|   # Visual |  | ||||||
|   pkgs.imagemagick |  | ||||||
|   pkgs.kate |  | ||||||
|  |  | ||||||
|     #Games |  | ||||||
|     pkgs.prismlauncher-qt5 |  | ||||||
|  |  | ||||||
|   # Env |  | ||||||
|   pkgs.eww-wayland |  | ||||||
|   pkgs.socat |  | ||||||
|   pkgs.jq |  | ||||||
| ]; |  | ||||||
|  |  | ||||||
| nonFreePackages = [ |  | ||||||
|   "discord" |  | ||||||
| ]; |  | ||||||
|  |  | ||||||
| in { |  | ||||||
|   imports = [ ../colors/monokai-dark ]; |  | ||||||
|   custom.wallpaper = ../wallpapers/blip-blip-blip-blip.jpg; |  | ||||||
|  |  | ||||||
|   home = { |  | ||||||
|     sessionVariables = { |  | ||||||
|       EDITOR = "kate"; |  | ||||||
|       BROWSER = "qutebrowser"; |  | ||||||
|       TERMINAL = "kitty"; |  | ||||||
|       TERM = "kitty"; |  | ||||||
|       FILEMANAGER = "kitty lf"; |  | ||||||
|  |  | ||||||
| 	  # Tell Electron apps it's wayland |  | ||||||
|       NIXOS_OZONE_WL = 1; |  | ||||||
|     }; |  | ||||||
|  |  | ||||||
|     sessionPath = [ |  | ||||||
|       "$HOME/.local/bin" |  | ||||||
|     ]; |  | ||||||
|  |  | ||||||
|     stateVersion = "23.11"; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   # Add packages |  | ||||||
|   nixpkgs.config.allowUnfreePredicate = pkg: |  | ||||||
|     builtins.elem (lib.getName pkg) nonFreePackages; |  | ||||||
|  |  | ||||||
|   home.packages = |  | ||||||
|     map (name: pkgs.${name}) nonFreePackages |  | ||||||
|     ++ packages; |  | ||||||
|  |  | ||||||
|   xdg.mimeApps = { |  | ||||||
|     enable = true; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   # Directories |  | ||||||
|   xdg.userDirs = { |  | ||||||
|     createDirectories = false; |  | ||||||
|     download = "$HOME/downloads"; |  | ||||||
|     music = "$HOME/music"; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   # Openers |  | ||||||
|   xdg.mimeApps.defaultApplications = { |  | ||||||
|   	"inode/directory" = [ |  | ||||||
|   	  # "lf.desktop" |  | ||||||
|       "kitty-open.desktop" |  | ||||||
|   	]; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   # Standard programs |  | ||||||
|   programs.bat = { |  | ||||||
|     enable = true; |  | ||||||
|     config = { |  | ||||||
|       paging = "never"; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   # lf |  | ||||||
|   programs.lf = { |  | ||||||
| 	enable = true; |  | ||||||
| 	commands = { |  | ||||||
| 	  q = "quit"; # Why didn't they do this btw |  | ||||||
| 	}; |  | ||||||
| 	keybindings = { |  | ||||||
| 	  "<enter>" = "$$OPENER $f"; |  | ||||||
| 	}; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   xdg.desktopEntries.lf = { |  | ||||||
|     name = "LF"; |  | ||||||
|     genericName = "File browser"; |  | ||||||
|     exec = "lf %U"; |  | ||||||
|     terminal = true; |  | ||||||
|     mimeType = [ "inode/directory" ]; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   # Take over my xsession |  | ||||||
|   xsession.enable = true; |  | ||||||
|  |  | ||||||
|   # Let Home Manager install and manage itself. |  | ||||||
|   programs.home-manager.enable = true; |  | ||||||
| } |  | ||||||
| @@ -1,33 +0,0 @@ | |||||||
| { lib, ... }: { |  | ||||||
|   options.custom = { |  | ||||||
|     wallpaper = lib.mkOption { |  | ||||||
|       type = lib.types.path; |  | ||||||
|     }; |  | ||||||
|  |  | ||||||
|     colors = |  | ||||||
|     let |  | ||||||
|       colorOption = lib.mkOption { |  | ||||||
|         type = lib.types.str; |  | ||||||
|         default = "#000000"; |  | ||||||
|       }; |  | ||||||
|     in |  | ||||||
|     { |  | ||||||
|       base00 = colorOption; |  | ||||||
|       base01 = colorOption; |  | ||||||
|       base02 = colorOption; |  | ||||||
|       base03 = colorOption; |  | ||||||
|       base04 = colorOption; |  | ||||||
|       base05 = colorOption; |  | ||||||
|       base06 = colorOption; |  | ||||||
|       base07 = colorOption; |  | ||||||
|       base08 = colorOption; |  | ||||||
|       base09 = colorOption; |  | ||||||
|       base0A = colorOption; |  | ||||||
|       base0B = colorOption; |  | ||||||
|       base0C = colorOption; |  | ||||||
|       base0D = colorOption; |  | ||||||
|       base0E = colorOption; |  | ||||||
|       base0F = colorOption; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
| } |  | ||||||
| @@ -1,41 +0,0 @@ | |||||||
| { config, lib, inputs, ... }: |  | ||||||
|  |  | ||||||
| let |  | ||||||
|   modules = import ./modules.nix; |  | ||||||
|   username = config.custom.username; |  | ||||||
| in { |  | ||||||
|   options.custom = { |  | ||||||
|     username = lib.mkOption { |  | ||||||
|       type = lib.types.str; |  | ||||||
|       default = "dakedres"; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   config.home-manager.users."${username}" = { |  | ||||||
|     imports = |  | ||||||
|       (builtins.filter |  | ||||||
|         (path: builtins.pathExists path) |  | ||||||
|         (builtins.map |  | ||||||
|           (path: path + "/home.nix") |  | ||||||
|           modules |  | ||||||
|         ) |  | ||||||
|       ) ++ [ |  | ||||||
|         ./home.nix |  | ||||||
|         ./homeOptions.nix |  | ||||||
|       ]; |  | ||||||
|  |  | ||||||
|     config.home = { |  | ||||||
|       username = username; |  | ||||||
|       homeDirectory = "/home/${username}"; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   imports = |  | ||||||
|     (builtins.filter |  | ||||||
|       (path: builtins.pathExists path) |  | ||||||
|       (builtins.map |  | ||||||
|         (path: path + "/default.nix") |  | ||||||
|         modules |  | ||||||
|       ) |  | ||||||
|     ); |  | ||||||
| } |  | ||||||
							
								
								
									
										67
									
								
								hosts/vinegar/configuration.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								hosts/vinegar/configuration.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,67 @@ | |||||||
|  | # 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`). | ||||||
|  |  | ||||||
|  | # NixOS-WSL specific options are documented on the NixOS-WSL repository: | ||||||
|  | # https://github.com/nix-community/NixOS-WSL | ||||||
|  |  | ||||||
|  | args@{ config, lib, pkgs, helpers, ... }: | ||||||
|  |  | ||||||
|  | let  | ||||||
|  |   username = "nixos"; | ||||||
|  | in { | ||||||
|  |   imports = | ||||||
|  |   helpers.getModules "/default.nix" (import ./modules.nix) ++ [ | ||||||
|  |     # include NixOS-WSL modules | ||||||
|  |     <nixos-wsl/modules> | ||||||
|  |   ]; | ||||||
|  |  | ||||||
|  |   home-manager.users."${username}" = { | ||||||
|  |     imports = helpers.getModules "/home.nix" (import ./modules.nix) ++ [ | ||||||
|  |       ../../common/home.nix | ||||||
|  |       ./home.nix | ||||||
|  |     ]; | ||||||
|  |  | ||||||
|  |     config.custom.username = username; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   wsl = { | ||||||
|  |     enable = true; | ||||||
|  |     defaultUser  = username; | ||||||
|  |   }; | ||||||
|  |   nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||||||
|  |  | ||||||
|  |   services.xserver = { | ||||||
|  |     layout = "us"; | ||||||
|  |     xkb.options = "caps:swapescape,altwin:swap_alt_win"; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   services.xserver.enable = true; | ||||||
|  |   services.xserver.displayManager.sddm.enable = true; | ||||||
|  |   services.xserver.desktopManager.plasma5.enable = true; | ||||||
|  |  | ||||||
|  |   services.xrdp.enable = true; | ||||||
|  |   services.xrdp.defaultWindowManager = "dbus-run-session bspwm"; | ||||||
|  |   # services.xrdp.defaultWindowManager = "Hyprland"; | ||||||
|  |   services.xrdp.openFirewall = true; | ||||||
|  |   services.xrdp.port = 3390; | ||||||
|  |  | ||||||
|  |   environment.systemPackages = [ | ||||||
|  |     pkgs.vscodium | ||||||
|  |     pkgs.git | ||||||
|  |     pkgs.wget | ||||||
|  |     pkgs.micro | ||||||
|  |   ]; | ||||||
|  |  | ||||||
|  |   fonts.packages = [ | ||||||
|  |     pkgs.ubuntu_font_family | ||||||
|  |   ]; | ||||||
|  |  | ||||||
|  |   # This value determines the NixOS release from which the default | ||||||
|  |   # settings for stateful data, like file locations and database versions | ||||||
|  |   # on your system were taken. It's perfectly fine and recommended to leave | ||||||
|  |   # this value at the release version of the first install of this system. | ||||||
|  |   # Before changing this value read the documentation for this option | ||||||
|  |   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||||||
|  |   system.stateVersion = "23.11"; # Did you read the comment? | ||||||
|  | } | ||||||
							
								
								
									
										45
									
								
								hosts/vinegar/home.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								hosts/vinegar/home.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | |||||||
|  | { pkgs, helpers, ... }: | ||||||
|  |  | ||||||
|  | { | ||||||
|  |   imports = | ||||||
|  |     # helpers.getModules "/home.nix"  (import ./modules.nix) ++ | ||||||
|  |     [ | ||||||
|  |     ../../colors/monokai-dark | ||||||
|  |     ./start-session/home.nix | ||||||
|  |     ]; | ||||||
|  |   custom.wallpaper = ../../wallpapers/blip-blip-blip-blip.jpg; | ||||||
|  |  | ||||||
|  |   xsession.windowManager.bspwm.extraConfig = '' | ||||||
|  |   pgrep -x sxhkd > /dev/null || sxhkd & | ||||||
|  |   ''; | ||||||
|  |  | ||||||
|  |   home = { | ||||||
|  |     sessionVariables = { | ||||||
|  |       EDITOR = "codium"; | ||||||
|  |       BROWSER = "qutebrowser"; | ||||||
|  |       TERMINAL = "kitty"; | ||||||
|  |       TERM = "kitty"; | ||||||
|  |       FILEMANAGER = "kitty lf"; | ||||||
|  |  | ||||||
|  | 	    # Tell Electron apps it's wayland | ||||||
|  |       NIXOS_OZONE_WL = 1; | ||||||
|  |     }; | ||||||
|  |  | ||||||
|  |     sessionPath = [ | ||||||
|  |       "$HOME/.local/bin" | ||||||
|  |     ]; | ||||||
|  |  | ||||||
|  |     stateVersion = "23.11"; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   # Defaults | ||||||
|  |   xdg.mimeApps.enable = true; | ||||||
|  |   xdg.mimeApps.defaultApplications = { | ||||||
|  |   	"inode/directory" = [ | ||||||
|  |   	  # "lf.desktop" | ||||||
|  |       "kitty-open.desktop" | ||||||
|  |   	]; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										10
									
								
								hosts/vinegar/modules.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								hosts/vinegar/modules.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | |||||||
|  | [ | ||||||
|  |   ../../modules/fish | ||||||
|  |   ../../modules/kitty | ||||||
|  |   ../../modules/lf | ||||||
|  |  | ||||||
|  |   ../../modules/ncspot | ||||||
|  |  | ||||||
|  |   ../../modules/bspwm | ||||||
|  |   ../../modules/qutebrowser | ||||||
|  | ] | ||||||
							
								
								
									
										6
									
								
								hosts/vinegar/start-session.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								hosts/vinegar/start-session.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | { pkgs, ... }: | ||||||
|  |  | ||||||
|  | { | ||||||
|  |   home.file.".local/bin/qutesearch".source = ./start-session | ||||||
|  |   environment.systemPackages = [ startSession ]; | ||||||
|  | } | ||||||
							
								
								
									
										12
									
								
								hosts/vinegar/start-session/home.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								hosts/vinegar/start-session/home.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | { pkgs, ... }: { | ||||||
|  |   home.file.".local/bin/start-session" = { | ||||||
|  |     source = ./start-session; | ||||||
|  |     executable = true; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   home.packages = [ | ||||||
|  |     pkgs.xwayland | ||||||
|  |     pkgs.xorg.xrandr | ||||||
|  |     pkgs.gawk | ||||||
|  |   ]; | ||||||
|  | } | ||||||
							
								
								
									
										5
									
								
								hosts/vinegar/start-session/start-session
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								hosts/vinegar/start-session/start-session
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  | #!/bin/sh | ||||||
|  | Xwayland :1 -geometry $(xrandr -q | gawk 'match($0, /([0-9]+x[0-9]+)/, ary) {print ary[1]; exit}') -fullscreen & | ||||||
|  | xw_pid=$! | ||||||
|  | WAYLAND_DISPLAY= DISPLAY=:1 dbus-launch $1 | ||||||
|  | kill $xw_pid | ||||||
| @@ -80,6 +80,8 @@ in { | |||||||
|   # Enable bluetooth |   # Enable bluetooth | ||||||
|   hardware.bluetooth.enable = true; |   hardware.bluetooth.enable = true; | ||||||
|   hardware.bluetooth.powerOnBoot = true; |   hardware.bluetooth.powerOnBoot = true; | ||||||
|  |   # Blueman | ||||||
|  |   services.blueman.enable = true; | ||||||
| 
 | 
 | ||||||
|   # Enable sound with pipewire. |   # Enable sound with pipewire. | ||||||
|   sound.enable = true; |   sound.enable = true; | ||||||
							
								
								
									
										79
									
								
								hosts/vulpes/home.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								hosts/vulpes/home.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,79 @@ | |||||||
|  | { pkgs, lib, ... }: | ||||||
|  |  | ||||||
|  | # let | ||||||
|  |  | ||||||
|  | # terminal = "kitty"; | ||||||
|  | # #   newm = inputs.newmpkgs.packages.${system}.newm-atha; | ||||||
|  |  | ||||||
|  | # in { | ||||||
|  | { | ||||||
|  |   imports = [ ../colors/monokai-dark ]; | ||||||
|  |   custom.wallpaper = ../wallpapers/blip-blip-blip-blip.jpg; | ||||||
|  |  | ||||||
|  |   home = { | ||||||
|  |     sessionVariables = { | ||||||
|  |       EDITOR = "kate"; | ||||||
|  |       BROWSER = "qutebrowser"; | ||||||
|  |       TERMINAL = "kitty"; | ||||||
|  |       TERM = "kitty"; | ||||||
|  |       FILEMANAGER = "kitty lf"; | ||||||
|  |  | ||||||
|  | 	    # Tell Electron apps it's wayland time | ||||||
|  |       NIXOS_OZONE_WL = 1; | ||||||
|  |     }; | ||||||
|  |  | ||||||
|  |     sessionPath = [ | ||||||
|  |       "$HOME/.local/bin" | ||||||
|  |     ]; | ||||||
|  |  | ||||||
|  |     stateVersion = "23.11"; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   home.packages = [ | ||||||
|  |     # Utility | ||||||
|  |     pkgs.bitwarden | ||||||
|  |     pkgs.vimiv-qt | ||||||
|  |  | ||||||
|  |     # Visual | ||||||
|  |     pkgs.imagemagick | ||||||
|  |     pkgs.kate | ||||||
|  |  | ||||||
|  |       #Games | ||||||
|  |       pkgs.prismlauncher-qt5 | ||||||
|  |  | ||||||
|  |     # Env | ||||||
|  |     pkgs.eww-wayland | ||||||
|  |     pkgs.socat | ||||||
|  |     pkgs.jq | ||||||
|  |   ]; | ||||||
|  |  | ||||||
|  |   custom.nonFreePackages = [ | ||||||
|  |     "discord" | ||||||
|  |   ]; | ||||||
|  |  | ||||||
|  |   # Directories | ||||||
|  |   xdg.userDirs = { | ||||||
|  |     createDirectories = false; | ||||||
|  |     download = "$HOME/downloads"; | ||||||
|  |     music = "$HOME/music"; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   # Openers | ||||||
|  |   xdg.mimeApps.enable = true; | ||||||
|  |   xdg.mimeApps.defaultApplications = { | ||||||
|  |   	"inode/directory" = [ | ||||||
|  |   	  # "lf.desktop" | ||||||
|  |       "kitty-open.desktop" | ||||||
|  |   	]; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   # Standard programs | ||||||
|  |   programs.bat = { | ||||||
|  |     enable = true; | ||||||
|  |     config = { | ||||||
|  |       paging = "never"; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   services.blueman-applet.enable = true; | ||||||
|  | } | ||||||
| @@ -2,6 +2,7 @@ | |||||||
|   ../modules/fish |   ../modules/fish | ||||||
|   ../modules/qutebrowser |   ../modules/qutebrowser | ||||||
|   ../modules/kitty |   ../modules/kitty | ||||||
|  |   ../modules/lf | ||||||
| 
 | 
 | ||||||
|   ../modules/ncspot |   ../modules/ncspot | ||||||
| 
 | 
 | ||||||
| @@ -1,10 +1,18 @@ | |||||||
| { pkgs, lib, config, ... }: { | { pkgs, lib, config, ... }: { | ||||||
|  |   options.custom.bspwm.enable = lib.mkEnable "bspwm"; | ||||||
|  |  | ||||||
|   imports = [ |   imports = [ | ||||||
|     ../qutesearch/home.nix |     ../qutesearch/home.nix | ||||||
|     ../tint2/home.nix |     ../tint2/home.nix | ||||||
|     ../rofi/home.nix |     ../rofi/home.nix | ||||||
|   ]; |   ]; | ||||||
|  |  | ||||||
|  |   config = { | ||||||
|  |     # programs.qutebrowser.enable = true; | ||||||
|  |     # custom.qutesearch.enable = true; | ||||||
|  |     # programs.tint2.enable = true; | ||||||
|  |     # programs.rofi.enable = true; | ||||||
|  |  | ||||||
|     home.packages = [ |     home.packages = [ | ||||||
|       pkgs.feh |       pkgs.feh | ||||||
|       pkgs.flameshot |       pkgs.flameshot | ||||||
| @@ -43,9 +51,13 @@ | |||||||
|     xsession.windowManager.bspwm = { |     xsession.windowManager.bspwm = { | ||||||
|       enable = true; |       enable = true; | ||||||
|  |  | ||||||
|     monitors = { |       # monitors = { | ||||||
|     "eDP-1" = [ "I" "II" "III" "IV" "V" ]; |       #   "eDP-1" = [ "I" "II" "III" "IV" "V" ]; | ||||||
|     }; |       # }; | ||||||
|  |  | ||||||
|  |       extraConfigEarly = '' | ||||||
|  |       bspc monitor -d I II III IV V | ||||||
|  |       ''; | ||||||
|  |  | ||||||
|       settings = { |       settings = { | ||||||
|         border_width = 1; |         border_width = 1; | ||||||
| @@ -74,4 +86,5 @@ | |||||||
|         "feh --bg-scale ${config.custom.wallpaper}" |         "feh --bg-scale ${config.custom.wallpaper}" | ||||||
|       ]; |       ]; | ||||||
|     }; |     }; | ||||||
|  |   }; | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										0
									
								
								modules/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								modules/default.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -1,4 +1,5 @@ | |||||||
| { pkgs, lib, ... }: { | { pkgs, lib, config, ... }: { | ||||||
|  |   config = { | ||||||
|     nixpkgs.config.allowUnfreePredicate = pkg: |     nixpkgs.config.allowUnfreePredicate = pkg: | ||||||
|       builtins.elem (lib.getName pkg) [ |       builtins.elem (lib.getName pkg) [ | ||||||
|         "discord" |         "discord" | ||||||
| @@ -8,3 +9,4 @@ | |||||||
|       pkgs.discord |       pkgs.discord | ||||||
|     ]; |     ]; | ||||||
|   } |   } | ||||||
|  | } | ||||||
|   | |||||||
| @@ -1,11 +1,10 @@ | |||||||
| { pkgs, ... }: { | { pkgs, lib, config, ... }: { | ||||||
|   home.packages = [ |   home.packages = [ | ||||||
|     pkgs.grc |     pkgs.grc | ||||||
|     pkgs.fishPlugins.grc |     pkgs.fishPlugins.grc | ||||||
|   ]; |   ]; | ||||||
|  |  | ||||||
|   programs.fish = { |   programs.fish = { | ||||||
|     enable = true; |  | ||||||
|     interactiveShellInit = '' |     interactiveShellInit = '' | ||||||
|       set fish_greeting  # Disable greeting |       set fish_greeting  # Disable greeting | ||||||
|     ''; |     ''; | ||||||
|   | |||||||
							
								
								
									
										5
									
								
								modules/home.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								modules/home.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  | { ... } : { | ||||||
|  |   imports = [ | ||||||
|  |      | ||||||
|  |   ] | ||||||
|  | } | ||||||
| @@ -1,13 +0,0 @@ | |||||||
| { lib, ... }: |  | ||||||
|  |  | ||||||
| { |  | ||||||
|   options = { |  | ||||||
|     homeManager = lib.mkOption { |  | ||||||
|       type = lib.types.set; |  | ||||||
|     }; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   config = { |  | ||||||
|     home-manager.users.dakedres = config.homeManager; |  | ||||||
|   }; |  | ||||||
| } |  | ||||||
| @@ -5,10 +5,15 @@ | |||||||
|     ../rofi/home.nix |     ../rofi/home.nix | ||||||
|   ]; |   ]; | ||||||
|  |  | ||||||
|  |   # options.custom.hyprland.enable = lib.mkEnable "hyprland"; | ||||||
|  |  | ||||||
|  |   config = { | ||||||
|     home.packages = [ |     home.packages = [ | ||||||
|       pkgs.swaybg |       pkgs.swaybg | ||||||
|     ]; |     ]; | ||||||
|  |  | ||||||
|  |     programs.waybar.enable = true; | ||||||
|  |  | ||||||
|     # When swhkd is available, wlogout could be started via a script |     # When swhkd is available, wlogout could be started via a script | ||||||
|     # that disables keybind watching, starts wlogout, and enables keybind |     # that disables keybind watching, starts wlogout, and enables keybind | ||||||
|     # watching again once it's closed |     # watching again once it's closed | ||||||
| @@ -132,4 +137,5 @@ | |||||||
|         ]; |         ]; | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
|  |   }; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ | |||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   config = lib.mkIf config.custom.colors.kitty.enable { |   config = { | ||||||
|     programs.kitty.settings = with config.custom.colors; { |     programs.kitty.settings = with config.custom.colors; { | ||||||
|       # Based on https://github.com/mk12/base16-kitty |       # Based on https://github.com/mk12/base16-kitty | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										19
									
								
								modules/lf/home.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								modules/lf/home.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | |||||||
|  | { ... }: { | ||||||
|  |   programs.lf = { | ||||||
|  |     enable = true; | ||||||
|  |     commands = { | ||||||
|  |       q = "quit"; # Why didn't they do this btw | ||||||
|  |     }; | ||||||
|  |     keybindings = { | ||||||
|  |       "<enter>" = "$$OPENER $f"; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   xdg.desktopEntries.lf = { | ||||||
|  |     name = "LF"; | ||||||
|  |     genericName = "File browser"; | ||||||
|  |     exec = "lf %U"; | ||||||
|  |     terminal = true; | ||||||
|  |     mimeType = [ "inode/directory" ]; | ||||||
|  |   }; | ||||||
|  | } | ||||||
| @@ -8,7 +8,7 @@ | |||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   config = lib.mkIf config.custom.colors.ncspot.enable { |   config = { | ||||||
|     programs.ncspot.settings.theme = with config.custom.colors; { |     programs.ncspot.settings.theme = with config.custom.colors; { | ||||||
|       # Attempts to look kinda green like the official client |       # Attempts to look kinda green like the official client | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| { pkgs, ... }: { | { pkgs, config, ... }: { | ||||||
|   imports = [ ./colors.nix ]; |   imports = [ ./colors.nix ]; | ||||||
|  |  | ||||||
|   home.packages = [ |   home.packages = [ | ||||||
| @@ -7,6 +7,7 @@ | |||||||
|  |  | ||||||
|   programs.ncspot = { |   programs.ncspot = { | ||||||
|     enable = true; |     enable = true; | ||||||
|  |  | ||||||
|     settings = { |     settings = { | ||||||
|       cover_max_scale = 2; |       cover_max_scale = 2; | ||||||
|     }; |     }; | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   config = lib.mkIf config.custom.colors.qutebrowser.enable { |   config = { | ||||||
|     programs.qutebrowser.settings = with config.custom.colors; { |     programs.qutebrowser.settings = with config.custom.colors; { | ||||||
|       # Text color of the completion widget. May be a single color to use for |       # Text color of the completion widget. May be a single color to use for | ||||||
|       # all columns or a list of three colors, one for each column. |       # all columns or a list of three colors, one for each column. | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| { ... }: { | { ... }: { | ||||||
|   programs.tint2.enable = true; |   programs.tint2.enable = true; | ||||||
|  |  | ||||||
|   xdg.configFile."tint2/tint2rc" = { |   xdg.configFile."tint2/tint2rc" = { | ||||||
|     source = ./tint2rc; |     source = ./tint2rc; | ||||||
|     executable = true; |     executable = true; | ||||||
|   | |||||||
| @@ -1,6 +1,5 @@ | |||||||
| { ... }: { | { ... }: { | ||||||
|   programs.waybar = { |   programs.waybar = { | ||||||
|     enable = true; |  | ||||||
|     settings = { |     settings = { | ||||||
|  |  | ||||||
|       mainBar = { |       mainBar = { | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								result
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								result
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | /nix/store/hq65zx7jbxkbn8kqpfhn8gklv9xi6kpx-nixos-system-nixos-24.05.20240117.842d9d8 | ||||||
		Reference in New Issue
	
	Block a user