diff --git a/hosts/hermit/programs.nix b/hosts/hermit/programs.nix index 43d9407..c91d567 100644 --- a/hosts/hermit/programs.nix +++ b/hosts/hermit/programs.nix @@ -10,6 +10,7 @@ difftastic element element-desktop + emacs30-pgtk evince eza firefox @@ -45,7 +46,6 @@ swww microfetch nmap - notesnook pamixer pavucontrol pdfarranger @@ -66,6 +66,7 @@ tor-browser trash-cli typst + ungoogled-chromium util-linux v4l-utils vesktop diff --git a/modules/other/home-manager.nix b/modules/other/home-manager.nix deleted file mode 100644 index 80fe3cb..0000000 --- a/modules/other/home-manager.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - config, - inputs, - lib, - self, - ... -}: -with lib; let - cfg = config.modules.other.home-manager; - inherit (config.modules.other.system) username; -in { - options.modules.other.home-manager = { - enable = mkEnableOption "home-manager"; - }; - - # NOTE: to keep this configuration sane and simple, - # we import the NixOS home manager module instead of the - # standalone one. - imports = [ - inputs.home-manager.nixosModules.home-manager - ]; - - config = mkIf cfg.enable { - home-manager = { - # Verbosity is great, give me verbosity. - verbose = true; - - useUserPackages = true; - useGlobalPkgs = true; - - backupFileExtension = "hm.old"; - extraSpecialArgs = {inherit inputs self;}; - users.${username} = { - programs = { - home-manager.enable = true; - }; - - home = { - inherit username; - homeDirectory = "/home/${username}"; - stateVersion = lib.mkDefault "23.11"; - }; - - manual = { - manpages.enable = false; - html.enable = false; - json.enable = false; - }; - }; - }; - }; -} diff --git a/modules/other/module.nix b/modules/other/module.nix index 78869c7..6ddf05f 100644 --- a/modules/other/module.nix +++ b/modules/other/module.nix @@ -1,8 +1,7 @@ _: { imports = [ - # ./home-manager.nix ./system.nix - # ./xdg.nix + ./xdg.nix ./git.nix ./users.nix ]; diff --git a/modules/other/xdg.nix b/modules/other/xdg.nix index 58a3153..7537eff 100644 --- a/modules/other/xdg.nix +++ b/modules/other/xdg.nix @@ -3,10 +3,9 @@ pkgs, ... }: let - inherit (config.modules.other.system) username; - hmCfg = config.home-manager.users.${username}; + inherit (config.meta.mainUser) username; - primary_browser = "Schizofox.desktop"; + primary_browser = "Librewolf.desktop"; mail_client = "thunderbird.desktop"; file_manager = "nautilus.desktop"; media_player = "mpv.desktop"; @@ -15,60 +14,53 @@ terminal = "foot.desktop"; pdf_viewer = "org.gnome.Evince.desktop"; in { - environment.sessionVariables = { - TERMINAL = "${terminal}"; - XDG_CACHE_HOME = hmCfg.xdg.cacheHome; + environment = { + systemPackages = [pkgs.xdg-utils]; + sessionVariables = { + TERMINAL = "${terminal}"; + XDG_CACHE_HOME = "/home/${username}/.config"; + }; }; - home-manager.users.${username} = { - home.packages = [pkgs.xdg-utils]; - xdg = { - cacheHome = "${hmCfg.home.homeDirectory}/.cache"; - configHome = "${hmCfg.home.homeDirectory}/.config"; - dataHome = "${hmCfg.home.homeDirectory}/.local/share"; - stateHome = "${hmCfg.home.homeDirectory}/.local/state"; - mimeApps = { - enable = true; - defaultApplications = { - "text/html" = [primary_browser]; - "x-scheme-handler/http" = [primary_browser]; - "x-scheme-handler/https" = [primary_browser]; - "x-scheme-handler/about" = [primary_browser]; - "x-scheme-handler/unknown" = [primary_browser]; - "x-scheme-handler/mailto" = [mail_client]; - "message/rfc822" = [mail_client]; - "x-scheme-handler/mid" = [mail_client]; - "inode/directory" = [file_manager]; - "audio/mp3" = [media_player]; - "audio/ogg" = [media_player]; - "audio/mpeg" = [media_player]; - "audio/aac" = [media_player]; - "audio/opus" = [media_player]; - "audio/wav" = [media_player]; - "audio/webm" = [media_player]; - "audio/3gpp" = [media_player]; - "audio/3gpp2" = [media_player]; - "video/mp4" = [media_player]; - "video/x-msvideo" = [media_player]; - "video/mpeg" = [media_player]; - "video/ogg" = [media_player]; - "video/mp2t" = [media_player]; - "video/webm" = [media_player]; - "video/3gpp" = [media_player]; - "video/3gpp2" = [media_player]; - "image/png" = [image_viewer]; - "image/jpeg" = [image_viewer]; - "image/gif" = [image_viewer]; - "image/avif" = [image_viewer]; - "image/bmp" = [image_viewer]; - "image/vnd.microsoft.icon" = [image_viewer]; - "image/svg+xml" = [image_viewer]; - "image/tiff" = [image_viewer]; - "image/webp" = [image_viewer]; - "text/plain" = [text_editor]; - "application/pdf" = [pdf_viewer]; - }; - }; + xdg.mime = { + defaultApplications = { + "text/html" = [primary_browser]; + "x-scheme-handler/http" = [primary_browser]; + "x-scheme-handler/https" = [primary_browser]; + "x-scheme-handler/about" = [primary_browser]; + "x-scheme-handler/unknown" = [primary_browser]; + "x-scheme-handler/mailto" = [mail_client]; + "message/rfc822" = [mail_client]; + "x-scheme-handler/mid" = [mail_client]; + "inode/directory" = [file_manager]; + "audio/mp3" = [media_player]; + "audio/ogg" = [media_player]; + "audio/mpeg" = [media_player]; + "audio/aac" = [media_player]; + "audio/opus" = [media_player]; + "audio/wav" = [media_player]; + "audio/webm" = [media_player]; + "audio/3gpp" = [media_player]; + "audio/3gpp2" = [media_player]; + "video/mp4" = [media_player]; + "video/x-msvideo" = [media_player]; + "video/mpeg" = [media_player]; + "video/ogg" = [media_player]; + "video/mp2t" = [media_player]; + "video/webm" = [media_player]; + "video/3gpp" = [media_player]; + "video/3gpp2" = [media_player]; + "image/png" = [image_viewer]; + "image/jpeg" = [image_viewer]; + "image/gif" = [image_viewer]; + "image/avif" = [image_viewer]; + "image/bmp" = [image_viewer]; + "image/vnd.microsoft.icon" = [image_viewer]; + "image/svg+xml" = [image_viewer]; + "image/tiff" = [image_viewer]; + "image/webp" = [image_viewer]; + "text/plain" = [text_editor]; + "application/pdf" = [pdf_viewer]; }; }; } diff --git a/modules/programs/cli/beets.nix b/modules/programs/cli/beets.nix deleted file mode 100644 index 3816a7c..0000000 --- a/modules/programs/cli/beets.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.modules.usrEnv.programs.media.beets; - inherit (config.modules.other.system) username; - inherit (config.modules.usrEnv.services.media.mpd) musicDirectory; - inherit (lib) mkIf; -in { - config = mkIf cfg.enable { - home-manager.users.${username} = { - programs.beets = { - enable = true; - - settings = { - ui.color = true; - directory = musicDirectory; - library = "${musicDirectory}/musiclibrary.db"; - - clutter = [ - "Thumbs.DB" - ".DS_Store" - ".directory" - ]; - - plugins = [ - "mpdupdate" - "lyrics" - "thumbnails" - "fetchart" - "embedart" - "chroma" - "fromfilename" - "lastgenre" - "duplicates" - "edit" - "replaygain" - "scrub" - ]; - - import = { - move = true; - timid = true; - detail = true; - bell = true; - write = true; - }; - - mpd = { - host = "localhost"; - port = 6600; - }; - - lyrics = { - auto = true; - }; - - thumbnails.auto = true; - fetchart.auto = true; - - embedart = { - auto = true; - remove_art_file = true; - }; - - acousticbrainz.auto = true; - chroma.auto = true; - replaygain.backend = "gstreamer"; - }; - }; - }; - }; -} diff --git a/modules/programs/gui/schizofox.nix b/modules/programs/gui/schizofox.nix deleted file mode 100644 index db54073..0000000 --- a/modules/programs/gui/schizofox.nix +++ /dev/null @@ -1,193 +0,0 @@ -{ - config, - inputs, - lib, - ... -}: let - cfg = config.modules.system.programs.firefox; - inherit (config.modules.other.system) username; - - inherit (lib) mkIf; - inherit (builtins) listToAttrs; -in { - config = mkIf cfg.enable { - home-manager.users.${username} = { - imports = [inputs.schizofox.homeManagerModule]; - - programs.schizofox = { - enable = true; - - theme = { - colors = { - background-darker = "000000"; - background = "000000"; - foreground = "ffffff"; - }; - - font = "Lexend"; - - extraUserChrome = '' - @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */ - - /* - * Hide tab bar, navigation bar and scrollbars - * !important may be added to force override, but not necessary - * #content is not necessary to hide scroll bars - */ - - #TabsToolbar {visibility: collapse;} - ''; - }; - - search = { - defaultSearchEngine = "DuckDuckGo"; - removeEngines = ["Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia"]; - addEngines = [ - { - Name = "NixOS Packages"; - Description = "NixOS Unstable package search"; - Alias = "!np"; - Method = "GET"; - URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; - } - { - Name = "NixOS Options"; - Description = "NixOS Unstable option search"; - Alias = "!no"; - Method = "GET"; - URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; - } - { - Name = "NixOS Wiki"; - Description = "NixOS Wiki search"; - Alias = "!nw"; - Method = "GET"; - URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}"; - } - { - Name = "Home Manager Options"; - Description = "Home Manager option search"; - Alias = "!hm"; - Method = "GET"; - URLTemplate = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master"; - } - { - Name = "Arch Wiki"; - Description = "Arch Wiki search"; - Alias = "!aw"; - Method = "GET"; - URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}"; - } - { - Name = "Gentoo Wiki"; - Description = "Gentoo Wiki search"; - Alias = "!gw"; - Method = "GET"; - URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}"; - } - { - Name = "Debian Wiki"; - Description = "Debian Wiki search"; - Alias = "!dw"; - Method = "GET"; - URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}"; - } - { - Name = "noogle"; - Descriptiom = "Noogle Search"; - Alias = "!ng"; - Method = "GET"; - URLTemplate = "https://noogle.dev/f/lib/{searchTerms}"; - } - ]; - }; - extensions = { - simplefox.enable = true; - darkreader.enable = true; - enableExtraExtensions = true; - enableDefaultExtensions = true; - extraExtensions = let - extensions = [ - { - id = "{c2c003ee-bd69-42a2-b0e9-6f34222cb046}"; - name = "auto-tab-discard"; - } - { - id = "{74145f27-f039-47ce-a470-a662b129930a}"; - name = "clearurls"; - } - { - id = "DontFuckWithPaste@raim.ist"; - name = "dont-fuck-with-paste"; - } - { - id = "{96ef5869-e3ba-4d21-b86e-21b163096400}"; - name = "font-fingerprint-defender"; - } - { - id = "uBlock0@raymondhill.net"; - name = "uBlock Origin"; - } - { - id = "{d7742d87-e61d-4b78-b8a1-b469842139fa}"; - name = "vimium-ff"; - } - { - id = "{a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad}"; - name = "refined-github-"; - } - { - id = "sponsorBlocker@ajay.app"; - name = "sponsorblock"; - } - { - id = "treestyletab@piro.sakura.ne.jp"; - name = "Tree Style Tab"; - } - ]; - - # shamelessly stolen from raf, thanks. - mappedExtensions = - map (extension: { - name = extension.id; - value = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/${extension.name}/latest.xpi"; - }; - }) - extensions; - in - listToAttrs mappedExtensions; - }; - - security = { - sanitizeOnShutdown.enable = false; - sandbox = false; - noSessionRestore = false; - userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"; - }; - - misc = { - drm.enable = true; - contextMenu.enable = true; - }; - - # taken from diniamo - settings = { - "gfx.webrender.all" = true; - "media.ffmpeg.vaapi.enabled" = true; - "media.rdd-ffmpeg.enabled" = true; - "media.av1.enabled" = true; - "gfx.x11-egl.force-enabled" = true; - "widget.dmabuf.force-enabled" = true; - - "layers.acceleration.force-enabled" = true; - - "browser.startup.page" = 3; - "browser.ctrlTab.sortByRecentlyUsed" = true; - # This makes websites prefer a dark theme (in theory) - "layout.css.prefers-color-scheme.content-override" = 0; - }; - }; - }; - }; -} diff --git a/modules/programs/launchers/fuzzel/module.nix b/modules/programs/launchers/fuzzel/module.nix deleted file mode 100644 index 66aa2dd..0000000 --- a/modules/programs/launchers/fuzzel/module.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit (lib) mkIf; - inherit (config.modules.other.system) username; - cfg = config.modules.usrEnv.programs.launchers.fuzzel; -in { - config = mkIf cfg.enable { - # home-manager.users.${username} = { - # programs.fuzzel = { - # enable = true; - # package = pkgs.fuzzel; - # settings = { - # main = { - # terminal = "${pkgs.foot}/bin/foot -e"; - # # make fuzzel appear on fullscreen windows - # layer = "overlay"; - # icon-theme = "Papirus-Dark"; - # font = "Lexend:weight=regular:size=14"; - # }; - # # background = "000000"; - # }; - # }; - # }; - }; -} diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix deleted file mode 100644 index 05e690a..0000000 --- a/modules/services/dunst.nix +++ /dev/null @@ -1,95 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.modules.services.dunst; - inherit (config.modules.other.system) username; - - inherit (lib) mkEnableOption mkIf; -in { - options.modules.services.dunst.enable = mkEnableOption "dunst"; - - config = mkIf cfg.enable { - home-manager.users.${username} = { - services.dunst = { - enable = false; - package = pkgs.dunst; - settings = { - global = { - monitor = 1; - follow = "none"; - width = 300; - height = 100; - origin = "top-right"; - offset = "0x10"; - scale = 0; - notification_limit = 3; - idle_threshold = 120; - progress_bar = true; - progress_bar_height = 10; - progress_bar_frame_width = 0; - progress_bar_min_width = 150; - progress_bar_max_width = 300; - indicate_hidden = "yes"; - transparency = 10; - separator_height = 2; - padding = 10; - frame_width = 3; - # frame_color = "#89B4FA"; - # separator_color = "frame"; - highlight = "#89DCEB"; - sort = "yes"; - # font = "JetBrains Mono 12"; - line_height = 0; - markup = "full"; - format = "%s%b"; - alignment = "right"; - vertical_alignment = "center"; - show_age_threshold = 60; - ellipsize = "middle"; - ignore_newline = "no"; - stack_duplicates = true; - hide_duplicate_count = false; - show_indicators = "yes"; - icon_position = "left"; - min_icon_size = 0; - max_icon_size = 32; - sticky_history = "yes"; - history_length = 20; - dmenu = "${pkgs.rofi-wayland}/bin/rofi"; - browser = "${pkgs.xdg-utils}/bin/xdg-open"; - always_run_script = true; - title = "Dunst"; - class = "dunst"; - corner_radius = 10; - ignore_dbusclose = false; - force_xwayland = false; - force_xinerama = false; - mouse_left_click = "do_action, close_current"; - mouse_middle_click = "context"; - mouse_right_click = "close_all"; - }; - experimental = {per_monitor_dpi = false;}; - # urgency_low = { - # background = "#1E1E2E"; - # foreground = "#CDD6F4"; - # timeout = 5; - # }; - # urgency_normal = { - # background = "#1E1E2E"; - # foreground = "#CDD6F4"; - # timeout = 6; - # }; - # urgency_critical = { - # background = "#1E1E2E"; - # foreground = "#CDD6F4"; - # frame_color = "#FAB387"; - # timeout = 0; - # }; - }; - }; - }; - }; -} diff --git a/modules/style/fonts.nix b/modules/style/fonts.nix index 6ec8ed9..943364a 100644 --- a/modules/style/fonts.nix +++ b/modules/style/fonts.nix @@ -20,6 +20,8 @@ in { defaultFonts = let common = [ "Iosevka Nerd Font" + "Roboto Mono Nerd Font" + "Fira Code Nerd Font" "Symbols Nerd Font" "Noto Color Emoji" ]; diff --git a/modules/style/gtk.nix b/modules/style/gtk.nix index e151283..eaaec5f 100644 --- a/modules/style/gtk.nix +++ b/modules/style/gtk.nix @@ -5,21 +5,8 @@ }: with lib; let cfg = config.modules.usrEnv.style.gtk; - inherit (config.modules.other.system) username; - inherit (config.modules.usrEnv.style.gtk) theme iconTheme; in { config = mkIf cfg.enable { programs.dconf.enable = true; # NOTE: we need this or gtk breaks - home-manager.users.${username} = { - gtk = { - enable = true; - theme = { - inherit (theme) name package; - }; - iconTheme = { - inherit (iconTheme) name package; - }; - }; - }; }; } diff --git a/modules/style/module.nix b/modules/style/module.nix index c60377b..c02a245 100644 --- a/modules/style/module.nix +++ b/modules/style/module.nix @@ -1,24 +1,6 @@ -{config, ...}: let - inherit (config.modules.style.cursor) package name size; - inherit (config.modules.other.system) username; -in { +_: { imports = [ - ./qt.nix - # ./gtk.nix ./colors.nix ./fonts.nix ]; - # home-manager.users.${username} = { - # home.pointerCursor = { - # # inherit the default values set in the options, - # # since these are the once I need on all my systems. - # inherit package name size; - - # # make gtk follow the cursor choices - # # gtk.enable = true; - - # # ditto - # x11.enable = true; - # }; - # }; } diff --git a/modules/style/qt.nix b/modules/style/qt.nix index 052238b..1c9ea18 100644 --- a/modules/style/qt.nix +++ b/modules/style/qt.nix @@ -10,7 +10,6 @@ with lib; let name = "Gruvbox-Dark-BL"; }; cfg = config.modules.usrEnv.style.qt; - inherit (config.modules.other.system) username; in { config = mkIf cfg.enable { environment.sessionVariables = {QT_QPA_PLATFORMTHEME = "qt5ct";}; @@ -19,44 +18,5 @@ in { QT_STYLE_OVERRIDE = lib.mkForce "kvantum"; GTK_THEME = theme.name; }; - - # home-manager.users.${username} = { - # # This is taken from jacekpoz, thanks a lot! - # qt = { - # enable = true; - # style = { - # inherit (cfg) name; - # package = cfg.package.override { - # flavour = [cfg.variant]; - # accents = [cfg.accentColor]; - # }; - # }; - # }; - # home = { - # packages = with pkgs; [ - # qt5.qttools - # qt6Packages.qtstyleplugin-kvantum - # libsForQt5.qtstyleplugin-kvantum - # libsForQt5.qt5ct - # ]; - - # sessionVariables = { - # # Scaling factor for QT applications - # QT_AUTO_SCREEN_SCALE_FACTOR = "1"; - - # # Use wayland as the default backend. - # QT_QPA_PLATFORM = "wayland"; - - # # Disable window decorations for qt applications. - # QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - - # # Remain compatible with QT5 whenever possible. - # DISABLE_QT_COMPAT = "0"; - - # # Tell Calibre to use the dark theme. - # CALIBRE_USE_DARK_PALETTE = "1"; - # }; - # }; - # }; }; } diff --git a/modules/wms/wayland/hyprland/decorations.nix b/modules/wms/wayland/hyprland/decorations.nix index 5687324..2d1999b 100644 --- a/modules/wms/wayland/hyprland/decorations.nix +++ b/modules/wms/wayland/hyprland/decorations.nix @@ -1,6 +1,4 @@ -{config, ...}: let - inherit (config.modules.other.system) username; -in { +_: { programs.hyprland.settings = { #Decoration settings decoration = { @@ -10,12 +8,6 @@ in { size = 3; passes = 2; }; - drop_shadow = 1; - shadow_range = 15; - shadow_render_power = 2; - shadow_ignore_window = 1; - shadow_offset = "2 4"; - shadow_scale = 1; }; # Bezier curves for aninmations. # Generate your own at https://www.cssportal.com/css-cubic-bezier-generator/ diff --git a/modules/wms/wayland/hyprland/settings.nix b/modules/wms/wayland/hyprland/settings.nix index d37c172..7d19a24 100644 --- a/modules/wms/wayland/hyprland/settings.nix +++ b/modules/wms/wayland/hyprland/settings.nix @@ -3,7 +3,6 @@ lib, ... }: let - inherit (config.modules.other.system) username; inherit (config.modules.system.hardware) monitors; inherit (lib) mapAttrsToList; inherit (builtins) toString;