refactor(flake-parts): initial flake-parts configuration
This commit is contained in:
		
							parent
							
								
									8f67be9e68
								
							
						
					
					
						commit
						5603001d65
					
				
					 230 changed files with 380 additions and 717 deletions
				
			
		
							
								
								
									
										0
									
								
								inputs/home/modules/desktop/browser/brave/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								inputs/home/modules/desktop/browser/brave/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								inputs/home/modules/desktop/browser/chrome/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								inputs/home/modules/desktop/browser/chrome/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										29
									
								
								inputs/home/modules/desktop/browser/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								inputs/home/modules/desktop/browser/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| { lib, ... }: | ||||
| { | ||||
| 
 | ||||
|   imports = [ | ||||
|     ./firefox | ||||
|     # ./schizofox | ||||
|     #./chrome -- still needs to be implemented | ||||
|     #./brave -- still needs tio be implemented | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.browser = { | ||||
|     firefox = { | ||||
|       enable = lib.mkEnableOption "Enable firefox browser"; | ||||
|       default = lib.mkOption { | ||||
|         type = lib.types.bool; | ||||
|         default = false; | ||||
|         description = "Set Firefox as default browser"; | ||||
|       }; | ||||
|     }; | ||||
|     schizofox = { | ||||
|       enable = lib.mkEnableOption "Enable schizofox browser"; | ||||
|       default = lib.mkOption { | ||||
|         type = lib.types.bool; | ||||
|         default = false; | ||||
|         description = "Set schizofox as default browser"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										31
									
								
								inputs/home/modules/desktop/browser/firefox/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								inputs/home/modules/desktop/browser/firefox/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,31 @@ | |||
| { pkgs, lib, inputs, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   addons = inputs.firefox-addons.packages.${pkgs.system}; | ||||
|   cfg = config.homeModules.desktop.browser.firefox; | ||||
|   inherit (lib) mkIf; | ||||
| in | ||||
| { | ||||
| 
 | ||||
|   config = { | ||||
|     nixpkgs.config.allowUnfree = true; | ||||
|     home.sessionVariables = mkIf cfg.default { | ||||
|       BROWSER = "firefox"; | ||||
|     }; | ||||
|    | ||||
|     programs.firefox = mkIf cfg.enable { | ||||
|       enable = true; | ||||
|       profiles.ooks = { | ||||
|         extensions = with addons; [ | ||||
|           ublock-origin | ||||
|           darkreader | ||||
|           tridactyl | ||||
|           # onepassword-password-manager # cannot get this to work unfree issue. | ||||
|         ]; | ||||
|         settings = import ./settings/ooksJs.nix; | ||||
|         userChrome = import ./theme/penguinFox.nix; | ||||
|         userContent = import ./theme/penguinFoxContent.nix; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -0,0 +1,68 @@ | |||
| { | ||||
|   #Basic Settings | ||||
|   "browser.disableResetPrompt" = true; | ||||
|   "toolkit.legacyUserProfileCustomizations.stylesheets" = true; | ||||
|   "browser.cache.disk.enable" = false; | ||||
|   "browser.cache.memory.enable" = true; | ||||
|   "browser.cache.memory.capacity" = 524288; | ||||
|   "browser.sessionstore.interval" = 15000000; | ||||
|   "extensions.pocket.enabled" = false; | ||||
|   "reader.parse-on-load.enabled" = false; | ||||
|   "accessibility.force_disabled" = 1; | ||||
|   "browser.helperApps.deleteTempFileOnExit" = true; | ||||
|   "browser.uitour.enabled" = false; | ||||
| 
 | ||||
|   #Startup | ||||
|   "browser.newtabpage.activity-stream.showSponsored" = false; | ||||
|   "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; | ||||
|   "browser.newtabpage.activity-stream.default.sites" = ""; | ||||
|   "browser.aboutConfig.showWarning" = false; | ||||
| 
 | ||||
|   #Disable recommendations | ||||
|   "extensions.getAddons.showPane" = false; | ||||
|   "extensions.htmlaboutaddons.recommendations.enabled" = false; | ||||
|   "browser.discovery.enabled" = false; | ||||
| 
 | ||||
|   #Telemetry | ||||
|   "datareporting.policy.dataSubmissionEnabled" = false; | ||||
|   "datareporting.healthreport.uploadEnabled" = false; | ||||
|   "toolkit.telemetry.unified" = false; | ||||
|   "toolkit.telemetry.enabled" = false; | ||||
|   "toolkit.telemetry.server" = "data:,"; | ||||
|   "toolkit.telemetry.archive.enabled" = false; | ||||
|   "toolkit.telemetry.newProfilePing.enabled" = false; | ||||
|   "toolkit.telemetry.shutdownPingSender.enabled" = false; | ||||
|   "toolkit.telemetry.updatePing.enabled" = false; | ||||
|   "toolkit.telemetry.bhrPing.enabled" = false; | ||||
|   "toolkit.telemetry.firstShutdownPing.enabled" = false; | ||||
|   "toolkit.telemetry.coverage.opt-out" = true;  | ||||
|   "toolkit.coverage.opt-out" = true; | ||||
|   "toolkit.coverage.endpoint.base" = ""; | ||||
|   "browser.ping-centre.telemetry" = false; | ||||
|   "browser.newtabpage.activity-stream.feeds.telemetry" = false; | ||||
|   "browser.newtabpage.activity-stream.telemetry" = false; | ||||
|   "toolkit.telemetry.reportingpolicy.firstRun" = false; | ||||
|   "toolkit.telemetry.shutdownPingSender.enabledFirstsession" = false; | ||||
|   "browser.vpn_promo.enabled" = false; | ||||
|   "app.shield.optoutstudies.enabled" = false; | ||||
|   "app.normandy.enabled" = false; | ||||
|   "app.normandy.api_url" = ""; | ||||
| 
 | ||||
|   #Crash Reports | ||||
|   "breakpad.reportURL" = ""; | ||||
|   "browser.tabs.crashReporting.sendReport" = false; | ||||
|   "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; | ||||
| 
 | ||||
|   #Other | ||||
|   "captivedetect.canonicalURL" = ""; | ||||
|   "network.captive-portal-service.enabled" = false; | ||||
|   "network.connectivity-service.enabled" = false; | ||||
| 
 | ||||
|   #Geolocation | ||||
|   "geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"; | ||||
|   "geo.provider.use_gpsd" = false; | ||||
|   "geo.provider.use_geoclue" = false; | ||||
| 
 | ||||
|   #Calculator | ||||
|     "browser.urlbar.suggest.calculator" = true; | ||||
| } | ||||
							
								
								
									
										180
									
								
								inputs/home/modules/desktop/browser/firefox/theme/penguinFox.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										180
									
								
								inputs/home/modules/desktop/browser/firefox/theme/penguinFox.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,180 @@ | |||
|  /* css */  | ||||
| '' | ||||
|   /* config */ | ||||
| 
 | ||||
|   * { | ||||
|     --animation-speed: 0.2s; | ||||
|     --button-corner-rounding: 30px; | ||||
|     --urlbar-container-height: 40px !important; | ||||
|     --urlbar-min-height: 30px !important; | ||||
|     --urlbar-height: 30px !important; | ||||
|     --urlbar-toolbar-height: 38px !important; | ||||
|     --moz-hidden-unscrollable: scroll !important; | ||||
|     --toolbarbutton-border-radius: 3px !important; | ||||
|     --tabs-border-color: transparent; | ||||
|   } | ||||
| 
 | ||||
|   :root { | ||||
|       --window: -moz-Dialog !important; | ||||
|       --secondary: color-mix(in srgb, currentColor 5%, -moz-Dialog) !important; | ||||
|       --uc-border-radius: 0px; | ||||
|       --uc-status-panel-spacing: 0px; | ||||
|       --uc-page-action-margin: 7px; | ||||
|   } | ||||
| 
 | ||||
|   /* animation and effect */ | ||||
|   #nav-bar:not([customizing]) { | ||||
|     visibility: visible; | ||||
|     margin-top: -40px; | ||||
|     transition-delay: 0.1s; | ||||
|     filter: alpha(opacity=0); | ||||
|     opacity: 0; | ||||
|     transition: visibility, ease 0.1s, margin-top, ease 0.1s, opacity, ease 0.1s, | ||||
|     rotate, ease 0.1s !important; | ||||
|   } | ||||
| 
 | ||||
|   #nav-bar:hover, | ||||
|   #nav-bar:focus-within, | ||||
|   #urlbar[focused='true'], | ||||
|   #identity-box[open='true'], | ||||
|   #titlebar:hover + #nav-bar:not([customizing]), | ||||
|   #toolbar-menubar:not([inactive='true']) ~ #nav-bar:not([customizing]) { | ||||
|     visibility: visible; | ||||
| 
 | ||||
|     margin-top: 0px; | ||||
|     filter: alpha(opacity=100); | ||||
|     opacity: 100; | ||||
|     margin-bottom: -0.2px; | ||||
|   } | ||||
|   #PersonalToolbar { | ||||
|     margin-top: 0px; | ||||
|   } | ||||
|   #nav-bar .toolbarbutton-1[open='true'] { | ||||
|     visibility: visible; | ||||
|     opacity: 100; | ||||
|   } | ||||
| 
 | ||||
|   tab:not(:active) .tab-background { | ||||
|     transition: background-color var(--animation-speed) !important; | ||||
|   } | ||||
|   :root:not([customizing]) :hover > .tabbrowser-tab:not(:hover) { | ||||
|     transition: blur, ease 0.1s !important; | ||||
|   } | ||||
| 
 | ||||
|   :root:not([customizing]) :not(:hover) > .tabbrowser-tab { | ||||
|     transition: blur, ease 0.1s !important; | ||||
|   } | ||||
| 
 | ||||
|   #tabbrowser-tabs .tab-label-container[customizing] { | ||||
|     color: transparent; | ||||
|     transition: ease 0.1s; | ||||
|     transition-delay: 0.2s; | ||||
|   } | ||||
| 
 | ||||
|   .tabbrowser-tab:not([pinned]) .tab-icon-image ,.bookmark-item .toolbarbutton-icon{opacity: 0!important; transition: .15s !important; width: 0!important; padding-left: 16px!important} | ||||
|   .tabbrowser-tab:not([pinned]):hover .tab-icon-image,.bookmark-item:hover .toolbarbutton-icon{opacity: 100!important; transition: .15s !important; display: inline-block!important; width: 16px!important; padding-left: 0!important} | ||||
|   .tabbrowser-tab:not([hover]) .tab-icon-image,.bookmark-item:not([hover]) .toolbarbutton-icon{padding-left: 0!important} | ||||
| 
 | ||||
|   /*  Removes annoying buttons and spaces */ | ||||
|   #firefox-view-button, .titlebar-spacer[type="pre-tabs"], .titlebar-spacer[type="post-tabs"]{display: none !important} | ||||
|   #tabbrowser-tabs{border-inline-start-width: 0!important} | ||||
| 
 | ||||
|   /*  Makes some buttons nicer  */ | ||||
|   #PanelUI-menu-button, #unified-extensions-button, #reload-button, #stop-button {padding: 2px !important} | ||||
|   #reload-button, #stop-button{margin: 1px !important;} | ||||
| 
 | ||||
|   /* Tabs colors  */ | ||||
|   #tabbrowser-tabs:not([movingtab]) | ||||
|     > #tabbrowser-arrowscrollbox | ||||
|     > .tabbrowser-tab | ||||
|     > .tab-stack | ||||
|     > .tab-background[multiselected='true'], | ||||
|   #tabbrowser-tabs:not([movingtab]) | ||||
|     > #tabbrowser-arrowscrollbox | ||||
|     > .tabbrowser-tab | ||||
|     > .tab-stack | ||||
|     > .tab-background[selected='true'] { | ||||
|     background-image: none !important; | ||||
|     background-color: var(--toolbar-bgcolor) !important; | ||||
|   } | ||||
| 
 | ||||
|   /* Inactive tabs color */ | ||||
|   #navigator-toolbox { | ||||
|     background-color: var(--window) !important; | ||||
|   } | ||||
| 
 | ||||
|   /* X-button */ | ||||
|   :root { | ||||
|       --show-tab-close-button: none; | ||||
|       --show-tab-close-button-hover: -moz-inline-block; | ||||
|   } | ||||
|   .tabbrowser-tab:not([pinned]) .tab-close-button { display: var(--show-tab-close-button) !important; } | ||||
|   .tabbrowser-tab:not([pinned]):hover .tab-close-button { display: var(--show-tab-close-button-hover) !important } | ||||
| 
 | ||||
|   /* Window colors  */ | ||||
| 
 | ||||
|   :root { | ||||
|     --lwt-sidebar-background-color: var(--window) !important; | ||||
|     --lwt-toolbar-field-focus: var(--secondary) !important; | ||||
|   } | ||||
| 
 | ||||
|   /* tabbar */ | ||||
| 
 | ||||
|   /* Hide the secondary Tab Label | ||||
|    * e.g. playing indicator (the text, not the icon) */ | ||||
|   .tab-secondary-label { display: none !important; } | ||||
| 
 | ||||
|   #nav-bar:not([tabs-hidden='true']) { | ||||
|     box-shadow: none; | ||||
|   } | ||||
| 
 | ||||
|   :root { | ||||
|     --toolbarbutton-border-radius: 0 !important; | ||||
|     --tab-border-radius: 0 !important; | ||||
|     --tab-block-margin: 0 !important; | ||||
|   } | ||||
| 
 | ||||
|   .tab-background { | ||||
|     border-right: 0px solid rgba(0, 0, 0, 0) !important; | ||||
|     margin-left: -4px !important; | ||||
|   } | ||||
| 
 | ||||
|   .tabbrowser-tab:is([visuallyselected='true'], [multiselected]) | ||||
|     > .tab-stack | ||||
|     > .tab-background { | ||||
|     box-shadow: none !important; | ||||
|   } | ||||
| 
 | ||||
|   .tabbrowser-tab[last-visible-tab='true'] { | ||||
|     padding-inline-end: 0 !important; | ||||
|   } | ||||
| 
 | ||||
|   #tabs-newtab-button { | ||||
|     padding-left: 0 !important; | ||||
|   } | ||||
| 
 | ||||
|   /* remove tab shadow */ | ||||
|   .tabbrowser-tab | ||||
|     >.tab-stack | ||||
|     > .tab-background { box-shadow: none !important;  } | ||||
| 
 | ||||
|   /* multi tab selection */ | ||||
|   #tabbrowser-tabs:not([noshadowfortests]) .tabbrowser-tab:is([multiselected]) | ||||
|     > .tab-stack | ||||
|     > .tab-background:-moz-lwtheme { outline-color: var(--toolbarseparator-color) !important; } | ||||
| 
 | ||||
|   /* Hides the list-all-tabs button*/ | ||||
|   #alltabs-button { display: var(--uc-show-all-tabs-button) !important; } | ||||
| 
 | ||||
|   /* remove gap after pinned tabs */ | ||||
|   #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) | ||||
|     > #tabbrowser-arrowscrollbox | ||||
|     > .tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) { margin-inline-start: 0 !important; } | ||||
| 
 | ||||
