Compare commits

...
78 Commits
Author SHA1 Message Date
blake b7d27d8ea1 syncthing bullshit 2026-09-24 15:06:10 -05:00
blake 52641b8b10 change tailscale to cli via nix 2026-09-24 13:06:15 -05:00
blake 256a9684fe change tailscale to gui via nix 2026-09-24 12:58:10 -05:00
blake 6f74b4aff3 change tailscale to gui via nix 2026-09-24 12:56:14 -05:00
blake ae9a50f11e change tailscale to gui via nix 2026-09-24 12:55:38 -05:00
blake 8c9ff95e68 update hash update 2026-09-17 15:40:35 -05:00
blake b21b81caf4 updates for jellyfin 12.0 2026-09-17 15:36:06 -05:00
blake 17631704b1 switch jellyfin to unstable for 12.0 2026-09-17 15:29:34 -05:00
blake cf29da55dc add wger, prolly wont set all this up tho, its a lot 2026-09-17 12:13:11 -05:00
blake 4d512e6f6c enable status 2026-09-10 13:30:21 -05:00
blake 3dbcfe9ff1 allow the query port 2026-09-10 13:23:15 -05:00
blake d196fed0d8 add prepare for monitoring 2026-09-10 13:19:36 -05:00
blake 491721aed3 open valheim route 2026-09-10 13:08:06 -05:00
blake faceb9d0ca open valheim ports 2026-09-10 12:57:50 -05:00
blake 8832a4495b valheim ddns 2026-09-10 12:47:38 -05:00
blake 3e268f4b22 add forwards for valheim 2026-09-10 12:46:43 -05:00
blake c9d30a962c fix motd 2026-09-10 12:40:59 -05:00
blake 7176ce59d2 fix motd 2026-09-10 12:39:41 -05:00
blake 47c160200f add fix option path 2026-09-10 12:38:14 -05:00
blake 5e6d4b6344 add import 2026-09-10 12:36:09 -05:00
blake 409d84b530 add valheim to lumiose 2026-09-10 12:35:20 -05:00
blake 60e745a3d9 config valheim 2026-09-10 12:34:47 -05:00
blake c9dc8a0def init valheim 2026-09-10 12:22:13 -05:00
blake 071b6f0e66 add acrobat pro 2026-09-02 11:48:52 -05:00
blake 0d48663d81 dumb shit 2026-09-01 03:05:46 -05:00
blake c56e020dec navidrome change plugins folder 2026-09-01 02:40:53 -05:00
blake 5af6c6242b navidrome change plugins folder 2026-09-01 02:39:23 -05:00
blake 08c829a708 navidrome change plugins folder 2026-09-01 02:38:13 -05:00
blake 939fb8d96b navidrome change plugins folder 2026-09-01 02:34:16 -05:00
blake 6b43e1e1d6 navidrome change plugins folder 2026-09-01 02:26:47 -05:00
blake 8915ff714f navidrome change plugins folder, give up 2026-09-01 02:11:27 -05:00
blake ec9ba4f0e5 navidrome change plugins folder 2026-09-01 02:10:01 -05:00
blake b481fd9c6b navidrome change plugins folder 2026-09-01 02:09:21 -05:00
blake dbf21fa3e9 navidrome change plugins folder 2026-09-01 02:07:39 -05:00
blake 5c928aac70 add yt-dlp nixos 2026-09-01 01:06:37 -05:00
blake 074fec8677 fix alias 2026-08-31 22:55:27 -05:00
blake 503b850943 fix alias 2026-08-31 22:53:40 -05:00
blake eff0c765c0 fix alias 2026-08-31 22:52:30 -05:00
blake b5deb4334f fix alias add ffmpeg 2026-08-31 22:45:35 -05:00
blake 785bdc4b32 fix alias add ffmpeg 2026-08-31 22:42:04 -05:00
blake a483ea764e add yt-dlp zsh alias 2026-08-31 22:35:05 -05:00
blake f232163920 add yt-dlp zsh alias 2026-08-31 22:23:42 -05:00
blake aec377046e add yt-dlp 2026-08-31 22:16:19 -05:00
blake d22c274a52 add picard 2026-08-31 21:53:51 -05:00
blake b4ab71c8cd fix stupidity 2026-08-31 19:04:13 -05:00
blake 7dde6470a4 fix ls on macos and other nav, passwdless lf 2026-08-31 19:01:49 -05:00
blake 11ab7440fa add lidarr to mediastack import 2026-08-31 14:38:21 -05:00
blake 72107e2339 add lidar 2026-08-31 14:36:30 -05:00
blake b21eeb5b66 take down uptime-kuma public 2026-08-31 12:31:22 -05:00
blake 4b9a6bf8cc disable runescape 2026-08-31 12:00:52 -05:00
blake 7113725038 vaultwarden ssh 2026-08-31 08:48:25 -05:00
blake d9885a92d5 trying to figure out ipv6 2026-08-26 16:48:03 -05:00
blake 1138e567e6 tailscale and brew fiddling 2026-08-26 14:52:39 -05:00
blake e66dfa5d61 updates 2026/8/26 2026-08-26 13:41:12 -05:00
blake 03c1d94677 add flo 2026-08-25 23:19:30 -05:00
blake d7c8c9e6fe peazip 2026-08-25 23:17:27 -05:00
blake 4a887023b9 peazip 2026-08-25 23:16:51 -05:00
blake 4debf084fe config nextdns 2026-08-25 23:15:59 -05:00
blake b885fc14ab move timemachine back to archives 2026-08-25 17:08:29 -05:00
blake 53b2a66d8e update ddns 2026-08-25 15:01:13 -05:00
blake 38fd7ec62e add more to glance 2026-08-25 14:34:44 -05:00
blake 01906fc345 add more to glance 2026-08-25 14:32:53 -05:00
blake f45b902e58 reorganize glance 2026-08-25 13:24:35 -05:00
blake 9fa860c86c config nextdns 2026-08-25 12:56:52 -05:00
blake d9864bbebf config nextdns 2026-08-25 12:49:08 -05:00
blake 7d23d676bf add nextdns for darwin 2026-08-25 12:42:51 -05:00
blake 08fa7027d8 reorganize proxys 2026-08-25 12:29:35 -05:00
blake 3e97b5cd67 configuring navidrome 2026-08-25 10:55:58 -05:00
blake 92a71ec2ba change glance order 2026-08-25 10:43:56 -05:00
blake 9f626a0f8e add navidrome 2026-08-25 10:33:04 -05:00
blake d6c5d3ded4 add navidrome 2026-08-25 10:32:08 -05:00
blake cc76377b37 enable ssh for root 2026-08-23 14:49:55 -05:00
blake 2ada0e3e3a add trusted keys for root 2026-08-23 14:42:45 -05:00
blake 7f74cd42b4 add script 2026-08-23 13:22:46 -05:00
blake 843f85e23e add script 2026-08-23 13:21:14 -05:00
blake 54f224a598 update glance for service move 2026-08-23 12:46:19 -05:00
blake e4ebae88fe update glance for service move 2026-08-23 12:44:30 -05:00
blake 688c96ae9a update glance for service move 2026-08-23 12:43:27 -05:00
35 changed files with 840 additions and 723 deletions
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
cd /home/blake/.nix
git remote remove origin
git remote add origin ssh://gitea@git.holocron.blue:7567/blake/nix.git
git fetch
git branch --set-upstream-to=origin/trunk trunk
Generated
+39 -39
View File
@@ -106,16 +106,16 @@
"brew-src": {
"flake": false,
"locked": {
"lastModified": 1786945682,
"narHash": "sha256-VBESSoJccikdhxh3vp3SQeG7cZXTOulMvVkoSqNDEhs=",
"lastModified": 1788591592,
"narHash": "sha256-NbwVKwKLFl0oXub7oPjvmDaOygCtV2oboeKTu4xXFTk=",
"owner": "Homebrew",
"repo": "brew",
"rev": "5b90e281d4e0c8fbd6ca4d8358276fb305b8d0bd",
"rev": "08e85c4e42f5d8f1ea17c36cb59cf61c2ccb26c3",
"type": "github"
},
"original": {
"owner": "Homebrew",
"ref": "6.0.18",
"ref": "6.0.22",
"repo": "brew",
"type": "github"
}
@@ -126,11 +126,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1787004344,
"narHash": "sha256-/YbaX3cVP54l6Ol8qgS/K8H+Hu8zgyOgUVDLTv70txE=",
"lastModified": 1789598303,
"narHash": "sha256-hyAB8PqtE+2NPbXqFWFOVessao4ccpsQq6hKBfZPN0w=",
"owner": "9001",
"repo": "copyparty",
"rev": "6115eb452d2c2bbdeef5d19098fac17db69ddaa8",
"rev": "6867ccc51181e7965445c3d158ddddf9a8fd817e",
"type": "github"
},
"original": {
@@ -566,11 +566,11 @@
]
},
"locked": {
"lastModified": 1787377438,
"narHash": "sha256-Sxu1NLTD/Ern6hFGLlZmtKCSct3YQXZI/lls8RE1XeM=",
"lastModified": 1789267039,
"narHash": "sha256-LWiBv9yAYFi2LPbUhDGHPGKYskJQjj2fw12OlyO1uQo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "65258d5c65a250189fde2e35f490d15e064c4c62",
"rev": "ec172013fa62135f58fb58dd17ae9651e8f39727",
"type": "github"
},
"original": {
@@ -587,11 +587,11 @@
]
},
"locked": {
"lastModified": 1787487906,
"narHash": "sha256-zIdM+8teujHm5hc5MIPDnV7k2UeOOT/pFyFtWjOCwsY=",
"lastModified": 1789676441,
"narHash": "sha256-mOvO5VvycuBtOUe5EYI54vrLsWe+2KF/82fmwKooe48=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "cfba7ad5886b342b8dd63ba74354b3853ea4cfc9",
"rev": "9d485f74cd27d17126ee34cb31005c39d20f741f",
"type": "github"
},
"original": {
@@ -753,11 +753,11 @@
"brew-src": "brew-src"
},
"locked": {
"lastModified": 1787330919,
"narHash": "sha256-LslMncqN7uOOH5S88WZtO/EVt2HwD8ltUnfyANk+mC0=",
"lastModified": 1788981439,
"narHash": "sha256-fEaFq0XgpgWFPLfpq1UK4/8ylHd2T0+fo6O3hKz1LUM=",
"owner": "zhaofengli",
"repo": "nix-homebrew",
"rev": "b00218e4aec0e5bf07d61a0bb13f842faa582d7b",
"rev": "09a921d0181146cf6163ec2cc1db7b6fd539a885",
"type": "github"
},
"original": {
@@ -806,11 +806,11 @@
]
},
"locked": {
"lastModified": 1784642409,
"narHash": "sha256-hcbDqFuySAJawljt5r0sKBCJKYnbtGD0T/ZIozH1Dq0=",
"lastModified": 1789164534,
"narHash": "sha256-DoYGPM6QpnYBLWj9gGw6ZwAzIX+HrAVov1BoT+8Jixo=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "eaeb18da90024448a60eb1ec7132eafa4003404e",
"rev": "72c92b11bb8289e6651c7fef29cc0a885fd6a255",
"type": "github"
},
"original": {
@@ -837,11 +837,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1787360063,
"narHash": "sha256-95aJfHyQTLWslCXFVNB0odgmVkpdmDezQwTg9mhqV1E=",
"rev": "2c423e03bbafcff28bfadc6781a4a8257f205cb5",
"lastModified": 1789546076,
"narHash": "sha256-vWkSk5bbfTqdtMoSgD9FshACO8JCvXTFi+3cqEp0mH0=",
"rev": "b1b875982b17dabde9b4a37f3e229e74913e6db3",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1059570.2c423e03bbaf/nixexprs.tar.xz"
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1074753.b1b875982b17/nixexprs.tar.zst"
},
"original": {
"id": "nixpkgs",
@@ -851,11 +851,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1787204541,
"narHash": "sha256-Rb7J0ykni6QA+m5ZC6t5gbBBgkS0xn3bf2fgKpSSbFE=",
"rev": "5880666fd9eb563038431edb35c2d0aa595884e6",
"lastModified": 1789542786,
"narHash": "sha256-BGtBoaZNpOPDEBLTiWNFdYppnDjGhwrUq5/P15QwrrM=",
"rev": "4c7870105e7f1fdf9c48688c8d7efc21abf0688a",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.8111.5880666fd9eb/nixexprs.tar.xz"
"url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.9904.4c7870105e7f/nixexprs.tar.zst"
},
"original": {
"id": "nixpkgs",
@@ -944,11 +944,11 @@
]
},
"locked": {
"lastModified": 1787432068,
"narHash": "sha256-IwY4Dfd5xCnNo66Jx2CCyVRkIuZ9ub59v8+E6kVVlIY=",
"lastModified": 1789510188,
"narHash": "sha256-umec9LKkWjK89Yx4XpvQStkgfKvhK7GjVf5m21bjzKU=",
"owner": "notashelf",
"repo": "nvf",
"rev": "45ad22485d23bf131e3543eb7de16d0adf274e8b",
"rev": "cdc7e7aaa7eb521bba1b38f54c3228d52cc31703",
"type": "github"
},
"original": {
@@ -1235,11 +1235,11 @@
]
},
"locked": {
"lastModified": 1786629091,
"narHash": "sha256-gkig4nPi1CWc4Z50GBsjE4ygSE7hMpl/TwID2an2Cck=",
"lastModified": 1789623319,
"narHash": "sha256-kmlp8rPrvrXn58YiaANHKSWUijtUc7pwgerIywosOIM=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "a8627b21b9107c5711c96b84f32a9a4b3d45295f",
"rev": "16954c1c360c3dc4d4b3b3e64df59f7e89452cb1",
"type": "github"
},
"original": {
@@ -1334,11 +1334,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1787175104,
"narHash": "sha256-tzNjlb0loxeWlipvxSNAUUihloeTZoyGFhEen87yM9k=",
"lastModified": 1787771653,
"narHash": "sha256-DkkJSBOXWV/mja5Vy8az5g1KpZlsbUwlmH0BsQhowaQ=",
"owner": "nix-community",
"repo": "stylix",
"rev": "a9e5a76a1b75b137f266e4f445e1eaba82e9783e",
"rev": "5e3809851f486e7fc7e84b40f174c74b60ecc784",
"type": "github"
},
"original": {
@@ -1450,11 +1450,11 @@
},
"vpn-confinement": {
"locked": {
"lastModified": 1785142579,
"narHash": "sha256-WEPxDMiKt3uGVVu/aorHnIgYYW62mEq2Q+rlN3qH6bg=",
"lastModified": 1789394839,
"narHash": "sha256-trdjVJKmDBbzgbP8pd+R7iKbGkdRu0nmXgQlBR/hEiU=",
"owner": "Maroka-chan",
"repo": "VPN-Confinement",
"rev": "b3aa71a7edfe6af748c23729d1bdec3b499741ff",
"rev": "a21f66ccd9f644c3770ccdf287cb380c00192628",
"type": "github"
},
"original": {
+7 -5
View File
@@ -15,6 +15,7 @@
darwin = {
syncthing.enable = true;
tailscale.enable = true;
nextdns.enable = true;
yubikey.enable = true;
work.enable = true;
apps.enable = true;
@@ -56,7 +57,7 @@
formulae = [];
casks = [];
commands = [];
#taps = ["mhaeuser/mhaeuser"];
taps = ["rogeriopradoj/cask-peazip"];
};
};
@@ -66,12 +67,12 @@
onActivation = {
cleanup = "zap";
autoUpdate = false;
upgrade = false;
upgrade = true;
};
# taps = [
# "mhaeuser/mhaeuser"
# ];
taps = [
"rogeriopradoj/cask-peazip"
];
brews = [
"mas"
@@ -84,6 +85,7 @@
"linearmouse"
"betterdisplay"
"rectangle"
"peazip"
];
masApps = {
# "name" = app_id_number;
+13 -1
View File
@@ -53,7 +53,15 @@
powerManagement.powertop.enable = true;
# things are better this way
users.defaultUserShell = pkgs.zsh;
users = {
defaultUserShell = pkgs.zsh;
users.root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO06en1r4+zg8JMGPq7WiZeh/DBUvfhDJX3e+J5Z5Ttk blake@snowbelle"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP0FLKK9yEPYpGuCjoX0e7Ky/zTPfzDk7IkrR3tOmELP blake@vaniville"
];
};
};
# base system package install list
environment.systemPackages = with pkgs; [
@@ -117,6 +125,10 @@
command = "/run/current-system/sw/bin/rsync";
options = ["NOPASSWD"];
}
{
command = "/etc/profiles/per-user/blake/bin/lf";
options = ["NOPASSWD"];
}
];
}
];
+9
View File
@@ -20,6 +20,7 @@
#../../../modules/gameservers/srcds
../../../modules/gameservers/minecraft_recpro
../../../modules/gameservers/minecraft_modded
../../../modules/gameservers/valheim
];
home-manager.users.blake.imports = [
@@ -91,6 +92,7 @@
gameservers = {
minecraft_recpro.enable = true;
minecraft_modded.enable = false;
valheim.enable = true;
};
# boot (systemd is going on me)
@@ -111,6 +113,12 @@
networking = {
hostName = "lumiose"; # hostname
hostId = "007f0200";
getaddrinfo = {
enable = true;
precedence = {
"::ffff:0:0/96" = 100;
};
};
networkmanager = {
enable = true; # the goat
dns = "systemd-resolved"; # the backup dancer!
@@ -160,6 +168,7 @@
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.kernelParams = ["ipv6.disable=1"];
boot.extraModulePackages = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+13 -8
View File
@@ -32,7 +32,7 @@ in {
homelab = {
enable = true;
base_domain = "vaniville.holocron.blue";
host_ip = "96.126.127.102";
host_ip = "100.100.1.10";
ddns.enable = true;
uptime-kuma = {
enable = true;
@@ -124,7 +124,7 @@ in {
enable = true;
allowedTCPPorts = [22 80 443 25777 25579 7567 21115 21116 21117 21118 21119];
# tailscale will also need its UDP port open:
allowedUDPPorts = [config.services.tailscale.port 25777 21116 25580];
allowedUDPPorts = [config.services.tailscale.port 2456 2457 25777 21116 25580];
trustedInterfaces = ["tailscale0"];
/*
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination ${snowbelle_ip}:80 # http
@@ -146,12 +146,16 @@ in {
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 25777 -j DNAT --to-destination ${lumiose_ip}:25777 # recpro mc
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25579 -j DNAT --to-destination ${snowbelle_ip}:25579 # craftoria mc
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 25580 -j DNAT --to-destination ${snowbelle_ip}:25580 # craftoria mc voice chat
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 2456 -j DNAT --to-destination ${lumiose_ip}:2456 # valheim server
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 2457 -j DNAT --to-destination ${lumiose_ip}:2457 # valheim server
# SNAT: ensure replies go back through VPS tailscale IP
iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 25777 -d ${lumiose_ip}/32 -j SNAT --to-source ${vpsip4} # recpro mc
iptables -t nat -A POSTROUTING -o tailscale0 -p udp --dport 25777 -d ${lumiose_ip}/32 -j SNAT --to-source ${vpsip4} # recpro mc
iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 25579 -d ${snowbelle_ip}/32 -j SNAT --to-source ${vpsip4} # craftoria mc
iptables -t nat -A POSTROUTING -o tailscale0 -p udp --dport 25580 -d ${snowbelle_ip}/32 -j SNAT --to-source ${vpsip4} # craftoria mc voicechat
iptables -t nat -A POSTROUTING -o tailscale0 -p udp --dport 2456 -d ${lumiose_ip}/32 -j SNAT --to-source ${vpsip4} # valheim server
iptables -t nat -A POSTROUTING -o tailscale0 -p udp --dport 2457 -d ${lumiose_ip}/32 -j SNAT --to-source ${vpsip4} # valheim server
'';
};
};
@@ -181,15 +185,9 @@ in {
"media.${homelab.public_domain}".extraConfig = ''
reverse_proxy ${lumiose_ip}:7100
'';
# "pass.${homelab.public_domain}".extraConfig = ''
# reverse_proxy 127.0.0.1:7701
# '';
"photos.${homelab.public_domain}".extraConfig = ''
reverse_proxy ${lumiose_ip}:7702
'';
# "git.${homelab.public_domain}".extraConfig = ''
# reverse_proxy localhost:7703
# '';
"hass.${homelab.public_domain}".extraConfig = ''
reverse_proxy ${lumiose_ip}:7704 {
header_up Host {host}
@@ -198,6 +196,13 @@ in {
header_up X-Forwarded-Proto https
}
'';
# now hosted on vaniville!
# "pass.${homelab.public_domain}".extraConfig = ''
# reverse_proxy 127.0.0.1:7701
# '';
# "git.${homelab.public_domain}".extraConfig = ''
# reverse_proxy localhost:7703
# '';
};
};
+5
View File
@@ -23,6 +23,9 @@ in {
"sl"
"cowsay"
"apfel"
"yt-dlp"
"ffmpeg"
"ffmpeg-full"
];
casks = [
"gnucash"
@@ -43,6 +46,7 @@ in {
"yacreader"
"keepassxc"
"thunderbird"
"musicbrainz-picard"
];
masApps = {
"pages" = 361309726;
@@ -52,6 +56,7 @@ in {
"darkreader" = 1438243180;
"ghostery" = 6504861501;
"privacy" = 6449850851;
"flo" = 6529533140;
};
};
};
+1 -1
View File
@@ -6,6 +6,7 @@
}: {
imports = [
./tailscale
./nextdns
./syncthing
./yubikey
./work
@@ -13,5 +14,4 @@
./cyber
./gaming
];
}
+6 -8
View File
@@ -3,8 +3,7 @@
config,
lib,
...
}:
let
}: let
service = "gaming";
cfg = config.darwin.${service};
in {
@@ -13,10 +12,9 @@ in {
};
config = lib.mkIf cfg.enable {
# environment.systemPackages = with pkgs; [
# uhhh
# ];
# environment.systemPackages = with pkgs; [
# uhhh
# ];
homebrew = {
brews = [
@@ -25,8 +23,8 @@ in {
"steam"
"prismlauncher"
"discord"
"runelite"
"jagex"
# "runelite"
# "jagex"
];
masApps = {
};
+23
View File
@@ -0,0 +1,23 @@
{
pkgs,
config,
lib,
inputs,
...
}: let
service = "nextdns";
cfg = config.darwin.${service};
in {
options.darwin.${service} = {
enable = lib.mkEnableOption "enables ${service}";
};
config = lib.mkIf cfg.enable {
services.${service} = {
enable = true;
arguments = [
"-profile 527db2"
];
};
};
}
+13 -11
View File
@@ -8,23 +8,25 @@
service = "tailscale";
cfg = config.darwin.${service};
in {
options.darwin.tailscale = {
enable = lib.mkEnableOption "enables tailscale";
};
config = lib.mkIf cfg.enable {
services.tailscale = {
enable = true;
#overrideLocalDns = true;
#authKeyFile = authkey_file;
};
# services.tailscale = {
# enable = true;
# #overrideLocalDns = true;
# #authKeyFile = authkey_file;
# };
homebrew = {
casks = [
"tailscale-app"
];
};
# environment.systemPackages = with pkgs; [
# tailscale-gui
# ];
# homebrew = {
# casks = [
# "tailscale-app"
# ];
# };
};
}
+6 -7
View File
@@ -8,17 +8,16 @@
service = "work";
cfg = config.darwin.${service};
in {
options.darwin.work = {
enable = lib.mkEnableOption "installs apps for work";
};
config = lib.mkIf cfg.enable {
services.tailscale = {
enable = true;
#overrideLocalDns = true;
#authKeyFile = authkey_file;
};
# services.tailscale = {
# enable = true;
# #overrideLocalDns = true;
# #authKeyFile = authkey_file;
# };
homebrew = {
casks = [
@@ -27,11 +26,11 @@ in {
"microsoft-office"
"jump-desktop"
"wifiman"
"adobe-acrobat-pro"
];
masApps = {
"configurator" = 1037126344;
};
};
};
}
@@ -1,160 +0,0 @@
{
pkgs,
config,
lib,
inputs,
...
}: let
service = "copyparty";
cfg = config.holocron.${service};
sec = config.sops.secrets;
homelab = config.homelab;
in {
imports = [inputs.copyparty.nixosModules.default];
options.holocron.${service} = {
enable = lib.mkEnableOption "enables ${service}";
# set port options
port = lib.mkOption {
type = lib.types.int;
default = 7902;
description = "set port for ${service} (default: ${toString cfg.port}";
};
url = lib.mkOption {
type = lib.types.str;
default = "${service}.${homelab.base_domain}";
description = "set domain for ${service}";
};
data_dir = lib.mkOption {
type = lib.types.str;
default = "/var/lib/${service}";
description = "set data directory for ${service}";
};
ids = lib.mkOption {
type = lib.types.int;
default = cfg.port;
description = "set uid and pid of ${service} user (matches port by default)";
};
backup = lib.mkOption {
type = lib.types.bool;
default = true;
description = "enable backups for ${service}";
};
};
config = lib.mkIf cfg.enable {
nixpkgs.overlays = [inputs.copyparty.overlays.default];
# declare ${service} group
users.groups.${service} = {
gid = lib.mkForce cfg.ids;
};
# declare ${service} user
users.users.${service} = {
description = lib.mkForce "${service} server user";
uid = lib.mkForce cfg.ids;
isSystemUser = true;
home = cfg.data_dir;
createHome = true;
group = service;
extraGroups = [ "media" "blake" "archives" ];
};
# enable the ${service} service
services.${service} = {
enable = true;
user = service;
group = service;
settings = {
i = "0.0.0.0";
p = [7902];
rproxy = 1;
};
accounts = {
blake = {
passwordFile = sec."copyparty_passwd".path;
};
};
groups = {
media = ["blake"];
};
volumes = {
"/archives" = {
path = "/holocron/archives";
access = {
r = "*";
A = "blake";
};
flags = {
chmod_f = 660;
chmod_d = 770;
#gid = ?;
};
};
"/media" = {
path = "/holocron/media";
access = {
r = "*";
w = "@media";
A = "blake";
};
flags = {
chmod_f = 660;
chmod_d = 770;
gid = "700";
};
};
"/users/blake" = {
path = "/holocron/users/blake";
access = {
A = "blake";
};
flags = {
chmod_f = 660;
chmod_d = 770;
gid = "1000";
};
};
};
};
# open firewall
networking.firewall.allowedTCPPorts = [cfg.port];
# add to caddy for reverse proxy
services.caddy.virtualHosts."${cfg.url}" = {
serverAliases = ["${service}.${homelab.public_domain}"];
extraConfig = ''
tls /etc/ssl/blakedheld.xyz.crt /etc/ssl/blakedheld.xyz.key
reverse_proxy 127.0.0.1:${toString cfg.port} {
}
'';
};
# add to glance (local service)
homelab.glance.links.system = [
{
title = service;
url = "https://${cfg.url}";
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
icon = "di:${service}";
}
];
sops.secrets = {
"${service}_passwd" = {
owner = service;
group = service;
};
};
# add to backups
homelab.backups.baks = {
${service} = {
paths = [cfg.data_dir];
};
};
};
}
@@ -1,20 +0,0 @@
{
pkgs,
config,
lib,
inputs,
...
}: {
# services show up in glance in reverse import order lmao
imports = [
./nfs
./smb
./zfs
#./syncthing
#./copyparty
./perms
];
# define the groups used for backups and archives
users.groups.archives = {gid = 727;};
}
@@ -1,28 +0,0 @@
{
pkgs,
config,
lib,
...
}:
# define nfs exports
let
cfg = config.holocron.nfs;
nfs_exports = ''
/holocron/media *(ro,sync,no_subtree_check)
'';
#/holocron/users *(rw,sync,no_subtree_check,no_root_squash)
in {
options.holocron.nfs = {
enable = lib.mkEnableOption "enables nfs";
};
config = lib.mkIf cfg.enable {
# enable nfs with all exports
services.nfs = {
server = {
enable = true;
exports = nfs_exports;
};
};
};
}
@@ -1,65 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
service = "ensure_perms";
cfg = config.holocron.${service};
# define variables for paths
archives_path = "/holocron/archives";
media_path = "/holocron/media";
users_path = "/holocron/users";
in {
options.holocron.ensure_perms = {
enable = lib.mkEnableOption "enables perms ensurence script";
};
config = lib.mkIf cfg.enable {
# service to run periodically to reset the perms on all zpools
# everything works fine without this, just for peace of mind
# and to clean up the ownership from the arr stack in /holocron/media
systemd.services.${service} = {
description = "ensure file permissions for archives, media and user folders";
serviceConfig = {
Type = "oneshot";
ExecStart = pkgs.writeShellScript "ensure_perms" ''
# Fix ownership for archives directory
echo "starting ${archives_path}"
chown -Rc root:archives ${archives_path}
find "${archives_path}" -type d -exec chmod 2770 "$@" {} +
find "${archives_path}" -type f -exec chmod 660 "$@" {} +
# Fix ownership for media directory
echo "starting ${media_path}"
chown -Rc root:media ${media_path}
find "${media_path}" -type d -exec chmod 2770 "$@" {} +
find "${media_path}" -type f -exec chmod 660 "$@" {} +
# Fix user directories
for user_dir in ${users_path}/*; do
if [ -d "$user_dir" ]; then
user=$(basename "$user_dir")
echo "starting $user_dir"
chown -Rc $user:$user $user_dir
find $user_dir -type d -exec chmod 2770 "$@" {} +
find $user_dir -type f -exec chmod 660 "$@" {} +
fi
done
echo "fin"
'';
};
};
systemd.timers.${service} = {
description = "run script to ensure_perms daily";
wantedBy = ["timers.target"];
timerConfig = {
OnCalendar = "03:30";
Persistent = true;
};
};
};
}
@@ -1,97 +0,0 @@
{
pkgs,
config,
lib,
...
}:
# define smb shares
let
cfg = config.holocron.smb;
smb_shares = {
global = {
"ea support" = "yes";
"vfs objects" = "catia fruit streams_xattr";
"fruit:aapl" = "yes";
"fruit:metadata" = "stream";
"fruit:model" = "MacSamba";
"fruit:posix_rename" = "yes";
"fruit:nfs_aces" = "no";
"fruit:veto_appledouble" = "no";
"fruit:wipe_intentionally_left_blank_rfork" = "yes";
"fruit:delete_empty_adfiles" = "yes";
};
archives = {
path = "/holocron/archives";
browseable = true;
writable = true;
guestOk = false;
"create mask" = "0775";
"directory mask" = "0775";
};
timemachine = {
browseable = true;
"path" = "/holocron/archives/timemachine";
"valid users" = "blake";
"public" = "no";
"writeable" = "yes";
"force user" = "blake";
"fruit:aapl" = "yes";
"fruit:time machine" = "yes";
"vfs objects" = "catia fruit streams_xattr";
};
users = {
path = "/holocron/users";
browseable = true;
writable = true;
guestOk = false;
"create mask" = "0660";
"directory mask" = "0770";
};
media = {
path = "/holocron/media";
browseable = true;
writable = true;
guestOk = false;
"create mask" = "0775";
"directory mask" = "0775";
};
};
in {
options.holocron.smb = {
enable = lib.mkEnableOption "enables smb";
};
config = lib.mkIf cfg.enable {
# enable smb with all shares
services.samba = {
enable = true;
settings = smb_shares;
};
# Ensure Time Machine can discover the share without `tmutil`
services.avahi = {
extraServiceFiles = {
timemachine = ''
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=TimeCapsule8,119</txt-record>
</service>
<service>
<type>_adisk._tcp</type>
<txt-record>dk0=adVN=timemachine,adVF=0x82</txt-record>
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
</service>
</service-group>
'';
};
};
};
}
@@ -1,89 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
service = "syncthing";
cfg = config.holocron.${service};
sec = config.sops.secrets;
url = "syncthing.snowbelle.blakedheld.xyz";
homelab = config.homelab;
in {
options.holocron.${service} = {
enable = lib.mkEnableOption "enables syncthing";
};
config = lib.mkIf cfg.enable {
services.syncthing = {
enable = true;
user = "blake";
group = "blake";
dataDir = "/var/lib/syncthing";
guiAddress = "0.0.0.0:2222";
openDefaultPorts = true;
#extraFlags = ["--no-default-folder"];
key = sec."${service}/snowbelle/key".path;
cert = sec."${service}/snowbelle/cert".path;
settings = {
devices = {
"mudkip" = {id = "OV4NUQK-3YHRL5R-SIZGTNL-7VZFFUX-FOJ6NTS-C7ROXR7-I2Q2W7G-QERO7AO";};
"zygarde" = {id = "UYLTF52-VVKUR7F-JN33HQZ-RFNWGL3-JER52LA-GZD2LPJ-QIFEE7K-MNMZRQ5";};
"yveltal" = {id = "ZVSQ4WJ-7OICYOZ-3ECES4X-KH37IPB-TKHKUJG-BSEGXVM-AHYY5C3-VKG44AX";};
"CEN-IT-07" = {id = "DPYKA4Z-3PX7JB2-FBEOXXX-SC7TLT2-QC5P2IR-SXOPJGX-QO3DMII-5B7UCA4";};
"CEN-IT-00007" = {id = "XBPXGYU-DUJSLDH-6BDNF4D-CO2COC3-N3FM6W5-IHZOJBM-Z2N77RI-IVAV5AH";};
};
folders = {
"holocron" = {
path = "/holocron/users/blake/holocron";
devices = ["mudkip" "zygarde" "CEN-IT-07" "CEN-IT-00007" "yveltal"];
id = "5voxg-c3he2";
versioning = {
type = "staggered";
fsPath = "/holocron/users/blake/holocron/.stversions";
params = {
cleanInterval = "3600";
maxAge = "0";
};
};
};
};
options = {
urAccepted = -1;
};
};
};
sops.secrets = {
"${service}/snowbelle/key" = {
owner = "blake";
group = "blake";
};
"${service}/snowbelle/cert" = {
owner = "blake";
group = "blake";
};
};
homelab.backups.baks = {
${service} = {paths = [config.services.syncthing.dataDir];};
};
services.caddy.virtualHosts."${url}" = {
extraConfig = ''
tls internal
reverse_proxy 127.0.0.1:2222
'';
};
# add to glance (local service)
homelab.glance.links.system = [
{
title = service;
url = "https://${url}";
error-url = "http://${homelab.host_ip}:2222";
check-url = "http://${homelab.host_ip}:2222";
icon = "di:${service}";
}
];
};
}
@@ -1,79 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
cfg = config.holocron.zfs;
in {
options.holocron.zfs = {
enable = lib.mkEnableOption "enables zfs";
};
config = lib.mkIf cfg.enable {
# set network host id
networking.hostId = "3e6e7055";
# enable zfs support
boot.zfs.forceImportRoot = false;
boot.kernelModules = ["zfs"];
boot.supportedFilesystems = ["zfs"];
# arc cache size
boot.kernelParams = ["zfs.zfs_arc_max=12884901888"];
# pools to import
#boot.zfs.extraPools = [ "holocron" "holocron/archives" "/holocron/media" "/holocron/users" ];
#boot.zfs.extraPools = [ "holocron" ];
# enable smart monitoring
services.smartd = {
enable = true;
autodetect = true;
defaults.monitored = "-a -o on -s (S/../.././05|L/../01/./05)";
notifications.mail = {
enable = true;
sender = "zfs@snowbelle.lan";
};
};
# enable zfs
services.zfs = {
autoScrub.enable = true;
autoScrub.interval = "weekly";
# email notifs
zed = {
enableMail = false;
settings = {
ZED_EMAIL_ADDR = ["root"];
# send notification if scrub succeeds
ZED_NOTIFY_VERBOSE = true;
};
};
};
# install userspace tools for acl's
environment.systemPackages = with pkgs; [smartmontools];
fileSystems."/holocron" = {
device = "holocron";
fsType = "zfs";
options = ["nofail"];
};
fileSystems."/holocron/archives" = {
device = "holocron/archives";
fsType = "zfs";
options = ["nofail"];
};
fileSystems."/holocron/users" = {
device = "holocron/users";
fsType = "zfs";
options = ["nofail"];
};
fileSystems."/holocron/media" = {
device = "holocron/media";
fsType = "zfs";
options = ["nofail"];
};
};
}
+1 -1
View File
@@ -34,7 +34,7 @@ let
};
timemachine = {
browseable = true;
"path" = "/holocron/timemachine";
"path" = "/holocron/archives/timemachine";
"valid users" = "blake";
"public" = "no";
"writeable" = "yes";
@@ -38,14 +38,14 @@ in {
path = "/holocron/users/blake/holocron";
devices = ["piplup" "zygarde" "CEN-IT-07" "CEN-IT-00007" "yveltal"];
id = "5voxg-c3he2";
versioning = {
type = "staggered";
fsPath = "/holocron/users/blake/holocron/.stversions";
params = {
cleanInterval = "3600";
maxAge = "0";
};
};
# versioning = {
# type = "staggered";
# fsPath = "/holocron/users/blake/holocron/.stversions";
# params = {
# cleanInterval = "3600";
# maxAge = "0";
# };
# };
};
};
options = {
+149
View File
@@ -0,0 +1,149 @@
{
pkgs,
config,
lib,
inputs,
...
}: let
nixservice = "podman-valheim";
service = "valheim";
cfg = config.gameservers.${service};
sec = config.sops.secrets;
homelab = config.homelab;
in {
options.gameservers.${service} = {
enable = lib.mkEnableOption "enables ${service}";
# set port options
port = lib.mkOption {
type = lib.types.int;
default = 2456;
description = "set port for ${service} (default: ${toString cfg.port}";
};
url = lib.mkOption {
type = lib.types.str;
default = "${service}.${homelab.base_domain}";
description = "set domain for ${service}";
};
data_dir = lib.mkOption {
type = lib.types.str;
default = "/var/lib/gameservers/${service}";
description = "set data directory for ${service}";
};
ids = lib.mkOption {
type = lib.types.int;
default = cfg.port;
description = "set uid and pid of ${service} user (matches port by default)";
};
motd_gs = lib.mkOption {
type = lib.types.nullOr (lib.types.listOf lib.types.str);
default = ["podman-valheim"];
};
backup = lib.mkOption {
type = lib.types.bool;
default = false;
description = "enable backups for ${service}";
};
backup_repo = lib.mkOption {
type = lib.types.path;
default = "/var/backup/gameservers/valheim";
description = "path to take hourly backups to with borg!";
};
offsite_user = lib.mkOption {
type = lib.types.str;
default = "lifeboat";
description = "user to connect to offsite host with";
};
offsite_target = lib.mkOption {
type = lib.types.str;
default = "lifeboat.holocron.blue";
description = "ip or domain for offsite backups";
};
offsite_dir = lib.mkOption {
type = lib.types.str;
default = "lifeboat/holocron/archives/gameservers";
description = "path to rsync offsite backups to";
};
};
config = lib.mkIf cfg.enable {
# declare ${service} group
users.groups.${service} = {gid = lib.mkForce cfg.ids;};
# declare ${service} user
users.users.${service} = {
description = "${service} server user";
uid = lib.mkForce cfg.ids;
isSystemUser = true;
home = cfg.data_dir;
createHome = true;
group = service;
extraGroups = [];
};
virtualisation.oci-containers.containers = {
${service} = {
image = "ghcr.io/community-valheim-tools/valheim-server";
autoStart = true;
extraOptions = [
"--cap-add=sys_nice"
"--stop-timeout=120"
];
ports = [
"2456-2457:2456-2457/udp"
"2456:80/tcp"
];
volumes = [
"${cfg.data_dir}/config:/config"
"${cfg.data_dir}/data:/opt/valheim"
];
environment = {
SERVER_NAME = "recpro";
SERVER_PASS = "recoil727pro";
#WORLD_NAME = "";
STATUS_HTTP = "true";
TZ = homelab.tz;
PUID = toString config.users.users.${service}.uid;
PGID = toString config.users.groups.${service}.gid;
};
};
};
# override umask to make permissions work out
systemd.services.${service}.serviceConfig = {
UMask = lib.mkForce "0007";
};
# open firewall
networking.firewall.allowedTCPPorts = [cfg.port];
networking.firewall.allowedUDPPorts = [2456 2457];
# backups valhiem with borg!
services.borgbackup.jobs.${service} = {
archiveBaseName = service;
repo = cfg.backup_repo;
paths = cfg.data_dir;
compression = "auto,zstd";
#preHook = "systemctl start mysql-backup.service";
postHook = ''
${pkgs.sshpass}/bin/sshpass -f ${sec."lifeboat_rsync".path} \
${pkgs.rsync}/bin/rsync -aHAX --partial --numeric-ids --info=progress2,name1,stats2 --delete \
-e "ssh -o StrictHostKeyChecking=no" \
${toString cfg.backup_repo} \
${cfg.offsite_user}@${cfg.offsite_target}::${cfg.offsite_dir}
'';
startAt = "*-*-* *:00:00";
group = "archives";
encryption.mode = "repokey-blake2";
encryption.passCommand = "cat ${config.sops.secrets."borg_passwd".path}";
extraArgs = ["--verbose" "--show-rc" "--umask" "0007"];
extraCreateArgs = ["--list" "--stats" "--filter" "AME"];
prune.keep = {
within = "1d"; # Keep all archives from the last day
hourly = 24;
daily = 7;
weekly = 12;
monthly = -1; # Keep at least one archive for each month
};
};
};
}
+9 -5
View File
@@ -27,13 +27,15 @@ in {
# the order determines the order in glance :3
imports = [
./bazarr
./prowlarr
./radarr
./qbittorrent
./sonarr
./yacreader
./bazarr
./qbittorrent
./prowlarr
./lidarr
./radarr
./sonarr
./audiobookshelf
./navidrome
./jellyfin
./flaresolverr
];
@@ -56,7 +58,9 @@ in {
homelab.prowlarr.enable = lib.mkDefault true;
homelab.radarr.enable = lib.mkDefault true;
homelab.sonarr.enable = lib.mkDefault true;
homelab.lidarr.enable = lib.mkDefault true;
homelab.audiobookshelf.enable = lib.mkDefault true;
homelab.navidrome.enable = lib.mkDefault true;
homelab.flaresolverr.enable = lib.mkDefault true;
};
}
@@ -7,6 +7,7 @@
service = "jellyfin";
cfg = config.homelab.${service};
homelab = config.homelab;
host = config.networking.hostName;
in {
options.homelab.${service} = {
enable = lib.mkEnableOption "enables ${service}";
@@ -61,6 +62,7 @@ in {
# enable the ${service} service
services.${service} = {
enable = true;
package = pkgs.unstable.jellyfin;
openFirewall = true;
user = service;
group = service;
@@ -85,7 +87,7 @@ in {
homelab.glance.links.mediastack = [
{
title = service;
url = "https://media.${homelab.public_domain}";
url = "https://media.${host}.${homelab.public_domain}";
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
icon = "di:${service}";
@@ -0,0 +1,108 @@
{
pkgs,
config,
lib,
...
}: let
service = "lidarr";
cfg = config.homelab.${service};
sec = config.sops.secrets;
homelab = config.homelab;
in {
options.homelab.${service} = {
enable = lib.mkEnableOption "enables ${service}";
# set port options
port = lib.mkOption {
type = lib.types.int;
default = 7109;
description = "set port for ${service} (default: ${toString cfg.port}";
};
url = lib.mkOption {
type = lib.types.str;
default = "${service}.${homelab.base_domain}";
description = "set domain for ${service}";
};
data_dir = lib.mkOption {
type = lib.types.str;
default = "/var/lib/${service}";
description = "set data directory for ${service}";
};
ids = lib.mkOption {
type = lib.types.int;
default = cfg.port;
description = "set uid and pid of ${service} user (matches port by default)";
};
backup = lib.mkOption {
type = lib.types.bool;
default = true;
description = "enable backups for ${service}";
};
motd = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = service;
};
};
config = lib.mkIf cfg.enable {
# required
environment.systemPackages = with pkgs; [ffmpeg_6-headless yt-dlp];
# declare ${service} group
users.groups.${service} = {gid = lib.mkForce cfg.ids;};
# declare ${service} user
users.users.${service} = {
description = "${service} server user";
uid = lib.mkForce cfg.ids;
isSystemUser = true;
home = cfg.data_dir;
createHome = true;
group = service;
extraGroups = ["media"];
};
# enable the ${service} service
services.${service} = {
enable = true;
openFirewall = true;
user = service;
group = service;
dataDir = cfg.data_dir;
settings = {
server.port = cfg.port;
};
};
# override umask to make permissions work out
systemd.services.${service}.serviceConfig = {
UMask = lib.mkForce "0007";
# User = service;
# Group = service;
};
# add to caddy for reverse proxy
services.caddy.virtualHosts."${cfg.url}" = {
extraConfig = ''
tls internal
reverse_proxy 127.0.0.1:${toString cfg.port}
'';
};
# add to glance
homelab.glance.links.mediastack = [
{
title = service;
url = "https://${cfg.url}";
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
icon = "di:${service}";
}
];
# add to backups
homelab.backups.baks = {
${service} = {paths = [cfg.data_dir];};
};
};
}
@@ -0,0 +1,115 @@
{
pkgs,
config,
lib,
...
}: let
service = "navidrome";
cfg = config.homelab.${service};
homelab = config.homelab;
in {
options.homelab.${service} = {
enable = lib.mkEnableOption "enables ${service}";
# set port options
port = lib.mkOption {
type = lib.types.int;
default = 7108;
description = "set port for ${service} (default: ${toString cfg.port}";
};
url = lib.mkOption {
type = lib.types.str;
default = "music.${homelab.base_domain}";
description = "set domain for ${service}";
};
data_dir = lib.mkOption {
type = lib.types.str;
default = "/var/lib/${service}";
description = "set data directory for ${service}";
};
ids = lib.mkOption {
type = lib.types.int;
default = cfg.port;
description = "set uid and pid of ${service} user (matches port by default)";
};
backup = lib.mkOption {
type = lib.types.bool;
default = true;
description = "enable backups for ${service}";
};
motd = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = service;
};
};
config = lib.mkIf cfg.enable {
# declare ${service} group
users.groups.${service} = {gid = lib.mkForce cfg.ids;};
# declare ${service} user
users.users.${service} = {
description = "${service} server user";
uid = lib.mkForce cfg.ids;
isSystemUser = true;
# home = cfg.data_dir;
createHome = true;
group = service;
extraGroups = ["media"];
};
# enable the ${service} service
services.${service} = {
enable = true;
openFirewall = true;
user = service;
group = service;
# plugins = [
# ];
environmentFile = "${cfg.data_dir}/navidrome.env";
settings = {
Address = "0.0.0.0";
Port = cfg.port;
MusicFolder = "/holocron/media/music";
EnableInsightsCollector = false;
LyricsPriority = "nd-lyrics";
Plugins = {
Enabled = true;
#Folder = lib.mkForce "${cfg.data_dir}/plugins";
};
};
};
# override umask to make permissions work out
systemd.services.${service}.serviceConfig = {
UMask = lib.mkForce "0007";
EnvironmentFile = "${cfg.data_dir}/navidrome.env";
};
# add to caddy for reverse proxy
services.caddy.virtualHosts."${cfg.url}" = {
#serverAliases = ["abs.${homelab.public_domain}"];
extraConfig = ''
tls internal
reverse_proxy 127.0.0.1:${toString cfg.port} {
}
'';
};
# add to glance public service
homelab.glance.links.mediastack = [
{
title = service;
url = "https://music.${homelab.base_domain}";
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
icon = "di:${service}";
}
];
# add to backups
homelab.backups.baks = {
${service} = {paths = [cfg.data_dir];};
};
};
}
+1 -1
View File
@@ -58,7 +58,7 @@ in {
plugins = [
"github.com/caddy-dns/cloudflare@v0.2.4"
];
hash = "sha256-PWadA5qr/gR2qDcT8l8u1Xku7LM2HIfWTLOkzezCYy0=";
hash = "sha256-dQvk6ezY6TQ1J7PjhCXnThF/SqVgPwBO8/RXzHCY+js=";
# Replace with the hash from the build error the first time you build.
};
email = "me@blakedheld.xyz";
+12 -6
View File
@@ -29,17 +29,23 @@ in {
"superflat.recoil.pro"
"skyblock.recoil.pro"
"cobblemon.recoil.pro"
"valheim.recoil.pro"
# blakedheld.xyz
"blakedheld.xyz"
"*.blakedheld.xyz"
"git.blakedheld.xyz"
"up.blakedheld.xyz"
#"blakedheld.xyz"
#"*.blakedheld.xyz"
#"git.blakedheld.xyz"
#"up.blakedheld.xyz"
# holocron.blue
"holocron.blue"
"*.holocron.blue"
#"holocron.blue"
#"*.holocron.blue"
"git.holocron.blue"
"pass.holocron.blue"
"photos.holocron.blue"
"media.holocron.blue"
"up.holocron.blue"
# mc servers
"mine.holocron.blue"
"smp.holocron.blue"
"skyblock.holocron.blue"
+71 -11
View File
@@ -77,7 +77,7 @@ in {
default = [];
description = "list of links for ${service}";
};
nomad = lib.mkOption {
network = lib.mkOption {
type = lib.types.listOf lib.types.attrs;
default = [];
description = "list of links for ${service}";
@@ -252,8 +252,8 @@ in {
{
type = "monitor";
cache = "1m";
title = "system";
sites = cfg.links.nomad;
title = "network";
sites = cfg.links.network;
}
{
type = "custom-api";
@@ -262,13 +262,13 @@ in {
cache = "5s";
template = "<div style=\"display:flex; align-items:center; gap:12px;\">\n <div style=\"width:40px; height:40px; flex-shrink:0; border-radius:4px; display:flex; justify-content:center; align-items:center; overflow:hidden;\">\n {{ if .JSON.Bool \"online\" }}\n <img src=\"{{ .JSON.String \"icon\" | safeURL }}\" width=\"64\" height=\"64\" style=\"object-fit:contain;\">\n {{ else }}\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" style=\"width:32px; height:32px; opacity:0.5;\">\n <path fill-rule=\"evenodd\" d=\"M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" clip-rule=\"evenodd\" />\n </svg>\n {{ end }}\n </div>\n\n <div style=\"flex-grow:1; min-width:0;\">\n <a class=\"size-h4 block text-truncate color-highlight\">\n {{ .JSON.String \"host\" }}\n {{ if .JSON.Bool \"online\" }}\n <span\n style=\"width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-positive); display: inline-block; vertical-align: middle;\"\n data-popover-type=\"text\"\n data-popover-text=\"Online\"\n ></span>\n {{ else }}\n <span\n style=\"width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-negative); display: inline-block; vertical-align: middle;\"\n data-popover-type=\"text\"\n data-popover-text=\"Offline\"\n ></span>\n {{ end }}\n </a>\n\n <ul class=\"list-horizontal-text\">\n <li>\n {{ if .JSON.Bool \"online\" }}\n <span>{{ .JSON.String \"version.name_clean\" }}</span>\n {{ else }}\n <span>Offline</span>\n {{ end }}\n </li>\n {{ if .JSON.Bool \"online\" }}\n <li data-popover-type=\"html\">\n <div data-popover-html>\n {{ range .JSON.Array \"players.list\" }}{{ .String \"name_clean\" }}<br>{{ end }}\n </div>\n <p style=\"display:inline-flex;align-items:center;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"size-6\" style=\"height:1em;vertical-align:middle;margin-right:0.5em;\">\n <path fill-rule=\"evenodd\" d=\"M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z\" clip-rule=\"evenodd\" />\n </svg>\n {{ .JSON.Int \"players.online\" | formatNumber }}/{{ .JSON.Int \"players.max\" | formatNumber }} players\n </p>\n </li>\n {{ else }}\n <li>\n <p style=\"display:inline-flex;align-items:center;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"size-6\" style=\"height:1em;vertical-align:middle;margin-right:0.5em;opacity:0.5;\">\n <path fill-rule=\"evenodd\" d=\"M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z\" clip-rule=\"evenodd\" />\n </svg>\n 0 players\n </p>\n </li>\n {{ end }}\n </ul>\n </div>\n</div>";
}
{
type = "custom-api";
title = "linggango";
url = "https://api.mcstatus.io/v2/status/java/raceraskedforthisenjoyyall.recoil.pro";
cache = "5s";
template = "<div style=\"display:flex; align-items:center; gap:12px;\">\n <div style=\"width:40px; height:40px; flex-shrink:0; border-radius:4px; display:flex; justify-content:center; align-items:center; overflow:hidden;\">\n {{ if .JSON.Bool \"online\" }}\n <img src=\"{{ .JSON.String \"icon\" | safeURL }}\" width=\"64\" height=\"64\" style=\"object-fit:contain;\">\n {{ else }}\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" style=\"width:32px; height:32px; opacity:0.5;\">\n <path fill-rule=\"evenodd\" d=\"M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" clip-rule=\"evenodd\" />\n </svg>\n {{ end }}\n </div>\n\n <div style=\"flex-grow:1; min-width:0;\">\n <a class=\"size-h4 block text-truncate color-highlight\">\n {{ .JSON.String \"host\" }}\n {{ if .JSON.Bool \"online\" }}\n <span\n style=\"width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-positive); display: inline-block; vertical-align: middle;\"\n data-popover-type=\"text\"\n data-popover-text=\"Online\"\n ></span>\n {{ else }}\n <span\n style=\"width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-negative); display: inline-block; vertical-align: middle;\"\n data-popover-type=\"text\"\n data-popover-text=\"Offline\"\n ></span>\n {{ end }}\n </a>\n\n <ul class=\"list-horizontal-text\">\n <li>\n {{ if .JSON.Bool \"online\" }}\n <span>{{ .JSON.String \"version.name_clean\" }}</span>\n {{ else }}\n <span>Offline</span>\n {{ end }}\n </li>\n {{ if .JSON.Bool \"online\" }}\n <li data-popover-type=\"html\">\n <div data-popover-html>\n {{ range .JSON.Array \"players.list\" }}{{ .String \"name_clean\" }}<br>{{ end }}\n </div>\n <p style=\"display:inline-flex;align-items:center;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"size-6\" style=\"height:1em;vertical-align:middle;margin-right:0.5em;\">\n <path fill-rule=\"evenodd\" d=\"M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z\" clip-rule=\"evenodd\" />\n </svg>\n {{ .JSON.Int \"players.online\" | formatNumber }}/{{ .JSON.Int \"players.max\" | formatNumber }} players\n </p>\n </li>\n {{ else }}\n <li>\n <p style=\"display:inline-flex;align-items:center;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"size-6\" style=\"height:1em;vertical-align:middle;margin-right:0.5em;opacity:0.5;\">\n <path fill-rule=\"evenodd\" d=\"M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z\" clip-rule=\"evenodd\" />\n </svg>\n 0 players\n </p>\n </li>\n {{ end }}\n </ul>\n </div>\n</div>";
}
# {
# type = "custom-api";
# title = "linggango";
# url = "https://api.mcstatus.io/v2/status/java/raceraskedforthisenjoyyall.recoil.pro";
# cache = "5s";
# template = "<div style=\"display:flex; align-items:center; gap:12px;\">\n <div style=\"width:40px; height:40px; flex-shrink:0; border-radius:4px; display:flex; justify-content:center; align-items:center; overflow:hidden;\">\n {{ if .JSON.Bool \"online\" }}\n <img src=\"{{ .JSON.String \"icon\" | safeURL }}\" width=\"64\" height=\"64\" style=\"object-fit:contain;\">\n {{ else }}\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" style=\"width:32px; height:32px; opacity:0.5;\">\n <path fill-rule=\"evenodd\" d=\"M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" clip-rule=\"evenodd\" />\n </svg>\n {{ end }}\n </div>\n\n <div style=\"flex-grow:1; min-width:0;\">\n <a class=\"size-h4 block text-truncate color-highlight\">\n {{ .JSON.String \"host\" }}\n {{ if .JSON.Bool \"online\" }}\n <span\n style=\"width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-positive); display: inline-block; vertical-align: middle;\"\n data-popover-type=\"text\"\n data-popover-text=\"Online\"\n ></span>\n {{ else }}\n <span\n style=\"width: 8px; height: 8px; border-radius: 50%; background-color: var(--color-negative); display: inline-block; vertical-align: middle;\"\n data-popover-type=\"text\"\n data-popover-text=\"Offline\"\n ></span>\n {{ end }}\n </a>\n\n <ul class=\"list-horizontal-text\">\n <li>\n {{ if .JSON.Bool \"online\" }}\n <span>{{ .JSON.String \"version.name_clean\" }}</span>\n {{ else }}\n <span>Offline</span>\n {{ end }}\n </li>\n {{ if .JSON.Bool \"online\" }}\n <li data-popover-type=\"html\">\n <div data-popover-html>\n {{ range .JSON.Array \"players.list\" }}{{ .String \"name_clean\" }}<br>{{ end }}\n </div>\n <p style=\"display:inline-flex;align-items:center;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"size-6\" style=\"height:1em;vertical-align:middle;margin-right:0.5em;\">\n <path fill-rule=\"evenodd\" d=\"M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z\" clip-rule=\"evenodd\" />\n </svg>\n {{ .JSON.Int \"players.online\" | formatNumber }}/{{ .JSON.Int \"players.max\" | formatNumber }} players\n </p>\n </li>\n {{ else }}\n <li>\n <p style=\"display:inline-flex;align-items:center;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"size-6\" style=\"height:1em;vertical-align:middle;margin-right:0.5em;opacity:0.5;\">\n <path fill-rule=\"evenodd\" d=\"M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z\" clip-rule=\"evenodd\" />\n </svg>\n 0 players\n </p>\n </li>\n {{ end }}\n </ul>\n </div>\n</div>";
# }
];
}
{
@@ -346,8 +346,36 @@ in {
};
};
# add to udr to glance
# add to vaniville services to glance
homelab.glance.links.services = [
{
title = "vaultwarden";
url = "https://pass.${homelab.public_domain}";
error-url = "https://pass.vaniville.${homelab.public_domain}";
check-url = "https://pass.${homelab.public_domain}";
icon = "di:vaultwarden";
}
{
title = "gitea";
url = "https://git.${homelab.public_domain}";
error-url = "https://git.vaniville.${homelab.public_domain}";
check-url = "https://git.${homelab.public_domain}";
icon = "di:gitea";
}
];
homelab.glance.links.system = [
{
title = "vaniville uptime";
url = "https://up.${homelab.public_domain}";
error-url = "https://up.vaniville.${homelab.public_domain}";
check-url = "https://up.${homelab.public_domain}";
icon = "di:uptime-kuma";
}
];
# add to udr to glance
homelab.glance.links.network = [
{
title = "shauna";
url = "https://shauna.holocron.blue";
@@ -364,6 +392,38 @@ in {
icon = "di:unifi";
allow-insecure = true;
}
{
title = "korrina";
url = "https://korrina.holocron.blue";
error-url = "https://100.101.11.1";
check-url = "https://100.101.11.1";
icon = "di:unifi";
allow-insecure = true;
}
{
title = "linode";
url = "https://cloud.linode.com/linodes";
error-url = "https://status.linode.com";
check-url = "https://cloud.linode.com/linodes";
icon = "di:linode";
allow-insecure = true;
}
{
title = "tailscale";
url = "https://console.tailscale.com/admin/machines";
error-url = "https://status.tailscale.com/";
check-url = "https://console.tailscale.com/admin/machines";
icon = "di:tailscale";
allow-insecure = true;
}
{
title = "nextdns";
url = "https://my.nextdns.io";
error-url = "https://test.nextdns.io";
check-url = "https://my.nextdns.io/527db2/setup";
icon = "di:nextdns";
allow-insecure = true;
}
];
};
}
@@ -84,8 +84,8 @@ in {
# add to caddy for reverse proxy
services.caddy.virtualHosts."${cfg.url}" = {
serverAliases = ["pass.${homelab.public_domain}"];
#tls internal
extraConfig = ''
tls internal
reverse_proxy 127.0.0.1:${toString cfg.port}
'';
};
+125
View File
@@ -0,0 +1,125 @@
{
pkgs,
config,
lib,
inputs,
...
}: let
nixservice = "wger";
service = "wger";
cfg = config.homelab.${service};
sec = config.sops.secrets;
homelab = config.homelab;
in {
options.homelab.${service} = {
enable = lib.mkEnableOption "enables ${service}";
# set port options
port = lib.mkOption {
type = lib.types.int;
default = 7707;
description = "set port for ${service} (default: ${toString cfg.port}";
};
url = lib.mkOption {
type = lib.types.str;
default = "${service}.${homelab.base_domain}";
description = "set domain for ${service}";
};
data_dir = lib.mkOption {
type = lib.types.str;
default = "/var/lib/${service}";
description = "set data directory for ${service}";
};
ids = lib.mkOption {
type = lib.types.int;
default = cfg.port;
description = "set uid and pid of ${service} user (matches port by default)";
};
backup = lib.mkOption {
type = lib.types.bool;
default = true;
description = "enable backups for ${service}";
};
motd = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = "podman-wger";
};
};
config = lib.mkIf cfg.enable {
# declare ${service} group
users.groups.${service} = {gid = lib.mkForce cfg.ids;};
# declare ${service} user
users.users.${service} = {
description = "${service} server user";
uid = lib.mkForce cfg.ids;
isSystemUser = true;
home = cfg.data_dir;
createHome = true;
group = service;
extraGroups = [];
};
# still suss as fuck bro man fuck
virtualisation.oci-containers.containers = {
hass = {
image = "homeassistant/home-assistant:stable";
autoStart = true;
extraOptions = [
"--pull=newer"
"--network=host"
];
volumes = [
"${cfg.data_dir}:/config"
];
environment = {
TZ = homelab.tz;
PUID = toString config.users.users.${service}.uid;
PGID = toString config.users.groups.${service}.gid;
};
};
};
# override umask to make permissions work out
systemd.services.${service}.serviceConfig = {
UMask = lib.mkForce "0007";
};
# open firewall
networking.firewall.allowedTCPPorts = [cfg.port 8123 21063 21064];
networking.firewall.allowedUDPPorts = [5353];
# add to caddy for reverse proxy
services.caddy.virtualHosts."${cfg.url}" = {
serverAliases = ["${service}.${homelab.public_domain}"];
extraConfig = ''
tls internal
reverse_proxy 127.0.0.1:${toString cfg.port} {
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto https
}
'';
};
# add to glance
homelab.glance.links.services = [
{
title = "wger";
url = "https://hass.${homelab.public_domain}";
error-url = "http://${homelab.host_ip}:${toString cfg.port}";
check-url = "http://${homelab.host_ip}:${toString cfg.port}";
icon = "di:${nixservice}";
}
];
# add to backups
homelab.backups.baks = {
${service} = {paths = [cfg.data_dir];};
};
};
}
@@ -75,9 +75,8 @@ in {
# add to caddy for reverse proxy
services.caddy.virtualHosts."${cfg.url}" = {
serverAliases = ["up.${homelab.public_domain}"];
#serverAliases = ["up.${homelab.public_domain}"];
extraConfig = ''
tls internal
reverse_proxy 127.0.0.1:${toString cfg.port}
'';
};
+9 -7
View File
@@ -1,9 +1,11 @@
{ pkgs, config, lib, ... }:
let
cfg = config.system.ssh;
in
{
pkgs,
config,
lib,
...
}: let
cfg = config.system.ssh;
in {
options.system.ssh = {
enable = lib.mkEnableOption "enables ssh";
};
@@ -14,11 +16,11 @@ in
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
PermitRootLogin = "prohibit-password";
X11Forwarding = false;
};
};
# open firewall
networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedTCPPorts = [22];
};
}
+1 -1
View File
@@ -23,9 +23,9 @@ set ignorecase true
# shortcuts
map gb cd /holocron
map gz cd %{{ [ -d /holocron ] && printf /holocron || printf /media/holocron }}
map gn cd ~/.nix
map gc cd ~/.config
map gv cd /var/lib
# navigation
map [ half-up
+84 -61
View File
@@ -7,6 +7,7 @@
program = "zsh";
cfg = config.dots.${program};
home_dir = config.home.homeDirectory;
isDarwin = pkgs.stdenv.isDarwin;
#sec = sops.secrets;
in {
options.dots.${program} = {
@@ -23,7 +24,6 @@ in {
programs.${program} = {
enable = true;
dotDir = "${config.xdg.configHome}/zsh";
#dotDir = ".config/zsh";
autocd = true;
enableCompletion = true;
@@ -41,77 +41,99 @@ in {
path = "$XDG_STATE_HOME/zsh/history";
};
shellAliases = {
# --- zsh ---
src = "source ${home_dir}/.config/zsh/.zshrc";
shellAliases =
{
# --- zsh ---
src = "source ${home_dir}/.config/zsh/.zshrc";
# --- config editing ---
cfl = "nvim /home/blake/.nix/users/blake/dots/core/lf/lfrc";
cfz = "nvim /home/blake/.nix/users/blake/dots/core/zsh/default.nix";
# --- config editing ---
cfl = "nvim /home/blake/.nix/users/blake/dots/core/lf/lfrc";
cfz = "nvim /home/blake/.nix/users/blake/dots/core/zsh/default.nix";
cfv = "sudo lf /var/lib";
# --- navigation ---
ls = "ls --color=auto --group-directories-first";
ll = "ls -lh --color=auto --group-directories-first";
la = "ls -Alh --color=auto --group-directories-first";
".." = "cd ..";
"..." = "cd ../..";
fs = "du -h | sort -h";
ds = "du -hs";
gn = "cd ${home_dir}/.nix";
woopa = "echo backwhack";
# --- navigation ---
# ls = "ls --color=auto --group-directories-first";
# ll = "ls -lh --color=auto --group-directories-first";
# la = "ls -Alh --color=auto --group-directories-first";
".." = "cd ..";
"..." = "cd ../..";
fs = "du -h | sort -h";
ds = "du -hs";
gn = "cd ${home_dir}/.nix";
woopa = "echo backwhack";
# --- shortcuts ---
vswap = "cd ${home_dir}/.local/state/nvim/swap";
rswap = "rm ${home_dir}/.local/state/nvim/swap/*";
v = "nvim";
sv = "sudo nvim";
vim = "nvim";
mime-type = "xdg-mime query filetype";
mime-default = "xdg-mime query default";
# --- shortcuts ---
vswap = "cd ${home_dir}/.local/state/nvim/swap";
rswap = "rm ${home_dir}/.local/state/nvim/swap/*";
v = "nvim";
sv = "sudo nvim";
vim = "nvim";
mime-type = "xdg-mime query filetype";
mime-default = "xdg-mime query default";
# --- safety ---
cp = "cp -iv";
mv = "mv -iv";
rm = "rm -Iv";
# --- safety ---
cp = "cp -iv";
mv = "mv -iv";
rm = "rm -Iv";
# --- colors ---
grep = "grep --color=auto";
fgrep = "fgrep --color=auto";
egrep = "egrep --color=auto";
# --- colors ---
grep = "grep --color=auto";
fgrep = "fgrep --color=auto";
egrep = "egrep --color=auto";
# --- scripts ---
motd = "sh /etc/motd";
rebuild = "sh ${home_dir}/.nix/bin/rebuild";
perms = "sudo sh ${home_dir}/.nix/bin/fix-perms";
# --- scripts ---
motd = "sh /etc/motd";
rebuild = "sh ${home_dir}/.nix/bin/rebuild";
perms = "sudo sh ${home_dir}/.nix/bin/fix-perms";
# --- git ---
status = "git status";
add = "git add";
commit = "git commit";
push = "git push";
pull = "git pull";
dotfiles = "/usr/bin/git --git-dir=${home_dir}/.dotfiles --work-tree=$HOME";
dtf = "/usr/bin/git --git-dir=${home_dir}/.dotfiles --work-tree=$HOME";
# --- git ---
status = "git status";
add = "git add";
commit = "git commit";
push = "git push";
pull = "git pull";
dotfiles = "/usr/bin/git --git-dir=${home_dir}/.dotfiles --work-tree=$HOME";
dtf = "/usr/bin/git --git-dir=${home_dir}/.dotfiles --work-tree=$HOME";
# nix shit
sec = "sops ${home_dir}/.nix/secrets/secrets.yaml";
# nix shit
sec = "sops ${home_dir}/.nix/secrets/secrets.yaml";
# zfs
dfzfs = "zfs list -r -o name,used,usedsnap,usedds";
# zfs
dfzfs = "zfs list -r -o name,used,usedsnap,usedds";
# --- systemd ---
stat = "sudo systemctl status";
restart = "sudo systemctl restart";
start = "sudo systemctl start";
stop = "sudo systemctl stop";
jou = "sudo journalctl -xeu";
live = "sudo journalctl -o short-iso -n 50 -fu";
# --- yt-dlp ---
yt-music = "noglob yt-dlp -f 'bestaudio/best' --extract-audio --audio-format opus --audio-quality 0 --embed-metadata --embed-thumbnail -o '%(playlist_index)02d - %(title)s.%(ext)s'";
# --- system ---
peace = "systemctl poweroff";
love = "systemctl reboot";
lock = "loginctl lock-session";
};
# --- dumb shit ---
fix-music = "sudo find /holocron/media/music -type d -exec chmod 2770 {} + && sudo find /holocron/media/music -type f -exec chmod 660 {} +";
# --- systemd ---
stat = "sudo systemctl status";
restart = "sudo systemctl restart";
start = "sudo systemctl start";
stop = "sudo systemctl stop";
jou = "sudo journalctl -xeu";
live = "sudo journalctl -o short-iso -n 50 -fu";
# --- system ---
peace = "systemctl poweroff";
love = "systemctl reboot";
lock = "loginctl lock-session";
}
# use GNU core utils ls on macos
// (
if isDarwin
then {
ls = "gls --color=auto --group-directories-first";
ll = "gls -lh --color=auto --group-directories-first";
la = "gls -Alh --color=auto --group-directories-first";
}
else {
ls = "ls --color=auto --group-directories-first";
ll = "ls -lh --color=auto --group-directories-first";
la = "ls -Alh --color=auto --group-directories-first";
}
);
initContent = ''
@@ -122,6 +144,7 @@ in {
alias lf='lfcd'
lfcd () {cd "$(command lf -print-last-dir "$@")"}
'';
syntaxHighlighting = {