Payas Relekar
0d0b6c7d2c
Move some logically independent and consisitent parts into separate modules (files): 1. Nix config : Package, experimental options, automatic garbage-collection config 2. Backups : Restic + rclone + systemd services for backup notifications This has reduced main configuration.nix by 100+ lines. These parts are also unlikely to be touched in tandem with other configuration and hence can be separated out.
24 lines
581 B
Nix
24 lines
581 B
Nix
{ config, lib, options, pkgs, ... }:
|
|
{
|
|
nix = {
|
|
# Enable Flakes systemwide, and set gc-roots for nix-direnv
|
|
package = pkgs.nixUnstable;
|
|
extraOptions = ''
|
|
experimental-features = nix-command flakes ca-derivations
|
|
keep-outputs = true
|
|
keep-derivations = true
|
|
'';
|
|
|
|
# Automated gabrage collection
|
|
gc = {
|
|
automatic = true;
|
|
dates = "20:30";
|
|
options = "--delete-older-than 5d";
|
|
};
|
|
|
|
# Auto-optimize nix-store, create hard-links to save space on /nix/store
|
|
settings = {
|
|
auto-optimise-store = true;
|
|
};
|
|
};
|
|
}
|