|   /*  Removes annoying border  */ | ||||
|   #navigator-toolbox{border:none !important;} | ||||
| 
 | ||||
|   /*  Removes the annoying rainbow thing from the hamburger  */ | ||||
|   #appMenu-fxa-separator{border-image:none !important;} | ||||
| '' | ||||
| 
 | ||||
|  | @ -0,0 +1,27 @@ | |||
| /* css */ ''  | ||||
|   @-moz-document url-prefix(about:){ | ||||
| 
 | ||||
|   /*  Removes the scrollbar on some places  */ | ||||
|   body,html{overflow-y: auto} | ||||
| 
 | ||||
|   /*  Devtools  */ | ||||
|   @-moz-document url-prefix(about:devtools){ | ||||
|   #toolbox-container{margin-top: 10px !important} | ||||
|   .devtools-tabbar{background: transparent !important} | ||||
|   .devtools-tab-line{border-radius: 0 0 5px 5px} | ||||
|   .customize-animate-enter-done,.customize-menu,.top-site-outer:hover,button{background-color: transparent!important}} | ||||
| 
 | ||||
|   /*  Newtab  */ | ||||
|   @-moz-document url("about:home"), url("about:newtab"){ | ||||
|   .search-wrapper .search-handoff-button .fake-caret {top: 13px !important; inset-inline-start: 48px !important} | ||||
|   .search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important} | ||||
|   .search-wrapper .search-handoff-button .fake-caret{top: 13px !important; inset-inline-start: 48px !important} | ||||
|   .search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important} | ||||
|   .outer-wrapper .search-wrapper{padding: 0px !important; display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; align-content: space-around !important; gap: 20px 10px !important} | ||||
|   .search-wrapper .logo-and-wordmark .logo{background-size: 60px !important; height: 60px !important; width: 60px !important} | ||||
|   .search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important} | ||||
|   .search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important} | ||||
|   .outer-wrapper.ds-outer-wrapper-breakpoint-override.only-search.visible-logo{display: flex !important; padding-top: 0px !important;vertical-align: middle} | ||||
|   .customize-menu{border-radius: 10px 0 0 10px !important} | ||||
|   #root > div{align-items: center; display: flex}}} | ||||
| '' | ||||
							
								
								
									
										72
									
								
								inputs/home/modules/desktop/browser/schizofox/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								inputs/home/modules/desktop/browser/schizofox/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,72 @@ | |||
