This commit is contained in:
nicknase27
2026-07-25 23:26:39 +02:00
commit fadcad2d0b
23 changed files with 714 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
{
config,
lib,
pkgs,
inputs,
...
}: {
imports = [
];
nix.settings.experimental-features = ["nix-command" "flakes"];
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "Hermes"; # Define your hostname.
networking.networkmanager.enable = true;
networking.nameservers = ["1.1.1.1" "1.0.0.1"];
# Set your time zone.
time.timeZone = "Europe/Berlin";
users.users.nick = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = ["wheel"]; # Enable sudo for the user.
packages = with pkgs; [
];
};
programs.zsh = {
enable = true;
};
environment.systemPackages = with pkgs; [
inputs.agenix.packages."${system}".default
neovim
wget
curl
git
fastfetch
rsync
starship
eza
net-tools
alejandra
nixd
];
networking.firewall.enable = false;
networking.firewall.allowedTCPPorts = [8222];
networking.nftables.enable = true;
age.identityPaths = [
"/etc/ssh/id_ed25519"
];
system.stateVersion = "26.05"; # Did you read the comment?
}
+77
View File
@@ -0,0 +1,77 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/4a3884e7-5c89-4987-8482-3b3640d2aebf";
fsType = "btrfs";
options = ["subvol=@"];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/4a3884e7-5c89-4987-8482-3b3640d2aebf";
fsType = "btrfs";
options = ["subvol=@home"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/4a3884e7-5c89-4987-8482-3b3640d2aebf";
fsType = "btrfs";
options = ["subvol=@nix"];
};
fileSystems."/.snapshots" = {
device = "/dev/disk/by-uuid/4a3884e7-5c89-4987-8482-3b3640d2aebf";
fsType = "btrfs";
options = ["subvol=@snapshots"];
};
fileSystems."/var/log" = {
device = "/dev/disk/by-uuid/4a3884e7-5c89-4987-8482-3b3640d2aebf";
fsType = "btrfs";
options = ["subvol=@log"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5802-1BBF";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
fileSystems."/mnt/media" = {
device = "//10.0.0.5/media";
fsType = "cifs";
options = ["credentials=${config.age.secrets.smb.path}" "x-systemd.automount" "nofail" "noperm" "x-systemd.after=network-online.target" "x-systemd.automount-options=--timeout=30" "_netdev"];
};
fileSystems."/mnt/backups" = {
device = "//10.0.0.5/infra/backups";
fsType = "cifs";
options = ["credentials=${config.age.secrets.smb.path}" "x-systemd.automount" "nofail" "noperm" "x-systemd.after=network-online.target" "x-systemd.automount-options=--timeout=30" "_netdev"];
};
swapDevices = [
{device = "/dev/disk/by-uuid/ecbbcef6-c4c2-4cfe-bcd2-5a2e599c3009";}
];
age.secrets.smb = {
file = ../../secrets/smb.age;
path = "/run/secrets/smb";
};
systemd.network.wait-online.enable = true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}