mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-19 07:05:51 +05:30
Use stable for servers and unstable for other
This commit is contained in:
parent
f93d400ad9
commit
0b2af12148
30
flake.nix
30
flake.nix
|
@ -58,14 +58,20 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# configure pkgs
|
# configure pkgs
|
||||||
pkgs = import nixpkgs-patched {
|
# use nixpkgs if running a server (homelab or worklab profile)
|
||||||
system = systemSettings.system;
|
# otherwise use patched nixos-unstable nixpkgs
|
||||||
config = {
|
pkgs = (if ((systemSettings.profile == "homelab") || (systemSettings.profile == "worklab"))
|
||||||
allowUnfree = true;
|
then
|
||||||
allowUnfreePredicate = (_: true);
|
pkgs-stable
|
||||||
};
|
else
|
||||||
overlays = [ rust-overlay.overlays.default ];
|
(import nixpkgs-patched {
|
||||||
};
|
system = systemSettings.system;
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowUnfreePredicate = (_: true);
|
||||||
|
};
|
||||||
|
overlays = [ rust-overlay.overlays.default ];
|
||||||
|
}));
|
||||||
|
|
||||||
pkgs-stable = import nixpkgs-stable {
|
pkgs-stable = import nixpkgs-stable {
|
||||||
system = systemSettings.system;
|
system = systemSettings.system;
|
||||||
|
@ -84,7 +90,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# configure lib
|
# configure lib
|
||||||
lib = nixpkgs.lib;
|
# use nixpkgs if running a server (homelab or worklab profile)
|
||||||
|
# otherwise use patched nixos-unstable nixpkgs
|
||||||
|
lib = (if ((systemSettings.profile == "homelab") || (systemSettings.profile == "worklab"))
|
||||||
|
then
|
||||||
|
nixpkgs-stable.lib
|
||||||
|
else
|
||||||
|
nixpkgs.lib);
|
||||||
|
|
||||||
# Systems that can run tests:
|
# Systems that can run tests:
|
||||||
supportedSystems = [ "aarch64-linux" "i686-linux" "x86_64-linux" ];
|
supportedSystems = [ "aarch64-linux" "i686-linux" "x86_64-linux" ];
|
||||||
|
|
Loading…
Reference in a new issue