diff options
Diffstat (limited to 'modules')
42 files changed, 0 insertions, 2622 deletions
diff --git a/modules/apps/alacritty.nix b/modules/apps/alacritty.nix deleted file mode 100644 index b50e142..0000000 --- a/modules/apps/alacritty.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (lib) mkIf; - cfg = config.apps; -in { - config = mkIf cfg.alacritty { - default.terminal = lib.mkDefault "alacritty"; - - home-manager.users.${config.user} = { - programs.alacritty = { - enable = true; - - settings = { - # Font - font = { - size = 11; - bold = { - style = "Bold"; - }; - bold_italic = { - style = "Bold Italic"; - }; - italic = { - style = "Italic"; - }; - normal = { - family = config.theme.font.monospace; - style = "Regular"; - }; - offset = { - x = 0; - y = 0; - }; - }; - - # Window - window = { - decorations = "full"; - dynamic_title = true; - padding = { - x = config.theme.outerGap; - y = config.theme.outerGap; - }; - opacity = config.theme.opacity; - }; - - # Colors - colors = { - normal = lib.attrsets.mapAttrs (name: color: "${color}") { - inherit - (config.theme.colors.normal) - black - red - green - yellow - blue - magenta - cyan - white - ; - }; - - bright = lib.attrsets.mapAttrs (name: color: "${color}") { - inherit - (config.theme.colors.bright) - black - red - green - yellow - blue - magenta - cyan - white - ; - }; - - cursor = { - background = "CellForeground"; - text = "CellBackground"; - }; - - selection = { - background = "CellForeground"; - text = "CellBackground"; - }; - - primary = { - foreground = "#${config.theme.colors.text}"; - background = "#${config.theme.colors.base}"; - }; - }; - }; - }; - }; - }; -} diff --git a/modules/apps/astal.nix b/modules/apps/astal.nix deleted file mode 100644 index 505fe29..0000000 --- a/modules/apps/astal.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - lib, - config, - pkgs, - inputs, - system, - ... -}: let - astal = inputs.self.packages.${system}; - inherit (lib) mkIf; - cfg = config.apps; -in { - config = mkIf cfg.astal { - default.appLauncher = lib.mkDefault "astal-launcher"; - - home-manager.users.${config.user} = { - home.packages = [ - astal.astal.shell - astal.astal.launcher - ]; - - systemd.user.services.astal = { - Install = { - WantedBy = [config.default.session "tray.target"]; - }; - - Unit = { - ConditionEnvironment = "WAYLAND_DISPLAY"; - Description = "astal"; - After = [config.default.session]; - PartOf = [config.default.session "tray.target"]; - }; - - Service = { - ExecStart = "${astal.astal.shell}/bin/astal-shell"; - Restart = "always"; - RestartSec = "10"; - }; - }; - }; - }; -} diff --git a/modules/apps/default.nix b/modules/apps/default.nix deleted file mode 100644 index 7100897..0000000 --- a/modules/apps/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{lib, ...}: let - inherit (lib) mkEnableOption; -in { - imports = [ - ./waybar - ./wofi - ./alacritty.nix - ./astal.nix - ./hyprlock.nix - ./kitty.nix - ./mako.nix - ]; - - options.apps = { - alacritty = mkEnableOption "Enable the alacritty terminal."; - astal = mkEnableOption "Enable the astal gtk shell."; - kitty = mkEnableOption "Enable the kitty terminal."; - mako = mkEnableOption "Enable the mako notification daemon."; - hyprlock = mkEnableOption "Enable the hyprlock lockscreen."; - waybar = mkEnableOption "Enable the waybar bar."; - wofi = mkEnableOption "Enable the wofi launcher."; - }; -} diff --git a/modules/apps/hyprlock.nix b/modules/apps/hyprlock.nix deleted file mode 100644 index 2bf70e3..0000000 --- a/modules/apps/hyprlock.nix +++ /dev/null @@ -1,106 +0,0 @@ -{ - config, - lib, - ... -}: let - text = "rgb(${config.theme.colors.text})"; - base = "rgb(${config.theme.colors.base})"; - error = "rgb(${config.theme.colors.error})"; - trans = "rgba(0,0,0,0)"; - - inherit (lib) mkIf optionals; - cfg = config.apps; -in { - config = mkIf cfg.hyprlock { - default.lockScreen = lib.mkDefault "hyprlock"; - - home-manager.users.${config.user} = { - programs.hyprlock = { - enable = true; - - settings = { - auth = { - "pam:enabled" = true; - "fingerprint:enabled" = config.fingerprint; - }; - - animations = { - enabled = true; - animation = [ - "fadeIn, 0" - "fadeOut, 0" - ]; - }; - - background = { - path = config.theme.lockscreen; - color = base; - blur_passes = 0; - blur_size = 2; - noise = 0; - contrast = 0; - brightness = 0; - vibrancy = 0; - vibrancy_darkness = 0.0; - }; - - # Password Input - input-field = { - size = "300, 50"; - outline_thickness = 0; - dots_size = 0.25; - dots_spacing = 0.55; - dots_center = true; - dots_rounding = -1; - outer_color = trans; - inner_color = trans; - font_color = text; - fade_on_empty = false; - placeholder_text = - "Enter Password" - + ( - if config.fingerprint - then " or Touch Fingerprint" - else "" - ); - hide_input = false; - check_color = error; - fail_color = error; - capslock_color = trans; - numlock_color = trans; - bothlock_color = trans; - invert_numlock = false; - swap_font_color = false; - font_family = config.theme.font.regular; - position = "0, 50"; - halign = "center"; - valign = "bottom"; - }; - - label = [ - # Date - { - text = "cmd[update:1000] echo \"$(date +\"%A, %B %d\")\""; - color = text; - font_size = 20; - font_family = config.theme.font.header; - position = "0, -100"; - halign = "center"; - valign = "top"; - } - # Clock - { - text = "cmd[update:1000] echo \"$(date +\"%k:%M:%S\")\""; - color = text; - font_size = 90; - font_family = config.theme.font.header; - position = "0, -130"; - halign = "center"; - valign = "top"; - } - ]; - }; - }; - }; - }; -} diff --git a/modules/apps/kitty.nix b/modules/apps/kitty.nix deleted file mode 100644 index 03f981a..0000000 --- a/modules/apps/kitty.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (lib) mkIf; - cfg = config.apps; -in { - config = mkIf cfg.kitty { - default.terminal = lib.mkDefault "kitty"; - - home-manager.users.${config.user} = { - programs.kitty = { - enable = true; - environment = {}; - extraConfig = ""; - - settings = { - # Font - font_family = config.theme.font.monospace; - font_size = 11; - bold_font = "auto"; - italic_font = "auto"; - bold_italic_font = "auto"; - - # Scrollback - scrollback_lines = 10000; - scrollback_pager_history_size = 300; # MB - - # Urls - detect_urls = true; - show_hyperlink_targets = false; - - # Window - window_padding_width = config.theme.outerGap; - window_border_width = 0; - draw_minimal_borders = true; - background_opacity = config.theme.opacity; - - # Disable audio - enable_audio_bell = false; - - # Disable close prompt - confirm_os_window_close = 0; - - # selection - selection_background = "#${config.theme.colors.surface}"; - selection_foreground = "none"; - - # cursor - url_color = "#${config.theme.colors.bright.yellow}"; - cursor = "#${config.theme.colors.text}"; - - # colors - background = "#${config.theme.colors.base}"; - foreground = "#${config.theme.colors.text}"; - - # normal - color0 = "#${config.theme.colors.normal.black}"; - color1 = "#${config.theme.colors.normal.red}"; - color2 = "#${config.theme.colors.normal.green}"; - color3 = "#${config.theme.colors.normal.yellow}"; - color4 = "#${config.theme.colors.normal.blue}"; - color5 = "#${config.theme.colors.normal.magenta}"; - color6 = "#${config.theme.colors.normal.cyan}"; - color7 = "#${config.theme.colors.normal.white}"; - - # bright - color8 = "#${config.theme.colors.bright.black}"; - color9 = "#${config.theme.colors.bright.red}"; - color10 = "#${config.theme.colors.bright.green}"; - color11 = "#${config.theme.colors.bright.yellow}"; - color12 = "#${config.theme.colors.bright.blue}"; - color13 = "#${config.theme.colors.bright.magenta}"; - color14 = "#${config.theme.colors.bright.cyan}"; - color15 = "#${config.theme.colors.bright.white}"; - }; - }; - }; - }; -} diff --git a/modules/apps/mako.nix b/modules/apps/mako.nix deleted file mode 100644 index 62e5712..0000000 --- a/modules/apps/mako.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (lib) mkIf; - cfg = config.apps; -in { - config = mkIf cfg.mako { - home-manager.users.${config.user} = { - services.mako = { - enable = false; # now using astal - - settings = { - font = "${config.theme.font.monospace} 11"; - - margin = toString config.theme.outerGap; - padding = toString config.theme.innerGap; - - background-color = "#${config.theme.colors.base}"; - progress-color = "#${config.theme.colors.primary}"; - text-color = "#${config.theme.colors.text}"; - - border-color = "#${config.theme.colors.text}"; - border-size = config.theme.borderWidth; - border-radius = config.theme.outerRadius; - - default-timeout = 5000; - layer = "overlay"; - icons = true; - }; - }; - }; - }; -} diff --git a/modules/apps/waybar/default.nix b/modules/apps/waybar/default.nix deleted file mode 100644 index ecbbcd4..0000000 --- a/modules/apps/waybar/default.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (lib) mkIf; - cfg = config.apps; -in { - config = mkIf cfg.waybar { - home-manager.users.${config.user} = { - programs.waybar = { - enable = false; # using astal now - - settings = [ - { - height = 24; - layer = "top"; - position = "top"; - spacing = 4; - - modules-left = [ - "hyprland/workspaces" - ]; - modules-center = [ - "clock" - ]; - modules-right = [ - "battery" - "wireplumber" - "network" - "tray" - ]; - - "hyprland/workspaces" = { - disable-scroll = true; - all-outputs = true; - format = "{name}"; - }; - - battery = { - interval = 1; - states = { - warning = 30; - critical = 15; - }; - format = " {capacity}%"; - format-charging = " {capacity}%"; - format-plugged = " {capacity}%"; - format-full = " {capacity}%"; - format-warning = " {capacity}%"; - format-critical = " {capacity}%"; - }; - - wireplumber = { - format = " {volume}%"; - format-bluetooth = " {volume}%"; - format-muted = " muted"; - scroll-step = 1; - on-click = "pavucontrol"; - ignored-sinks = ["Easy Effects Sink"]; - }; - - network = { - format = " disconnected"; - format-wifi = " {essid}"; - format-ethernet = " {ipaddr}/{cidr}"; - format-disconnected = " disconnected"; - max-length = 50; - on-click = "nm-connection-editor"; - }; - - clock = { - interval = 1; - format = "{:%Y-%m-%d %a %H:%M:%S}"; - }; - - tray = { - spacing = config.theme.outerGap; - }; - } - ]; - - style = import ./style.nix {theme = config.theme;}; - }; - }; - }; -} diff --git a/modules/apps/waybar/style.nix b/modules/apps/waybar/style.nix deleted file mode 100644 index 21a8de5..0000000 --- a/modules/apps/waybar/style.nix +++ /dev/null @@ -1,107 +0,0 @@ -{theme}: let - text = "#${theme.colors.text}"; - base = "#${theme.colors.base}"; - surface = "#${theme.colors.surface}"; - primary = "#${theme.colors.primary}"; - success = "#${theme.colors.success}"; - warning = "#${theme.colors.warning}"; - error = "#${theme.colors.error}"; - fontSize = "${toString theme.font.size}px"; - outerGap = "${toString theme.outerGap}px"; - innerGap = "${toString theme.innerGap}px"; - outerRadius = "${toString theme.outerRadius}px"; - innerRadius = "${toString theme.innerRadius}px"; - borderWidth = "${toString theme.borderWidth}px"; -in '' - /** Base */ - - * { - all: unset; - } - - window#waybar { - font-family: "${theme.font.regular}", "${theme.font.icon}", "${theme.font.monospace}"; - font-size: ${fontSize}; - color: ${text}; - background-color: ${base}; - } - - /** Workspaces */ - - #workspaces { - margin-left: ${outerGap}; - } - - #workspaces button { - border-radius: ${innerRadius}; - margin: 4px 2px; - padding: 0px 7px; - background: ${surface}; - color: ${text}; - } - - #workspaces button.focused, - #workspaces button.active { - background: ${primary}; - color: ${base}; - } - - #workspaces button.urgent { - background: ${error}; - } - - /** Tray */ - - #tray { - border: none; - margin-right: ${outerGap}; - } - - #tray > .passive { - -gtk-icon-effect: dim; - } - - #tray > .needs-attention { - -gtk-icon-effect: highlight; - } - - /** Right modules */ - - #battery, - #wireplumber, - #network { - padding: 0 ${outerGap}; - } - - /** Battery */ - - #battery.charging { - color: ${success}; - } - - #battery.warning:not(.charging) { - color: ${warning}; - } - - #battery.critical:not(.charging) { - color: ${error}; - } - - /** Wireplumber */ - - #wireplumber.muted { - color: ${error}; - } - - /** Network */ - - #network.wifi, - #network.ethernet { - color: ${success}; - } - - #network.disconnected { - color: ${error}; - } - -'' diff --git a/modules/apps/wofi/default.nix b/modules/apps/wofi/default.nix deleted file mode 100644 index 6036dd1..0000000 --- a/modules/apps/wofi/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (lib) mkIf; - cfg = config.apps; -in { - config = mkIf cfg.wofi { - default.appLauncher = lib.mkDefault "wofi --show drun --prompt 'Seach Programs'"; - - home-manager.users.${config.user} = { - programs.wofi = { - enable = true; - - settings = { - key_expand = "Tab"; - term = "kitty"; - matching = "multi-contains"; - insensitive = true; - gtk_dark = true; - hide_scroll = true; - }; - - style = import ./style.nix {theme = config.theme;}; - }; - }; - }; -} diff --git a/modules/apps/wofi/style.nix b/modules/apps/wofi/style.nix deleted file mode 100644 index 75a0a21..0000000 --- a/modules/apps/wofi/style.nix +++ /dev/null @@ -1,73 +0,0 @@ -{theme}: let - text = "#${theme.colors.text}"; - base = "#${theme.colors.base}"; - surface = "#${theme.colors.surface}"; - primary = "#${theme.colors.primary}"; - fontSize = "${toString theme.font.size}px"; - outerGap = "${toString theme.outerGap}px"; - innerGap = "${toString theme.innerGap}px"; - outerRadius = "${toString theme.outerRadius}px"; - innerRadius = "${toString theme.innerRadius}px"; - borderWidth = "${toString theme.borderWidth}px"; -in '' - * { - font-family: ${theme.font.monospace}; - font-size: ${fontSize}; - } - - /* Window */ - window { - margin: 0px; - border: ${borderWidth} solid ${primary}; - border-radius: ${outerRadius}; - background-color: ${base}; - } - - /* Outer Box */ - #outer-box { - padding: ${outerGap}; - } - - /* Scroll */ - #scroll { - margin: 0px; - padding: ${innerGap}; - border: none; - } - - /* Input */ - #input { - margin: ${innerGap}; - padding: ${innerGap}; - border: none; - color: ${text}; - background-color: ${surface}; - border-radius: ${outerRadius}; - } - - #input:focus, - #input:active { - border: ${borderWidth} solid ${primary}; - box-shadow: none; - outline: none; - } - - /* Text */ - #text { - margin: ${innerGap}; - padding: ${innerGap}; - border: none; - color: ${text}; - } - - /* Selected Entry */ - #entry:selected { - background-color: ${primary}; - border-radius: ${outerRadius}; - } - - #entry:selected #text { - color: ${base}; - } - -'' diff --git a/modules/browsers/default.nix b/modules/browsers/default.nix deleted file mode 100644 index 29049f4..0000000 --- a/modules/browsers/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - lib, - config, - ... -}: let - inherit (lib) mkEnableOption; -in { - imports = [ - ./firefox - ./zen.nix - ]; - - options.browsers = { - firefox = mkEnableOption "Enable the firefox browser."; - zen = mkEnableOption "Enable the zen browser."; - }; -} diff --git a/modules/browsers/firefox/default.nix b/modules/browsers/firefox/default.nix deleted file mode 100644 index 61a5db0..0000000 --- a/modules/browsers/firefox/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - extraPrefs = lib.fileContents ./mozilla.cfg; - userChrome = lib.fileContents ./userChrome.css; - my-firefox = pkgs.firefox.override { - extraPrefs = extraPrefs; - }; - - inherit (lib) mkIf; - cfg = config.browsers; -in { - config = mkIf cfg.firefox { - default.browser = lib.mkDefault "firefox"; - - home-manager.users.${config.user} = { - programs.firefox = { - enable = true; - package = my-firefox; - - # import configuration - policies = import ./policies.nix; - - # create profile for me :3 - profiles.${config.user} = { - search = { - force = true; - default = "ddg"; - }; - - userChrome = userChrome; - }; - }; - }; - }; -} diff --git a/modules/browsers/firefox/extensions.nix b/modules/browsers/firefox/extensions.nix deleted file mode 100644 index e8d6e2c..0000000 --- a/modules/browsers/firefox/extensions.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - # extensions to be auto downloaded into - # firefox - - # dont allow extensions to be installed though - # firefox, they must be described here! - "*".installation_mode = "blocked"; - - # uBlock Origin - "uBlock0@raymondhill.net" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - installation_mode = "force_installed"; - }; - - # Bitwarden - "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"; - installation_mode = "force_installed"; - }; - - # SponsorBlock - "sponsorBlocker@ajay.app" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"; - installation_mode = "force_installed"; - }; - - # Privacy Badger - "jid1-MnnxcxisBPnSXQ@jetpack" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi"; - installation_mode = "force_installed"; - }; - - # Redirector - "redirector@einaregilsson.com" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/redirector/latest.xpi"; - installation_mode = "force_installed"; - }; - - # Enhancer for Youtube - "enhancerforyoutube@maximerf.addons.mozilla.org" = { - install_url = "https://www.mrfdev.com/downloads/enhancer_for_youtube-2.0.130.1.xpi"; - installation_mode = "force_installed"; - }; -} diff --git a/modules/browsers/firefox/mozilla.cfg b/modules/browsers/firefox/mozilla.cfg deleted file mode 100644 index 5e2334e..0000000 --- a/modules/browsers/firefox/mozilla.cfg +++ /dev/null @@ -1,21 +0,0 @@ -// -// extra preferences that cannot be -// set normally but have to instead -// set in mozilla.cfg - -// Automatically click cookiebanners although uBlock Origin might block them -lockPref("cookiebanners.bannerClicking.enabled", true); -lockPref("cookiebanners.service.mode", 2); -lockPref("cookiebanners.service.mode.privateBrowsing", 2); - -// DNT although PrivacyBadger from policy handles this -lockPref("privacy.donottrackheader.enabled", true); -lockPref("privacy.donottrackheader.value", 1); - -// New sidebar -lockPref("sidebar.revamp", true); -lockPref("sidebar.verticalTabs", true); -lockPref("sidebar.visibility", "always-show"); -lockPref("sidebar.main.tools", "history,bookmarks"); - -// diff --git a/modules/browsers/firefox/policies.nix b/modules/browsers/firefox/policies.nix deleted file mode 100644 index 243cd9a..0000000 --- a/modules/browsers/firefox/policies.nix +++ /dev/null @@ -1,127 +0,0 @@ -{ - # policies to be set in firefox - # see: https://mozilla.github.io/policy-templates/ - - ExtensionSettings = import ./extensions.nix; - Preferences = import ./prefs.nix; - - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - EmailTracking = true; - }; - - # Certificates - Certificates = { - ImportEnterpriseRoots = true; - }; - - # Cookies - Cookies = { - Behavior = "reject-foreign"; - BehaviorPrivateBrowsing = "reject-foreign"; - Locked = true; - }; - - # DNS - DNSOverHTTPS = { - Enabled = false; - Locked = true; - }; - - # Disable Bad - DisableAppUpdate = true; - DisableAccounts = true; - DisableFirefoxAccounts = true; - DisableFirefoxScreenshots = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableTelemetry = true; - AutofillAddressEnabled = false; - AutofillCreditCardEnabled = false; - - # Disable Certain Messages - UserMessaging = { - WhatsNew = false; - ExtensionRecommendations = false; - FeatureRecommendations = false; - UrlbarInterventions = false; - SkipOnboarding = true; - MoreFromMozilla = false; - Labs = false; - Locked = true; - }; - - # Disable Password Manager - DisableMasterPasswordCreation = true; - PasswordManagerEnabled = false; - PrimaryPassword = false; - OfferToSaveLogins = false; - - # Remove Special Pages - OverrideFirstRunPage = ""; - OverridePostUpdatePage = ""; - - # Start Page - Homepage = { - StartPage = "previous-session"; - Locked = true; - }; - - # Home Page - FirefoxHome = { - Search = true; - TopSites = false; - SponsoredTopSites = false; - Highlights = false; - Pocket = false; - SponsoredPocket = false; - Snippets = false; - Locked = true; - }; - - # Search Suggestions - SearchSuggestEnabled = true; - FirefoxSuggest = { - WebSuggestions = false; - SponsoredSuggestions = false; - ImproveSuggest = false; - Locked = true; - }; - - # Save All on Shutdown - SanitizeOnShutdown = false; - - # Popups - PopupBlocking = { - Default = true; - Locked = true; - }; - - # Allow Bypasses - DisableSecurityBypass = { - InvalidCertificate = false; - SafeBrowsing = false; - }; - - # PictureInPicure - PictureInPicture = { - Enabled = true; - Locked = true; - }; - - # Topbar - SearchBar = "unified"; - DisplayMenuBar = "default-off"; - DisplayBookmarksToolbar = "newtab"; - NoDefaultBookmarks = true; - - # Miscellaneous - HttpsOnlyMode = "force_enabled"; - HardwareAcceleration = true; - DontCheckDefaultBrowser = true; - PromptForDownloadLocation = false; - PrivateBrowsingModeAvailability = 0; -} diff --git a/modules/browsers/firefox/prefs.nix b/modules/browsers/firefox/prefs.nix deleted file mode 100644 index 73d2781..0000000 --- a/modules/browsers/firefox/prefs.nix +++ /dev/null @@ -1,128 +0,0 @@ -let - # quick variables to specify - # locked true/false - lock-false = { - Value = false; - Status = "locked"; - }; - lock-true = { - Value = true; - Status = "locked"; - }; -in { - # about:config Preferences - # ... set policies that cannot be set using policies.json directly - - # allow userChrom.css - "toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true; - - # dark theme - "extensions.activeThemeID" = { - Value = "firefox-compact-dark@mozilla.org"; - Status = "locked"; - }; - "layout.css.prefers-color-scheme.content-override" = { - Value = 0; - Status = "locked"; - }; - - # homepage - "browser.startup.homepage" = { - Value = "about:home"; - Status = "locked"; - }; - "browser.newtabpage.enabed" = lock-true; - "browser.newtabpage.url" = { - Value = "about:home"; - Status = "locked"; - }; - - # autofill - "browser.autofill.enabled" = lock-false; - "browser.formfill.enable" = lock-false; - - # search enable - "browser.urlbar.suggest.recentsearches" = lock-true; - "browser.urlbar.suggest.bookmark" = lock-true; - "browser.urlbar.suggest.clipboard" = lock-true; - "browser.urlbar.suggest.history" = lock-true; - - # search disable - "browser.urlbar.suggest.addons" = lock-false; - "browser.urlbar.suggest.calculator" = lock-false; - "browser.urlbar.suggest.engines" = lock-false; - "browser.urlbar.suggest.fakespot" = lock-false; - "browser.urlbar.suggest.mdn" = lock-false; - "browser.urlbar.suggest.openpage" = lock-false; - "browser.urlbar.suggest.pocket" = lock-false; - "browser.urlbar.suggest.remotetab" = lock-false; - "browser.urlbar.suggest.topsites" = lock-false; - "browser.urlbar.suggest.trending" = lock-false; - "browser.urlbar.suggest.weather" = lock-false; - "browser.urlbar.suggest.yelp" = lock-false; - - # privacy - "privacy.globalprivacycontrol.enabled" = lock-true; - - # security - "security.OCSP.enabled" = { - Value = 0; - Status = "locked"; - }; - "browser.contentblocking.category" = { - Value = "strict"; - Status = "locked"; - }; - "xpinstall.whitelist.required" = lock-true; - "signon.management.page.breach-alerts.enabled" = lock-false; - - # graphics - "dom.webgpu.enabled" = lock-true; - "media.eme.enabled" = lock-true; - - # user messaging - # ... disable shit that is annoying - "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false; - "browser.newtabpage.activity-stream.feeds.snippets" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false; - "browser.newtabpage.activity-stream.showSponsored" = lock-false; - "browser.newtabpage.activity-stream.system.showSponsored" = lock-false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false; - "browser.newtabpage.activity-stream.showWeather" = lock-false; - "browser.newtabpage.activity-stream.newtabWallpapers.enabled" = lock-false; - "browser.newtabpage.activity-stream.newtabWallpapers.v2.enabled" = lock-false; - "browser.newtabpage.activity-stream.default.sites" = { - Value = ""; - Status = "locked"; - }; - - # safebrowsing - "browser.safebrowsing.malware.enabled" = lock-true; - "browser.safebrowsing.phishing.enabled" = lock-true; - "browser.safebrowsing.downloads.enabled" = lock-true; - "browser.safebrowsing.downloads.remote.block_uncommon" = lock-false; - "browser.safebrowsing.downloads.remote.block_potentially_unwanted" = lock-false; - - # sidebar - "browser.tabs.inTitlebar" = { - Value = 0; - Status = "locked"; - }; - "browser.tabs.warnOnClose" = lock-true; - "browser.tabs.firefox-view" = lock-false; - "browser.tabs.closeTabByDblclick" = lock-true; - "ui.key.menuAccessKeyFocuses" = lock-false; - - # general settings - "general.autoScroll" = lock-false; - "general.smoothScroll" = lock-true; - "widget.gtk.overlay-scrollbars.enabled" = lock-false; - "accessibility.browsewithcaret" = lock-false; - "accessibility.typeaheadfind" = lock-false; - "media.hardwaremediakeys.enabled" = lock-true; - "browser.crashReports.unsubmittedCheck.autoSubmit2" = lock-false; - "browser.aboutConfig.showWarning" = lock-false; -} diff --git a/modules/browsers/firefox/userChrome.css b/modules/browsers/firefox/userChrome.css deleted file mode 100644 index e630632..0000000 --- a/modules/browsers/firefox/userChrome.css +++ /dev/null @@ -1,23 +0,0 @@ - -/* sidebar hack to flip contents the way i want them (arrows on the left) */ -#nav-bar-customization-target { - flex-direction: row-reverse; -} - -/* remove broken padding from sidebar hack */ -#unified-extensions-button { - padding-left: 0 !important; -} - -/* remove padding beside search bar */ -toolbarspring { - display: none !important; -} - -/* remove overflow menu and everything in it */ -#nav-bar-overflow-button, -#firefox-view-button, -#alltabs-button { - visibility: collapse; -} - diff --git a/modules/browsers/zen.nix b/modules/browsers/zen.nix deleted file mode 100644 index e57625f..0000000 --- a/modules/browsers/zen.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - config, - lib, - inputs, - ... -}: let - inherit (lib) mkIf; - cfg = config.browsers; -in { - config = mkIf cfg.zen { - default.browser = lib.mkDefault "zen"; - - home-manager.users.${config.user} = { - imports = [ - inputs.zen-browser.homeModules.default - ]; - - programs.zen-browser = { - enable = true; - - # import configuration - policies = import ./firefox/policies.nix; - - # create profile for me :3 - profiles.${config.user} = { - search = { - force = true; - default = "ddg"; - }; - }; - }; - }; - }; -} diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index ffc8466..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{...}: { - imports = [ - ./apps - ./browsers - ./desktops - ./development - ./gaming - ./virt - ./options.nix - ]; -} diff --git a/modules/desktops/default.nix b/modules/desktops/default.nix deleted file mode 100644 index 16406c9..0000000 --- a/modules/desktops/default.nix +++ /dev/null @@ -1,95 +0,0 @@ -{ - lib, - config, - pkgs, - inputs, - ... -}: let - inherit (lib) mkEnableOption mkIf optionals; - cfg = config.desktops; -in { - imports = [ - ./hyprland - ./sway - ./ly.nix - ./wayland.nix - ]; - - options.desktops = { - enable = mkEnableOption "Enable baseline desktop utils and programs."; - wayland = mkEnableOption "Enable wayland desktop components."; - ly = mkEnableOption "Install the ly display manager."; - hyprland = mkEnableOption "Install the Hyprland desktop."; - sway = mkEnableOption "Install the sway desktop."; - }; - - config = mkIf cfg.enable { - home-manager.users.${config.user} = { - # desktop specific programs - home.packages = with pkgs; [ - # gtk - adwaita-icon-theme - # codecs - libaacs - libavif - libbluray - libjxl - # wayland - cage - grimblast - wl-clipboard - wl-clip-persist - wl-mirror - # xdg - libnotify - ]; - }; - - # desktop only fonts - fonts.packages = - (with pkgs; [ - corefonts - dejavu_fonts - fira-code - fira-code-symbols - jetbrains-mono - material-icons - nerd-fonts.fira-code - noto-fonts - noto-fonts-cjk-sans - noto-fonts-emoji - twemoji-color-font - vistafonts - ]) - ++ (with inputs.apple-fonts.packages.${pkgs.system}; [ - sf-pro - sf-mono - sf-compact - ]); - - fonts.fontconfig = { - enable = true; - defaultFonts = { - serif = [ - "Twemoji" - "DejaVu Serif" - ]; - sansSerif = [ - "Twemoji" - "DejaVu Sans" - ]; - monospace = [ - "Fira Code" - "FiraCode Nerd Font Mono" - "Font Awesome 6 Pro Regular" - "Twemoji" - "DejaVu Sans Mono" - ]; - emoji = [ - "Twemoji" - "Noto Color Emoji" - ]; - }; - }; - }; -} diff --git a/modules/desktops/hyprland/binds.nix b/modules/desktops/hyprland/binds.nix deleted file mode 100644 index 98d531b..0000000 --- a/modules/desktops/hyprland/binds.nix +++ /dev/null @@ -1,141 +0,0 @@ -{config, ...}: { - home-manager.users.${config.user} = { - wayland.windowManager.hyprland.settings = { - # Keybinds - "$mod" = "SUPER"; - bind = [ - # Launch programs - - "$mod, W, exec, ${config.default.browser}" - "$mod, D, exec, ${config.default.appLauncher}" - "$mod, L, exec, ${config.default.lockScreen}" - "$mod, Return, exec, ${config.default.terminal}" - ", Print, exec, grimblast copy area" - - # Misc - - "$mod SHIFT, L, exit" - "$mod, tab, hyprexpo:expo, toggle" - - # Window operations - - "$mod SHIFT, Q, killactive" - "$mod SHIFT, SPACE, togglefloating" - "$mod, F, fullscreen" - "$mod, J, togglesplit" - - # Move focus with mod + arrow keys - - "$mod, left, movefocus, l" - "$mod, right, movefocus, r" - "$mod, up, movefocus, u" - "$mod, down, movefocus, d" - - # Move window across workspace with mod + arrow keys - - "$mod SHIFT, left, hy3:movewindow, l" - "$mod SHIFT, right, hy3:movewindow, r" - "$mod SHIFT, up, hy3:movewindow, u" - "$mod SHIFT, down, hy3:movewindow, d" - - # Switch workspaces with mod + [0-9] - - "$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" - - # Move active window to a workspace with mod + SHIFT + [0-9] - - "$mod SHIFT, 1, movetoworkspacesilent, 1" - "$mod SHIFT, 2, movetoworkspacesilent, 2" - "$mod SHIFT, 3, movetoworkspacesilent, 3" - "$mod SHIFT, 4, movetoworkspacesilent, 4" - "$mod SHIFT, 5, movetoworkspacesilent, 5" - "$mod SHIFT, 6, movetoworkspacesilent, 6" - "$mod SHIFT, 7, movetoworkspacesilent, 7" - "$mod SHIFT, 8, movetoworkspacesilent, 8" - "$mod SHIFT, 9, movetoworkspacesilent, 9" - "$mod SHIFT, 0, movetoworkspacesilent, 10" - - # Move to tab - - "LALT, 1, hy3:focustab, index, 01" - "LALT, 2, hy3:focustab, index, 02" - "LALT, 3, hy3:focustab, index, 03" - "LALT, 4, hy3:focustab, index, 04" - "LALT, 5, hy3:focustab, index, 05" - "LALT, 6, hy3:focustab, index, 06" - "LALT, 7, hy3:focustab, index, 07" - "LALT, 8, hy3:focustab, index, 08" - "LALT, 9, hy3:focustab, index, 09" - "LALT, 0, hy3:focustab, index, 10" - - "$mod SHIFT, B, hy3:makegroup, h" - "$mod SHIFT, V, hy3:makegroup, v" - "$mod SHIFT, C, hy3:changegroup, toggletab" - - # Scroll through existing workspaces with mod + scroll - - "$mod, mouse_down, workspace, e+1" - "$mod, mouse_up, workspace, e-1" - ]; - - bindn = [ - # Focus windows with scroll wheel or middle click - - ", mouse:272, hy3:focustab, mouse" - ", mouse_down, hy3:focustab, l, require_hovered" - ", mouse_up, hy3:focustab, r, require_hovered" - ]; - - bindm = [ - # Move/resize windows with mod + LMB/RMB and dragging - - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; - - binde = [ - # Audio - - # raise volume - ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+" - # lower volume - ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - # mute speaker - ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - # mute mic - ", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - - # Media - - # play - ", XF86AudioPlay, exec, playerctl play-pause" - # next - ", XF86AudioNext, exec, playerctl next" - # prev - ", XF86AudioPrev, exec, playerctl previous" - - # Backlight - - ", XF86MonBrightnessDown, exec, brightnessctl set 5%-" - ", XF86MonBrightnessUp, exec, brightnessctl set 5%+" - ]; - - bindl = let - monitor = builtins.elemAt config.monitors 0; - cfg = "highres, auto, ${toString monitor.scale}, bitdepth, ${toString monitor.bitdepth}"; - in [ - # Laptops when docked - ", switch:on:Lid, exec, hyprctl keyword monitor \"${monitor.name}, disable\"" - ", switch:off:Lid, exec, hyprctl keyword monitor \"${monitor.name}, ${cfg}\"" - ]; - }; - }; -} diff --git a/modules/desktops/hyprland/default.nix b/modules/desktops/hyprland/default.nix deleted file mode 100644 index f2b031b..0000000 --- a/modules/desktops/hyprland/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - inputs, - config, - system, - lib, - ... -}: let - inherit (lib) mkIf mkDefault; - cfg = config.desktops; -in { - imports = [ - ./binds.nix - ./env.nix - ./idle.nix - ./plugins.nix - ./settings.nix - ./wallpaper.nix - ]; - - config = mkIf cfg.hyprland { - desktops.wayland = true; - - environment.systemPackages = [ - inputs.rose-pine-hyprcursor.packages.${system}.default - ]; - - xdg.portal = { - extraPortals = [ - inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland - ]; - config = { - hyprland.common = ["gtk" "hyprland"]; - }; - }; - - programs.hyprland = { - enable = true; - package = inputs.hyprland.packages.${system}.hyprland; - portalPackage = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland; - }; - - home-manager.users.${config.user} = { - wayland.windowManager.hyprland = { - enable = true; - package = inputs.hyprland.packages.${system}.hyprland; - - xwayland.enable = true; - systemd.enable = true; - }; - }; - }; -} diff --git a/modules/desktops/hyprland/env.nix b/modules/desktops/hyprland/env.nix deleted file mode 100644 index aff3f93..0000000 --- a/modules/desktops/hyprland/env.nix +++ /dev/null @@ -1,16 +0,0 @@ -{config, ...}: { - home-manager.users.${config.user} = { - wayland.windowManager.hyprland.settings = { - env = [ - "XDG_CURRENT_DESKTOP,Hyprland" - "XDG_SESSION_TYPE,wayland" - "XDG_SESSION_DESKTOP,Hyprland" - "MOZ_ENABLE_WAYLAND,1" - "NIXOS_OZONE_WL,1" - - "HYPRCURSOR_THEME,rose-pine-hyprcursor" - "HYPRCURSOR_SIZE,24" - ]; - }; - }; -} diff --git a/modules/desktops/hyprland/idle.nix b/modules/desktops/hyprland/idle.nix deleted file mode 100644 index d09e665..0000000 --- a/modules/desktops/hyprland/idle.nix +++ /dev/null @@ -1,37 +0,0 @@ -{config, ...}: { - home-manager.users.${config.user} = { - services.hypridle = { - enable = config.desktops.hyprland; - systemdTarget = "hyprland-session.target"; - - settings = { - general = { - lock_cmd = "pidof ${config.default.lockScreen} || ${config.default.lockScreen}"; - before_sleep_cmd = "loginctl lock-session"; - after_sleep_cmd = "hyprctl dispatch dpms on"; - ignore_dbus_inhibit = false; - }; - - listener = [ - # dim screen - { - timeout = 150; - on-timeout = "brightnessctl -s set 10"; - on-resume = "brightnessctl -r"; - } - # lock - { - timeout = 300; - on-timeout = "loginctl lock-session"; - } - # turn off screen - { - timeout = 350; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; - } - ]; - }; - }; - }; -} diff --git a/modules/desktops/hyprland/plugins.nix b/modules/desktops/hyprland/plugins.nix deleted file mode 100644 index e4d66ef..0000000 --- a/modules/desktops/hyprland/plugins.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - inputs, - config, - system, - ... -}: { - home-manager.users.${config.user} = { - wayland.windowManager.hyprland = { - plugins = [ - inputs.hyprland-plugins.packages.${system}.hyprexpo - inputs.hy3.packages.${system}.hy3 - ]; - - settings.plugin = { - # hy3 - hy3 = { - tabs = { - height = 24; - text_height = 9; - text_padding = 10; - padding = 2; - render_text = true; - text_font = "monospace"; - radius = config.theme.outerRadius; - border_width = config.theme.borderWidth; - - "col.active" = "rgb(${config.theme.colors.base})"; - "col.active.border" = "rgb(${config.theme.colors.primary})"; - "col.active.text" = "rgb(${config.theme.colors.text})"; - "col.inactive" = "rgb(${config.theme.colors.base})"; - "col.inactive.border" = "rgb(${config.theme.colors.surface})"; - "col.inactive.text" = "rgb(${config.theme.colors.text})"; - }; - - autotile = { - enable = true; - }; - }; - }; - }; - }; -} diff --git a/modules/desktops/hyprland/settings.nix b/modules/desktops/hyprland/settings.nix deleted file mode 100644 index da55533..0000000 --- a/modules/desktops/hyprland/settings.nix +++ /dev/null @@ -1,127 +0,0 @@ -{ - config, - pkgs, - lib, - inputs, - ... -}: { - home-manager.users.${config.user} = { - wayland.windowManager.hyprland = { - importantPrefixes = [ - "bezier" - "enabled" - "output" - ]; - - settings = { - # Monitors - monitorv2 = - map (monitor: { - output = monitor.name; - mode = "highres"; - scale = toString monitor.scale; - bitdepth = toString monitor.bitdepth; - }) - config.monitors; - - # Autostart - exec-once = config.autoRun; - - # General - general = { - gaps_in = config.theme.innerGap; - gaps_out = config.theme.outerGap; - layout = "hy3"; - resize_on_border = "yes"; - extend_border_grab_area = 20; - border_size = config.theme.borderWidth; - "col.active_border" = "rgb(${config.theme.colors.primary})"; - "col.inactive_border" = "rgb(${config.theme.colors.surface})"; - }; - - # Gestures - gestures = { - workspace_swipe = true; - workspace_swipe_fingers = 3; - workspace_swipe_forever = true; - workspace_swipe_cancel_ratio = 0.15; - }; - - # Decoration - decoration = { - rounding = config.theme.outerRadius; - shadow.enabled = false; - blur = { - enabled = config.theme.blur; - size = 4; - passes = 2; - noise = 0.008; - contrast = 0.8916; - brightness = 0.8; - }; - }; - - animations = { - enabled = true; - - bezier = [ - "windowIn, 0.06, 0.71, 0.25, 1" - "windowResize, 0.04, 0.67, 0.38, 1" - ]; - - animation = [ - "windowsIn, 1, 3, windowIn, slide #popin 20%" - "windowsOut, 1, 3, windowIn, slide #popin 70%" - "windowsMove, 1, 2.5, windowResize" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 3, default" - "workspaces, 1, 6, default" - "layers, 1, 5, windowIn, slide" - ]; - }; - - # Input - input = { - kb_layout = "us"; - kb_variant = ""; - kb_model = ""; - kb_options = "gtp:alt_shift_toggle, compose:ralt"; - kb_rules = ""; - follow_mouse = 1; - touchpad = { - natural_scroll = "yes"; - }; - sensitivity = 0; - }; - - # XWayland - xwayland = { - force_zero_scaling = "true"; - use_nearest_neighbor = "false"; - }; - - # Misc - misc = { - disable_hyprland_logo = true; - disable_splash_rendering = true; - key_press_enables_dpms = true; - mouse_move_enables_dpms = true; - enable_anr_dialog = false; - vrr = 1; - }; - - # Ecosystem - ecosystem = { - no_update_news = true; - no_donation_nag = true; - }; - - # Experimental - experimental = { - xx_color_management_v4 = true; - }; - }; # end settings - }; # end hyprland - }; # end home-manager -} diff --git a/modules/desktops/hyprland/wallpaper.nix b/modules/desktops/hyprland/wallpaper.nix deleted file mode 100644 index b877774..0000000 --- a/modules/desktops/hyprland/wallpaper.nix +++ /dev/null @@ -1,13 +0,0 @@ -{config, ...}: { - home-manager.users.${config.user} = { - services.hyprpaper = { - enable = config.desktops.hyprland; - - settings = { - preload = config.theme.wallpaper; - wallpaper = ",${config.theme.wallpaper}"; - splash = false; - }; - }; - }; -} diff --git a/modules/desktops/ly.nix b/modules/desktops/ly.nix deleted file mode 100644 index 9e9e51b..0000000 --- a/modules/desktops/ly.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - lib, - config, - pkgs, - self, - system, - ... -}: let - inherit (lib) mkIf; - cfg = config.desktops; -in { - config = mkIf cfg.ly { - # display manager - services.displayManager.ly = { - enable = true; - package = self.packages.${system}.ly; - - settings = let - base = "0x00${config.theme.colors.base}"; - text = "0x00${config.theme.colors.text}"; - bold = "0x01${config.theme.colors.text}"; - error = "0x00${config.theme.colors.error}"; - save_file = pkgs.writeText "ly-prefs" '' - ${config.user} - 1 - ''; - in { - # general - clear_password = true; - default_input = "password"; - xinitrc = "null"; - hide_version_string = true; - hide_key_hints = true; - session_log = "/dev/null"; - # state (evil) - tty = 1; - save = false; - load = true; - save_file = toString save_file; - # background - bg = base; - error_bg = base; - blank_box = true; - # foreground - fg = text; - error_fg = error; - border_fg = bold; - }; - }; - - # disable default login on tty 1 - systemd.services."autovt@tty1".enable = false; - systemd.services."getty@tty1".enable = false; - - # fix env not being set - systemd.services.display-manager = { - environment.XDG_CURRENT_DESKTOP = "X-NIXOS-SYSTEMD-AWARE"; - }; - }; -} diff --git a/modules/desktops/sway/binds.nix b/modules/desktops/sway/binds.nix deleted file mode 100644 index 812d446..0000000 --- a/modules/desktops/sway/binds.nix +++ /dev/null @@ -1,91 +0,0 @@ -{config, ...}: let - mod = "Mod4"; -in { - home-manager.users.${config.user} = { - wayland.windowManager.sway = { - config = { - keybindings = { - # apps - "${mod}+Return" = "exec ${config.default.terminal}"; - "${mod}+l" = "exec ${config.default.lockScreen}"; - "${mod}+d" = "exec ${config.default.appLauncher}"; - "${mod}+w" = "exec ${config.default.browser}"; - - # exit - "${mod}+Shift+l" = "exit"; - # kill focused window - "${mod}+Shift+q" = "kill"; - # reload sway - "${mod}+F5" = "reload"; - - # audio - "XF86AudioRaiseVolume" = "exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"; - "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"; - "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; - "XF86AudioMicMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; - - # media - "XF86AudioPlay" = "exec playerctl play-pause"; - "XF86AudioNext" = "exec playerctl next"; - "XF86AudioPrev" = "exec playerctl previous"; - - # backlight - "XF86MonBrightnessDown" = "exec brightnessctl set 5%-"; - "XF86MonBrightnessUp" = "exec brightnessctl set 5%+"; - - # screenshot - "Print" = "exec grimblast copy area"; - - # move focus - "${mod}+Left" = "focus left"; - "${mod}+Down" = "focus down"; - "${mod}+Up" = "focus up"; - "${mod}+Right" = "focus right"; - - # move focused window - "${mod}+Shift+Left" = "move left"; - "${mod}+Shift+Down" = "move down"; - "${mod}+Shift+Up" = "move up"; - "${mod}+Shift+Right" = "move right"; - - # switch workspace - "${mod}+1" = "workspace number 1"; - "${mod}+2" = "workspace number 2"; - "${mod}+3" = "workspace number 3"; - "${mod}+4" = "workspace number 4"; - "${mod}+5" = "workspace number 5"; - "${mod}+6" = "workspace number 6"; - "${mod}+7" = "workspace number 7"; - "${mod}+8" = "workspace number 8"; - "${mod}+9" = "workspace number 9"; - - # move focused container to workspace - "${mod}+Shift+1" = "move container to workspace number 1"; - "${mod}+Shift+2" = "move container to workspace number 2"; - "${mod}+Shift+3" = "move container to workspace number 3"; - "${mod}+Shift+4" = "move container to workspace number 4"; - "${mod}+Shift+5" = "move container to workspace number 5"; - "${mod}+Shift+6" = "move container to workspace number 6"; - "${mod}+Shift+7" = "move container to workspace number 7"; - "${mod}+Shift+8" = "move container to workspace number 8"; - "${mod}+Shift+9" = "move container to workspace number 9"; - - # layout - "${mod}+Shift+d" = "layout default"; - "${mod}+Shift+b" = "layout splith"; - "${mod}+Shift+v" = "layout splitv"; - "${mod}+Shift+c" = "layout tabbed"; - - # fullscreen - "${mod}+f" = "fullscreen"; - # float - "${mod}+Shift+space" = "floating toggle"; - # focus - "${mod}+space" = "focus mode_toggle"; - # parent - "${mod}+a" = "focus parent"; - }; - }; - }; - }; -} diff --git a/modules/desktops/sway/config.nix b/modules/desktops/sway/config.nix deleted file mode 100644 index c6c78ca..0000000 --- a/modules/desktops/sway/config.nix +++ /dev/null @@ -1,124 +0,0 @@ -{config, ...}: { - home-manager.users.${config.user} = { - wayland.windowManager.sway = { - config = { - # monitors - output = - (builtins.listToAttrs (map (mon: { - name = mon.name; - value = { - dpms = "on"; - scale = toString mon.scale; - render_bit_depth = toString mon.bitdepth; - }; - }) - config.monitors)) - // { - # wallpaper - "*" = { - bg = "${config.theme.wallpaper} fill"; - }; - }; - - # inputs - input = { - "*" = { - xkb_layout = "us"; - xkb_options = "compose:ralt"; - xkb_numlock = "enable"; - }; - - "type:touchpad" = { - tap = "enabled"; - natural_scroll = "enabled"; - middle_emulation = "enabled"; - }; - }; - - startup = - # autostart apps - builtins.map (command: { - inherit command; - always = false; - }) - config.autoRun; - - # colors - colors = let - base = "#${config.theme.colors.base}"; - surface = "#${config.theme.colors.surface}"; - primary = "#${config.theme.colors.primary}"; - text = "#${config.theme.colors.text}"; - white = "#${config.theme.colors.bright.white}"; - error = "#${config.theme.colors.error}"; - in rec { - background = base; - - focused = { - border = primary; - background = base; - text = text; - indicator = white; - childBorder = primary; - }; - - focusedInactive = { - border = surface; - background = base; - text = text; - indicator = surface; - childBorder = surface; - }; - - unfocused = focusedInactive; - - urgent = { - border = error; - background = error; - text = text; - indicator = error; - childBorder = error; - }; - - placeholder = unfocused; - }; - - window = { - titlebar = false; - border = config.theme.borderWidth; - }; - - floating = { - titlebar = false; - border = config.theme.borderWidth; - modifier = "Mod4 normal"; - }; - - gaps = { - inner = config.theme.innerGap; - outer = config.theme.outerGap; - }; - - modes = {}; - bars = []; - }; - - extraConfig = '' - # gestures - bindgesture swipe:right workspace prev - bindgesture swipe:left workspace next - - # swayfx - corner_radius ${toString config.theme.outerRadius} - smart_corner_radius ${toString config.theme.outerRadius} - blur ${ - if config.theme.blur - then "enabled" - else "disabled" - } - blur_radius 10 - blur_passes 3 - ''; - }; - }; -} diff --git a/modules/desktops/sway/default.nix b/modules/desktops/sway/default.nix deleted file mode 100644 index be3766d..0000000 --- a/modules/desktops/sway/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - inherit (lib) mkIf mkDefault; - cfg = config.desktops; -in { - imports = [ - ./binds.nix - ./config.nix - ./idle.nix - ]; - - config = mkIf cfg.sway { - desktops.wayland = true; - - # TODO: set NIXOS_OZONE_WL env var - - xdg.portal = { - config = { - sway.common = ["gtk" "wlr"]; - }; - extraPortals = with pkgs; [ - xdg-desktop-portal-wlr - ]; - }; - - programs.sway = { - enable = true; - package = pkgs.swayfx; - wrapperFeatures = { - base = false; - gtk = false; - }; - }; - - home-manager.users.${config.user} = { - wayland.windowManager.sway = { - enable = true; - package = pkgs.swayfx; - - # TODO: get swayfx to work with check config - checkConfig = false; - - xwayland = true; - systemd.enable = true; - }; - }; - }; -} diff --git a/modules/desktops/sway/idle.nix b/modules/desktops/sway/idle.nix deleted file mode 100644 index b3e3e06..0000000 --- a/modules/desktops/sway/idle.nix +++ /dev/null @@ -1,27 +0,0 @@ -{config, ...}: { - home-manager.users.${config.user} = { - services.swayidle = { - enable = config.desktops.sway; - systemdTarget = "sway-session.target"; - - timeouts = [ - { - timeout = 300; - command = "${config.default.lockScreen}"; - } - { - timeout = 300; - command = "swaymsg \"output * power off\""; - resumeCommand = "swaymsg \"output * power on\""; - } - ]; - - events = [ - { - event = "before-sleep"; - command = "${config.default.lockScreen}"; - } - ]; - }; - }; -} diff --git a/modules/desktops/wayland.nix b/modules/desktops/wayland.nix deleted file mode 100644 index 600651f..0000000 --- a/modules/desktops/wayland.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - inherit (lib) mkIf; - cfg = config.desktops; -in { - config = mkIf cfg.wayland { - xdg.portal = { - enable = true; - xdgOpenUsePortal = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-gtk - ]; - config = { - default.common = ["gtk"]; - }; - }; - - programs.xwayland.enable = true; - }; -} diff --git a/modules/development/default.nix b/modules/development/default.nix deleted file mode 100644 index c5666a5..0000000 --- a/modules/development/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - inherit (lib) mkEnableOption optionals; - cfg = config.development; -in { - options.development = { - c = mkEnableOption "Enable c/c++ development tools."; - java = mkEnableOption "Enable java/kotlin development tools."; - lua = mkEnableOption "Enable lua development tools."; - rust = mkEnableOption "Enable rust development tools."; - web = mkEnableOption "Enable web development tools."; - zig = mkEnableOption "Enable zig development tools."; - }; - - config = { - home-manager.users.${config.user} = { - home.packages = with pkgs; - (optionals cfg.c [ - clang-tools - gcc - gdb - gnumake - nasm - pkg-config - ]) - ++ (optionals cfg.lua [ - lua-language-server - ]) - ++ (optionals cfg.rust [ - rustc - rustfmt - rust-analyzer - cargo - clippy - ]) - ++ (optionals cfg.java [ - gradle - jdk - jdt-language-server - kotlin - kotlin-language-server - maven - ]) - ++ (optionals cfg.web [ - phpactor - sassc - typescript-language-server - ]) - ++ (optionals cfg.zig [ - zig - zls - ]); - }; - }; -} diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix deleted file mode 100644 index a0c826c..0000000 --- a/modules/gaming/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - lib, - config, - ... -}: let - inherit (lib) mkEnableOption; -in { - imports = [ - ./homestuck.nix - ./minecraft.nix - ./steam.nix - ]; - - options.gaming = { - homestuck = mkEnableOption "Install the unofficial homestuck collection."; - minecraft = mkEnableOption "Install the minecraft block game."; - steam = mkEnableOption "Install the steam game launcher."; - }; -} diff --git a/modules/gaming/homestuck.nix b/modules/gaming/homestuck.nix deleted file mode 100644 index 681325b..0000000 --- a/modules/gaming/homestuck.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - lib, - config, - inputs, - system, - ... -}: let - inherit (lib) mkIf; - cfg = config.gaming; -in { - config = mkIf cfg.homestuck { - home-manager.users.${config.user} = { - home.packages = [ - inputs.self.packages.${system}.unofficial-homestuck-collection - ]; - }; - }; -} diff --git a/modules/gaming/minecraft.nix b/modules/gaming/minecraft.nix deleted file mode 100644 index 5de20e6..0000000 --- a/modules/gaming/minecraft.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - inherit (lib) mkIf; - cfg = config.gaming; -in { - config = mkIf cfg.minecraft { - home-manager.users.${config.user} = { - home.packages = with pkgs; [ - prismlauncher - ]; - }; - }; -} diff --git a/modules/gaming/steam.nix b/modules/gaming/steam.nix deleted file mode 100644 index 53ab252..0000000 --- a/modules/gaming/steam.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - lib, - config, - ... -}: let - inherit (lib) mkIf; - cfg = config.gaming; -in { - config = mkIf cfg.steam { - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "steam" - "steam-original" - "steam-runtime" - ]; - - programs.gamescope = { - enable = true; - capSysNice = true; - }; - - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - gamescopeSession.enable = true; - }; - - # controllers - hardware.xone.enable = true; - hardware.steam-hardware.enable = true; - }; -} diff --git a/modules/options.nix b/modules/options.nix deleted file mode 100644 index 2571b9c..0000000 --- a/modules/options.nix +++ /dev/null @@ -1,393 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - # monitor options - monitorOpts = self: { - options = { - name = mkOption { - type = types.str; - description = "Name of the monitor."; - }; - - scale = mkOption { - type = types.float; - description = "Scaling factor of the monitor."; - default = 1.0; - }; - - bitdepth = mkOption { - type = types.int; - description = "Monitor color bitdepth"; - default = 8; - }; - }; - }; - - # theme color options - - colorOpts = self: { - options = { - name = mkOption { - type = types.str; - description = "Name of the theme"; - }; - - author = mkOption { - type = types.str; - description = "Author of the theme"; - }; - - text = mkOption { - type = types.str; - description = "Text color."; - }; - - subtext = mkOption { - type = types.str; - description = "Subtext color."; - }; - - base = mkOption { - type = types.str; - description = "Base background color."; - }; - - surface = mkOption { - type = types.str; - description = "Surface (lighter) background color."; - }; - - overlay = mkOption { - type = types.str; - description = "Overlay (light) background color."; - }; - - primary = mkOption { - type = types.str; - description = "Primary accent color"; - }; - - success = mkOption { - type = types.str; - description = "Success color"; - }; - - warning = mkOption { - type = types.str; - description = "Warning color"; - }; - - error = mkOption { - type = types.str; - description = "Error color"; - }; - - normal = { - black = mkOption { - type = types.str; - description = "Terminal black normal color"; - }; - - red = mkOption { - type = types.str; - description = "Terminal red normal color"; - }; - - green = mkOption { - type = types.str; - description = "Terminal green normal color"; - }; - - yellow = mkOption { - type = types.str; - description = "Terminal yellow normal color"; - }; - - blue = mkOption { - type = types.str; - description = "Terminal blue normal color"; - }; - - magenta = mkOption { - type = types.str; - description = "Terminal magenta normal color"; - }; - - cyan = mkOption { - type = types.str; - description = "Terminal cyan normal color"; - }; - - white = mkOption { - type = types.str; - description = "Terminal white normal color"; - }; - - pink = mkOption { - type = types.str; - description = "Terminal pink (extended) normal color."; - }; - - orange = mkOption { - type = types.str; - description = "Terminal orange (extended) normal color."; - }; - }; - - bright = { - black = mkOption { - type = types.str; - description = "Terminal black bright color"; - }; - - red = mkOption { - type = types.str; - description = "Terminal red bright color"; - }; - - green = mkOption { - type = types.str; - description = "Terminal green bright color"; - }; - - yellow = mkOption { - type = types.str; - description = "Terminal yellow bright color"; - }; - - blue = mkOption { - type = types.str; - description = "Terminal blue bright color"; - }; - - magenta = mkOption { - type = types.str; - description = "Terminal magenta bright color"; - }; - - cyan = mkOption { - type = types.str; - description = "Terminal cyan bright color"; - }; - - white = mkOption { - type = types.str; - description = "Terminal white bright color"; - }; - - pink = mkOption { - type = types.str; - description = "Terminal pink (extended) bright color."; - }; - - orange = mkOption { - type = types.str; - description = "Terminal orange (extended) bright color."; - }; - }; - }; - }; -in { - options = { - # - # System information - # - hostName = mkOption { - type = types.str; - description = "Hostname of the system."; - }; - timeZone = mkOption { - type = types.str; - description = "System time zone"; - default = "America/New_York"; - }; - stateVersion = mkOption { - type = types.str; - description = "NixOS State Version"; - }; - - # - # System modules - # - battery = mkEnableOption { - description = "Install battery and power system services and programs."; - }; - bluetooth = mkEnableOption { - description = "Install bluetooth system services and programs."; - }; - fingerprint = mkEnableOption { - description = "Install fingerprint system services and programs."; - }; - network = mkEnableOption { - description = "Install networking system services and programs."; - }; - tpm = mkEnableOption { - description = "Enable system TPM"; - }; - minimal = mkEnableOption { - description = "Install only required system services, drivers, and programs."; - }; - - # - # Primary user of the system - # - user = mkOption { - type = types.str; - description = "Primary user of the system"; - }; - fullName = mkOption { - type = types.str; - description = "Human readable name of the user"; - }; - email = mkOption { - type = types.str; - description = "Primary email of the user"; - }; - homePath = mkOption { - type = types.path; - description = "Home directory path of the user"; - default = builtins.toPath "/home/${config.user}"; - }; - dotfilesPath = mkOption { - type = types.path; - description = "Dotfiles path inside the users home dir"; - default = builtins.toPath "${config.homePath}/.config/nix"; - }; - - # - # Monitors of the system - # - monitors = mkOption { - default = []; - description = "Monitors of the system."; - type = with types; listOf (submodule monitorOpts); - }; - - # - # Theme of the system - # - theme = { - colors = mkOption { - type = with types; (submodule colorOpts); - description = "color scheme"; - }; - - opacity = mkOption { - type = types.float; - description = "Window opacity."; - }; - - # theme fonts - font = { - size = mkOption { - type = types.int; - description = "Theme primary font size."; - }; - - regular = mkOption { - type = types.str; - description = "Regular system font."; - }; - - monospace = mkOption { - type = types.str; - description = "Monospace system font."; - }; - - header = mkOption { - type = types.str; - description = "Header system font."; - }; - - icon = mkOption { - type = types.str; - description = "Icon system font."; - }; - }; - - borderWidth = mkOption { - type = types.int; - description = "Theme border width"; - }; - - outerRadius = mkOption { - type = types.int; - description = "Theme outer border radius."; - }; - - innerRadius = mkOption { - type = types.int; - description = "Theme inner border radius."; - }; - - outerGap = mkOption { - type = types.int; - description = "Theme outer gap/spacing."; - }; - - innerGap = mkOption { - type = types.int; - description = "Theme inner gap/spacing."; - }; - - blur = mkEnableOption { - description = "If to enable blur in some programs."; - }; - - wallpaper = mkOption { - type = types.str; - description = "Path to wallpaper image"; - }; - - lockscreen = mkOption { - type = types.str; - description = "Path to lockscreen image"; - }; - - avatar = mkOption { - type = types.str; - description = "Path to avatar image"; - }; - }; - - # - # Default programs - # - default = { - browser = mkOption { - type = types.str; - description = "Default browser launch command."; - }; - appLauncher = mkOption { - type = types.str; - description = "Default application launcher launch command."; - }; - lockScreen = mkOption { - type = types.str; - description = "Default lock screen launch command."; - }; - terminal = mkOption { - type = types.str; - description = "Default terminal launch command."; - }; - session = mkOption { - type = types.str; - description = "Default systemd graphical session target."; - default = "graphical-session.target"; - }; - }; - - # - # Programs to auto start on launch - # - autoRun = mkOption { - type = with types; listOf str; - description = "List of programs to auto run in a graphical environment."; - default = []; - }; - }; -} diff --git a/modules/virt/default.nix b/modules/virt/default.nix deleted file mode 100644 index c5d3960..0000000 --- a/modules/virt/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - inherit (lib) mkEnableOption; - cfg = config.virt; -in { - imports = [ - ./docker.nix - ./qemu.nix - ]; - - options.virt = { - docker = mkEnableOption "Install docker and its components."; - qemu = mkEnableOption "Install qemu and its components."; - }; -} diff --git a/modules/virt/docker.nix b/modules/virt/docker.nix deleted file mode 100644 index 5930858..0000000 --- a/modules/virt/docker.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - inherit (lib) mkIf; - cfg = config.virt; -in { - config = mkIf cfg.docker { - virtualisation.docker.enable = true; - virtualisation.docker.storageDriver = "btrfs"; - users.groups.docker.members = [config.user]; - }; -} diff --git a/modules/virt/qemu.nix b/modules/virt/qemu.nix deleted file mode 100644 index f755952..0000000 --- a/modules/virt/qemu.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - inherit (lib) mkIf; - cfg = config.virt; -in { - config = mkIf cfg.qemu { - programs.virt-manager.enable = true; - users.groups.kvm.members = [config.user]; - users.groups.libvirtd.members = [config.user]; - virtualisation.libvirtd.enable = true; - virtualisation.spiceUSBRedirection.enable = true; - - environment.systemPackages = with pkgs; [ - qemu - ]; - }; -} |