about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/nixfiles/alertmanager.nix44
-rw-r--r--modules/nixfiles/common/default.nix1
-rw-r--r--modules/nixfiles/common/environment.nix7
-rw-r--r--modules/nixfiles/common/nix/default.nix89
-rw-r--r--modules/nixfiles/common/shell/default.nix2
-rw-r--r--modules/nixfiles/firefox/userContent.css1
-rw-r--r--modules/nixfiles/games/steam-run.nix19
-rw-r--r--modules/nixfiles/games/steam.nix6
-rw-r--r--modules/nixfiles/nextcloud.nix4
-rw-r--r--modules/nixfiles/rtorrent.nix2
-rw-r--r--modules/nixfiles/vscode.nix2
11 files changed, 94 insertions, 83 deletions
diff --git a/modules/nixfiles/alertmanager.nix b/modules/nixfiles/alertmanager.nix
index b7dd5a3..ee53467 100644
--- a/modules/nixfiles/alertmanager.nix
+++ b/modules/nixfiles/alertmanager.nix
@@ -36,35 +36,31 @@ in {
       };
     };
 
-    services = let
-      acme = config.nixfiles.modules.acme.enable;
-    in {
-      prometheus.alertmanager = {
-        enable = true;
-
-        listenAddress = "127.0.0.1";
-        inherit (cfg) port;
+    services.prometheus.alertmanager = {
+      enable = true;
 
-        extraFlags = ["--web.external-url=https://${cfg.domain}"];
+      listenAddress = "127.0.0.1";
+      inherit (cfg) port;
 
-        configuration = {
-          global = {
-            smtp_from = "alertmanager@${my.domain.shire}";
-            smtp_smarthost = "${my.domain.shire}:584";
-          };
+      extraFlags = ["--web.external-url=https://${cfg.domain}"];
 
-          route = {
-            receiver = my.username;
-            group_by = ["alertname"];
-          };
+      configuration = {
+        global = {
+          smtp_from = "alertmanager@${my.domain.shire}";
+          smtp_smarthost = "${my.domain.shire}:584";
+        };
 
-          receivers = [
-            {
-              name = my.username;
-              email_configs = [{to = "${my.username}+alert@${my.domain.shire}";}];
-            }
-          ];
+        route = {
+          receiver = my.username;
+          group_by = ["alertname"];
         };
+
+        receivers = [
+          {
+            name = my.username;
+            email_configs = [{to = "${my.username}+alert@${my.domain.shire}";}];
+          }
+        ];
       };
     };
   };
diff --git a/modules/nixfiles/common/default.nix b/modules/nixfiles/common/default.nix
index 7f60f77..4f7a6c1 100644
--- a/modules/nixfiles/common/default.nix
+++ b/modules/nixfiles/common/default.nix
@@ -1,7 +1,6 @@
 _: {
   imports = [
     ./documentation.nix
-    ./environment.nix
     ./home-manager.nix
     ./kernel.nix
     ./locale.nix
diff --git a/modules/nixfiles/common/environment.nix b/modules/nixfiles/common/environment.nix
deleted file mode 100644
index 9998441..0000000
--- a/modules/nixfiles/common/environment.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{lib, ...}:
-with lib; {
-  environment = {
-    localBinInPath = true;
-    defaultPackages = mkForce [];
-  };
-}
diff --git a/modules/nixfiles/common/nix/default.nix b/modules/nixfiles/common/nix/default.nix
index 04d4113..550749a 100644
--- a/modules/nixfiles/common/nix/default.nix
+++ b/modules/nixfiles/common/nix/default.nix
@@ -3,8 +3,11 @@
   inputs,
   lib,
   pkgs,
+  pkgsLocal,
+  pkgsMaster,
   pkgsPR,
   pkgsRev,
+  pkgsStabe,
   this,
   ...
 }:
@@ -17,11 +20,11 @@ with lib; {
   in rec {
     pkgsMaster = importNixpkgs inputs.nixpkgs-master;
     pkgsStable = importNixpkgs inputs.nixpkgs-stable;
-    pkgsRev = rev: sha256:
+    pkgsRev = rev: hash:
       importNixpkgs (pkgs.fetchFromGitHub {
         owner = "NixOS";
         repo = "nixpkgs";
-        inherit rev sha256;
+        inherit rev hash;
       });
     pkgsPR = pr: pkgsRev "refs/pull/${toString pr}/head";
     pkgsLocal = importNixpkgs "${config.my.home}/src/nixpkgs";
@@ -72,51 +75,55 @@ with lib; {
     };
   };
 
-  nixpkgs = {
-    overlays = with inputs; [
-      self.overlays.default
-      (_: super:
-        {
-          nix-bash-completions = super.nix-bash-completions.overrideAttrs (_: _: {
-            postPatch = ''
-              substituteInPlace _nix \
-                --replace 'nix nixos-option' 'nixos-option'
-            '';
-          });
+  nixpkgs.overlays = with inputs; [
+    self.overlays.default
+    (_: super:
+      {
+        nix-bash-completions = super.nix-bash-completions.overrideAttrs (_: _: {
+          postPatch = ''
+            substituteInPlace _nix \
+              --replace 'nix nixos-option' 'nixos-option'
+          '';
+        });
 
-          alejandra = super.alejandra.overrideAttrs (_: _: {
-            patches = [./patches/alejandra-no-ads.patch];
-          });
-        }
-        // (with super; let
-          np = nodePackages;
-        in {
-          # Normalises package names.
-          dockerfile-language-server = np.dockerfile-language-server-nodejs;
-          editorconfig = editorconfig-core-c;
-          inherit (np) bash-language-server;
-          inherit (np) vim-language-server;
-          inherit (np) yaml-language-server;
-          json-language-server = np.vscode-json-languageserver;
-          k3d = kube3d;
-          lua-language-server = sumneko-lua-language-server;
-          nix-language-server = rnix-lsp;
-          omnisharp = omnisharp-roslyn;
-          tor-browser = tor-browser-bundle-bin;
-        }))
-      agenix.overlay
-      emacs-overlay.overlay
-      nix-minecraft-servers.overlays.default
-      nur.overlay
-      xmonad-ng.overlays.default
-    ];
+        alejandra = super.alejandra.overrideAttrs (_: _: {
+          patches = [./patches/alejandra-no-ads.patch];
+        });
 
-    config.allowUnfree = true;
-  };
+        # https://github.com/NixOS/nixpkgs/pull/190714
+        inherit (pkgsPR "190714" "sha256-T2SXzubuN0q74QmmamPWvZHgxH7YpU8JRU0bg9RLKls=") nheko;
+      }
+      // (with super; let
+        np = nodePackages;
+      in {
+        # Normalises package names.
+        dockerfile-language-server = np.dockerfile-language-server-nodejs;
+        editorconfig = editorconfig-core-c;
+        inherit (np) bash-language-server;
+        inherit (np) vim-language-server;
+        inherit (np) yaml-language-server;
+        json-language-server = np.vscode-json-languageserver;
+        k3d = kube3d;
+        lua-language-server = sumneko-lua-language-server;
+        nix-language-server = rnix-lsp;
+        omnisharp = omnisharp-roslyn;
+        tor-browser = tor-browser-bundle-bin;
+      }))
+    agenix.overlay
+    emacs-overlay.overlay
+    nix-minecraft-servers.overlays.default
+    nur.overlay
+    xmonad-ng.overlays.default
+  ];
+
+  system.stateVersion = builtins.readFile "${inputs.nixpkgs}/.version";
 
   environment = {
     sessionVariables.NIX_SHELL_PRESERVE_PROMPT = "1";
 
+    localBinInPath = true;
+
+    defaultPackages = mkForce [];
     systemPackages = with pkgs;
       optionals config.profile.headful [
         nix-top
diff --git a/modules/nixfiles/common/shell/default.nix b/modules/nixfiles/common/shell/default.nix
index 7174443..50ae488 100644
--- a/modules/nixfiles/common/shell/default.nix
+++ b/modules/nixfiles/common/shell/default.nix
@@ -71,7 +71,7 @@ with lib; {
                     ++ [
                       (fetchpatch {
                         url = "https://raw.githubusercontent.com/jarun/advcpmv/master/advcpmv-0.9-9.1.patch";
-                        sha256 = "sha256-d+SRT/R4xmfHLAdOr7m4R3WFiW64P5ZH6iqDvErYCyg=";
+                        hash = "sha256-d+SRT/R4xmfHLAdOr7m4R3WFiW64P5ZH6iqDvErYCyg=";
                       })
                     ];
                 }))
diff --git a/modules/nixfiles/firefox/userContent.css b/modules/nixfiles/firefox/userContent.css
index 81cf04e..a6421e7 100644
--- a/modules/nixfiles/firefox/userContent.css
+++ b/modules/nixfiles/firefox/userContent.css
@@ -193,6 +193,7 @@
         font-size: var(--furigana-font-size) !important;
     }
 
+    #JP_uta_pc_lyric_footeroverlay,
     #footer__area,
     #reviews,
     #sidebar,
diff --git a/modules/nixfiles/games/steam-run.nix b/modules/nixfiles/games/steam-run.nix
index 08c6063..bab12f3 100644
--- a/modules/nixfiles/games/steam-run.nix
+++ b/modules/nixfiles/games/steam-run.nix
@@ -31,21 +31,24 @@ in {
               (glew.overrideAttrs (_: super: let
                 opname = super.pname;
               in rec {
-                pname = "${opname}-mountandblade";
+                pname = "${opname}-mbw";
                 inherit (super) version;
                 src = fetchurl {
                   url = "mirror://sourceforge/${opname}/${opname}-${version}.tgz";
-                  sha256 = "sha256-BN6R5+Z2MDm8EZQAlc2cf4gLq6ghlqd2X3J6wFqZPJU=";
+                  hash = "sha256-BN6R5+Z2MDm8EZQAlc2cf4gLq6ghlqd2X3J6wFqZPJU=";
                 };
               }))
               (fmodex.overrideAttrs (_: super: let
                 opname = super.pname;
               in rec {
-                pname = "${opname}-mountandblade";
+                pname = "${opname}-mbw";
                 inherit (super) version;
                 installPhase = let
-                  libPath =
-                    makeLibraryPath [alsa-lib libpulseaudio stdenv.cc.cc];
+                  libPath = makeLibraryPath [
+                    alsa-lib
+                    libpulseaudio
+                    stdenv.cc.cc
+                  ];
                 in ''
                   install -Dm755 api/lib/libfmodex64-${version}.so $out/lib/libfmodex64.so
                   patchelf --set-rpath ${libPath} $out/lib/libfmodex64.so
@@ -55,5 +58,11 @@ in {
       })
       .run
     ];
+
+    nixpkgs.config.allowUnfreePredicate = p:
+      elem (getName p) [
+        "steam"
+        "steam-original"
+      ];
   };
 }
diff --git a/modules/nixfiles/games/steam.nix b/modules/nixfiles/games/steam.nix
index c1d7eb8..71e5068 100644
--- a/modules/nixfiles/games/steam.nix
+++ b/modules/nixfiles/games/steam.nix
@@ -17,5 +17,11 @@ in {
     };
 
     hm.home.packages = with pkgs; [steam];
+
+    nixpkgs.config.allowUnfreePredicate = p:
+      elem (getName p) [
+        "steam"
+        "steam-original"
+      ];
   };
 }
diff --git a/modules/nixfiles/nextcloud.nix b/modules/nixfiles/nextcloud.nix
index e586c2a..11eb8d3 100644
--- a/modules/nixfiles/nextcloud.nix
+++ b/modules/nixfiles/nextcloud.nix
@@ -53,10 +53,10 @@ in {
             mkNextcloudApp = {
               name,
               version,
-              sha256,
+              hash,
             }:
               pkgs.fetchNextcloudApp {
-                inherit name version sha256;
+                inherit name version hash;
                 url = "https://github.com/nextcloud/${name}/archive/refs/tags/v${version}.tar.gz";
               };
           in {
diff --git a/modules/nixfiles/rtorrent.nix b/modules/nixfiles/rtorrent.nix
index 320da03..a91e83d 100644
--- a/modules/nixfiles/rtorrent.nix
+++ b/modules/nixfiles/rtorrent.nix
@@ -190,7 +190,7 @@ in {
         mkIf cfg.flood.enable {
           nixfiles.modules.nginx = {
             enable = true;
-            upstreams.flood.servers."127.0.0.1:${toString cfg.port}" = {};
+            upstreams.flood.servers."127.0.0.1:${toString port}" = {};
             virtualHosts.${cfg.flood.domain} = {
               root = "${pkg}/lib/node_modules/flood/dist/assets";
               locations = {
diff --git a/modules/nixfiles/vscode.nix b/modules/nixfiles/vscode.nix
index 82e9f2d..7175b36 100644
--- a/modules/nixfiles/vscode.nix
+++ b/modules/nixfiles/vscode.nix
@@ -41,7 +41,7 @@ in {
             name = "vscode-xml";
             publisher = "redhat";
             version = "0.20.0";
-            sha256 = "sha256-GKBrf9s8n7Wv14RSfwyDma1dM0fGMvRkU/7v2DAcB9A=";
+            hash = "sha256-GKBrf9s8n7Wv14RSfwyDma1dM0fGMvRkU/7v2DAcB9A=";
           }
         ];
 

Consider giving Nix/NixOS a try! <3