half-way finished migration
This commit is contained in:
17
workstation/services/network.nix
Normal file
17
workstation/services/network.nix
Normal 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
workstation/services/nvidia.nix
Normal file
22
workstation/services/nvidia.nix
Normal 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
workstation/services/printing.nix
Normal file
13
workstation/services/printing.nix
Normal 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
workstation/services/sound.nix
Normal file
24
workstation/services/sound.nix
Normal 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;
|
||||
# };
|
||||
};
|
||||
}
|
||||
26
workstation/services/systemd-user/tasks.nix
Normal file
26
workstation/services/systemd-user/tasks.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
jawzTasks =
|
||||
pkgs.writeScriptBin "tasks" (builtins.readFile ./scripts/tasks.sh);
|
||||
in {
|
||||
systemd = {
|
||||
user.services.tasks = {
|
||||
restartIfChanged = true;
|
||||
description = "Run a tasks script which keeps a lot of things organized";
|
||||
wantedBy = [ "default.target" ];
|
||||
path = [ pkgs.bash pkgs.nix jawzTasks ];
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
RestartSec = 30;
|
||||
ExecStart = "${jawzTasks}/bin/tasks";
|
||||
};
|
||||
timers.tasks = {
|
||||
enable = true;
|
||||
description =
|
||||
"Run a tasks script which keeps a lot of things organized";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = { OnCalendar = "*:0/10"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user