mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-07-16 22:21:55 +08:00
feat: adds flora
This commit is contained in:
parent
b521000c96
commit
94fcff9396
2 changed files with 131 additions and 0 deletions
66
hosts/flora/default.nix
Normal file
66
hosts/flora/default.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./../../modules/core/default.server.nix
|
||||
./../../modules/services/docker.nix
|
||||
./../../modules/services/home-assistant.nix
|
||||
./../../modules/services/monitoring.nix
|
||||
./../../modules/services/smart-monitoring.nix
|
||||
./../../modules/services/tailscale.nix
|
||||
./../../modules/services/nfs.nix
|
||||
./../../modules/services/hd-idle.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
services = {
|
||||
vnstat.enable = true;
|
||||
smartd = {
|
||||
enable = true;
|
||||
autodetect = true;
|
||||
};
|
||||
zfs = {
|
||||
autoScrub.enable = true;
|
||||
autoScrub.interval = "weekly";
|
||||
trim.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "flora";
|
||||
networkmanager.enable = true;
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
25565
|
||||
25567
|
||||
5201
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
5201
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# services.xserver.videoDrivers = [ "nvidia" ]; # --> put this in roles/nvidia.nix
|
||||
# liv.nvidia.enable = true;
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.kitty
|
||||
pkgs.foot
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
}
|
||||
65
hosts/flora/hardware-configuration.nix
Normal file
65
hosts/flora/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.zfs.extraPools = [
|
||||
"main"
|
||||
"spinners"
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
networking.hostId = "1e9d632b";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/2AF3-68DF";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "rpool/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "rpool/nix";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/var" = {
|
||||
device = "rpool/var";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "rpool/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue