From bd674ce4eb83fdbc9763472db5f6ce2e396167a2 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 7 Jun 2024 14:25:34 +0200 Subject: [PATCH] remove nixpkgs channels which are not needed anymore --- flake.lock | 51 ------------------- flake.nix | 23 ++++----- nixos/components/gui/kmonad.nix | 2 +- nixos/components/media/video.nix | 8 +-- nixos/components/monitor/opentelemetry.nix | 2 +- nixos/components/terminal/heygpt.nix | 2 +- nixos/components/terminal/wtf.nix | 4 +- nixos/homes/common/packages.nix | 4 +- nixos/homes/common/terminal.nix | 4 +- nixos/homes/palo/packages/development.nix | 21 ++++---- nixos/homes/palo/packages/packages.nix | 2 +- nixos/homes/palo/taskwarrior.nix | 2 +- nixos/homes/tina/packages.nix | 2 +- nixos/legacy/robi/packages.nix | 4 +- .../machines/chungus/media-audiobookshelf.nix | 2 +- nixos/machines/chungus/service-atuin.nix | 2 +- nixos/machines/chungus/services-vault.nix | 2 +- nixos/system/all/defaults.nix | 6 --- 18 files changed, 41 insertions(+), 102 deletions(-) diff --git a/flake.lock b/flake.lock index 9995b8d..4c143ac 100644 --- a/flake.lock +++ b/flake.lock @@ -630,38 +630,6 @@ "type": "github" } }, - "nixpkgs-legacy_2105": { - "locked": { - "lastModified": 1659914493, - "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-21.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-legacy_2205": { - "locked": { - "lastModified": 1685573264, - "narHash": "sha256-Zffu01pONhs/pqH07cjlF10NnMDLok8ix5Uk4rhOnZQ=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "380be19fbd2d9079f677978361792cb25e8a3635", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-22.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-legacy_2211": { "locked": { "lastModified": 1688392541, @@ -678,22 +646,6 @@ "type": "github" } }, - "nixpkgs-legacy_2305": { - "locked": { - "lastModified": 1704290814, - "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-legacy_2311": { "locked": { "lastModified": 1717530100, @@ -950,10 +902,7 @@ "nixos-anywhere": "nixos-anywhere", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_5", - "nixpkgs-legacy_2105": "nixpkgs-legacy_2105", - "nixpkgs-legacy_2205": "nixpkgs-legacy_2205", "nixpkgs-legacy_2211": "nixpkgs-legacy_2211", - "nixpkgs-legacy_2305": "nixpkgs-legacy_2305", "nixpkgs-legacy_2311": "nixpkgs-legacy_2311", "overviewer": "overviewer", "permown": "permown", diff --git a/flake.nix b/flake.nix index c823f6f..7a30ddd 100644 --- a/flake.nix +++ b/flake.nix @@ -22,10 +22,7 @@ }; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs-legacy_2105.url = "github:nixos/nixpkgs/nixos-21.05"; - nixpkgs-legacy_2205.url = "github:nixos/nixpkgs/nixos-22.05"; nixpkgs-legacy_2211.url = "github:nixos/nixpkgs/nixos-22.11"; - nixpkgs-legacy_2305.url = "github:nixos/nixpkgs/nixos-23.05"; nixpkgs-legacy_2311.url = "github:nixos/nixpkgs/nixos-23.11"; nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-anywhere.url = "github:nix-community/nixos-anywhere"; @@ -112,10 +109,7 @@ , nixos-anywhere , nixos-hardware , nixpkgs - , nixpkgs-legacy_2105 - , nixpkgs-legacy_2205 , nixpkgs-legacy_2211 - , nixpkgs-legacy_2305 , nixpkgs-legacy_2311 , overviewer , permown @@ -147,15 +141,14 @@ ]; overlays = [ (_self: _super: { - # todo : remove this, we are on unstable in the future - unstable = import nixpkgs { + legacy_2211 = import nixpkgs-legacy_2211 { + inherit system; + config.allowUnfree = true; + }; + legacy_2311 = import nixpkgs-legacy_2311 { inherit system; config.allowUnfree = true; }; - legacy_2205 = import nixpkgs-legacy_2205 { inherit system; }; - legacy_2211 = import nixpkgs-legacy_2211 { inherit system; }; - legacy_2305 = import nixpkgs-legacy_2305 { inherit system; }; - legacy_2311 = import nixpkgs-legacy_2311 { inherit system; }; polygon-art = polygon-art.packages.${system}; landingpage = landingpage.packages.${system}.plain; kmonad = kmonad.packages.${system}.kmonad; @@ -224,7 +217,7 @@ ]; }) # configure nix - ({ pkgs, ... }: + ({ pkgs, lib, ... }: { nix.settings.substituters = [ "https://cache.nixos.org/" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -232,6 +225,10 @@ # no channesl needed this way nix.nixPath = [ "nixpkgs=${pkgs.path}" ]; documentation.nixos.enable = true; + + boot.loader.systemd-boot.configurationLimit = lib.mkDefault 10; + boot.loader.generic-extlinux-compatible.configurationLimit = lib.mkDefault 10; + boot.loader.grub.configurationLimit = lib.mkDefault 10; }) # some modules I always use permown.nixosModules.permown diff --git a/nixos/components/gui/kmonad.nix b/nixos/components/gui/kmonad.nix index 6f8f48e..cf74bb3 100644 --- a/nixos/components/gui/kmonad.nix +++ b/nixos/components/gui/kmonad.nix @@ -10,7 +10,7 @@ # only needed if you have an UHK hardware.keyboard.uhk.enable = true; - environment.systemPackages = [ pkgs.unstable.uhk-agent ]; + environment.systemPackages = [ pkgs.uhk-agent ]; users.users.mainUser.extraGroups = [ "input" ]; services.xserver = { diff --git a/nixos/components/media/video.nix b/nixos/components/media/video.nix index b67c8fb..99d99a5 100644 --- a/nixos/components/media/video.nix +++ b/nixos/components/media/video.nix @@ -3,7 +3,7 @@ with lib; let - obs-cmd = pkgs.unstable.rustPlatform.buildRustPackage + obs-cmd = pkgs.rustPlatform.buildRustPackage rec { pname = "obs-cmd"; version = "v0.15.2"; @@ -128,8 +128,8 @@ in boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ]; environment.systemPackages = with pkgs; [ - unstable.youtube-dl - unstable.yt-dlp + youtube-dl + yt-dlp mplayer mpv mpvReview @@ -140,7 +140,7 @@ in # obs studio stuff - unstable.obs-cli + obs-cli v4l-utils obs-cmd diff --git a/nixos/components/monitor/opentelemetry.nix b/nixos/components/monitor/opentelemetry.nix index 2e5a0d6..a402581 100644 --- a/nixos/components/monitor/opentelemetry.nix +++ b/nixos/components/monitor/opentelemetry.nix @@ -38,7 +38,7 @@ in (mkIf config.components.monitor.opentelemetry.enable { services.opentelemetry-collector = { enable = true; - package = pkgs.unstable.opentelemetry-collector-contrib; + package = pkgs.opentelemetry-collector-contrib; }; }) diff --git a/nixos/components/terminal/heygpt.nix b/nixos/components/terminal/heygpt.nix index c5cefe8..d053892 100644 --- a/nixos/components/terminal/heygpt.nix +++ b/nixos/components/terminal/heygpt.nix @@ -12,7 +12,7 @@ with lib; (pkgs.writers.writeBashBin "heygpt" '' export OPENAI_API_BASE="https://api.openai.com/v1" export OPENAI_API_KEY=$(pass openai/apikey) - ${lib.getExe pkgs.unstable.heygpt} "$@" + ${lib.getExe pkgs.heygpt} "$@" '') (pkgs.writers.writeBashBin "heygpt-models" '' export OPENAI_API_KEY=$(pass openai/apikey) diff --git a/nixos/components/terminal/wtf.nix b/nixos/components/terminal/wtf.nix index b14f4cc..d22dfe0 100644 --- a/nixos/components/terminal/wtf.nix +++ b/nixos/components/terminal/wtf.nix @@ -372,7 +372,7 @@ let createDashboard = { json, name }: let configuration = pkgs.writeText "config.yml" (builtins.toJSON json); in pkgs.writers.writeBashBin name '' - ${pkgs.unstable.wtf}/bin/wtfutil --config=${toString configuration} + ${pkgs.wtf}/bin/wtfutil --config=${toString configuration} ''; in @@ -387,7 +387,7 @@ in services.upower.enable = true; environment.systemPackages = [ - pkgs.unstable.wtf + pkgs.wtf (createDashboard { json = qJson; name = "q"; diff --git a/nixos/homes/common/packages.nix b/nixos/homes/common/packages.nix index f6b3582..c375d47 100644 --- a/nixos/homes/common/packages.nix +++ b/nixos/homes/common/packages.nix @@ -31,9 +31,9 @@ with lib; killall nix-tree - unstable.vulnix + vulnix (writers.writeBashBin "vulnix-system" '' - ${unstable.vulnix}/bin/vulnix --profile /nix/var/nix/profiles/system + ${vulnix}/bin/vulnix --profile /nix/var/nix/profiles/system '') ]; diff --git a/nixos/homes/common/terminal.nix b/nixos/homes/common/terminal.nix index 5a926e5..7281690 100644 --- a/nixos/homes/common/terminal.nix +++ b/nixos/homes/common/terminal.nix @@ -36,8 +36,8 @@ enable = true; enableBashIntegration = true; enableZshIntegration = true; - #package = pkgs.unstable.atuin; - package = pkgs.unstable.atuin.overrideAttrs (_old: { + #package = pkgs.atuin; + package = pkgs.atuin.overrideAttrs (_old: { # as cursed as doing mitigations=off in the kernel command line patches = [ "${assets}/0001-make-atuin-on-zfs-fast-again.patch" ]; }); diff --git a/nixos/homes/palo/packages/development.nix b/nixos/homes/palo/packages/development.nix index b173f15..9cff441 100644 --- a/nixos/homes/palo/packages/development.nix +++ b/nixos/homes/palo/packages/development.nix @@ -10,22 +10,21 @@ with lib; home.packages = [ # general - unstable.jetbrains.idea-ultimate + jetbrains.idea-ultimate #vscode jetbrains.mps - - unstable.jetbrains.datagrip + jetbrains.datagrip # Rust # ---- - unstable.jetbrains.clion + jetbrains.clion gcc rustup # Python # ------ - unstable.jetbrains.pycharm-professional + jetbrains.pycharm-professional # planing ((ganttproject-bin.override { @@ -87,14 +86,14 @@ with lib; miller # nomad - unstable.nomad - unstable.vault - unstable.consul + nomad + vault + consul wander # terraform - unstable.terragrunt - unstable.terraform + terragrunt + terraform terraform-docs awscli2 @@ -102,7 +101,7 @@ with lib; python3Full pipenv - unstable.mdbook + mdbook nodePackages.prettier shfmt diff --git a/nixos/homes/palo/packages/packages.nix b/nixos/homes/palo/packages/packages.nix index b812365..4b07229 100644 --- a/nixos/homes/palo/packages/packages.nix +++ b/nixos/homes/palo/packages/packages.nix @@ -42,7 +42,7 @@ with lib; nginx-config-formatter - unstable.yt-dlp + yt-dlp OSCAR diff --git a/nixos/homes/palo/taskwarrior.nix b/nixos/homes/palo/taskwarrior.nix index 003d0d7..9f943d7 100644 --- a/nixos/homes/palo/taskwarrior.nix +++ b/nixos/homes/palo/taskwarrior.nix @@ -74,7 +74,7 @@ in taskwarrior-hooks (pkgs.writeShellScriptBin "tsak" ''${pkgs.taskwarrior}/bin/task "$@"'') - unstable.vit + vit (pkgs.writers.writeBashBin "active" "${taskwarrior-tui}/bin/taskwarrior-tui -r active") (pkgs.writers.writeBashBin "todo" "${taskwarrior-tui}/bin/taskwarrior-tui -r todo") diff --git a/nixos/homes/tina/packages.nix b/nixos/homes/tina/packages.nix index 0243162..01438d2 100644 --- a/nixos/homes/tina/packages.nix +++ b/nixos/homes/tina/packages.nix @@ -19,7 +19,7 @@ with lib; bitwarden - unstable.yt-dlp + yt-dlp # office pdfarranger diff --git a/nixos/legacy/robi/packages.nix b/nixos/legacy/robi/packages.nix index fb47b8c..d637d63 100644 --- a/nixos/legacy/robi/packages.nix +++ b/nixos/legacy/robi/packages.nix @@ -5,9 +5,9 @@ youtube-dl ipset # for sshguard - unstable.vulnix + vulnix (pkgs.writers.writeBashBin "vulnix-system" '' - ${pkgs.unstable.vulnix}/bin/vulnix --profile /nix/var/nix/profiles/system + ${pkgs.vulnix}/bin/vulnix --profile /nix/var/nix/profiles/system '') ]; diff --git a/nixos/machines/chungus/media-audiobookshelf.nix b/nixos/machines/chungus/media-audiobookshelf.nix index 25e1fef..40f23f5 100644 --- a/nixos/machines/chungus/media-audiobookshelf.nix +++ b/nixos/machines/chungus/media-audiobookshelf.nix @@ -26,7 +26,7 @@ in serviceConfig = { Type = "simple"; WorkingDirectory = "/srv/audiobookshelf"; - ExecStart = "${unstable.audiobookshelf}/bin/audiobookshelf --port ${toString port}"; + ExecStart = "${audiobookshelf}/bin/audiobookshelf --port ${toString port}"; ExecReload = "${util-linux}/bin/kill -HUP $MAINPID"; Restart = "always"; User = config.users.users.audiobookshelf.name; diff --git a/nixos/machines/chungus/service-atuin.nix b/nixos/machines/chungus/service-atuin.nix index 2f1d49c..fc33c6c 100644 --- a/nixos/machines/chungus/service-atuin.nix +++ b/nixos/machines/chungus/service-atuin.nix @@ -1,7 +1,7 @@ { config, pkgs, assets, ... }: { services.atuin = { enable = true; - package = pkgs.unstable.atuin.overrideAttrs (_old: { + package = pkgs.atuin.overrideAttrs (_old: { # as cursed as doing mitigations=off in the kernel command line patches = [ "${assets}/0001-make-atuin-on-zfs-fast-again.patch" ]; }); diff --git a/nixos/machines/chungus/services-vault.nix b/nixos/machines/chungus/services-vault.nix index 220a8a5..ad7923e 100644 --- a/nixos/machines/chungus/services-vault.nix +++ b/nixos/machines/chungus/services-vault.nix @@ -3,6 +3,6 @@ services.vault = { enable = true; #adress = "chungus.private:8200"; - package = pkgs.unstable.vault; + package = pkgs.vault; }; } diff --git a/nixos/system/all/defaults.nix b/nixos/system/all/defaults.nix index 41d37fd..5fed383 100644 --- a/nixos/system/all/defaults.nix +++ b/nixos/system/all/defaults.nix @@ -34,12 +34,6 @@ #environment.variables.NIX_PATH = lib.mkForce "/var/src"; nix.nixPath = [ "nixpkgs=${pkgs.path}" ]; - # how much configurations should be kept? - boot.loader.systemd-boot.configurationLimit = lib.mkDefault 3; - boot.loader.generic-extlinux-compatible.configurationLimit = lib.mkDefault 3; - boot.loader.grub.configurationLimit = lib.mkDefault 3; - - # Machines should be fast by default # ---------------------------------- powerManagement.cpuFreqGovernor = lib.mkOverride 1001 "ondemand";