Begin the move to the import all, activate by config model
This commit is contained in:
parent
7397b614de
commit
07cb2d67a2
97 changed files with 776 additions and 633 deletions
|
@ -1,40 +1,18 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 1w";
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
imports = [
|
||||
./accounts
|
||||
./devices
|
||||
./options
|
||||
./programs
|
||||
./services
|
||||
./settings
|
||||
../../overlays
|
||||
../../variables
|
||||
];
|
||||
|
||||
time.timeZone = "America/Toronto";
|
||||
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
nano.enable = false;
|
||||
};
|
||||
|
||||
documentation = {
|
||||
nixos.enable = false;
|
||||
info.enable = false;
|
||||
};
|
||||
|
||||
console = {
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-u22n.psf.gz";
|
||||
packages = with pkgs; [ terminus_font ];
|
||||
};
|
||||
|
||||
programs.nano.enable = false;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./qt
|
||||
./wayland
|
||||
./sway
|
||||
];
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
light.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
dbus.enable = true;
|
||||
tlp.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
enable = config.system.desktop.enable;
|
||||
wireplumber = {
|
||||
enable = true;
|
||||
configPackages = [
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
{ ... }:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General.Experimental = "true";
|
||||
Policy.AutoEnable = "true";
|
||||
config = lib.mkIf config.system.desktop.enable {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General.Experimental = "true";
|
||||
Policy.AutoEnable = "true";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [ "f /var/lib/systemd/linger/jimbo" ];
|
||||
environment.persistence."/persist".directories = [ "/var/lib/bluetooth" ];
|
||||
};
|
||||
|
||||
# Lingering helps keep headphones connected
|
||||
systemd.tmpfiles.rules = [
|
||||
"f /var/lib/systemd/linger/jimbo"
|
||||
];
|
||||
|
||||
environment.persistence."/persist".directories = [ "/var/lib/bluetooth" ];
|
||||
}
|
||||
|
|
8
modules/system/devices/boot/default.nix
Normal file
8
modules/system/devices/boot/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./extlinux
|
||||
./lanzaboote
|
||||
./systemd
|
||||
];
|
||||
}
|
|
@ -1,7 +1,18 @@
|
|||
{ ... }:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
boot.loader = {
|
||||
generic-extlinux-compatible.enable = true;
|
||||
grub.enable = false;
|
||||
options.system.extlinux = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Lanzaboote and force disable Systemd-boot";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.system.extlinux.enable {
|
||||
boot.loader = {
|
||||
generic-extlinux-compatible.enable = true;
|
||||
systemd-boot.enable = lib.mkForce false;
|
||||
grub.enable = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,15 +1,25 @@
|
|||
{ lanzaboote, pkgs, ... }:
|
||||
{ lanzaboote, lib, config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
imports = [ lanzaboote.nixosModules.lanzaboote ];
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
options.system.lanzaboote = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Lanzaboote and force disable Systemd-boot";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
sbctl
|
||||
];
|
||||
config = lib.mkIf config.system.lanzaboote.enable {
|
||||
boot = {
|
||||
loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ sbctl ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
imports = [
|
||||
./audio
|
||||
./bluetooth
|
||||
./filesystems
|
||||
./impermanence
|
||||
./boot
|
||||
./disks
|
||||
./networking
|
||||
./printing
|
||||
./udev
|
||||
|
|
8
modules/system/devices/disks/default.nix
Normal file
8
modules/system/devices/disks/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./filesystems
|
||||
./impermanence
|
||||
./snapper
|
||||
];
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
boot.supportedFilesystems = {
|
||||
ntfs = true;
|
||||
zfs = lib.mkForce false;
|
||||
};
|
||||
}
|
|
@ -6,9 +6,10 @@
|
|||
directories = [
|
||||
"Downloads"
|
||||
"Documents"
|
||||
"Games"
|
||||
"Pictures"
|
||||
"Videos"
|
||||
"Games"
|
||||
|
||||
".snapshots"
|
||||
".mozilla"
|
||||
".thunderbird"
|
|
@ -1,5 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./firewall
|
||||
./wireguard
|
||||
./wireless
|
||||
];
|
||||
|
||||
networking = {
|
||||
wireless.enable = false;
|
||||
dhcpcd.enable = true;
|
||||
|
|
63
modules/system/devices/networking/firewall/default.nix
Normal file
63
modules/system/devices/networking/firewall/default.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.system.firewall = {
|
||||
server = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable server firewall settings";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
networking = {
|
||||
firewall = {
|
||||
allowPing = false;
|
||||
extraInputRules = lib.mkIf (!config.system.firewall.server.enable) ''
|
||||
ip saddr { ${config.ips.server}, ${config.ips.wgSpan}.1 } accept comment "Accept Server"
|
||||
'' // lib.mkIf config.system.firewall.server.enable ''
|
||||
ip saddr { ${config.ips.localSpan}.0/24, ${config.ips.wgSpan}.0/24 } tcp dport 2049 accept comment "Accept NFS"
|
||||
ip saddr { ${config.ips.pc}, ${config.secrets.lunaIP}, ${config.secrets.cornIP} } tcp dport { 1935, 1945 } accept comment "Accept RTMP"
|
||||
'';
|
||||
};
|
||||
|
||||
# Nftables configuration only if server is enabled
|
||||
nftables = lib.mkIf config.system.firewall.server.enable {
|
||||
tables = {
|
||||
forwarding = {
|
||||
family = "ip";
|
||||
content = ''
|
||||
chain PREROUTING {
|
||||
type nat hook prerouting priority dstnat; policy accept;
|
||||
tcp dport 2211 dnat to ${config.ips.pc}:22 comment "SSH to PC"
|
||||
tcp dport 2222 dnat to ${config.ips.wgSpan}.19:22 comment "SSH to Oracle VM"
|
||||
|
||||
udp dport { 27005, 27015, 7777 } dnat to ${config.ips.pc} comment "PC Hosted Games"
|
||||
|
||||
tcp dport { 58010, 57989, 57984 } dnat to ${config.ips.pc} comment "PC Sunshine TCP"
|
||||
udp dport { 57998, 57999, 58000 } dnat to ${config.ips.pc} comment "PC Sunshine UDP"
|
||||
|
||||
tcp dport { 38010, 37989, 37984 } dnat to ${config.ips.vm} comment "VM Sunshine TCP"
|
||||
udp dport { 37998, 37999, 38000 } dnat to ${config.ips.vm} comment "VM Sunshine UDP"
|
||||
|
||||
udp dport { 7790, 7791, 7792 } dnat to ${config.ips.hx} comment "Deus Ex"
|
||||
|
||||
ip saddr ${config.secrets.cornIP} tcp dport { 9943, 9944 } dnat to ${config.ips.vm} comment "VM ALVR TCP"
|
||||
ip saddr ${config.secrets.cornIP} udp dport { 9943, 9944 } dnat to ${config.ips.vm} comment "VM ALVR UDP"
|
||||
}
|
||||
|
||||
chain POSTROUTING {
|
||||
type nat hook postrouting priority 100; policy accept;
|
||||
oifname "${config.ips.netInt}" masquerade
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable IP forwarding for the server configuration
|
||||
boot.kernel.sysctl."net.ipv4.ip_forward" = lib.mkIf config.system.firewall.server.enable 1;
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
networking.firewall = {
|
||||
allowPing = false;
|
||||
extraInputRules = ''
|
||||
ip saddr { ${config.ips.server}, ${config.ips.wgSpan}.1 } accept comment "Accept Server"
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
# Allow forwarding
|
||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||
|
||||
# Configure firewall
|
||||
networking = {
|
||||
firewall = {
|
||||
allowPing = false;
|
||||
extraInputRules = ''
|
||||
ip saddr { ${config.ips.localSpan}.0/24, ${config.ips.wgSpan}.0/24 } tcp dport 2049 accept comment "Accept NFS"
|
||||
ip saddr { ${config.ips.pc}, ${config.secrets.lunaIP}, ${config.secrets.cornIP} } tcp dport { 1935, 1945 } accept comment "Accept RTMP"
|
||||
'';
|
||||
};
|
||||
|
||||
# Enable nftables and forwarding
|
||||
nftables = {
|
||||
tables = {
|
||||
forwarding = {
|
||||
family = "ip";
|
||||
content = ''
|
||||
chain PREROUTING {
|
||||
type nat hook prerouting priority dstnat; policy accept;
|
||||
tcp dport 2211 dnat to ${config.ips.pc}:22 comment "SSH to PC"
|
||||
tcp dport 2222 dnat to ${config.ips.wgSpan}.19:22 comment "SSH to Oracle VM"
|
||||
|
||||
udp dport { 27005, 27015, 7777 } dnat to ${config.ips.pc} comment "PC Hosted Games"
|
||||
|
||||
tcp dport { 58010, 57989, 57984 } dnat to ${config.ips.pc} comment "PC Sunshine TCP"
|
||||
udp dport { 57998, 57999, 58000 } dnat to ${config.ips.pc} comment "PC Sunshine UDP"
|
||||
|
||||
tcp dport { 38010, 37989, 37984 } dnat to ${config.ips.vm} comment "VM Sunshine TCP"
|
||||
udp dport { 37998, 37999, 38000 } dnat to ${config.ips.vm} comment "VM Sunshine UDP"
|
||||
|
||||
udp dport { 7790, 7791, 7792 } dnat to ${config.ips.hx} comment "Deus Ex"
|
||||
|
||||
ip saddr ${config.secrets.cornIP} tcp dport { 9943, 9944 } dnat to ${config.ips.vm} comment "VM ALVR TCP"
|
||||
ip saddr ${config.secrets.cornIP} udp dport { 9943, 9944 } dnat to ${config.ips.vm} comment "VM ALVR UDP"
|
||||
}
|
||||
|
||||
chain POSTROUTING {
|
||||
type nat hook postrouting priority 100; policy accept;
|
||||
oifname "${config.ips.netInt}" masquerade
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
63
modules/system/devices/networking/wireguard/default.nix
Normal file
63
modules/system/devices/networking/wireguard/default.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.system.wireguard = {
|
||||
client = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable WireGuard client";
|
||||
};
|
||||
};
|
||||
server = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable WireGuard server";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
networking = {
|
||||
firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
nat = {
|
||||
enable = config.system.wireguard.server.enable;
|
||||
externalInterface = "${config.ips.netInt}";
|
||||
internalInterfaces = [ "${config.ips.wgInt}" ];
|
||||
};
|
||||
|
||||
wireguard.interfaces = {
|
||||
"wgc" = lib.mkIf config.system.wireguard.client.enable {
|
||||
# Define IP of client in per device config
|
||||
listenPort = 51820;
|
||||
privateKey = config.secrets.wgClientPriv;
|
||||
peers = [
|
||||
{ # NixOS Server
|
||||
publicKey = "qnOT/lXOJMaQgDUdXpyfGZB2IEyUouRje2m/bCe9ux8=";
|
||||
allowedIPs = [ "${config.ips.wgSpan}.0/24" ];
|
||||
endpoint = "sv.${config.domains.jim1}:51820";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
"wgs" = lib.mkIf config.system.wireguard.server.enable {
|
||||
ips = [ "${config.ips.wgSpan}.1/24" ];
|
||||
listenPort = 51820;
|
||||
privateKey = config.secrets.wgServerPriv;
|
||||
peers = [
|
||||
{ # NixOS
|
||||
publicKey = "OKUH/h6YSURI4vgeTZKQD15QsqaygdbTn1mAWzQp9S0=";
|
||||
allowedIPs = [ "${config.ips.wgSpan}.16/28" ];
|
||||
}
|
||||
{ # Pixel 9
|
||||
publicKey = "dPCtjm67adMZCnyL1O2L+uUOk0RbjA9T/tht1r+qcE4=";
|
||||
allowedIPs = [ "${config.ips.wgSpan}.2/32" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
networking = {
|
||||
firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
wireguard.interfaces = {
|
||||
"${config.ips.wgInt}" = {
|
||||
# Define IP of client in per device config
|
||||
listenPort = 51820;
|
||||
privateKey = config.secrets.wgClientPriv;
|
||||
peers = [
|
||||
{ # NixOS Server
|
||||
publicKey = "qnOT/lXOJMaQgDUdXpyfGZB2IEyUouRje2m/bCe9ux8=";
|
||||
allowedIPs = [ "${config.ips.wgSpan}.0/24" ];
|
||||
endpoint = "sv.${config.domains.jim1}:51820";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
networking = {
|
||||
nat = {
|
||||
enable = true;
|
||||
externalInterface = "${config.ips.netInt}";
|
||||
internalInterfaces = [ "${config.ips.wgInt}" ];
|
||||
};
|
||||
|
||||
firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
wireguard.interfaces = {
|
||||
"${config.ips.wgInt}" = {
|
||||
ips = [ "${config.ips.wgSpan}.1/24" ];
|
||||
listenPort = 51820;
|
||||
privateKey = config.secrets.wgServerPriv;
|
||||
peers = [
|
||||
{ # NixOS
|
||||
publicKey = "OKUH/h6YSURI4vgeTZKQD15QsqaygdbTn1mAWzQp9S0=";
|
||||
allowedIPs = [ "${config.ips.wgSpan}.16/28" ];
|
||||
}
|
||||
{ # Pixel 9
|
||||
publicKey = "dPCtjm67adMZCnyL1O2L+uUOk0RbjA9T/tht1r+qcE4=";
|
||||
allowedIPs = [ "${config.ips.wgSpan}.2/32" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,12 +1,22 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
networking = {
|
||||
wireless.iwd.enable = true;
|
||||
enableB43Firmware = true;
|
||||
options.system.wireless = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable Wifi with iwd";
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
persistence."/persist".directories = [ "/var/lib/iwd/" ];
|
||||
systemPackages = with pkgs; [ unstable.impala ];
|
||||
config = lib.mkIf config.system.wireless.enable {
|
||||
networking = {
|
||||
wireless.iwd.enable = true;
|
||||
enableB43Firmware = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [ unstable.impala ];
|
||||
persistence."/persist".directories = [ "/var/lib/iwd/" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services = {
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [ hplip ];
|
||||
webInterface = false;
|
||||
config = lib.mkIf config.system.desktop.enable {
|
||||
services = {
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [ hplip ];
|
||||
webInterface = false;
|
||||
};
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
system-config-printer
|
||||
];
|
||||
environment.systemPackages = with pkgs; [ system-config-printer ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.udev = let
|
||||
oculusRules = pkgs.writeTextFile {
|
||||
name = "10-oculus.rules";
|
||||
text = ''KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"'';
|
||||
destination = "/etc/udev/rules.d/10-oculus.rules";
|
||||
};
|
||||
in {
|
||||
packages = [ oculusRules ];
|
||||
services.udev = {
|
||||
packages = [
|
||||
(pkgs.writeTextFile {
|
||||
name = "10-oculus.rules";
|
||||
text = ''KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"'';
|
||||
destination = "/etc/udev/rules.d/10-oculus.rules";
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.udev = let
|
||||
pdpRules = pkgs.writeTextFile {
|
||||
name = "10-pdp.rules";
|
||||
text = ''SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"'';
|
||||
destination = "/etc/udev/rules.d/10-pdp.rules";
|
||||
};
|
||||
in {
|
||||
packages = [ pdpRules ];
|
||||
services.udev = {
|
||||
packages = [
|
||||
(pkgs.writeTextFile {
|
||||
name = "10-pdp.rules";
|
||||
text = ''SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"'';
|
||||
destination = "/etc/udev/rules.d/10-pdp.rules";
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./nvidia ];
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
enable = config.system.desktop.enable;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.xserver.videoDrivers = [ "nouveau" ];
|
||||
}
|
|
@ -1,10 +1,35 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = false;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
open = false;
|
||||
options.system.video = {
|
||||
nvidia = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable the proprietary Nvidia stack";
|
||||
};
|
||||
};
|
||||
nouveau = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable the open-source Nouveau driver";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
# Conditionally set video drivers based on the options
|
||||
services.xserver.videoDrivers =
|
||||
if config.system.video.nvidia.enable then [ "nvidia" ]
|
||||
else if config.system.video.nouveau.enable then [ "nouveau" ]
|
||||
else [];
|
||||
|
||||
# Configure Nvidia settings if Nvidia is enabled
|
||||
hardware.nvidia = lib.mkIf config.system.video.nvidia.enable {
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = false;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
open = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
18
modules/system/options/default.nix
Normal file
18
modules/system/options/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ lib, ... }:
|
||||
with lib; {
|
||||
options = {
|
||||
system = {
|
||||
desktop.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable desktop apps and services?";
|
||||
};
|
||||
|
||||
server.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enable server services?";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.appimage = {
|
||||
enable = true;
|
||||
binfmt = true;
|
||||
enable = config.system.desktop.enable;
|
||||
binfmt = config.system.desktop.enable;
|
||||
};
|
||||
}
|
||||
|
|
7
modules/system/programs/backlights/default.nix
Normal file
7
modules/system/programs/backlights/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs = {
|
||||
light.enable = config.system.desktop.enable;
|
||||
kbdlight.enable = config.system.desktop.enable;
|
||||
};
|
||||
}
|
4
modules/system/programs/dconf/default.nix
Normal file
4
modules/system/programs/dconf/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.dconf.enable = config.system.desktop.enable;
|
||||
}
|
|
@ -2,8 +2,13 @@
|
|||
{
|
||||
imports = [
|
||||
./appimage
|
||||
./backlights
|
||||
./dconf
|
||||
./gaming
|
||||
./git
|
||||
./qt
|
||||
./security
|
||||
./shells
|
||||
./sway
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
enable = config.system.desktop.enable;
|
||||
settings.general.renice = 10;
|
||||
};
|
||||
|
||||
hardware.steam-hardware.enable = true;
|
||||
hardware.steam-hardware.enable = config.system.desktop.enable;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./gpg
|
||||
];
|
||||
imports = [ ./gpg ];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
|
|
@ -5,7 +5,5 @@
|
|||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git-crypt
|
||||
];
|
||||
environment.systemPackages = with pkgs; [ git-crypt ];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
enable = config.system.desktop.enable;
|
||||
style = "gtk2";
|
||||
platformTheme = "gtk2";
|
||||
};
|
4
modules/system/programs/shells/default.nix
Normal file
4
modules/system/programs/shells/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.zsh.enable = true;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./greetd
|
||||
|
@ -6,11 +6,11 @@
|
|||
];
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
enable = config.system.desktop.enable;
|
||||
package = pkgs.unstable.sway;
|
||||
extraPackages = with pkgs; [ swaylock ];
|
||||
};
|
||||
|
||||
# Allow swaylock to function
|
||||
services.dbus.enable = config.system.desktop.enable;
|
||||
security.pam.services.swaylock = {};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Configure greetd for login directly to Sway
|
||||
services.greetd = let
|
||||
|
@ -17,7 +17,7 @@
|
|||
sway --unsupported-gpu
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
enable = config.system.desktop.enable;
|
||||
restart = true;
|
||||
settings = {
|
||||
terminal = {
|
|
@ -1,16 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
xdg.portal = {
|
||||
wlr = {
|
||||
enable = true;
|
||||
enable = config.system.desktop.enable;
|
||||
settings.screencast = {
|
||||
max_fps = 60;
|
||||
chooser_type = "simple";
|
||||
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or -B 00000066 -b 00000099";
|
||||
};
|
||||
};
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./keyd
|
||||
./ssh
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./fail2ban
|
||||
];
|
||||
imports = [ ./fail2ban ];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
imports = [
|
||||
./common
|
||||
./pc
|
||||
#./server
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
imports = [
|
||||
./gnome-keyring
|
||||
./gvfs
|
||||
./keyd
|
||||
./libvirtd
|
||||
./mpd
|
||||
./polkit
|
||||
./snapper
|
||||
./sunshine
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
services.gnome.gnome-keyring.enable = config.system.desktop.enable;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
services = {
|
||||
gvfs.enable = true;
|
||||
udisks2.enable = true;
|
||||
gvfs.enable = config.system.desktop.enable;
|
||||
udisks2.enable = config.system.desktop.enable;
|
||||
};
|
||||
}
|
||||
|
|
46
modules/system/services/pc/libvirtd/default.nix
Normal file
46
modules/system/services/pc/libvirtd/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
options.system.libvirtd = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable libvirtd and such";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.system.libvirtd.enable {
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
onBoot = "ignore";
|
||||
onShutdown = "shutdown";
|
||||
qemu = {
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [
|
||||
pkgs.OVMFFull.fd
|
||||
pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd
|
||||
];
|
||||
};
|
||||
swtpm.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virtiofsd
|
||||
dnsmasq
|
||||
spice-vdagent
|
||||
looking-glass-client
|
||||
];
|
||||
|
||||
# Needed to make NAT work
|
||||
networking.firewall.trustedInterfaces = [
|
||||
"virbr0"
|
||||
"virbr1"
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 jimbo libvirtd -" ];
|
||||
};
|
||||
}
|
|
@ -1,22 +1,24 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
user = "jimbo";
|
||||
group = "users";
|
||||
musicDirectory = "/home/jimbo/JimboNFS/Music/Synced";
|
||||
playlistDirectory = "/home/jimbo/JimboNFS/Music/Synced/Playlists";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Local Pipewire"
|
||||
}
|
||||
'';
|
||||
};
|
||||
config = lib.mkIf config.system.desktop.enable {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
user = "jimbo";
|
||||
group = "users";
|
||||
musicDirectory = "/home/jimbo/JimboNFS/Music/Synced";
|
||||
playlistDirectory = "/home/jimbo/JimboNFS/Music/Synced/Playlists";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Local Pipewire"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.mpd.environment = {
|
||||
XDG_RUNTIME_DIR = "/run/user/${toString config.users.users.jimbo.uid}";
|
||||
};
|
||||
systemd.services.mpd.environment = {
|
||||
XDG_RUNTIME_DIR = "/run/user/${toString config.users.users.jimbo.uid}";
|
||||
};
|
||||
|
||||
environment.persistence."/persist".directories = [ "/var/lib/mpd" ];
|
||||
environment.persistence."/persist".directories = [ "/var/lib/mpd" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
services.sunshine = {
|
||||
enable = true;
|
||||
enable = config.system.desktop.enable;
|
||||
autoStart = false;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
onBoot = "ignore";
|
||||
onShutdown = "shutdown";
|
||||
qemu = {
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [
|
||||
pkgs.OVMFFull.fd
|
||||
pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd
|
||||
];
|
||||
};
|
||||
swtpm.enable = true;
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virtiofsd
|
||||
dnsmasq
|
||||
spice-vdagent
|
||||
looking-glass-client
|
||||
];
|
||||
|
||||
# Needed to make NAT work
|
||||
networking.firewall.trustedInterfaces = [
|
||||
"virbr0"
|
||||
"virbr1"
|
||||
];
|
||||
|
||||
# Allow Looking-Glass permissions
|
||||
systemd.tmpfiles.rules = [
|
||||
"f /dev/shm/looking-glass 0660 jimbo libvirtd -"
|
||||
];
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
virtualisation.waydroid.enable = true;
|
||||
}
|
|
@ -9,9 +9,9 @@
|
|||
./minecraft
|
||||
./misc
|
||||
./mysql
|
||||
./nginx
|
||||
./social
|
||||
./transmission
|
||||
./vaultwarden
|
||||
./webhost
|
||||
];
|
||||
}
|
||||
|
|
|
@ -5,13 +5,11 @@
|
|||
exports = ''
|
||||
/export/JimboNFS/Downloads *(rw,sync,no_subtree_check)
|
||||
/export/JimboNFS/Documents *(rw,sync,no_subtree_check)
|
||||
|
||||
/export/JimboNFS/Photos *(rw,sync,no_subtree_check)
|
||||
/export/JimboNFS/Videos/Random *(rw,sync,no_subtree_check)
|
||||
/export/JimboNFS/Videos/Media *(rw,sync,no_subtree_check)
|
||||
/export/JimboNFS/Music/Synced *(rw,sync,no_subtree_check)
|
||||
/export/JimboNFS/Music/Unsynced *(rw,sync,no_subtree_check)
|
||||
/export/JimboNFS/Projects *(rw,sync,no_subtree_check)
|
||||
/export/JimboNFS/School *(rw,sync,no_subtree_check)
|
||||
/export/JimboNFS/Videos *(rw,sync,no_subtree_check)
|
||||
|
||||
/export/JimboNFS/Music *(rw,sync,no_subtree_check)
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud29;
|
||||
package = pkgs.nextcloud30;
|
||||
hostName = "cloud.${config.domains.jim1}";
|
||||
datadir = "/mnt/nextcloud";
|
||||
https = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."cloud.${config.domains.jim1}" = {
|
||||
enableACME = true;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
services = {
|
||||
photoprism = {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
services = {
|
||||
forgejo = {
|
||||
|
|
|
@ -30,6 +30,16 @@
|
|||
<type>application/ogg</type>
|
||||
<subtype>vorbis</subtype>
|
||||
</mount>
|
||||
|
||||
<mount type="normal">
|
||||
<mount-name>/jimscrap.opus</mount-name>
|
||||
<stream-name>Jimbo's Scrap</stream-name>
|
||||
<stream-description>Music canned from the main radio.</stream-description>
|
||||
<stream-url>https://icecast.jimbosfiles.com/jimscrap.opus</stream-url>
|
||||
<genre>Scrapped</genre>
|
||||
<type>application/ogg</type>
|
||||
<subtype>vorbis</subtype>
|
||||
</mount>
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,30 +1,7 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
services.liquidsoap.streams = {
|
||||
jimbops = pkgs.writeText "liquidjim" ''
|
||||
settings.log.stdout.set(true)
|
||||
settings.init.allow_root.set(true)
|
||||
settings.scheduler.fast_queues.set(2)
|
||||
settings.decoder.file_extensions.mp4.set(["m4a", "m4b", "m4p", "m4v", "m4r", "3gp", "mp4"])
|
||||
|
||||
# Define the source with random playlist
|
||||
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/Synced"))
|
||||
|
||||
# Ensure the stream never stops
|
||||
jimbops_fallback = fallback([jimbops, jimbops])
|
||||
|
||||
# Output configuration to Icecast
|
||||
output.icecast(
|
||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||
host="127.0.0.1",
|
||||
port=265,
|
||||
password="${config.secrets.castSourcePass}",
|
||||
public=true,
|
||||
icy_metadata=["artist", "title"],
|
||||
mount="jimbops.opus",
|
||||
encoding = "UTF-8",
|
||||
jimbops_fallback
|
||||
)
|
||||
'';
|
||||
};
|
||||
imports = [
|
||||
./jimbops
|
||||
./jimscrap
|
||||
];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.liquidsoap.streams = {
|
||||
jimbops = pkgs.writeText "liquidjim" ''
|
||||
settings.log.stdout.set(true)
|
||||
settings.init.allow_root.set(true)
|
||||
settings.scheduler.fast_queues.set(2)
|
||||
|
||||
# Define the source with random playlist
|
||||
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/Synced"))
|
||||
|
||||
# Ensure the stream never stops
|
||||
jimbops_fallback = fallback([jimbops, jimbops])
|
||||
|
||||
# Output configuration to Icecast
|
||||
output.icecast(
|
||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||
host="127.0.0.1",
|
||||
port=265,
|
||||
password="${config.secrets.castSourcePass}",
|
||||
public=true,
|
||||
icy_metadata=["artist", "title"],
|
||||
mount="jimbops.opus",
|
||||
encoding = "UTF-8",
|
||||
jimbops_fallback
|
||||
)
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.liquidsoap.streams = {
|
||||
jimscrap = pkgs.writeText "liquidjim" ''
|
||||
settings.log.stdout.set(true)
|
||||
settings.init.allow_root.set(true)
|
||||
settings.scheduler.fast_queues.set(2)
|
||||
|
||||
# Define the source with random playlist
|
||||
jimscrap = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/Unsynced"))
|
||||
|
||||
# Ensure the stream never stops
|
||||
jimscrap_fallback = fallback([jimscrap, jimscrap])
|
||||
|
||||
# Output configuration to Icecast
|
||||
output.icecast(
|
||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||
host="127.0.0.1",
|
||||
port=265,
|
||||
password="${config.secrets.castSourcePass}",
|
||||
public=true,
|
||||
icy_metadata=["artist", "title"],
|
||||
mount="jimscrap.opus",
|
||||
encoding = "UTF-8",
|
||||
jimscrap_fallback
|
||||
)
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,5 +1,10 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./rtmp
|
||||
./virtualhosts
|
||||
];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
@ -9,6 +14,7 @@
|
|||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80 443
|
||||
80
|
||||
443
|
||||
];
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts = {
|
||||
"${config.domains.jim1}" = {
|
|
@ -1,8 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
services.lemmy = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
nixpkgs.config.element-web.conf = {
|
||||
default_server_config = {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
services = {
|
||||
coturn = {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
SYNCV3_SERVER = "https://matrix.${config.domains.jim1}";
|
||||
SYNCV3_BINDADDR = "0.0.0.0:8009";
|
||||
};
|
||||
environmentFile = "${pkgs.writeText "matrixsecret" ''
|
||||
environmentFile = pkgs.writeText "matrixsecret" ''
|
||||
SYNCV3_SECRET=${config.secrets.matrixSecret}
|
||||
''}";
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
services.owncast = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
services.transmission = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
./virtualhosts
|
||||
];
|
||||
}
|
8
modules/system/settings/default.nix
Normal file
8
modules/system/settings/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./documentation
|
||||
./fonts
|
||||
./nix
|
||||
];
|
||||
}
|
7
modules/system/settings/documentation/default.nix
Normal file
7
modules/system/settings/documentation/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
documentation = {
|
||||
nixos.enable = false;
|
||||
info.enable = false;
|
||||
};
|
||||
}
|
7
modules/system/settings/fonts/default.nix
Normal file
7
modules/system/settings/fonts/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
console = {
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-u22n.psf.gz";
|
||||
packages = with pkgs; [ terminus_font ];
|
||||
};
|
||||
}
|
19
modules/system/settings/nix/default.nix
Normal file
19
modules/system/settings/nix/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ ... }:
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 1w";
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue