From 9d9d84699bc1bce6aac253cb70e97c100d1e4c84 Mon Sep 17 00:00:00 2001 From: tdback Date: Thu, 23 Jan 2025 21:22:42 -0500 Subject: Retired modules have migrated to separate repo --- modules/retired/blocky/default.nix | 97 ------------------ modules/retired/forgejo/default.nix | 72 ------------- modules/retired/kavita/default.nix | 28 ------ modules/retired/mealie/default.nix | 22 ---- modules/retired/mumble/default.nix | 11 -- modules/retired/navidrome/default.nix | 30 ------ modules/retired/pihole/default.nix | 56 ----------- modules/retired/stirling-pdf/default.nix | 23 ----- modules/retired/x11/default.nix | 33 ------ modules/retired/xonotic/default.nix | 25 ----- users/tdback/modules/retired/alacritty/default.nix | 66 ------------ users/tdback/modules/retired/dunst/default.nix | 27 ----- users/tdback/modules/retired/polybar/default.nix | 112 --------------------- users/tdback/modules/retired/rofi/default.nix | 84 ---------------- users/tdback/modules/retired/x11/default.nix | 103 ------------------- 15 files changed, 789 deletions(-) delete mode 100644 modules/retired/blocky/default.nix delete mode 100644 modules/retired/forgejo/default.nix delete mode 100644 modules/retired/kavita/default.nix delete mode 100644 modules/retired/mealie/default.nix delete mode 100644 modules/retired/mumble/default.nix delete mode 100644 modules/retired/navidrome/default.nix delete mode 100644 modules/retired/pihole/default.nix delete mode 100644 modules/retired/stirling-pdf/default.nix delete mode 100644 modules/retired/x11/default.nix delete mode 100644 modules/retired/xonotic/default.nix delete mode 100644 users/tdback/modules/retired/alacritty/default.nix delete mode 100644 users/tdback/modules/retired/dunst/default.nix delete mode 100644 users/tdback/modules/retired/polybar/default.nix delete mode 100644 users/tdback/modules/retired/rofi/default.nix delete mode 100644 users/tdback/modules/retired/x11/default.nix diff --git a/modules/retired/blocky/default.nix b/modules/retired/blocky/default.nix deleted file mode 100644 index 302ef8e..0000000 --- a/modules/retired/blocky/default.nix +++ /dev/null @@ -1,97 +0,0 @@ -{ lib, pkgs, ... }: -{ - services.blocky = { - enable = true; - package = pkgs.blocky; - settings = { - upstreams = { - init.strategy = "fast"; - groups.default = [ - "9.9.9.9" - "149.112.112.112" - ]; - }; - bootstrapDns = lib.singleton { - upstream = "https://dns.quad9.net/dns-query"; - ips = [ "9.9.9.9" ]; - }; - ports = { - dns = 53; - tls = 853; - https = 443; - }; - blocking = { - denylists = { - ads = [ - "https://adaway.org/hosts.txt" - "https://v.firebog.net/hosts/AdguardDNS.txt" - "https://v.firebog.net/hosts/Admiral.txt" - "https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt" - "https://v.firebog.net/hosts/Easylist.txt" - "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext" - "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts" - "https://raw.githubusercontent.com/bigdargon/hostsVN/master/hosts" - ]; - malicious = [ - "https://osint.digitalside.it/Threat-Intel/lists/latestdomains.txt" - "https://v.firebog.net/hosts/Prigent-Crypto.txt" - "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts" - "https://phishing.army/download/phishing_army_blocklist_extended.txt" - "https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt" - "https://raw.githubusercontent.com/Spam404/lists/master/main-blacklist.txt" - "https://raw.githubusercontent.com/AssoEchap/stalkerware-indicators/master/generated/hosts" - "https://urlhaus.abuse.ch/downloads/hostfile/" - "https://v.firebog.net/hosts/Prigent-Malware.txt" - ]; - other = [ - "https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser" - ]; - suspicious = [ - "https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt" - "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts" - "https://v.firebog.net/hosts/static/w3kbl.txt" - "https://raw.githubusercontent.com/matomo-org/referrer-spam-blacklist/master/spammers.txt" - "https://someonewhocares.org/hosts/zero/hosts" - "https://raw.githubusercontent.com/VeleSila/yhosts/master/hosts" - "https://winhelp2002.mvps.org/hosts.txt" - "https://v.firebog.net/hosts/neohostsbasic.txt" - "https://raw.githubusercontent.com/RooneyMcNibNug/pihole-stuff/master/SNAFU.txt" - "https://paulgb.github.io/BarbBlock/blacklists/hosts-file.txt" - ]; - tracking-telemetry = [ - "https://v.firebog.net/hosts/Easyprivacy.txt" - "https://v.firebog.net/hosts/Prigent-Ads.txt" - "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts" - "https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt" - "https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt" - "https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt" - "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/android-tracking.txt" - "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt" - "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/AmazonFireTV.txt" - "https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt" - ]; - }; - clientGroupsBlock.default = [ - "ads" - "malicious" - "other" - "suspicious" - "tracking-telemetry" - ]; - loading = { - concurrency = 16; - strategy = "failOnError"; - }; - }; - }; - }; - - networking.firewall = { - allowedTCPPorts = [ - 53 - 443 - 853 - ]; - allowedUDPPorts = [ 53 ]; - }; -} diff --git a/modules/retired/forgejo/default.nix b/modules/retired/forgejo/default.nix deleted file mode 100644 index cf4e101..0000000 --- a/modules/retired/forgejo/default.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ - inputs, - config, - lib, - pkgs, - ... -}: -let - domain = "git.tdback.net"; - port = 3000; -in -{ - services.forgejo = { - enable = true; - package = pkgs.unstable.forgejo; - stateDir = "/tank/forgejo"; - database.type = "postgres"; - lfs.enable = true; - settings = { - server = { - DOMAIN = domain; - ROOT_URL = "https://${domain}/"; - HTTP_PORT = port; - }; - service.DISABLE_REGISTRATION = true; - actions = { - ENABLED = true; - DEFAULT_ACTIONS_URL = "https://${domain}"; - }; - }; - }; - - age.secrets.forgejoAdminPass = { - file = "${inputs.self}/secrets/forgejoAdminPass.age"; - mode = "770"; - owner = "forgejo"; - group = "forgejo"; - }; - - systemd.services.forgejo.preStart = - let - adminCmd = "${lib.getExe config.services.forgejo.package} admin user"; - password = config.age.secrets.forgejoAdminPass.path; - user = "tdback"; - email = "tyler@tdback.net"; - in - '' - ${adminCmd} create --admin --email ${email} --username ${user} --password "$(tr -d '\n' < ${password})" || true - ''; - - services.openssh.settings.AllowUsers = [ "forgejo" ]; - - services.caddy.virtualHosts.${domain}.extraConfig = '' - encode zstd gzip - reverse_proxy http://localhost:${builtins.toString port} - ''; - - age.secrets.forgejoRunnerToken.file = "${inputs.self}/secrets/forgejoRunnerToken.age"; - services.gitea-actions-runner = { - package = pkgs.unstable.forgejo-runner; - instances.default = { - enable = true; - name = "monolith"; - url = "https://${domain}"; - tokenFile = config.age.secrets.forgejoRunnerToken.path; - labels = [ - "ubuntu-latest:docker://node:20-bookworm" - "ubuntu-22.04:docker://node:20-bookworm" - ]; - }; - }; -} diff --git a/modules/retired/kavita/default.nix b/modules/retired/kavita/default.nix deleted file mode 100644 index 893eaef..0000000 --- a/modules/retired/kavita/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ ... }: -let - directories = [ - "/opt/kavita" - ]; -in -{ - systemd.tmpfiles.rules = map (x: "d ${x} 0755 share share - -") directories; - virtualisation.oci-containers.containers.kavita = { - image = "jvmilazz0/kavita:latest"; - autoStart = true; - ports = [ - "5000:5000" - ]; - volumes = [ - "/opt/kavita/config:/kavita/config" - "/tank/media/library/Books:/books" - ]; - environment = { - TZ = "America/Detroit"; - }; - }; - - services.caddy.virtualHosts."library.tdback.net".extraConfig = '' - encode zstd gzip - reverse_proxy http://localhost:5000 - ''; -} diff --git a/modules/retired/mealie/default.nix b/modules/retired/mealie/default.nix deleted file mode 100644 index 2d869ce..0000000 --- a/modules/retired/mealie/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, pkgs, ... }: -let - domain = "toasted.brownbread.net"; -in -{ - services.mealie = { - enable = true; - package = pkgs.unstable.mealie; - settings = { - BASE_URL = domain; - DB_ENGINE = "sqlite"; - ALLOW_SIGNUP = "false"; - SECURITY_MAX_LOGIN_ATTEMPTS = 3; - TZ = "America/Detroit"; - }; - }; - - services.caddy.virtualHosts.${domain}.extraConfig = '' - encode zstd gzip - reverse_proxy http://localhost:${builtins.toString config.services.mealie.port} - ''; -} diff --git a/modules/retired/mumble/default.nix b/modules/retired/mumble/default.nix deleted file mode 100644 index fa08d64..0000000 --- a/modules/retired/mumble/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs, ... }: -{ - services.murmur = { - enable = true; - package = pkgs.murmur; - port = 64738; - openFirewall = true; - environmentFile = "/var/lib/murmur/murmurd.env"; - password = "$MURMURD_PASSWORD"; - }; -} diff --git a/modules/retired/navidrome/default.nix b/modules/retired/navidrome/default.nix deleted file mode 100644 index aeb8f18..0000000 --- a/modules/retired/navidrome/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ ... }: -let - directory = "/opt/navidrome"; -in -{ - systemd.tmpfiles.rules = builtins.map (x: "d ${x} 0755 share share - -") [ directory ]; - - virtualisation.oci-containers.containers.navidrome = { - image = "deluan/navidrome:latest"; - autoStart = true; - ports = [ - "4533:4533" - ]; - volumes = [ - "${directory}/data:/data" - "/tank/media/music:/music:ro" - ]; - environment = { - ND_SCANSCHEDULE = "1h"; - ND_LOGLEVEL = "info"; - ND_SESSIONTIMEOUT = "24h"; - ND_ENABLEUSEREDITING = "false"; - }; - }; - - services.caddy.virtualHosts."radioactive.brownbread.net".extraConfig = '' - encode zstd gzip - reverse_proxy http://localhost:4533 - ''; -} diff --git a/modules/retired/pihole/default.nix b/modules/retired/pihole/default.nix deleted file mode 100644 index 3a95f8a..0000000 --- a/modules/retired/pihole/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ - inputs, - config, - ... -}: -let - ip = "10.0.0.203"; - interface = "eno1"; - directory = "/opt/pihole"; -in -{ - systemd.tmpfiles.rules = builtins.map (x: "d ${x} 0755 share share - -") [ directory ]; - - virtualisation.oci-containers.containers.pihole = { - image = "pihole/pihole:latest"; - autoStart = true; - ports = [ - "53:53/udp" - "53:53/tcp" - "80:80/tcp" - ]; - volumes = [ - "${directory}/etc:/etc/pihole" - "${directory}/etc-dnsmasq.d:/etc/dnsmasq.d" - ]; - environment = { - TZ = "America/Detroit"; - FTLCONF_LOCAL_IPV4 = ip; - INTERFACE = interface; - }; - extraOptions = [ "--network=host" ]; - }; - - age.secrets.piholeAdminPass = { - file = "${inputs.self}/secrets/piholeAdminPass.age"; - mode = "770"; - owner = "share"; - group = "share"; - }; - - systemd.services.podman-pihole.postStart = - let - password = config.age.secrets.piholeAdminPass.path; - in - '' - podman exec -it pihole pihole -a -p "$(tr -d '\n' < ${password})" - ''; - - networking.firewall = { - allowedTCPPorts = [ - 53 - 80 - ]; - allowedUDPPorts = [ 53 ]; - }; -} diff --git a/modules/retired/stirling-pdf/default.nix b/modules/retired/stirling-pdf/default.nix deleted file mode 100644 index 904fd6d..0000000 --- a/modules/retired/stirling-pdf/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ ... }: -let - directories = [ - "/opt/stirling" - ]; -in -{ - systemd.tmpfiles.rules = map (x: "d ${x} 0755 share share - -") directories; - virtualisation.oci-containers.containers.pdf-tools = { - image = "frooodle/s-pdf:latest"; - autoStart = true; - ports = [ - "8060:8080" - ]; - volumes = [ - "/opt/stirling/training-data:/usr/share/tesseract-ocr/4.00/tessdata" - "/opt/stirling/configs:/configs" - ]; - environment = { - DOCKER_ENABLE_SECURITY = "false"; - }; - }; -} diff --git a/modules/retired/x11/default.nix b/modules/retired/x11/default.nix deleted file mode 100644 index 52e7975..0000000 --- a/modules/retired/x11/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ pkgs, ... }: -{ - services = { - xserver = { - enable = true; - xkb.layout = "us"; - displayManager.lightdm.enable = true; - windowManager.bspwm.enable = true; - }; - - displayManager.autoLogin = { - enable = true; - user = "tdback"; - }; - }; - - hardware.graphics.enable32Bit = true; - - environment.systemPackages = with pkgs.xorg; [ - libX11 - xset - ]; - - fonts.packages = with pkgs; [ - dejavu_fonts - dina-font - iosevka-comfy.comfy-motion-fixed - liberation_ttf - noto-fonts - noto-fonts-emoji - ubuntu_font_family - ]; -} diff --git a/modules/retired/xonotic/default.nix b/modules/retired/xonotic/default.nix deleted file mode 100644 index 7ae5442..0000000 --- a/modules/retired/xonotic/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ pkgs, ... }: -{ - services.xonotic = { - enable = true; - package = pkgs.xonotic-dedicated; - openFirewall = true; - settings = { - hostname = "tdback's Xonotic Server"; - net_address = "0.0.0.0"; - port = 26000; - sv_motd = "GLHF! Please report any issues to @tdback on irc.libera.chat"; - - # Specify bots and player count. - maxplayers = 8; - minplayers = 4; - minplayers_per_team = 2; - - # Configure mutators. - g_instagib = 0; - g_grappling_hook = 1; - g_jetpack = 0; - g_vampire = 0; - }; - }; -} diff --git a/users/tdback/modules/retired/alacritty/default.nix b/users/tdback/modules/retired/alacritty/default.nix deleted file mode 100644 index a18239a..0000000 --- a/users/tdback/modules/retired/alacritty/default.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ pkgs, ... }: -{ - programs.alacritty = { - enable = true; - package = pkgs.unstable.alacritty; - settings = { - env.TERM = "xterm-256color"; - mouse.hide_when_typing = true; - scrolling.history = 10000; - window = { - decorations = "None"; - opacity = 1.0; - title = "Alacritty"; - padding.x = 4; - }; - cursor.style.blinking = "Never"; - font = { - size = 14.0; - normal = { - family = "Iosevka Comfy Motion Fixed"; - style = "Regular"; - }; - italic = { - family = "Iosevka Comfy Motion Fixed"; - style = "Italic"; - }; - bold = { - family = "Iosevka Comfy Motion Fixed"; - style = "Bold"; - }; - bold_italic = { - family = "Iosevka Comfy Motion Fixed"; - style = "Bold Italic"; - }; - }; - # Tomorrow Night Bright colorscheme. - colors = { - draw_bold_text_with_bright_colors = true; - primary = { - background = "#000000"; - foreground = "#eaeaea"; - }; - normal = { - black = "#000000"; - red = "#d54e53"; - green = "#b9ca4a"; - yellow = "#e6c547"; - blue = "#7aa6da"; - magenta = "#c397d8"; - cyan = "#70c0ba"; - white = "#424242"; - }; - bright = { - black = "#666666"; - red = "#ff3334"; - green = "#9ec400"; - yellow = "#e7c547"; - blue = "#7aa6da"; - magenta = "#b77ee0"; - cyan = "#54ced6"; - white = "#2a2a2a"; - }; - }; - }; - }; -} diff --git a/users/tdback/modules/retired/dunst/default.nix b/users/tdback/modules/retired/dunst/default.nix deleted file mode 100644 index 4b52def..0000000 --- a/users/tdback/modules/retired/dunst/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, ... }: -{ - services.dunst = { - enable = true; - package = pkgs.unstable.dunst; - settings = { - global = { - width = 300; - height = 300; - offset = "30x50"; - origin = "top-right"; - frame_color = "#2c363c"; - font = "Iosevka Comfy Motion Fixed 12"; - }; - urgency_normal = { - background = "#37474f"; - foreground = "eceff1"; - timeout = 5; - }; - }; - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.papirus-icon-theme; - size = "16x16"; - }; - }; -} diff --git a/users/tdback/modules/retired/polybar/default.nix b/users/tdback/modules/retired/polybar/default.nix deleted file mode 100644 index 14e9425..0000000 --- a/users/tdback/modules/retired/polybar/default.nix +++ /dev/null @@ -1,112 +0,0 @@ -{ lib, pkgs, ... }: -{ - services.polybar = { - enable = true; - package = pkgs.unstable.polybar.override { pulseSupport = true; }; - script = "polybar main &"; - settings = - let - colors = { - alert = "#505050"; - foreground = "#F1F1F1"; - background = "#050505"; - background-alt = "#373B41"; - }; - in - { - "bar/main" = { - bottom = true; - width = "100%"; - height = "16pt"; - line.size = "3pt"; - font = [ "Iosevka Comfy Motion Fixed:size=8" ]; - - foreground = "${colors.foreground}"; - background = "${colors.background}"; - - separator = "|"; - padding = { - left = 1; - right = 1; - }; - - module.margin = 1; - modules = { - left = "bspwm"; - center = "time"; - right = "volume cpu memory date"; - }; - - wm.restack = "bspwm"; - cursor.click = "pointer"; - }; - - "module/bspwm" = { - type = "internal/bspwm"; - pin.workspaces = true; - label = { - focused = { - text = "%index%"; - foreground = "${colors.foreground}"; - padding = 1; - }; - occupied = { - text = "%index%"; - foreground = "${colors.alert}"; - padding = 1; - }; - urgent = { - text = "%index%"; - foreground = "${colors.foreground}"; - background = "${colors.background-alt}"; - padding = 1; - }; - empty.text = ""; - }; - }; - - "module/cpu" = { - type = "internal/cpu"; - interval = 3; - label = "CPU %percentage%%"; - }; - - "module/memory" = { - type = "internal/memory"; - interval = 3; - label = "RAM %percentage_used%%"; - }; - - "module/volume" = { - type = "internal/pulseaudio"; - label = { - volume = "VOL %percentage%%"; - muted = "VOL 0%"; - }; - click.right = "${lib.getExe pkgs.pavucontrol}"; - }; - - "module/time" = { - type = "internal/date"; - interval = 1; - label = "%time%"; - time = "%H:%M"; - }; - - "module/date" = { - type = "internal/date"; - interval = 1; - label = "%date%"; - date = "%m.%d.%Y"; - }; - - "settings" = { - screenchange.reload = true; - pseudo.transparency = true; - }; - }; - }; - - # Make sure polybar starts only during graphical sessions. - systemd.user.services.polybar.Install.WantedBy = [ "graphical-session.target" ]; -} diff --git a/users/tdback/modules/retired/rofi/default.nix b/users/tdback/modules/retired/rofi/default.nix deleted file mode 100644 index 4399265..0000000 --- a/users/tdback/modules/retired/rofi/default.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ config, pkgs, ... }: -{ - programs.rofi = { - enable = true; - package = pkgs.unstable.rofi; - font = "Iosevka Comfy Motion Fixed 12"; - location = "center"; - extraConfig = { - modi = "window,run,drun"; - icon-theme = "Papirus"; - show-icons = true; - display-drun = ""; - display-window = ""; - drun-display-format = "{icon} {name}"; - }; - theme = - let - inherit (config.lib.formats.rasi) mkLiteral; - in - { - "*" = { - bg = mkLiteral "#050505"; - bg-alt = mkLiteral "#191919"; - fg = mkLiteral "#FFFFFF"; - fg-alt = mkLiteral "#787c99"; - background-color = mkLiteral "@bg"; - border = 0; - margin = 0; - padding = 0; - spacing = 0; - }; - - "window" = { - width = mkLiteral "40%"; - }; - - "element" = { - padding = 12; - text-color = mkLiteral "@fg-alt"; - }; - - "element selected" = { - text-color = mkLiteral "@fg"; - }; - - "element-text" = { - background-color = mkLiteral "inherit"; - text-color = mkLiteral "inherit"; - vertical-align = mkLiteral "0.5"; - }; - - "element-icon" = { - size = 38; - }; - - "entry" = { - background-color = mkLiteral "@bg-alt"; - text-color = mkLiteral "@fg"; - padding = 14; - placeholder = "Search..."; - }; - - "inputbar" = { - children = map mkLiteral [ - "prompt" - "entry" - ]; - }; - - "listview" = { - columns = 2; - lines = 6; - background-color = mkLiteral "@bg"; - }; - - "prompt" = { - enabled = true; - background-color = mkLiteral "@bg-alt"; - text-color = mkLiteral "@fg"; - padding = mkLiteral "14 10 0 14"; - }; - }; - }; -} diff --git a/users/tdback/modules/retired/x11/default.nix b/users/tdback/modules/retired/x11/default.nix deleted file mode 100644 index 13fe1fc..0000000 --- a/users/tdback/modules/retired/x11/default.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ lib, pkgs, ... }: -{ - xsession.windowManager.bspwm = { - enable = true; - package = pkgs.unstable.bspwm; - settings = - let - color = "#3B4252"; - in - { - window_gap = 0; - top_padding = 0; - bottom_padding = 0; - right_padding = 0; - left_padding = 0; - top_monocle_padding = 0; - bottom_monocle_padding = 0; - right_monocle_padding = 0; - left_monocle_padding = 0; - split_ratio = 0.5; - borderless_monocle = true; - gapless_monocle = true; - normal_border_color = color; - active_border_color = color; - focused_border_color = color; - }; - - rules = { - "Zathura".state = "tiled"; - }; - - startupPrograms = [ - "${lib.getExe pkgs.unstable.xorg.setxkbmap} -layout us" - "${lib.getExe pkgs.unstable.xorg.xsetroot} -cursor_name left_ptr" - "${lib.getExe pkgs.unstable.xorg.xset} r rate 350 40" - "~/.fehbg" - ]; - - extraConfig = '' - ${lib.getExe' pkgs.unstable.bspwm "bspc"} monitor -d 1 2 3 4 5 6 7 8 9 - ''; - }; - - services.sxhkd = - let - bspc = lib.getExe' pkgs.unstable.bspwm "bspc"; - in - { - enable = true; - package = pkgs.unstable.sxhkd; - keybindings = { - # Program hotkeys. - "alt + Tab" = "${lib.getExe pkgs.unstable.rofi} -show window"; - "super + r" = "${lib.getExe pkgs.unstable.rofi} -show drun"; - "super + x" = "${lib.getExe pkgs.unstable.alacritty}"; - "super + b" = "$BROWSER"; - "super + p" = "${lib.getExe pkgs.unstable.flameshot} full -p $HOME/.local/screenshots"; - "super + shift + p" = "${lib.getExe pkgs.unstable.flameshot} gui -p $HOME/.local/screenshots"; - "super + Escape" = "systemctl --user restart polybar"; - "super + alt + {q,r}" = "${bspc} {quit,wm -r}"; - - # Function hotkeys. - "XF86AudioPrev" = "${lib.getExe pkgs.unstable.mpc} prev"; - "XF86AudioNext" = "${lib.getExe pkgs.unstable.mpc} next"; - "XF86AudioPlay" = "${lib.getExe pkgs.unstable.mpc} toggle"; - "XF86AudioLowerVolume" = "${lib.getExe pkgs.unstable.pamixer} -d 5"; - "XF86AudioRaiseVolume" = "${lib.getExe pkgs.unstable.pamixer} -i 5"; - "XF86AudioMute" = "${lib.getExe pkgs.pamixer} -t"; - - # Manipulate window manager. - "super + q" = "${bspc} node -{c,k}"; - "super + f" = "${bspc} node focused.tiled -t fullscreen"; - "super + t" = "${bspc} node focused.fullscreen -t tiled"; - "super + shift + f" = "${bspc} node focused.tiled -t floating"; - "super + shift + t" = "${bspc} node focused.floating -t tiled"; - "super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}"; - "super + {_,shift}c" = "${bspc} node -f {next,prev}.local.!hidden.window"; - "super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local"; - "super + {grave,Tab}" = "${bspc} {node,desktop} -f last"; - "super + {o,i}" = "${bspc} wm -h off; ${bspc} node {older,newer} -f; ${bspc} wm -h on"; - "super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f, node -d} '^{1-9,10}'"; - "super + alt + {h,j,k,l}" = "${bspc} node -z {left -20 0, bottom 0 20, top 0 -20, right 20 0}"; - "super + alt + shift {h,j,k,l}" = - "${bspc} node -z {right -20 0, top 0 20, bottom 0 -20, left 20 0}"; - "super + {Left,Down,Up,Right}" = "${bspc} node -v {-20 0,0 20,0 -20,20 0}"; - }; - }; - - # Generate X11 init scripts. - home.file = { - ".xinitrc".text = '' - [ -f ~/.xprofile ] && . ~/.xprofile - [ -f ~/.Xresources ] && ${lib.getExe pkgs.unstable.xorg.xrdb} -merge ~/.Xresources - exec ${lib.getExe' pkgs.unstable.bspwm "bspwm"} - ''; - ".xprofile".text = '' - ${lib.getExe pkgs.unstable.xorg.xrandr} --output DP-0 --primary --mode 1920x1080 --rotate normal --rate 165 - ''; - ".Xresources".text = '' - Xcursor.size: 24 - ''; - }; -} -- cgit v1.2.3