2022-12-04 13:45:43 +00:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
config,
|
2023-09-21 05:06:27 +01:00
|
|
|
pkgs,
|
2022-12-04 13:45:43 +00:00
|
|
|
lib,
|
|
|
|
...
|
2023-09-01 01:46:14 +01:00
|
|
|
}: let
|
|
|
|
inherit (lib.strings) optionalString versionAtLeast;
|
2023-10-16 20:02:47 +01:00
|
|
|
inherit (lib.lists) optional;
|
|
|
|
inherit (lib.modules) mkIf;
|
2023-09-01 01:46:14 +01:00
|
|
|
in {
|
2024-04-02 16:40:20 +01:00
|
|
|
environment.systemPackages = with pkgs; [ nix-output-monitor ];
|
|
|
|
|
2021-12-20 23:48:26 +00:00
|
|
|
nix = {
|
2022-12-04 13:45:43 +00:00
|
|
|
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
|
|
|
extraOptions =
|
2023-09-01 01:46:14 +01:00
|
|
|
optionalString
|
|
|
|
(versionAtLeast config.nix.package.version "2.4") ''
|
2021-12-26 14:07:09 +00:00
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
2023-09-21 05:06:27 +01:00
|
|
|
settings.system-features = lib.optional (pkgs.system == "aarch64-linux") "native-arm64";
|
2022-12-04 13:45:43 +00:00
|
|
|
settings.trusted-users = ["root" "@wheel"];
|
2021-12-20 23:48:26 +00:00
|
|
|
};
|
2023-10-16 20:02:47 +01:00
|
|
|
nixpkgs = mkIf (!config.boot.isContainer) {
|
2023-06-03 17:11:29 +01:00
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
|
2023-12-20 17:38:38 +00:00
|
|
|
permittedInsecurePackages = [
|
|
|
|
"electron-25.9.0"
|
|
|
|
];
|
2023-06-03 17:11:29 +01:00
|
|
|
};
|
2022-02-08 12:17:15 +00:00
|
|
|
overlays = [
|
|
|
|
(import ../../overlay)
|
|
|
|
];
|
2021-12-20 23:48:26 +00:00
|
|
|
};
|
2022-11-10 14:57:07 +00:00
|
|
|
environment.etc."nixpkgs-commit".text = inputs.nixpkgs-unstable.rev;
|
2021-12-20 23:48:26 +00:00
|
|
|
}
|