Merge branch 'main' of https://github.com/asosnovsky/nixos-setup
This commit is contained in:
commit
1cfb7410a8
63 files changed
+712
-475
No files matched your search
@@ -29,20 +29,14 @@
|
||||
options = [ "users" "nofail" ];
|
||||
};
|
||||
|
||||
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" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/5175a4b0-0067-47c6-b7da-35acb247f134"; }];
|
||||
[
|
||||
{ device = "/dev/disk/by-uuid/5175a4b0-0067-47c6-b7da-35acb247f134"; }
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 16 * 1024; # 16GB
|
||||
}
|
||||
];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
@@ -6,7 +6,15 @@ let
|
||||
in
|
||||
{
|
||||
imports = [ ./fwbook.hardware-configuration.nix ];
|
||||
# Skyg
|
||||
skyg.user.enabled = true;
|
||||
skyg.server.admin.enable = true;
|
||||
skyg.nixos.desktop = {
|
||||
enabled = true;
|
||||
kde.enabled = true;
|
||||
};
|
||||
skyg.nixos.common.hardware.sound.enable = true;
|
||||
# Firmware updater
|
||||
services.fwupd.enable = true;
|
||||
services.fwupd.package = (import
|
||||
(builtins.fetchTarball {
|
||||
@@ -16,7 +24,15 @@ in
|
||||
})
|
||||
{ inherit (pkgs) system; }).fwupd;
|
||||
services.fprintd.enable = true;
|
||||
# Yubikey
|
||||
services.yubikey-agent.enable = true;
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
# Bluetooth
|
||||
hardware.bluetooth.settings.General = { ControllerMode = "bredr"; };
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
services.blueman.enable = true;
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
+12
-41
@@ -1,7 +1,12 @@
|
||||
{ user }:
|
||||
{ pkgs, lib, config, ... }: {
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
imports = [ ./hl-bigbox1.hardware-configuration.nix ];
|
||||
skyg.user.enabled = true;
|
||||
skyg.nixos.common.ssh-server.enabled = true;
|
||||
skyg.nixos.server.services.ai.enable = true;
|
||||
skyg.nixos.server.services.jellyfin.enable = true;
|
||||
skyg.server.admin.enable = true;
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
virtualisation.docker.enableNvidia = true;
|
||||
@@ -11,40 +16,6 @@
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmp.useTmpfs = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
# Containers
|
||||
virtualisation.oci-containers = {
|
||||
containers = {
|
||||
ollama = {
|
||||
autoStart = true;
|
||||
image = "ollama/ollama";
|
||||
extraOptions = [ "--gpus" "all" ];
|
||||
ports = [ "11434:11434" ];
|
||||
volumes = [ "ollama:/root/.ollama" ];
|
||||
};
|
||||
openwakeword = {
|
||||
autoStart = true;
|
||||
image = "rhasspy/wyoming-openwakeword";
|
||||
cmd = [ "--preload-model" "ok_nabu" ];
|
||||
ports = [ "10400:10400" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Wyoming Service
|
||||
services.wyoming = {
|
||||
faster-whisper.servers.main-eng = {
|
||||
enable = true;
|
||||
device = "cpu";
|
||||
model = "medium.en";
|
||||
language = "en";
|
||||
uri = "tcp://0.0.0.0:10300";
|
||||
};
|
||||
piper.servers.pier = {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:10200";
|
||||
voice = "en_GB-alan-medium";
|
||||
};
|
||||
};
|
||||
# Nvidia Settings
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
services.xserver.enable = true;
|
||||
@@ -60,12 +31,12 @@
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
# Steam Settings
|
||||
users.users.steam = {
|
||||
shell = pkgs.zsh;
|
||||
isNormalUser = true;
|
||||
description = "Steam User";
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
users.users.steam = {
|
||||
shell = pkgs.zsh;
|
||||
isNormalUser = true;
|
||||
description = "Steam User";
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
imports = [ ./hl-minipc1.hardware-configuration.nix ];
|
||||
skyg.user.enabled = true;
|
||||
skyg.nixos.common.ssh-server.enabled = true;
|
||||
skyg.server.admin.enable = true;
|
||||
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
|
||||
+17
-2
@@ -1,12 +1,24 @@
|
||||
{ user }:
|
||||
{ pkgs, lib, config, ... }: {
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
openPorts = [
|
||||
5000
|
||||
5001
|
||||
8000
|
||||
22
|
||||
];
|
||||
in
|
||||
{
|
||||
imports = [ ./hl-minipc1.hardware-configuration.nix ];
|
||||
skyg.user.enabled = true;
|
||||
skyg.nixos.common.ssh-server.enabled = true;
|
||||
skyg.server.admin.enable = true;
|
||||
|
||||
# Nix Stores
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = "/var/keys/cache-priv-key.pem";
|
||||
port = 5000;
|
||||
};
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
@@ -21,7 +33,7 @@
|
||||
options = [ "nofail" ];
|
||||
};
|
||||
# Services
|
||||
skyg.homelab.services.audiobookshelf = {
|
||||
skyg.nixos.server.services.audiobookshelf = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
openFirewall = true;
|
||||
@@ -37,5 +49,8 @@
|
||||
listenAddress = "0.0.0.0";
|
||||
enableDelete = true;
|
||||
};
|
||||
# Firewall
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
}
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
imports = [ ./hl-minipc2.hardware-configuration.nix ];
|
||||
skyg.user.enabled = true;
|
||||
skyg.nixos.common.ssh-server.enabled = true;
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Disable firewall
|
||||
networking.firewall.enable = false;
|
||||
# Special udev rule for google's coral tpu
|
||||
skyg.homelab.udevrules.coraltpu.enable = true;
|
||||
skyg.nixos.server.udevrules.coraltpu.enable = true;
|
||||
|
||||
# Containers
|
||||
virtualisation.oci-containers = {
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# 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, ... }:
|
||||
let
|
||||
kernel = config.boot.kernelPackages.kernel;
|
||||
@@ -60,7 +57,11 @@ in
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/Data" =
|
||||
{
|
||||
device = "/dev/sda1";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
swapDevices = [ ];
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
@@ -1,12 +1,44 @@
|
||||
{ user }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
openPorts = [
|
||||
# nfs
|
||||
111
|
||||
2049
|
||||
4000
|
||||
4001
|
||||
4002
|
||||
20048
|
||||
# ssh
|
||||
22
|
||||
];
|
||||
in
|
||||
{
|
||||
imports = [ ./hl-terra1.hardware-configuration.nix ];
|
||||
skyg.user.enabled = true;
|
||||
skyg.nixos.common.ssh-server.enabled = true;
|
||||
skyg.server.admin.enable = true;
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
btrfs-progs
|
||||
];
|
||||
# Firewall
|
||||
networking.firewall.allowedUDPPorts = openPorts;
|
||||
networking.firewall.allowedTCPPorts = openPorts;
|
||||
# NFS
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
lockdPort = 4001;
|
||||
mountdPort = 4002;
|
||||
statdPort = 4000;
|
||||
extraNfsdConfig = '''';
|
||||
exports = ''
|
||||
/mnt/Data/apps 10.0.0.0/16(rw,wdelay,insecure,no_root_squash,no_subtree_check,sec=sys,rw,insecure,no_root_squash,no_all_squash)
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user