♻️ consolidate nix configs

This commit is contained in:
2024-09-02 10:47:02 -04:00
parent 49884d40e5
commit 06ddc96680
49 changed files with 26 additions and 26 deletions

View File

@ -0,0 +1,39 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
dogdns
htop
inetutils
vim
];
nix = {
extraOptions = ''
experimental-features = nix-command flakes
'';
gc = {
automatic = true;
};
settings = {
substituters = [
"https://walkah.cachix.org"
"https://cache.garnix.io"
];
trusted-public-keys = [
"walkah.cachix.org-1:D8cO78JoJC6UPV1ZMgd1V5znpk3jNUERGIeAKN15hxo="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
};
programs = {
zsh = {
enable = true;
promptInit = "";
};
};
}

View File

@ -0,0 +1,57 @@
{ pkgs, dotfiles, ... }: {
imports = [ ./common.nix ];
nix = {
configureBuildUsers = true;
extraOptions = ''
extra-platforms = x86_64-darwin aarch64-darwin
'';
gc = {
interval = {
Hour = 3;
Minute = 16;
Weekday = 6;
};
options = "--delete-older-than 30d";
};
settings = {
trusted-users = [ "root" "@admin" ];
};
};
environment.etc = {
"sudoers.d/walkah".text = ''
walkah ALL = (ALL) NOPASSWD: ALL
'';
};
homebrew = {
enable = true;
brewPrefix = "/opt/homebrew/bin";
global = {
brewfile = true;
lockfiles = false;
};
onActivation = {
autoUpdate = true;
cleanup = "zap";
upgrade = true;
};
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.walkah = import "${dotfiles}/home.nix";
};
users.users.walkah = {
home = "/Users/walkah";
shell = pkgs.zsh;
};
system.stateVersion = 4;
}

View File

@ -0,0 +1,37 @@
{ config, ... }: {
imports = [ ./common.nix ../monitoring ];
nix = {
gc = {
persistent = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
settings = {
auto-optimise-store = true;
trusted-users = [ "root" "walkah" ];
};
};
programs = {
mosh.enable = true;
};
services = {
openssh.enable = true;
tailscale.enable = true;
};
system = {
autoUpgrade = {
enable = true;
flake = "github:walkah/athens#${config.networking.hostName}";
dates = "daily";
randomizedDelaySec = "5m";
};
stateVersion = "23.05";
};
}