diff options
author | Azat Bahawi <azat@bahawi.net> | 2022-09-11 19:28:11 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-09-11 19:28:11 +0300 |
commit | 96ca9558928f4ffc9a99a94059fcd93d0a9de761 (patch) | |
tree | 4c89ece6605c439b8c3bf4531f4c9fcde8bf7245 | |
parent | 2022-09-10 (diff) |
2022-09-11
Diffstat (limited to '')
24 files changed, 224 insertions, 292 deletions
diff --git a/configurations/default.nix b/configurations/default.nix index e0741dc..124baec 100644 --- a/configurations/default.nix +++ b/configurations/default.nix @@ -2,138 +2,72 @@ inputs, lib, }: -with lib; { - # TODO Make a generic wrapper for all hosts. - melian = let - system = "x86_64-linux"; - in - nixosSystem { - inherit system; - - modules = - attrValues inputs.self.nixosModules - ++ [./melian] - ++ (with inputs; - (with nixos-hardware.nixosModules; [ - common-pc-laptop-ssd - lenovo-thinkpad-t480 - ]) - ++ [nixpkgs.nixosModules.notDetected]); - - specialArgs = rec { - inherit inputs lib; - this = my.configurations.melian; - }; - }; - - manwe = let - system = "x86_64-linux"; - in - nixosSystem { - inherit system; - - modules = - attrValues inputs.self.nixosModules - ++ [./manwe] - ++ (with inputs; - (with nixos-hardware.nixosModules; [common-cpu-amd common-pc-ssd]) - ++ [ - nixpkgs.nixosModules.notDetected - "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" - ]); - - specialArgs = rec { - inherit inputs lib; - this = my.configurations.manwe; - }; - }; - - varda = let - system = "x86_64-linux"; - in - nixosSystem { - inherit system; - - modules = - attrValues inputs.self.nixosModules - ++ [./varda] - ++ (with inputs; - (with nixos-hardware.nixosModules; [common-cpu-amd common-pc-ssd]) - ++ [ - nixpkgs.nixosModules.notDetected - "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" - ]); - - specialArgs = rec { - inherit inputs lib; - this = my.configurations.varda; - }; - }; - - yavanna = let - system = "x86_64-linux"; - in - nixosSystem { - inherit system; - +with lib; let + mkConfiguration = name: { + modules ? [], + configuration ? ./${name}, + this ? my.configurations.${name}, + }: + nameValuePair name (nixosSystem { + inherit (this) system; modules = attrValues inputs.self.nixosModules - ++ [./yavanna] - ++ (with inputs; - (with nixos-hardware.nixosModules; [common-cpu-intel common-pc-hdd]) - ++ [nixpkgs.nixosModules.notDetected]); - - specialArgs = rec { - inherit inputs lib; - this = my.configurations.yavanna; + ++ modules + ++ [(import configuration)]; + specialArgs = {inherit inputs lib this;}; + }); +in + mapAttrs' mkConfiguration { + melian.modules = with inputs; [ + nixos-hardware.nixosModules.common-pc-laptop-ssd + nixos-hardware.nixosModules.lenovo-thinkpad-t480 + nixpkgs.nixosModules.notDetected + ]; + + manwe.modules = with inputs; [ + "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" + nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-pc-ssd + nixpkgs.nixosModules.notDetected + ]; + + varda.modules = with inputs; [ + "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" + nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-pc-ssd + nixpkgs.nixosModules.notDetected + ]; + + yavanna.modules = with inputs; [ + "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" + nixos-hardware.nixosModules.common-cpu-intel + nixos-hardware.nixosModules.common-pc-hdd + nixpkgs.nixosModules.notDetected + ]; + + test-headless = { + modules = with inputs; [ + "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" + nixpkgs.nixosModules.notDetected + ]; + this = { + hostname = "test-headless"; + system = "x86_64-linux"; + isHeadless = true; + isHeadful = false; }; }; - test-headless = let - system = "x86_64-linux"; - in - nixosSystem { - inherit system; - - modules = - attrValues inputs.self.nixosModules - ++ [./test-headless] - ++ (with inputs; [ - nixpkgs.nixosModules.notDetected - "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" - ]); - - specialArgs = rec { - inherit inputs lib; - this = { - hostname = "test-headless"; - isHeadless = true; - isHeadful = false; - }; - }; - }; - - test-headful = let - system = "x86_64-linux"; - in - nixosSystem { - inherit system; - - modules = - attrValues inputs.self.nixosModules - ++ [./test-headful] - ++ (with inputs; [ - nixpkgs.nixosModules.notDetected - "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" - ]); - - specialArgs = rec { - inherit inputs lib; - this = { - hostname = "test-headful"; - isHeadful = true; - isHeadless = false; - }; + test-headful = { + modules = with inputs; [ + "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" + nixpkgs.nixosModules.notDetected + ]; + this = { + hostname = "test-headful"; + system = "x86_64-linux"; + isHeadless = false; + isHeadful = true; }; }; -} + } diff --git a/configurations/manwe/default.nix b/configurations/manwe/default.nix index f3b59f5..656667e 100644 --- a/configurations/manwe/default.nix +++ b/configurations/manwe/default.nix @@ -167,6 +167,4 @@ with lib; { }; swapDevices = [{device = "/dev/sda3";}]; - - system.stateVersion = "22.05"; } diff --git a/configurations/melian/default.nix b/configurations/melian/default.nix index 229b56a..8540c24 100644 --- a/configurations/melian/default.nix +++ b/configurations/melian/default.nix @@ -279,7 +279,4 @@ with lib; { xserver.videoDrivers = ["intel" "modesetting"]; }; - - # TODO This should be applied globally to all machines. - system.stateVersion = "22.05"; } diff --git a/configurations/test-headful/default.nix b/configurations/test-headful/default.nix index fb3c276..25db8c7 100644 --- a/configurations/test-headful/default.nix +++ b/configurations/test-headful/default.nix @@ -1,11 +1,5 @@ -{ - lib, - modulesPath, - ... -}: +{lib, ...}: with lib; { - imports = ["${modulesPath}/profiles/qemu-guest.nix"]; - nixfiles.modules = { dwm.enable = true; kde.enable = false; @@ -22,6 +16,4 @@ with lib; { man-db.enable = mkForce false; }; }; - - system.stateVersion = "22.05"; } diff --git a/configurations/test-headless/default.nix b/configurations/test-headless/default.nix index c085e63..919a436 100644 --- a/configurations/test-headless/default.nix +++ b/configurations/test-headless/default.nix @@ -1,12 +1,5 @@ -{ - lib, - modulesPath, - ... -}: +{lib, ...}: with lib; { - imports = ["${modulesPath}/profiles/qemu-guest.nix"]; - - # This will allow `nix flake check` tests to pass. nixfiles.modules = { endlessh-go.enable = mkForce false; node-exporter.enable = mkForce false; @@ -17,6 +10,4 @@ with lib; { fileSystems."/".device = "/dev/null"; documentation.enable = mkForce false; - - system.stateVersion = "22.05"; } diff --git a/configurations/varda/default.nix b/configurations/varda/default.nix index 524842e..313d2fb 100644 --- a/configurations/varda/default.nix +++ b/configurations/varda/default.nix @@ -84,6 +84,4 @@ with lib; { size = 4 * 1024; } ]; - - system.stateVersion = "22.05"; } diff --git a/configurations/yavanna/default.nix b/configurations/yavanna/default.nix index b740da3..3ed114e 100644 --- a/configurations/yavanna/default.nix +++ b/configurations/yavanna/default.nix @@ -96,6 +96,4 @@ with lib; { size = 4 * 1024; } ]; - - system.stateVersion = "22.05"; } diff --git a/flake.lock b/flake.lock index 06647cb..5d912e7 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1662046976, - "narHash": "sha256-BrTReGRhkVm/Kmmf4zQrL+oYWy0sds/BDBgXNX1CL3c=", + "lastModified": 1662241716, + "narHash": "sha256-urqPvSvvGUhkwzTDxUI8N1nsdMysbAfjmBNZaTYBZRU=", "owner": "ryantm", "repo": "agenix", - "rev": "9f136ecfa5bf954538aed3245e4408cf87c85097", + "rev": "c96da5835b76d3d8e8d99a0fec6fe32f8539ee2e", "type": "github" }, "original": { @@ -121,11 +121,11 @@ ] }, "locked": { - "lastModified": 1662179110, - "narHash": "sha256-13KYsuzprRvJQK3XXzaFGNyWZS9Pucxl+OZO6gJVzE8=", + "lastModified": 1662827147, + "narHash": "sha256-jq9kLeZ2iX0Vp2UcG2IbwDKjxTwG8xayFjzmQdVqBtQ=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "b042c46bb68bbd24b3b8f80f21889237b3b23eef", + "rev": "463d805e875fc1ff1d15ae9c664e5aaf9b7618d3", "type": "github" }, "original": { @@ -328,11 +328,11 @@ ] }, "locked": { - "lastModified": 1661824092, - "narHash": "sha256-nSWLWytlXbeLrx5A+r5Pso7CvVrX5EgmIIXW/EXvPHQ=", + "lastModified": 1662759269, + "narHash": "sha256-lt8bAfEZudCQb+MxoNKmenhMTXhu3RCCyLYxU9t5FFk=", "owner": "nix-community", "repo": "home-manager", - "rev": "5bd66dc6cd967033489c69d486402b75d338eeb6", + "rev": "9f7fe353b613d0e45d7a5cdbd1f13c96c15803dd", "type": "github" }, "original": { @@ -377,11 +377,11 @@ "ws-butler": "ws-butler" }, "locked": { - "lastModified": 1662085301, - "narHash": "sha256-eEnqSDEORBJOrD0yuPU9FDjF8QOs8CSmVDvC0lRjBjI=", + "lastModified": 1662665437, + "narHash": "sha256-Aksr5xArGPbyrqEa/jxXn0/d9hc639SvpgUqfkdPLCY=", "owner": "nix-community", "repo": "nix-doom-emacs", - "rev": "b4efdd150232f6d11312ddb0e4d35dd15cbbe01c", + "rev": "a62512125de85c81fa8d1bb77ba8c8fe96d5b390", "type": "github" }, "original": { @@ -401,11 +401,11 @@ ] }, "locked": { - "lastModified": 1662169888, - "narHash": "sha256-vXcEbRINemb+ype/JQohaU8TyzUbclOFwiv+soYn6wI=", + "lastModified": 1662774856, + "narHash": "sha256-vgvkBNzRs3Ukwc2sVAoPGeSglltNqLHEvbxmE89fB0I=", "owner": "jyooru", "repo": "nix-minecraft-servers", - "rev": "7921fbc0656f8e8c5a95f1142aaf07bf6253aa55", + "rev": "d5934f64d688bba60c633b8966170b575a220867", "type": "github" }, "original": { @@ -433,11 +433,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1662092548, - "narHash": "sha256-nmAbyJ5+DBXcNJ2Rcy/Gx84maqtLdr6xEe82+AXCaY8=", + "lastModified": 1662714967, + "narHash": "sha256-IOTq5tAGGmBFj7tQbkcyLE261JUeTUucEE3p0WLZ4qM=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "786633331724f36967853b98d9100b5cfaa4d798", + "rev": "1fec8fda86dac5701146c77d5f8a414b14ed1ff6", "type": "github" }, "original": { @@ -449,11 +449,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1662096612, - "narHash": "sha256-R+Q8l5JuyJryRPdiIaYpO5O3A55rT+/pItBrKcy7LM4=", + "lastModified": 1662818301, + "narHash": "sha256-uRjbKN924ptf5CvQ4cfki3R9nIm5EhrJBeb/xUxwfcM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "21de2b973f9fee595a7a1ac4693efff791245c34", + "rev": "a25f0b9bbdfedee45305da5d1e1410c5bcbd48f6", "type": "github" }, "original": { @@ -481,11 +481,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1662195462, - "narHash": "sha256-eGgXhg58bnNmqy09s+XKyP1fn8ZKvUXlG16q57egP+A=", + "lastModified": 1662833910, + "narHash": "sha256-C3BbSul+GU/WoYL11s1UCeMnZ/8YaM04kOsUiCFi4fs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bef7a8c36fa01d4427f1854bf2ae09a2368ca1f3", + "rev": "6b29af2b84aea67176da8ccb949555e705a04550", "type": "github" }, "original": { @@ -497,11 +497,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1662197005, - "narHash": "sha256-E1XUvRbdOMiooVyUpHnYe3tSOTwEq5ePKQZ1qMETtnQ=", + "lastModified": 1662824676, + "narHash": "sha256-KSCI31DwGmahH260LpzRLhRVFi0fNxVfgyBfTVLNZxA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a69918f60e882d7cb685e502d8260af68933c853", + "rev": "15493135c0af2e5562500ab5225f2bd75b38af09", "type": "github" }, "original": { @@ -563,11 +563,11 @@ }, "nur": { "locked": { - "lastModified": 1662195553, - "narHash": "sha256-XSlibodNyO5N5m7AnRfJ1jQWZi56jeqBcE2STAtXOyA=", + "lastModified": 1662834336, + "narHash": "sha256-GzUnijmmG37Fa1t1ygmRE1ZxthgVRj+HA/3upIZMdGw=", "owner": "nix-community", "repo": "NUR", - "rev": "d685b4574fc5f6422101461473a411af7ab08b44", + "rev": "9eb35b9992286b4c7a134b1d7fc19f9222fc8506", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index dce2869..6d38577 100644 --- a/flake.nix +++ b/flake.nix @@ -255,7 +255,6 @@ shellcheck.enable = true; shfmt.enable = true; statix.enable = true; - # nix-linter.enable = true; # Takes annoyingly long time to parse stuff. }; }; }) @@ -267,7 +266,7 @@ nixosConfigurations = import ./configurations {inherit inputs lib;}; - # TODO Make it so self.pckages also can use this. + # TODO Make it so that self.packages also can use this. overlays.default = final: _: { UltimMC = final.libsForQt5.callPackage ./packages/ultimmc.nix {}; bruh = final.callPackage ./packages/bruh.nix {}; diff --git a/lib/my.nix b/lib/my.nix index 680d32e..a6d88cc 100644 --- a/lib/my.nix +++ b/lib/my.nix @@ -22,6 +22,11 @@ with lib; default = name; readOnly = true; }; + system = mkOption { + description = "The machine's system"; + type = enum ["x86_64-linux" "aarch64-linux"]; + default = "x86_64-linux"; + }; isHeadless = mkConfigurationTypeOption "headless"; isHeadful = mkConfigurationTypeOption "headful"; 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="; } ]; diff --git a/packages/mpv-autosub.nix b/packages/mpv-autosub.nix index cebab76..b7804a1 100644 --- a/packages/mpv-autosub.nix +++ b/packages/mpv-autosub.nix @@ -5,7 +5,7 @@ }: stdenvNoCC.mkDerivation rec { pname = "mpv-autosub"; - version = "unstable-"; + version = "git"; src = fetchFromGitHub { owner = "davidde"; diff --git a/packages/throttled.nix b/packages/throttled.nix index ff896cf..1c0f853 100644 --- a/packages/throttled.nix +++ b/packages/throttled.nix @@ -1,25 +1,25 @@ { fetchFromGitHub, kmod, - python3, + python3Packages, stdenv, }: stdenv.mkDerivation rec { pname = "throttled"; - version = "unstable-2022-06-30"; + version = "git"; src = fetchFromGitHub { owner = "erpalma"; repo = pname; - rev = "ab9641a93a409bdc7fca6889ff23ca5a685e5a77"; - hash = "sha256-Zd+rTsVDkw9mq6k2OkMy+HxyYsl3ADy1fEM/1e/jxAs="; + rev = "1dd726672f0b11b813d4c7b63e0157becde7a013"; + hash = "sha256-0MsPp6y4r/uZB2SplKV+SAiJoxIs2jgOQmQoQQ2ZKwI="; }; - nativeBuildInputs = with python3.pkgs; [wrapPython]; + nativeBuildInputs = with python3Packages; [wrapPython]; pythonPath = - (with python3.pkgs; [configparser dbus-python pygobject3]) - ++ [kmod]; + [kmod] + ++ (with python3Packages; [configparser dbus-python pygobject3]); installPhase = '' runHook preInstall diff --git a/packages/ultimmc.nix b/packages/ultimmc.nix index dcb646a..86377b4 100644 --- a/packages/ultimmc.nix +++ b/packages/ultimmc.nix @@ -3,6 +3,7 @@ fetchFromGitHub, jdk, makeDesktopItem, + ninja, qtbase, stdenv, wrapQtAppsHook, @@ -10,19 +11,27 @@ }: stdenv.mkDerivation rec { pname = "UltimMC"; - version = "unstable-2022-07-20"; + version = "git"; src = fetchFromGitHub { owner = "UltimMC"; repo = "Launcher"; - rev = "a522ec3ad4602de1f457a25bce98ef912a29d7d6"; - hash = "sha256-+UgBblyEx0cKH8UMBOPtjhQLv2YUKj91UokQWKCEPbY="; + rev = "6bfa07e728865d8d31a43ef5231b2461d55fc4b3"; fetchSubmodules = true; + hash = "sha256-gMEjy1jM/T7Un4FDNbAd9AAdVUOHRfL+arhahHPCBFo="; }; - nativeBuildInputs = [cmake jdk wrapQtAppsHook]; + nativeBuildInputs = [ + cmake + jdk + ninja + wrapQtAppsHook + ]; - buildInputs = [qtbase zlib]; + buildInputs = [ + qtbase + zlib + ]; postPatch = '' substituteInPlace CMakeLists.txt \ @@ -33,11 +42,9 @@ stdenv.mkDerivation rec { --replace '"jars"' '"../share/${pname}/jar"'; ''; - cmakeFlags = ["-DCMAKE_BUILD_TYPE=Release"]; - desktopItem = makeDesktopItem { name = pname; - exec = pname; + exec = "DevLauncher"; icon = pname; desktopName = pname; genericName = "Custom Minecraft launcher"; @@ -47,11 +54,7 @@ stdenv.mkDerivation rec { dontWrapQtApps = true; postInstall = '' - rm $out/${pname} - - wrapProgram $out/bin/${pname} \ - --add-flags "--dir \''${XDG_DATA_HOME:-~/.local/share}/${pname}" \ - "''${qtWrapperArgs[@]}" + rm $out/DevLauncher install -Dm644 \ ${desktopItem}/share/applications/${pname}.desktop \ @@ -60,4 +63,10 @@ stdenv.mkDerivation rec { $src/notsecrets/logo.svg \ $out/share/icons/hicolor/scalable/apps/${pname}.svg ''; + + postFixup = '' + wrapProgram $out/bin/DevLauncher \ + --add-flags "--dir \''${XDG_DATA_HOME:-~/.local/share}/${pname}" \ + "''${qtWrapperArgs[@]}" + ''; } |