⚙️ Estinien configuration #14
Generated
+81
-10
@@ -96,6 +96,20 @@
|
||||
"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": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
@@ -197,6 +211,26 @@
|
||||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -220,7 +254,7 @@
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779507042,
|
||||
@@ -285,6 +319,20 @@
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"lastModified": 1778443072,
|
||||
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
|
||||
@@ -300,7 +348,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1780902259,
|
||||
"narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=",
|
||||
@@ -316,7 +364,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1744536153,
|
||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
||||
@@ -336,15 +384,16 @@
|
||||
"inputs": {
|
||||
"darwin": "darwin_2",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"hildibrand": "hildibrand",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1783886399,
|
||||
"narHash": "sha256-pcHOwEcr5xFGFRUriCdWFcBFBU5oouFW3iO65HCZ3cI=",
|
||||
"lastModified": 1786304454,
|
||||
"narHash": "sha256-2ovOgwFWnKqUMoQfxbobtIWQ+TSN62llX9eJVb9hFoY=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "b43f2ace4941315daabccc716e151a0ca47276db",
|
||||
"revCount": 32,
|
||||
"rev": "ea7094e4e33fbb030edf28383de37073fc8b84e0",
|
||||
"revCount": 43,
|
||||
"type": "git",
|
||||
"url": "https://scm.wyattjmiller.com/wymiller/nur.git"
|
||||
},
|
||||
@@ -362,7 +411,7 @@
|
||||
"nix-flatpak": "nix-flatpak",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nur": "nur",
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
"rust-overlay": "rust-overlay_3"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
@@ -388,7 +437,29 @@
|
||||
},
|
||||
"rust-overlay_2": {
|
||||
"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": {
|
||||
"lastModified": 1783834461,
|
||||
|
||||
@@ -239,6 +239,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
|
||||
homeConfigurations."generic" = let
|
||||
hostname = builtins.getEnv "HOSTNAME";
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
{
|
||||
pkgs,
|
||||
userName,
|
||||
nur,
|
||||
...
|
||||
}: let
|
||||
hildibrand = nur.packages.${pkgs.stdenv.hostPlatform.system}.hildibrand;
|
||||
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
|
||||
];
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
# 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";
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
Reference in New Issue
Block a user