Compare commits
	
		
			No commits in common. "1386b0157d70ecdb66e2750503e6d9e239587905" and "45d6f4b0f3f21bb2992dcce73c82d89797ccd41d" have entirely different histories.
		
	
	
		
			1386b0157d
			...
			45d6f4b0f3
		
	
		
					 191 changed files with 7893 additions and 755 deletions
				
			
		
							
								
								
									
										6
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							|  | @ -608,11 +608,11 @@ | |||
|         ] | ||||
|       }, | ||||
|       "locked": { | ||||
|         "lastModified": 1704980875, | ||||
|         "narHash": "sha256-IPZmMjk5f4TBbEpzUFBc3OC1W6OwDNEXk2w/0uVXX1o=", | ||||
|         "lastModified": 1704099619, | ||||
|         "narHash": "sha256-QRVMkdxLmv+aKGjcgeEg31xtJEIsYq4i1Kbyw5EPS6g=", | ||||
|         "owner": "nix-community", | ||||
|         "repo": "home-manager", | ||||
|         "rev": "5f0ab0eedc6ede69beb8f45561ffefa54edc6e65", | ||||
|         "rev": "7e398b3d76bc1503171b1364c9d4a07ac06f3851", | ||||
|         "type": "github" | ||||
|       }, | ||||
|       "original": { | ||||
|  |  | |||
							
								
								
									
										23
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										23
									
								
								flake.nix
									
										
									
									
									
								
							|  | @ -23,13 +23,6 @@ | |||
|         src = ./.; | ||||
| 
 | ||||
|         snowfall.namespace = "plusultra"; | ||||
| 
 | ||||
|         snowfall = { | ||||
|           meta = { | ||||
|             name = "plusultra"; | ||||
|             title = "Plus Ultra"; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|     in | ||||
|     lib.mkFlake { | ||||
|  | @ -37,26 +30,14 @@ | |||
|         allowUnfree = true; | ||||
|       }; | ||||
| 
 | ||||
|       homes.users."harald@nix.fedora.fritz.box".modules = with inputs; [ | ||||
|       # Add modules to all homes. | ||||
|       homes.modules = with inputs; [ | ||||
|         neovim-flake.homeManagerModules.default | ||||
|       ]; | ||||
| 
 | ||||
|       homes.users."harald@sgx-nixos".modules = with inputs; [ | ||||
|         neovim-flake.homeManagerModules.default | ||||
|       ]; | ||||
| 
 | ||||
| #      homes.users.modules = with inputs; [ | ||||
| #        neovim-flake.homeManagerModules.default | ||||
| #      ]; | ||||
| 
 | ||||
|       systems.modules.nixos = with inputs; [ | ||||
|         home-manager.nixosModules.home-manager | ||||
|       ]; | ||||
| 
 | ||||
|       outputs-builder = channels: { | ||||
|         formatter = channels.nixpkgs.nixpkgs-fmt; | ||||
|         defaultApp = lib.flake-utils-plus.mkApp { drv = channels.nixpkgs.home-manager; }; | ||||
|       }; | ||||
| 
 | ||||
|     }; | ||||
| } | ||||
|  |  | |||
|  | @ -8,10 +8,10 @@ | |||
| }: | ||||
| { | ||||
|   home = { | ||||
|     username = "harald"; | ||||
|     homeDirectory = "/home/${config.home.username}/nix"; | ||||
|     stateVersion = "23.11"; # Please read the comment before changing. | ||||
|     sessionPath = [ "$HOME/bin" ]; | ||||
|   username = "harald"; | ||||
|   homeDirectory = "/home/${config.home.username}/nix"; | ||||
|   stateVersion = "23.11"; # Please read the comment before changing. | ||||
|   sessionPath = [ "$HOME/bin" ]; | ||||
|   }; | ||||
| 
 | ||||
|   plusultra = { | ||||
|  |  | |||
|  | @ -1,36 +0,0 @@ | |||
| { lib | ||||
| , pkgs | ||||
| , config | ||||
| , nixpkgs | ||||
| , osConfig ? { } | ||||
| , format ? "unknown" | ||||
| , ... | ||||
| }: | ||||
| { | ||||
|   home = { | ||||
|     username = "harald"; | ||||
|     homeDirectory = "/home/${config.home.username}"; | ||||
|     stateVersion = "23.11"; # Please read the comment before changing. | ||||
|     sessionPath = [ "$HOME/bin" ]; | ||||
|   }; | ||||
| 
 | ||||
|   plusultra = { | ||||
|     cli-apps = { | ||||
|       bash.enable = true; | ||||
|       fish.enable = true; | ||||
|       neovim.enable = false; | ||||
|       tmux.enable = true; | ||||
|       bat.enable = true; | ||||
|       git.enable = true; | ||||
|       starship.enable = true; | ||||
|       home-manager.enable = true; | ||||
|     }; | ||||
|     tools = { | ||||
|       direnv.enable = true; | ||||
|       # jetbrains.enable = true; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   fonts.fontconfig.enable = true; | ||||
| } | ||||
| 
 | ||||
							
								
								
									
										58
									
								
								modules/darwin/apps/firefox/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								modules/darwin/apps/firefox/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,58 @@ | |||
| { options | ||||
| , config | ||||
| , lib | ||||
| , pkgs | ||||
| , ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.plusultra; let | ||||
|   cfg = config.plusultra.apps.firefox; | ||||
|   defaultSettings = { | ||||
|     "browser.aboutwelcome.enabled" = false; | ||||
|     "browser.meta_refresh_when_inactive.disabled" = true; | ||||
|     "browser.startup.homepage" = "https://start.duckduckgo.com/?kak=-1&kal=-1&kao=-1&kaq=-1&kt=Hack+Nerd+Font&kae=d&ks=m&k7=2e3440&kj=3b4252&k9=eceff4&kaa=d8dee9&ku=1&k8=d8dee9&kx=81a1c1&k21=3b4252&k18=1&k5=2&kp=-2&k1=-1&kaj=u&kay=b&kk=-1&kax=-1&kap=-1&kau=-1"; | ||||
|     "browser.bookmarks.showMobileBookmarks" = true; | ||||
|     "browser.urlbar.suggest.quicksuggest.sponsored" = false; | ||||
|     "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; | ||||
|     "browser.aboutConfig.showWarning" = false; | ||||
|     "browser.ssb.enabled" = true; | ||||
|   }; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.firefox = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Firefox."; | ||||
|     extraConfig = | ||||
|       mkOpt str "" "Extra configuration for the user profile JS file."; | ||||
|     userChrome = | ||||
|       mkOpt str "" "Extra configuration for the user chrome CSS file."; | ||||
|     settings = mkOpt attrs defaultSettings "Settings to apply to the profile."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.desktop.addons.firefox-nordic-theme = enabled; | ||||
| 
 | ||||
|     plusultra.home = { | ||||
|       extraOptions = { | ||||
|         programs.firefox = { | ||||
|           enable = true; | ||||
|           package = pkgs.firefox.override { | ||||
|             cfg = { | ||||
|               # FIXME: This method of enabling browser pass support is | ||||
|               # deprecated, but the suggested solution requires using | ||||
|               # the NixOS module rather than Home-Manager. Update this | ||||
|               # if/when Home-Manager gets support for: | ||||
|               # `programs.firefox.extraNativeMessagingHosts.packages` | ||||
|               enableBrowserpass = true; | ||||
|             }; | ||||
|           }; | ||||
| 
 | ||||
|           profiles.${config.plusultra.user.name} = { | ||||
|             inherit (cfg) extraConfig userChrome settings; | ||||
|             id = 0; | ||||
|             name = config.plusultra.user.name; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										18
									
								
								modules/darwin/apps/iterm2/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								modules/darwin/apps/iterm2/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.iterm2; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.iterm2 = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable iTerm2."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       iterm2 | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								modules/darwin/apps/vscode/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								modules/darwin/apps/vscode/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.apps.vscode; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.vscode = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable vscode."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ vscode ]; }; | ||||
| } | ||||
							
								
								
									
										47
									
								
								modules/darwin/cli-apps/neovim/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								modules/darwin/cli-apps/neovim/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,47 @@ | |||
| inputs @ { options | ||||
| , config | ||||
| , lib | ||||
| , pkgs | ||||
| , ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.plusultra; let | ||||
|   cfg = config.plusultra.cli-apps.neovim; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cli-apps.neovim = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable neovim."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       # FIXME: As of today (2022-12-09), `page` no longer works with my Neovim | ||||
|       # configuration. Either something in my configuration is breaking it or `page` is busted. | ||||
|       # page | ||||
|       plusultra.neovim | ||||
|     ]; | ||||
| 
 | ||||
|     environment.variables = { | ||||
|       # PAGER = "page"; | ||||
|       # MANPAGER = | ||||
|       #   "page -C -e 'au User PageDisconnect sleep 100m|%y p|enew! |bd! #|pu p|set ft=man'"; | ||||
|       PAGER = "less"; | ||||
|       MANPAGER = "less"; | ||||
|       NPM_CONFIG_PREFIX = "$HOME/.npm-global"; | ||||
|       EDITOR = "nvim"; | ||||
|     }; | ||||
| 
 | ||||
|     plusultra.home = { | ||||
|       configFile = { | ||||
|         "dashboard-nvim/.keep".text = ""; | ||||
|       }; | ||||
| 
 | ||||
|       extraOptions = { | ||||
|         # Use Neovim for Git diffs. | ||||
|         programs.zsh.shellAliases.vimdiff = "nvim -d"; | ||||
|         programs.bash.shellAliases.vimdiff = "nvim -d"; | ||||
|         programs.fish.shellAliases.vimdiff = "nvim -d"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,23 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.desktop.addons.firefox-nordic-theme; | ||||
|   profileDir = ".mozilla/firefox/${config.plusultra.user.name}"; | ||||
| in | ||||
| { | ||||
|   options.plusultra.desktop.addons.firefox-nordic-theme = with types; { | ||||
|     enable = mkBoolOpt false "Whether to enable the Nordic theme for firefox."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.apps.firefox = { | ||||
|       extraConfig = builtins.readFile | ||||
|         "${pkgs.plusultra.firefox-nordic-theme}/configuration/user.js"; | ||||
|       userChrome = '' | ||||
|         @import "${pkgs.plusultra.firefox-nordic-theme}/userChrome.css"; | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										109
									
								
								modules/darwin/desktop/addons/skhd/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										109
									
								
								modules/darwin/desktop/addons/skhd/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,109 @@ | |||
| { lib, pkgs, config, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.desktop.addons.skhd; | ||||
| 
 | ||||
|   mkScript = name: file: pkgs.writeShellApplication { | ||||
|     inherit name; | ||||
|     checkPhase = ""; | ||||
|     text = builtins.readFile file; | ||||
|   }; | ||||
| 
 | ||||
|   open-iterm2 = mkScript "open-iterm2" ./scripts/open-iterm2.sh; | ||||
| in | ||||
| { | ||||
|   options.plusultra.desktop.addons.skhd = { | ||||
|     enable = mkEnableOption "skhd"; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     services.skhd = { | ||||
|       enable = true; | ||||
| 
 | ||||
|       skhdConfig = '' | ||||
|         # Movement | ||||
|         shift + cmd - h : yabai -m window --focus west | ||||
|         shift + cmd - j : yabai -m window --focus south | ||||
|         shift + cmd - k : yabai -m window --focus north | ||||
|         shift + cmd - l : yabai -m window --focus east | ||||
| 
 | ||||
|         # Window Movement | ||||
|         lctrl + shift + cmd - h : yabai -m window --swap west | ||||
|         lctrl + shift + cmd - j : yabai -m window --swap south | ||||
|         lctrl + shift + cmd - k : yabai -m window --swap north | ||||
|         lctrl + shift + cmd - l : yabai -m window --swap east | ||||
| 
 | ||||
|         # Window Resize | ||||
|         lctrl + cmd - h : yabai -m window --resize left:-50:0; \ | ||||
|                           yabai -m window --resize right:-50:0 | ||||
|         lctrl + cmd - j : yabai -m window --resize bottom:0:50; \ | ||||
|                           yabai -m window --resize top:0:50 | ||||
|         lctrl + cmd - k : yabai -m window --resize top:0:-50; \ | ||||
|                           yabai -m window --resize bottom:0:-50 | ||||
|         lctrl + cmd - l : yabai -m window --resize right:50:0; \ | ||||
|                           yabai -m window --resize left:50:0 | ||||
| 
 | ||||
|         lctrl + alt - h : yabai -m window --resize left:-10:0; \ | ||||
|                     yabai -m window --resize right:-10:0 | ||||
|         lctrl + alt - j : yabai -m window --resize bottom:0:10; \ | ||||
|                     yabai -m window --resize top:0:10 | ||||
|         lctrl + alt - k : yabai -m window --resize top:0:-10; \ | ||||
|                     yabai -m window --resize bottom:0:-10 | ||||
|         lctrl + alt - l : yabai -m window --resize right:10:0; \ | ||||
|                           yabai -m window --resize left:10:0 | ||||
| 
 | ||||
|         lctrl + cmd - e : yabai -m space --balance | ||||
| 
 | ||||
|         # Move Window To Space | ||||
|         lctrl + shift + cmd - m : yabai -m window --space last; yabai -m space --focus last | ||||
|         lctrl + shift + cmd - p : yabai -m window --space prev; yabai -m space --focus prev | ||||
|         lctrl + shift + cmd - n : yabai -m window --space next; yabai -m space --focus next | ||||
|         lctrl + shift + cmd - 1 : yabai -m window --space 1; yabai -m space --focus 1 | ||||
|         lctrl + shift + cmd - 2 : yabai -m window --space 2; yabai -m space --focus 2 | ||||
|         lctrl + shift + cmd - 3 : yabai -m window --space 3; yabai -m space --focus 3 | ||||
|         lctrl + shift + cmd - 4 : yabai -m window --space 4; yabai -m space --focus 4 | ||||
| 
 | ||||
|         # Focus Space | ||||
|         # shift + cmd - m : yabai -m space --focus last | ||||
|         # shift + cmd - p : yabai -m space --focus prev | ||||
|         # shift + cmd - n : yabai -m space --focus next | ||||
|         shift + cmd - 1 : yabai -m space --focus 1 | ||||
|         shift + cmd - 2 : yabai -m space --focus 2 | ||||
|         shift + cmd - 3 : yabai -m space --focus 3 | ||||
|         shift + cmd - 4 : yabai -m space --focus 4 | ||||
| 
 | ||||
|         # Insert Direction | ||||
|         lctrl + shift + cmd - v : yabai -m window --insert south | ||||
|         lctrl + shift + cmd - b : yabai -m window --insert east | ||||
|         lctrl + shift + cmd - s : yabai -m window --insert stack | ||||
| 
 | ||||
|         # Floating Windows | ||||
|         # shift + cmd - space : \ | ||||
|         #   yabai -m window --toggle float; \ | ||||
|         #   yabai -m window --toggle border | ||||
|         shift + cmd - space : yabai -m window --toggle float | ||||
| 
 | ||||
|         # Terminal | ||||
|         shift + cmd - return : ${open-iterm2}/bin/open-iterm2 | ||||
| 
 | ||||
|         # Fullscreen | ||||
|         alt - f : yabai -m window --toggle zoom-fullscreen | ||||
|         shift + alt - f : yabai -m window --toggle native-fullscreen | ||||
| 
 | ||||
|         # Restart Yabai | ||||
|         shift + lctrl + alt - r : \ | ||||
|           /usr/bin/env osascript <<< \ | ||||
|             "display notification \"Restarting Yabai\" with title \"Yabai\""; \ | ||||
|           launchctl kickstart -k "gui/$UID/org.nixos.yabai" | ||||
| 
 | ||||
|         # Restart Spacebar | ||||
|         shift + lctrl + alt - s : \ | ||||
|           /usr/bin/env osascript <<< \ | ||||
|             "display notification \"Restarting Spacebar\" with title \"Spacebar\""; \ | ||||
|           launchctl kickstart -k "gui/$UID/org.nixos.spacebar" | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								modules/darwin/desktop/addons/skhd/scripts/open-iterm2.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								modules/darwin/desktop/addons/skhd/scripts/open-iterm2.sh
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| # Detects if iTerm2 is running | ||||
| if ! pgrep -f "iTerm" > /dev/null 2>&1; then | ||||
|     open -a "/Applications/Nix Apps/iTerm2.app" | ||||
| else | ||||
|     # Create a new window | ||||
|     script='tell application "iTerm2" to create window with default profile' | ||||
|     ! osascript -e "${script}" > /dev/null 2>&1 && { | ||||
|         # Get pids for any app with "iTerm" and kill | ||||
|         while IFS="" read -r pid; do | ||||
|             kill -15 "${pid}" | ||||
|         done < <(pgrep -f "iTerm") | ||||
|         open -a "/Applications/Nix Apps/iTerm2.app" | ||||
|     } | ||||
| fi | ||||
							
								
								
									
										47
									
								
								modules/darwin/desktop/addons/spacebar/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								modules/darwin/desktop/addons/spacebar/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,47 @@ | |||
| { lib, pkgs, config, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.desktop.addons.spacebar; | ||||
| in | ||||
| { | ||||
|   options.plusultra.desktop.addons.spacebar = { | ||||
|     enable = mkEnableOption "Spacebar"; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     services.spacebar = { | ||||
|       enable = true; | ||||
|       package = pkgs.spacebar; | ||||
| 
 | ||||
|       config = { | ||||
|         position = "top"; | ||||
|         display = "all"; | ||||
|         height = 32; | ||||
|         title = "on"; | ||||
|         spaces = "on"; | ||||
|         clock = "on"; | ||||
|         power = "off"; | ||||
| 
 | ||||
|         padding_left = 10; | ||||
|         padding_right = 10; | ||||
| 
 | ||||
|         spacing_left = 10; | ||||
|         spacing_right = 10; | ||||
| 
 | ||||
|         foreground_color = "0xffeceff4"; | ||||
|         background_color = "0xff1d2128"; | ||||
| 
 | ||||
|         text_font = ''"Hack Nerd Font Mono:Regular:14.0"''; | ||||
|         icon_font = ''"Hack Nerd Font Mono:Regular:20.0"''; | ||||
| 
 | ||||
|         # Shell entries apparently break the whole bar... | ||||
|         # https://github.com/cmacrae/spacebar/issues/104 | ||||
|         # right_shell_icon = ""; | ||||
|         # right_shell_command = ''"whoami"''; | ||||
|         # right_shell = "on"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										77
									
								
								modules/darwin/desktop/yabai/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								modules/darwin/desktop/yabai/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,77 @@ | |||
| { lib | ||||
| , pkgs | ||||
| , config | ||||
| , ... | ||||
| }: | ||||
| let | ||||
|   cfg = config.plusultra.desktop.yabai; | ||||
| 
 | ||||
|   inherit (lib) types mkEnableOption mkIf; | ||||
|   inherit (lib.plusultra) mkOpt enabled; | ||||
| in | ||||
| { | ||||
|   options.plusultra.desktop.yabai = { | ||||
|     enable = mkEnableOption "Yabai"; | ||||
|     enable-scripting-addition = mkOpt types.bool true "Whether to enable the scripting addition for Yabai. (Requires SIP to be disabled)"; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.desktop.addons = { | ||||
|       skhd = enabled; | ||||
|       spacebar = enabled; | ||||
|     }; | ||||
| 
 | ||||
|     services.yabai = { | ||||
|       enable = true; | ||||
|       enableScriptingAddition = cfg.enable-scripting-addition; | ||||
| 
 | ||||
|       config = { | ||||
|         layout = "bsp"; | ||||
| 
 | ||||
|         auto_balance = "off"; | ||||
| 
 | ||||
|         debug_output = "on"; | ||||
| 
 | ||||
|         top_padding = 8; | ||||
|         right_padding = 8; | ||||
|         left_padding = 8; | ||||
|         bottom_padding = 8; | ||||
| 
 | ||||
|         window_gap = 6; | ||||
|         window_topmost = "on"; | ||||
|         window_shadow = "float"; | ||||
| 
 | ||||
|         # As of macOS Sonoma, window borders break Yabai and cause a bunch of lag. | ||||
|         window_border = "off"; | ||||
|         # window_border = "on"; | ||||
|         # window_border_width = 5; | ||||
|         # window_border_radius = 14; | ||||
|         # window_border_blur = "off"; | ||||
|         # window_border_hidpi = "on"; | ||||
|         # insert_feedback_color = "0xffb48ead"; | ||||
|         # normal_window_border_color = "0x002e3440"; | ||||
|         # active_window_border_color = "0xff5e81ac"; | ||||
| 
 | ||||
|         external_bar = "all:${builtins.toString config.services.spacebar.config.height}:0"; | ||||
| 
 | ||||
|         # mouse_modifier = "alt"; | ||||
|         mouse_modifier = "cmd"; | ||||
|         mouse_action1 = "move"; | ||||
|         mouse_action2 = "resize"; | ||||
|       }; | ||||
| 
 | ||||
|       extraConfig = '' | ||||
|         yabai -m rule --add label="Finder" app="^Finder$" title="(Co(py|nnect)|Move|Info|Pref)" manage=off | ||||
|         yabai -m rule --add label="Safari" app="^Safari$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off | ||||
|         yabai -m rule --add label="System Preferences" app="^System Preferences$" title=".*" manage=off | ||||
|         yabai -m rule --add label="App Store" app="^App Store$" manage=off | ||||
|         yabai -m rule --add label="Activity Monitor" app="^Activity Monitor$" manage=off | ||||
|         yabai -m rule --add label="Calculator" app="^Calculator$" manage=off | ||||
|         yabai -m rule --add label="Dictionary" app="^Dictionary$" manage=off | ||||
|         yabai -m rule --add label="mpv" app="^mpv$" manage=off | ||||
|         yabai -m rule --add label="Software Update" title="Software Update" manage=off | ||||
|         yabai -m rule --add label="About This Mac" app="System Information" title="About This Mac" manage=off | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										40
									
								
								modules/darwin/home/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								modules/darwin/home/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,40 @@ | |||
| { options, config, pkgs, lib, inputs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.home; | ||||
| in | ||||
| { | ||||
|   # imports = with inputs; [ | ||||
|   #   home-manager.darwinModules.home-manager | ||||
|   # ]; | ||||
| 
 | ||||
|   options.plusultra.home = with types; { | ||||
|     file = mkOpt attrs { } | ||||
|       "A set of files to be managed by home-manager's <option>home.file</option>."; | ||||
|     configFile = mkOpt attrs { } | ||||
|       "A set of files to be managed by home-manager's <option>xdg.configFile</option>."; | ||||
|     extraOptions = mkOpt attrs { } "Options to pass directly to home-manager."; | ||||
|     homeConfig = mkOpt attrs { } "Final config for home-manager."; | ||||
|   }; | ||||
| 
 | ||||
|   config = { | ||||
|     plusultra.home.extraOptions = { | ||||
|       home.stateVersion = mkDefault "22.11"; | ||||
|       home.file = mkAliasDefinitions options.plusultra.home.file; | ||||
|       xdg.enable = true; | ||||
|       xdg.configFile = mkAliasDefinitions options.plusultra.home.configFile; | ||||
|     }; | ||||
| 
 | ||||
|     snowfallorg.user.${config.plusultra.user.name}.home.config = mkAliasDefinitions options.plusultra.home.extraOptions; | ||||
| 
 | ||||
|     home-manager = { | ||||
|       useUserPackages = true; | ||||
|       useGlobalPkgs = true; | ||||
| 
 | ||||
|       # users.${config.plusultra.user.name} = args: | ||||
|       #   mkAliasDefinitions options.plusultra.home.extraOptions; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										74
									
								
								modules/darwin/nix/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								modules/darwin/nix/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,74 @@ | |||
| { options | ||||
| , config | ||||
| , pkgs | ||||
| , lib | ||||
| , ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.plusultra; let | ||||
|   cfg = config.plusultra.nix; | ||||
| in | ||||
| { | ||||
|   options.plusultra.nix = with types; { | ||||
|     enable = mkBoolOpt true "Whether or not to manage nix configuration."; | ||||
|     package = mkOpt package pkgs.nixUnstable "Which nix package to use."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       deploy-rs | ||||
|       nixfmt | ||||
|       nix-index | ||||
|       nix-prefetch-git | ||||
|     ]; | ||||
| 
 | ||||
|     nix = | ||||
|       let | ||||
|         users = [ "root" config.plusultra.user.name ]; | ||||
|       in | ||||
|       { | ||||
|         package = cfg.package; | ||||
| 
 | ||||
|         settings = { | ||||
|           experimental-features = "nix-command flakes"; | ||||
|           http-connections = 50; | ||||
|           warn-dirty = false; | ||||
|           log-lines = 50; | ||||
| 
 | ||||
|           # Large builds apparently fail due to an issue with darwin: | ||||
|           # https://github.com/NixOS/nix/issues/4119 | ||||
|           sandbox = false; | ||||
| 
 | ||||
|           # This appears to break on darwin | ||||
|           # https://github.com/NixOS/nix/issues/7273 | ||||
|           auto-optimise-store = false; | ||||
| 
 | ||||
|           allow-import-from-derivation = true; | ||||
| 
 | ||||
|           trusted-users = users; | ||||
|           allowed-users = users; | ||||
| 
 | ||||
|           # NOTE: This configuration is generated by nix-installer so I'm adding it here in | ||||
|           # case it becomes important. | ||||
|           extra-nix-path = "nixpkgs=flake:nixpkgs"; | ||||
|           build-users-group = "nixbld"; | ||||
|         }; | ||||
|         #// (lib.optionalAttrs config.plusultra.tools.direnv.enable { | ||||
|         #  keep-outputs = true; | ||||
|         #  keep-derivations = true; | ||||
|         #}); | ||||
| 
 | ||||
|         gc = { | ||||
|           automatic = true; | ||||
|           interval = { Day = 7; }; | ||||
|           options = "--delete-older-than 30d"; | ||||
|           user = config.plusultra.user.name; | ||||
|         }; | ||||
| 
 | ||||
|         # flake-utils-plus | ||||
|         generateRegistryFromInputs = true; | ||||
|         generateNixPathFromInputs = true; | ||||
|         linkInputs = true; | ||||
|       }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										84
									
								
								modules/darwin/security/gpg/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								modules/darwin/security/gpg/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,84 @@ | |||
| { lib, config, pkgs, inputs, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) types mkEnableOption mkIf; | ||||
|   inherit (lib.plusultra) mkOpt; | ||||
| 
 | ||||
|   cfg = config.plusultra.security.gpg; | ||||
| 
 | ||||
|   gpgConf = "${inputs.gpg-base-conf}/gpg.conf"; | ||||
| 
 | ||||
|   gpgAgentConf = '' | ||||
|     enable-ssh-support | ||||
|     default-cache-ttl 60 | ||||
|     max-cache-ttl 120 | ||||
|   ''; | ||||
| 
 | ||||
|   guide = "${inputs.yubikey-guide}/README.md"; | ||||
| 
 | ||||
|   theme = pkgs.fetchFromGitHub { | ||||
|     owner = "jez"; | ||||
|     repo = "pandoc-markdown-css-theme"; | ||||
|     rev = "019a4829242937761949274916022e9861ed0627"; | ||||
|     sha256 = "1h48yqffpaz437f3c9hfryf23r95rr319lrb3y79kxpxbc9hihxb"; | ||||
|   }; | ||||
| 
 | ||||
|   guideHTML = pkgs.runCommand "yubikey-guide" { } '' | ||||
|     ${pkgs.pandoc}/bin/pandoc \ | ||||
|       --standalone \ | ||||
|       --metadata title="Yubikey Guide" \ | ||||
|       --from markdown \ | ||||
|       --to html5+smart \ | ||||
|       --toc \ | ||||
|       --template ${theme}/template.html5 \ | ||||
|       --css ${theme}/docs/css/theme.css \ | ||||
|       --css ${theme}/docs/css/skylighting-solarized-theme.css \ | ||||
|       -o $out \ | ||||
|       ${guide} | ||||
|   ''; | ||||
| 
 | ||||
|   reload-yubikey = pkgs.writeShellScriptBin "reload-yubikey" '' | ||||
|     ${pkgs.gnupg}/bin/gpg-connect-agent "scd serialno" "learn --force" /bye | ||||
|   ''; | ||||
| in | ||||
| { | ||||
|   options.plusultra.security.gpg = { | ||||
|     enable = mkEnableOption "GPG"; | ||||
|     agentTimeout = mkOpt types.int 5 "The amount of time to wait before continuing with shell init."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       gnupg | ||||
|     ]; | ||||
| 
 | ||||
|     environment.shellInit = '' | ||||
|       export GPG_TTY="$(tty)" | ||||
|       export SSH_AUTH_SOCK=$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket) | ||||
| 
 | ||||
|       ${pkgs.coreutils}/bin/timeout ${builtins.toString cfg.agentTimeout} ${pkgs.gnupg}/bin/gpgconf --launch gpg-agent | ||||
|       gpg_agent_timeout_status=$? | ||||
| 
 | ||||
|       if [ "$gpg_agent_timeout_status" = 124 ]; then | ||||
|         # Command timed out... | ||||
|         echo "GPG Agent timed out..." | ||||
|         echo 'Run "gpgconf --launch gpg-agent" to try and launch it again.' | ||||
|       fi | ||||
|     ''; | ||||
| 
 | ||||
|     programs.gnupg.agent = { | ||||
|       enable = true; | ||||
|       enableSSHSupport = true; | ||||
|     }; | ||||
| 
 | ||||
|     plusultra.home.file = { | ||||
|       ".gnupg/.keep".text = ""; | ||||
| 
 | ||||
|       ".gnupg/yubikey-guide.md".source = guide; | ||||
|       ".gnupg/yubikey-guide.html".source = guideHTML; | ||||
| 
 | ||||
|       ".gnupg/gpg.conf".source = gpgConf; | ||||
|       ".gnupg/gpg-agent.conf".text = gpgAgentConf; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										17
									
								
								modules/darwin/services/nix-daemon/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								modules/darwin/services/nix-daemon/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) types mkIf; | ||||
|   inherit (lib.plusultra) mkOpt enabled; | ||||
| 
 | ||||
|   cfg = config.plusultra.services.nix-daemon; | ||||
| in | ||||
| { | ||||
|   options.plusultra.services.nix-daemon = { | ||||
|     enable = mkOpt types.bool true "Whether to enable the Nix daemon."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     services.nix-daemon = enabled; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										43
									
								
								modules/darwin/suites/common/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								modules/darwin/suites/common/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.suites.common; | ||||
| in | ||||
| { | ||||
|   options.plusultra.suites.common = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable common configuration."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     programs.zsh = enabled; | ||||
| 
 | ||||
|     plusultra = { | ||||
|       nix = enabled; | ||||
| 
 | ||||
|       apps = { | ||||
|         iterm2 = enabled; | ||||
|       }; | ||||
| 
 | ||||
|       cli-apps = { | ||||
|         neovim = enabled; | ||||
|       }; | ||||
| 
 | ||||
|       tools = { | ||||
|         git = enabled; | ||||
|         flake = enabled; | ||||
|       }; | ||||
| 
 | ||||
|       system = { | ||||
|         fonts = enabled; | ||||
|         input = enabled; | ||||
|         interface = enabled; | ||||
|       }; | ||||
| 
 | ||||
|       security = { | ||||
|         gpg = enabled; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										35
									
								
								modules/darwin/suites/development/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								modules/darwin/suites/development/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,35 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.suites.development; | ||||
| in | ||||
| { | ||||
|   options.plusultra.suites.development = with types; { | ||||
|     enable = mkBoolOpt false | ||||
|       "Whether or not to enable common development configuration."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra = { | ||||
|       apps = { | ||||
|         vscode = enabled; | ||||
|       }; | ||||
| 
 | ||||
|       tools = { | ||||
|         # at = enabled; | ||||
|         # direnv = enabled; | ||||
|         # go = enabled; | ||||
|         # http = enabled; | ||||
|         # k8s = enabled; | ||||
|         node = enabled; | ||||
|         # titan = enabled; | ||||
|         python = enabled; | ||||
|         java = enabled; | ||||
|       }; | ||||
| 
 | ||||
|       # virtualisation = { podman = enabled; }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										32
									
								
								modules/darwin/system/fonts/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								modules/darwin/system/fonts/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,32 @@ | |||
| { options, config, pkgs, lib, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.system.fonts; | ||||
| in | ||||
| { | ||||
|   options.plusultra.system.fonts = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to manage fonts."; | ||||
|     fonts = mkOpt (listOf package) [ ] "Custom font packages to install."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.variables = { | ||||
|       # Enable icons in tooling since we have nerdfonts. | ||||
|       LOG_ICONS = "true"; | ||||
|     }; | ||||
| 
 | ||||
|     fonts = { | ||||
|       fontDir = enabled; | ||||
| 
 | ||||
|       fonts = with pkgs; | ||||
|         [ | ||||
|           noto-fonts | ||||
|           noto-fonts-cjk-sans | ||||
|           noto-fonts-cjk-serif | ||||
|           noto-fonts-emoji | ||||
|           (nerdfonts.override { fonts = [ "Hack" ]; }) | ||||
|         ] ++ cfg.fonts; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										1
									
								
								modules/darwin/system/input/DefaultKeyBinding.dict
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								modules/darwin/system/input/DefaultKeyBinding.dict
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| { "~a" = (); "~b" = (); "~c" = (); "~d" = (); "~e" = (); "~f" = (); "~g" = (); "~h" = (); "~i" = (); "~j" = (); "~k" = (); "~l" = (); "~m" = (); "~n" = (); "~o" = (); "~p" = (); "~q" = (); "~r" = (); "~s" = (); "~t" = (); "~u" = (); "~v" = (); "~w" = (); "~x" = (); "~y" = (); "~z" = (); } | ||||
							
								
								
									
										55
									
								
								modules/darwin/system/input/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								modules/darwin/system/input/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,55 @@ | |||
| { options, config, pkgs, lib, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.system.input; | ||||
| in | ||||
| { | ||||
|   options.plusultra.system.input = with types; { | ||||
|     enable = mkEnableOption "macOS input"; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable (mkMerge [ | ||||
|     { | ||||
|       system = { | ||||
|         keyboard = { | ||||
|           enableKeyMapping = true; | ||||
|           remapCapsLockToEscape = true; | ||||
|         }; | ||||
| 
 | ||||
|         defaults = { | ||||
|           ".GlobalPreferences" = { | ||||
|             "com.apple.mouse.scaling" = "1"; | ||||
|           }; | ||||
| 
 | ||||
|           NSGlobalDomain = { | ||||
|             AppleKeyboardUIMode = 3; | ||||
|             ApplePressAndHoldEnabled = false; | ||||
| 
 | ||||
|             KeyRepeat = 2; | ||||
|             InitialKeyRepeat = 15; | ||||
| 
 | ||||
|             NSAutomaticCapitalizationEnabled = false; | ||||
|             NSAutomaticDashSubstitutionEnabled = false; | ||||
|             NSAutomaticQuoteSubstitutionEnabled = false; | ||||
|             NSAutomaticPeriodSubstitutionEnabled = false; | ||||
|             NSAutomaticSpellingCorrectionEnabled = false; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       snowfallorg.user.${config.plusultra.user.name}.home.config = { | ||||
|         home.activation = { | ||||
|           # Disable special keys when using Option as a modifier. | ||||
|           # https://superuser.com/questions/941286/disable-default-option-key-binding | ||||
|           disableSpecialKeys = lib.home-manager.hm.dag.entryAfter [ "writeBoundary" ] '' | ||||
|             set +e | ||||
|             $DRY_RUN_CMD /usr/bin/sudo mkdir -p $HOME/Library/KeyBindings | ||||
|             $DRY_RUN_CMD /usr/bin/sudo cp '${builtins.toPath ./DefaultKeyBinding.dict}' "$HOME/Library/KeyBindings/DefaultKeyBinding.dict" | ||||
|             set -e | ||||
|           ''; | ||||
|         }; | ||||
|       }; | ||||
|     } | ||||
|   ]); | ||||
| } | ||||
							
								
								
									
										29
									
								
								modules/darwin/system/interface/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								modules/darwin/system/interface/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| { options, config, pkgs, lib, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.system.interface; | ||||
| in | ||||
| { | ||||
|   options.plusultra.system.interface = with types; { | ||||
|     enable = mkEnableOption "macOS interface"; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     system.defaults = { | ||||
|       dock.autohide = true; | ||||
| 
 | ||||
|       finder = { | ||||
|         AppleShowAllExtensions = true; | ||||
|         FXEnableExtensionChangeWarning = false; | ||||
|       }; | ||||
| 
 | ||||
|       NSGlobalDomain = { | ||||
|         _HIHideMenuBar = true; | ||||
|         AppleShowScrollBars = "Always"; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     plusultra.home.file.".hushlogin".text = ""; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										18
									
								
								modules/darwin/tools/flake/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								modules/darwin/tools/flake/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.tools.flake; | ||||
| in | ||||
| { | ||||
|   options.plusultra.tools.flake = { | ||||
|     enable = mkEnableOption "Flake"; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       snowfallorg.flake | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										43
									
								
								modules/darwin/tools/git/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								modules/darwin/tools/git/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| { options, config, pkgs, lib, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.tools.git; | ||||
|   gpg = config.plusultra.security.gpg; | ||||
|   user = config.plusultra.user; | ||||
| in | ||||
| { | ||||
|   options.plusultra.tools.git = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to install and configure git."; | ||||
|     userName = mkOpt types.str user.fullName "The name to configure git with."; | ||||
|     userEmail = mkOpt types.str user.email "The email to configure git with."; | ||||
|     signingKey = | ||||
|       mkOpt types.str "9762169A1B35EA68" "The key ID to sign commits with."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ git ]; | ||||
| 
 | ||||
|     plusultra.home.extraOptions = { | ||||
|       programs.git = { | ||||
|         enable = true; | ||||
|         inherit (cfg) userName userEmail; | ||||
|         lfs = enabled; | ||||
|         signing = { | ||||
|           key = cfg.signingKey; | ||||
|           signByDefault = mkIf gpg.enable true; | ||||
|         }; | ||||
|         extraConfig = { | ||||
|           init = { defaultBranch = "main"; }; | ||||
|           pull = { rebase = true; }; | ||||
|           push = { autoSetupRemote = true; }; | ||||
|           core = { whitespace = "trailing-space,space-before-tab"; }; | ||||
|           safe = { | ||||
|             directory = "${config.users.users.${user.name}.home}/work/config"; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										17
									
								
								modules/darwin/tools/java/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								modules/darwin/tools/java/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.tools.java; | ||||
| in | ||||
| { | ||||
|   options.plusultra.tools.java = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Java."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       jdk | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										42
									
								
								modules/darwin/tools/node/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								modules/darwin/tools/node/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,42 @@ | |||
| { options | ||||
| , config | ||||
| , pkgs | ||||
| , lib | ||||
| , ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.plusultra; let | ||||
|   cfg = config.plusultra.tools.node; | ||||
| in | ||||
| { | ||||
|   options.plusultra.tools.node = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to install and configure git"; | ||||
|     pkg = mkOpt package pkgs.nodejs "The NodeJS package to use"; | ||||
|     prettier = { | ||||
|       enable = mkBoolOpt true "Whether or not to install Prettier"; | ||||
|       pkg = | ||||
|         mkOpt package pkgs.nodePackages.prettier "The NodeJS package to use"; | ||||
|     }; | ||||
|     yarn = { | ||||
|       enable = mkBoolOpt true "Whether or not to install Yarn"; | ||||
|       pkg = mkOpt package pkgs.nodePackages.yarn "The NodeJS package to use"; | ||||
|     }; | ||||
|     pnpm = { | ||||
|       enable = mkBoolOpt true "Whether or not to install Pnpm"; | ||||
|       pkg = mkOpt package pkgs.nodePackages.pnpm "The NodeJS package to use"; | ||||
|     }; | ||||
|     flyctl = { | ||||
|       enable = mkBoolOpt true "Whether or not to install flyctl"; | ||||
|       pkg = mkOpt package pkgs.flyctl "The flyctl package to use"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; | ||||
|       [ cfg.pkg ] | ||||
|       ++ (lib.optional cfg.prettier.enable cfg.prettier.pkg) | ||||
|       ++ (lib.optional cfg.yarn.enable cfg.yarn.pkg) | ||||
|       ++ (lib.optional cfg.pnpm.enable cfg.pnpm.pkg) | ||||
|       ++ (lib.optional cfg.flyctl.enable cfg.flyctl.pkg); | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										22
									
								
								modules/darwin/tools/python/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								modules/darwin/tools/python/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.tools.python; | ||||
| in | ||||
| { | ||||
|   options.plusultra.tools.python = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Python."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { | ||||
|       environment.systemPackages = with pkgs; [ | ||||
|         (python311.withPackages (ps: | ||||
|           with ps; [ | ||||
|             numpy | ||||
|           ]) | ||||
|         ) | ||||
|       ]; | ||||
|     }; | ||||
| } | ||||
							
								
								
									
										45
									
								
								modules/darwin/user/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								modules/darwin/user/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,45 @@ | |||
| { lib | ||||
| , config | ||||
| , pkgs | ||||
| , ... | ||||
| }: | ||||
| let | ||||
|   inherit (lib) types mkIf mkDefault; | ||||
|   inherit (lib.plusultra) mkOpt; | ||||
| 
 | ||||
|   cfg = config.plusultra.user; | ||||
| 
 | ||||
|   is-linux = pkgs.stdenv.isLinux; | ||||
|   is-darwin = pkgs.stdenv.isDarwin; | ||||
| in | ||||
| { | ||||
|   options.plusultra.user = { | ||||
|     name = mkOpt types.str "short" "The user account."; | ||||
| 
 | ||||
|     fullName = mkOpt types.str "Jake Hamilton" "The full name of the user."; | ||||
|     email = mkOpt types.str "jake.hamilton@hey.com" "The email of the user."; | ||||
| 
 | ||||
|     uid = mkOpt (types.nullOr types.int) 501 "The uid for the user account."; | ||||
|   }; | ||||
| 
 | ||||
|   config = { | ||||
|     users.users.${cfg.name} = { | ||||
|       # NOTE: Setting the uid here is required for another | ||||
|       # module to evaluate successfully since it reads | ||||
|       # `users.users.${plusultra.user.name}.uid`. | ||||
|       uid = mkIf (cfg.uid != null) cfg.uid; | ||||
|     }; | ||||
| 
 | ||||
|     snowfallorg.user.${config.plusultra.user.name}.home.config = { | ||||
|       home = { | ||||
|         file = { | ||||
|           ".profile".text = '' | ||||
|             # The default file limit is far too low and throws an error when rebuilding the system. | ||||
|             # See the original with: ulimit -Sa | ||||
|             ulimit -n 4096 | ||||
|           ''; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										23
									
								
								modules/nixos/apps/_1password/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								modules/nixos/apps/_1password/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps._1password; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps._1password = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable 1password."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     programs = { | ||||
|       _1password = enabled; | ||||
|       _1password-gui = { | ||||
|         enable = true; | ||||
| 
 | ||||
|         polkitPolicyOwners = [ config.plusultra.user.name ]; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/ardour/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/ardour/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.ardour; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.ardour = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Ardour."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ ardour ]; }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								modules/nixos/apps/blender/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								modules/nixos/apps/blender/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.apps.blender; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.blender = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Blender."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ blender ]; }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								modules/nixos/apps/bottles/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								modules/nixos/apps/bottles/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.apps.bottles; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.bottles = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Bottles."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ bottles ]; }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								modules/nixos/apps/cadence/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								modules/nixos/apps/cadence/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.apps.cadence; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.cadence = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Cadence."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ cadence ]; }; | ||||
| } | ||||
							
								
								
									
										41
									
								
								modules/nixos/apps/discord/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								modules/nixos/apps/discord/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,41 @@ | |||
| { options, config, lib, pkgs, inputs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.discord; | ||||
|   discord = lib.replugged.makeDiscordPlugged { | ||||
|     inherit pkgs; | ||||
| 
 | ||||
|     # This is currently broken, but could speed up Discord startup in the future. | ||||
|     withOpenAsar = false; | ||||
| 
 | ||||
|     plugins = { | ||||
|       inherit (inputs) discord-tweaks; | ||||
|     }; | ||||
| 
 | ||||
|     themes = { | ||||
|       inherit (inputs) discord-nord-theme; | ||||
|     }; | ||||
|   }; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.discord = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Discord."; | ||||
|     canary.enable = mkBoolOpt false "Whether or not to enable Discord Canary."; | ||||
|     chromium.enable = mkBoolOpt false | ||||
|       "Whether or not to enable the Chromium version of Discord."; | ||||
|     firefox.enable = mkBoolOpt false | ||||
|       "Whether or not to enable the Firefox version of Discord."; | ||||
|     native.enable = mkBoolOpt false "Whether or not to enable the native version of Discord."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf (cfg.enable or cfg.chromium.enable) { | ||||
|     environment.systemPackages = | ||||
|       lib.optional cfg.enable discord | ||||
|       ++ lib.optional cfg.canary.enable pkgs.plusultra.discord | ||||
|       ++ lib.optional cfg.chromium.enable pkgs.plusultra.discord-chromium | ||||
|       ++ lib.optional cfg.firefox.enable pkgs.plusultra.discord-firefox | ||||
|       ++ lib.optional cfg.native.enable pkgs.discord; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										18
									
								
								modules/nixos/apps/dolphin/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								modules/nixos/apps/dolphin/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.apps.dolphin; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.dolphin = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Dolphin."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ dolphin-emu ]; | ||||
| 
 | ||||
|     # Enable GameCube controller support. | ||||
|     services.udev.packages = [ pkgs.dolphinEmu ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										30
									
								
								modules/nixos/apps/doukutsu-rs/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								modules/nixos/apps/doukutsu-rs/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,30 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.doukutsu-rs; | ||||
|   desktopItem = pkgs.makeDesktopItem { | ||||
|     name = "doukutsu-rs"; | ||||
|     desktopName = "doukutsu-rs"; | ||||
|     genericName = | ||||
|       "A fully playable re-implementation of Cave Story (Doukutsu Monogatari) engine written in Rust."; | ||||
|     exec = "${pkgs.plusultra.doukutsu-rs}/bin/doukutsu-rs"; | ||||
|     icon = ./icon.png; | ||||
|     type = "Application"; | ||||
|     categories = [ "Game" "AdventureGame" ]; | ||||
|     terminal = false; | ||||
|   }; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.doukutsu-rs = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable doukutsu-rs."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs.plusultra; [ | ||||
|       doukutsu-rs | ||||
|       desktopItem | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								modules/nixos/apps/doukutsu-rs/icon.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								modules/nixos/apps/doukutsu-rs/icon.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 34 KiB | 
							
								
								
									
										16
									
								
								modules/nixos/apps/element/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								modules/nixos/apps/element/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.element; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.element = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Element."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ element-desktop ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										22
									
								
								modules/nixos/apps/etcher/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								modules/nixos/apps/etcher/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.etcher; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.etcher = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable etcher."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; | ||||
|       [ | ||||
|         # Etcher is currently broken in nixpkgs, temporarily replaced with | ||||
|         # gnome disk utility. | ||||
|         # etcher | ||||
|         gnome.gnome-disk-utility | ||||
|       ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										35
									
								
								modules/nixos/apps/expressvpn/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								modules/nixos/apps/expressvpn/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,35 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.expressvpn; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.expressvpn = { | ||||
|     enable = mkEnableOption "Express VPN"; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       plusultra.expressvpn | ||||
|     ] ++ optionals config.plusultra.desktop.gnome.enable [ | ||||
|       gnomeExtensions.evpn-shell-assistant | ||||
|     ]; | ||||
| 
 | ||||
|     boot.kernelModules = [ "tun" ]; | ||||
| 
 | ||||
|     systemd.services.expressvpn = { | ||||
|       wantedBy = [ "multi-user.target" ]; | ||||
|       after = [ "network.target" "network-online.target" ]; | ||||
| 
 | ||||
|       description = "ExpressVPN Daemon"; | ||||
| 
 | ||||
|       serviceConfig = { | ||||
|         ExecStart = "${pkgs.plusultra.expressvpn}/bin/expressvpnd"; | ||||
|         Restart = "on-failure"; | ||||
|         RestartSec = 5; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										66
									
								
								modules/nixos/apps/firefox/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								modules/nixos/apps/firefox/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,66 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.firefox; | ||||
|   defaultSettings = { | ||||
|     "browser.aboutwelcome.enabled" = false; | ||||
|     "browser.meta_refresh_when_inactive.disabled" = true; | ||||
|     "browser.startup.homepage" = "https://hamho.me"; | ||||
|     "browser.bookmarks.showMobileBookmarks" = true; | ||||
|     "browser.urlbar.suggest.quicksuggest.sponsored" = false; | ||||
|     "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; | ||||
|     "browser.aboutConfig.showWarning" = false; | ||||
|     "browser.ssb.enabled" = true; | ||||
|   }; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.firefox = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Firefox."; | ||||
|     extraConfig = | ||||
|       mkOpt str "" "Extra configuration for the user profile JS file."; | ||||
|     userChrome = | ||||
|       mkOpt str "" "Extra configuration for the user chrome CSS file."; | ||||
|     settings = mkOpt attrs defaultSettings "Settings to apply to the profile."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.desktop.addons.firefox-nordic-theme = enabled; | ||||
| 
 | ||||
|     services.gnome.gnome-browser-connector.enable = config.plusultra.desktop.gnome.enable; | ||||
| 
 | ||||
|     plusultra.home = { | ||||
|       file = { | ||||
|         ".mozilla/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/lib/mozilla/native-messaging-hosts/com.dannyvankooten.browserpass.json"; | ||||
| 
 | ||||
|         ".mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = mkIf config.plusultra.desktop.gnome.enable "${pkgs.chrome-gnome-shell}/lib/mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json"; | ||||
|       }; | ||||
| 
 | ||||
|       extraOptions = { | ||||
|         programs.firefox = { | ||||
|           enable = true; | ||||
|           package = pkgs.firefox.override ( | ||||
|             { | ||||
|               cfg = { | ||||
|                 enableBrowserpass = true; | ||||
|                 enableGnomeExtensions = config.plusultra.desktop.gnome.enable; | ||||
|               }; | ||||
| 
 | ||||
|               extraNativeMessagingHosts = | ||||
|                 optional | ||||
|                   config.plusultra.desktop.gnome.enable | ||||
|                   pkgs.gnomeExtensions.gsconnect; | ||||
|             } | ||||
|           ); | ||||
| 
 | ||||
|           profiles.${config.plusultra.user.name} = { | ||||
|             inherit (cfg) extraConfig userChrome settings; | ||||
|             id = 0; | ||||
|             name = config.plusultra.user.name; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										16
									
								
								modules/nixos/apps/frappe-books/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								modules/nixos/apps/frappe-books/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.frappe-books; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.frappe-books = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable FrappeBooks."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ plusultra.frappe-books ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/freetube/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/freetube/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.freetube; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.freetube = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable FreeTube."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ freetube ]; }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/gimp/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/gimp/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.gimp; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.gimp = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Gimp."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ gimp ]; }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/gparted/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/gparted/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.gparted; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.gparted = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable gparted."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ gparted ]; }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								modules/nixos/apps/hey/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								modules/nixos/apps/hey/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.hey; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.hey = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable HEY."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { environment.systemPackages = with pkgs.plusultra; [ hey ]; }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/inkscape/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/inkscape/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.apps.inkscape; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.inkscape = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Inkscape."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ inkscape-with-extensions google-fonts ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								modules/nixos/apps/logseq/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								modules/nixos/apps/logseq/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.apps.logseq; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.logseq = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable logseq."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ logseq ]; }; | ||||
| } | ||||
							
								
								
									
										9
									
								
								modules/nixos/apps/looking-glass-client/client.ini
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								modules/nixos/apps/looking-glass-client/client.ini
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | |||
| [input] | ||||
| escapeKey=56 | ||||
| rawMouse=yes | ||||
| mouseSens=6 | ||||
| 
 | ||||
| [win] | ||||
| size=1920x1080 | ||||
| autoResize=yes | ||||
| quickSplash=yes | ||||
							
								
								
									
										23
									
								
								modules/nixos/apps/looking-glass-client/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								modules/nixos/apps/looking-glass-client/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.looking-glass-client; | ||||
|   user = config.plusultra.user; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.looking-glass-client = with types; { | ||||
|     enable = | ||||
|       mkBoolOpt false "Whether or not to enable the Looking Glass client."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ looking-glass-client ]; | ||||
| 
 | ||||
|     environment.etc."looking-glass-client.ini" = { | ||||
|       user = "+${toString config.users.users.${user.name}.uid}"; | ||||
|       source = ./client.ini; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										21
									
								
								modules/nixos/apps/lutris/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								modules/nixos/apps/lutris/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.lutris; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.lutris = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Lutris."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       lutris | ||||
|       # Needed for some installers like League of Legends | ||||
|       openssl | ||||
|       gnome.zenity | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										25
									
								
								modules/nixos/apps/obs/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								modules/nixos/apps/obs/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.obs; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.obs = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable support for OBS."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = [ | ||||
|       (pkgs.wrapOBS { | ||||
|         plugins = with pkgs.obs-studio-plugins; [ | ||||
|           wlrobs | ||||
|           obs-multi-rtmp | ||||
|           obs-move-transition | ||||
|           looking-glass-obs | ||||
|         ]; | ||||
|       }) | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/pcsx2/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/pcsx2/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.pcsx2; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.pcsx2 = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable PCSX2."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ pcsx2 ]; }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/pitivi/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/pitivi/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.pitivi; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.pitivi = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Pitivi."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ pitivi ]; }; | ||||
| } | ||||
							
								
								
									
										16
									
								
								modules/nixos/apps/pocketcasts/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								modules/nixos/apps/pocketcasts/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.pocketcasts; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.pocketcasts = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Pocketcasts."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs.plusultra; [ pocketcasts ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/prismlauncher/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/prismlauncher/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.prismlauncher; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.prismlauncher = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Prism Launcher."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ prismlauncher ]; }; | ||||
| } | ||||
							
								
								
									
										16
									
								
								modules/nixos/apps/protontricks/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								modules/nixos/apps/protontricks/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.protontricks; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.protontricks = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Protontricks."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ protontricks ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										18
									
								
								modules/nixos/apps/r2modman/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								modules/nixos/apps/r2modman/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| { options | ||||
| , config | ||||
| , lib | ||||
| , pkgs | ||||
| , ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.plusultra; let | ||||
|   cfg = config.plusultra.apps.r2modman; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.r2modman = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable r2modman."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ r2modman ]; }; | ||||
| } | ||||
							
								
								
									
										16
									
								
								modules/nixos/apps/rpcs3/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								modules/nixos/apps/rpcs3/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.rpcs3; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.rpcs3 = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable rpcs3."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ rpcs3 ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										30
									
								
								modules/nixos/apps/steam/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								modules/nixos/apps/steam/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,30 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.steam; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.steam = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable support for Steam."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     programs.steam.enable = true; | ||||
|     programs.steam.remotePlay.openFirewall = true; | ||||
| 
 | ||||
|     hardware.steam-hardware.enable = true; | ||||
| 
 | ||||
|     # Enable GameCube controller support. | ||||
|     services.udev.packages = [ pkgs.dolphinEmu ]; | ||||
| 
 | ||||
|     environment.systemPackages = with pkgs.plusultra; [ | ||||
|       steam | ||||
|     ]; | ||||
| 
 | ||||
|     environment.sessionVariables = { | ||||
|       STEAM_EXTRA_COMPAT_TOOLS_PATHS = "$HOME/.steam/root/compatibilitytools.d"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										18
									
								
								modules/nixos/apps/steamtinkerlaunch/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								modules/nixos/apps/steamtinkerlaunch/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| { lib, pkgs, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.plusultra.apps.steamtinkerlaunch; | ||||
| 
 | ||||
|   inherit (lib) mkIf mkEnableOption; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.steamtinkerlaunch = { | ||||
|     enable = mkEnableOption "Steam Tinker Launch"; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       steamtinkerlaunch | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/twitter/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/twitter/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.twitter; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.twitter = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Twitter."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs.plusultra; [ twitter ]; }; | ||||
| } | ||||
							
								
								
									
										23
									
								
								modules/nixos/apps/ubports-installer/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								modules/nixos/apps/ubports-installer/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,23 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.ubports-installer; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.ubports-installer = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable the UBPorts Installer."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { | ||||
|       environment.systemPackages = with pkgs.plusultra; [ | ||||
|         ubports-installer | ||||
|       ]; | ||||
| 
 | ||||
|       services.udev.packages = with pkgs.plusultra; [ | ||||
|         ubports-installer-udev-rules | ||||
|       ]; | ||||
|     }; | ||||
| } | ||||
							
								
								
									
										21
									
								
								modules/nixos/apps/virtualbox/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								modules/nixos/apps/virtualbox/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.virtualbox; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.virtualbox = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Virtualbox."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     virtualisation.virtualbox.host = { | ||||
|       enable = true; | ||||
|       enableExtensionPack = true; | ||||
|     }; | ||||
| 
 | ||||
|     plusultra.user.extraGroups = [ "vboxusers" ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								modules/nixos/apps/vlc/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								modules/nixos/apps/vlc/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.vlc; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.vlc = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable vlc."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ vlc ]; }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								modules/nixos/apps/vscode/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								modules/nixos/apps/vscode/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.apps.vscode; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.vscode = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable vscode."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ vscode ]; }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/winetricks/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/winetricks/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.winetricks; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.winetricks = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Winetricks."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs; [ winetricks ]; }; | ||||
| } | ||||
							
								
								
									
										15
									
								
								modules/nixos/apps/yt-music/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/apps/yt-music/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.yt-music; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.yt-music = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable YouTube Music."; | ||||
|   }; | ||||
| 
 | ||||
|   config = | ||||
|     mkIf cfg.enable { environment.systemPackages = with pkgs.plusultra; [ yt-music ]; }; | ||||
| } | ||||
							
								
								
									
										17
									
								
								modules/nixos/apps/yubikey/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								modules/nixos/apps/yubikey/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.yubikey; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.yubikey = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Yubikey."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     services.yubikey-agent.enable = true; | ||||
|     environment.systemPackages = with pkgs; [ yubikey-manager-qt ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										16
									
								
								modules/nixos/apps/yuzu/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								modules/nixos/apps/yuzu/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.apps.yuzu; | ||||
| in | ||||
| { | ||||
|   options.plusultra.apps.yuzu = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Yuzu."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ yuzu-mainline ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										22
									
								
								modules/nixos/archetypes/gaming/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								modules/nixos/archetypes/gaming/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.archetypes.gaming; | ||||
| in | ||||
| { | ||||
|   options.plusultra.archetypes.gaming = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable the gaming archetype."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.suites = { | ||||
|       common = enabled; | ||||
|       desktop = enabled; | ||||
|       games = enabled; | ||||
|       social = enabled; | ||||
|       media = enabled; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										26
									
								
								modules/nixos/archetypes/server/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								modules/nixos/archetypes/server/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,26 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.archetypes.server; | ||||
| in | ||||
| { | ||||
|   options.plusultra.archetypes.server = with types; { | ||||
|     enable = | ||||
|       mkBoolOpt false "Whether or not to enable the server archetype."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra = { | ||||
|       suites = { | ||||
|         common-slim = enabled; | ||||
|       }; | ||||
| 
 | ||||
|       cli-apps = { | ||||
|         neovim = enabled; | ||||
|         tmux = enabled; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										29
									
								
								modules/nixos/archetypes/workstation/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								modules/nixos/archetypes/workstation/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.archetypes.workstation; | ||||
| in | ||||
| { | ||||
|   options.plusultra.archetypes.workstation = with types; { | ||||
|     enable = | ||||
|       mkBoolOpt false "Whether or not to enable the workstation archetype."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra = { | ||||
|       suites = { | ||||
|         common = enabled; | ||||
|         desktop = enabled; | ||||
|         development = enabled; | ||||
|         art = enabled; | ||||
|         video = enabled; | ||||
|         social = enabled; | ||||
|         media = enabled; | ||||
|       }; | ||||
| 
 | ||||
|       tools = { | ||||
|         appimage-run = enabled; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										18
									
								
								modules/nixos/cache/public/default.nix
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								modules/nixos/cache/public/default.nix
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.cache.public; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cache.public = { | ||||
|     enable = mkEnableOption "Plus Ultra public cache"; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.nix.extra-substituters = { | ||||
|       "https://attic.ruby.hamho.me/public".key = "public:QUkZTErD8fx9HQ64kuuEUZHO9tXNzws7chV8qy/KLUk="; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										18
									
								
								modules/nixos/cli-apps/flake/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								modules/nixos/cli-apps/flake/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| inputs@{ options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.cli-apps.flake; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cli-apps.flake = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable flake."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       snowfallorg.flake | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										47
									
								
								modules/nixos/cli-apps/neovim/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								modules/nixos/cli-apps/neovim/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,47 @@ | |||
| inputs @ { options | ||||
| , config | ||||
| , lib | ||||
| , pkgs | ||||
| , ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.plusultra; let | ||||
|   cfg = config.plusultra.cli-apps.neovim; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cli-apps.neovim = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable neovim."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       # FIXME: As of today (2022-12-09), `page` no longer works with my Neovim | ||||
|       # configuration. Either something in my configuration is breaking it or `page` is busted. | ||||
|       # page | ||||
|       plusultra.neovim | ||||
|     ]; | ||||
| 
 | ||||
|     environment.variables = { | ||||
|       # PAGER = "page"; | ||||
|       # MANPAGER = | ||||
|       #   "page -C -e 'au User PageDisconnect sleep 100m|%y p|enew! |bd! #|pu p|set ft=man'"; | ||||
|       PAGER = "less"; | ||||
|       MANPAGER = "less"; | ||||
|       NPM_CONFIG_PREFIX = "$HOME/.npm-global"; | ||||
|       EDITOR = "nvim"; | ||||
|     }; | ||||
| 
 | ||||
|     plusultra.home = { | ||||
|       configFile = { | ||||
|         "dashboard-nvim/.keep".text = ""; | ||||
|       }; | ||||
| 
 | ||||
|       extraOptions = { | ||||
|         # Use Neovim for Git diffs. | ||||
|         programs.zsh.shellAliases.vimdiff = "nvim -d"; | ||||
|         programs.bash.shellAliases.vimdiff = "nvim -d"; | ||||
|         programs.fish.shellAliases.vimdiff = "nvim -d"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										31
									
								
								modules/nixos/cli-apps/prisma/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								modules/nixos/cli-apps/prisma/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,31 @@ | |||
| { lib, pkgs, config, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.cli-apps.prisma; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cli-apps.prisma = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to install Prisma"; | ||||
|     pkgs = { | ||||
|       npm = mkOpt package pkgs.nodePackages.prisma "The NPM package to install"; | ||||
|       engines = mkOpt package pkgs.prisma-engines | ||||
|         "The package to get prisma engines from"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = [ cfg.pkgs.npm ]; | ||||
| 
 | ||||
|     plusultra.home.extraOptions = { | ||||
|       programs.zsh.initExtra = '' | ||||
|         export PRISMA_MIGRATION_ENGINE_BINARY="${cfg.pkgs.engines}/bin/migration-engine" | ||||
|         export PRISMA_QUERY_ENGINE_BINARY="${cfg.pkgs.engines}/bin/query-engine" | ||||
|         export PRISMA_QUERY_ENGINE_LIBRARY="${cfg.pkgs.engines}/lib/libquery_engine.node" | ||||
|         export PRISMA_INTROSPECTION_ENGINE_BINARY="${cfg.pkgs.engines}/bin/introspection-engine" | ||||
|         export PRISMA_FMT_BINARY="${cfg.pkgs.engines}/bin/prisma-fmt" | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										16
									
								
								modules/nixos/cli-apps/proton/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								modules/nixos/cli-apps/proton/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.cli-apps.proton; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cli-apps.proton = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Proton."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ proton-caller ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										20
									
								
								modules/nixos/cli-apps/thaw/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								modules/nixos/cli-apps/thaw/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | |||
| { config | ||||
| , lib | ||||
| , pkgs | ||||
| , ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.plusultra; let | ||||
|   cfg = config.plusultra.cli-apps.thaw; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cli-apps.thaw = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable thaw."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       snowfallorg.thaw | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										5
									
								
								modules/nixos/cli-apps/tmux/config/continuum.tmux
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								modules/nixos/cli-apps/tmux/config/continuum.tmux
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| # Enable saving sessions. | ||||
| set -g @continuum-restore 'on' | ||||
| 
 | ||||
| # Save every 30 minutes. | ||||
| set -g @continuum-save-interval '30' | ||||
							
								
								
									
										15
									
								
								modules/nixos/cli-apps/tmux/config/extrakto.tmux
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/nixos/cli-apps/tmux/config/extrakto.tmux
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| # Create a vertical split to show search & results to keep | ||||
| # the content visible. | ||||
| set -g @extrakto_split_direction "v" | ||||
| 
 | ||||
| # Override the way that Extrakto copies text. By default | ||||
| # it was trying to use xclip and would not properly pick | ||||
| # up on $XDG_SESSION_TYPE being wayland. Instead, use | ||||
| # Tmux's built-in clipboard functionality. | ||||
| set -g @extrakto_clip_tool_run "tmux_osc52" | ||||
| 
 | ||||
| # FIXME: The current version of Extrakto in | ||||
| # NixPkgs is out of date and does not support wayland. | ||||
| # This overrides the clipping tool to ensure that it works | ||||
| # under wayland. | ||||
| set -g @extrakto_clip_tool "wl-copy" | ||||
							
								
								
									
										2
									
								
								modules/nixos/cli-apps/tmux/config/fzf.tmux
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								modules/nixos/cli-apps/tmux/config/fzf.tmux
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,2 @@ | |||
| # Change default keybinding. | ||||
| TMUX_FZF_LAUNCH_KEY="C-f" | ||||
							
								
								
									
										38
									
								
								modules/nixos/cli-apps/tmux/config/general.tmux
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								modules/nixos/cli-apps/tmux/config/general.tmux
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,38 @@ | |||
| # Lower delay waiting for chord after escape key press. | ||||
| set -g escape-time 0 | ||||
| 
 | ||||
| # Change the prefix from C-b to C-s to make it easier to type. | ||||
| set -g prefix C-s | ||||
| unbind C-b | ||||
| bind C-s send-prefix | ||||
| 
 | ||||
| # Start window numbers at 1 rather than 0. | ||||
| set -g base-index 1 | ||||
| 
 | ||||
| # Use h, j, k, l for movement between panes. | ||||
| bind h select-pane -L | ||||
| bind j select-pane -D | ||||
| bind k select-pane -U | ||||
| bind l select-pane -R | ||||
| 
 | ||||
| # Fix colors being wrong in programs like Neovim. | ||||
| set-option -ga terminal-overrides ",xterm-256color:Tc" | ||||
| 
 | ||||
| # Expand the left status to accomodate longer session names. | ||||
| set-option -g status-left-length 20 | ||||
| 
 | ||||
| # One of the plugins binds C-l, make sure we have accces to it. | ||||
| unbind C-l | ||||
| bind -n C-l send-keys C-l | ||||
| 
 | ||||
| # Don't require a prompt to detach from the current session. | ||||
| unbind -n M-E | ||||
| bind -n M-E detach-client | ||||
| 
 | ||||
| # Reload tmux configuration from ~/.config/tmux/tmux.conf instead | ||||
| # of Tilish's default of ~/.tmux.conf. | ||||
| unbind -n M-C | ||||
| bind -n M-C source-file "~/.config/tmux/tmux.conf" | ||||
| 
 | ||||
| # Use M-z to zoom and unzoom panes. | ||||
| bind -n M-z resize-pane -Z | ||||
							
								
								
									
										21
									
								
								modules/nixos/cli-apps/tmux/config/navigator.tmux
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								modules/nixos/cli-apps/tmux/config/navigator.tmux
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | |||
| # Smart pane switching with awareness of Vim splits. | ||||
| # See: https://github.com/christoomey/vim-tmux-navigator | ||||
| is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | ||||
|     | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" | ||||
| 
 | ||||
| bind-key -n 'M-h' if-shell "$is_vim" 'send-keys M-h'  'select-pane -L' | ||||
| bind-key -n 'M-j' if-shell "$is_vim" 'send-keys M-j'  'select-pane -D' | ||||
| bind-key -n 'M-k' if-shell "$is_vim" 'send-keys M-k'  'select-pane -U' | ||||
| bind-key -n 'M-l' if-shell "$is_vim" 'send-keys M-l'  'select-pane -R' | ||||
| tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' | ||||
| if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ | ||||
|     "bind-key -n 'M-\\' if-shell \"$is_vim\" 'send-keys M-\\'  'select-pane -l'" | ||||
| if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ | ||||
|     "bind-key -n 'M-\\' if-shell \"$is_vim\" 'send-keys M-\\\\'  'select-pane -l'" | ||||
| 
 | ||||
| bind-key -T copy-mode-vi 'M-h' select-pane -L | ||||
| bind-key -T copy-mode-vi 'M-j' select-pane -D | ||||
| bind-key -T copy-mode-vi 'M-k' select-pane -U | ||||
| bind-key -T copy-mode-vi 'M-l' select-pane -R | ||||
| bind-key -T copy-mode-vi 'M-p' select-pane -l | ||||
| 
 | ||||
							
								
								
									
										37
									
								
								modules/nixos/cli-apps/tmux/config/nord.tmux
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								modules/nixos/cli-apps/tmux/config/nord.tmux
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,37 @@ | |||
| 
 | ||||
| # Copyright (C) 2017-present Arctic Ice Studio <development@arcticicestudio.com> | ||||
| # Copyright (C) 2017-present Sven Greb <development@svengreb.de> | ||||
| # Copyright (C) 2022-present Jake Hamilton <jake.hamilton@hey.com> | ||||
| 
 | ||||
| # Project:    Nord tmux | ||||
| # Repository: https://github.com/arcticicestudio/nord-tmux | ||||
| # License:    MIT | ||||
| 
 | ||||
| #+----------------+ | ||||
| #+ Plugin Support + | ||||
| #+----------------+ | ||||
| #+--- tmux-prefix-highlight ---+ | ||||
| set -g @prefix_highlight_output_prefix "#[fg=brightcyan]#[bg=black]#[nobold]#[noitalics]#[nounderscore]#[bg=brightcyan]#[fg=black]" | ||||
| set -g @prefix_highlight_output_suffix "" | ||||
| set -g @prefix_highlight_copy_mode_attr "fg=brightcyan,bg=black,bold" | ||||
| 
 | ||||
| #+--------+ | ||||
| #+ Status + | ||||
| #+--------+ | ||||
| #+--- Bars ---+ | ||||
| set -g status-left "#[fg=brightblack,bg=black]#[fg=white,bg=brightblack,bold] #S #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]" | ||||
| set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack,nobold] #H #[fg=brightblack,bg=black,nobold]" | ||||
| 
 | ||||
| #+--- Windows ---+ | ||||
| set -g window-status-format "#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] #I#[fg=white,bg=brightblack,nobold,noitalics,nounderscore]: #W #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]" | ||||
| set -g window-status-current-format "#[fg=#5e81ac,bg=black]#[fg=white,bg=#5e81ac,bold,noitalics,nounderscore] #I#[fg=white,bg=#5e81ac,bold,noitalics,nounderscore]: #W #[fg=#5e81ac,bg=black,nobold,noitalics,nounderscore]" | ||||
| set -g window-status-separator " " | ||||
| 
 | ||||
| # Center the window list (yes, this value has to be written as "centre"). | ||||
| set -g status-justify centre | ||||
| 
 | ||||
| #+----------------+ | ||||
| #+    Windows     + | ||||
| #+----------------+ | ||||
| #+--- Bars ---+ | ||||
| set -g pane-active-border-style "bg=default fg=blue" | ||||
							
								
								
									
										12
									
								
								modules/nixos/cli-apps/tmux/config/tilish.tmux
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								modules/nixos/cli-apps/tmux/config/tilish.tmux
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | |||
| # Integrate Tmux and Neovim movement. | ||||
| set -g @tilish-navigator "on" | ||||
| 
 | ||||
| # Default to splitting once vertically and then splitting horizontally | ||||
| # after that. | ||||
| select-layout "main-vertical" | ||||
| select-layout -E | ||||
| set -g @tilish-default "main-vertical" | ||||
| 
 | ||||
| 
 | ||||
| bind-key -n "M-q" kill-pane | ||||
| 
 | ||||
							
								
								
									
										20
									
								
								modules/nixos/cli-apps/tmux/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								modules/nixos/cli-apps/tmux/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | |||
| { lib | ||||
| , config | ||||
| , pkgs | ||||
| , ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.plusultra; let | ||||
|   cfg = config.plusultra.cli-apps.tmux; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cli-apps.tmux = { | ||||
|     enable = mkEnableOption "Tmux"; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       plusultra.tmux | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										20
									
								
								modules/nixos/cli-apps/wine/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								modules/nixos/cli-apps/wine/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.cli-apps.wine; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cli-apps.wine = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Wine."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = with pkgs; [ | ||||
|       winePackages.unstable | ||||
|       winetricks | ||||
|       wine64Packages.unstable | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										17
									
								
								modules/nixos/cli-apps/wshowkeys/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								modules/nixos/cli-apps/wshowkeys/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.cli-apps.wshowkeys; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cli-apps.wshowkeys = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable wshowkeys."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.user.extraGroups = [ "input" ]; | ||||
|     environment.systemPackages = with pkgs; [ wshowkeys ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										17
									
								
								modules/nixos/cli-apps/yubikey/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								modules/nixos/cli-apps/yubikey/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.cli-apps.yubikey; | ||||
| in | ||||
| { | ||||
|   options.plusultra.cli-apps.yubikey = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable Yubikey."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     services.yubikey-agent.enable = true; | ||||
|     environment.systemPackages = with pkgs; [ yubikey-manager ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										19
									
								
								modules/nixos/desktop/addons/electron-support/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								modules/nixos/desktop/addons/electron-support/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.desktop.addons.electron-support; | ||||
| in | ||||
| { | ||||
|   options.plusultra.desktop.addons.electron-support = with types; { | ||||
|     enable = mkBoolOpt false | ||||
|       "Whether to enable electron support in the desktop environment."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.home.configFile."electron-flags.conf".source = | ||||
|       ./electron-flags.conf; | ||||
| 
 | ||||
|     environment.sessionVariables = { NIXOS_OZONE_WL = "1"; }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,2 @@ | |||
| --enable-features=UseOzonePlatform | ||||
| --ozone-platform=wayland | ||||
|  | @ -0,0 +1,23 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.desktop.addons.firefox-nordic-theme; | ||||
|   profileDir = ".mozilla/firefox/${config.plusultra.user.name}"; | ||||
| in | ||||
| { | ||||
|   options.plusultra.desktop.addons.firefox-nordic-theme = with types; { | ||||
|     enable = mkBoolOpt false "Whether to enable the Nordic theme for firefox."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.apps.firefox = { | ||||
|       extraConfig = builtins.readFile | ||||
|         "${pkgs.plusultra.firefox-nordic-theme}/configuration/user.js"; | ||||
|       userChrome = '' | ||||
|         @import "${pkgs.plusultra.firefox-nordic-theme}/userChrome.css"; | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										20
									
								
								modules/nixos/desktop/addons/foot/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								modules/nixos/desktop/addons/foot/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.desktop.addons.foot; | ||||
| in | ||||
| { | ||||
|   options.plusultra.desktop.addons.foot = with types; { | ||||
|     enable = mkBoolOpt false "Whether to enable the gnome file manager."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.desktop.addons.term = { | ||||
|       enable = true; | ||||
|       pkg = pkgs.foot; | ||||
|     }; | ||||
| 
 | ||||
|     plusultra.home.configFile."foot/foot.ini".source = ./foot.ini; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										50
									
								
								modules/nixos/desktop/addons/foot/foot.ini
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								modules/nixos/desktop/addons/foot/foot.ini
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,50 @@ | |||
| ########################################### | ||||
| #░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░# | ||||
| #░░█▀█░█░░░█░█░█▀▀░░░█░█░█░░░▀█▀░█▀▄░█▀█░░# | ||||
| #░░█▀▀░█░░░█░█░▀▀█░░░█░█░█░░░░█░░█▀▄░█▀█░░# | ||||
| #░░▀░░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀░▀░▀░▀░░# | ||||
| #░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░# | ||||
| ########################################### | ||||
| 
 | ||||
| [main] | ||||
| font=Hack Nerd Font Mono:size=12 | ||||
| #,Noto Color Emoji:size=12 | ||||
| line-height=14 | ||||
| underline-offset=2 | ||||
| pad=20x4 center | ||||
| term=xterm-256color | ||||
| 
 | ||||
| [scrollback] | ||||
| lines=2000 | ||||
| 
 | ||||
| [url] | ||||
| protocols=http,https,ftp,ftps,file,gemini,gopher,mailto | ||||
| 
 | ||||
| [cursor] | ||||
| blink=yes | ||||
| 
 | ||||
| [colors] | ||||
| # Nord | ||||
| foreground=D8DEE9 | ||||
| background=2E3440 | ||||
| 
 | ||||
| regular0=2E3440 | ||||
| regular1=BF616A | ||||
| regular2=A3BE8C | ||||
| regular3=EBCB8B | ||||
| regular4=81A1C1 | ||||
| regular5=B48EAD | ||||
| regular6=88C0D0 | ||||
| regular7=E5E9F0 | ||||
| 
 | ||||
| bright0=4C566A | ||||
| bright1=BF616A | ||||
| bright2=A3BE8C | ||||
| bright3=EBCB8B | ||||
| bright4=8FBCBB | ||||
| bright5=B48EAD | ||||
| bright6=8FBCBB | ||||
| bright7=ECEFF4 | ||||
| 
 | ||||
| [csd] | ||||
| size=0 | ||||
							
								
								
									
										118
									
								
								modules/nixos/desktop/addons/gtk/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										118
									
								
								modules/nixos/desktop/addons/gtk/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,118 @@ | |||
| { options | ||||
| , config | ||||
| , lib | ||||
| , pkgs | ||||
| , ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.plusultra; let | ||||
|   cfg = config.plusultra.desktop.addons.gtk; | ||||
|   gdmCfg = config.services.xserver.displayManager.gdm; | ||||
| in | ||||
| { | ||||
|   options.plusultra.desktop.addons.gtk = with types; { | ||||
|     enable = mkBoolOpt false "Whether to customize GTK and apply themes."; | ||||
|     theme = { | ||||
|       name = | ||||
|         mkOpt str "Nordic-darker" | ||||
|           "The name of the GTK theme to apply."; | ||||
|       pkg = mkOpt package pkgs.nordic "The package to use for the theme."; | ||||
|     }; | ||||
|     cursor = { | ||||
|       name = | ||||
|         mkOpt str "Bibata-Modern-Ice" | ||||
|           "The name of the cursor theme to apply."; | ||||
|       pkg = mkOpt package pkgs.plusultra.bibata-cursors "The package to use for the cursor theme."; | ||||
|     }; | ||||
|     icon = { | ||||
|       name = | ||||
|         mkOpt str "Papirus" | ||||
|           "The name of the icon theme to apply."; | ||||
|       pkg = mkOpt package pkgs.papirus-icon-theme "The package to use for the icon theme."; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     environment.systemPackages = [ | ||||
|       cfg.icon.pkg | ||||
|       cfg.cursor.pkg | ||||
|     ]; | ||||
| 
 | ||||
|     environment.sessionVariables = { | ||||
|       XCURSOR_THEME = cfg.cursor.name; | ||||
|     }; | ||||
| 
 | ||||
|     plusultra.home.extraOptions = { | ||||
|       gtk = { | ||||
|         enable = true; | ||||
| 
 | ||||
|         theme = { | ||||
|           name = cfg.theme.name; | ||||
|           package = cfg.theme.pkg; | ||||
|         }; | ||||
| 
 | ||||
|         cursorTheme = { | ||||
|           name = cfg.cursor.name; | ||||
|           package = cfg.cursor.pkg; | ||||
|         }; | ||||
| 
 | ||||
|         iconTheme = { | ||||
|           name = cfg.icon.name; | ||||
|           package = cfg.icon.pkg; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     # NOTE: In order to set the cursor theme in GDM we have to specify it in the | ||||
|     # dconf profile. However, the NixOS module doesn't provide an easy way to do this so the relevant | ||||
|     # parts have been extracted from: | ||||
|     # https://github.com/NixOS/nixpkgs/blob/96e18717904dfedcd884541e5a92bf9ff632cf39/nixos/modules/services/x11/display-managers/gdm.nix | ||||
|     # | ||||
|     # NOTE: The GTK and icon themes don't seem to affect recent GDM versions. I've | ||||
|     # left them here as reference for the future. | ||||
|     programs.dconf.profiles = mkIf gdmCfg.enable { | ||||
|       gdm = | ||||
|         let | ||||
|           customDconf = pkgs.writeTextFile { | ||||
|             name = "gdm-dconf"; | ||||
|             destination = "/dconf/gdm-custom"; | ||||
|             text = '' | ||||
|               ${optionalString (!gdmCfg.autoSuspend) '' | ||||
|                 [org/gnome/settings-daemon/plugins/power] | ||||
|                 sleep-inactive-ac-type='nothing' | ||||
|                 sleep-inactive-battery-type='nothing' | ||||
|                 sleep-inactive-ac-timeout=0 | ||||
|                 sleep-inactive-battery-timeout=0 | ||||
|               ''} | ||||
| 
 | ||||
|               [org/gnome/desktop/interface] | ||||
|               gtk-theme='${cfg.theme.name}' | ||||
|               cursor-theme='${cfg.cursor.name}' | ||||
|               icon-theme='${cfg.icon.name}' | ||||
|             ''; | ||||
|           }; | ||||
| 
 | ||||
|           customDconfDb = pkgs.stdenv.mkDerivation { | ||||
|             name = "gdm-dconf-db"; | ||||
|             buildCommand = '' | ||||
|               ${pkgs.dconf}/bin/dconf compile $out ${customDconf}/dconf | ||||
|             ''; | ||||
|           }; | ||||
|         in | ||||
|         mkForce ( | ||||
|           pkgs.stdenv.mkDerivation { | ||||
|             name = "dconf-gdm-profile"; | ||||
|             buildCommand = '' | ||||
|               # Check that the GDM profile starts with what we expect. | ||||
|               if [ $(head -n 1 ${pkgs.gnome.gdm}/share/dconf/profile/gdm) != "user-db:user" ]; then | ||||
|                 echo "GDM dconf profile changed, please update gtk/default.nix" | ||||
|                 exit 1 | ||||
|               fi | ||||
|               # Insert our custom DB behind it. | ||||
|               sed '2ifile-db:${customDconfDb}' ${pkgs.gnome.gdm}/share/dconf/profile/gdm > $out | ||||
|             ''; | ||||
|           } | ||||
|         ); | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										3
									
								
								modules/nixos/desktop/addons/kanshi/config
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								modules/nixos/desktop/addons/kanshi/config
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| profile { | ||||
|   output eDP-1 enable scale 2 | ||||
| } | ||||
							
								
								
									
										41
									
								
								modules/nixos/desktop/addons/kanshi/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								modules/nixos/desktop/addons/kanshi/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,41 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let | ||||
|   cfg = config.plusultra.desktop.addons.kanshi; | ||||
|   user = config.plusultra.user; | ||||
|   home = config.users.users.${user.name}.home; | ||||
| in | ||||
| { | ||||
|   options.plusultra.desktop.addons.kanshi = with types; { | ||||
|     enable = | ||||
|       mkBoolOpt false "Whether to enable Kanshi in the desktop environment."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     plusultra.home.configFile."kanshi/config".source = ./config; | ||||
| 
 | ||||
|     environment.systemPackages = with pkgs; [ kanshi ]; | ||||
| 
 | ||||
|     # configuring kanshi | ||||
|     systemd.user.services.kanshi = { | ||||
|       description = "Kanshi output autoconfig "; | ||||
|       wantedBy = [ "graphical-session.target" ]; | ||||
|       partOf = [ "graphical-session.target" ]; | ||||
|       environment = { XDG_CONFIG_HOME = "${home}/.config"; }; | ||||
|       serviceConfig = { | ||||
|         ExecCondition = '' | ||||
|           ${pkgs.bash}/bin/bash -c '[ -n "$WAYLAND_DISPLAY" ]' | ||||
|         ''; | ||||
| 
 | ||||
|         ExecStart = '' | ||||
|           ${pkgs.kanshi}/bin/kanshi | ||||
|         ''; | ||||
| 
 | ||||
|         RestartSec = 5; | ||||
|         Restart = "always"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										17
									
								
								modules/nixos/desktop/addons/keyring/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								modules/nixos/desktop/addons/keyring/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| { options, config, lib, pkgs, ... }: | ||||
| 
 | ||||
| with lib; | ||||
| with lib.plusultra; | ||||
| let cfg = config.plusultra.desktop.addons.keyring; | ||||
| in | ||||
| { | ||||
|   options.plusultra.desktop.addons.keyring = with types; { | ||||
|     enable = mkBoolOpt false "Whether to enable the gnome keyring."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     services.gnome.gnome-keyring.enable = true; | ||||
| 
 | ||||
|     environment.systemPackages = with pkgs; [ gnome.seahorse ]; | ||||
|   }; | ||||
| } | ||||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue