♻️ refactor base config

This commit is contained in:
2023-01-31 22:01:21 -05:00
parent d0ffe9eb60
commit 2faeb46c59
4 changed files with 39 additions and 35 deletions

25
modules/base/common.nix Normal file
View File

@ -0,0 +1,25 @@
_:
{
nix = {
extraOptions = ''
experimental-features = nix-command flakes
'';
gc = {
automatic = true;
};
settings = {
auto-optimise-store = true;
substituters = [
"https://walkah.cachix.org"
];
trusted-public-keys = [
"walkah.cachix.org-1:D8cO78JoJC6UPV1ZMgd1V5znpk3jNUERGIeAKN15hxo="
];
};
};
}

View File

@ -1,28 +1,19 @@
_: {
imports = [ ./common.nix ];
nix = {
configureBuildUsers = true;
extraOptions = ''
extra-platforms = x86_64-darwin aarch64-darwin
experimental-features = nix-command flakes
'';
gc = {
automatic = true;
};
settings = {
auto-optimise-store = true;
substituters = [
"https://walkah.cachix.org"
];
trusted-users = [ "root" "@admin" ];
trusted-public-keys = [
"walkah.cachix.org-1:D8cO78JoJC6UPV1ZMgd1V5znpk3jNUERGIeAKN15hxo="
];
};
};

View File

@ -1,30 +1,18 @@
{ pkgs, ... }: {
imports = [ ./common.nix ];
environment.systemPackages = with pkgs; [
inetutils
vim
];
nix = {
extraOptions = ''
experimental-features = nix-command flakes
'';
gc = {
automatic = true;
persistent = true;
};
settings = {
auto-optimise-store = true;
substituters = [
"https://walkah.cachix.org"
];
trusted-users = [ "root" "walkah" ];
trusted-public-keys = [
"walkah.cachix.org-1:D8cO78JoJC6UPV1ZMgd1V5znpk3jNUERGIeAKN15hxo="
];
};
};
}