♻️ refactor base config

This commit is contained in:
James Walker 2023-01-31 22:01:21 -05:00
parent d0ffe9eb60
commit 2faeb46c59
Signed by: walkah
GPG Key ID: 3C127179D6086E93
4 changed files with 39 additions and 35 deletions

View File

@ -53,11 +53,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1675100118, "lastModified": 1675178048,
"narHash": "sha256-vWNlY2zftRSDiLrNburh6opsM3pxutRIsRwRLQnSwq8=", "narHash": "sha256-jSP4Cww/CamPwiL/QOe8pgbzm9YPdNnIiUjN3o1gbnI=",
"owner": "cachix", "owner": "cachix",
"repo": "devenv", "repo": "devenv",
"rev": "2e20275b01464345c35d2aa42f8405fd8685a6e4", "rev": "06004e5b486e85409f49b7ad55301ba4750d9392",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -203,11 +203,11 @@
"utils": "utils_2" "utils": "utils_2"
}, },
"locked": { "locked": {
"lastModified": 1674928308, "lastModified": 1675203549,
"narHash": "sha256-elVU4NUZEl11BdT4gC+lrpLYM8Ccxqxs19Ix84HTI9o=", "narHash": "sha256-SehK6lTqcB5gv4QpoIHcWcqvwpLzHW42+681ZBg52cE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "08a778d80308353f4f65c9dcd3790b5da02d6306", "rev": "1d94de5604935591494eeb6ea80bc34ac84a9f23",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -354,11 +354,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1675062963, "lastModified": 1675153841,
"narHash": "sha256-a3IQvBtrwzgBWnLvY08VLCUKkF4bAb1DTgMtyJ+jmWc=", "narHash": "sha256-EWvU3DLq+4dbJiukfhS7r6sWZyJikgXn6kNl7eHljW8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1badc6db75d797f53c77d18d89c4eb8616d205cc", "rev": "ea692c2ad1afd6384e171eabef4f0887d2b882d3",
"type": "github" "type": "github"
}, },
"original": { "original": {

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 = { nix = {
configureBuildUsers = true; configureBuildUsers = true;
extraOptions = '' extraOptions = ''
extra-platforms = x86_64-darwin aarch64-darwin extra-platforms = x86_64-darwin aarch64-darwin
experimental-features = nix-command flakes
''; '';
gc = { gc = {
automatic = true; automatic = true;
}; };
settings = { settings = {
auto-optimise-store = true;
substituters = [
"https://walkah.cachix.org"
];
trusted-users = [ "root" "@admin" ]; trusted-users = [ "root" "@admin" ];
trusted-public-keys = [
"walkah.cachix.org-1:D8cO78JoJC6UPV1ZMgd1V5znpk3jNUERGIeAKN15hxo="
];
}; };
}; };

View File

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