Added minipc1
This commit is contained in:
1 parent
28a01afba7
commit
1d0791e152
7 files changed
+103
-30
No files matched your search
@@ -102,6 +102,7 @@
|
||||
enable = true;
|
||||
version = homeManagerVersion;
|
||||
};
|
||||
enableNetworkDrives = true;
|
||||
os = {
|
||||
enable = true;
|
||||
firewall = { enable = false; };
|
||||
@@ -112,5 +113,27 @@
|
||||
};
|
||||
configuration = (import ./hosts/hl-bigbox1.nix { user = user; });
|
||||
};
|
||||
|
||||
# NIXOS Homelab - minipc1
|
||||
# -------------
|
||||
nixosConfigurations."hl-minipc1" = lib.makeNixOsModule {
|
||||
system = "x86_64-linux";
|
||||
user = user;
|
||||
systemStateVersion = "23.11";
|
||||
hostName = "hl-minipc1";
|
||||
enableNetworkDrives = true;
|
||||
home-manager = {
|
||||
enable = true;
|
||||
version = homeManagerVersion;
|
||||
};
|
||||
os = {
|
||||
enable = true;
|
||||
firewall = { enable = false; };
|
||||
enableFonts = true;
|
||||
enableNetworking = true;
|
||||
enableSSH = true;
|
||||
};
|
||||
configuration = (import ./hosts/hl-minipc1.nix { user = user; });
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -45,11 +45,7 @@
|
||||
[{ device = "/dev/disk/by-uuid/5175a4b0-0067-47c6-b7da-35acb247f134"; }];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.br-74ce7d3722b8.useDHCP = lib.mkDefault true;
|
||||
networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.vethdb1ba40.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
@@ -4,40 +4,26 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/f2732ab2-ea52-4f61-b55a-6617d496bf39";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/mnt/EightTerra/DownloadedTorrents" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/DownloadedTorrents";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/f2732ab2-ea52-4f61-b55a-6617d496bf39";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/EightTerra/k3s-cluster" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/k3s-cluster";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/9222-7B1D";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/9222-7B1D";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
# 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, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/142c88f4-b1bc-4ed9-92ee-2c52cdfa4274";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/01FE-EDCC";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{ user }:
|
||||
{ pkgs, lib, config, ... }: {
|
||||
imports = [ ./hl-minipc1.hardware-configuration.nix ];
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# Data
|
||||
fileSystems."/mnt/Data" = {
|
||||
device = "/dev/sda1";
|
||||
fsType = "ext4";
|
||||
options = [ "nofail" ];
|
||||
};
|
||||
services.audiobookshelf = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
openFirewall = true;
|
||||
port = 8000;
|
||||
dataDir = "audiobookshelf";
|
||||
};
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
, systemStateVersion
|
||||
, hostName
|
||||
, system
|
||||
, enableNetworkDrives ? false
|
||||
# Desktop Module
|
||||
, desktop ? {
|
||||
enable = false;
|
||||
@@ -47,6 +48,8 @@
|
||||
homeManagerVersion = home-manager.version;
|
||||
hostName = hostName;
|
||||
})
|
||||
] else [ ]) ++ (if enableNetworkDrives then [
|
||||
(import ./network-drives)
|
||||
] else [ ])
|
||||
;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ ... }: {
|
||||
fileSystems."/mnt/EightTerra/DownloadedTorrents" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/DownloadedTorrents";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/EightTerra/k3s-cluster" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/k3s-cluster";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user