use stylix for styling
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| {pkgs, ...}:  | ||||
| {pkgs, ...}: | ||||
| { | ||||
|   programs.vscode = { | ||||
|     enable = true; | ||||
| @@ -32,9 +32,9 @@ | ||||
|  | ||||
|     userSettings = { | ||||
|       # visual | ||||
|       "editor.fontFamily" = "'FiraCode Nerd Font Mono', 'monospace', monospace"; | ||||
|       "terminal.integrated.fontFamily" = "FiraCode Nerd Font Mono"; | ||||
|       "workbench.iconTheme" = "vs-seti"; | ||||
|       # "editor.fontFamily" = "'FiraCode Nerd Font Mono', 'monospace', monospace"; | ||||
|       # "terminal.integrated.fontFamily" = "FiraCode Nerd Font Mono"; | ||||
|       # "workbench.iconTheme" = "vs-seti"; | ||||
|  | ||||
|       # telemetry | ||||
|       "telemetry.enableCrashReporter" = false; | ||||
| @@ -45,52 +45,46 @@ | ||||
|       # editor QOL | ||||
|       "security.workspace.trust.untrustedFiles" = "open"; | ||||
|       "editor.wordWrap" = "on"; | ||||
|       "editor.suggestSelection" = "first"; | ||||
|       "editor.renderWhitespace" = "none"; | ||||
|       "editor.acceptSuggestionOnEnter" = "off"; | ||||
|       "editor.fontLigatures" = true; | ||||
|       "editor.inlineSuggest.enabled" = true; | ||||
|       "editor.bracketPairColorization.enabled" = true; | ||||
|       "editor.unicodeHighlight.nonBasicASCII" = false; | ||||
|       "editor.unicodeHighlight.invisibleCharacters" = false; | ||||
|       "editor.unicodeHighlight.ambiguousCharacters" = false; | ||||
|  | ||||
|       "files.autoSave" = "onWindowChange"; | ||||
|       "files.autoSaveDelay" = 1000; | ||||
|       "files.insertFinalNewline" = true; | ||||
|       "files.trimTrailingWhitespace" = true; | ||||
|       "git.ignoreMissingGitWarning" = true; | ||||
|       "editor.suggestSelection" = "first"; | ||||
|       "workbench.startupEditor" = "newUntitledFile"; | ||||
|       "editor.renderWhitespace" = "none"; | ||||
|       "editor.acceptSuggestionOnEnter" = "off"; | ||||
|  | ||||
|       "explorer.confirmDelete" = false; | ||||
|       "git.confirmSync" = false; | ||||
|       "git.enableSmartCommit" = true; | ||||
|       "editor.fontLigatures" = true; | ||||
|       "explorer.confirmDragAndDrop" = false; | ||||
|       "editor.inlineSuggest.enabled" = true; | ||||
|       "diffEditor.renderSideBySide" = false; | ||||
|       "github.copilot.enable" = { | ||||
|           "*" = true; | ||||
|           "plaintext" = true; | ||||
|           "markdown" = true; | ||||
|           "scminput" = false; | ||||
|           "yaml" = true; | ||||
|       }; | ||||
|       "editor.bracketPairColorization.enabled" = true; | ||||
|       "git.autofetch" = true; | ||||
|       "terminal.integrated.enableMultiLinePasteWarning" = false; | ||||
|       "editor.unicodeHighlight.nonBasicASCII" = false; | ||||
|       "jupyter.disableJupyterAutoStart" = true; | ||||
|       "editor.unicodeHighlight.invisibleCharacters" = false; | ||||
|       "editor.unicodeHighlight.ambiguousCharacters" = false; | ||||
|       "diffEditor.ignoreTrimWhitespace" = false; | ||||
|       "update.showReleaseNotes" = false; | ||||
|       "terminal.external.linuxExec" = "kitty"; | ||||
|       "window.dialogStyle" = "custom"; | ||||
|       "window.titleBarStyle" = "custom"; | ||||
|       "github.copilot.editor.enableAutoCompletions" = true; | ||||
|       "window.menuBarVisibility" = "compact"; | ||||
|       "workbench.colorTheme" = "Default Light+"; | ||||
|       "workbench.startupEditor" = "newUntitledFile"; | ||||
|       # "workbench.colorTheme" = "Default Light+"; | ||||
|       "github.copilot.editor.enableAutoCompletions" = true; | ||||
|       "github.copilot.advanced" = {}; | ||||
|       "git.openRepositoryInParentFolders" = "never"; | ||||
|       "terminal.integrated.commandsToSkipShell" = [ | ||||
|           "language-julia.interrupt" | ||||
|       ]; | ||||
|       "github.copilot.enable" = { | ||||
|           "*" = true; | ||||
|       }; | ||||
|  | ||||
|       # git | ||||
|       "git.ignoreMissingGitWarning" = true; | ||||
|       "git.confirmSync" = false; | ||||
|       "git.enableSmartCommit" = true; | ||||
|       "git.autofetch" = true; | ||||
|       "diffEditor.renderSideBySide" = false; | ||||
|       "diffEditor.hideUnchangedRegions.enabled" = true; | ||||
|       "diffEditor.ignoreTrimWhitespace" = false; | ||||
|  | ||||
|       # Python | ||||
|       "jupyter.disableJupyterAutoStart" = true; | ||||
|       "jupyter.askForKernelRestart" = false; | ||||
|       "workbench.editorAssociations" = { | ||||
|           "*.ipynb" = "jupyter-notebook"; | ||||
| @@ -110,6 +104,7 @@ | ||||
|           "editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?"; | ||||
|       }; | ||||
|       "[typst-code]" = { | ||||
|       "git.openRepositoryInParentFolders" = "never"; | ||||
|           "editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?"; | ||||
|       }; | ||||
|       "tinymist.fontPaths" = [ | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| {pkgs, ...}:  | ||||
| {pkgs, ...}: | ||||
| { | ||||
|     programs.direnv = { | ||||
|         enable = true; | ||||
|         enableFishIntegration = true; # see note on other shells below | ||||
|         # enableFishIntegration = true; # see note on other shells below | ||||
|         nix-direnv.enable = true; | ||||
|     }; | ||||
| } | ||||
|   | ||||
| @@ -168,8 +168,9 @@ | ||||
|  | ||||
|       monitor = [ | ||||
|         "eDP-1, 3840x2160, 0x0, 1.5" # the internal laptop monitor | ||||
|         "DP-2, 3840x2160, 0x-1440, 1.5" | ||||
|         ", preferred, auto, 1" # automatically add any newly detected monitor | ||||
|         # Samsung monitor at irchel (matching the description) | ||||
|         # "desc:Samsung Electric Company LS27D80xU HK7X800803, 3840x2160, auto-up, 1.5" | ||||
|         ", preferred, auto-up, auto" # automatically add any newly detected monitor | ||||
|       ]; | ||||
|  | ||||
|       xwayland = { | ||||
|   | ||||
| @@ -4,60 +4,60 @@ | ||||
|  ... | ||||
| }: | ||||
| with lib; let | ||||
|   # load the wallpapers from the wallpapers directory - this gives a set with the folder content | ||||
|   dirContent = builtins.readDir ../../../wallpapers; | ||||
|   wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers; | ||||
|   # # load each wallpaper and keep its path (now in the nix store) as an array | ||||
|   # wallpapers = map (x: builtins.readDir "${../../../wallpapers}/${x.value}") dirContent; | ||||
|   # # load the wallpapers from the wallpapers directory - this gives a set with the folder content | ||||
|   # dirContent = builtins.readDir ../../../wallpapers; | ||||
|   # wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers; | ||||
|   # # # load each wallpaper and keep its path (now in the nix store) as an array | ||||
|   # # wallpapers = map (x: builtins.readDir "${../../../wallpapers}/${x.value}") dirContent; | ||||
|   # # wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers; | ||||
|  | ||||
|   # script that picks a random wallpaper from the array and sets it as the desktop background | ||||
|   monitor = ""; # leave empty to set the wallpaper on all monitors | ||||
|   # # script that picks a random wallpaper from the array and sets it as the desktop background | ||||
|   # monitor = ""; # leave empty to set the wallpaper on all monitors | ||||
|  | ||||
|   wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" '' | ||||
|     wallpaper=$(shuf -n 1 -e ${wallpaperString}) | ||||
|     hyprctl hyprpaper unload all | ||||
|     hyprctl hyprpaper preload $wallpaper | ||||
|     hyprctl hyprpaper wallpaper "${monitor},$wallpaper" | ||||
|   ''; | ||||
|   # wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" '' | ||||
|   #   wallpaper=$(shuf -n 1 -e ${wallpaperString}) | ||||
|   #   hyprctl hyprpaper unload all | ||||
|   #   hyprctl hyprpaper preload $wallpaper | ||||
|   #   hyprctl hyprpaper wallpaper "${monitor},$wallpaper" | ||||
|   # ''; | ||||
|  | ||||
| in { | ||||
|   home.packages = [wallpaperRandomizer]; | ||||
|   # home.packages = [wallpaperRandomizer]; | ||||
|  | ||||
|  | ||||
|  | ||||
|   services.hyprpaper = { | ||||
|     enable = true; | ||||
|  | ||||
|     settings = { | ||||
|       ipc = "off"; | ||||
|       splash = false; | ||||
|     }; | ||||
|   }; | ||||
|   #   settings = { | ||||
|   #     ipc = "off"; | ||||
|   #     splash = false; | ||||
|   #   }; | ||||
|   # }; | ||||
|  | ||||
|   systemd.user = { | ||||
|     services.wallpaperRandomizer = { | ||||
|       Install = {WantedBy = ["graphical-session.target"];}; | ||||
|   # systemd.user = { | ||||
|   #   services.wallpaperRandomizer = { | ||||
|   #     Install = {WantedBy = ["graphical-session.target"];}; | ||||
|  | ||||
|       Unit = { | ||||
|         Description = "Set random desktop background using hyprpaper"; | ||||
|         After = ["graphical-session-pre.target"]; | ||||
|         PartOf = ["graphical-session.target"]; | ||||
|       }; | ||||
|   #     Unit = { | ||||
|   #       Description = "Set random desktop background using hyprpaper"; | ||||
|   #       After = ["graphical-session-pre.target"]; | ||||
|   #       PartOf = ["graphical-session.target"]; | ||||
|   #     }; | ||||
|  | ||||
|       Service = { | ||||
|         Type = "oneshot"; | ||||
|         ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer"; | ||||
|         IOSchedulingClass = "idle"; | ||||
|       }; | ||||
|     }; | ||||
|   #     Service = { | ||||
|   #       Type = "oneshot"; | ||||
|   #       ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer"; | ||||
|   #       IOSchedulingClass = "idle"; | ||||
|   #     }; | ||||
|   #   }; | ||||
|  | ||||
|     timers.wallpaperRandomizer = { | ||||
|       Unit = {Description = "Set random desktop background using hyprpaper on an interval";}; | ||||
|   #   timers.wallpaperRandomizer = { | ||||
|   #     Unit = {Description = "Set random desktop background using hyprpaper on an interval";}; | ||||
|  | ||||
|       Timer = {OnUnitActiveSec = "6h";}; | ||||
|   #     Timer = {OnUnitActiveSec = "6h";}; | ||||
|  | ||||
|       Install = {WantedBy = ["timers.target"];}; | ||||
|     }; | ||||
|   }; | ||||
|   #     Install = {WantedBy = ["timers.target"];}; | ||||
|   #   }; | ||||
|   # }; | ||||
| } | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|         enable = true; | ||||
|         shellIntegration.enableFishIntegration = true; | ||||
|         settings = { | ||||
|             background_opacity = 0.8; | ||||
|             # background_opacity = 0.8; | ||||
|             confirm_os_window_close = 0; | ||||
|             enable_audio_bell = false; | ||||
|             cursor_trail = 3; | ||||
|   | ||||
							
								
								
									
										33
									
								
								modules/home-manager/stylix.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								modules/home-manager/stylix.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| {pkgs, ...}: | ||||
| { | ||||
|     stylix = { | ||||
|         # Stylix is already enabled since the system is configured to use it | ||||
|         # enable = true; | ||||
|         # don't theme applications by default | ||||
|         autoEnable = false; | ||||
|  | ||||
|         cursor = { | ||||
|             package = pkgs.apple-cursor; | ||||
|             name = "macOS"; | ||||
|             size = 32; | ||||
|         }; | ||||
|  | ||||
|         # TODO | ||||
|         # fonts = {}; | ||||
|  | ||||
|         iconTheme = { | ||||
|             package = pkgs.tela-icon-theme; | ||||
|         }; | ||||
|  | ||||
|         image = ./../../wallpapers/magicpattern-87PP9Zd7MNo-unsplash.jpg; | ||||
|  | ||||
|     }; | ||||
|  | ||||
|     stylix.targets = { | ||||
|         vscode.enable = true; | ||||
|         hyprpaper.enable = true; | ||||
|         waybar.enable = true; | ||||
|         wofi.enable = true; | ||||
|         kitty.enable = true; | ||||
|     }; | ||||
| } | ||||
							
								
								
									
										11
									
								
								modules/nixos/stylix.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								modules/nixos/stylix.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
|   stylix.enable = true; | ||||
|   stylix.image = ./../../wallpapers/magicpattern-87PP9Zd7MNo-unsplash.jpg; | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user