diff options
| -rw-r--r-- | machines/common/base.nix | 2 | ||||
| -rw-r--r-- | machines/magician/configuration.nix | 34 | ||||
| -rw-r--r-- | users/kassouni/desktop/sway/sway.nix | 6 | ||||
| -rw-r--r-- | users/kassouni/firefox/default.nix | 6 | ||||
| -rw-r--r-- | users/kassouni/firefox/extensions.nix | 32 | ||||
| -rw-r--r-- | users/kassouni/firefox/firefox.nix (renamed from users/kassouni/firefox.nix) | 34 | ||||
| -rw-r--r-- | users/kassouni/git.nix | 1 | ||||
| -rw-r--r-- | users/kassouni/home.nix | 4 | ||||
| -rw-r--r-- | users/kassouni/newsboat.nix | 28 | ||||
| -rw-r--r-- | users/kassouni/palette/bluetooth.nix | 17 | ||||
| -rw-r--r-- | users/kassouni/theme.nix | 2 |
11 files changed, 88 insertions, 78 deletions
diff --git a/machines/common/base.nix b/machines/common/base.nix index 60bdf3d..5e2c091 100644 --- a/machines/common/base.nix +++ b/machines/common/base.nix @@ -4,7 +4,7 @@ }; security.polkit.enable = true; - + services.gnome.gnome-keyring.enable = true; nix.settings.experimental-features = [ "nix-command" diff --git a/machines/magician/configuration.nix b/machines/magician/configuration.nix index e11434a..0214cd8 100644 --- a/machines/magician/configuration.nix +++ b/machines/magician/configuration.nix @@ -6,45 +6,13 @@ ]; services.upower.enable = true; + services.fwupd.enable = true; swapDevices = [{ device = "/var/lib/swapfile"; size = 16*1024; # 16 GB }]; - services.tlp = { - enable = true; - settings = { - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - - # intel_pstate runs in active mode, where the scaling governor barely - # matters. EPP is the knob that actually moves power. - CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance"; - CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - - # drives the EC's PL1/PL2 power limits - PLATFORM_PROFILE_ON_AC = "balanced"; - PLATFORM_PROFILE_ON_BAT = "low-power"; - - # no turbo on battery, and cap sustained clocks. costs real - # performance (nix builds especially) to buy runtime. - CPU_BOOST_ON_BAT = 0; - CPU_HWP_DYN_BOOST_ON_BAT = 0; - CPU_MAX_PERF_ON_BAT = 60; - - PCIE_ASPM_ON_BAT = "powersave"; - RUNTIME_PM_ON_BAT = "auto"; - WIFI_PWR_ON_BAT = "on"; - SOUND_POWER_SAVE_ON_BAT = 1; - USB_AUTOSUSPEND = 1; - - # battery longevity, not runtime. stops charging at 85%. - START_CHARGE_THRESH_BAT0 = 75; - STOP_CHARGE_THRESH_BAT0 = 85; - }; - }; - hardware.bluetooth = { enable = true; powerOnBoot = true; diff --git a/users/kassouni/desktop/sway/sway.nix b/users/kassouni/desktop/sway/sway.nix index 2e73d5f..f949bd7 100644 --- a/users/kassouni/desktop/sway/sway.nix +++ b/users/kassouni/desktop/sway/sway.nix @@ -3,6 +3,9 @@ config, ... }: +let + modifier = "Mod4"; +in { programs.swaylock.enable = true; wayland.windowManager.sway = { @@ -12,7 +15,7 @@ config = { window.titlebar = false; menu = "fuzzel"; - modifier = "Mod4"; + inherit modifier; # Use kitty as default terminal terminal = "ghostty"; }; @@ -27,6 +30,7 @@ bindsym XF86MonBrightnessUp exec ${brightnessctl} set -e +${incr}% bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_SINK@ ${incr}%+ bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_SINK@ ${incr}%- + bindsym ${modifier}+p exec open-palette-fuzzel input "type:keyboard" { xkb_options caps:escape } diff --git a/users/kassouni/firefox/default.nix b/users/kassouni/firefox/default.nix new file mode 100644 index 0000000..abba9ea --- /dev/null +++ b/users/kassouni/firefox/default.nix @@ -0,0 +1,6 @@ +{...}: { + imports = [ + ./extensions.nix + ./firefox.nix + ]; +} diff --git a/users/kassouni/firefox/extensions.nix b/users/kassouni/firefox/extensions.nix new file mode 100644 index 0000000..7664918 --- /dev/null +++ b/users/kassouni/firefox/extensions.nix @@ -0,0 +1,32 @@ +{...}:{ + programs.firefox.policies.ExtensionSettings = { + "uBlock0@raymondhill.net" = { + default_area = "navbar"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + "{d634138d-c276-4fc8-924b-40a0ea21d284}" = { + default_area = "navbar"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/1password-x-password-manager/latest.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + + "{9063c2e9-e07c-4c2c-9646-cfe7ca8d0498}" = { + default_area = "menupanel"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/old-reddit-redirect/latest.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + + "{d7742d87-e61d-4b78-b8a1-b469842139fa}" = { + default_area = "menupanel"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/vimium-ff/latest.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + }; +} + + diff --git a/users/kassouni/firefox.nix b/users/kassouni/firefox/firefox.nix index 3b9d30a..2d9f906 100644 --- a/users/kassouni/firefox.nix +++ b/users/kassouni/firefox/firefox.nix @@ -3,39 +3,6 @@ programs.firefox = { enable = true; - policies = { - ExtensionSettings = { - "uBlock0@raymondhill.net" = { - default_area = "navbar"; - install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - installation_mode = "normal_installed"; - private_browsing = true; - }; - - - "{d634138d-c276-4fc8-924b-40a0ea21d284}" = { - default_area = "navbar"; - install_url = "https://addons.mozilla.org/firefox/downloads/latest/1password-x-password-manager/latest.xpi"; - installation_mode = "normal_installed"; - private_browsing = true; - }; - - "{9063c2e9-e07c-4c2c-9646-cfe7ca8d0498}" = { - default_area = "menupanel"; - install_url = "https://addons.mozilla.org/firefox/downloads/latest/old-reddit-redirect/latest.xpi"; - installation_mode = "normal_installed"; - private_browsing = true; - }; - - "{d7742d87-e61d-4b78-b8a1-b469842139fa}" = { - default_area = "menupanel"; - install_url = "https://addons.mozilla.org/firefox/downloads/latest/vimium-ff/latest.xpi"; - installation_mode = "normal_installed"; - private_browsing = true; - }; - }; - }; - profiles.kassouni = { isDefault = true; bookmarks = { @@ -68,6 +35,7 @@ ]; }; settings = { + "browser.ml.linkPreview.enabled" = false; "browser.startup.homepage" = "about:blank"; "browser.compactmode.show" = true; "startup.homepage_welcome_url" = "about:blank"; diff --git a/users/kassouni/git.nix b/users/kassouni/git.nix index 03579cd..7740ac1 100644 --- a/users/kassouni/git.nix +++ b/users/kassouni/git.nix @@ -6,6 +6,7 @@ name = "Alexander Kassouni"; email = "alex@kassouni.net"; }; + push.autoSetupRemote = true; init = { defaultBranch = "main"; }; diff --git a/users/kassouni/home.nix b/users/kassouni/home.nix index 84b69f1..d9e389d 100644 --- a/users/kassouni/home.nix +++ b/users/kassouni/home.nix @@ -10,6 +10,7 @@ ./claude.nix ./music.nix ./fonts.nix + ./newsboat.nix ./slippi.nix ./ssh.nix ./desktop/sway @@ -19,7 +20,7 @@ ./git.nix ./ghostty.nix ./theme.nix - ./firefox.nix + ./firefox ./cursor.nix ./bash.nix ./scripts @@ -37,6 +38,7 @@ btop wget tree + calibre nerd-fonts.blex-mono ripgrep curl diff --git a/users/kassouni/newsboat.nix b/users/kassouni/newsboat.nix new file mode 100644 index 0000000..cde761c --- /dev/null +++ b/users/kassouni/newsboat.nix @@ -0,0 +1,28 @@ +{...}: +{ + programs.newsboat = { + enable = true; + urls = [ + { + url = "https://xeiaso.net/blog.rss"; + title = "Xe Iaso's Blog"; + } + + { + url = "https://reasonablypolymorphic.com/feed.rss"; + title = "Reasonably Polymorphic"; + } + + { + url = "https://esoteric.codes/rss"; + title = "ESOTERIC.CODES"; + } + + { + url = "https://100r.co/links/rss.xml"; + title = "100R"; + } + ]; + }; +} + diff --git a/users/kassouni/palette/bluetooth.nix b/users/kassouni/palette/bluetooth.nix index 71e1aaf..4d2a594 100644 --- a/users/kassouni/palette/bluetooth.nix +++ b/users/kassouni/palette/bluetooth.nix @@ -13,14 +13,13 @@ # The interpolated store paths below are longer than 79 columns. flakeIgnore = [ "E501" ]; } '' - import html import json import subprocess import sys BT = "${pkgs.bluez}/bin/bluetoothctl" JC = "${pkgs.jc}/bin/jc" - ROFI = "${pkgs.rofi}/bin/rofi" + FUZZEL = "${pkgs.fuzzel}/bin/fuzzel" def devices(*args): @@ -38,10 +37,9 @@ def label(device, connected): - """Pango markup row. Names are escaped, they are not our text.""" - name = html.escape(device["name"]) + name = device["name"] if device["address"] in connected: - name += ' <span alpha="45%">connected</span>' + name += " (connected)" return name @@ -56,8 +54,7 @@ rows = [label(d, connected) for d in known] choice = subprocess.run( - [ROFI, "-dmenu", "-i", "-markup-rows", "-format", "i", - "-p", "bluetooth"], + [FUZZEL, "--dmenu", "--index", "--prompt", "bluetooth "], input="\n".join(rows), capture_output=True, text=True, @@ -65,7 +62,11 @@ if choice.returncode != 0: return 1 - device = known[int(choice.stdout.strip())] + index = int(choice.stdout.strip() or -1) + if not 0 <= index < len(known): + return 1 + + device = known[index] action = ( "disconnect" if device["address"] in connected else "connect" ) diff --git a/users/kassouni/theme.nix b/users/kassouni/theme.nix index 70785ca..2bc7c03 100644 --- a/users/kassouni/theme.nix +++ b/users/kassouni/theme.nix @@ -6,7 +6,7 @@ font = { size = lib.mkOption { type = lib.types.int; - default = 16; + default = 12; description = "Global font size for all applications"; }; |
