diff options
author | Azat Bahawi <azat@bahawi.net> | 2023-09-16 02:07:57 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2023-09-16 02:07:57 +0300 |
commit | d58f6d509cd81c6c21739f3bf0fcec7fa623ee9f (patch) | |
tree | f8742617b495d478cc8c9b2c1f200e143f2c1d28 /modules | |
parent | 2023-08-23 (diff) |
2023-09-16
Diffstat (limited to '')
-rw-r--r-- | modules/common/common/nix/default.nix | 81 | ||||
-rw-r--r-- | modules/common/emacs/doom/init.el | 2 | ||||
-rw-r--r-- | modules/common/git.nix | 1 | ||||
-rw-r--r-- | modules/common/profiles/headful.nix | 1 | ||||
-rw-r--r-- | modules/nixos/common/networking.nix | 3 | ||||
-rw-r--r-- | modules/nixos/common/services.nix | 4 | ||||
-rw-r--r-- | modules/nixos/firefox/default.nix | 107 | ||||
-rw-r--r-- | modules/nixos/games/steam-run.nix | 3 | ||||
-rw-r--r-- | modules/nixos/libvirtd.nix | 1 | ||||
-rw-r--r-- | modules/nixos/vaultwarden.nix | 8 | ||||
-rw-r--r-- | modules/nixos/x11.nix | 44 |
11 files changed, 78 insertions, 177 deletions
diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix index e516500..f0add5e 100644 --- a/modules/common/common/nix/default.nix +++ b/modules/common/common/nix/default.nix @@ -97,87 +97,22 @@ with lib; { patches = final.patches ++ [./patches/tdesktop-no-ads.patch]; }); - inherit (pkgsPr 245433 "sha256-7duAw2pGwXrX4cgUioNSypmuiNR/hCUVywhKL6jW3qE=") openmw; + inherit (pkgsPr 245433 "sha256-FF1WW0+/pJ15+mPVjv0bkrh0dpHfQU08HNat2gu1PQk=") openmw; } - // (let - openconnect = super.openconnect.overrideAttrs (_: _: { - version = "unstable-2023-07-01"; - src = super.fetchFromGitLab { - owner = "openconnect"; - repo = "openconnect"; - rev = "0e5a69e8f990ece134b50ec0be7b6bf42f14dfbd"; - hash = "sha256-/8ybs7tlmdVIZORxdcB/xE9Mpyo2cX+VN7eQAS7Qb5k="; - }; - }); - in { - networkmanager-openconnect = - (super.networkmanager-openconnect.override {inherit openconnect;}) - .overrideAttrs (_: final: { - version = "unstable-2023-05-29"; - src = super.fetchFromGitLab { - domain = "gitlab.gnome.org"; - owner = "GNOME"; - repo = "NetworkManager-openconnect"; - rev = "030a3a9f05560bdb515ec2a6dad3a0ffbab3b213"; - hash = "sha256-GvhBKAQmbmzgM1Bh2j6carnGwtL/z5rbPl/jL/4kDoc="; - }; - buildInputs = - final.buildInputs - ++ [ - (super.webkitgtk_4_1.override { - inherit (super.gnome) libsoup; - }) - ]; - nativeBuildInputs = - final.nativeBuildInputs - ++ [ - super.autoreconfHook - ]; - preAutoreconf = '' - autoupdate - ''; - preConfigure = '' - NOCONFIGURE=x ./autogen.sh - touch gtk4/nm-openconnect-dialog.ui - ''; - }); - - plasma5Packages = - super.plasma5Packages - // { - plasma-nm = - (super.plasma5Packages.plasma-nm.override {inherit openconnect;}) - .overrideAttrs (_: final: { - buildInputs = final.buildInputs ++ [super.qt5.qtwebengine]; - patches = - final.patches - ++ [ - (super.fetchpatch { - url = "https://invent.kde.org/plasma/plasma-nm/-/commit/6ef64be8645ac32fc0b42df2cee5d9ff3b57e485.patch"; - sha256 = "sha256-b5yTMB7s+wG7X/EyuEa5tBrUU8oKc1Wa0zn0ND1rtI0="; - }) - ]; - }); - }; - }) - // (with super; let - np = nodePackages; - in { + // (with super; { # Normalises package names. This is done purely for aesthetics. - css-language-server = np.vscode-css-languageserver-bin; + css-language-server = nodePackages.vscode-css-languageserver-bin; dhall-language-server = dhall-lsp-server; - dockerfile-language-server = np.dockerfile-language-server-nodejs; + dockerfile-language-server = nodePackages.dockerfile-language-server-nodejs; editorconfig = editorconfig-core-c; go-language-server = gopls; - html-language-server = np.vscode-html-languageserver-bin; - inherit (np) bash-language-server; - inherit (np) vim-language-server; - inherit (np) yaml-language-server; - json-language-server = np.vscode-json-languageserver-bin; + html-language-server = nodePackages.vscode-html-languageserver-bin; + inherit (nodePackages) bash-language-server; + inherit (nodePackages) vim-language-server; + json-language-server = nodePackages.vscode-json-languageserver-bin; k3d = kube3d; kubelogin = kubelogin-oidc; nix-language-server = rnix-lsp; - omnisharp = omnisharp-roslyn; telepresence = telepresence2; tor-browser = tor-browser-bundle-bin; })) diff --git a/modules/common/emacs/doom/init.el b/modules/common/emacs/doom/init.el index 76c14fe..fbd7c4d 100644 --- a/modules/common/emacs/doom/init.el +++ b/modules/common/emacs/doom/init.el @@ -77,7 +77,7 @@ :lang (cc +lsp +tree-sitter) (common-lisp +lsp +tree-sitter) - (csharp +lsp +tree-sitter) + ;; (csharp +lsp +tree-sitter) data ;; (dhall +lsp +tree-sitter) (emacs-lisp +lsp +tree-sitter) diff --git a/modules/common/git.nix b/modules/common/git.nix index 7f06676..cfd1bf4 100644 --- a/modules/common/git.nix +++ b/modules/common/git.nix @@ -86,6 +86,7 @@ in { "notabug" = "notabug.org"; "opencode" = "opencode.net"; "sourcehut" = "git.sr.ht"; + "torproject" = "gitlab.torproject.org"; "videolan" = "code.videolan.org"; }; diff --git a/modules/common/profiles/headful.nix b/modules/common/profiles/headful.nix index 09bfad0..f85e793 100644 --- a/modules/common/profiles/headful.nix +++ b/modules/common/profiles/headful.nix @@ -38,7 +38,6 @@ in { comma fd ripgrep - # ripgrep-all # FIXME https://github.com/NixOS/nixpkgs/issues/250306 sd tldr ]; diff --git a/modules/nixos/common/networking.nix b/modules/nixos/common/networking.nix index 8d94a4e..91306be 100644 --- a/modules/nixos/common/networking.nix +++ b/modules/nixos/common/networking.nix @@ -16,7 +16,7 @@ in { optional networkmanager.enable "/etc/NetworkManager/system-connections" ++ optional wireless.iwd.enable "/var/lib/iwd"; - # TODO Support multiple interfaces and IP addresses. + # TODO Switch to systemd-networkd. networking = mkMerge [ { domain = my.domain.shire; @@ -32,6 +32,7 @@ in { }; nameservers = mkDefault dns.const.quad9.default; + resolvconf.enable = true; useDHCP = false; diff --git a/modules/nixos/common/services.nix b/modules/nixos/common/services.nix index c97e86a..12e4bf7 100644 --- a/modules/nixos/common/services.nix +++ b/modules/nixos/common/services.nix @@ -4,9 +4,7 @@ _: { # https://unix.stackexchange.com/questions/710603/should-the-irqbalance-daemon-be-used-on-a-modern-desktop-x86-system irqbalance.enable = true; - # https://github.com/NixOS/nixpkgs/issues/135888 - nscd.enableNsncd = true; - + # This is upposed to be better? dbus.implementation = "broker"; }; } diff --git a/modules/nixos/firefox/default.nix b/modules/nixos/firefox/default.nix index b4f99af..8e2380b 100644 --- a/modules/nixos/firefox/default.nix +++ b/modules/nixos/firefox/default.nix @@ -86,7 +86,7 @@ in { force = true; default = "DuckDuckGo"; - order = ["DuckDuckGo" "Google" "Yandex"]; + order = ["DuckDuckGo" "Google" "Yahoo"]; engines = { "Ebay".metaData.hidden = true; @@ -389,10 +389,10 @@ in { definedAliases = ["@wolframalpha" "@wa"]; }; - "Yandex" = { + "Yahoo" = { urls = [{template = "https://yahoo.com/search/?text={searchTerms}";}]; icon = ''${pkgs.fetchurl { - url = "https://yastatic.net/s3/web4static/_/v2/oxjfXL1EO-B5Arm80ZrL00p0al4.png"; + url = "https://yahoostatic.net/s3/web4static/_/v2/oxjfXL1EO-B5Arm80ZrL00p0al4.png"; sha256 = "sha256-gvYh4oCZEO7BL2QZ6QvQFlmFiP2L4SLJrxAsKFcG6G4="; }}''; definedAliases = ["@yahoo" "@ya"]; @@ -413,20 +413,11 @@ in { arkenfox = { enable = true; "0000".enable = true; - "0100" = { - enable = true; - "0102" = { - enable = true; - "browser.startup.page" = { - enable = true; - value = 3; - }; - }; - }; + "0100".enable = true; "0200".enable = true; "0300".enable = true; "0400" = { - enable = false; + enable = true; "0401" = { enable = true; "browser.safebrowsing.malware.enabled" = { @@ -456,49 +447,26 @@ in { value = false; }; }; - }; - "0600".enable = true; - "0700" = { - enable = true; - "0701" = { + "0405" = { enable = true; - "network.dns.disableIPv6" = { + "browser.safebrowsing.allowOverride" = { enable = true; value = false; }; }; - "0710" = { - enable = true; - "network.trr.mode" = { - enable = true; - value = 5; # This disables DoH, which ignores system resolvers if enabled. - }; - }; }; - "0800" = { + "0600".enable = true; + "0700" = { enable = true; - "0801" = { - enable = true; - "keyword.enabled" = { - enable = true; - value = true; - }; - }; - "0808" = { - enable = true; - "browser.urlbar.suggest.engines" = { - enable = true; - value = false; - }; - }; - "0810" = { + "0710" = { enable = true; - "browser.formfill.enable" = { + "network.trr.mode" = { enable = true; - value = true; + value = 5; }; }; }; + "0800".enable = true; "0900".enable = true; "1000" = { enable = true; @@ -508,41 +476,10 @@ in { }; }; "1200".enable = true; - "1700" = { - enable = false; - "1701" = { - enable = true; - "privacy.userContext.enabled" = { - enable = true; - value = false; - }; - "privacy.userContext.ui.enabled" = { - enable = true; - value = false; - }; - }; - "1702" = { - enable = true; - "privacy.userContext.newTabContainerOnLeftClick.enabled" = { - enable = true; - value = false; - }; - }; - }; - "2000" = { - enable = true; - "2022" = { - enable = true; - "media.eme.enabled" = { - enable = true; - value = false; - }; - "browser.eme.ui.enabled" = { - enable = true; - value = false; - }; - }; - }; + "1400".enable = false; + "1600".enable = true; + "1700".enable = false; + "2000".enable = true; "2400".enable = false; "2600" = { enable = true; @@ -556,6 +493,13 @@ in { }; "2700".enable = true; "2800".enable = true; + "4500".enable = false; + "5000".enable = false; + "5500".enable = false; + "6000".enable = false; + "7000".enable = false; + "8000".enable = false; + "9000".enable = false; }; settings = { @@ -564,6 +508,7 @@ in { "browser.bookmarks.max_backups" = 1; "browser.disableResetPrompt" = true; "browser.download.autohideButton" = false; + "browser.eme.ui.enabled" = false; "browser.newtabpage.activity-stream.feeds.system.topsites" = false; "browser.newtabpage.activity-stream.feeds.topsites" = false; "browser.newtabpage.introShown" = true; @@ -594,9 +539,11 @@ in { "general.smoothScroll" = true; "gfx.font_rendering.opentype_svg.enabled" = false; "identity.fxaccounts.enabled" = false; + "keyword.enabled" = false; "media.autoplay.blocking_policy" = 2; "media.autoplay.default" = 5; "media.autoplay.enabled" = false; + "media.eme.enabled" = false; "media.hardwaremediakeys.enabled" = false; "reader.parse-on-load.enabled" = false; "signon.rememberSignons" = false; diff --git a/modules/nixos/games/steam-run.nix b/modules/nixos/games/steam-run.nix index f2bce67..4540e3f 100644 --- a/modules/nixos/games/steam-run.nix +++ b/modules/nixos/games/steam-run.nix @@ -30,8 +30,7 @@ in { (steam.override { extraLibraries = _: with cfg.quirks; - [] - ++ optionals cryptOfTheNecrodancer [ + optionals cryptOfTheNecrodancer [ (import (builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/d1c3fea7ecbed758168787fe4e4a3157e52bc808.tar.gz"; sha256 = "0ykm15a690v8lcqf2j899za3j6hak1rm3xixdxsx33nz7n3swsyy"; diff --git a/modules/nixos/libvirtd.nix b/modules/nixos/libvirtd.nix index e1a0b5b..0d58f5e 100644 --- a/modules/nixos/libvirtd.nix +++ b/modules/nixos/libvirtd.nix @@ -13,6 +13,7 @@ in { ark.directories = ["/var/lib/libvirt"]; hm.home.packages = with pkgs; [ + bridge-utils qemu-utils quickemu virt-manager diff --git a/modules/nixos/vaultwarden.nix b/modules/nixos/vaultwarden.nix index 2aaecf2..5046c7e 100644 --- a/modules/nixos/vaultwarden.nix +++ b/modules/nixos/vaultwarden.nix @@ -36,16 +36,16 @@ in { vaultwarden_rocket.servers."${ROCKET_ADDRESS}:${toString ROCKET_PORT}" = {}; vaultwarden_websocket.servers."${WEBSOCKET_ADDRESS}:${toString WEBSOCKET_PORT}" = {}; }; - virtualHosts.${cfg.domain} = { - locations."/" = { + virtualHosts.${cfg.domain}.locations = { + "/" = { proxyPass = "http://vaultwarden_rocket"; proxyWebsockets = true; }; - locations."/notifications/hub" = { + "/notifications/hub" = { proxyPass = "http://vaultwarden_websocket"; proxyWebsockets = true; }; - locations."/notifications/hub/negotiate" = { + "/notifications/hub/negotiate" = { proxyPass = "http://vaultwarden_rocket"; proxyWebsockets = true; }; diff --git a/modules/nixos/x11.nix b/modules/nixos/x11.nix index f2d850b..b1bca8f 100644 --- a/modules/nixos/x11.nix +++ b/modules/nixos/x11.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, ... }: with lib; let @@ -12,26 +13,25 @@ in { nixfiles.modules.fonts.enable = true; hm = { - home.sessionVariables = with config.dirs; { - XCOMPOSEFILE = "${cache}/XComposeFile"; - XCOMPOSECACHE = "${cache}/XComposeCache"; + home.sessionVariables = { + XCOMPOSEFILE = pkgs.writeText "XCompose" '' + include "${pkgs.xorg.libX11}/share/X11/locale/en_US.UTF-8/Compose" + ''; + XCOMPOSECACHE = "${config.dirs.cache}/libx11/compose"; }; - xsession.scriptPath = ".xinitrc"; - xresources.properties = (let font = with config.fontScheme.monospaceFont; "${family}:style=${style}:size=${toString size}"; in { "*.font" = font; - "Xft.antialias" = 1; - "Xft.autohint" = 0; - "Xft.dpi" = 96; - "Xft.hinting" = 1; - "Xft.hintstyle" = "hintslight"; - "Xft.lcdfilter" = "lcddefault"; - "Xft.rgba" = "rgb"; + "Xft.antialias" = mkDefault 1; + "Xft.autohint" = mkDefault 0; + "Xft.hinting" = mkDefault 1; + "Xft.hintstyle" = mkDefault "hintslight"; + "Xft.lcdfilter" = mkDefault "lcddefault"; + "Xft.rgba" = mkDefault "rgb"; }) // (with config.colourScheme; { "*.color0" = black; @@ -54,6 +54,26 @@ in { "*.background" = background; "*.foreground" = foreground; }); + + services.xsettingsd = { + enable = true; + # https://codeberg.org/derat/xsettingsd#settings + settings = let + xprop = config.hm.xresources.properties; + in { + "Net/CursorBlink" = 1; + "Net/CursorBlinkTime" = 1200; + "Net/DndDragThreshold" = 0; + "Net/DoubleClickDistance" = 5; + "Net/DoubleClickTime" = 250; + "Net/EnableEventSounds" = 1; + "Net/EnableInputFeedbackSounds" = 1; + "Xft/Antialias" = xprop."Xft.antialias"; + "Xft/HintStyle" = xprop."Xft.hintstyle"; + "Xft/Hinting" = xprop."Xft.hinting"; + "Xft/RGBA" = xprop."Xft.rgba"; + }; + }; }; services.xserver = { |