From ae44945de146e69317ac8c94b153681841573179 Mon Sep 17 00:00:00 2001 From: joy Date: Sun, 24 Nov 2024 21:35:15 +0100 Subject: [PATCH] more options --- .../wm/home/firefox => firefox}/default.nix | 0 .../wm/home/firefox => firefox}/userChrome | 0 hosts/desktop/default.nix | 12 + hosts/laptop/default.nix | 18 +- hosts/server/default.nix | 12 +- modules/programs/user.nix | 1 - modules/programs/xdg/default.nix | 7 - modules/wm/{home => }/ags/bar/config.js | 0 modules/wm/{home => }/ags/bar/style.css | 0 modules/wm/ags/default.nix | 20 ++ modules/wm/{home => }/ags/tsconfig.json | 0 modules/wm/clip/default.nix | 20 ++ modules/wm/default.nix | 30 +- modules/wm/dunst/default.nix | 46 +++ modules/wm/firefox/default.nix | 189 +++++++++++ modules/wm/firefox/userChrome | 281 ++++++++++++++++ modules/wm/foot/default.nix | 45 +++ modules/wm/gdm/default.nix | 24 +- modules/wm/gtk/default.nix | 24 ++ modules/wm/{home => }/gtk/gruvbox-plus.nix | 0 modules/wm/home/ags/default.nix | 7 - modules/wm/home/clip/default.nix | 7 - modules/wm/home/default.nix | 16 - modules/wm/home/dunst/default.nix | 34 -- modules/wm/home/foot/default.nix | 32 -- modules/wm/home/gtk/default.nix | 18 - modules/wm/home/hypridle/default.nix | 29 -- modules/wm/home/misc/default.nix | 32 -- modules/wm/home/mpv/default.nix | 18 - modules/wm/home/qt/default.nix | 8 - modules/wm/home/rofi/default.nix | 16 - modules/wm/home/stylix/default.nix | 67 ---- modules/wm/hypridle/default.nix | 32 ++ modules/wm/hyprland/default.nix | 309 +++++++++--------- modules/wm/misc/default.nix | 29 ++ modules/wm/mpv/default.nix | 31 ++ modules/wm/polkit/default.nix | 36 +- modules/wm/qt/default.nix | 18 + modules/wm/rofi/default.nix | 26 ++ .../wm/{home => }/rofi/gruvbox-material.rasi | 0 modules/wm/stylix/default.nix | 75 +++++ modules/wm/xdg/default.nix | 19 ++ 42 files changed, 1098 insertions(+), 490 deletions(-) rename {modules/wm/home/firefox => firefox}/default.nix (100%) rename {modules/wm/home/firefox => firefox}/userChrome (100%) delete mode 100644 modules/programs/xdg/default.nix rename modules/wm/{home => }/ags/bar/config.js (100%) rename modules/wm/{home => }/ags/bar/style.css (100%) create mode 100644 modules/wm/ags/default.nix rename modules/wm/{home => }/ags/tsconfig.json (100%) create mode 100644 modules/wm/clip/default.nix create mode 100644 modules/wm/dunst/default.nix create mode 100644 modules/wm/firefox/default.nix create mode 100644 modules/wm/firefox/userChrome create mode 100644 modules/wm/foot/default.nix create mode 100644 modules/wm/gtk/default.nix rename modules/wm/{home => }/gtk/gruvbox-plus.nix (100%) delete mode 100644 modules/wm/home/ags/default.nix delete mode 100644 modules/wm/home/clip/default.nix delete mode 100644 modules/wm/home/default.nix delete mode 100644 modules/wm/home/dunst/default.nix delete mode 100644 modules/wm/home/foot/default.nix delete mode 100644 modules/wm/home/gtk/default.nix delete mode 100644 modules/wm/home/hypridle/default.nix delete mode 100644 modules/wm/home/misc/default.nix delete mode 100644 modules/wm/home/mpv/default.nix delete mode 100644 modules/wm/home/qt/default.nix delete mode 100644 modules/wm/home/rofi/default.nix delete mode 100644 modules/wm/home/stylix/default.nix create mode 100644 modules/wm/hypridle/default.nix create mode 100644 modules/wm/misc/default.nix create mode 100644 modules/wm/mpv/default.nix create mode 100644 modules/wm/qt/default.nix create mode 100644 modules/wm/rofi/default.nix rename modules/wm/{home => }/rofi/gruvbox-material.rasi (100%) create mode 100644 modules/wm/stylix/default.nix create mode 100644 modules/wm/xdg/default.nix diff --git a/modules/wm/home/firefox/default.nix b/firefox/default.nix similarity index 100% rename from modules/wm/home/firefox/default.nix rename to firefox/default.nix diff --git a/modules/wm/home/firefox/userChrome b/firefox/userChrome similarity index 100% rename from modules/wm/home/firefox/userChrome rename to firefox/userChrome diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 3c3d7b5..cdffc63 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -11,6 +11,18 @@ systemd-boot.enable = true; qemu.enable = true; sync-client.enable = true; + foot.enable = true; + mpv.enable = true; + ags.enable = true; + firefox.enable = true; + clip.enable = true; + rofi.enable = true; + dunst.enable = true; + polkit.enable = true; + xdg.enable = true; + gdm.enable = true; + theme.enable = true; + hyprland.enable = true; imports = [ ./hardware.nix diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index 1c09f60..00652c2 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -1,4 +1,4 @@ -{username, ...}: { +{ networking.hostName = "laptop"; led.enable = true; @@ -8,9 +8,19 @@ systemd-boot.enable = true; qemu.enable = true; sync-client.enable = true; - home-manager.users.${username} = { - hypridle.enable = true; - }; + hypridle.enable = true; + foot.enable = true; + mpv.enable = true; + ags.enable = true; + firefox.enable = true; + clip.enable = true; + rofi.enable = true; + dunst.enable = true; + polkit.enable = true; + xdg.enable = true; + gdm.enable = true; + theme.enable = true; + hyprland.enable = true; imports = [ ./hardware.nix diff --git a/hosts/server/default.nix b/hosts/server/default.nix index f766ea5..9592ab5 100644 --- a/hosts/server/default.nix +++ b/hosts/server/default.nix @@ -1,20 +1,18 @@ { networking.hostName = "server"; - services.logind.lidSwitch = "ignore"; - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; sync-server.enable = true; nginx.enable = true; forgejo.enable = true; immich.enable = true; docker.enable = true; + services.logind.lidSwitch = "ignore"; + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + imports = [ ./hardware.nix - ../../modules/programs - ../../modules/system - ../../modules/secrets - ../../modules/services + ../../modules ]; } diff --git a/modules/programs/user.nix b/modules/programs/user.nix index 3aa7232..425c873 100644 --- a/modules/programs/user.nix +++ b/modules/programs/user.nix @@ -12,7 +12,6 @@ ./zoxide ./fastfetch ./btop - ./xdg ./misc ]; } diff --git a/modules/programs/xdg/default.nix b/modules/programs/xdg/default.nix deleted file mode 100644 index 9842670..0000000 --- a/modules/programs/xdg/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{config, ...}: { - xdg.userDirs = { - enable = true; - download = "${config.home.homeDirectory}/dl"; - desktop = "${config.home.homeDirectory}/dl"; - }; -} diff --git a/modules/wm/home/ags/bar/config.js b/modules/wm/ags/bar/config.js similarity index 100% rename from modules/wm/home/ags/bar/config.js rename to modules/wm/ags/bar/config.js diff --git a/modules/wm/home/ags/bar/style.css b/modules/wm/ags/bar/style.css similarity index 100% rename from modules/wm/home/ags/bar/style.css rename to modules/wm/ags/bar/style.css diff --git a/modules/wm/ags/default.nix b/modules/wm/ags/default.nix new file mode 100644 index 0000000..0b1bed2 --- /dev/null +++ b/modules/wm/ags/default.nix @@ -0,0 +1,20 @@ +{ + lib, + config, + username, + inputs, + ... +}: { + options = { + ags.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.ags.enable { + home-manager.users.${username} = { + imports = [inputs.ags.homeManagerModules.default]; + programs.ags = { + enable = true; + configDir = ./bar; + }; + }; + }; +} diff --git a/modules/wm/home/ags/tsconfig.json b/modules/wm/ags/tsconfig.json similarity index 100% rename from modules/wm/home/ags/tsconfig.json rename to modules/wm/ags/tsconfig.json diff --git a/modules/wm/clip/default.nix b/modules/wm/clip/default.nix new file mode 100644 index 0000000..60b426e --- /dev/null +++ b/modules/wm/clip/default.nix @@ -0,0 +1,20 @@ +{ + lib, + config, + username, + pkgs, + ... +}: { + options = { + clip.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.clip.enable { + home-manager.users.${username} = { + home.packages = with pkgs; [ + wl-clipboard + ]; + + services.cliphist.enable = true; + }; + }; +} diff --git a/modules/wm/default.nix b/modules/wm/default.nix index 3bf42d5..3ab8354 100644 --- a/modules/wm/default.nix +++ b/modules/wm/default.nix @@ -1,23 +1,21 @@ { - inputs, - username, - domain, - ... -}: { imports = [ - ./gdm ./gnome ./hyprland + ./hypridle + ./foot + ./mpv + ./ags + ./firefox + ./clip + ./rofi + ./dunst ./polkit + ./qt + ./gtk + ./xdg + ./gdm + ./stylix + ./misc ]; - home-manager = { - extraSpecialArgs = { - inherit inputs; - inherit username; - inherit domain; - }; - users = { - "${username}" = import ./home; - }; - }; } diff --git a/modules/wm/dunst/default.nix b/modules/wm/dunst/default.nix new file mode 100644 index 0000000..b6ce7a5 --- /dev/null +++ b/modules/wm/dunst/default.nix @@ -0,0 +1,46 @@ +{ + lib, + config, + username, + ... +}: { + options = { + dunst.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.dunst.enable { + home-manager.users.${username} = { + services.dunst = { + enable = true; + settings = { + global = { + background = "#282828"; + foreground = "#D5C4A1"; + geometry = "300x60-3+200"; + padding = 8; + horizontal_padding = 8; + separator_height = 2; + frame_width = 4; + corner_radius = 5; + font = "DejaVuSansMono 12"; + alignment = "center"; + vertical_alignment = "center"; + ellipsize = "middle"; + ignore_newline = false; + }; + + urgency_low = { + frame_color = "#98971a"; + }; + + urgency_normal = { + frame_color = "#458588"; + }; + + urgency_critical = { + frame_color = "#98971a"; + }; + }; + }; + }; + }; +} diff --git a/modules/wm/firefox/default.nix b/modules/wm/firefox/default.nix new file mode 100644 index 0000000..fe6a99a --- /dev/null +++ b/modules/wm/firefox/default.nix @@ -0,0 +1,189 @@ +{ + inputs, + username, + domain, + lib, + config, + ... +}: let + userChrome = builtins.readFile (./. + "/userChrome"); +in { + options = { + firefox.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.firefox.enable { + home-manager.users.${username} = { + programs.firefox = { + enable = true; + profiles.${username} = { + userChrome = userChrome; + extensions = with inputs.firefox-addons.packages."x86_64-linux"; [ + ublock-origin + darkreader + libredirect + search-by-image + terms-of-service-didnt-read + istilldontcareaboutcookies + decentraleyes + mtab + ]; + search.engines = { + "4get" = { + urls = [ + { + template = "https://4get.${domain}/web"; + params = [ + { + name = "s"; + value = "{searchTerms}"; + } + ]; + } + ]; + definedAliases = ["@4get"]; + }; + }; + search.force = true; + search.default = "4get"; + + bookmarks = [ + { + name = "Bookmarks"; + toolbar = true; + bookmarks = [ + { + name = "Packages"; + url = "https://search.nixos.org/packages?channel=unstable"; + } + { + name = "PR"; + url = "https://nixpk.gs/pr-tracker.html"; + } + { + name = "Homemanager"; + url = "https://home-manager-options.extranix.com/?query=&release=master"; + } + { + name = "Stylix"; + url = "https://stylix.danth.me/options/nixos.html"; + } + { + name = "Git"; + url = "https://git.${domain}/"; + } + { + name = "Syncserver"; + url = "https://sync.${domain}/"; + } + { + name = "Photos"; + url = "https://immich.${domain}/"; + } + { + name = "Translate"; + url = "https://trans.${domain}/"; + } + { + name = "invidious"; + url = "https://yt.${domain}/"; + } + { + name = "Server"; + url = "https://avoro.eu/cp/clientarea.php?action=productdetails&id=27920"; + } + { + name = "Domain"; + url = "https://ap.www.namecheap.com/domains/list/"; + } + { + name = "Github"; + url = "https://www.github.com"; + } + { + name = "Hyprland"; + url = "https://wiki.hyprland.org/"; + } + { + name = "Helix"; + url = "https://helix-editor.com/"; + } + { + name = "Yazi"; + url = "https://yazi-rs.github.io/docs/installation"; + } + { + name = "Monkeytype"; + url = "https://monkeytype.com/"; + } + { + name = "Zophar's Domain"; + url = "https://www.zophar.net/music"; + } + { + name = "Syncthing"; + url = "http://localhost:8384/"; + } + ]; + } + ]; + settings = { + "dom.security.https_only_mode" = true; + "browser.download.panel.shown" = true; + "identity.fxaccounts.enabled" = false; + "signon.rememberSignons" = false; + "browser.urlbar.pocket.featureGate" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.shell.checkDefaultBrowser" = false; + "browser.shell.defaultBrowserCheckCount" = 1; + "privacy.trackingprotection.enabled" = true; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "browser.uiCustomization.state" = '' + { + "placements": { + "widget-overflow-fixed-list": [], + "nav-bar": [ + "back-button", + "forward-button", + "stop-reload-button", + "urlbar-container", + "downloads-button", + "ublock0_raymondhill_net-browser-action", + "addon_darkreader_org-browser-action", + "_testpilot-containers-browser-action" + ], + "toolbar-menubar": [ + "menubar-items" + ], + "TabsToolbar": [ + "tabbrowser-tabs", + "new-tab-button", + "alltabs-button" + ], + "PersonalToolbar": [ + "personal-bookmarks" + ] + }, + "seen": [ + "save-to-pocket-button", + "developer-button", + "ublock0_raymondhill_net-browser-action", + "addon_darkreader_org-browser-action", + "_testpilot-containers-browser-action" + ], + "dirtyAreaCache": [ + "nav-bar", + "PersonalToolbar", + "toolbar-menubar", + "TabsToolbar", + "widget-overflow-fixed-list" + ], + "currentVersion": 18, + "newElementCount": 4 + } + ''; + }; + }; + }; + }; + }; +} diff --git a/modules/wm/firefox/userChrome b/modules/wm/firefox/userChrome new file mode 100644 index 0000000..5285469 --- /dev/null +++ b/modules/wm/firefox/userChrome @@ -0,0 +1,281 @@ +#alltabs-button { display: none !important; } +@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; + +:root { + --background: #1d2021; + --secondary: #282828; + --foreground: #EBDBB2; + --orange-highlight: #fe8019; + --sound-border: #68217A; + --separator: #665e54; + --toolbar-bgcolor: var(--secondary) !important; + --tab: var(--background); + --tab-btn: var(--tab-inactive); + --tab-inactive: var(--secondary); + --tab-btn-inactive: var(--tab-inactive); + --tab-hover: #32302f; + --tab-btn-hover: #3C3836; + --toolbar-btn-hover: #49463f; + --url-bar: #3C3836; /* Updated color */ + --url-focus: #3C3836; + --url-bar-item-hover: #6a6257; + --sidebar: #3C3836; + --sidebar-button-hover: #5A544B; + --sidebar-highlight: #458588; +} + +.titlebar-buttonbox-container { + display: none !important; +} + +.panel-arrowcontainer { + background-color: var(--secondary) !important; +} + +#PopupAutoComplete, +#PopupSearchAutoComplete { + background-color: var(--url-focus) !important; + color: var(--foreground) !important; +} + +panelview { + background-color: var(--sidebar) !important; + color: var(--foreground) !important; +} + +panel[type="autocomplete-richlistbox"] { + --panel-background: none !important; + border-radius: 4px !important; + color: var(--foreground) !important; +} + +toolbarseparator, +menuseparator { + border-color: var(--separator) !important; + border-image: none !important; +} + +toolbar { + background-color: var(--secondary); +} + +toolbar#TabsToolbar { + background-color: var(--background); +} + +toolbar#TabsToolbar:-moz-window-inactive { + background-color: var(--toolbar-bgcolor) !important; +} + +#titlebar, +#titlebar-spacer, +#titlebar-buttonbox-container { + background-color: var(--background) !important; + border: none !important; +} + +#navigator-toolbox { + --tabs-border-color: var(--orange-highlight) !important; +} + +#navigator-toolbox::after { + border-bottom: 0px !important; +} + +#navigator-toolbox { + border: none !important; +} + +#urlbar, +#searchbar { + box-shadow: none !important; + border: none !important; + border-radius: 4px; + color: var(--foreground) !important; + background-color: var(--url-bar) !important; + --autocomplete-popup-separator-color: var(--separator) !important; +} + +#urlbar-input, +#urlbar-input-container { + color: var(--foreground) !important; + background-color: var(--url-bar) !important; +} + +#urlbar:not([open]) #urlbar-input-container:focus-within, +#searchbar:focus-within { + border: 2px solid var(--orange-highlight) !important; +} + +#urlbar:focus-within, +#urlbar[open], +#urlbar[open] #urlbar-input-container, +#urlbar[open] #urlbar-input, +#urlbar-input-container:focus-within, +#urlbar-input:focus, +#urlbar-background, +.urlbarView, +#searchbar:focus-within, +menupop { + background-color: var(--url-focus) !important; +} + +#searchbar:focus-within { + outline: none !important; +} + +:is(panel, menupopup)::part(content) { + background: none !important; +} + +.urlbarView button:hover, +#searchbar button:hover, +.urlbarView-row:hover .urlbarView-row-inner, +.search-autocomplete-richlistbox-popup .autocomplete-richlistitem:hover { + background-color: var(--url-bar-item-hover) !important; +} + +.urlbarView-row[type="switchtab"] > span { + color: var(--orange-highlight) !important; +} + +#PopupSearchAutoComplete .autocomplete-richlistitem[selected], +.searchbar-engine-one-off-item[selected], +.urlbarView-row[selected], +.urlbarView-row[aria-selected="true"], +.urlbarView-row:not([type="tip"], [type="dynamic"])[selected] > .urlbarView-row-inner, +.urlbarView-row-inner[selected] { + color: var(--foreground) !important; + background-color: var(--sidebar-highlight) !important; + border-radius: 4px !important; +} + +#PersonalToolbar { + background-color: var(--secondary) !important; +} + +.tab-background[selected="true"] { + background-color: transparent !important; + background-image: none !important; +} + +.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected="true"]):not([multiselected]) { + background-color: transparent !important; +} + +.tabbrowser-tab[soundplaying="true"] { + --lwt-tab-line-color: var(--sound-border) !important; +} + +.tab-content[selected="true"] { + border-color: var(--orange-highlight) !important; + --sound-border: var(--orange-highlight) !important; +} + +.tab-text { + color: var(--foreground); +} + +tab, +#tabbrowser-tabs { + background-color: var(--background) !important; + color: var(--foreground) !important; +} + +tab:-moz-window-inactive, +#tabbrowser-tabs:-moz-window-inactive, +#nav-bar-customization-target { + background-color: var(--secondary) !important; +} + +.tabbrowser-tab[selected] { + opacity: 1; +} + +.tab-loading-burst { + background-color: inherit; +} + +.tab-content { + border-radius: 4px; + margin: 5px 0px 5px 0px !important; + border: 1px solid transparent !important; +} + +.tab-content[selected="true"] { + background-color: var(--secondary) !important; + color: var(--foreground) !important; + border: 1px solid var(--orange-highlight) !important; +} + +.tab-content:not([selected="true"]):hover { + background-color: var(--tab-hover) !important; +} + +toolbarbutton { + fill: var(--foreground) !important; + background-color: transparent !important; +} + +#TabsToolbar toolbarbutton { + border-radius: 4px; + border: 1px solid transparent !important; +} + +#alltabs-button > .toolbarbutton-badge-stack, +#tabs-newtab-button > .toolbarbutton-icon { + background-image: none; + border-radius: 6px; +} + +#alltabs-button:hover > .toolbarbutton-badge-stack, +#tabs-newtab-button:hover > .toolbarbutton-icon { + background-color: var(--tab-btn-hover) !important; +} + +#TabsToolbar #firefox-view-button > .toolbarbutton-icon { + background-image: none !important; + border-radius: 4px; +} + +#TabsToolbar #firefox-view-button[open] > .toolbarbutton-icon { + background-color: var(--secondary) !important; + color: var(--foreground) !important; + padding: 9px !important; + border: 1px solid var(--orange-highlight) !important; +} + +#TabsToolbar #firefox-view-button:not([open]):hover > .toolbarbutton-icon { + background-color: var(--tab-hover) !important; +} + +#nav-bar toolbarbutton > .toolbarbutton-icon, +#nav-bar toolbarbutton > .toolbarbutton-badge-stack { + border-radius: 6px; +} + +#nav-bar toolbarbutton:hover > .toolbarbutton-icon, +#nav-bar toolbarbutton:hover > .toolbarbutton-badge-stack { + background-color: var(--toolbar-btn-hover) !important; +} + +#back-button { + padding-right: 2px !important; + padding-left: 2px !important; + margin-left: 6px !important; +} + +#PanelUI-menu-button { + background-color: var(--secondary) !important; + padding-right: 2px !important; + margin-right: 6px !important; +} + +#PersonalToolbar toolbarbutton { + margin: 3px 0px 3px 3px !important; + border-radius: 4px; +} + +#PersonalToolbar toolbarbutton:hover { + background-color: var(--toolbar-btn-hover) !important; +} diff --git a/modules/wm/foot/default.nix b/modules/wm/foot/default.nix new file mode 100644 index 0000000..c8de893 --- /dev/null +++ b/modules/wm/foot/default.nix @@ -0,0 +1,45 @@ +{ + lib, + config, + username, + ... +}: { + options = { + foot.enable = lib.mkEnableOption ""; + }; + + config = lib.mkIf config.foot.enable { + home-manager.users.${username} = { + programs.foot = { + enable = true; + settings = { + main = { + pad = "2x2"; + font = "RobotoMono Nerd Font:size=12"; + }; + + colors = { + "foreground" = "d5c4a1"; + "background" = "282828"; + "regular0" = "282828"; + "regular1" = "cc241d"; + "regular2" = "98971a"; + "regular3" = "d79921"; + "regular4" = "458588"; + "regular5" = "b16286"; + "regular6" = "689d6a"; + "regular7" = "d5c4a1"; + "bright0" = "504945"; + "bright1" = "fb4934"; + "bright2" = "b8bb26"; + "bright3" = "fabd2f"; + "bright4" = "83a598"; + "bright5" = "d3869b"; + "bright6" = "8ec07c"; + "bright7" = "ebdbb2"; + }; + }; + }; + }; + }; +} diff --git a/modules/wm/gdm/default.nix b/modules/wm/gdm/default.nix index 0f4366c..2a58225 100644 --- a/modules/wm/gdm/default.nix +++ b/modules/wm/gdm/default.nix @@ -1,10 +1,20 @@ -{username, ...}: { - services.xserver.enable = true; - services.xserver.displayManager.gdm.enable = true; +{ + username, + lib, + config, + ... +}: { + options = { + gdm.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.gdm.enable { + services.xserver.enable = true; + services.xserver.displayManager.gdm.enable = true; - services.displayManager.autoLogin.enable = true; - services.displayManager.autoLogin.user = username; + services.displayManager.autoLogin.enable = true; + services.displayManager.autoLogin.user = username; - systemd.services."getty@tty1".enable = false; - systemd.services."autovt@tty1".enable = false; + systemd.services."getty@tty1".enable = false; + systemd.services."autovt@tty1".enable = false; + }; } diff --git a/modules/wm/gtk/default.nix b/modules/wm/gtk/default.nix new file mode 100644 index 0000000..6b81ea8 --- /dev/null +++ b/modules/wm/gtk/default.nix @@ -0,0 +1,24 @@ +{ + pkgs, + config, + lib, + username, + ... +}: let + gruvboxPlus = import ./gruvbox-plus.nix {inherit pkgs;}; +in { + config = lib.mkIf config.theme.enable { + home-manager.users.${username} = { + home.file = { + ".local/share/icons/GruvboxPlus".source = "${gruvboxPlus}"; + }; + + gtk = { + enable = true; + iconTheme.package = gruvboxPlus; + iconTheme.name = "GruvboxPlus"; + gtk2.configLocation = "/home/${username}/.config/gtk-2.0/gtkrc"; + }; + }; + }; +} diff --git a/modules/wm/home/gtk/gruvbox-plus.nix b/modules/wm/gtk/gruvbox-plus.nix similarity index 100% rename from modules/wm/home/gtk/gruvbox-plus.nix rename to modules/wm/gtk/gruvbox-plus.nix diff --git a/modules/wm/home/ags/default.nix b/modules/wm/home/ags/default.nix deleted file mode 100644 index 7b53d29..0000000 --- a/modules/wm/home/ags/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{inputs, ...}: { - imports = [inputs.ags.homeManagerModules.default]; - programs.ags = { - enable = true; - configDir = ./bar; - }; -} diff --git a/modules/wm/home/clip/default.nix b/modules/wm/home/clip/default.nix deleted file mode 100644 index ac07014..0000000 --- a/modules/wm/home/clip/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - wl-clipboard - ]; - - services.cliphist.enable = true; -} diff --git a/modules/wm/home/default.nix b/modules/wm/home/default.nix deleted file mode 100644 index 6783ddc..0000000 --- a/modules/wm/home/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - imports = [ - ./foot - ./ags - ./mpv - ./firefox - ./clip - ./rofi - ./hypridle - ./dunst - ./misc - ./qt - ./gtk - ./stylix - ]; -} diff --git a/modules/wm/home/dunst/default.nix b/modules/wm/home/dunst/default.nix deleted file mode 100644 index 7fd5ad6..0000000 --- a/modules/wm/home/dunst/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - services.dunst = { - enable = true; - settings = { - global = { - background = "#282828"; - foreground = "#D5C4A1"; - geometry = "300x60-3+200"; - padding = 8; - horizontal_padding = 8; - separator_height = 2; - frame_width = 4; - corner_radius = 5; - font = "DejaVuSansMono 12"; - alignment = "center"; - vertical_alignment = "center"; - ellipsize = "middle"; - ignore_newline = false; - }; - - urgency_low = { - frame_color = "#98971a"; - }; - - urgency_normal = { - frame_color = "#458588"; - }; - - urgency_critical = { - frame_color = "#98971a"; - }; - }; - }; -} diff --git a/modules/wm/home/foot/default.nix b/modules/wm/home/foot/default.nix deleted file mode 100644 index 4abae9b..0000000 --- a/modules/wm/home/foot/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - programs.foot = { - enable = true; - settings = { - main = { - pad = "2x2"; - font = "RobotoMono Nerd Font:size=12"; - }; - - colors = { - "foreground" = "d5c4a1"; - "background" = "282828"; - "regular0" = "282828"; - "regular1" = "cc241d"; - "regular2" = "98971a"; - "regular3" = "d79921"; - "regular4" = "458588"; - "regular5" = "b16286"; - "regular6" = "689d6a"; - "regular7" = "d5c4a1"; - "bright0" = "504945"; - "bright1" = "fb4934"; - "bright2" = "b8bb26"; - "bright3" = "fabd2f"; - "bright4" = "83a598"; - "bright5" = "d3869b"; - "bright6" = "8ec07c"; - "bright7" = "ebdbb2"; - }; - }; - }; -} diff --git a/modules/wm/home/gtk/default.nix b/modules/wm/home/gtk/default.nix deleted file mode 100644 index 972bcf2..0000000 --- a/modules/wm/home/gtk/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - pkgs, - config, - ... -}: let - gruvboxPlus = import ./gruvbox-plus.nix {inherit pkgs;}; -in { - home.file = { - ".local/share/icons/GruvboxPlus".source = "${gruvboxPlus}"; - }; - - gtk = { - enable = true; - iconTheme.package = gruvboxPlus; - iconTheme.name = "GruvboxPlus"; - gtk2.configLocation = "${config.home.homeDirectory}/.config/gtk-2.0/gtkrc"; - }; -} diff --git a/modules/wm/home/hypridle/default.nix b/modules/wm/home/hypridle/default.nix deleted file mode 100644 index b961e02..0000000 --- a/modules/wm/home/hypridle/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - lib, - config, - ... -}: { - options = { - hypridle.enable = lib.mkEnableOption ""; - }; - - config = lib.mkIf config.hypridle.enable { - services.hypridle = { - enable = true; - settings = { - listener = [ - { - timeout = 300; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; - } - { - timeout = 600; - on-timeout = "systemctl suspend"; - on-resume = "hyprctl dispatch dpms on"; - } - ]; - }; - }; - }; -} diff --git a/modules/wm/home/misc/default.nix b/modules/wm/home/misc/default.nix deleted file mode 100644 index b970137..0000000 --- a/modules/wm/home/misc/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - home.packages = with pkgs; [ - pwvucontrol - pulseaudioFull - sent - imv - signal-desktop - keepassxc - vesktop - bottles - boxbuddy - ferdium - drawio - obs-studio - transmission_4-gtk - gnome-clocks - gnome-calculator - gnome-disk-utility - gnome-sound-recorder - kdePackages.kdenlive - sqlitebrowser - ]; - xresources.path = ".config/.Xresources"; - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "drawio" - ]; -} diff --git a/modules/wm/home/mpv/default.nix b/modules/wm/home/mpv/default.nix deleted file mode 100644 index ce1f118..0000000 --- a/modules/wm/home/mpv/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{pkgs, ...}: { - programs.mpv = { - enable = true; - bindings = { - x = "add speed 0.1"; - z = "add speed -0.1"; - "," = "frame-back-step"; - "." = "frame-step"; - space = "cycle-values speed 1 2"; - DOWN = "add volume -5"; - UP = "add volume 5"; - }; - scripts = with pkgs.mpvScripts; [ - mpris - sponsorblock - ]; - }; -} diff --git a/modules/wm/home/qt/default.nix b/modules/wm/home/qt/default.nix deleted file mode 100644 index 1504924..0000000 --- a/modules/wm/home/qt/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{pkgs, ...}: { - qt = { - enable = true; - style.name = "adwaita-dark"; - style.package = pkgs.adwaita-qt; - platformTheme.name = "adwaita"; - }; -} diff --git a/modules/wm/home/rofi/default.nix b/modules/wm/home/rofi/default.nix deleted file mode 100644 index 45c4949..0000000 --- a/modules/wm/home/rofi/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - pkgs, - nixpath, - ... -}: { - programs.rofi = { - enable = true; - package = pkgs.rofi-wayland; - theme = "${nixpath}/modules/wm/home/rofi/gruvbox-material.rasi"; - extraConfig = { - display-drun = ""; - show-icons = true; - terminal = "foot"; - }; - }; -} diff --git a/modules/wm/home/stylix/default.nix b/modules/wm/home/stylix/default.nix deleted file mode 100644 index 68dcb0b..0000000 --- a/modules/wm/home/stylix/default.nix +++ /dev/null @@ -1,67 +0,0 @@ -{ - pkgs, - inputs, - username, - lib, - ... -}: let - backgroundUrl = "https://wallpapers.joygnu.org/wallpapers/anime/ghibli-japanese-walled-garden.png"; - backgroundSha256 = "sha256-10Lv25V0RG0mnw/O90DeVchCNWJbdktUADtuI+enEwM="; -in { - imports = [inputs.stylix.homeManagerModules.stylix]; - - stylix = { - enable = true; - polarity = "dark"; - targets = { - foot.enable = false; - rofi.enable = false; - dunst.enable = false; - helix.enable = false; - # gnome.enable = lib.mkForce false; - }; - - base16Scheme = { - base00 = "282828"; # ---- - base01 = "3c3836"; # --- - base02 = "504945"; # -- - base03 = "665c54"; # - - base04 = "bdae93"; # + - base05 = "d5c4a1"; # ++ - base06 = "ebdbb2"; # +++ - base07 = "fbf1c7"; # ++++ - base08 = "cc241d"; # red - base09 = "fe0819"; # orange - base0A = "d79921"; # yellow - base0B = "98971a"; # green - base0C = "689d6a"; # aqua/cyan - base0D = "458588"; # blue - base0E = "b16286"; # purple - base0F = "a89984"; # brown - }; - - image = pkgs.fetchurl { - url = backgroundUrl; - sha256 = backgroundSha256; - }; - - cursor = { - name = "Bibata-Modern-Ice"; - package = pkgs.bibata-cursors; - size = 24; - }; - - fonts = { - monospace = { - package = pkgs.nerdfonts.override {fonts = ["RobotoMono"];}; - name = "RobotoMono Nerd Font"; - }; - sizes = { - applications = 12; - terminal = 13; - desktop = 12; - popups = 12; - }; - }; - }; -} diff --git a/modules/wm/hypridle/default.nix b/modules/wm/hypridle/default.nix new file mode 100644 index 0000000..4964211 --- /dev/null +++ b/modules/wm/hypridle/default.nix @@ -0,0 +1,32 @@ +{ + lib, + config, + username, + ... +}: { + options = { + hypridle.enable = lib.mkEnableOption ""; + }; + + config = lib.mkIf config.hypridle.enable { + home-manager.users.${username} = { + services.hypridle = { + enable = true; + settings = { + listener = [ + { + timeout = 300; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + { + timeout = 600; + on-timeout = "systemctl suspend"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + }; + }; +} diff --git a/modules/wm/hyprland/default.nix b/modules/wm/hyprland/default.nix index abea712..da71eba 100644 --- a/modules/wm/hyprland/default.nix +++ b/modules/wm/hyprland/default.nix @@ -2,162 +2,169 @@ username, nixpath, pkgs, + lib, + config, ... }: { - programs.hyprland = { - enable = true; + options = { + hyprland.enable = lib.mkEnableOption ""; }; - - home-manager.users.${username} = { - wayland.windowManager.hyprland = { + config = lib.mkIf config.hyprland.enable { + programs.hyprland = { enable = true; - settings = { - "$mod" = "SUPER"; - "$sciPath" = "${nixpath}/modules/wm/hyprland/scripts"; - cursor = { - inactive_timeout = "3"; - }; - env = [ - "HYPRCURSOR_THEME = Bibata-Modern-Ice" - "HYPRCURSOR_SIZE = 24" - "NIXOS_OZONE_WL = 1" - ]; - xwayland = { - force_zero_scaling = true; - }; - monitor = [ - "DP-1,2560x1440@165.00Hz,auto,1,bitdepth,10" - "eDP-1,prefrered,auto,1" - "HDMI-A-1,prefrered,auto,1,mirror,eDP-1" - ]; - exec-once = [ - "ags" - ]; - windowrulev2 = [ - "float,title:(Disks)" - "float,title:(Calculator)" - "float,title:(Bluetooth)" - "float,title:(Clocks)" - "size 854 480,title:(Clocks)" - "float,title:(Network Connections)" - "float,title:(Pipewire)" - "opacity 0.9,class:(foot)" - "opacity 0.9,class:(dunst)" - ]; - gestures = { - workspace_swipe = true; - workspace_swipe_forever = true; - workspace_swipe_distance = 200; - }; - general = { - gaps_in = 5; - gaps_out = 10; - border_size = 4; - allow_tearing = false; - layout = "master"; - "col.active_border" = "rgb(458588)"; - "col.inactive_border" = "rgb(665c54)"; - }; - misc = { - disable_hyprland_logo = true; - disable_splash_rendering = true; - }; - decoration = { - rounding = 5; - }; - input = { - kb_layout = "us,de"; - kb_variant = ",qwerty"; - kb_options = "grp:alt_shift_toggle,caps:swapescape"; - repeat_rate = 50; - }; + }; - bind = [ - # launch Apps - "$mod,TAB, exec, foot" - "$mod, E, exec, foot -e yazi" - "$mod, S, exec, firefox" - "$mod, X, exec, keepassxc" - "$mod, M, exec, mbsync -a && foot -e neomutt" - "$mod, N, exec, foot -e newsboat" - "$mod, A, exec, rofi -show drun" - "$mod, C, exec, ${pkgs.hyprpicker}/bin/hyprpicker -a" - "$mod+Shift, Z, exec, ${pkgs.grim}/bin/grim - | ${pkgs.swappy}/bin/swappy -f -" - ''$mod,T, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.tesseract}/bin/tesseract - stdout -l deu --psm 6 | wl-copy'' - ''$mod,Z, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' - "$mod, V, exec, cliphist list | rofi show -dmenu | cliphist decode | wl-copy" - "$mod, O, exec, sh $sciPath/mpv.sh" - "$mod, B, exec, ${pkgs.rofimoji}/bin/rofimoji" - "$mod, F, exec, foot -e hx" - # controls - "$mod, Q, killactive" - "$mod, W, togglefloating" - "$mod, R, togglesplit" - "$mod+shift, S, exec, systemctl suspend" - "$mod+shift, M, exit, hyprland" - "$mod, G, exec, sh $sciPath/gamemode.sh" - "$mod+shift, B, exec, sh $sciPath/ags.sh" - "$mod, up, exec, sh $sciPath/volume.sh -i" - "$mod, down, exec, sh $sciPath/volume.sh -d" - "$mod, P, exec, hyprctl dispatch togglefloating && hyprctl dispatch resizeactive exact 854 480 && hyprctl dispatch movewindow d && hyprctl dispatch movewindow r && hyprctl dispatch pin" - # cmus - "$mod, D, exec, [float; pin; size 80% 80%;] sh $sciPath/cmus.sh" - "$mod, space, exec, ${pkgs.playerctl}/bin/playerctl play-pause" - "$mod, comma, exec, ${pkgs.playerctl}/bin/playerctl previous" - "$mod, period, exec, ${pkgs.playerctl}/bin/playerctl next" - "$mod, equal, exec, cmus-remote -v +10%" - "$mod, minus, exec, cmus-remote -v -10%" - # Move focus - "$mod, Return, fullscreen" - "$mod, H, movefocus, l" - "$mod, L, movefocus, r" - "$mod, K, movefocus, u" - "$mod, J, movefocus, d" - # Window resizing X Y - "$mod+ctrl, H, resizeactive, -60 0" - "$mod+ctrl, L, resizeactive, 60 0" - "$mod+ctrl, K, resizeactive, 0 -60" - "$mod+ctrl, J, resizeactive, 0 60" - # Moving windows - "$mod SHIFT, H, movewindow, l" - "$mod SHIFT, L, movewindow, r" - "$mod SHIFT, K, movewindow, u" - "$mod SHIFT, J, movewindow, d" - # Switch workspaces - "$mod, 1, workspace, 1" - "$mod, 2, workspace, 2" - "$mod, 3, workspace, 3" - "$mod, 4, workspace, 4" - "$mod, 5, workspace, 5" - "$mod, 6, workspace, 6" - "$mod, 7, workspace, 7" - "$mod, 8, workspace, 8" - "$mod, 9, workspace, 9" - "$mod, 0, workspace, 10" - # Move active window to a workspace - "$mod+Shift, 1, movetoworkspace, 1" - "$mod+Shift, 2, movetoworkspace, 2" - "$mod+Shift, 3, movetoworkspace, 3" - "$mod+Shift, 4, movetoworkspace, 4" - "$mod+Shift, 5, movetoworkspace, 5" - "$mod+Shift, 6, movetoworkspace, 6" - "$mod+Shift, 7, movetoworkspace, 7" - "$mod+Shift, 8, movetoworkspace, 8" - "$mod+Shift, 9, movetoworkspace, 9" - "$mod+Shift, 0, movetoworkspace, 10" - ]; - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; - bindl = [ - ", XF86MonBrightnessUp, exec, brightnessctl set +10%" - ", XF86MonBrightnessDown, exec, brightnessctl set 10%-" - ", XF86AudioRaiseVolume, exec, sh $sciPath/volume.sh -i" - ", XF86AudioLowerVolume, exec, sh $sciPath/volume.sh -d" - ", XF86AudioMute, exec, sh $sciPath/volume.sh -m" - ", XF86AudioMicMute, exec, sh $sciPath/volume.sh -t" - ]; + home-manager.users.${username} = { + wayland.windowManager.hyprland = { + enable = true; + settings = { + "$mod" = "SUPER"; + "$sciPath" = "${nixpath}/modules/wm/hyprland/scripts"; + cursor = { + inactive_timeout = "3"; + }; + env = [ + "HYPRCURSOR_THEME = Bibata-Modern-Ice" + "HYPRCURSOR_SIZE = 24" + "NIXOS_OZONE_WL = 1" + ]; + xwayland = { + force_zero_scaling = true; + }; + monitor = [ + "DP-1,2560x1440@165.00Hz,auto,1,bitdepth,10" + "eDP-1,prefrered,auto,1" + "HDMI-A-1,prefrered,auto,1,mirror,eDP-1" + ]; + exec-once = [ + "ags" + ]; + windowrulev2 = [ + "float,title:(Disks)" + "float,title:(Calculator)" + "float,title:(Bluetooth)" + "float,title:(Clocks)" + "size 854 480,title:(Clocks)" + "float,title:(Network Connections)" + "float,title:(Pipewire)" + "opacity 0.9,class:(foot)" + "opacity 0.9,class:(dunst)" + ]; + gestures = { + workspace_swipe = true; + workspace_swipe_forever = true; + workspace_swipe_distance = 200; + }; + general = { + gaps_in = 5; + gaps_out = 10; + border_size = 4; + allow_tearing = false; + layout = "master"; + "col.active_border" = "rgb(458588)"; + "col.inactive_border" = "rgb(665c54)"; + }; + misc = { + disable_hyprland_logo = true; + disable_splash_rendering = true; + }; + decoration = { + rounding = 5; + }; + input = { + kb_layout = "us,de"; + kb_variant = ",qwerty"; + kb_options = "grp:alt_shift_toggle,caps:swapescape"; + repeat_rate = 50; + }; + + bind = [ + # launch Apps + "$mod,TAB, exec, foot" + "$mod, E, exec, foot -e yazi" + "$mod, S, exec, firefox" + "$mod, X, exec, keepassxc" + "$mod, M, exec, mbsync -a && foot -e neomutt" + "$mod, N, exec, foot -e newsboat" + "$mod, A, exec, rofi -show drun" + "$mod, C, exec, ${pkgs.hyprpicker}/bin/hyprpicker -a" + "$mod+Shift, Z, exec, ${pkgs.grim}/bin/grim - | ${pkgs.swappy}/bin/swappy -f -" + ''$mod,T, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.tesseract}/bin/tesseract - stdout -l deu --psm 6 | wl-copy'' + ''$mod,Z, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' + "$mod, V, exec, cliphist list | rofi show -dmenu | cliphist decode | wl-copy" + "$mod, O, exec, sh $sciPath/mpv.sh" + "$mod, B, exec, ${pkgs.rofimoji}/bin/rofimoji" + "$mod, F, exec, foot -e hx" + # controls + "$mod, Q, killactive" + "$mod, W, togglefloating" + "$mod, R, togglesplit" + "$mod+shift, S, exec, systemctl suspend" + "$mod+shift, M, exit, hyprland" + "$mod, G, exec, sh $sciPath/gamemode.sh" + "$mod+shift, B, exec, sh $sciPath/ags.sh" + "$mod, up, exec, sh $sciPath/volume.sh -i" + "$mod, down, exec, sh $sciPath/volume.sh -d" + "$mod, P, exec, hyprctl dispatch togglefloating && hyprctl dispatch resizeactive exact 854 480 && hyprctl dispatch movewindow d && hyprctl dispatch movewindow r && hyprctl dispatch pin" + # cmus + "$mod, D, exec, [float; pin; size 80% 80%;] sh $sciPath/cmus.sh" + "$mod, space, exec, ${pkgs.playerctl}/bin/playerctl play-pause" + "$mod, comma, exec, ${pkgs.playerctl}/bin/playerctl previous" + "$mod, period, exec, ${pkgs.playerctl}/bin/playerctl next" + "$mod, equal, exec, cmus-remote -v +10%" + "$mod, minus, exec, cmus-remote -v -10%" + # Move focus + "$mod, Return, fullscreen" + "$mod, H, movefocus, l" + "$mod, L, movefocus, r" + "$mod, K, movefocus, u" + "$mod, J, movefocus, d" + # Window resizing X Y + "$mod+ctrl, H, resizeactive, -60 0" + "$mod+ctrl, L, resizeactive, 60 0" + "$mod+ctrl, K, resizeactive, 0 -60" + "$mod+ctrl, J, resizeactive, 0 60" + # Moving windows + "$mod SHIFT, H, movewindow, l" + "$mod SHIFT, L, movewindow, r" + "$mod SHIFT, K, movewindow, u" + "$mod SHIFT, J, movewindow, d" + # Switch workspaces + "$mod, 1, workspace, 1" + "$mod, 2, workspace, 2" + "$mod, 3, workspace, 3" + "$mod, 4, workspace, 4" + "$mod, 5, workspace, 5" + "$mod, 6, workspace, 6" + "$mod, 7, workspace, 7" + "$mod, 8, workspace, 8" + "$mod, 9, workspace, 9" + "$mod, 0, workspace, 10" + # Move active window to a workspace + "$mod+Shift, 1, movetoworkspace, 1" + "$mod+Shift, 2, movetoworkspace, 2" + "$mod+Shift, 3, movetoworkspace, 3" + "$mod+Shift, 4, movetoworkspace, 4" + "$mod+Shift, 5, movetoworkspace, 5" + "$mod+Shift, 6, movetoworkspace, 6" + "$mod+Shift, 7, movetoworkspace, 7" + "$mod+Shift, 8, movetoworkspace, 8" + "$mod+Shift, 9, movetoworkspace, 9" + "$mod+Shift, 0, movetoworkspace, 10" + ]; + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + bindl = [ + ", XF86MonBrightnessUp, exec, brightnessctl set +10%" + ", XF86MonBrightnessDown, exec, brightnessctl set 10%-" + ", XF86AudioRaiseVolume, exec, sh $sciPath/volume.sh -i" + ", XF86AudioLowerVolume, exec, sh $sciPath/volume.sh -d" + ", XF86AudioMute, exec, sh $sciPath/volume.sh -m" + ", XF86AudioMicMute, exec, sh $sciPath/volume.sh -t" + ]; + }; }; }; }; diff --git a/modules/wm/misc/default.nix b/modules/wm/misc/default.nix new file mode 100644 index 0000000..7aefedb --- /dev/null +++ b/modules/wm/misc/default.nix @@ -0,0 +1,29 @@ +{ + pkgs, + config, + lib, + ... +}: { + config = lib.mkIf config.hyprland.enable { + environment.systemPackages = with pkgs; [ + pwvucontrol + pulseaudioFull + sent + imv + signal-desktop + keepassxc + vesktop + bottles + boxbuddy + ferdium + obs-studio + transmission_4-gtk + gnome-clocks + gnome-calculator + gnome-disk-utility + gnome-sound-recorder + kdePackages.kdenlive + sqlitebrowser + ]; + }; +} diff --git a/modules/wm/mpv/default.nix b/modules/wm/mpv/default.nix new file mode 100644 index 0000000..e492962 --- /dev/null +++ b/modules/wm/mpv/default.nix @@ -0,0 +1,31 @@ +{ + lib, + config, + username, + pkgs, + ... +}: { + options = { + mpv.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.mpv.enable { + home-manager.users.${username} = { + programs.mpv = { + enable = true; + bindings = { + x = "add speed 0.1"; + z = "add speed -0.1"; + "," = "frame-back-step"; + "." = "frame-step"; + space = "cycle-values speed 1 2"; + DOWN = "add volume -5"; + UP = "add volume 5"; + }; + scripts = with pkgs.mpvScripts; [ + mpris + sponsorblock + ]; + }; + }; + }; +} diff --git a/modules/wm/polkit/default.nix b/modules/wm/polkit/default.nix index 25aaa8e..c6f4dd6 100644 --- a/modules/wm/polkit/default.nix +++ b/modules/wm/polkit/default.nix @@ -1,16 +1,26 @@ -{pkgs, ...}: { - systemd = { - user.services.polkit-gnome-authentication-agent-1 = { - description = "polkit-gnome-authentication-agent-1"; - wantedBy = ["graphical-session.target"]; - wants = ["graphical-session.target"]; - after = ["graphical-session.target"]; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; +{ + pkgs, + lib, + config, + ... +}: { + options = { + polkit.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.polkit.enable { + systemd = { + user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = ["graphical-session.target"]; + wants = ["graphical-session.target"]; + after = ["graphical-session.target"]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; }; }; }; diff --git a/modules/wm/qt/default.nix b/modules/wm/qt/default.nix new file mode 100644 index 0000000..63a39c9 --- /dev/null +++ b/modules/wm/qt/default.nix @@ -0,0 +1,18 @@ +{ + lib, + config, + username, + pkgs, + ... +}: { + config = lib.mkIf config.theme.enable { + home-manager.users.${username} = { + qt = { + enable = true; + style.name = "adwaita-dark"; + style.package = pkgs.adwaita-qt; + platformTheme.name = "adwaita"; + }; + }; + }; +} diff --git a/modules/wm/rofi/default.nix b/modules/wm/rofi/default.nix new file mode 100644 index 0000000..4b7bd8a --- /dev/null +++ b/modules/wm/rofi/default.nix @@ -0,0 +1,26 @@ +{ + lib, + config, + username, + pkgs, + nixpath, + ... +}: { + options = { + rofi.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.rofi.enable { + home-manager.users.${username} = { + programs.rofi = { + enable = true; + package = pkgs.rofi-wayland; + theme = "${nixpath}/modules/wm/rofi/gruvbox-material.rasi"; + extraConfig = { + display-drun = ""; + show-icons = true; + terminal = "foot"; + }; + }; + }; + }; +} diff --git a/modules/wm/home/rofi/gruvbox-material.rasi b/modules/wm/rofi/gruvbox-material.rasi similarity index 100% rename from modules/wm/home/rofi/gruvbox-material.rasi rename to modules/wm/rofi/gruvbox-material.rasi diff --git a/modules/wm/stylix/default.nix b/modules/wm/stylix/default.nix new file mode 100644 index 0000000..92906da --- /dev/null +++ b/modules/wm/stylix/default.nix @@ -0,0 +1,75 @@ +{ + pkgs, + inputs, + username, + lib, + config, + ... +}: let + backgroundUrl = "https://wallpapers.joygnu.org/wallpapers/anime/ghibli-japanese-walled-garden.png"; + backgroundSha256 = "sha256-10Lv25V0RG0mnw/O90DeVchCNWJbdktUADtuI+enEwM="; +in { + options = { + theme.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.theme.enable { + home-manager.users.${username} = { + imports = [inputs.stylix.homeManagerModules.stylix]; + + stylix = { + enable = true; + polarity = "dark"; + targets = { + foot.enable = false; + rofi.enable = false; + dunst.enable = false; + helix.enable = false; + }; + + base16Scheme = { + base00 = "282828"; # ---- + base01 = "3c3836"; # --- + base02 = "504945"; # -- + base03 = "665c54"; # - + base04 = "bdae93"; # + + base05 = "d5c4a1"; # ++ + base06 = "ebdbb2"; # +++ + base07 = "fbf1c7"; # ++++ + base08 = "cc241d"; # red + base09 = "fe0819"; # orange + base0A = "d79921"; # yellow + base0B = "98971a"; # green + base0C = "689d6a"; # aqua/cyan + base0D = "458588"; # blue + base0E = "b16286"; # purple + base0F = "a89984"; # brown + }; + + image = pkgs.fetchurl { + url = backgroundUrl; + sha256 = backgroundSha256; + }; + + cursor = { + name = "Bibata-Modern-Ice"; + package = pkgs.bibata-cursors; + size = 24; + }; + + fonts = { + monospace = { + package = pkgs.nerdfonts.override {fonts = ["RobotoMono"];}; + name = "RobotoMono Nerd Font"; + }; + sizes = { + applications = 12; + terminal = 13; + desktop = 12; + popups = 12; + }; + }; + }; + xresources.path = ".config/.Xresources"; + }; + }; +} diff --git a/modules/wm/xdg/default.nix b/modules/wm/xdg/default.nix new file mode 100644 index 0000000..435c90c --- /dev/null +++ b/modules/wm/xdg/default.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + username, + ... +}: { + options = { + xdg.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.xdg.enable { + home-manager.users.${username} = { + xdg.userDirs = { + enable = true; + download = "/home/${username}/dl"; + desktop = "/home/${username}/dl"; + }; + }; + }; +}