restructured directories + modularized btrfs mount

This commit is contained in:
2024-04-18 20:24:00 -06:00
parent bad3a00e3c
commit d271979bec
75 changed files with 65 additions and 1873 deletions

17
services/network.nix Normal file
View File

@@ -0,0 +1,17 @@
{ config, pkgs, lib, ... }:
{
networking = {
useDHCP = lib.mkDefault true;
enableIPv6 = false;
networkmanager.enable = true;
extraHosts = ''
192.168.1.64 workstation
192.168.1.69 server
192.168.1.100 miniserver
'';
firewall = {
enable = true;
};
};
}

22
services/nvidia.nix Normal file
View File

@@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
{
services.xserver.videoDrivers = [ "nvidia" ];
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
nvidia-vaapi-driver
vaapiVdpau
libvdpau-va-gl
];
};
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
};
};
}

13
services/printing.nix Normal file
View File

@@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }:
let printingDrivers = [ pkgs.hplip pkgs.hplipWithPlugin ];
in {
services.printing = {
enable = true;
drivers = printingDrivers;
};
hardware.sane = {
enable = true;
extraBackends = printingDrivers;
};
users.users.jawz.packages = [ pkgs.gnome.simple-scan ];
}

24
services/sound.nix Normal file
View File

@@ -0,0 +1,24 @@
{ config, lib, pkgs, ... }:
# let
# nixGaming = import (builtins.fetchTarball
# "https://github.com/fufexan/nix-gaming/archive/master.tar.gz");
# in
{
imports = [
# nixGaming.nixosModules.pipewireLowLatency
];
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
sound.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# lowLatency = {
# enable = true;
# quantum = 64;
# rate = 48000;
# };
};
}

View File

@@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:
let
jawzTasks =
pkgs.writeScriptBin "tasks" (builtins.readFile ../../scripts/tasks.sh);
description = "Run a tasks script which keeps a lot of things organized";
in {
systemd.user = {
services.tasks = {
restartIfChanged = true;
description = description;
wantedBy = [ "default.target" ];
path = [ pkgs.bash pkgs.nix jawzTasks ];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart = "${jawzTasks}/bin/tasks";
};
};
timers.tasks = {
enable = true;
description = description;
wantedBy = [ "timers.target" ];
timerConfig = { OnCalendar = "*:0/10"; };
};
};
}