Merge branch 'main' of github.com:asosnovsky/nixos-setup
This commit is contained in:
commit
ba725c936f
8 files changed
+122
-17
No files matched your search
@@ -131,7 +131,7 @@
|
||||
})
|
||||
([
|
||||
"hl-bigbox1"
|
||||
]);
|
||||
]);
|
||||
in
|
||||
{
|
||||
lib = lib;
|
||||
@@ -202,6 +202,18 @@
|
||||
];
|
||||
};
|
||||
};
|
||||
# NIXOS Framework Homelab
|
||||
# -------------
|
||||
hl-fws1 = makeHLService {
|
||||
hostName = "hl-fws1";
|
||||
configuration = { ... }: {
|
||||
imports = [
|
||||
nixos-hardware.nixosModules.framework-11th-gen-intel
|
||||
(import (./hosts/hl-fws1.nix) { user = user; })
|
||||
];
|
||||
};
|
||||
systemStateVersion = "24.05";
|
||||
};
|
||||
} // (builtins.listToAttrs homeLabModulesUsingStable) // (builtins.listToAttrs homeLabModulesUsingUnStable);
|
||||
};
|
||||
}
|
||||
+7
-13
@@ -31,20 +31,17 @@ in
|
||||
rocmPackages.llvm.clang
|
||||
amdgpu_top
|
||||
amdctl
|
||||
# Display Libraries
|
||||
displaylink
|
||||
# python
|
||||
python312
|
||||
];
|
||||
# Opengl
|
||||
# # Opengl
|
||||
hardware.opengl = {
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = [ pkgs.amdvlk ];
|
||||
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
|
||||
};
|
||||
# Gaming
|
||||
programs.gamescope.enable = true;
|
||||
# # Gaming
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extest.enable = true;
|
||||
@@ -57,23 +54,20 @@ in
|
||||
listenAddress = "0.0.0.0:11434";
|
||||
package = unstable.ollama;
|
||||
};
|
||||
# Brother Printer
|
||||
# # Brother Printer
|
||||
hardware.sane.brscan5.enable = true;
|
||||
# Display Managers
|
||||
# # Display Managers
|
||||
services.xserver.videoDrivers =
|
||||
[ "displaylink" "modesetting" "amdgpu" "fbdev" ];
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
${lib.getBin pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0
|
||||
'';
|
||||
[ "modesetting" "amdgpu" "fbdev" ];
|
||||
# Kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
boot.initrd.kernelModules = [ "amdgpu" "evdi" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
# Add Functions
|
||||
home-manager.users.${user.name}.programs.zsh.initExtra = ''
|
||||
source ${zshFunctions}
|
||||
'';
|
||||
environment.localBinInPath = true;
|
||||
homelab.nix.remote-builder.enable = true;
|
||||
# homelab.nix.remote-builder.enable = true;
|
||||
# Advance Power Management
|
||||
powerManagement.powertop.enable = true;
|
||||
powerManagement.enable = true;
|
||||
|
||||
@@ -10,10 +10,8 @@
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmp.useTmpfs = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
#systemd.enableUnifiedCgroupHierarchy = false;
|
||||
# Containers
|
||||
# Containers
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
containers = {
|
||||
ollama = {
|
||||
autoStart = true;
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# 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 = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/2d96049a-938b-4f08-b73a-5baae8eaef2a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/0B62-BBC0";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/docker/overlay2/0bc719adc0cba6bb20f7a41e6284358ae241ce12b5061bc41a91a9cd90af4b09/merged" =
|
||||
{
|
||||
device = "overlay";
|
||||
fsType = "overlay";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/EightTerra/NVR" =
|
||||
{
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/NVR";
|
||||
fsType = "nfs4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/cf34dac4-3757-44a8-9458-14943c60d418"; }];
|
||||
|
||||
# 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.br-47d44751bed1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.br-91bbed946990.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s13f0u4.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.veth767cf6c.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp170s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ user }:
|
||||
{ pkgs, lib, config, ... }: {
|
||||
imports = [ ./hl-minipc1.hardware-configuration.nix ];
|
||||
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
hardware.framework.enableKmod = true;
|
||||
homelab.nix.remote-builder.enable = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmp.useTmpfs = true;
|
||||
}
|
||||
|
||||
@@ -10,5 +10,25 @@
|
||||
|
||||
# Special udev rule for google's coral tpu
|
||||
homelab.udevrules.coraltpu.enable = true;
|
||||
|
||||
# Containers
|
||||
virtualisation.oci-containers = {
|
||||
containers = {
|
||||
scrypted = {
|
||||
autoStart = true;
|
||||
image = "ghcr.io/koush/scrypted";
|
||||
extraOptions = [ "--network=host" ];
|
||||
volumes = [
|
||||
"/var/run/dbus:/var/run/dbus"
|
||||
"/var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket"
|
||||
"/opt/homelab/scrypted/db:/server/volume"
|
||||
"/mnt/EightTerra/NVR:/nvr"
|
||||
];
|
||||
environment = {
|
||||
SCRYPTED_NVR_VOLUME = "/nvr";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,4 +10,10 @@
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/EightTerra/NVR" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/NVR";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
}
|
||||
@@ -11,4 +11,5 @@
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ docker-compose ];
|
||||
users.users.${user.name}.extraGroups = [ "docker" ];
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
}
|
||||
Reference in new issue
Block a user