initial
This commit is contained in:
commit
b4c9b055fb
20 changed files with 1540 additions and 0 deletions
33
system/nix.nix
Normal file
33
system/nix.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
name = "nix";
|
||||
cfg = config.nixowos.system.${name};
|
||||
in
|
||||
{
|
||||
options.nixowos.system.${name} = {
|
||||
enable = lib.mkEnableOption name;
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# enable useful nix tools, and the flakes system
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
# you (should) never need this
|
||||
nix.channel.enable = false;
|
||||
|
||||
# reduces disk usage of the nix store
|
||||
# It does this by performing `nix store optimize` incrementally for each new path
|
||||
# source: https://nix.dev/manual/nix/2.26/command-ref/new-cli/nix3-store-optimise
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nixd
|
||||
nixfmt
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue