Compare 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
wymiller d7a2d4cf38 mod: update flake 2026-08-11 00:21:04 -04:00
wymiller 04518129d5 mod: adjusted hildibrand 2026-08-10 23:38:39 -04:00
wymiller 0769fe1e0d mod: adjusted again 2026-08-10 23:01:53 -04:00
wymiller fee14618b8 mod: added input 2026-08-10 22:44:07 -04:00
wymiller 7bc8e821b5 mod: adjust flake to add new config 2026-08-10 22:36:24 -04:00
wymiller 9f61ec8200 add: add estinien configuration 2026-08-10 22:02:49 -04:00
5 changed files with 263 additions and 10 deletions
Generated
+81 -10
View File
@@ -96,6 +96,20 @@
"type": "github" "type": "github"
} }
}, },
"flake-schemas": {
"locked": {
"lastModified": 1780327564,
"narHash": "sha256-HiRPtA0spK+Dkgbhz/1zW9glXxNVB+L4Rj2VYmdawb8=",
"rev": "6cc9bd98891b1fc6bb2b8cb3277df8bc72799ca6",
"revCount": 149,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.5.0/019e83cf-9af3-78b1-ac5b-70e68ad1efe1/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@@ -197,6 +211,26 @@
"type": "github" "type": "github"
} }
}, },
"hildibrand": {
"inputs": {
"flake-schemas": "flake-schemas",
"nixpkgs": "nixpkgs_3",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1785717646,
"narHash": "sha256-j6MlkwaYOLa3bogK4SbOnVI5eMZ9j2GdExSiKMaELPo=",
"ref": "refs/heads/master",
"rev": "9588520925513ed0e47711a5798c6e9958143a0a",
"revCount": 5,
"type": "git",
"url": "https://scm.wyattjmiller.com/wymiller/hildibrand.git"
},
"original": {
"type": "git",
"url": "https://scm.wyattjmiller.com/wymiller/hildibrand.git"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -220,7 +254,7 @@
}, },
"home-manager_2": { "home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1779507042, "lastModified": 1779507042,
@@ -285,6 +319,20 @@
} }
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": {
"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": { "locked": {
"lastModified": 1778443072, "lastModified": 1778443072,
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=", "narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
@@ -300,7 +348,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1780902259, "lastModified": 1780902259,
"narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=", "narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=",
@@ -316,7 +364,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1744536153, "lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
@@ -336,15 +384,16 @@
"inputs": { "inputs": {
"darwin": "darwin_2", "darwin": "darwin_2",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"hildibrand": "hildibrand",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1783886399, "lastModified": 1786304454,
"narHash": "sha256-pcHOwEcr5xFGFRUriCdWFcBFBU5oouFW3iO65HCZ3cI=", "narHash": "sha256-2ovOgwFWnKqUMoQfxbobtIWQ+TSN62llX9eJVb9hFoY=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "b43f2ace4941315daabccc716e151a0ca47276db", "rev": "ea7094e4e33fbb030edf28383de37073fc8b84e0",
"revCount": 32, "revCount": 43,
"type": "git", "type": "git",
"url": "https://scm.wyattjmiller.com/wymiller/nur.git" "url": "https://scm.wyattjmiller.com/wymiller/nur.git"
}, },
@@ -362,7 +411,7 @@
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nur": "nur", "nur": "nur",
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_3"
} }
}, },
"rust-overlay": { "rust-overlay": {
@@ -388,7 +437,29 @@
}, },
"rust-overlay_2": { "rust-overlay_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5" "nixpkgs": [
"nur",
"hildibrand",
"nixpkgs"
]
},
"locked": {
"lastModified": 1784438913,
"narHash": "sha256-NYF7ZM5ip0u+w1pBFDpIGEbrbgN/wpnLFAmBkWkYMXw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "afacd6819d3765a05814ee8e3de74c77d42ac799",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_3": {
"inputs": {
"nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1783834461, "lastModified": 1783834461,
+26
View File
@@ -213,6 +213,32 @@
]; ];
}; };
# Discord bot server
nixosConfigurations."estinien" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit userName userEmail nur;
hostname = "estinien";
role = "server";
};
modules = [
myOverlays
./modules/common
./modules/machine/estinien
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
];
}
];
};
# generic non-NixOS Linux machine # generic non-NixOS Linux machine
homeConfigurations."generic" = let homeConfigurations."generic" = let
hostname = builtins.getEnv "HOSTNAME"; hostname = builtins.getEnv "HOSTNAME";
+118
View File
@@ -0,0 +1,118 @@
{
pkgs,
userName,
nur,
...
}: let
hildibrand = nur.packages.${pkgs.stdenv.hostPlatform.system}.hildibrand;
caitsith = nur.packages.${pkgs.stdenv.hostPlatform.system}.caitsith;
in {
imports = [
../../pwrMgmt
../../networking/core.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;
};
networkManager.enable = true;
};
environment.systemPackages = [
hildibrand
caitsith
];
systemd.services.hildibrand = {
description = "Hildibrand - trivia buzzer bot";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "simple";
User = userName;
WorkingDirectory = "/home/${userName}";
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";
};
};
# 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
@@ -0,0 +1,6 @@
{ ... }: {
imports = [
./configuration.nix
./hardware-configuration.nix
];
}
@@ -0,0 +1,32 @@
# 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/498ce176-f090-46d8-96bf-9e6141cffa19";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/09A6-B803";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/4a64a2ee-2b32-4e53-b00f-7b1f127162aa"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}