nixos/common/base.nix

39 lines
850 B
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
2023-07-16 16:43:13 +03:00
let
my = import ../.;
secrets = my.secrets { inherit config; };
in {
2023-07-16 16:43:13 +03:00
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
2023-07-16 19:02:49 +03:00
settings = {
sandbox = true;
2023-07-16 19:02:49 +03:00
};
gc = {
automatic = true;
options = "--delete-older-than 7d";
};
2023-07-16 16:43:13 +03:00
};
2023-07-16 19:00:44 +03:00
documentation = {
doc.enable = false;
info.enable = false;
man.enable = true;
};
# mkDefaulting due to python3Minimal and python3Full collision
environment.systemPackages = lib.mkDefault (with pkgs;
[ wget curl git git-crypt neovim python3Minimal ]
++ lib.optionals pkgs.stdenv.isLinux [
usbutils
pciutils
coreutils
killall
]);
# Inject secrets through module arguments while evaluating configs.
_module.args.secrets = secrets;
}