refactor(system): flatten
This commit is contained in:
parent
8298fc375a
commit
33cbd9dfc7
12 changed files with 72 additions and 309 deletions
|
|
@ -1,10 +1,49 @@
|
|||
{ lib, ... }:
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf mapAttrs mapAttrsToList;
|
||||
host = config.systemModules.host;
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
./nh
|
||||
./nix
|
||||
./nixpkgs
|
||||
./subs
|
||||
./nh.nix
|
||||
./nixpkgs.nix
|
||||
./subs.nix
|
||||
];
|
||||
|
||||
config = mkIf (host.type != "phone") {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
git
|
||||
deadnix
|
||||
statix
|
||||
];
|
||||
defaultPackages = [];
|
||||
etc = {
|
||||
"nix/flake-channels/nixpkgs".source = inputs.nixpkgs;
|
||||
"nix/flake-channels/home-manager".source = inputs.nixpkgs;
|
||||
};
|
||||
};
|
||||
nix = {
|
||||
registry = mapAttrs (_: v: {flake = v;}) inputs;
|
||||
nixPath = mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = [ "18:00" ];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "Sun *-*-* 17:00";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
settings = {
|
||||
flake-registry = "etc/nix/registry.json";
|
||||
allowed-users = [ "root" "@wheel" ];
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue