diff options
Diffstat (limited to '')
-rw-r--r-- | flake.lock | 122 | ||||
-rw-r--r-- | flake.nix | 25 | ||||
-rw-r--r-- | modules/darwin/emacs.nix | 8 | ||||
-rw-r--r-- | modules/nixfiles/common/nix/default.nix | 5 | ||||
-rw-r--r-- | modules/nixfiles/discord.nix | 22 | ||||
-rw-r--r-- | modules/nixfiles/emacs/default.nix | 4 | ||||
-rw-r--r-- | modules/nixfiles/emacs/doom/init.el | 26 | ||||
-rw-r--r-- | modules/nixos/common/networking.nix | 186 | ||||
-rw-r--r-- | modules/nixos/common/nix.nix | 3 | ||||
-rw-r--r-- | modules/nixos/discord.nix | 2 | ||||
-rw-r--r-- | modules/nixos/emacs.nix | 2 | ||||
-rw-r--r-- | modules/nixos/games/minecraft.nix | 4 | ||||
-rw-r--r-- | modules/nixos/libvirtd.nix | 8 | ||||
-rw-r--r-- | modules/nixos/matrix/default.nix | 8 | ||||
-rw-r--r-- | modules/nixos/profiles/dev/default.nix | 4 | ||||
-rw-r--r-- | modules/nixos/profiles/headful.nix | 5 | ||||
-rw-r--r-- | nixosConfigurations/default.nix | 1 | ||||
-rw-r--r-- | nixosConfigurations/eonwe/default.nix | 49 | ||||
-rw-r--r-- | nixosConfigurations/iso/default.nix | 3 | ||||
-rw-r--r-- | nixosConfigurations/manwe/default.nix | 4 | ||||
-rw-r--r-- | nixosConfigurations/melian/default.nix | 34 | ||||
-rw-r--r-- | nixosConfigurations/varda/default.nix | 4 | ||||
-rw-r--r-- | nixosConfigurations/yavanna/default.nix | 16 |
23 files changed, 305 insertions, 240 deletions
diff --git a/flake.lock b/flake.lock index 6d8862f..17afe17 100644 --- a/flake.lock +++ b/flake.lock @@ -299,11 +299,11 @@ ] }, "locked": { - "lastModified": 1671049694, - "narHash": "sha256-APJajoa7Q4i8LFOHoiyU3G5nJ3Xv2IiI2qY9i0pJnlw=", + "lastModified": 1672673185, + "narHash": "sha256-wnEJOjhwgoSHFnBQfGHkPefuUSvTegRYed6BUOguk9g=", "owner": "dwarfmaster", "repo": "arkenfox-nixos", - "rev": "99028aef3e9dfa3dc44e51e0d7296cf93d910af8", + "rev": "b46b140fe8631e4bc26f80d04477691df2d84af2", "type": "github" }, "original": { @@ -353,11 +353,11 @@ ] }, "locked": { - "lastModified": 1671196037, - "narHash": "sha256-2+J98SeczFWonbqFLMEAQC7vZEe6I2gM17XYvEmG52I=", + "lastModified": 1672753581, + "narHash": "sha256-EIi2tqHoje5cE9WqH23ZghW28NOOWSUM7tcxKE1U9KI=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "adb8ac0453c8b2c40f5bffb578453dbaee838952", + "rev": "3db1d870b04b13411f56ab1a50cd32b001f56433", "type": "github" }, "original": { @@ -434,11 +434,11 @@ ] }, "locked": { - "lastModified": 1671268121, - "narHash": "sha256-LIOLFw5m2mYDjMo7eBB/cxYjhEqBnvQ8dpZvTjR6+Lo=", + "lastModified": 1672852603, + "narHash": "sha256-i5QlHEHG/T4Pp150a6cZe76EcgW/IePPiaRGcIyTBrE=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "249d14bdd55995eea2e0c9cfed8a230525faebde", + "rev": "ed0045366fc3bcc7ecd3dccdbf66c2cfa979fe18", "type": "github" }, "original": { @@ -642,11 +642,11 @@ ] }, "locked": { - "lastModified": 1671209729, - "narHash": "sha256-zxn1eA/rMi2DOx43V7q87bGaDzvL7CMVY/Ti7lJ92DQ=", + "lastModified": 1672780900, + "narHash": "sha256-DxuSn6BdkZapIbg76xzYx1KhVPEZeBexMkt1q/sMVPA=", "owner": "nix-community", "repo": "home-manager", - "rev": "7d55a72d4c1df694e87a41a7e6c9a7b6e9a40ca3", + "rev": "54245e1820caabd8a0b53ce4d47e4d0fefe04cd4", "type": "github" }, "original": { @@ -656,6 +656,22 @@ "type": "github" } }, + "libnbtplusplus": { + "flake": false, + "locked": { + "lastModified": 1650031308, + "narHash": "sha256-TvVOjkUobYJD9itQYueELJX3wmecvEdCbJ0FinW2mL4=", + "owner": "PrismLauncher", + "repo": "libnbtplusplus", + "rev": "2203af7eeb48c45398139b583615134efd8d407f", + "type": "github" + }, + "original": { + "owner": "PrismLauncher", + "repo": "libnbtplusplus", + "type": "github" + } + }, "master": { "flake": false, "locked": { @@ -709,11 +725,11 @@ "ws-butler": "ws-butler" }, "locked": { - "lastModified": 1671154105, - "narHash": "sha256-OI6M2/Kcd1bJuodxV6rV5KtDJMUeewsqKy1B2PLNVys=", + "lastModified": 1671758850, + "narHash": "sha256-B6us/CLIIPJRJgjn/hVp7N07j90kil4HmjUVj8TBhKE=", "owner": "nix-community", "repo": "nix-doom-emacs", - "rev": "2150fd40b2110bbd11dcb62fa5f307ec345b0fb0", + "rev": "85a48dbec84e9c26785b58fecdefa1cfc580aea7", "type": "github" }, "original": { @@ -741,11 +757,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1671228065, - "narHash": "sha256-Az/ig9LVL5xdqtyl4/CVKJIH1G7sP/9Ott2XnNyie0E=", + "lastModified": 1672644464, + "narHash": "sha256-RYlvRMcQNT7FDoDkViijQBHg9g+blsB+U6AvL/gAsPI=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "e462a4baf75eeac639b4942481759de08a3bc94e", + "rev": "ca29e25c39b8e117d4d76a81f1e229824a9b3a26", "type": "github" }, "original": { @@ -757,11 +773,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1671249438, - "narHash": "sha256-5e+CcnbZA3/i2BRXbnzRS52Ly67MUNdZR+Zpbb2C65k=", + "lastModified": 1672756850, + "narHash": "sha256-Smbq3+fitwA13qsTMeaaurv09/KVbZfW7m7lINwzDGA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "067bfc6c90a301572cec7da48f09c447a9a8eae0", + "rev": "298add347c2bbce14020fcb54051f517c391196b", "type": "github" }, "original": { @@ -773,11 +789,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1671282610, - "narHash": "sha256-B8qHrJjsu2rv2BPlj7EkM0H+ZJvVucaiCOIp5191+xc=", + "lastModified": 1672874841, + "narHash": "sha256-CKr3mOiSYm8H5bg7q1hb0TE9tDHSmqZPNzVAfNmmazE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b43f29bdc27e3f14ba0416a2a8492a3f35e6cd58", + "rev": "62f7bf5a13149097694e84cff1e928a97a39741b", "type": "github" }, "original": { @@ -789,11 +805,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1671282711, - "narHash": "sha256-DJknmGMZPIMlJnLqP99A+dZiWOirRVeCZrQK8kn1nug=", + "lastModified": 1672844754, + "narHash": "sha256-o26WabuHABQsaHxxmIrR3AQRqDFUEdLckLXkVCpIjSU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8ac4d14fc64c39707e98421e84ed6a7160c06ecd", + "rev": "e9ade2c8240e00a4784fac282a502efff2786bdc", "type": "github" }, "original": { @@ -855,11 +871,11 @@ }, "nur": { "locked": { - "lastModified": 1671251299, - "narHash": "sha256-QFslNMb6xQdgEoHmbZ+YjyXysCPsiU2dOPpjWp68dYg=", + "lastModified": 1672875891, + "narHash": "sha256-5A4e/Uc6aWQmMsYnMOffLg766weMfCakxo2AnQXrJco=", "owner": "nix-community", "repo": "NUR", - "rev": "ca8e5a3c87bd533b1c0b0b4195b1191ad23c1c66", + "rev": "e14930ece703757a928cb62327d4157bb30a7a90", "type": "github" }, "original": { @@ -949,6 +965,31 @@ "type": "github" } }, + "pollymc": { + "inputs": { + "flake-compat": [ + "flake-compat" + ], + "libnbtplusplus": "libnbtplusplus", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1671576765, + "narHash": "sha256-L6o9OK560Tkkfj18y7SD10E9BewDqa73tDZ+N1DSn4A=", + "owner": "fn2006", + "repo": "PollyMC", + "rev": "689a653cc476241220a8758dcbbc3b197e2aa156", + "type": "github" + }, + "original": { + "owner": "fn2006", + "ref": "6.1", + "repo": "PollyMC", + "type": "github" + } + }, "pre-commit-hooks": { "inputs": { "flake-compat": [ @@ -966,11 +1007,11 @@ ] }, "locked": { - "lastModified": 1671180323, - "narHash": "sha256-qAE390OdYvzSMe58HLpoMZ7llPlp+zIy84pXPnuXqCo=", + "lastModified": 1672734157, + "narHash": "sha256-uwUBnv0bN1SO4QVIo8KUx/jxRYCy7cW8kzZa+Qsrw9k=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "a49fc91a606dbbb7a916c56bc09776fc67b5c121", + "rev": "d0ce0a861260493c6c21f16f59d25076f73cb931", "type": "github" }, "original": { @@ -1016,6 +1057,7 @@ "nmap-vulners": "nmap-vulners", "nmap-vulscan": "nmap-vulscan", "nur": "nur", + "pollymc": "pollymc", "pre-commit-hooks": "pre-commit-hooks", "simple-nixos-mailserver": "simple-nixos-mailserver", "xmonad-ng": "xmonad-ng" @@ -1043,7 +1085,7 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-22_05": [ + "nixpkgs-22_11": [ "nixpkgs-stable" ], "utils": [ @@ -1051,11 +1093,11 @@ ] }, "locked": { - "lastModified": 1669807829, - "narHash": "sha256-rgQ8MYV1UD4Ynw0wzfl9hatgsV5GV7X6eM6ioSPKzls=", + "lastModified": 1671659164, + "narHash": "sha256-DbpT+v1POwFOInbrDL+vMbYV3mVbTkMxmJ5j50QnOcA=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "694e7d34f60028f4877517e1c7c73c9527fad400", + "rev": "bc667fb6afc45f6cc2d118ab77658faf2227cffd", "type": "gitlab" }, "original": { @@ -1084,11 +1126,11 @@ "ts-fold": { "flake": false, "locked": { - "lastModified": 1670681486, - "narHash": "sha256-Ss1FWOq51+0FQpQWXPiSWHmNYU6NurUvI2wAjOGV/kA=", + "lastModified": 1671426601, + "narHash": "sha256-NrvSK+olbi4P+9q5KOomNHGgmrRtI9cW9ZqkdU4n0Sc=", "owner": "jcs-elpa", "repo": "ts-fold", - "rev": "85db0117ead108213cc2a4210f72746d8ad8d20a", + "rev": "a64f5252a66253852bef1c627cea9e39928e6392", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e5c1e17..ba845a4 100644 --- a/flake.nix +++ b/flake.nix @@ -109,6 +109,9 @@ # }; # }; + # NOTE This[1] is annoying. + # + # [1]: https://github.com/NixOS/nix/pull/6983#issuecomment-1234335417 # nix-minecraft-servers = { # type = "github"; # owner = "jyooru"; @@ -120,16 +123,16 @@ # }; # }; - # pollymc = { - # type = "github"; - # owner = "fn2006"; - # repo = "PollyMC"; - # ref = "5.2"; - # inputs = { - # flake-compat.follows = "flake-compat"; - # nixpkgs.follows = "nixpkgs"; - # }; - # }; + pollymc = { + type = "github"; + owner = "fn2006"; + repo = "PollyMC"; + ref = "6.1"; + inputs = { + flake-compat.follows = "flake-compat"; + nixpkgs.follows = "nixpkgs"; + }; + }; dns-nix = { type = "github"; @@ -148,7 +151,7 @@ repo = "nixos-mailserver"; ref = "master"; inputs = { - nixpkgs-22_05.follows = "nixpkgs-stable"; + nixpkgs-22_11.follows = "nixpkgs-stable"; nixpkgs.follows = "nixpkgs"; utils.follows = "flake-utils"; }; diff --git a/modules/darwin/emacs.nix b/modules/darwin/emacs.nix index 02bfb83..fd32276 100644 --- a/modules/darwin/emacs.nix +++ b/modules/darwin/emacs.nix @@ -7,9 +7,9 @@ with lib; let cfg = config.nixfiles.modules.emacs; in { config = mkIf cfg.enable { - # services.emacs = { - # enable = true; - # package = config.hm.programs.doom-emacs.package; - # }; + services.emacs = { + enable = false; # TODO Figure out how to use this. + inherit (config.hm.programs.doom-emacs) package; + }; }; } diff --git a/modules/nixfiles/common/nix/default.nix b/modules/nixfiles/common/nix/default.nix index aeb25bd..436ce15 100644 --- a/modules/nixfiles/common/nix/default.nix +++ b/modules/nixfiles/common/nix/default.nix @@ -29,14 +29,12 @@ with lib; { in { # https://github.com/NixOS/nix/blob/master/src/libutil/experimental-features.cc extraOptions = '' - max-jobs = auto warn-dirty = false flake-registry = ${inputs.flake-registry}/flake-registry.json extra-experimental-features = ca-derivations extra-experimental-features = flakes extra-experimental-features = nix-command extra-experimental-features = recursive-nix - keep-going = true keep-derivations = ${ if this.isHeadful then "true" @@ -120,9 +118,8 @@ with lib; { tor-browser = tor-browser-bundle-bin; })) emacs-overlay.overlay - # nil.overlays.default nur.overlay - # pollymc.overlay + # nil.overlays.default ]; environment.systemPackages = with pkgs; diff --git a/modules/nixfiles/discord.nix b/modules/nixfiles/discord.nix deleted file mode 100644 index 190b5fc..0000000 --- a/modules/nixfiles/discord.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.nixfiles.modules.discord; -in { - options.nixfiles.modules.discord.enable = - mkEnableOption "Steam runtime"; - - config = mkIf cfg.enable { - nixfiles.modules.common.nix.allowedUnfreePackages = ["discord"]; - - hm.home.packages = with pkgs; [ - (discord.override { - withOpenASAR = true; - }) - ]; - }; -} diff --git a/modules/nixfiles/emacs/default.nix b/modules/nixfiles/emacs/default.nix index 933a32e..499dd59 100644 --- a/modules/nixfiles/emacs/default.nix +++ b/modules/nixfiles/emacs/default.nix @@ -59,7 +59,7 @@ in { gotests # :lang go graphviz # :lang (org +roam2) :lang plantuml haskell-language-server # :lang (haskell +lsp) - haskellPackages.brittany # :lang haskell :editor format + # haskellPackages.brittany # :lang haskell :editor format # FIXME Dependency marked as broken. haskellPackages.cabal-fmt # :lang haskell :editor format haskellPackages.cabal-install # :lang haskell haskellPackages.hoogle # :lang haskell @@ -105,7 +105,7 @@ in { (setq custom-file (file-name-concat doom-emacs-dir "custom.el")) - Font must be set to n+2 because otherwise it looks too small. + ;; Font must be set to n+2 because otherwise it looks too small. (setq doom-font (font-spec :family "${config.fontScheme.monospaceFont.family}" :size ${toString (config.fontScheme.monospaceFont.size + 2)}) doom-unicode-font doom-font) diff --git a/modules/nixfiles/emacs/doom/init.el b/modules/nixfiles/emacs/doom/init.el index efb831e..4d7dd66 100644 --- a/modules/nixfiles/emacs/doom/init.el +++ b/modules/nixfiles/emacs/doom/init.el @@ -13,7 +13,7 @@ ;; doom-dashboard ;; doom-quit hl-todo - ;; indent-guides + indent-guides ;; ligatures ;; modeline ;; nav-flash @@ -25,7 +25,7 @@ (vc-gutter +diff-hl +pretty) window-select workspaces - ;; zen + zen :editor (evil +everywhere) @@ -58,10 +58,10 @@ ;; grammar :tools - ;; ansible + ansible (debugger +lsp) direnv - ;; (docker +lsp) + (docker +lsp) editorconfig (eval +overlay) (lookup +dictionary +offline) @@ -75,14 +75,15 @@ ;; upload :os - (tty +osc) + (:if IS-MAC macos) + ;; (tty +osc) :lang (cc +lsp +tree-sitter) - ;; (common-lisp +lsp +tree-sitter) - ;; (csharp +lsp +tree-sitter) + (common-lisp +lsp +tree-sitter) + (csharp +lsp +tree-sitter) data - ;; (dhall +lsp +tree-sitter) + (dhall +lsp +tree-sitter) (emacs-lisp +lsp +tree-sitter) (go +lsp +tree-sitter) ;; graphql @@ -90,17 +91,18 @@ (java +lsp +tree-sitter) (javascript +lsp +tree-sitter) json + (kotlin +lsp +tree-sitter) (latex +lsp +tree-sittter) - ;; (lua +lsp +tree-sitter) + (lua +lsp +tree-sitter) (markdown +lsp +tree-sitter) (nix +lsp) (org +pandoc +roam2) plantuml (python +lsp +tree-sitter) - ;; (racket +lsp +tree-sitter) + (racket +lsp +tree-sitter) ;; rst - ;; (rust +lsp +tree-sitter) - ;; (scheme +lsp +tree-sitter +racket) + (rust +lsp +tree-sitter) + (scheme +lsp +tree-sitter +racket) (sh +lsp +tree-sitter) web yaml diff --git a/modules/nixos/common/networking.nix b/modules/nixos/common/networking.nix index 6109933..0c44159 100644 --- a/modules/nixos/common/networking.nix +++ b/modules/nixos/common/networking.nix @@ -5,104 +5,118 @@ this, ... }: -with lib; { - # TODO Support multiple interfaces and IP addresses. - networking = mkMerge [ - { - domain = my.domain.shire; +with lib; let + cfg = config.nixfiles.modules.common.networking; +in { + options.nixfiles.modules.common.networking.onlyDefault = + mkEnableOption "custom networking settings"; - hostName = this.hostname; - hostId = substring 0 8 (builtins.hashString "md5" this.hostname); + config = mkIf (!cfg.onlyDefault) { + # TODO Support multiple interfaces and IP addresses. + networking = mkMerge [ + { + domain = my.domain.shire; - # Remove default hostname mappings. This is required at least by the current - # implementation of the montoring module. - hosts = { - "127.0.0.2" = mkForce []; - "::1" = mkForce []; - }; + hostName = this.hostname; + hostId = substring 0 8 (builtins.hashString "md5" this.hostname); - nameservers = mkDefault dns.const.quad9.default; + # Remove default hostname mappings. This is required at least by the current + # implementation of the montoring module. + hosts = { + "127.0.0.2" = mkForce []; + "::1" = mkForce []; + }; - useDHCP = false; + nameservers = mkDefault dns.const.quad9.default; - firewall = { - enable = true; + useDHCP = false; - rejectPackets = false; + firewall = { + enable = true; - allowPing = true; - pingLimit = "--limit 1/minute --limit-burst 5"; + rejectPackets = false; - logRefusedConnections = false; - logRefusedPackets = false; - logRefusedUnicastsOnly = false; - logReversePathDrops = false; - }; - } - (let - interface = "eth0"; # This assumes `usePredictableInterfaceNames` is false. - in - mkIf (hasAttr "ipv4" this && hasAttr "ipv6" this) { - usePredictableInterfaceNames = false; # NOTE This can break something! - interfaces.${interface} = { - ipv4.addresses = with this.ipv4; - optional (isString address && isInt prefixLength) { - inherit address prefixLength; - }; + allowPing = true; + pingLimit = "--limit 1/minute --limit-burst 5"; - ipv6.addresses = with this.ipv6; - optional (isString address && isInt prefixLength) { - inherit address prefixLength; - }; + logRefusedConnections = false; + logRefusedPackets = false; + logRefusedUnicastsOnly = false; + logReversePathDrops = false; }; - defaultGateway = with this.ipv4; - mkIf (isString gatewayAddress) { - inherit interface; - address = gatewayAddress; - }; - defaultGateway6 = with this.ipv6; - mkIf (isString gatewayAddress) { - inherit interface; - address = gatewayAddress; + } + (let + interface = "eth0"; # This assumes `usePredictableInterfaceNames` is false. + in + mkIf (hasAttr "ipv4" this && hasAttr "ipv6" this) { + usePredictableInterfaceNames = false; # NOTE This can break something! + interfaces.${interface} = { + ipv4.addresses = with this.ipv4; + optional (isString address && isInt prefixLength) { + inherit address prefixLength; + }; + + ipv6.addresses = with this.ipv6; + optional (isString address && isInt prefixLength) { + inherit address prefixLength; + }; }; - }) - (mkIf this.isHeadful { - interfaces = { - eth0.useDHCP = mkDefault true; - wlan0.useDHCP = mkDefault true; - }; + defaultGateway = with this.ipv4; + mkIf (isString gatewayAddress) { + inherit interface; + address = gatewayAddress; + }; + defaultGateway6 = with this.ipv6; + mkIf (isString gatewayAddress) { + inherit interface; + address = gatewayAddress; + }; + }) + (mkIf this.isHeadful { + interfaces = { + eth0.useDHCP = mkDefault true; + wlan0.useDHCP = mkDefault true; + }; - networkmanager = { - enable = mkDefault true; - wifi.backend = "iwd"; - }; + networkmanager = { + enable = mkDefault true; + wifi.backend = "iwd"; + }; - wireless = { - enable = false; - iwd.enable = mkDefault true; - userControlled.enable = true; - allowAuxiliaryImperativeNetworks = true; - }; - }) - ]; + wireless = { + enable = false; + iwd.enable = mkDefault true; + userControlled.enable = true; + allowAuxiliaryImperativeNetworks = true; + }; + }) + ]; - environment.shellAliases = listToAttrs (map - ({ - name, - value, - }: - nameValuePair name "${pkgs.iproute2}/bin/${value}") [ - { - name = "bridge"; - value = "bridge -color=always"; - } - { - name = "ip"; - value = "ip -color=always"; - } - { - name = "tc"; - value = "tc -color=always"; - } - ]); + environment = { + shellAliases = listToAttrs (map + ({ + name, + value, + }: + nameValuePair name "${pkgs.iproute2}/bin/${value}") [ + { + name = "bridge"; + value = "bridge -color=always"; + } + { + name = "ip"; + value = "ip -color=always"; + } + { + name = "tc"; + value = "tc -color=always"; + } + ]); + + systemPackages = with pkgs; [ + ethtool + nethogs + ]; + }; + }; } diff --git a/modules/nixos/common/nix.nix b/modules/nixos/common/nix.nix index 07136a0..71f62fd 100644 --- a/modules/nixos/common/nix.nix +++ b/modules/nixos/common/nix.nix @@ -22,8 +22,9 @@ in { overlays = with inputs; [ agenix.overlay - # nix-minecraft-servers.overlays.default + pollymc.overlay xmonad-ng.overlays.default + # nix-minecraft-servers.overlays.default ]; }; diff --git a/modules/nixos/discord.nix b/modules/nixos/discord.nix index 190b5fc..69ab525 100644 --- a/modules/nixos/discord.nix +++ b/modules/nixos/discord.nix @@ -15,7 +15,7 @@ in { hm.home.packages = with pkgs; [ (discord.override { - withOpenASAR = true; + withOpenASAR = false; # This doesnt work. }) ]; }; diff --git a/modules/nixos/emacs.nix b/modules/nixos/emacs.nix index 800d411..2db8120 100644 --- a/modules/nixos/emacs.nix +++ b/modules/nixos/emacs.nix @@ -17,7 +17,7 @@ in { nixfiles.modules.x11.enable = true; hm = { - programs.doom-emacs.extraConfig = '' + programs.doom-emacs.extraConfig = mkAfter '' (appendq! auth-sources '("${config.secrets.authinfo.path}")) ''; diff --git a/modules/nixos/games/minecraft.nix b/modules/nixos/games/minecraft.nix index e53f9eb..7b21195 100644 --- a/modules/nixos/games/minecraft.nix +++ b/modules/nixos/games/minecraft.nix @@ -22,7 +22,7 @@ in { config = mkMerge [ (mkIf cfg.client.enable { - hm.home.packages = with pkgs; [pollymc]; + hm.home.packages = with pkgs; [prismlauncher]; }) (mkIf cfg.server.enable { # Configurations, opslist, whitelist and plugins are managed imperatively. @@ -31,7 +31,7 @@ in { enable = true; eula = true; - package = pkgs.minecraftServers.purpur_1_19_2; + package = pkgs.minecraftServers.purpur_1_19_3; # TODO Make a PR fixing trailing whitespace on this. jvmOpts = diff --git a/modules/nixos/libvirtd.nix b/modules/nixos/libvirtd.nix index ae8b336..58dfc50 100644 --- a/modules/nixos/libvirtd.nix +++ b/modules/nixos/libvirtd.nix @@ -10,6 +10,12 @@ in { options.nixfiles.modules.libvirtd.enable = mkEnableOption "libvirtd"; config = mkIf cfg.enable { + hm.home.packages = with pkgs; [ + qemu-utils + quickemu + virt-manager + ]; + virtualisation.libvirtd = { enable = true; @@ -37,8 +43,6 @@ in { }; }; - environment.systemPackages = with pkgs; [virt-manager qemu-utils]; - my.extraGroups = ["libvirtd"]; }; } diff --git a/modules/nixos/matrix/default.nix b/modules/nixos/matrix/default.nix index bd221c4..879243e 100644 --- a/modules/nixos/matrix/default.nix +++ b/modules/nixos/matrix/default.nix @@ -1 +1,7 @@ -_: {imports = [./dendrite.nix ./element.nix ./synapse.nix];} +_: { + imports = [ + ./dendrite.nix + ./element.nix + ./synapse.nix + ]; +} diff --git a/modules/nixos/profiles/dev/default.nix b/modules/nixos/profiles/dev/default.nix index 83d41c0..8cb2356 100644 --- a/modules/nixos/profiles/dev/default.nix +++ b/modules/nixos/profiles/dev/default.nix @@ -8,6 +8,10 @@ with lib; let cfg = config.nixfiles.modules.profiles.dev.default; in { + imports = [ + ./containers.nix + ]; + config = mkIf cfg.enable { hm.home.language = { collate = "C"; diff --git a/modules/nixos/profiles/headful.nix b/modules/nixos/profiles/headful.nix index d15f004..2d37b47 100644 --- a/modules/nixos/profiles/headful.nix +++ b/modules/nixos/profiles/headful.nix @@ -77,10 +77,7 @@ in { psd.enable = true; }; - environment.systemPackages = with pkgs; [ - ethtool - nethogs - ]; + environment.systemPackages = with pkgs; [lm_sensors]; my.extraGroups = ["audio" "video" "input"]; }; diff --git a/nixosConfigurations/default.nix b/nixosConfigurations/default.nix index 1ca634a..fe998cd 100644 --- a/nixosConfigurations/default.nix +++ b/nixosConfigurations/default.nix @@ -69,6 +69,7 @@ in # A beefy desktop: 7950x/rx6750xt/128GB. eonwe.modules = with inputs; [ nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-cpu-amd-pstate nixos-hardware.nixosModules.common-gpu-amd nixos-hardware.nixosModules.common-pc-ssd nixpkgs.nixosModules.notDetected diff --git a/nixosConfigurations/eonwe/default.nix b/nixosConfigurations/eonwe/default.nix index a867837..f07aad3 100644 --- a/nixosConfigurations/eonwe/default.nix +++ b/nixosConfigurations/eonwe/default.nix @@ -15,6 +15,7 @@ with lib; { games = { lutris.enable = true; + minecraft.client.enable = true; steam.enable = true; }; android.enable = true; @@ -25,8 +26,12 @@ with lib; { }; hm.programs = { - firefox.profiles.default.settings."media.ffmpeg.vaapi.enabled" = true; + # NOTE This produces very poor performance even though RX 6750 XT should + # handle VA-API hardware decoding for all major formats (including AV1) just + # fine. + firefox.profiles.default.settings."media.ffmpeg.vaapi.enabled" = false; + # Mostly just placebo. :^) mpv.config = { hwdec = "vdpau"; vo = "gpu"; @@ -34,6 +39,15 @@ with lib; { }; }; + # Usually stuff that is going to be compiled on this machine is going to have + # parallelisation support enabled, so we will make sure that all cores are + # utilised and limit the job queue to one. + nix.extraOptions = '' + keep-going = true + max-jobs = 1 + cores = 32 + ''; + boot = { # Silence benign MCE errors: # ``` @@ -43,16 +57,26 @@ with lib; { # ``` kernelParams = ["mce=nobootlog"]; - initrd.availableKernelModules = [ - "ahci" - "nvme" - "sd_mod" - "usb_storage" - "usbhid" - "xhci_pci" - ]; + # The boot drive is Samsung SSD 980 PRO 2TB. + initrd.kernelModules = ["nvme"]; }; + # TODO Immutable `/' shire on ZFS datasets and snapshots. + # + # Opt-in: + # - /etc/NetworkManager + # - /etc/ssh + # - /home + # - /var/lib/bluetooth + # - /var/lib/iwd + # - /var/lib/log + # + # Investigate: + # - /var/lib/NetworkManager + # - /var/lib/cni + # - /var/lib/containers + # - /var/lib/qemu + fileSystems = { "/boot" = { device = "/dev/disk/by-uuid/FF1E-9CFD"; @@ -66,7 +90,8 @@ with lib; { }; }; - # No swap space is declared here because the system already has 128Gb of RAM. - # I didn't manage to even hit 100Gb mark even when running large - # computations/compiling something big. + # No swap space is declared here because the system already has 128Gb of RAM. :^) + # I've only manage to hit around 100Gb mark when running large + # computations/compiling something big. Pretty sure that a hefty chunk of it + # was just residual cache and it wouldn't make me get to OOM situations. } diff --git a/nixosConfigurations/iso/default.nix b/nixosConfigurations/iso/default.nix index e435d0b..914fea9 100644 --- a/nixosConfigurations/iso/default.nix +++ b/nixosConfigurations/iso/default.nix @@ -7,6 +7,7 @@ with lib; { secrets = mkForce {}; nixfiles.modules = { + common.networking.onlyDefault = true; git.client.enable = true; openssh = { client.enable = true; @@ -21,7 +22,5 @@ with lib; { services.getty.autologinUser = mkForce my.username; - environment.noXlibs = false; - nixpkgs.config.allowBroken = true; } diff --git a/nixosConfigurations/manwe/default.nix b/nixosConfigurations/manwe/default.nix index b8dd324..a079579 100644 --- a/nixosConfigurations/manwe/default.nix +++ b/nixosConfigurations/manwe/default.nix @@ -52,10 +52,6 @@ with lib; { }; initrd.availableKernelModules = [ - "ata_piix" - "sd_mod" - "sr_mod" - "uhci_hcd" "virtio_pci" "virtio_scsi" ]; diff --git a/nixosConfigurations/melian/default.nix b/nixosConfigurations/melian/default.nix index 3ba854c..d7563d7 100644 --- a/nixosConfigurations/melian/default.nix +++ b/nixosConfigurations/melian/default.nix @@ -13,6 +13,8 @@ with lib; { bluetooth.enable = true; throttled.enable = true; + + android.enable = true; }; hardware.trackpoint = { @@ -26,13 +28,17 @@ with lib; { in { enable = true; - # This fixes an issue with not being able to suspend or wake up from suspend - # due to a kernel bug[1]. + # This fixes an issue with not being able to suspend or wake up from + # suspend due to a kernel bug[1] which is still not fixed. + # + # I guess this can also be fixed differently[2], which does look a lot nicer + # but I just can't bother. # # [1]: https://bbs.archlinux.org/viewtopic.php?id=270964 # [1]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/522998 # [1]: https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/562484/comments/3 # [1]: https://gist.github.com/ioggstream/8f380d398aef989ac455b93b92d42048 + # [2]: https://linrunner.de/tlp/settings/runtimepm.html powerDownCommands = "${modprobe} -r xhci_pci"; powerUpCommands = "${modprobe} xhci_pci"; }; @@ -40,7 +46,6 @@ with lib; { services = { thinkfan = { enable = true; - settings = { sensors = [ { @@ -52,7 +57,7 @@ with lib; { fans = [{tpacpi = "/proc/acpi/ibm/fan";}]; levels = [ ["level auto" 0 50] - ["level disengaged" 50 32767] + ["level disengaged" 50 32767] # This could annoy some people but IDGAF. ]; }; }; @@ -60,23 +65,10 @@ with lib; { fwupd.enable = true; }; - boot = { - initrd = { - availableKernelModules = [ - "ahci" - "nvme" - "sd_mod" - "usb_storage" - "usbhid" - "xhci_pci" - ]; - - luks.devices."root" = { - device = "/dev/disk/by-uuid/c1b46f24-eec0-47d2-a142-75ddfd7bb218"; - allowDiscards = true; - bypassWorkqueues = true; - }; - }; + boot.initrd.luks.devices."root" = { + device = "/dev/disk/by-uuid/c1b46f24-eec0-47d2-a142-75ddfd7bb218"; + allowDiscards = true; + bypassWorkqueues = true; }; fileSystems = { diff --git a/nixosConfigurations/varda/default.nix b/nixosConfigurations/varda/default.nix index 5e0914e..f08194e 100644 --- a/nixosConfigurations/varda/default.nix +++ b/nixosConfigurations/varda/default.nix @@ -26,10 +26,6 @@ with lib; { }; initrd.availableKernelModules = [ - "ata_piix" - "sd_mod" - "sr_mod" - "uhci_hcd" "virtio_pci" "virtio_scsi" ]; diff --git a/nixosConfigurations/yavanna/default.nix b/nixosConfigurations/yavanna/default.nix index e3172a6..d347c61 100644 --- a/nixosConfigurations/yavanna/default.nix +++ b/nixosConfigurations/yavanna/default.nix @@ -20,10 +20,18 @@ with lib; { device = "/dev/sda"; }; - initrd = { - availableKernelModules = ["uhci_hcd" "ahci"]; - kernelModules = ["nvme"]; - }; + # NOTE This is probably not required, but I cannot test this out without + # risking "bricking" my VPS because Kimsufi/OVH doesn't provide a console + # access. This configuration was generated via nixos-infect[1] and at the + # time I didn't bother to test for loaded kernel modules and just left the + # automatically (IIRC) generated `hardware-configuration.nix' as is. + # + # There's, however, no indication that any NVME drives are being used and, + # as the matter of fact, the VPS itself is KVM-shire, so... I'm still not + # going to risk it. + # + # [1]: https://github.com/elitak/nixos-infect + initrd.availableKernelModules = ["nvme"]; }; fileSystems."/" = { |