mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: adds sunflower host
This commit is contained in:
parent
0553f5bbf3
commit
f7c36a91b8
4 changed files with 139 additions and 0 deletions
10
flake.nix
10
flake.nix
|
|
@ -148,6 +148,16 @@
|
||||||
inherit self inputs username;
|
inherit self inputs username;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
sunflower = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
(import ./hosts/sunflower)
|
||||||
|
];
|
||||||
|
specialArgs = {
|
||||||
|
host = "sunflower";
|
||||||
|
inherit self inputs username;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
79
hosts/sunflower/default.nix
Normal file
79
hosts/sunflower/default.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./variables.nix
|
||||||
|
./../../modules/core/default.server.nix
|
||||||
|
./../../modules/services/sunflower.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
|
liv.server.enable = true;
|
||||||
|
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
|
"jitsi-meet-1.0.8043"
|
||||||
|
"olm-3.2.16"
|
||||||
|
];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "sunflower";
|
||||||
|
firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
5201
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
5201
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
kitty.terminfo
|
||||||
|
zfs
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
grub = {
|
||||||
|
enable = true;
|
||||||
|
device = "/dev/sdb";
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
supportedFilesystems = [ "zfs" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostId = "6b57f171";
|
||||||
|
|
||||||
|
#services.zfs = {
|
||||||
|
# autoScrub.enable = true;
|
||||||
|
# autoScrub.interval = "weekly";
|
||||||
|
# trim.enable = true;
|
||||||
|
#};
|
||||||
|
|
||||||
|
#boot.zfs.extraPools = [
|
||||||
|
# "spinners"
|
||||||
|
#];
|
||||||
|
|
||||||
|
# fileSystems = {
|
||||||
|
# "/spinners/rootvol" = {
|
||||||
|
# device = "spinners/rootvol";
|
||||||
|
# fsType = "zfs";
|
||||||
|
# };
|
||||||
|
# "/spinners/ahwx" = {
|
||||||
|
# device = "spinners/ahwx";
|
||||||
|
# fsType = "zfs";
|
||||||
|
# };
|
||||||
|
# "/spinners/violet" = {
|
||||||
|
# device = "spinners/violet";
|
||||||
|
# fsType = "zfs";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
}
|
||||||
37
hosts/sunflower/hardware-configuration.nix
Normal file
37
hosts/sunflower/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
# 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 + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "ehci_pci" "mpt3sas" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/208edd71-e6cd-41ee-89d3-163c3f57ad2f";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eno2.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.ens7f0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.ens7f1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.ens7f2.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.ens7f3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
13
modules/services/sunflower.nix
Normal file
13
modules/services/sunflower.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (import ./docker.nix) ]
|
||||||
|
# ++ [ (import ./immich.nix) ]
|
||||||
|
# ++ [ (import ./nextcloud.nix) ]
|
||||||
|
# ++ [ (import ./home-assistant.nix) ]
|
||||||
|
++ [ (import ./monitoring.nix) ]
|
||||||
|
++ [ (import ./smart-monitoring.nix) ]
|
||||||
|
++ [ (import ./tailscale.nix) ]
|
||||||
|
# ++ [ (import ./nfs.nix) ]
|
||||||
|
++ [ (import ./hd-idle.nix) ];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue