modularize nix version choice

This commit is contained in:
Thilo Billerbeck 2024-06-05 01:00:27 +02:00
parent df6cecdc98
commit 1e4fd788ed
5 changed files with 32 additions and 4 deletions

View file

@ -21,6 +21,12 @@
home.sessionVariables = {
LD_LIBRARY_PATH = "${pkgs.libGL}/lib";
};
nix = {
package = pkgs.nixVersions.latest;
};
home.packages = with pkgs; [ pkgs.nixVersions.latest ];
};
};
}

View file

@ -1,4 +1,9 @@
{ inputs, pkgs, ... }:
{
inputs,
pkgs,
config,
...
}:
{
home-manager = {
@ -16,6 +21,7 @@
isGnome = false;
noiseSuppression.enable = true;
isGraphical = true;
nixVersion = pkgs.lix;
};
/*
@ -30,7 +36,14 @@
LD_LIBRARY_PATH = "${pkgs.libGL}/lib";
};
home.packages = with pkgs; [ libsForQt5.discover ];
nix = {
package = pkgs.lix;
};
home.packages = with pkgs; [
pkgs.lix
libsForQt5.discover
];
};
};
}

View file

@ -12,4 +12,10 @@
};
nixpkgs.config.allowUnfree = true;
nix = {
package = pkgs.nixVersions.latest;
};
home.packages = with pkgs; [ pkgs.nixVersions.latest ];
}

View file

@ -60,6 +60,10 @@ with lib;
default = false;
description = "Whether to enable noise suppression or not";
};
nixVersion = mkOption {
type = types.package;
default = pkgs.nixVersions.latest;
};
};
nixGLPrefix = lib.mkOption {
type = lib.types.str;

View file

@ -24,7 +24,6 @@ in
home.packages =
with pkgs;
[
pkgs.nixVersions.latest # because remotely invoked updates are fun ;)
up
htop
rustc
@ -52,7 +51,7 @@ in
(pkgs.writeShellScriptBin "yt-dlp-audio" (builtins.readFile ./../scripts/yt-dlp-audio.sh))
(pkgs.writeShellScriptBin "nix-shell-init" (builtins.readFile ./../scripts/nix-shell-init.sh))
(pkgs.writeShellScriptBin "http-server" ''
${pkgs.caddy}/bin/caddy file-server --listen :2345
${pkgs.caddy}/bin/caddy file-server --listen :2345z
'')
(pkgs.writeShellScriptBin "nix-build-default" ''
nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'