more organization, or maybe disorganization...

This commit is contained in:
mjallen18
2024-02-25 18:21:21 -06:00
parent f0e5baea4b
commit cd4a68b513
30 changed files with 560 additions and 447 deletions

62
hosts/default.nix Normal file
View File

@@ -0,0 +1,62 @@
{ config, lib, pkgs, ... }:
let
timezone = "America/Chicago";
in
{
imports =
[
../modules
];
# Enable nix flakes and nix-command tools
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Hardware configs
hardware = {
# Bluetooth
bluetooth.enable = true;
# Enable all firmware
enableAllFirmware = true;
# Disable pulse audio in favor of pipewire
pulseaudio.enable = false;
};
# Services configs
services = {
openssh.enable = true;
# Enable firmware updates
fwupd.enable = true;
# Enable CUPS to print documents.
printing.enable = true;
# configure pipewire
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
# Time config
time = {
# Set your time zone.
timeZone = timezone;
};
boot = {
# Enable AppImage
binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
};
}

View File

@@ -7,7 +7,6 @@ let
user = "matt";
password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06";
hostname = "matt-nixos";
timezone = "America/Chicago";
# discover-wrapper is needed as of 1/24/24 since PackageKit does not work correctly so this removes error messages.
discover-wrapped = pkgs.symlinkJoin
{
@@ -23,12 +22,10 @@ in
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./cachix/cachix.nix
../../cachix/cachix.nix
../default.nix
];
# Enable nix flakes and nix-command tools
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Configure bootloader with lanzaboot and secureboot
boot = {
loader = {
@@ -65,34 +62,15 @@ in
# Network option required using sysctl to let Ubisoft Connect work as of 7-12-2023
kernel.sysctl."net.ipv4.tcp_mtu_probing" = 1;
# Enable AppImage
binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
};
# Hardware configs
hardware = {
# Bluetooth
bluetooth.enable = true;
# Xbox controllers
xpadneo.enable = true;
# Steam udev rules for remote play
steam-hardware.enable = true;
# Enable all firmware
enableAllFirmware = true;
# Disable pulse audio in favor of pipewire
pulseaudio.enable = false;
opengl.enable = true;
# Enables support for 32bit libs that steam uses
@@ -101,9 +79,6 @@ in
# Services configs
services = {
# Enable firmware updates
fwupd.enable = true;
# Enable the X11 windowing system.
xserver = {
enable = true;
@@ -115,17 +90,6 @@ in
};
desktopManager.plasma6.enable = true;
};
# Enable CUPS to print documents.
printing.enable = true;
# configure pipewire
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# enable auto discovery of printers
avahi = {
@@ -161,6 +125,7 @@ in
fi
'';
wantedBy = [ "multi-user.target" ];
after = [ "NetworkManager.target" ];
};
# Networking configs
@@ -173,8 +138,6 @@ in
# Time config
time = {
# Set your time zone.
timeZone = timezone;
hardwareClockInLocalTime = true;
};

View File

@@ -7,19 +7,14 @@ let
user = "admin";
password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06";
hostname = "jallen-nas";
timezone = "America/Chicago";
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../nas-samba/samba.nix
../../nas-apps/nas-apps.nix
../default.nix
];
# Enable nix flakes and nix-command tools
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nas-apps = {
jellyfin.enable = true;
@@ -44,6 +39,38 @@ in
swag.enable = true;
};
nas-samba = {
enable = true;
hostsAllow = "10.0.1.";
enableTimeMachine = true;
timeMachinePath = "/mnt/mainpool/TimeMachine";
shares = {
"3d_printer" = {
public = true;
sharePath = "/mnt/mainpool/3d_printer";
};
Backup = {
public = true;
sharePath = "/mnt/mainpool/Backup";
};
Documents = {
public = true;
sharePath = "/mnt/mainpool/Documents";
};
isos = {
public = true;
sharePath = "/mnt/mainpool/isos";
};
TimeMachine = {
public = true;
sharePath = "/mnt/mainpool/TimeMachine";
enableTimeMachine = true;
timeMachineMaxSize = "1T";
};
};
};
# Configure bootloader with lanzaboot and secureboot
boot = {
loader = {
@@ -76,15 +103,6 @@ in
# Hardware configs
hardware = {
# Bluetooth
bluetooth.enable = true;
# Enable all firmware
enableAllFirmware = true;
# Disable pulse audio in favor of pipewire
pulseaudio.enable = false;
# Nvidia
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.beta;
@@ -123,11 +141,6 @@ in
# Services configs
services = {
openssh.enable = true;
# Enable firmware updates
fwupd.enable = true;
# Enable the X11 windowing system.
xserver = {
enable = true;
@@ -142,17 +155,6 @@ in
};
desktopManager.plasma5.enable = true;
};
# Enable CUPS to print documents.
printing.enable = true;
# configure pipewire
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Set to enable Flatpak
flatpak.enable = false;
@@ -237,12 +239,6 @@ in
};
};
# Time config
time = {
# Set your time zone.
timeZone = timezone;
};
# Configure environment
environment = {
# List packages installed in system profile. To search, run:

View File

@@ -15,7 +15,7 @@ let
in {
imports =
[ # Include the results of the hardware scan.
./hardware-configuration-pi4.nix
./hardware-configuration.nix
./docker-pi4.nix
];
@@ -32,7 +32,7 @@ in {
};
# Set your time zone.
time.timeZone = "America/Chicago";
time.timeZone = timezone;
networking = {
hostName = hostname;