| { inputs, config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.browser.schizofox; | ||||
|   fonts = config.homeModules.theme.fonts; | ||||
|   inherit (config.colorscheme) colors; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   imports = [inputs.schizofox.homeManagerModule]; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.sessionVariables.BROWSER = lib.mkIf cfg.default "firefox"; | ||||
|     programs.schizofox = { | ||||
|       enable = true; | ||||
|       theme = { | ||||
|         font = "${fonts.regular.family}"; | ||||
|         colors = { | ||||
|           background-darker = "${colors.base00}"; | ||||
|           background = "${colors.base01}"; | ||||
|           foreground = "${colors.base07}"; | ||||
|         }; | ||||
|       }; | ||||
|        | ||||
|       security = { | ||||
|         sanitizeOnShutdown = false; | ||||
|         sandbox = true; | ||||
|         noSessionRestore = false; | ||||
|         userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"; | ||||
|       }; | ||||
| 
 | ||||
|       misc = { | ||||
|         drmFix = true; | ||||
|         disableWebgl = false; | ||||
|       }; | ||||
| 
 | ||||
|       extensions = { | ||||
|         extraExtensions = let | ||||
|           mkUrl = name: "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi"; | ||||
|           extensions = [ | ||||
|             { | ||||
|               id = "1018e4d6-728f-4b20-ad56-37578a4de76"; | ||||
|               name = "flagfox"; | ||||
|             } | ||||
|             { | ||||
|               id = "{c2c003ee-bd69-42a2-b0e9-6f34222cb046}"; | ||||
|               name = "auto-tab-discard"; | ||||
|             } | ||||
|             { | ||||
|               id = "{d634138d-c276-4fc8-924b-40a0ea21d284}"; | ||||
|               name = "1password-x-password-manager"; | ||||
|             } | ||||
|             { | ||||
|               id = "{a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad}"; | ||||
|               name = "refined-github-"; | ||||
|             } | ||||
|             { | ||||
|               id = "sponsorBlocker@ajay.app"; | ||||
|               name = "sponsorblock"; | ||||
|             } | ||||
|             { | ||||
|               id = "{tridactyl.vim@cmcaine.co.uk}"; | ||||
|               name = "tridactyl-vim"; | ||||
|             } | ||||
|           ]; | ||||
|           extraExtensions = builtins.foldl' (acc: ext: acc // {ext.id = {install_url = mkUrl ext.name;};}) {} extensions; | ||||
|         in | ||||
|           extraExtensions; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										5
									
								
								inputs/home/modules/desktop/communication/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								inputs/home/modules/desktop/communication/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./discord | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										153
									
								
								inputs/home/modules/desktop/communication/discord/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										153
									
								
								inputs/home/modules/desktop/communication/discord/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,153 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.communication.discord; | ||||
|   fonts = config.homeModules.theme.fonts; | ||||
|   inherit (config.colorscheme) colors; | ||||
|   inherit (lib) mkIf mkEnableOption; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   options.homeModules.desktop.communication.discord.enable = mkEnableOption "Enable discord home manager module"; | ||||
|   config = mkIf cfg.enable { | ||||
|     home.packages = [ pkgs.vesktop ]; | ||||
| 
 | ||||
|     xdg.configFile."vesktop/themes/nix.css".text = /* css */ '' | ||||
|       /** | ||||
|         * @name nix-colors-minimal | ||||
|         * @author aoku | ||||
|         * @description minimal theme designed with nix colors | ||||
|       */ | ||||
|    | ||||
|       :root { | ||||
|         --nix-bg1: #${colors.base00};  | ||||
|         --nix-bg2: #${colors.base01}; | ||||
|         --nix-bg3: #${colors.base02}; | ||||
|      | ||||
|         --nix-fg1: #${colors.base05}; | ||||
|         --nix-fg2: #${colors.base07}; | ||||
|         --nix-fg3: #${colors.base03}; | ||||
|         --nix-link: #${colors.base0D}; | ||||
| 
 | ||||
|         --nix-accent: #${colors.base08}; | ||||
|         --nix-hi: #${colors.base0B};  | ||||
| 
 | ||||
|         --font-mono: ${fonts.monospace.family}, monospace; | ||||
|         --font-regular: ${fonts.regular.family}, sans serif; | ||||
| 
 | ||||
|         /* server collapse */ | ||||
|         --sb-collapsed-width: 12px; | ||||
|         --sb-transition-duration: 0s; | ||||
|       } | ||||
| 
 | ||||
|       .theme-dark { | ||||
|         --background-primary: var(--nix-bg1); | ||||
|         --background-secondary: var(--nix-bg1); | ||||
|         --background-secondary-alt: var(--nix-bg1); | ||||
|         --background-accent: var(--nix-accent); | ||||
|         --background-tertiary: var(--nix-bg1); | ||||
|         --background-floating: var(--nix-bg1); | ||||
|         --background-mentioned: var(--nix-bg1); | ||||
|         --background-mentioned-hover: var(--nix-bg1); | ||||
|         --background-mobile: var(--nix-bg1); | ||||
|         --background-mobile-secondary: var(--nix-bg2); | ||||
|         --background-modifier-selected: var(--nix-bg1); | ||||
|         --channeltextarea-background:var(--nix-bg1); | ||||
|         --background-modifier-hover:var(--nix-bg1); | ||||
|         --activity-card-background: var(--nix-bg2); | ||||
| 
 | ||||
|         --header-primary: var(--nix-fg2); | ||||
|         --header-secondary: var(--nix-fg1); | ||||
|        | ||||
|         --text-normal: var(--nix-fg1); | ||||
|         --text-muted: var(--nix-fg1); | ||||
|         --text-link: var(--nix-link); | ||||
|         --text-warning: var(--nix-accent); | ||||
|         --font-primary: var(--font-mono); | ||||
|         --font-headline: var(--font-mono); | ||||
|         --font-display: var(--font-mono); | ||||
|        | ||||
|         --interactive-normal: var(--nix-fg1); /*base05*/ | ||||
|         --interactive-hover: var(--nix-hi); /*base0B*/ | ||||
|         --interactive-active: var(--nix-fg2); | ||||
|         --interactive-muted: var(--nix-fg3); /*base03*/ | ||||
|         --channels-default: var(--nix-fg1); | ||||
|        | ||||
|         --scrollbar-thin-thumb: transparent; | ||||
|         --scrollbar-thin-track: transparent; | ||||
|         --scrollbar-auto-thumb: var(--nix-fg1); | ||||
|         --scrollbar-auto-track:var(--nix-bg1); | ||||
|         --scrollbar-auto-scrollbar-color-thumb: var(--nix-accent); | ||||
|       } | ||||
| 
 | ||||
|       .messagesWrapper_ea2b0b { | ||||
|           font-family: var(--font-regular); | ||||
|       } | ||||
| 
 | ||||
|       .titleWrapper__482dc { | ||||
|         font-family: var(--font-mono); | ||||
|       } | ||||
| 
 | ||||
|       .link__95dc0 /* text channel*/{ | ||||
|         border-radius: 0px; | ||||
|         margin-left: -10px; | ||||
|         font-family: var(--font-mono); | ||||
|       } | ||||
| 
 | ||||
|       .container_ca50b9 .avatar_f8541f { /*avatar*/ | ||||
|         display: none; | ||||
|       } | ||||
| 
 | ||||
|       .form__13a2c /* text input box resize */ { | ||||
|         height: 50px; | ||||
|         font-family: var(--font-regular); | ||||
|       } | ||||
| 
 | ||||
|       .containerDefault__3187b .wrapper__7bcde:before /* text channel */{ | ||||
|         content: ""; | ||||
|         display:inline-block; | ||||
|         background: var(--nix-hi); | ||||
|         height: 100%; | ||||
|         position: absolute; | ||||
|         left: 0; | ||||
|       } | ||||
| 
 | ||||
| 
 | ||||
|       /* server collapse */ | ||||
|       .guilds__2b93a /* servers */{ | ||||
|           overflow: hidden !important; | ||||
|           width: var(--sb-collapsed-width, 75px); | ||||
|           transition: width var(--sb-transition-duration); | ||||
|       } | ||||
|       .guilds__2b93a:hover /* expand server bar on hover */{ | ||||
|           width: 70px; | ||||
|           overflow: visible !important; | ||||
|           animation: server-bar-overflow 0s linear 0ms forwards | ||||
|       } | ||||
|       .guilds__2b93a ~ .base__3e6af /* friends list, chat */{ | ||||
|           position: absolute; | ||||
|           left: var(--sb-collapsed-left, var(--sb-collapsed-width)); | ||||
|           top: var(--sb-collapsed-top, 0px); | ||||
|           bottom: var(--sb-collapsed-bottom, 0px); | ||||
|           right: var(--sb-collapsed-right, 0px); | ||||
|           transition-property: var(--sb-transition-property, left); | ||||
|           transition-duration: var(--sb-transition-duration); | ||||
|       } | ||||
|       .guilds__2b93a:hover ~ .base__3e6af /* friends list, chat */{ | ||||
|           position: absolute; | ||||
|           left: var(--sb-left, 70px); | ||||
|           top: var(--sb-top, 0px); | ||||
|           bottom: var(--sb-bottom, 0px); | ||||
|           right: var(--sb-right, 0px); | ||||
|       } | ||||
|       @keyframes server-bar-overflow{ | ||||
|           from{ | ||||
|               overflow: hidden; | ||||
|           } | ||||
|           to{ | ||||
|               overflow: visible; | ||||
|           } | ||||
|       } | ||||
|     ''; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,13 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.creative.audio.audacity; | ||||
|   inherit (lib) mkIf mkEnableOption; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   options.homeModules.desktop.creative.audio.audacity.enable = mkEnableOption "Enable audacity home module"; | ||||
|   config = mkIf cfg.enable { | ||||
|     home.packages = [ pkgs.audacity ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										5
									
								
								inputs/home/modules/desktop/creative/audio/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								inputs/home/modules/desktop/creative/audio/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./audacity | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										7
									
								
								inputs/home/modules/desktop/creative/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								inputs/home/modules/desktop/creative/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./audio | ||||
|     ./image | ||||
|     # ./video | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										5
									
								
								inputs/home/modules/desktop/creative/image/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								inputs/home/modules/desktop/creative/image/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./inkscape | ||||
|   ]; | ||||
| } | ||||
|  | @ -0,0 +1,14 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.creative.audio.inkscape; | ||||
|   inherit (lib) mkIf mkEnableOption; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   options.homeModules.desktop.creative.audio.inkscape.enable = mkEnableOption "Enable inkscape home module"; | ||||
|   config = mkIf cfg.enable { | ||||
|     home.packages = [ pkgs.inkscape-with-extensions ]; | ||||
|   }; | ||||
| } | ||||
| 
 | ||||
							
								
								
									
										14
									
								
								inputs/home/modules/desktop/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								inputs/home/modules/desktop/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./browser # done -- firefox still need: chrome, brave | ||||
|     ./creative | ||||
|     ./communication # only discord implemented | ||||
|     ./media # done -- spotify gui still needs to be implemented | ||||
|     ./terminal # done -- wezterm still needs to be implemented | ||||
|     ./wayland # -- almost done, need to implement eww  | ||||
|     ./productivity | ||||
|     ./gaming  | ||||
|     ./security | ||||
|     ./tools | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										16
									
								
								inputs/home/modules/desktop/gaming/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								inputs/home/modules/desktop/gaming/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { lib, ... }: | ||||
| 
 | ||||
| { | ||||
| 
 | ||||
|   imports = [ | ||||
|     ./factorio | ||||
|     ./lutris | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.gaming = { | ||||
|     factorio = { | ||||
|       enable = lib.mkEnableOption "Enable factorio home module"; | ||||
|     }; | ||||
|   }; | ||||
|    | ||||
| } | ||||
							
								
								
									
										11
									
								
								inputs/home/modules/desktop/gaming/factorio/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								inputs/home/modules/desktop/gaming/factorio/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg=config.homeModules.desktop.gaming.factorio; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.packages = with pkgs; [ factorio ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								inputs/home/modules/desktop/gaming/lutris/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								inputs/home/modules/desktop/gaming/lutris/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf mkEnableOption; | ||||
|   cfg = config.homeModules.desktop.gaming.lutris; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   options.homeModules.desktop.gaming.lutris.enable = mkEnableOption "Enable lutris home-manager module"; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     home.packages = [ pkgs.lutris ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										7
									
								
								inputs/home/modules/desktop/media/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								inputs/home/modules/desktop/media/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./video | ||||
|     ./image | ||||
|     ./music | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										13
									
								
								inputs/home/modules/desktop/media/image/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								inputs/home/modules/desktop/media/image/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| { lib, ... }: | ||||
| { | ||||
|   imports = [ | ||||
|     ./imv | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.media.image = { | ||||
|     imv = { | ||||
|       enable = lib.mkEnableOption "Enable imv image viewer"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
| } | ||||
							
								
								
									
										13
									
								
								inputs/home/modules/desktop/media/image/imv/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								inputs/home/modules/desktop/media/image/imv/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.homeModules.desktop.media.image.imv; | ||||
| in | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     programs = { | ||||
|       imv = { | ||||
|         enable = true; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										17
									
								
								inputs/home/modules/desktop/media/music/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								inputs/home/modules/desktop/media/music/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| { lib, ... }: | ||||
| { | ||||
|   imports = [ | ||||
|     #./spotify --- still needs to be implemented | ||||
|     ./easyeffects | ||||
|     ./tui | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.media.music = { | ||||
|     tui = { | ||||
|       enable = lib.mkEnableOption "Enable tui music"; | ||||
|     }; | ||||
|     spotify = { | ||||
|       enable = lib.mkEnableOption "Enable spotify"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,15 @@ | |||
| {lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.media.music.easyeffects; | ||||
|   inherit (lib) mkIf mkEnableOption; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   options.homeModules.desktop.media.music.easyeffects.enable = mkEnableOption "Enable easy effects home module"; | ||||
|   config = mkIf cfg.enable { | ||||
|     services.easyeffects = { | ||||
|       enable = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										122
									
								
								inputs/home/modules/desktop/media/music/tui/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										122
									
								
								inputs/home/modules/desktop/media/music/tui/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,122 @@ | |||
| { pkgs, config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (config.colorscheme) colors; | ||||
|   cfg = config.homeModules.desktop.media.music.tui; | ||||
|   zellij = config.homeModules.console.multiplexer.zellij; | ||||
|   spotify-cli = pkgs.spotify-player.override { | ||||
|     withImage = false; | ||||
|     withSixel = false; | ||||
|   }; | ||||
| in | ||||
| 
 | ||||
| { | ||||
| 
 | ||||
|   | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.packages = with pkgs; [ | ||||
|       termusic | ||||
|       spotify-cli | ||||
|       alsa-utils | ||||
|       mpv | ||||
|     ]; | ||||
|     programs.cava = { | ||||
|       enable = true; | ||||
|       settings = { | ||||
|         general.framerate = 60; | ||||
|         color = { | ||||
|           gradient = 1; | ||||
|           gradient_count = 5; | ||||
|           gradient_color_1 = "'#${colors.base0A}'"; | ||||
|           gradient_color_2 = "'#${colors.base0B}'"; | ||||
|           gradient_color_3 = "'#${colors.base0C}'"; | ||||
|           gradient_color_4 = "'#${colors.base0D}'"; | ||||
|           gradient_color_5 = "'#${colors.base0E}'"; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|     xdg.configFile."spotify-player/app.toml".text =  /* toml */ '' | ||||
|       theme = "default" | ||||
|       client_id = "fc4c3656d7cc4a7ea70c6080965f8b1a" | ||||
|       client_port = 8080 | ||||
|       tracks_playback_limit = 50 | ||||
|       playback_format = "{track} • {artists}\n{album}\n{metadata}" | ||||
|       notify_format = { summary = "{track} • {artists}", body = "{album}" } | ||||
|       app_refresh_duration_in_ms = 32 | ||||
|       playback_refresh_duration_in_ms = 0 | ||||
|       page_size_in_rows = 20 | ||||
|       enable_media_control = false | ||||
|       enable_streaming = "Always" | ||||
|       enable_notify = true | ||||
|       enable_cover_image_cache = false | ||||
|       notify_streaming_only = false | ||||
|       default_device = "${config.home.sessionVariables.HN}" | ||||
|       play_icon = "▶" | ||||
|       pause_icon = "▌▌" | ||||
|       liked_icon = "♥" | ||||
|       playback_window_position = "Top" | ||||
|       cover_img_length = 9 | ||||
|       cover_img_width = 5 | ||||
|       playback_window_width = 6 | ||||
| 
 | ||||
|       [device] | ||||
|       name = "${config.home.sessionVariables.HN}" | ||||
|       device_type = "speaker" | ||||
|       volume = 100 | ||||
|       bitrate = 320 | ||||
|       audio_cache = false | ||||
|       normalization = false | ||||
|     ''; | ||||
|      | ||||
|     xdg.configFile."zellij/layouts/music.kdl".text = lib.mkIf zellij.enable /* kdl */ '' | ||||
|       layout { | ||||
|       default_tab_template { | ||||
|           pane size=2 borderless=true { | ||||
|               plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" { | ||||
|                   format_left   "{mode}" | ||||
|                   format_right  "{session} {datetime}" | ||||
|                   format_center "#[fg=#89B4FA,bold] {tabs}" | ||||
|                   format_space  "" | ||||
| 
 | ||||
|                   border_enabled  "true" | ||||
|                   border_char     "─" | ||||
|                   border_format   "#[fg=#${colors.base0D}]{char}" | ||||
|                   border_position "bottom" | ||||
| 
 | ||||
|                   hide_frame_for_single_pane "true" | ||||
| 
 | ||||
|                   mode_normal       "#[fg=${colors.base0D}]" | ||||
|              | ||||
|                   tab_normal   "#[bg=#${colors.base01}] {name} " | ||||
|                   tab_active   "#[bg=#${colors.base02}] {name} " | ||||
|                   tab_separator "  " | ||||
| 
 | ||||
|                   datetime        "#[fg=#${colors.base05},bold] {format} " | ||||
|                   datetime_format "%I:%M %p" | ||||
|                   datetime_timezone "${config.home.sessionVariables.TZ}" | ||||
|               } | ||||
|           } | ||||
|           children | ||||
|       } | ||||
| 
 | ||||
|           tab name="spotify" focus=true { | ||||
|               pane name="spotify" { | ||||
|                   borderless true | ||||
|                   command "spotify_player" | ||||
|                   focus true | ||||
|               } | ||||
|               pane name="Visualizer" { | ||||
|                   borderless false | ||||
|                   split_direction "horizontal" | ||||
|                   size "20%" | ||||
|                   command "cava" | ||||
|               } | ||||
|           } | ||||
|       } | ||||
|     ''; | ||||
|     home.shellAliases = lib.mkIf zellij.enable { | ||||
|       zjm = "zellij --layout music"; | ||||
|     }; | ||||
|   }; | ||||
|    | ||||
| } | ||||
							
								
								
									
										20
									
								
								inputs/home/modules/desktop/media/video/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								inputs/home/modules/desktop/media/video/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | |||
| { lib, ... }: | ||||
| { | ||||
|   imports = [ | ||||
|     ./youtube | ||||
|     ./jellyfin | ||||
|     ./mpv | ||||
|   ]; | ||||
|    | ||||
|   options.homeModules.desktop.media.video = { | ||||
|     mpv = { | ||||
|       enable = lib.mkEnableOption "Enable mpv video player"; | ||||
|     }; | ||||
|     youtube = { | ||||
|       enable = lib.mkEnableOption "Enable youtube tui player"; | ||||
|     }; | ||||
|     jellyfin = { | ||||
|       enable = lib.mkEnableOption "Enable jellyifn media player"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,9 @@ | |||
| { pkgs, lib, config, ... }: | ||||
| let | ||||
|   cfg = config.homeModules.desktop.media.video.jellyfin; | ||||
| in | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.packages = with pkgs; [ jellyfin-media-player ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										13
									
								
								inputs/home/modules/desktop/media/video/mpv/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								inputs/home/modules/desktop/media/video/mpv/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.media.video.mpv; | ||||
| in | ||||
| { | ||||
|   config = { | ||||
|     programs.mpv = lib.mkIf cfg.enable { | ||||
|       enable = true; | ||||
|     }; | ||||
|     home.packages = [ pkgs.ffmpeg ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										12
									
								
								inputs/home/modules/desktop/media/video/youtube/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								inputs/home/modules/desktop/media/video/youtube/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | |||
| { lib, config, pkgs, ...}: | ||||
| let | ||||
|   cfg = config.homeModules.desktop.media.video.youtube; | ||||
| in | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.packages = with pkgs; [ youtube-tui ]; | ||||
|     programs.yt-dlp = { | ||||
|       enable = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										18
									
								
								inputs/home/modules/desktop/productivity/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								inputs/home/modules/desktop/productivity/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| { lib, ... }: | ||||
| 
 | ||||
| { | ||||
|   imports = [ | ||||
|     ./obsidian | ||||
|     ./zathura | ||||
|     ./office | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.productivity = { | ||||
|     obsidian = { | ||||
|       enable = lib.mkEnableOption "enable obsidian home module"; | ||||
|     }; | ||||
|     zathura = { | ||||
|       enable = lib.mkEnableOption "enable zathura home module"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,11 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.productivity.obsidian; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.packages = with pkgs; [ obsidian ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										13
									
								
								inputs/home/modules/desktop/productivity/office/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								inputs/home/modules/desktop/productivity/office/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf mkEnableOption; | ||||
|   cfg = config.homeModules.desktop.productivity.office; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   options.homeModules.desktop.productivity.office.enable = mkEnableOption "enable office home module"; | ||||
|   config = mkIf cfg.enable { | ||||
|     home.packages = [ pkgs.libreoffice ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										40
									
								
								inputs/home/modules/desktop/productivity/zathura/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								inputs/home/modules/desktop/productivity/zathura/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,40 @@ | |||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.productivity.zathura; | ||||
|   inherit (config.colorscheme) colors; | ||||
|   fonts = config.homeModules.theme.fonts; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     programs.zathura = { | ||||
|       enable = true; | ||||
|       options = { | ||||
|         font = "${fonts.regular.family} 14"; | ||||
|         recolor = true; | ||||
|         selection-clipboard = "clipboard"; | ||||
|         default-bg = "#${colors.base00}"; | ||||
|         default-fg = "#${colors.base01}"; | ||||
|         statusbar-bg = "#${colors.base02}"; | ||||
|         statusbar-fg = "#${colors.base04}"; | ||||
|         inputbar-bg = "#${colors.base00}"; | ||||
|         inputbar-fg = "#${colors.base07}"; | ||||
|         notification-bg = "#${colors.base00}"; | ||||
|         notification-fg = "#${colors.base07}"; | ||||
|         notification-error-bg = "#${colors.base00}"; | ||||
|         notification-error-fg = "#${colors.base08}"; | ||||
|         notification-warning-bg = "#${colors.base00}"; | ||||
|         notification-warning-fg = "#${colors.base08}"; | ||||
|         highlight-color = "#${colors.base0A}"; | ||||
|         highlight-active-color = "#${colors.base0D}"; | ||||
|         completion-bg = "#${colors.base01}"; | ||||
|         completion-fg = "#${colors.base05}"; | ||||
|         completions-highlight-bg = "#${colors.base0D}"; | ||||
|         completions-highlight-fg = "#${colors.base07}"; | ||||
|         recolor-lightcolor = "#${colors.base00}"; | ||||
|         recolor-darkcolor = "#${colors.base06}"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										5
									
								
								inputs/home/modules/desktop/security/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								inputs/home/modules/desktop/security/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./polkit | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										54
									
								
								inputs/home/modules/desktop/security/polkit/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								inputs/home/modules/desktop/security/polkit/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,54 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf types mkOption;  | ||||
|   inherit (builtins) elem; | ||||
|   cfg = config.homeModules.desktop.security.polkit; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   options.homeModules.desktop.security.polkit = mkOption { | ||||
|     type = types.enum ["gnome" "pantheon"]; # TODO: add kde agent | ||||
|     default = ""; | ||||
|     description = "Type of polkit agent module to use"; | ||||
|   }; | ||||
| 
 | ||||
|   config = { | ||||
|     systemd.user.services = { | ||||
|       polkit-pantheon-authentication-agent-1 = mkIf (elem cfg ["pantheon"]) { | ||||
|         Unit.Description = "polkit-pantheon-authentication-agent-1"; | ||||
| 
 | ||||
|         Install = { | ||||
|           WantedBy = [ "graphical-session.target" ]; | ||||
|           Wants = [ "graphical-session.target" ]; | ||||
|           After = [ "graphical-session.target" ]; | ||||
|         }; | ||||
| 
 | ||||
|         Service = { | ||||
|           Type = "simple"; | ||||
|           ExecStart = "${pkgs.pantheon.pantheon-agent-polkit}/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit"; | ||||
|           Restart = "on-failure"; | ||||
|           RestartSec = 1; | ||||
|           TimeoutStopSec = 10; | ||||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       polkit-gnome-authentication-agent-1 = mkIf (elem cfg ["gnome"]) { | ||||
|         Unit.Description = "polkit-pantheon-authentication-agent-1"; | ||||
|         Install = { | ||||
|           WantedBy = [ "graphical-session.target" ]; | ||||
|           Wants = [ "graphical-session.target" ]; | ||||
|           After = [ "graphical-session.target" ]; | ||||
|         }; | ||||
| 
 | ||||
|         Service = { | ||||
|           Type = "simple"; | ||||
|           ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; | ||||
|           Restart = "on-failure"; | ||||
|           RestartSec = 1; | ||||
|           TimeoutStopSec = 10; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										43
									
								
								inputs/home/modules/desktop/terminal/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								inputs/home/modules/desktop/terminal/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| { lib, config, ... }: | ||||
|   let | ||||
|     cfg = config.homeModules.desktop.terminal; | ||||
|   in | ||||
| { | ||||
| 
 | ||||
|   imports = [ | ||||
|     ./foot | ||||
|     ./kitty | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.terminal = { | ||||
|     foot = { | ||||
|       enable = lib.mkEnableOption "Enable foot terminal"; | ||||
|       default = lib.mkOption { | ||||
|         type = lib.types.bool; | ||||
|         default = false; | ||||
|         description = "Set foot as default terminal in environment variables"; | ||||
|       }; | ||||
|     }; | ||||
|     kitty = { | ||||
|       enable = lib.mkEnableOption "Enable kitty terminal"; | ||||
|       default = lib.mkOption { | ||||
|         type = lib.types.bool; | ||||
|         default = false; | ||||
|         description = "Set kitty as default terminal in environment variables"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|    config = {  | ||||
|     assertions = [ | ||||
|       { | ||||
|         assertion =  | ||||
|           (lib.length (lib.filter (x: x) [ | ||||
|             cfg.foot.default or false | ||||
|             cfg.kitty.default or false | ||||
|           ]) <= 1);  | ||||
|         message = "Only one terminal can be default in the configuration"; | ||||
|       } | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										71
									
								
								inputs/home/modules/desktop/terminal/foot/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								inputs/home/modules/desktop/terminal/foot/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,71 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (config.colorscheme) colors; | ||||
|   fonts = config.homeModules.theme.fonts; | ||||
|   cfg = config.homeModules.desktop.terminal.foot; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.sessionVariables = lib.mkIf cfg.default { | ||||
|       TERMINAL = "foot"; | ||||
|       TERM = "foot"; | ||||
|     }; | ||||
|     programs.foot = { | ||||
|       enable = true; | ||||
|       server.enable = true; | ||||
|       settings = { | ||||
|         main = { | ||||
|           font = "${fonts.monospace.family}:pixelsize=18:antialias=true"; | ||||
|           font-bold = "${fonts.monospace.family}:style=Bold:pixelsize=18:antialias=true"; | ||||
|           font-italic = "${fonts.monospace.family}:style=Italic:pixelsize=18:antialias=true"; | ||||
|           font-bold-italic = "${fonts.monospace.family}:style=Bold Italic:pixelsize=18:antialias=true"; | ||||
|           dpi-aware = "yes"; | ||||
|           letter-spacing = "-1px"; | ||||
|           bold-text-in-bright = "palette-based"; | ||||
|           resize-delay-ms = "80";        | ||||
|           pad = "9x9 center"; | ||||
|           selection-target = "clipboard"; | ||||
|         }; | ||||
| 
 | ||||
|         tweak = { | ||||
|           sixel = "yes"; | ||||
|           font-monospace-warn = "no";   | ||||
|         }; | ||||
|          | ||||
|         cursor = { | ||||
|           style = "beam"; | ||||
|           blink = "yes"; | ||||
|         }; | ||||
|         colors = { | ||||
|           alpha = 1.0; | ||||
|           foreground = "${colors.base05}"; | ||||
|           background = "${colors.base00}"; | ||||
|           regular0 = "${colors.base00}"; # black | ||||
|           regular1 = "${colors.base08}"; # red | ||||
|           regular2 = "${colors.base0B}"; # green | ||||
|           regular3 = "${colors.base0A}"; # yellow | ||||
|           regular4 = "${colors.base0D}"; # blue | ||||
|           regular5 = "${colors.base0E}"; # magenta | ||||
|           regular6 = "${colors.base0C}"; # cyan | ||||
|           regular7 = "${colors.base05}"; # white | ||||
|           bright0 = "${colors.base03}"; # bright black | ||||
|           bright1 = "${colors.base08}"; # bright red | ||||
|           bright2 = "${colors.base0B}"; # bright green | ||||
|           bright3 = "${colors.base0A}"; # bright yellow | ||||
|           bright4 = "${colors.base0D}"; # bright blue | ||||
|           bright5 = "${colors.base0E}"; # bright magenta | ||||
|           bright6 = "${colors.base0C}"; # bright cyan | ||||
|           bright7 = "${colors.base07}"; # bright white | ||||
|           "16" = "${colors.base09}"; | ||||
|           "17" = "${colors.base0F}"; | ||||
|           "18" = "${colors.base01}"; | ||||
|           "19" = "${colors.base02}"; | ||||
|           "20" = "${colors.base04}"; | ||||
|           "21" = "${colors.base06}"; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										66
									
								
								inputs/home/modules/desktop/terminal/kitty/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								inputs/home/modules/desktop/terminal/kitty/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,66 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (config.colorscheme) colors; | ||||
|   fonts = config.homeModules.theme.font; | ||||
|   cfg = config.homeModules.desktop.terminal.kitty; | ||||
|   fish = config.homeModules.console.shell.fish; | ||||
| in | ||||
| { | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.sessionVariables = lib.mkIf cfg.default { | ||||
|       TERMINAL = "kitty -1"; | ||||
|       TERM = "kitty -1"; | ||||
|     }; | ||||
|     programs.kitty = { | ||||
|       enable = true; | ||||
|       font = { | ||||
|         name = fonts.monospace.family; | ||||
|         size = 12; | ||||
|       }; | ||||
|       shellIntegration.enableFishIntegration = lib.mkif fish.enable true; | ||||
|       settings = { | ||||
|         scrollback_lines = 4000; | ||||
|         scrollback_pager_history_size = 2048; | ||||
|         window_padding_width = 1; | ||||
|         foreground = "#${colors.base05}"; | ||||
|         background = "#${colors.base00}"; | ||||
|         background_opacity = "1.0"; | ||||
|         selection_background = "#${colors.base05}"; | ||||
|         selection_foreground = "#${colors.base00}"; | ||||
|         url_color = "#${colors.base04}"; | ||||
|         cursor = "#${colors.base05}"; | ||||
|         active_border_color = "#${colors.base03}"; | ||||
|         inactive_border_color = "#${colors.base01}"; | ||||
|         active_tab_background = "#${colors.base00}"; | ||||
|         active_tab_foreground = "#${colors.base05}"; | ||||
|         inactive_tab_background = "#${colors.base01}"; | ||||
|         inactive_tab_foreground = "#${colors.base04}"; | ||||
|         tab_bar_background = "#${colors.base01}"; | ||||
|         color0 = "#${colors.base00}"; | ||||
|         color1 = "#${colors.base08}"; | ||||
|         color2 = "#${colors.base0B}"; | ||||
|         color3 = "#${colors.base0A}"; | ||||
|         color4 = "#${colors.base0D}"; | ||||
|         color5 = "#${colors.base0E}"; | ||||
|         color6 = "#${colors.base0C}"; | ||||
|         color7 = "#${colors.base05}"; | ||||
|         color8 = "#${colors.base03}"; | ||||
|         color9 = "#${colors.base08}"; | ||||
|         color10 = "#${colors.base0B}"; | ||||
|         color11 = "#${colors.base0A}"; | ||||
|         color12 = "#${colors.base0D}"; | ||||
|         color13 = "#${colors.base0E}"; | ||||
|         color14 = "#${colors.base0C}"; | ||||
|         color15 = "#${colors.base07}"; | ||||
|         color16 = "#${colors.base09}"; | ||||
|         color17 = "#${colors.base0F}"; | ||||
|         color18 = "#${colors.base01}"; | ||||
|         color19 = "#${colors.base02}"; | ||||
|         color20 = "#${colors.base04}"; | ||||
|         color21 = "#${colors.base06}"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										5
									
								
								inputs/home/modules/desktop/tools/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								inputs/home/modules/desktop/tools/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./kdeconnect | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										16
									
								
								inputs/home/modules/desktop/tools/kdeconnect/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								inputs/home/modules/desktop/tools/kdeconnect/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { lib, config, osConfig, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf; | ||||
|   inherit (builtins) elem; | ||||
|   host = osConfig.systemModules.host; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = mkIf (elem "workstation" host.function) { | ||||
|     services.kdeconnect = { | ||||
|       enable = true; | ||||
|       indicator = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										16
									
								
								inputs/home/modules/desktop/wayland/bar/ags/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								inputs/home/modules/desktop/wayland/bar/ags/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { lib, config, inputs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.bar.ags; | ||||
| in | ||||
| 
 | ||||
| { | ||||
| 
 | ||||
|   imports = [ inputs.ags.homeManagerModules.default ]; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     programs.ags = { | ||||
|       enable = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										21
									
								
								inputs/home/modules/desktop/wayland/bar/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								inputs/home/modules/desktop/wayland/bar/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | |||
| { lib, ... }: | ||||
| { | ||||
|   imports = [ | ||||
|     #./eww | ||||
|     # ./ags | ||||
|     ./waybar | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.wayland.bar = { | ||||
|     eww = { | ||||
|       enable = lib.mkEnableOption "Enable Eww bar"; | ||||
|     }; | ||||
|     ags = { | ||||
|       enable = lib.mkEnableOption "Enable ags bar"; | ||||
|     }; | ||||
|     waybar = { | ||||
|       enable = lib.mkEnableOption "Enable waybar bar"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
| } | ||||
							
								
								
									
										0
									
								
								inputs/home/modules/desktop/wayland/bar/eww/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								inputs/home/modules/desktop/wayland/bar/eww/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										153
									
								
								inputs/home/modules/desktop/wayland/bar/waybar/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										153
									
								
								inputs/home/modules/desktop/wayland/bar/waybar/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,153 @@ | |||
| { config, lib, pkgs, inputs, ... }: | ||||
| 
 | ||||
| let | ||||
|   fonts = config.homeModules.theme.fonts; | ||||
|   cfg = config.homeModules.desktop.wayland.bar.waybar; | ||||
|   monitorWidth =  (lib.head config.monitors).width - 20; | ||||
|   inherit (config.colorscheme) colors; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     programs.waybar = { | ||||
|       enable = true; | ||||
|       systemd.enable = true; | ||||
|       package = pkgs.waybar; | ||||
| 
 | ||||
|       settings.mainBar = { | ||||
|         layer = "top"; | ||||
|         position = "top"; | ||||
|         height = 30; | ||||
|         width = monitorWidth; | ||||
|         exclusive = true; | ||||
|         margin-top = 10; | ||||
|         margin-bottom = -12; | ||||
| 
 | ||||
|         modules-left = [ "clock" "battery" "hyprland/workspaces" ]; | ||||
|         modules-center = []; | ||||
|         modules-right = [ "custom/hyprrecord" "tray" ]; | ||||
| 
 | ||||
|         "hyprland/workspaces" = let | ||||
|           hyprctl = config.wayland.windowManager.hyprland.package + "/bin/hyprctl"; | ||||
|         in { | ||||
|           on-click = "activate"; | ||||
|           on-scroll-up = "${hyprctl} dispatch workspace m+1"; | ||||
|           on-scroll-down = "${hyprctl} dispatch workspace m-1"; | ||||
|           format = "{icon}"; | ||||
|           active-only = false; | ||||
|           persistent-workspaces = { | ||||
|             "*" = 5; | ||||
|           }; | ||||
|           format-icons = { | ||||
|             active = ""; | ||||
|             default = ""; | ||||
|             urgent = ""; | ||||
|           }; | ||||
|           all-outputs = false; | ||||
|         }; | ||||
| 
 | ||||
|         clock = { | ||||
|           format = "{:%I:%M %p}"; | ||||
|           format-alt = "{:%Y-%m-%d}"; | ||||
|         }; | ||||
|         battery = { | ||||
|           states = { | ||||
|             good = 100; | ||||
|             warning = 35; | ||||
|             critical = 15; | ||||
|           }; | ||||
|           bat = "BAT0"; | ||||
|           interval = 10; | ||||
|           format-icons = [ "" "" "" "" "" "" "" "" "" "" ]; | ||||
|           format = "{icon} {capacity}%"; | ||||
|           format-charging = "{icon} {capacity}%"; | ||||
|           tooltip-format = "{timeTo} {power}W"; | ||||
|         }; | ||||
|         tray = { | ||||
|           icon-size = 21; | ||||
|           spacing = 5; | ||||
|         }; | ||||
|         "custom/hyprrecord" = { | ||||
|           format = "{}"; | ||||
|           interval = "once"; | ||||
|           exec = "echo  "; | ||||
|           tooltip = "false"; | ||||
|           exec-if = "pgrep wl-screenrec"; | ||||
|           on-click = "exec hyprrecord -a --waybar screen copysave video"; | ||||
|           signal = 12; | ||||
|         }; | ||||
|       }; | ||||
|       style = /* css */ '' | ||||
|         * { | ||||
|           font-family: "${fonts.monospace.family}"; | ||||
|           font-size: 19px; | ||||
|           border: solid #${colors.base05}; | ||||
|         } | ||||
| 
 | ||||
|         window#waybar { | ||||
|           background-color: transparent; | ||||
|           margin: 10px; | ||||
|         } | ||||
| 
 | ||||
|         #clock, | ||||
|         #battery, | ||||
|         #workspaces { | ||||
|           background-color: #${colors.base00}; | ||||
|           padding-right: 10px; | ||||
|         } | ||||
| 
 | ||||
|         #clock { | ||||
|           padding-left: 10px; | ||||
|           border: 2px solid #${colors.base05}; | ||||
|           border-right: 0px; | ||||
|           border-top-left-radius: 10px; | ||||
|         } | ||||
| 
 | ||||
|         #battery { | ||||
|           padding-left: 10px; | ||||
|           border-top: 2px solid #${colors.base05}; | ||||
|           border-bottom: 2px solid #${colors.base05}; | ||||
|           border-left: 0px; | ||||
|         } | ||||
| 
 | ||||
|         #battery.good { | ||||
|           color: #${colors.base0B}; | ||||
|         } | ||||
|         #battery.warning { | ||||
|           color: #${colors.base0A}; | ||||
|         } | ||||
|         #battery.critical { | ||||
|           color: #${colors.base08}; | ||||
|         } | ||||
| 
 | ||||
|         #tray { | ||||
|           padding-right: 10px; | ||||
|           padding-left: 10px; | ||||
|           background-color: transparent; | ||||
|           border: 0; | ||||
|         } | ||||
| 
 | ||||
|         #workspaces { | ||||
|           border: 2px solid #${colors.base05}; | ||||
|           border-left: 0; | ||||
|           border-top-right-radius: 10px; | ||||
|         } | ||||
| 
 | ||||
|         #workspace button, | ||||
|         #workspaces button.active, | ||||
|         #workspaces button.visible { | ||||
|           color: #${colors.base0B}; | ||||
|         } | ||||
| 
 | ||||
|         #workspaces button.urgent { | ||||
|           color: #${colors.base08}; | ||||
|         } | ||||
| 
 | ||||
|         #custom-hyprrecord { | ||||
|           color: #${colors.base08}; | ||||
|           padding-right: 20px; | ||||
|         } | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										44
									
								
								inputs/home/modules/desktop/wayland/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								inputs/home/modules/desktop/wayland/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,44 @@ | |||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland; | ||||
| in | ||||
| { | ||||
|   imports = [ | ||||
|     ./bar | ||||
|     ./lockscreen | ||||
|     ./notification | ||||
|     ./utility | ||||
|     ./windowManager | ||||
|     ./launcher | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.wayland = { | ||||
|     enable = lib.mkEnableOption "Enable wayland specific confurations"; | ||||
|     nvidia = lib.mkOption { | ||||
|       type = lib.types.bool; | ||||
|       default = false; | ||||
|       description = "Enable nvidia wayland configuration"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     xdg.portal.enable = true; | ||||
|     home.sessionVariables = { | ||||
|       CLUTTER_BACKEND = "wayland"; | ||||
|       NIXOS_OZONE_WL = "1"; | ||||
|       GDK_BACKEND = "wayland"; | ||||
|       QT_QPA_PLATFORM = "wayland"; | ||||
|       QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; | ||||
|       MOZ_ENABLE_WAYLAND = "1"; | ||||
|       MOZ_DBUS_REMOTE = "1"; | ||||
|       XDG_SESSION_TYPE = "wayland"; | ||||
|       SDL_VIDEODRIVER = "wayland"; | ||||
|     } // lib.mkIf cfg.nvidia { | ||||
|       LIBVA_DRIVER_NAME = "nvidia"; | ||||
|       GBM_BACKEND = "nvidia-drm"; | ||||
|       __GLX_VENDOR_LIBRARY_NAME = "nvidia"; | ||||
|       WLR_NO_HARDWARE_CURSORS = "1"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,34 @@ | |||
| { config, lib, inputs, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.launcher.anyrun; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   imports = [ | ||||
|     inputs.anyrun.homeManagerModules.default | ||||
|   ]; | ||||
|    | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     programs.anyrun = { | ||||
|       enable = true; | ||||
|       config = { | ||||
|         plugins = with inputs.anyrun.packages.${pkgs.system}; [ | ||||
|           applications | ||||
|           randr | ||||
|           shell | ||||
|           rink | ||||
|           symbols | ||||
|         ]; | ||||
|       }; | ||||
|       extraCss = /* css */ '' | ||||
| 
 | ||||
|         * { | ||||
|           font-family: JetBrains Mono Nerd Font; | ||||
|         } | ||||
|          | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
|    | ||||
| } | ||||
							
								
								
									
										21
									
								
								inputs/home/modules/desktop/wayland/launcher/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								inputs/home/modules/desktop/wayland/launcher/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | |||
| { lib, ... }: | ||||
| 
 | ||||
| { | ||||
|   imports = [ | ||||
|     # ./anyrun | ||||
|     ./rofi | ||||
|     ./tofi | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.wayland.launcher = { | ||||
|     anyrun = { | ||||
|       enable = lib.mkEnableOption "enable anyrun launcher module"; | ||||
|     }; | ||||
|     rofi = { | ||||
|       enable = lib.mkEnableOption "enable rofi launcher module"; | ||||
|     }; | ||||
|     tofi = { | ||||
|       enable = lib.mkEnableOption "enable tofi launcher module"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,80 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   fonts = config.homeModules.theme.fonts; | ||||
|   cfg = config.homeModules.desktop.wayland.launcher.rofi; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     programs.rofi = { | ||||
|       enable = true; | ||||
|       font = "${fonts.monospace.family}"; | ||||
|       package = pkgs.rofi-wayland; | ||||
|       terminal = "${config.home.sessionVariables.TERMINAL}"; | ||||
|       theme = let | ||||
|         inherit (config.colorscheme ) colors; | ||||
|         inherit (config.lib.formats.rasi) mkLiteral; | ||||
|       in { | ||||
|         "*" = { | ||||
|           background = mkLiteral "#${colors.base00}"; | ||||
|           foreground = mkLiteral "#${colors.base05}"; | ||||
|           selected = mkLiteral "#${colors.base0B}"; | ||||
|           message = mkLiteral "#${colors.base0D}"; | ||||
| 
 | ||||
|           background-color = mkLiteral "@background"; | ||||
|           border-color = mkLiteral "@foreground"; | ||||
|           text-color = mkLiteral "@foreground"; | ||||
|           font = mkLiteral "'${fonts.monospace.family} 14'"; | ||||
|         }; | ||||
| 
 | ||||
|         "window" = { | ||||
|           width = mkLiteral "15%"; | ||||
|           border = mkLiteral "2"; | ||||
|           padding = mkLiteral "10"; | ||||
|           children = mkLiteral "[message,listview,inputbar]"; | ||||
|         }; | ||||
| 
 | ||||
|         "message" = { | ||||
|           children = mkLiteral "[textbox]"; | ||||
|         }; | ||||
| 
 | ||||
|         "textbox" = { | ||||
|           text-color = mkLiteral "@message"; | ||||
|           horizontal-align = mkLiteral "0.50"; | ||||
|         }; | ||||
| 
 | ||||
|         "inputbar" = { | ||||
|           cursor = mkLiteral "pointer"; | ||||
|           border = mkLiteral "2"; | ||||
|           children = mkLiteral "[textbox-prompt-colon,entry]"; | ||||
|         }; | ||||
| 
 | ||||
|         "entry" = { | ||||
|           cursor = mkLiteral "false"; | ||||
|         }; | ||||
| 
 | ||||
|         "textbox-prompt-colon" = { | ||||
|           text-color = mkLiteral "@selected"; | ||||
|           expand = mkLiteral "false"; | ||||
|           margin = mkLiteral "0 0.3em 0em 0em"; | ||||
|           str = mkLiteral "'  '"; | ||||
|         }; | ||||
| 
 | ||||
|         "listview" = { | ||||
|           scrollbar = mkLiteral "true"; | ||||
|           fixed-height = mkLiteral "false"; | ||||
|           dynamic = mkLiteral "true"; | ||||
|         }; | ||||
| 
 | ||||
|         "element-text" = { | ||||
|           horizontal-align = mkLiteral "0.50"; | ||||
|         }; | ||||
| 
 | ||||
|         "element-text selected" = { | ||||
|           text-color = mkLiteral "@selected"; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,42 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.launcher.tofi; | ||||
|   fonts = config.homeModules.theme.fonts; | ||||
|   inherit (config.colorscheme) colors; | ||||
| in | ||||
| 
 | ||||
| { | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.packages = [pkgs.tofi]; | ||||
|     xdg.configFile."tofi/config".text = /* config */ '' | ||||
|       history = false | ||||
|       clip-to-padding = false | ||||
|       horizontal = true | ||||
|       width = 40% | ||||
|       height = 35 | ||||
|       anchor = top-left | ||||
|       margin-top = 5 | ||||
|       margin-left = 25% | ||||
|       num-results = 1 | ||||
|       border-width = 0 | ||||
|       outline-width = 0 | ||||
|       result-spacing = 10 | ||||
|       selection-background-padding = 30 | ||||
|       prompt-padding = 10 | ||||
|       font = "${fonts.monospace.family}" | ||||
|       font-size = 14 | ||||
|       prompt-text = "  " | ||||
|       background-color = #0000 | ||||
|       prompt-background = #0000 | ||||
|       prompt-color = ${colors.base0B} | ||||
|       input-color = ${colors.base05} | ||||
|       placeholder-color = ${colors.base03} | ||||
|       default-result-color = ${colors.base03} | ||||
|       selection-color = ${colors.base04} | ||||
|     ''; | ||||
|   }; | ||||
|    | ||||
| } | ||||
| 
 | ||||
							
								
								
									
										21
									
								
								inputs/home/modules/desktop/wayland/lockscreen/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								inputs/home/modules/desktop/wayland/lockscreen/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | |||
| { lib, ... }: | ||||
| { | ||||
| 
 | ||||
|   imports = [ | ||||
|     #./gtkLock --- still needs to be implemented | ||||
|     ./swaylock | ||||
|     ./hyprlock | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.wayland.lockscreen = { | ||||
|     swaylock = { | ||||
|       enable = lib.mkEnableOption "Enable Swaylock screen"; | ||||
|     }; | ||||
|     hyprlock = { | ||||
|       enable = lib.mkEnableOption "Enable hyprlock screen"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   #TODO: make assertion to prevent 2 lockscreens | ||||
| } | ||||
| 
 | ||||
|  | @ -0,0 +1,88 @@ | |||
| { lib, config, inputs, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.lockscreen.hyprlock; | ||||
|   fonts = config.homeModules.theme.fonts; | ||||
|   inherit (config.colorscheme) colors; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   imports = [  | ||||
|     inputs.hyprlock.homeManagerModules.default | ||||
|     # inputs.hypridle.homeManagerModules.default | ||||
|   ]; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.sessionVariables.LOCKER = "hyprlock"; | ||||
|     programs.hyprlock = { | ||||
|       enable = true; | ||||
|       general = { | ||||
|         hide_cursor = true; | ||||
|         no_fade_in = true; | ||||
|       }; | ||||
|       backgrounds = [ | ||||
|         { | ||||
|           monitor = ""; | ||||
|           path = ""; | ||||
|           color = "0xff${colors.base01}"; | ||||
|         } | ||||
|       ]; | ||||
|       input-fields = [ | ||||
|         { | ||||
|           size = { | ||||
|             width = 300; | ||||
|             height = 40; | ||||
|           };       | ||||
|           position = { | ||||
|             x = 0; | ||||
|             y = 0; | ||||
|           }; | ||||
|           outline_thickness = 2; | ||||
|           dots_spacing = 0.2; | ||||
|           fade_on_empty = false; | ||||
|           placeholder_text = ""; | ||||
|           outer_color = "0xff${colors.base02}"; | ||||
|           inner_color = "0xff${colors.base00}"; | ||||
|           font_color = "0xff${colors.base05}"; | ||||
|         } | ||||
|       ]; | ||||
|       labels = [ | ||||
|         { | ||||
|           monitor = ""; | ||||
|           text = "  "; | ||||
|           position = { | ||||
|             x = 0; | ||||
|             y = 80;  | ||||
|           }; | ||||
|           color = "0xff${colors.base08}"; | ||||
|           font_size = 30; | ||||
|           font_family = "${fonts.monospace.family}"; | ||||
|         } | ||||
|         { | ||||
|           monitor = ""; | ||||
|           text = "$TIME"; | ||||
|           position = { | ||||
|             x = 0; | ||||
|             y = -80;  | ||||
|           }; | ||||
|           color = "0xff${colors.base0B}"; | ||||
|           font_size = 20; | ||||
|           font_family = "${fonts.monospace.family}"; | ||||
|         } | ||||
|       ]; | ||||
|     }; | ||||
|     # services.hypridle = { | ||||
|     #   enable = true; | ||||
|     #   package = pkgs.hypridle; | ||||
|     #   beforeSleepCmd = "${pkgs.systemd}/bin/loginctl lock-session"; | ||||
|     #   lockCmd = lib.getExe config.programs.hyprlock.package; | ||||
| 
 | ||||
|     #   listeners = [ | ||||
|     #     { | ||||
|     #       timeout = 500; | ||||
|     #       onTimeout = lib.getExe config.programs.hyprlock.package; | ||||
|     #     } | ||||
|     #   ]; | ||||
|     # }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,39 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (config.colorscheme) colors; | ||||
|   fonts = config.homeModules.theme.fonts; | ||||
|   wallpaperPath = config.homeModules.theme.wallpaper.path; | ||||
|   cfg = config.homeModules.desktop.wayland.lockscreen.swaylock; | ||||
| in | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.sessionVariables.LOCKER  = "swaylock"; | ||||
|     programs.swaylock = { | ||||
|       enable = true; | ||||
|       settings = { | ||||
|         image = "${wallpaperPath}"; | ||||
|         font = fonts.monospace.family; | ||||
|         color = "#${colors.base01}"; | ||||
|         ring-color = "#${colors.base02}"; | ||||
|         inside-wrong-color = "#${colors.base08}"; | ||||
|         ring-wrong-color = "#${colors.base08}"; | ||||
|         key-hl-color = "#${colors.base0B}"; | ||||
|         bs-hl-color = "#${colors.base08}"; | ||||
|         ring-ver-color = "#${colors.base09}"; | ||||
|         inside-ver-color = "#${colors.base09}"; | ||||
|         inside-color = "#${colors.base01}"; | ||||
|         text-color = "#${colors.base07}"; | ||||
|         text-clear-color = "#${colors.base01}"; | ||||
|         text-ver-color = "#${colors.base01}"; | ||||
|         text-wrong-color = "#${colors.base01}"; | ||||
|         text-caps-lock-color = "#${colors.base07}"; | ||||
|         inside-clear-color = "#${colors.base0C}"; | ||||
|         ring-clear-color = "#${colors.base0C}"; | ||||
|         inside-caps-lock-color = "#${colors.base09}"; | ||||
|         ring-caps-lock-color = "#${colors.base02}"; | ||||
|         separator-color = "#${colors.base02}"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										14
									
								
								inputs/home/modules/desktop/wayland/notification/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								inputs/home/modules/desktop/wayland/notification/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| { lib, ... }: | ||||
| { | ||||
| 
 | ||||
|   imports = [ | ||||
|     ./mako | ||||
|     #./dunst -- still needs to be implemented | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.wayland.notification = { | ||||
|     mako = { | ||||
|       enable = lib.mkEnableOption "Enable mako notification daemon"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,40 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   inherit (config.colorscheme) colors kind; | ||||
|   fonts = config.homeModules.theme.fonts; | ||||
|   cfg = config.homeModules.desktop.wayland.notification.mako; | ||||
| in { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     services.mako  = { | ||||
|       enable = true; | ||||
|       iconPath = | ||||
|         if kind == "dark" then | ||||
|           "${config.gtk.iconTheme.package}/share/icons/Papirus-Dark" | ||||
|         else | ||||
|           "${config.gtk.iconTheme.package}/share/icons/Papirus-Light"; | ||||
|       font = "${fonts.regular.family} 12"; | ||||
|       padding = "10,10"; | ||||
|       anchor = "top-right"; | ||||
|       width = 300; | ||||
|       height = 100; | ||||
|       borderSize = 2; | ||||
|       defaultTimeout = 3000; | ||||
|       backgroundColor = "#${colors.base00}dd"; | ||||
|       borderColor = "#${colors.base05}dd"; | ||||
|       textColor = "#${colors.base05}dd"; | ||||
|       extraConfig = '' | ||||
|         [app-name="system-notify"] | ||||
|         padding=3,3 | ||||
|         width=100 | ||||
|         height=100 | ||||
|         [urgency=critical] | ||||
|         padding=3,3 | ||||
|         width=100 | ||||
|         height=100 | ||||
|         anchor=top-center | ||||
|         border-color=#${colors.base08}dd | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
| 
 | ||||
							
								
								
									
										17
									
								
								inputs/home/modules/desktop/wayland/utility/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								inputs/home/modules/desktop/wayland/utility/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| { lib, ... }: | ||||
| 
 | ||||
| { | ||||
|   imports = [ | ||||
|     ./gammastep | ||||
|     ./tools | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.wayland.utility = { | ||||
|     tools = { | ||||
|       enable = lib.mkEnableOption "Enable wayland specific tools"; | ||||
|     }; | ||||
|     gammastep = { | ||||
|       enable = lib.mkEnableOption "Enable gammastep module"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,20 @@ | |||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.utility.gammastep; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     services.gammastep = { | ||||
|       enable = true; | ||||
|       enableVerboseLogging = true; | ||||
|       provider = "geoclue2"; | ||||
|       temperature = { | ||||
|         day = 6000; | ||||
|         night = 4000; | ||||
|       }; | ||||
|       settings.general.adjustment-method = "wayland"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,27 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.utility.tools; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home = { | ||||
|       packages = with pkgs; [ | ||||
|         grim | ||||
|         slurp | ||||
|         libnotify | ||||
|         wl-screenrec | ||||
|         wf-recorder | ||||
|         wl-clipboard | ||||
|       ]; | ||||
|     }; | ||||
|      | ||||
|     systemd.user.targets.tray = { | ||||
|       Unit = { | ||||
|         Description = "Home Manager System Tray"; | ||||
|         Requires = ["graphical-session-pre.target"]; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,14 @@ | |||
| { lib, ... }: | ||||
| 
 | ||||
| { | ||||
|   imports = [ | ||||
|     ./hyprland | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.wayland.windowManager = {  | ||||
|     hyprland = { | ||||
|       enable = lib.mkEnableOption "Enable Hyprland window-manager"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
| } | ||||
|  | @ -0,0 +1,38 @@ | |||
| { lib, config, pkgs, inputs, ... }:  | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
|   inherit (import ./pkgs {inherit pkgs;}) hyprbrightness hyprvolume; | ||||
|   inherit (inputs.ooks-scripts.packages.${pkgs.system}) powermenu zellijmenu; | ||||
| in | ||||
| { | ||||
|   imports = [ | ||||
|     inputs.hyprland.homeManagerModules.default | ||||
|     ./settings | ||||
|     ./extras | ||||
|   ]; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     xdg.portal = { | ||||
|       extraPortals = [ inputs.xdg-portal-hyprland.packages.${pkgs.system}.default ]; | ||||
|     }; | ||||
| 
 | ||||
|     home.packages = [ | ||||
|       pkgs.hyprpicker | ||||
|       hyprvolume | ||||
|       hyprbrightness | ||||
| 
 | ||||
|       # Personal scripts | ||||
|       powermenu | ||||
|       zellijmenu #TODO: only add if zellij enabled | ||||
|       ]; | ||||
|      | ||||
|     wayland.windowManager.hyprland = { | ||||
|       enable = true; | ||||
|       xwayland.enable = true; | ||||
|       systemd = { | ||||
|         enable = true; | ||||
|         variables = ["--all"]; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,17 @@ | |||
| { lib, ... }: | ||||
| 
 | ||||
| { | ||||
|   imports = [ | ||||
|     ./hyprcapture | ||||
|     ./hyprshade | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.wayland.windowManager.hyprland.extras = { | ||||
|     hyprcapture = { | ||||
|       enable = lib.mkEnableOption "Enable hyprcapture screenshot/recording module"; | ||||
|     }; | ||||
|     hyprshade = { | ||||
|       enable = lib.mkEnableOption "Enable hyprshade tool module"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,33 @@ | |||
| { lib, config, pkgs, inputs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland.extras.hyprcapture; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
| 
 | ||||
|     home.packages = with inputs; [ | ||||
|     # Screenshot tool | ||||
|       hyprland-contrib.packages.${pkgs.system}.grimblast | ||||
|     # Screen recording tool | ||||
|       ooks-scripts.packages.${pkgs.system}.hyprrecord | ||||
|     ]; | ||||
| 
 | ||||
|     # Add XDG user directories that the scripts use | ||||
|     xdg.userDirs.extraConfig = { | ||||
|       XDG_RECORDINGS_DIR = "${config.xdg.userDirs.videos}/Recordings"; | ||||
|       XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots"; | ||||
|     }; | ||||
| 
 | ||||
|     wayland.windowManager.hyprland.settings.bind = [ | ||||
|       # Screenshot binds | ||||
|       ",               Print,         exec,     grimblast --notify --cursor copysave area" | ||||
|       "SUPER,          Print,         exec,     grimblast --notify --cursor copysave screen" | ||||
|       # Recording binds | ||||
|       "SUPER,          r,             exec,     hyprrecord -a -w video screen copysave" | ||||
|       "SUPER CTRL,     r,             exec,     hyprrecord -a -w video area copysave" | ||||
|       "SUPER ALT,      r,             exec,     hyprrecord -w gif area copysave" | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,12 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland.extras.hyprshade; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.packages = [ pkgs.hyprshade ]; | ||||
|     # TODO: implement hyprshade configuration | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,9 @@ | |||
| { pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   packages = { | ||||
|     hyprvolume = pkgs.callPackage ./hyprvolume.nix {}; | ||||
|     hyprbrightness = pkgs.callPackage ./hyprbrightness.nix {}; | ||||
|   }; | ||||
| in | ||||
|   packages | ||||
|  | @ -0,0 +1,20 @@ | |||
| { pkgs, ... }: | ||||
| 
 | ||||
| pkgs.writeShellApplication { | ||||
|   name = "hyprbrightness"; | ||||
|   runtimeInputs = with pkgs; [brillo libnotify]; | ||||
|   text = '' | ||||
|     if [ "$1" == "up" ]; then | ||||
|       brillo -q -u 30000 -A 5 | ||||
|     elif [ "$1" == "down" ]; then | ||||
|       brillo -q -u 30000 -U 5 | ||||
|     else | ||||
|       echo "Invalid argument" | ||||
|       exit 1 | ||||
|     fi | ||||
| 
 | ||||
|     BRIGHTNESS=$(brillo -G | awk -F'.' '{print$1}') | ||||
| 
 | ||||
|     notify-send --app-name="system-notify" -h string:x-canonical-private-synchronous:sys-notify "  $BRIGHTNESS%" | ||||
|   ''; | ||||
| } | ||||
|  | @ -0,0 +1,19 @@ | |||
| { pkgs, ... }: | ||||
| 
 | ||||
| pkgs.writeShellApplication { | ||||
|   name = "hyprvolume"; | ||||
|   runtimeInputs = with pkgs; [pamixer libnotify]; | ||||
|   text = '' | ||||
|     if [ "$1" == "up" ]; then | ||||
|       pamixer --increase 5 | ||||
|     elif [ "$1" == "down" ]; then | ||||
|       pamixer --decrease 5 | ||||
|     elif [ "$1" == "mute" ]; then | ||||
|       pamixer --toggle-mute | ||||
|     fi | ||||
| 
 | ||||
|     VOLUME=$(pamixer --get-volume-human) | ||||
| 
 | ||||
|     notify-send --app-name="system-notify" -h string:x-canonical-private-synchronous:sys-notify " $VOLUME" | ||||
|   ''; | ||||
| } | ||||
|  | @ -0,0 +1,52 @@ | |||
| { config, lib, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
|   pointer = config.home.pointerCursor; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     wayland.windowManager.hyprland = { | ||||
|       settings = { | ||||
|         general = { | ||||
| 
 | ||||
|           gaps_in = 10; | ||||
|           gaps_out = 10; | ||||
|           border_size = 2; | ||||
|           cursor_inactive_timeout = 4; | ||||
|           "col.active_border" = "0xff${config.colorscheme.colors.base05}"; | ||||
|           "col.inactive_border" = "0xff${config.colorscheme.colors.base02}"; | ||||
|           }; | ||||
| 
 | ||||
|         exec-once = [ | ||||
|           "hyprctl setcursor ${pointer.name} ${toString pointer.size}" | ||||
|         ]; | ||||
| 
 | ||||
|         decoration = { | ||||
| 
 | ||||
|           active_opacity = 1.0; | ||||
|           inactive_opacity = 1.0; | ||||
|           fullscreen_opacity = 1.0; | ||||
| 
 | ||||
|           rounding = 0; | ||||
| 
 | ||||
|           blur = { | ||||
|             enabled = false; | ||||
|             ignore_opacity = true; | ||||
|           }; | ||||
| 
 | ||||
|           drop_shadow = true; | ||||
|           shadow_range = 12; | ||||
|           shadow_offset = "3 3"; | ||||
|           "col.shadow" = "0x44000000"; | ||||
|           "col.shadow_inactive" = "0x66000000"; | ||||
|         }; | ||||
|      | ||||
|         animations = { | ||||
|           enabled = false; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,128 @@ | |||
| { lib, config, pkgs, ... }:  | ||||
| 
 | ||||
| let | ||||
|     cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { | ||||
|     bind = let | ||||
|       terminal = config.home.sessionVariables.TERMINAL; | ||||
|       browser = config.home.sessionVariables.BROWSER; | ||||
|       editor = config.home.sessionVariables.EDITOR; | ||||
|       locker = config.home.sessionVariables.LOCKER; | ||||
| 
 | ||||
|       spotifyctl = "${pkgs.spotify-player}/bin/spotify_player"; | ||||
|       discord = "${pkgs.vesktop}/bin/vesktop"; | ||||
|        | ||||
|       explorer = "${pkgs.cinnamon.nemo-with-extensions}/bin/nemo"; | ||||
| 
 | ||||
|       password = "${pkgs._1password-gui}/bin/1password"; | ||||
|     in [ | ||||
| 
 | ||||
|       # Program Launch | ||||
|       "SUPER,          b,             exec,     ${browser}" | ||||
|       "SUPER,          return,        exec,     ${terminal}" | ||||
|       "SUPER,          e,             exec,     ${terminal} ${editor}" | ||||
|       "SUPERSHIFT,     P,             exec,     ${password}" | ||||
|       "SUPER,          d,             exec,     ${discord}" | ||||
|       "SUPERSHIFT,     e,             exec,     ${explorer}" | ||||
|       "SUPERSHIFT,     S,             exec,     steam" | ||||
|       "SUPER,          escape,        exec,     ${terminal} --title=BTOP btop" | ||||
|       "SUPER CTRL,     return,        exec,     zellijmenu -n" | ||||
| 
 | ||||
|       "SUPER,          delete,        exec,     powermenu -c dmenu" | ||||
|        | ||||
|        | ||||
| 
 | ||||
|       # Spotify PLayer Controls | ||||
| 
 | ||||
|       "SUPER,          bracketright,  exec,     ${spotifyctl} playback next" | ||||
|       "SUPER,          bracketleft,   exec,     ${spotifyctl} playback previous" | ||||
|       "SUPER,          backslash,     exec,     ${spotifyctl} playback play-pause" | ||||
| 
 | ||||
|       # Brightness | ||||
| 
 | ||||
|       ",XF86MonBrightnessUp,          exec,     hyprbrightness up" | ||||
|       ",XF86MonBrightnessDown,        exec,     hyprbrightness down" | ||||
| 
 | ||||
|       # Volume | ||||
| 
 | ||||
|       ",XF86AudioRaiseVolume,         exec,     hyprvolume up" | ||||
|       ",XF86AudioLowerVolume,         exec,     hyprvolume down" | ||||
|       ",XF86AudioMute,                exec,     hyprvolume mute" | ||||
|        | ||||
|       # Window Management | ||||
|        | ||||
|       "SUPER,          Q,             killactive" | ||||
|       "SUPER CTRL,     backspace,     killactive" | ||||
|       "SUPERSHIFT ALT, delete,        exec, hyprkillsession" | ||||
|       "SUPER,          F,             fullscreen" | ||||
|       "SUPER CTRL,     F,             fakefullscreen" | ||||
|       "SUPER,          Space,         togglefloating" | ||||
|       "SUPER,          P,             pseudo" # dwindle | ||||
|       "SUPER,          S,             togglesplit" # dwindle | ||||
| 
 | ||||
|       # Focus | ||||
| 
 | ||||
|       "SUPER,          left,          movefocus,l" | ||||
|       "SUPER,          right,         movefocus,r" | ||||
|       "SUPER,          up,            movefocus,u" | ||||
|       "SUPER,          down,          movefocus,d" | ||||
| 
 | ||||
|       # Move | ||||
| 
 | ||||
|       "SUPERSHIFT,     left,          movewindow,l" | ||||
|       "SUPERSHIFT,     right,         movewindow,r" | ||||
|       "SUPERSHIFT,     up,            movewindow,u" | ||||
|       "SUPERSHIFT,     down,          movewindow,d" | ||||
| 
 | ||||
|       #Resize | ||||
| 
 | ||||
|       "SUPER CTRL,     left,          resizeactive,-20 0" | ||||
|       "SUPERCTRL,      right,         resizeactive,20 0" | ||||
|       "SUPER CTRL,     up,            resizeactive,0 -20" | ||||
|       "SUPERCTRL,      down,          resizeactive,0 20" | ||||
| 
 | ||||
|       # Switch workspace | ||||
|      | ||||
|       "SUPER,          1,             workspace,1" | ||||
|       "SUPER,          2,             workspace,2" | ||||
|       "SUPER,          3,             workspace,3" | ||||
|       "SUPER,          4,             workspace,4" | ||||
|       "SUPER,          5,             workspace,5" | ||||
|       "SUPER,          6,             workspace,6" | ||||
|       "SUPER,          7,             workspace,7" | ||||
|       "SUPER,          8,             workspace,8" | ||||
|       "SUPER,          9,             workspace,9" | ||||
|       "SUPER,          0,             workspace,10" | ||||
|       "SUPER,          comma,         workspace,e+1" | ||||
|       "SUPER,          period,        workspace,e-1" | ||||
|       "SUPER,          tab,           focusCurrentOrLast" | ||||
| 
 | ||||
|       # Move workspace | ||||
| 
 | ||||
|       "SUPERSHIFT,     1,             movetoworkspace,1" | ||||
|       "SUPERSHIFT,     2,             movetoworkspace,2" | ||||
|       "SUPERSHIFT,     3,             movetoworkspace,3" | ||||
|       "SUPERSHIFT,     4,             movetoworkspace,4" | ||||
|       "SUPERSHIFT,     5,             movetoworkspace,5" | ||||
|       "SUPERSHIFT,     6,             movetoworkspace,6" | ||||
|       "SUPERSHIFT,     7,             movetoworkspace,7" | ||||
|       "SUPERSHIFT,     8,             movetoworkspace,8" | ||||
|       "SUPERSHIFT,     9,             movetoworkspace,9" | ||||
|       "SUPERSHIFT,     0,             movetoworkspace,10" | ||||
| 
 | ||||
|       # Lock Screen | ||||
|       "SUPER,          Backspace,     exec,     ${locker}" | ||||
|     ]; | ||||
|       # Mouse | ||||
|     bindm = [ | ||||
|       "SUPER,          mouse:272,     movewindow" | ||||
|       "SUPER,          mouse:273,     resizewindow" | ||||
|     ]; | ||||
|     # bindr = [ | ||||
|     #   "SUPER, SUPER_L, exec, killall rofi || rofi -show drun" | ||||
|     # ]; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,14 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./appearance.nix | ||||
|     ./binds.nix | ||||
|     ./rules.nix | ||||
|     ./exec.nix | ||||
|     ./env.nix | ||||
|     ./inputs.nix | ||||
|     ./misc.nix | ||||
|     ./monitor.nix | ||||
|     ./gestures.nix | ||||
|     ./hyprpaper.nix | ||||
|   ]; | ||||
| } | ||||
|  | @ -0,0 +1,16 @@ | |||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     wayland.windowManager.hyprland.settings.env = [ | ||||
|       "XDG_SESSION_DESKTOP,hyprland" | ||||
|       "XDG_CURRENT_DESKTOP,hyprland" | ||||
|     ];  | ||||
|   }; | ||||
| 
 | ||||
|    | ||||
| } | ||||
|  | @ -0,0 +1,20 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     wayland.windowManager.hyprland.settings = { | ||||
|       exec = [ | ||||
|         "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" | ||||
|       ]; | ||||
|       exec-once = [ | ||||
|         "${pkgs._1password-gui}/bin/1password --silent" | ||||
|         # "${pkgs.live-buds-cli}/bin/earbuds -d" | ||||
|         # "waybar" | ||||
|       ]; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,14 @@ | |||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     wayland.windowManager.hyprland.settings.gestures = { | ||||
|       workspace_swipe = true; | ||||
|       workspace_swipe_forever = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,19 @@ | |||
| { lib, config, inputs,  ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
|   wallpaperPath = config.homeModules.theme.wallpaper.path; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   imports = [ inputs.hyprpaper.homeManagerModules.hyprpaper ]; | ||||
|    | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     services.hyprpaper = { | ||||
|       enable = true; | ||||
|       preloads = ["${wallpaperPath}"]; | ||||
|       wallpapers = [", ${wallpaperPath}"]; | ||||
|       ipc = false; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -0,0 +1,16 @@ | |||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     wayland.windowManager.hyprland.settings.input = { | ||||
|       kb_layout = "us"; | ||||
|       follow_mouse = 1; | ||||
|       touchpad.natural_scroll = "no"; | ||||
|     }; | ||||
|   }; | ||||
|    | ||||
| } | ||||
|  | @ -0,0 +1,21 @@ | |||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     wayland.windowManager.hyprland.settings.misc = { | ||||
|       mouse_move_enables_dpms = true; | ||||
|       key_press_enables_dpms = true; | ||||
|       disable_hyprland_logo = true; | ||||
|       disable_splash_rendering = true; | ||||
| 
 | ||||
|       enable_swallow = true; | ||||
|       swallow_regex = "foot|nemo"; | ||||
| 
 | ||||
|       focus_on_activate = true; | ||||
|     }; | ||||
|   }; | ||||
| }  | ||||
|  | @ -0,0 +1,20 @@ | |||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     wayland.windowManager.hyprland.settings = { | ||||
|       monitor = lib.concatMap (m: let | ||||
|         resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}"; | ||||
|         position = "${toString m.x}x${toString m.y}"; | ||||
|         basicConfig = "${m.name},${if m.enabled then "${resolution},${position},1" else "disable"}"; | ||||
|       in | ||||
|         [ basicConfig ] ++ (if m.transform != 0 then ["${m.name},transform,${toString m.transform}"] else []) | ||||
|       ) (config.monitors); | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
| 
 | ||||
|  | @ -0,0 +1,28 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland.windowManager.hyprland; | ||||
| in | ||||
| { | ||||
|   config = { | ||||
|     wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { | ||||
|       windowrulev2 = [ | ||||
|         "float,move 191 15,size 924 396,class:(1Password)" | ||||
| 
 | ||||
|         "float, title:^(Picture-in-Picture)$" | ||||
|         "pin, title:^(Picture-in-Picture)$" | ||||
| 
 | ||||
|         "workspace 4, title:Vesktop" | ||||
| 
 | ||||
|         # Floating BTOP | ||||
|         "float,title:^(BTOP)$" | ||||
|         "size 85%,title:^(BTOP)$" | ||||
|         "pin,title:^(BTOP)$" | ||||
|         "center,title:^(BTOP)$" | ||||
|         "stayfocused,title:^(BTOP)$" | ||||
| 
 | ||||
|         # Tearing | ||||
|         "immediate, title:^(TEKKEN™8)$"  | ||||
|       ]; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue