Compare commits

..
2 Commits
Author SHA1 Message Date
wymiller b39ad458a5 mod: added env files to systemd services 2026-08-12 22:31:44 -04:00
wymiller 4159d6a724 mod: add caitsith bot to systemd services 2026-08-12 22:10:41 -04:00
7 changed files with 126 additions and 341 deletions
-40
View File
@@ -1,40 +0,0 @@
name: Update flake lock
on:
schedule:
# Gitea cron schedules use UTC. 07:00 UTC is 03:00 EDT.
- cron: "0 7 * * 0"
workflow_dispatch:
permissions:
contents: write
jobs:
update-flake-lock:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install upstream Nix
uses: cachix/install-nix-action@v31
- name: Update flake lock
run: nix flake update
- name: Commit and push changes
shell: bash
run: |
set -euo pipefail
if git diff --quiet -- flake.lock; then
echo "flake.lock is already up to date"
exit 0
fi
git config user.name "gitea-actions[bot]"
git config user.email "gitea-actions[bot]@noreply.localhost"
git add flake.lock
git commit -m "chore: update flake lock"
git push
Generated
+108 -132
View File
@@ -9,11 +9,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1787517695,
"narHash": "sha256-Z119G3qLJx22frNHO3/seMs7fCCvxe9NJJRfN4Jadew=",
"lastModified": 1783689476,
"narHash": "sha256-Ac4EGPZr9e+mPUdmavJFSTft4vgoXml40+YOFYKTXPg=",
"owner": "ezKEa",
"repo": "aagl-gtk-on-nix",
"rev": "4bb57072d963aa47f14894383a5560cf290e296a",
"rev": "af94408291ad477cae8eed964981ab41f90eb184",
"type": "github"
},
"original": {
@@ -22,29 +22,6 @@
"type": "github"
}
},
"caitsith": {
"inputs": {
"flake-schemas": "flake-schemas",
"nixpkgs": [
"nur",
"nixpkgs"
],
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1788133146,
"narHash": "sha256-rjxs1D9duSUWf/lnJV6JZXqdpTEbJ1ntX1hZyYHOuK4=",
"ref": "refs/heads/master",
"rev": "427757654f013e316b3e267dd345c3ab780da7b6",
"revCount": 22,
"type": "git",
"url": "https://scm.wyattjmiller.com/wymiller/caitsith.git"
},
"original": {
"type": "git",
"url": "https://scm.wyattjmiller.com/wymiller/caitsith.git"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@@ -74,11 +51,11 @@
]
},
"locked": {
"lastModified": 1786845137,
"narHash": "sha256-oQFip+v0luP8NIxJzmiW4Wu8bILsbFWom5l0zonl8hQ=",
"lastModified": 1779036909,
"narHash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "4cff07de74b50e64bdd68cd4e722ab5b6b35ee48",
"rev": "56c666e108467d87d13508936aade6d567f2a501",
"type": "github"
},
"original": {
@@ -120,20 +97,6 @@
}
},
"flake-schemas": {
"locked": {
"lastModified": 1761577921,
"narHash": "sha256-eK3/xbUOrxp9fFlei09XNjqcdiHXxndzrTXp7jFpOk8=",
"rev": "47849c7625e223d36766968cc6dc23ba0e135922",
"revCount": 107,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.2.0/019a4a84-544d-7c59-b26d-e334e320c932/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A"
}
},
"flake-schemas_2": {
"locked": {
"lastModified": 1780327564,
"narHash": "sha256-HiRPtA0spK+Dkgbhz/1zW9glXxNVB+L4Rj2VYmdawb8=",
@@ -165,6 +128,24 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
@@ -217,11 +198,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1788301927,
"narHash": "sha256-Zmcvt5yW//YLT3HYe3bWN1Sf2txYrnBpa5jLULVokc0=",
"lastModified": 1783668331,
"narHash": "sha256-mMfzU9jvq9XQyyssR9w0Rki8/Ec4Ez+bLkFWc7BaGGg=",
"owner": "purpleclay",
"repo": "go-overlay",
"rev": "fe48ae4f56981f9f7c2bf03d4951fb0aa6e2095b",
"rev": "423eed783363fa154fc7f0c049f7effa910d2440",
"type": "github"
},
"original": {
@@ -232,19 +213,16 @@
},
"hildibrand": {
"inputs": {
"flake-schemas": "flake-schemas_2",
"nixpkgs": [
"nur",
"nixpkgs"
],
"rust-overlay": "rust-overlay_3"
"flake-schemas": "flake-schemas",
"nixpkgs": "nixpkgs_3",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1788130254,
"narHash": "sha256-LR+73+2a51LOUKVTkEsP/XMVSZXm2P4hlgb7/KxdQ30=",
"lastModified": 1785717646,
"narHash": "sha256-j6MlkwaYOLa3bogK4SbOnVI5eMZ9j2GdExSiKMaELPo=",
"ref": "refs/heads/master",
"rev": "f2049db9c29bf3ab0beff7cf0a990735d5571446",
"revCount": 6,
"rev": "9588520925513ed0e47711a5798c6e9958143a0a",
"revCount": 5,
"type": "git",
"url": "https://scm.wyattjmiller.com/wymiller/hildibrand.git"
},
@@ -260,11 +238,11 @@
]
},
"locked": {
"lastModified": 1788642154,
"narHash": "sha256-sPpQFVaFTDqO/4vvCAhuAhqTgqN/ygu+9eJcs5eB0js=",
"lastModified": 1783740085,
"narHash": "sha256-qajyHfZY29G2oEQk+uHxmsJcRoBUBXP9maTpFlwP/dI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fd0956c99c41ae3c13a73a638f1f7e963aebc4ab",
"rev": "3cd22efe6471dc7365c822bd9ad73a21e55f38fb",
"type": "github"
},
"original": {
@@ -276,17 +254,14 @@
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nur",
"nixpkgs"
]
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1788651960,
"narHash": "sha256-v9wJd32eZ2bvhBzVOd7TIjLQd011P7nwOhjKtWlci5I=",
"lastModified": 1779507042,
"narHash": "sha256-7wOwi8B6D0BYsieZCnHZZj2sNUzgJhLoIVSfkwB7lxQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2c0350c759688177331b8f5242311fae8877bdb3",
"rev": "509ed3c603349a9d43de9e2ae6613baea6bd5b34",
"type": "github"
},
"original": {
@@ -329,11 +304,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1788584326,
"narHash": "sha256-Fd3OB8J9JhgliQwOKcqx4M672CInxi1I5VnwsaXeSQo=",
"lastModified": 1783703440,
"narHash": "sha256-O3/YajjWo001VUIgD8BwaRdSNLUFe7nZ1qV5TwhRBcw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6713828a351efa628b025a1adf7f43cbf8597513",
"rev": "8f0500b9660505dc3cb647775fe9a978a74b5283",
"type": "github"
},
"original": {
@@ -345,11 +320,41 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1788584326,
"narHash": "sha256-Fd3OB8J9JhgliQwOKcqx4M672CInxi1I5VnwsaXeSQo=",
"lastModified": 1784280462,
"narHash": "sha256-DtoqIqM7VkR6NxAkcLpMwmi02USwWb3JdmNGLyhthc0=",
"rev": "293d6abedf0478e681a4dfcfcb35b30fc796a32f",
"revCount": 1009740,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2605.1009740%2Brev-293d6abedf0478e681a4dfcfcb35b30fc796a32f/019f73de-20f7-7ec2-98c8-65726640dbf9/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/%2A"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1778443072,
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6713828a351efa628b025a1adf7f43cbf8597513",
"rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1780902259,
"narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bd0ff2d3eac24699c3664d5966b9ef36f388e2ca",
"type": "github"
},
"original": {
@@ -359,7 +364,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_6": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
@@ -377,19 +382,18 @@
},
"nur": {
"inputs": {
"caitsith": "caitsith",
"darwin": "darwin_2",
"flake-utils": "flake-utils_2",
"hildibrand": "hildibrand",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_3",
"rust-overlay": "rust-overlay_4"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1788678317,
"narHash": "sha256-y5ZQjk4j0yiRiNxcYPlf3YCGybsUa7SC2UJC6xhiC5A=",
"lastModified": 1786304454,
"narHash": "sha256-2ovOgwFWnKqUMoQfxbobtIWQ+TSN62llX9eJVb9hFoY=",
"ref": "refs/heads/master",
"rev": "21037dae06b477f41583995a29fb6a3cc136e906",
"revCount": 77,
"rev": "ea7094e4e33fbb030edf28383de37073fc8b84e0",
"revCount": 43,
"type": "git",
"url": "https://scm.wyattjmiller.com/wymiller/nur.git"
},
@@ -407,7 +411,7 @@
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_2",
"nur": "nur",
"rust-overlay": "rust-overlay_5"
"rust-overlay": "rust-overlay_3"
}
},
"rust-overlay": {
@@ -418,11 +422,11 @@
]
},
"locked": {
"lastModified": 1785476452,
"narHash": "sha256-/CXwCFPS41rb/JI2VitKCgVK6V5E6/sfw5ke3B9zyVQ=",
"lastModified": 1782875958,
"narHash": "sha256-5eqDcnBjb1424HRQdnhuhNOBZguq1Z2tqSa2OMF/m2c=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "6ef009bf4c4873cdc1a621826722bdea7c03e62c",
"rev": "13139aefa973f3d96c60c0fbab801de058ae25ca",
"type": "github"
},
"original": {
@@ -432,28 +436,6 @@
}
},
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"nur",
"caitsith",
"nixpkgs"
]
},
"locked": {
"lastModified": 1771729765,
"narHash": "sha256-HNsDSR5bhLSrIpi9bTb2uTK1qnPo1xFSBxs6YmFyprk=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "be926cb1a76e8450ab2b92121b2e88d09fa4d41c",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_3": {
"inputs": {
"nixpkgs": [
"nur",
@@ -475,37 +457,16 @@
"type": "github"
}
},
"rust-overlay_4": {
"rust-overlay_3": {
"inputs": {
"nixpkgs": [
"nur",
"nixpkgs"
]
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1788678114,
"narHash": "sha256-pcqbpV4ZI79al6KAlr+WJjaEo/PYfgctRlG43D5BSJM=",
"lastModified": 1783834461,
"narHash": "sha256-FCmrs1StAghJDKfqy56KM96KZtxpYzgeq6zM3QO8wjA=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "4748ec2f5ed4a881474ed4c98aa71a5308cdac8d",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_5": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1788678114,
"narHash": "sha256-pcqbpV4ZI79al6KAlr+WJjaEo/PYfgctRlG43D5BSJM=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "4748ec2f5ed4a881474ed4c98aa71a5308cdac8d",
"rev": "a286e5b998e852297a403786f063fb2c9fe7f57a",
"type": "github"
},
"original": {
@@ -528,6 +489,21 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
-26
View File
@@ -187,32 +187,6 @@
];
};
# Vintage story server - for a friend
nixosConfigurations."raubahn" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit userName userEmail nur;
hostname = "raubahn";
role = "server";
};
modules = [
myOverlays
./modules/common
./modules/machine/raubahn
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = extraSpecialArgs // { isNixOS = true; role = "server"; };
home-manager.backupFileExtension = "bak";
home-manager.users.${userName}.imports = [
./home
];
}
];
};
# Matrix and Mastodon server
nixosConfigurations."yshtola" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
@@ -5,6 +5,7 @@
...
}: let
hildibrand = nur.packages.${pkgs.stdenv.hostPlatform.system}.hildibrand;
caitsith = nur.packages.${pkgs.stdenv.hostPlatform.system}.caitsith;
in {
imports = [
../../pwrMgmt
@@ -56,6 +57,7 @@
environment.systemPackages = [
hildibrand
caitsith
];
systemd.services.hildibrand = {
@@ -69,6 +71,22 @@
ExecStart = "${hildibrand}/bin/hildebrand";
Restart = "on-failure";
RestartSec = "5s";
EnvironmentFile = "/etc/secrets/hildibrand.env";
};
};
systemd.services.caitsith = {
description = "Caitsith - a randomizer bot";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "simple";
User = userName;
WorkingDirectory = "/home/${userName}";
ExecStart = "${caitsith}/bin/hildebrand";
Restart = "on-failure";
RestartSec = "5s";
EnvironmentFile = "/etc/secrets/caitsith.env";
};
};
-105
View File
@@ -1,105 +0,0 @@
{
pkgs,
userName,
nur,
...
}: {
imports = [
../../pwrMgmt
../../networking/core.nix
../../virtualization/podman.nix
];
# Enable flakes for NixOS
nix.settings.experimental-features = ["nix-command" "flakes"];
# Custom kernel/boot stuff
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Set your timezone
time.timeZone = "America/Detroit";
# Enable OpenSSH
services.openssh.enable = true;
# Enable keyring
services.gnome.gnome-keyring.enable = true;
# Enable GnuPG
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# Enable SUID wrappers (some programs need them)
programs.mtr.enable = true;
# Enable Polkit
security.polkit.enable = true;
# Power management (see ../../pwrMgmt/default.nix)
pwrMgmt = {
enable = true;
cpuFreqGovernor = "performance";
powertop.enable = false;
};
network = {
firewall = {
enable = true;
tcpPorts = {
allowedPorts = [ 42420 ];
};
udpPorts = {
allowedPorts = [ 42420 ];
};
};
networkManager.enable = true;
};
environment.systemPackages = [
nur.packages.${pkgs.system}.vintage-story
];
systemd.services.vintagestory-server = {
description = "Vintage Story Server";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "simple";
User = userName;
WorkingDirectory = "/home/${userName}";
ExecStart = "${nur.packages.${pkgs.system}.vintage-story}/bin/vintagestory-server";
Restart = "on-failure";
RestartSec = "5s";
};
};
# Add username to groups "wheel" and "video" - more may be added here later
users = {
users = {
${userName} = {
extraGroups = [ "wheel" "network" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFV9eSc9L+aJLoKoexq2f/jb5rpyZnhuGiyhS8YQAbaS wyatt@wyattjmiller.com"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO4WKvKnnYpTbzZHFEslOKyfiiMqWxhW3AfX6E7ACmYU wyatt@wyattjmiller.com"
];
};
};
};
services.fail2ban = {
enable = true;
package = pkgs.fail2ban;
maxretry = 5;
bantime = "3h";
bantime-increment = {
enable = true;
rndtime = "10m";
};
};
system.stateVersion = "24.11";
}
-6
View File
@@ -1,6 +0,0 @@
{ ... }: {
imports = [
./configuration.nix
./hardware-configuration.nix
];
}
@@ -1,32 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ec4c43ec-efcc-40ea-a4c8-411e60ee7c4e";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/140E-FE19";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/547bbd78-85be-4d17-a519-c4a2a923bdab"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}