Update a lot of options, simplify variables, replace options with tags

This commit is contained in:
Bun 2025-06-04 16:12:08 -04:00
parent dbc0ab6dd3
commit 7667ef9a1b
147 changed files with 663 additions and 928 deletions

12
flake.lock generated
View file

@ -523,11 +523,11 @@
},
"stable": {
"locked": {
"lastModified": 1748437600,
"narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
"lastModified": 1749024892,
"narHash": "sha256-OGcDEz60TXQC+gVz5sdtgGJdKVYr6rwdzQKuZAJQpCA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
"rev": "8f1b52b04f2cb6e5ead50bd28d76528a2f0380ef",
"type": "github"
},
"original": {
@ -589,11 +589,11 @@
},
"unstable": {
"locked": {
"lastModified": 1748460289,
"narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
"lastModified": 1748929857,
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
"type": "github"
},
"original": {

View file

@ -1,10 +0,0 @@
{ config, ... }:
{
deployment = {
tags = [
"latptop"
"pc"
];
targetHost = "";
};
}

View file

@ -2,7 +2,6 @@
{
imports = [
./boot
./colmena
./disko
./filesystems
./hardware
@ -11,7 +10,9 @@
];
system = {
desktop.enable = true;
nixos.tags = [ "pc" ];
stateVersion = "25.05";
};
deployment.targetHost = "";
}

View file

@ -1,7 +1,6 @@
{ config, nodes, ... }:
{ ... }:
{
fileSystems = with config.sysusers; with nodes; {
# Local mounts
fileSystems = {
"/persist/storage" = {
device = "/dev/disk/by-uuid/d0d6783f-ad51-4d85-b8a9-3374f6460ef6";
fsType = "btrfs";
@ -11,43 +10,10 @@
"subvol=storage"
];
};
"/persist/home/${main}/games" = {
device = "/dev/disk/by-uuid/d0d6783f-ad51-4d85-b8a9-3374f6460ef6";
fsType = "btrfs";
options = [
"nofail"
"nosuid"
"subvol=games"
];
};
# Network mounts
"/home/${main}/Network/Midas" = {
device = "[${midas.config.deployment.targetHost}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${main}/Network/Kitty" = {
device = "[${kitty.config.deployment.targetHost}]:/storage/bun";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${main}/Network/Prophet" = {
device = "[${prophet.config.deployment.targetHost}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"kitty".enable = true;
"midas".enable = true;
"prophet".enable = true;
};
}

View file

@ -1,4 +1,4 @@
{ config, lib, modulesPath, ... }:
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -17,6 +17,7 @@
kernelModules = [ "kvm-intel" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = true;
nixpkgs.hostPlatform = "x86_64-linux";
}

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
{
home-manager.users."${config.sysusers.main}" = {
home-manager.users."${config.vars.mainUser}" = {
home = {
desktop.enable = true;
gaming.enable = true;

View file

@ -1,10 +0,0 @@
{ config, ... }:
{
deployment = {
tags = [
"misc"
"pc"
];
targetHost = "4ec:1001:ca5a:ae79:40e2:cb4c:e3c9:f401";
};
}

View file

@ -1,8 +1,7 @@
{ lib, ... }:
{ ... }:
{
imports = [
./boot
./colmena
./disko
./hardware
./services
@ -11,7 +10,9 @@
];
system = {
desktop.enable = true;
nixos.tags = [ "pc" ];
stateVersion = "24.11";
};
deployment.targetHost = "4ec:1001:ca5a:ae79:40e2:cb4c:e3c9:f401";
}

View file

@ -1,4 +1,4 @@
{ config, lib, modulesPath, ... }:
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -18,6 +18,10 @@
kernelModules = [ "kvm-intel" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu = {
amd.updateMicrocode = true;
intel.updateMicrocode = true;
};
nixpkgs.hostPlatform = "x86_64-linux";
}

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
{
home-manager.users."${config.sysusers.main}".home = {
home-manager.users."${config.vars.mainUser}".home = {
desktop.enable = true;
school.enable = true;
stateVersion = lib.mkForce config.system.stateVersion;

View file

@ -1,10 +0,0 @@
{ config, ... }:
{
deployment = {
tags = [
"latptop"
"pc"
];
targetHost = "40e:404:a427:da33:163e:97b3:a2a3:9ed4";
};
}

View file

@ -2,7 +2,6 @@
{
imports = [
./boot
./colmena
./disko
./filesystems
./hardware
@ -11,7 +10,9 @@
];
system = {
desktop.enable = true;
nixos.tags = [ "pc" ];
stateVersion = "24.11";
};
deployment.targetHost = "40e:404:a427:da33:163e:97b3:a2a3:9ed4";
}

View file

@ -1,33 +1,9 @@
{ config, nodes, ... }:
{ ... }:
{
fileSystems = with config.sysusers; with nodes; {
fileSystems = {
# Network mounts
"/home/${main}/Network/Midas" = {
device = "[${midas.config.deployment.targetHost}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${main}/Network/Kitty" = {
device = "[${kitty.config.deployment.targetHost}]:/storage/bun";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${main}/Network/Prophet" = {
device = "[${prophet.config.deployment.targetHost}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"kitty".enable = true;
"midas".enable = true;
"prophet".enable = true;
};
}

View file

@ -1,4 +1,4 @@
{ config, lib, modulesPath, ... }:
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -16,6 +16,7 @@
kernelModules = [ "kvm-intel" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = true;
nixpkgs.hostPlatform = "x86_64-linux";
}

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
{
home-manager.users."${config.sysusers.main}".home = {
home-manager.users."${config.vars.mainUser}".home = {
desktop.enable = true;
production.enable = true;
stateVersion = lib.mkForce config.system.stateVersion;

View file

@ -1,10 +0,0 @@
{ config, ... }:
{
deployment = {
tags = [
"latptop"
"pc"
];
targetHost = "5ce:969c:40d1:9575:f5e:591d:c377:a20b";
};
}

View file

@ -2,7 +2,6 @@
{
imports = [
./boot
./colmena
./disko
./filesystems
./hardware
@ -13,8 +12,10 @@
];
system = {
desktop.enable = true;
nixos.tags = [ "pc" ];
steamdeck.enable = true;
stateVersion = "24.11";
};
deployment.targetHost = "5ce:969c:40d1:9575:f5e:591d:c377:a20b";
}

View file

@ -1,7 +1,6 @@
{ config, nodes, ... }:
{ config, ... }:
{
fileSystems = with config.sysusers; with nodes; {
# Local mounts
fileSystems = {
"/mnt/Games" = {
device = "/dev/disk/by-uuid/cb109a85-846d-4417-9c50-a2279bd20803";
fsType = "btrfs";
@ -12,32 +11,8 @@
};
# Network mounts
"/home/${main}/Network/Midas" = {
device = "[${midas.config.deployment.targetHost}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${main}/Network/Kitty" = {
device = "[${kitty.config.deployment.targetHost}]:/storage/bun";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${main}/Network/Prophet" = {
device = "[${prophet.config.deployment.targetHost}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"kitty".enable = !config.system.steamdeck.enable;
"midas".enable = !config.system.steamdeck.enable;
"prophet".enable = !config.system.steamdeck.enable;
};
}

View file

@ -1,4 +1,4 @@
{ config, lib, modulesPath, ... }:
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -15,6 +15,7 @@
kernelModules = [ "kvm-amd" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = true;
nixpkgs.hostPlatform = "x86_64-linux";
}

View file

@ -30,9 +30,9 @@
programs.steam.extest.enable = true;
services = {
desktopManager.gnome.enable = true;
keyd.enable = lib.mkForce false;
tlp.enable = lib.mkForce false;
desktopManager.gnome.enable = true;
};
hardware.xone.enable = true;

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
{
home-manager.users."${config.sysusers.main}".home = {
home-manager.users."${config.vars.mainUser}".home = {
guifull.enable = true;
school.enable = true;
enableNixpkgsReleaseCheck = false;

View file

@ -1,7 +0,0 @@
{ config, ... }:
{
deployment = {
tags = [ "server" ];
targetHost = "53f:dc2d:80c9:3ca2:4b15:ef4d:38a0:c868";
};
}

View file

@ -2,7 +2,6 @@
{
imports = [
./boot
./colmena
./disko
./filesystems
./hardware
@ -10,13 +9,17 @@
../../modules/system
];
networking.hostId = "8745e22e";
system = {
server.enable = true;
extraUsers.enable = true;
nixos.tags = [
"extra-users"
"server"
];
stateVersion = "24.11";
};
deployment.targetHost = "53f:dc2d:80c9:3ca2:4b15:ef4d:38a0:c868";
networking.hostId = "8745e22e";
services.nfs.server.enable = true;
}

View file

@ -1,6 +1,6 @@
{ config, nodes, ... }:
{ ... }:
{
fileSystems = with config.sysusers; with nodes; {
fileSystems = {
"/persist/storage" = {
device = "/dev/disk/by-uuid/edd3e293-1aff-4fc0-96fa-4e17d6cccfca";
fsType = "btrfs";
@ -11,23 +11,7 @@
};
# Network mounts
"/home/${main}/Network/Midas" = {
device = "[${midas.config.deployment.targetHost}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${main}/Network/Prophet" = {
device = "[${prophet.config.deployment.targetHost}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"midas".enable = true;
"prophet".enable = true;
};
}

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ ... }:
{
boot.initrd = {
availableKernelModules = [
@ -9,6 +9,7 @@
kernelModules = [ "dm-snapshot" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = true;
nixpkgs.hostPlatform = "x86_64-linux";
}

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
{
home-manager.users."${config.sysusers.main}".home = {
home-manager.users."${config.vars.mainUser}".home = {
stateVersion = lib.mkForce config.system.stateVersion;
};
}

View file

@ -1,7 +0,0 @@
{ config, ... }:
{
deployment = {
tags = [ "server" ];
targetHost = "538:e163:87ba:f847:3646:18b6:6b01:d8f8";
};
}

View file

@ -2,7 +2,6 @@
{
imports = [
./boot
./colmena
./disko
./filesystems
./hardware
@ -12,10 +11,10 @@
../../modules/system
];
networking.hostId = "38ba3f57";
system = {
server.enable = true;
nixos.tags = [ "server" ];
stateVersion = "24.11";
};
deployment.targetHost = "538:e163:87ba:f847:3646:18b6:6b01:d8f8";
}

View file

@ -1,6 +1,6 @@
{ config, nodes, ... }:
{ ... }:
{
fileSystems = with config.sysusers; with nodes; {
fileSystems = {
"/persist" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
@ -10,14 +10,9 @@
"subvol=persist"
];
};
"/kitty" = {
device = "[${kitty.config.deployment.targetHost}]:/storage/${main}";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
# Network mounts
"kitty".enable = true;
"prophet".enable = true;
};
}

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ ... }:
{
boot.initrd = {
availableKernelModules = [
@ -10,6 +10,7 @@
kernelModules = [ "dm-snapshot" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = true;
nixpkgs.hostPlatform = "x86_64-linux";
}

View file

@ -9,5 +9,6 @@
address = "10.1.0.1";
interface = "enp0s31f6";
};
hostId = "38ba3f57";
};
}

View file

@ -1,21 +1,20 @@
{ ... }:
{
imports = [ ./nginx ];
services = {
cloudflare-dyndns.enable = true;
forgejo.enable = true;
icecast.enable = true;
jellyfin.enable = true;
lemmy.enable = true;
mastodon.enable = true;
matrix-synapse.enable = true;
mysql.enable = true;
nextcloud.enable = true;
nfs.server.enable = true;
nginx.enable = true;
owncast.enable = true;
transmission.enable = true;
vaultwarden.enable = true;
webserver.enable = true;
minecraft-servers = {
enable = true;

View file

@ -0,0 +1,6 @@
{ ... }:
{
imports = [ ./nixfox ];
services.nginx.enable = true;
}

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
{
services.nginx.virtualHosts = lib.mkIf config.services.webserver.enable {
services.nginx.virtualHosts = {
"www.nixfox.ca" = {
enableACME = true;
addSSL = true;

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
{
home-manager.users."${config.sysusers.main}".home = {
home-manager.users."${config.vars.mainUser}".home = {
stateVersion = lib.mkForce config.system.stateVersion;
};
}

View file

@ -1,8 +0,0 @@
{ config, ... }:
{
deployment = {
buildOnTarget = true;
tags = [ "server" ];
targetHost = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b";
};
}

View file

@ -2,7 +2,6 @@
{
imports = [
./boot
./colmena
./disko
./filesystems
./hardware
@ -12,10 +11,15 @@
(modulesPath + "/profiles/headless.nix")
];
networking.hostId = "97a21a38";
system = {
server.enable = true;
nixos.tags = [ "server" ];
stateVersion = "24.05";
};
deployment = {
buildOnTarget = true;
targetHost = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b";
};
networking.hostId = "97a21a38";
}

View file

@ -1,11 +1,17 @@
{ ... }:
{
fileSystems."/persist/storage" = {
device = "/dev/disk/by-uuid/ef465845-cc56-4db5-9260-8ae515eb025e";
fsType = "btrfs";
options = [
"nofail"
"nosuid"
];
fileSystems = {
"/persist/storage" = {
device = "/dev/disk/by-uuid/ef465845-cc56-4db5-9260-8ae515eb025e";
fsType = "btrfs";
options = [
"nofail"
"nosuid"
];
};
# Network mounts
"kitty".enable = true;
"midas".enable = true;
};
}

View file

@ -1,4 +1,4 @@
{ lib, ... }:
{ ... }:
{
boot.initrd = {
availableKernelModules = [
@ -8,5 +8,5 @@
kernelModules = [ "dm-snapshot" ];
};
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
nixpkgs.hostPlatform = "aarch64-linux";
}

View file

@ -2,9 +2,10 @@
{
services = {
cloudflare-dyndns.enable = true;
mailserver.enable = true;
mysql.enable = true;
nfs.server.enable = true;
nginx.enable = true;
};
mailserver.enable = true;
}

6
hosts/prophet/user/@! Normal file
View file

@ -0,0 +1,6 @@
{ config, lib, ... }:
{
home-manager.users."${config.vars.mainUser}".home = {
stateVersion = lib.mkForce config.system.stateVersion;
};
}

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
{
home-manager.users."${config.sysusers.main}".home = {
home-manager.users."${config.vars.mainUser}".home = {
stateVersion = lib.mkForce config.system.stateVersion;
};
}

View file

@ -1,17 +1,11 @@
{ config, lib, pkgs, ... }:
let
commonKernelParams = [
# VM/GPU passthrough
"amd_iommu=on"
"iommu=pt"
# Isolate devices into IOMMU groups
"pcie_acs_override=downstream,multifunction"
"pci=routeirq"
];
in {
boot = {
# Latest kernel and IOMMU isolation
kernelPackages = pkgs.linuxPackages_6_14;
kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:1f82,10de:10fa" ];
@ -30,8 +24,5 @@ in {
};
# Use second GPU on boot
specialisation.gputwo.configuration = {
boot.kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:2504,10de:228e" ];
environment.sessionVariables.WLR_RENDERER = lib.mkForce "gles2";
};
specialisation.gputwo.configuration.boot.kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:2504,10de:228e" ];
}

View file

@ -1,4 +1,4 @@
{ config, ... }:
{ ... }:
{
deployment = {
tags = [

View file

@ -2,7 +2,6 @@
{
imports = [
./boot
./colmena
./disko
./filesystems
./hardware
@ -11,10 +10,13 @@
];
system = {
desktop.enable = true;
nvidia.enable = true;
nixos.tags = [ "pc" ];
stateVersion = "24.05";
};
deployment.targetHost = "4e4:535:9d47:f367:becd:6557:458d:5b1b";
services.xserver.videoDrivers = [ "nvidia" ];
virtualisation.libvirtd.enable = true;
}

View file

@ -1,6 +1,6 @@
{ config, nodes, ... }:
{ ... }:
{
fileSystems = with config.sysusers; with nodes; {
fileSystems = {
# Games and such
"/mnt/Linux1" = {
device = "/dev/disk/by-uuid/b2901f8c-ffda-4b88-bb63-a9ea0c96ccb4";
@ -39,32 +39,8 @@
};
# Network mounts
"/home/${main}/Network/Midas" = {
device = "[${midas.config.deployment.targetHost}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${main}/Network/Kitty" = {
device = "[${kitty.config.deployment.targetHost}]:/storage/${main}";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${main}/Network/Prophet" = {
device = "[${prophet.config.deployment.targetHost}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"kitty".enable = true;
"midas".enable = true;
"prophet".enable = true;
};
}

View file

@ -1,4 +1,4 @@
{ config, lib, modulesPath, ... }:
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -16,6 +16,7 @@
kernelModules = [ "kvm-amd" ];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = true;
nixpkgs.hostPlatform = "x86_64-linux";
}

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
{
home-manager.users."${config.sysusers.main}" = {
home-manager.users."${config.vars.mainUser}" = {
home = {
guifull.enable = true;
stateVersion = lib.mkForce config.system.stateVersion;

View file

@ -9,5 +9,5 @@
./wms
];
config.home.stateVersion = "24.11";
config.home.stateVersion = "25.05";
}

View file

@ -6,11 +6,11 @@
settings = {
main = {
term = "xterm-256color";
font = "${config.look.fonts.mono}:size=14.7";
font = "${config.vars.fonts.mono}:size=14.7";
};
colors = {
alpha = "0.85";
background = config.look.colors.dark;
background = config.vars.colors.dark;
regular0 = "3f3f3f";
regular1 = "cc0000";
regular2 = "4e9a06";
@ -29,7 +29,10 @@
bright7 = "ffffff";
};
cursor.style = "beam";
key-bindings.search-start = "Control+f";
key-bindings = {
search-start = "Control+f";
show-urls-launch = "Control+s";
};
};
};
}

View file

@ -146,9 +146,9 @@
"webgl.disabled" = false;
# Fonts
"font.name.monospace.x-western" = config.look.fonts.mono;
"font.name.sans-serif.x-western" = config.look.fonts.main;
"font.name.serif.x-western" = config.look.fonts.main;
"font.name.monospace.x-western" = config.vars.fonts.mono;
"font.name.sans-serif.x-western" = config.vars.fonts.main;
"font.name.serif.x-western" = config.vars.fonts.main;
# Theming and visibility
"browser.aboutConfig.showWarning" = false;
@ -235,16 +235,16 @@
userChrome = ''
:root {
--tab-active-bg-color: #${config.look.colors.prime};
--tab-hover-bg-color: #${config.look.colors.accent};
--tab-inactive-bg-color: #${config.look.colors.dark};
--tab-active-bg-color: #${config.vars.colors.prime};
--tab-hover-bg-color: #${config.vars.colors.accent};
--tab-inactive-bg-color: #${config.vars.colors.dark};
--tab-active-fg-fallback-color: #FFFFFF;
--tab-inactive-fg-fallback-color: #${config.look.colors.text};
--urlbar-focused-bg-color: #${config.look.colors.dark};
--urlbar-not-focused-bg-color: #${config.look.colors.dark};
--toolbar-bgcolor: #${config.look.colors.dark} !important;
--tab-font: '${config.look.fonts.main}';
--urlbar-font: '${config.look.fonts.main}';
--tab-inactive-fg-fallback-color: #${config.vars.colors.text};
--urlbar-focused-bg-color: #${config.vars.colors.dark};
--urlbar-not-focused-bg-color: #${config.vars.colors.dark};
--toolbar-bgcolor: #${config.vars.colors.dark} !important;
--tab-font: '${config.vars.fonts.main}';
--urlbar-font: '${config.vars.fonts.main}';
${builtins.readFile ./quteFox.css}
'';
};

View file

@ -92,8 +92,8 @@
let g:airline_theme='onedark'
let g:airline#extensions#tabline#enabled = 1
hi Normal guibg=none
hi Visual guibg=#${config.look.colors.mid}
hi Pmenu guibg=#${config.look.colors.mid}
hi Visual guibg=#${config.vars.colors.mid}
hi Pmenu guibg=#${config.vars.colors.mid}
hi EndOfBuffer guibg=none
hi LineNr guibg=none
lua require'colorizer'.setup()

View file

@ -3,8 +3,8 @@
fonts.fontconfig = {
enable = config.home.desktop.enable;
defaultFonts = {
sansSerif = [ config.look.fonts.main ];
monospace = [ config.look.fonts.mono ];
sansSerif = [ config.vars.fonts.main ];
monospace = [ config.vars.fonts.mono ];
emoji = [ "Twitter Color Emoji" ];
};
};

View file

@ -2,7 +2,7 @@
{
gtk = with pkgs; {
font = {
name = config.look.fonts.main;
name = config.vars.fonts.main;
size = 11;
};
theme = {
@ -21,7 +21,7 @@
iconTheme = {
name = "Papirus-Dark";
package = papirus-icon-theme.override {
color = config.look.colors.folder;
color = config.vars.colors.folder;
};
};
};

View file

@ -1,9 +1,6 @@
{ config, ... }:
{
imports = [
./defaults
./folders
];
imports = [ ./dirs ];
xdg.enable = config.home.desktop.enable;

View file

@ -1,21 +0,0 @@
{ config, ... }:
{
xdg.mimeApps = {
enable = config.xdg.enable;
defaultApplications = {
# Media
"image/*" = [ "imv.desktop" ];
"image/gif" = [ "mpv.desktop" ];
"video/*" = [ "mpv.desktop" ];
# Apps
"inode/directory" = [ "pcmanfm-qt.desktop" ];
"text/plain" = [ "nvim.desktop" ];
# Browser
"application/x-mswinurl" = [ "librewolf.desktop" ];
"x-scheme-handler/http" = [ "librewolf.desktop" ];
"x-scheme-handler/https" = [ "librewolf.desktop" ];
};
};
}

View file

@ -13,7 +13,7 @@
extraConfig = {
XDG_GAMES_DIR = "${homeDirectory}/Games";
XDG_KEEPERS_DIR = "${homeDirectory}/Keepers";
XDG_NETWORK_DIR = "${homeDirectory}/Network";
XDG_NETWORK_DIR = "/network";
XDG_PERSIST_DIR = "/persist${homeDirectory}";
XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";

View file

@ -1,6 +1,6 @@
{ ... }:
{
look.border = rec {
vars.border = rec {
int = 3;
string = toString int;
};

View file

@ -1,6 +1,6 @@
{ ... }:
{
look.colors = {
vars.colors = {
prime = "3823C4"; #3823C4
accent = "1B1F59"; #1B1F59
split = "555B9E"; #555B9E

View file

@ -1,8 +1,14 @@
{ ... }:
{ lib, ... }:
{
imports = [
./border
./colors
./displays
./look
./fonts
./workspaces
];
options.vars = lib.mkOption {
type = lib.types.attrs;
};
}

View file

@ -1,10 +1,6 @@
{ config, lib, ... }:
{ ... }:
{
options.displays = lib.mkOption {
type = lib.types.attrs;
};
config.displays = {
vars.displays = {
tower1 = "Microstep MSI G24C 0000000000001";
tower2 = "BNQ BenQ GW2270 6CH00781019";
tower3 = "Eizo Nanao Corporation CG223W 23252050";

View file

@ -1,6 +1,6 @@
{ ... }:
{
look.fonts = {
vars.fonts = {
main = "Ubuntu Nerd Font";
mono = "UbuntuMono Nerd Font";
};

View file

@ -1,12 +0,0 @@
{ config, lib, ... }:
{
imports = [
./border
./colors
./fonts
];
options.look = lib.mkOption {
type = lib.types.attrs;
};
}

View file

@ -1,10 +1,6 @@
{ config, lib, ... }:
{ ... }:
{
options.ws = lib.mkOption {
type = lib.types.attrs;
};
config.ws = {
vars.ws = {
w0 = "0";
w1 = "1";
w2 = "2";

View file

@ -2,11 +2,11 @@
{
services.kanshi = {
enable = config.home.desktop.enable;
settings = [
settings = with config.vars.displays; [
# Outputs
{
output = {
criteria = config.displays.tower1;
criteria = tower1;
adaptiveSync = true;
mode = "1920x1080@143.979996Hz";
};
@ -18,20 +18,20 @@
name = "tower-tv";
outputs = [
{
criteria = config.displays.tower1;
criteria = tower1;
position = "3840,405";
}
{
criteria = config.displays.tower2;
criteria = tower2;
position = "1920,405";
}
{
criteria = config.displays.tower3;
criteria = tower3;
position = "5760,0";
transform = "90";
}
{
criteria = config.displays.tower4;
criteria = tower4;
position = "0,405";
}
];
@ -42,15 +42,15 @@
name = "tower";
outputs = [
{
criteria = config.displays.tower1;
criteria = tower1;
position = "1920,405";
}
{
criteria = config.displays.tower2;
criteria = tower2;
position = "0,405";
}
{
criteria = config.displays.tower3;
criteria = tower3;
position = "3840,0";
transform = "90";
}
@ -63,11 +63,11 @@
name = "detritus";
outputs = [
{
criteria = config.displays.detritus1;
criteria = detritus1;
position = "0,0";
}
{
criteria = config.displays.detritus2;
criteria = detritus2;
position = "1920,0";
scale = 0.85;
}

View file

@ -4,10 +4,10 @@
enable = config.home.desktop.enable;
settings = {
# Theme
background-color = "#${config.look.colors.dark}D9";
border-color = "#${config.look.colors.accent}";
border-size = config.look.border.int;
font = "${config.look.fonts.main} 12";
background-color = "#${config.vars.colors.dark}D9";
border-color = "#${config.vars.colors.accent}";
border-size = config.vars.border.int;
font = "${config.vars.fonts.main} 12";
margin = 0;
max-icon-size = 40;
outer-margin = 10;

View file

@ -7,7 +7,7 @@
enable = true;
package = pkgs.rofi-wayland;
terminal = "foot";
font = "${config.look.fonts.main} 14";
font = "${config.vars.fonts.main} 14";
theme = let
inherit (config.lib.formats.rasi) mkLiteral;
in {
@ -18,24 +18,24 @@
red = mkLiteral "#DC322F";
background-color = mkLiteral "#00000000";
separatorcolor = mkLiteral "#00000000";
normal-foreground = mkLiteral "#${config.look.colors.text}";
normal-background = mkLiteral "#${config.look.colors.dark}1A";
urgent-foreground = mkLiteral "#${config.look.colors.urgent}";
active-foreground = mkLiteral "#${config.look.colors.split}";
selected-active-foreground = mkLiteral "#${config.look.colors.prime}";
background = mkLiteral "#${config.look.colors.dark}D9";
bordercolor = mkLiteral "#${config.look.colors.prime}";
normal-foreground = mkLiteral "#${config.vars.colors.text}";
normal-background = mkLiteral "#${config.vars.colors.dark}1A";
urgent-foreground = mkLiteral "#${config.vars.colors.urgent}";
active-foreground = mkLiteral "#${config.vars.colors.split}";
selected-active-foreground = mkLiteral "#${config.vars.colors.prime}";
background = mkLiteral "#${config.vars.colors.dark}D9";
bordercolor = mkLiteral "#${config.vars.colors.prime}";
selected-normal-foreground = mkLiteral "#FFFFFF";
selected-normal-background = mkLiteral "#${config.look.colors.prime}80";
border-color = mkLiteral "#${config.look.colors.prime}";
urgent-background = mkLiteral "#${config.look.colors.accent}26";
active-background = mkLiteral "#${config.look.colors.accent}26";
selected-active-background = mkLiteral "#${config.look.colors.split}54";
selected-normal-background = mkLiteral "#${config.vars.colors.prime}80";
border-color = mkLiteral "#${config.vars.colors.prime}";
urgent-background = mkLiteral "#${config.vars.colors.accent}26";
active-background = mkLiteral "#${config.vars.colors.accent}26";
selected-active-background = mkLiteral "#${config.vars.colors.split}54";
};
"#window" = {
background-color = mkLiteral "@background";
width = 500;
border = mkLiteral "${config.look.border.string}";
border = mkLiteral "${config.vars.border.string}";
padding = 5;
};
"#message" = {

View file

@ -1,8 +1,8 @@
{ config, pkgs, ... }:
let
default = "#${config.look.colors.prime}FF";
wrong = "#${config.look.colors.split}FF";
verifying = "#${config.look.colors.accent}FF";
default = "#${config.vars.colors.prime}FF";
wrong = "#${config.vars.colors.split}FF";
verifying = "#${config.vars.colors.accent}FF";
blank = "#00000000";
clear = "#FFFFFF22";
text = "#FFFFFFFF";
@ -13,7 +13,7 @@ in {
settings = {
clock = true;
image = ".wallpapers/lock.png";
font = config.look.fonts.main;
font = config.vars.fonts.main;
font-size = 30;
timestr = "%I:%M%p";
datestr = "%a %b %d %Y";

View file

@ -5,8 +5,8 @@
settings = {
default.mode = "center";
any.path = ".wallpapers/1.png";
"${config.displays.tower2}".path = ".wallpapers/2.png";
"${config.displays.tower3}".path = ".wallpapers/3.png";
"${config.vars.displays.tower2}".path = ".wallpapers/2.png";
"${config.vars.displays.tower3}".path = ".wallpapers/3.png";
};
};
}

View file

@ -236,9 +236,9 @@
position = "top";
layer = "top";
output = [
"!${config.displays.tower2}"
"!${config.displays.tower3}"
"!${config.displays.detritus2}"
"!${config.vars.displays.tower2}"
"!${config.vars.displays.tower3}"
"!${config.vars.displays.detritus2}"
"*"
];
modules-left = [
@ -271,9 +271,9 @@
position = "top";
layer = "top";
output = [
config.displays.tower2
config.displays.tower3
config.displays.detritus2
config.vars.displays.tower2
config.vars.displays.tower3
config.vars.displays.detritus2
];
modules-left = [
"sway/workspaces"
@ -294,12 +294,11 @@
border: 0;
border-radius: 0;
min-height: 0;
font-family: ${config.look.fonts.main};
font-size: 15.5px;
color: #${config.look.colors.text};
color: #${config.vars.colors.text};
}
#waybar { background: #${config.look.colors.dark}; }
#waybar { background: #${config.vars.colors.dark}; }
#network { padding: 0 6px 0 4px; }
#gamemode, #scratchpad, #privacy, #tray, #bluetooth { margin: 0 2px 0 2px; }
#pulseaudio, #mpris, #custom-notifs, #idle_inhibitor, #custom-weather, #cpu, #memory, #custom-vram, #backlight, #battery, #clock { margin: 0 2px 0 4px; }
@ -312,15 +311,15 @@
min-width: 20px;
}
#workspaces button.visible, #workspaces button.active {
border-bottom: 3px solid #${config.look.colors.prime};
background: #${config.look.colors.mid};
border-bottom: 3px solid #${config.vars.colors.prime};
background: #${config.vars.colors.mid};
}
#workspaces button.urgent {
border-bottom: 3px solid #${config.look.colors.urgent};
border-bottom: 3px solid #${config.vars.colors.urgent};
}
#workspaces button:hover {
box-shadow: none;
background: #${config.look.colors.light};
background: #${config.vars.colors.light};
}
#mpris { border-bottom: 3px solid #ffb066; }

View file

@ -8,7 +8,7 @@
in {
# Hotkeys
modifier = "${primeMod}";
keybindings = {
keybindings = with config.vars.ws; {
## Launchers
# Browser
@ -78,50 +78,50 @@
"${primeMod}+Shift+r" = ''reload'';
# Switch to workspaces
"${primeMod}+grave" = ''workspace 0:${config.ws.w0}'';
"${primeMod}+1" = ''workspace 1:${config.ws.w1}'';
"${primeMod}+2" = ''workspace 2:${config.ws.w2}'';
"${primeMod}+3" = ''workspace 3:${config.ws.w3}'';
"${primeMod}+4" = ''workspace 4:${config.ws.w4}'';
"${primeMod}+5" = ''workspace 5:${config.ws.w5}'';
"${primeMod}+6" = ''workspace 6:${config.ws.w6}'';
"${primeMod}+7" = ''workspace 7:${config.ws.w7}'';
"${primeMod}+8" = ''workspace 8:${config.ws.w8}'';
"${primeMod}+9" = ''workspace 9:${config.ws.w9}'';
"${primeMod}+grave" = ''workspace 0:${w0}'';
"${primeMod}+1" = ''workspace 1:${w1}'';
"${primeMod}+2" = ''workspace 2:${w2}'';
"${primeMod}+3" = ''workspace 3:${w3}'';
"${primeMod}+4" = ''workspace 4:${w4}'';
"${primeMod}+5" = ''workspace 5:${w5}'';
"${primeMod}+6" = ''workspace 6:${w6}'';
"${primeMod}+7" = ''workspace 7:${w7}'';
"${primeMod}+8" = ''workspace 8:${w8}'';
"${primeMod}+9" = ''workspace 9:${w9}'';
# Switch to alternate workspaces
"${secMod}+F1" = ''workspace 11:${config.ws.w1a}'';
"${secMod}+F2" = ''workspace 22:${config.ws.w2a}'';
"${secMod}+F3" = ''workspace 33:${config.ws.w3a}'';
"${secMod}+F4" = ''workspace 44:${config.ws.w4a}'';
"${secMod}+F5" = ''workspace 55:${config.ws.w5a}'';
"${secMod}+F6" = ''workspace 66:${config.ws.w6a}'';
"${secMod}+F7" = ''workspace 77:${config.ws.w7a}'';
"${secMod}+F8" = ''workspace 88:${config.ws.w8a}'';
"${secMod}+F9" = ''workspace 99:${config.ws.w9a}'';
"${secMod}+F1" = ''workspace 11:${w1a}'';
"${secMod}+F2" = ''workspace 22:${w2a}'';
"${secMod}+F3" = ''workspace 33:${w3a}'';
"${secMod}+F4" = ''workspace 44:${w4a}'';
"${secMod}+F5" = ''workspace 55:${w5a}'';
"${secMod}+F6" = ''workspace 66:${w6a}'';
"${secMod}+F7" = ''workspace 77:${w7a}'';
"${secMod}+F8" = ''workspace 88:${w8a}'';
"${secMod}+F9" = ''workspace 99:${w9a}'';
# Move window to and focus workspace
"${primeMod}+Shift+grave" = ''move container to workspace 0:${config.ws.w0}; workspace 0:${config.ws.w0}'';
"${primeMod}+Shift+1" = ''move container to workspace 1:${config.ws.w1}; workspace 1:${config.ws.w1}'';
"${primeMod}+Shift+2" = ''move container to workspace 2:${config.ws.w2}; workspace 2:${config.ws.w2}'';
"${primeMod}+Shift+3" = ''move container to workspace 3:${config.ws.w3}; workspace 3:${config.ws.w3}'';
"${primeMod}+Shift+4" = ''move container to workspace 4:${config.ws.w4}; workspace 4:${config.ws.w4}'';
"${primeMod}+Shift+5" = ''move container to workspace 5:${config.ws.w5}; workspace 5:${config.ws.w5}'';
"${primeMod}+Shift+6" = ''move container to workspace 6:${config.ws.w6}; workspace 6:${config.ws.w6}'';
"${primeMod}+Shift+7" = ''move container to workspace 7:${config.ws.w7}; workspace 7:${config.ws.w7}'';
"${primeMod}+Shift+8" = ''move container to workspace 8:${config.ws.w8}; workspace 8:${config.ws.w8}'';
"${primeMod}+Shift+9" = ''move container to workspace 9:${config.ws.w9}; workspace 9:${config.ws.w9}'';
"${primeMod}+Shift+grave" = ''move container to workspace 0:${w0}; workspace 0:${w0}'';
"${primeMod}+Shift+1" = ''move container to workspace 1:${w1}; workspace 1:${w1}'';
"${primeMod}+Shift+2" = ''move container to workspace 2:${w2}; workspace 2:${w2}'';
"${primeMod}+Shift+3" = ''move container to workspace 3:${w3}; workspace 3:${w3}'';
"${primeMod}+Shift+4" = ''move container to workspace 4:${w4}; workspace 4:${w4}'';
"${primeMod}+Shift+5" = ''move container to workspace 5:${w5}; workspace 5:${w5}'';
"${primeMod}+Shift+6" = ''move container to workspace 6:${w6}; workspace 6:${w6}'';
"${primeMod}+Shift+7" = ''move container to workspace 7:${w7}; workspace 7:${w7}'';
"${primeMod}+Shift+8" = ''move container to workspace 8:${w8}; workspace 8:${w8}'';
"${primeMod}+Shift+9" = ''move container to workspace 9:${w9}; workspace 9:${w9}'';
# Move window to and focus alternate workspace
"${secMod}+Shift+F1" = ''move container to workspace 11:${config.ws.w1a}; workspace 11:${config.ws.w1a}'';
"${secMod}+Shift+F2" = ''move container to workspace 22:${config.ws.w2a}; workspace 22:${config.ws.w2a}'';
"${secMod}+Shift+F3" = ''move container to workspace 33:${config.ws.w3a}; workspace 33:${config.ws.w3a}'';
"${secMod}+Shift+F4" = ''move container to workspace 44:${config.ws.w4a}; workspace 44:${config.ws.w4a}'';
"${secMod}+Shift+F5" = ''move container to workspace 55:${config.ws.w5a}; workspace 55:${config.ws.w5a}'';
"${secMod}+Shift+F6" = ''move container to workspace 66:${config.ws.w6a}; workspace 66:${config.ws.w6a}'';
"${secMod}+Shift+F7" = ''move container to workspace 77:${config.ws.w7a}; workspace 77:${config.ws.w7a}'';
"${secMod}+Shift+F8" = ''move container to workspace 88:${config.ws.w8a}; workspace 88:${config.ws.w8a}'';
"${secMod}+Shift+F9" = ''move container to workspace 99:${config.ws.w9a}; workspace 99:${config.ws.w9a}'';
"${secMod}+Shift+F1" = ''move container to workspace 11:${w1a}; workspace 11:${w1a}'';
"${secMod}+Shift+F2" = ''move container to workspace 22:${w2a}; workspace 22:${w2a}'';
"${secMod}+Shift+F3" = ''move container to workspace 33:${w3a}; workspace 33:${w3a}'';
"${secMod}+Shift+F4" = ''move container to workspace 44:${w4a}; workspace 44:${w4a}'';
"${secMod}+Shift+F5" = ''move container to workspace 55:${w5a}; workspace 55:${w5a}'';
"${secMod}+Shift+F6" = ''move container to workspace 66:${w6a}; workspace 66:${w6a}'';
"${secMod}+Shift+F7" = ''move container to workspace 77:${w7a}; workspace 77:${w7a}'';
"${secMod}+Shift+F8" = ''move container to workspace 88:${w8a}; workspace 88:${w8a}'';
"${secMod}+Shift+F9" = ''move container to workspace 99:${w9a}; workspace 99:${w9a}'';
# Change focused window
"${primeMod}+h" = ''focus left'';

View file

@ -2,47 +2,42 @@
{
# Monitors
wayland.windowManager.sway.config = {
workspaceOutputAssign = let
workspaceOutputAssign = with config.vars.ws; with config.vars.displays; let
workspaces1 = [
"0:${config.ws.w0}"
"1:${config.ws.w1}"
"2:${config.ws.w2}"
"3:${config.ws.w3}"
"11:${config.ws.w1a}"
"22:${config.ws.w2a}"
"33:${config.ws.w3a}"
"0:${w0}"
"1:${w1}"
"2:${w2}"
"3:${w3}"
"11:${w1a}"
"22:${w2a}"
"33:${w3a}"
];
workspaces2 = [
"4:${config.ws.w4}"
"5:${config.ws.w5}"
"6:${config.ws.w6}"
"44:${config.ws.w4a}"
"55:${config.ws.w5a}"
"4:${w4}"
"5:${w5}"
"6:${w6}"
"44:${w4a}"
"55:${w5a}"
];
workspaces3 = [
"7:${config.ws.w7}"
"8:${config.ws.w8}"
"9:${config.ws.w9}"
"77:${config.ws.w7a}"
"88:${config.ws.w8a}"
"7:${w7}"
"8:${w8}"
"9:${w9}"
"77:${w7a}"
"88:${w8a}"
];
workspaces4 = [
"66:${config.ws.w6a}"
"99:${config.ws.w9a}"
"66:${w6a}"
"99:${w9a}"
];
assign = output: workspaces: map (workspace: {
inherit workspace;
inherit output;
}) workspaces;
in
(assign "${config.displays.tower1}" workspaces1) ++
(assign "${config.displays.tower2}" workspaces2) ++
(assign "${config.displays.tower3}" workspaces3) ++
(assign "${config.displays.tower4}" workspaces4) ++
(assign "${config.displays.detritus1}" workspaces1) ++
(assign "${config.displays.detritus1}" workspaces2) ++
(assign "${config.displays.detritus2}" workspaces3) ++
(assign "${config.displays.detritus2}" workspaces4);
(assign "${tower1}" workspaces1) ++
(assign "${tower2}" workspaces2) ++
(assign "${tower3}" workspaces3) ++
(assign "${tower4}" workspaces4);
};
}

View file

@ -1,7 +1,7 @@
{ config, ... }:
{
wayland.windowManager.sway.config = {
defaultWorkspace = "workspace 1:${config.ws.w1}";
wayland.windowManager.sway.config = with config.vars.ws; {
defaultWorkspace = "workspace 1:${w1}";
focus = {
mouseWarping = "container";
@ -34,7 +34,7 @@
# Give apps that don't have them borders
{
criteria = { con_mark = "giveborder"; };
command = ''border pixel ${config.look.border.string}'';
command = ''border pixel ${config.vars.border.string}'';
}
{
criteria = { class = "steam"; };
@ -56,22 +56,22 @@
};
assigns = {
# Browser
"1:${config.ws.w1}" = [{ app_id = "librewolf"; }];
"1:${w1}" = [{ app_id = "librewolf"; }];
# Communication
"7:${config.ws.w7}" = [
"7:${w7}" = [
{ app_id = "teams-for-linux"; }
{ app_id = "vesktop"; }
{ class = "vesktop"; }
];
"9:${config.ws.w9}" = [{ app_id = "thunderbird"; }];
"9:${w9}" = [{ app_id = "thunderbird"; }];
# Etc
"2:${config.ws.w2}" = [
"2:${w2}" = [
{ class = "steam"; }
{ app_id = "heroic"; }
];
"44:${config.ws.w4a}" = [{ app_id = "com.obsproject.Studio"; }];
"44:${w4a}" = [{ app_id = "com.obsproject.Studio"; }];
};
};
}

View file

@ -3,49 +3,49 @@
wayland.windowManager.sway.config = {
colors = {
focused = {
border = "#${config.look.colors.prime}";
background = "#${config.look.colors.prime}";
border = "#${config.vars.colors.prime}";
background = "#${config.vars.colors.prime}";
text = "#FFFFFF";
indicator = "#${config.look.colors.actSplit}";
childBorder = "#${config.look.colors.prime}";
indicator = "#${config.vars.colors.actSplit}";
childBorder = "#${config.vars.colors.prime}";
};
focusedInactive = {
border = "#${config.look.colors.accent}";
background = "#${config.look.colors.accent}";
text = "#${config.look.colors.text}";
indicator = "#${config.look.colors.split}";
childBorder = "#${config.look.colors.accent}";
border = "#${config.vars.colors.accent}";
background = "#${config.vars.colors.accent}";
text = "#${config.vars.colors.text}";
indicator = "#${config.vars.colors.split}";
childBorder = "#${config.vars.colors.accent}";
};
unfocused = {
border = "#${config.look.colors.dark}";
background = "#${config.look.colors.dark}";
text = "#${config.look.colors.text}";
indicator = "#${config.look.colors.split}";
childBorder = "#${config.look.colors.split}";
border = "#${config.vars.colors.dark}";
background = "#${config.vars.colors.dark}";
text = "#${config.vars.colors.text}";
indicator = "#${config.vars.colors.split}";
childBorder = "#${config.vars.colors.split}";
};
urgent = {
border = "#${config.look.colors.urgent}";
background = "#${config.look.colors.urgent}";
text = "#${config.look.colors.text}";
indicator = "#${config.look.colors.urgent}";
childBorder = "#${config.look.colors.urgent}";
border = "#${config.vars.colors.urgent}";
background = "#${config.vars.colors.urgent}";
text = "#${config.vars.colors.text}";
indicator = "#${config.vars.colors.urgent}";
childBorder = "#${config.vars.colors.urgent}";
};
};
bars = [ ];
fonts = {
names = [ config.look.fonts.main ];
names = [ config.vars.fonts.main ];
size = 10.5;
};
window = {
border = config.look.border.int;
border = config.vars.border.int;
hideEdgeBorders = "smart";
};
floating = {
border = config.look.border.int;
border = config.vars.border.int;
titlebar = false;
};

View file

@ -1,4 +1,4 @@
{ config, lib, name, ... }:
{ config, name, ... }:
{
imports = [
./devices
@ -7,12 +7,9 @@
./services
./settings
./users
./variables
];
options.system = with lib; {
desktop.enable = mkEnableOption "Desktop apps and services";
server.enable = mkEnableOption "Server apps and services";
};
config.networking.hostName = name;
networking.hostName = name;
deployment.tags = config.system.nixos.tags;
}

View file

@ -1,13 +1,13 @@
{ config, ... }:
{
services.pipewire = {
enable = config.system.desktop.enable;
wireplumber.extraConfig."wireplumber.settings"."bluetooth.autoswitch-to-headset-profile" = false;
enable = builtins.elem "pc" config.system.nixos.tags;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
#jack.enable = true;
wireplumber.extraConfig."wireplumber.settings"."bluetooth.autoswitch-to-headset-profile" = false;
};
}

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
{
config = lib.mkIf config.system.desktop.enable {
config = lib.mkIf (builtins.elem "pc" config.system.nixos.tags) {
hardware.bluetooth = {
enable = true;
settings = {
@ -8,9 +8,7 @@
Policy.AutoEnable = "true";
};
};
environment = {
systemPackages = with pkgs; [ bluetui ];
persistence."/persist".directories = [ "/var/lib/bluetooth" ];
};
environment.persistence."/persist".directories = [ "/var/lib/bluetooth" ];
};
}

View file

@ -10,7 +10,6 @@
boot = {
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
kernelParams = [ "nouveau.config=NvGspRm=1" ];
blacklistedKernelModules = [ "pcspkr" ];
kernel.sysctl = {
"vm.max_map_count" = 2147483642;

View file

@ -7,6 +7,7 @@
./disks
./networking
./printing
./tlp
./udev
./video
];

View file

@ -2,17 +2,20 @@
{
boot = {
supportedFilesystems = {
ntfs = config.system.desktop.enable;
zfs = config.system.server.enable;
ntfs = builtins.elem "pc" config.system.nixos.tags;
zfs = builtins.elem "server" config.system.nixos.tags;
};
swraid = {
enable = config.system.server.enable;
enable = builtins.elem "server" config.system.nixos.tags;
mdadmConf = "MAILADDR contact@nixfox.ca";
};
};
services = lib.mkIf config.environment.persistence."/persist".enable {
btrfs.autoScrub.enable = true;
btrfs.autoScrub = {
enable = true;
interval = "weekly";
};
fstrim.enable = true;
};

View file

@ -1,6 +1,7 @@
{ config, ... }:
{
imports = [
./mounts
./mycelium
./nameservers
./wireless

View file

@ -0,0 +1,32 @@
{ config, lib, nodes, ... }:
{
fileSystems = let
netOpts = [
"noauto"
"soft"
"x-systemd.automount"
];
in with nodes; {
"midas" = {
enable = lib.mkDefault false;
device = "[${midas.config.deployment.targetHost}]:/storage";
mountPoint = "/network/Midas";
fsType = "nfs4";
options = netOpts;
};
"kitty" = {
enable = lib.mkDefault false;
device = "[${kitty.config.deployment.targetHost}]:/storage";
mountPoint = "/network/Kitty";
fsType = "nfs4";
options = netOpts;
};
"prophet" = {
enable = lib.mkDefault false;
device = "[${prophet.config.deployment.targetHost}]:/storage";
mountPoint = "/network/Prophet";
fsType = "nfs4";
options = netOpts;
};
};
}

View file

@ -1,7 +1,7 @@
{ config, ... }:
{ ... }:
{
networking.wireless = {
enable = config.system.desktop.enable;
enable = true;
userControlled.enable = true;
};
}

View file

@ -2,7 +2,7 @@
{
services = {
printing = {
enable = config.system.desktop.enable;
enable = builtins.elem "pc" config.system.nixos.tags;
drivers = with pkgs; [ hplip ];
};
avahi = {

View file

@ -0,0 +1,31 @@
{ config, ... }:
{
services.tlp = {
enable = true;
settings = let
leastBat = 80;
maxBat = 85;
in {
# Stop battery charging after threshold
START_CHARGE_THRESH_BAT0 = leastBat;
STOP_CHARGE_THRESH_BAT0 = maxBat;
START_CHARGE_THRESH_BAT1 = leastBat;
STOP_CHARGE_THRESH_BAT1 = maxBat;
# Change CPU energy/performance policy to power
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
# Enable the platform profile low-power
PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "low-power";
# Disable turbo boost
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
CPU_HWP_DYN_BOOST_ON_AC = 1;
CPU_HWP_DYN_BOOST_ON_BAT = 0;
};
};
}

View file

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
{
services.udev.packages = with pkgs; lib.mkIf config.system.desktop.enable [
services.udev.packages = with pkgs; [
android-udev-rules
game-devices-udev-rules
];
}

View file

@ -3,7 +3,7 @@
imports = [ ./nvidia ];
hardware.graphics = {
enable = config.system.desktop.enable;
enable = builtins.elem "pc" config.system.nixos.tags;
enable32Bit = if config.nixpkgs.hostPlatform.linuxArch == "x86_64" then true else false;
extraPackages = with pkgs; [
vulkan-loader

View file

@ -1,20 +1,18 @@
{ config, lib, ... }:
{
options.system.nvidia.enable = lib.mkEnableOption "Nvidia graphic drivers";
config = lib.mkIf (lib.elem "nvidia" config.services.xserver.videoDrivers) {
boot.kernelParams = [ "nvidia_drm.fbdev=1" ]; # Framebuffer fixes TTY access
config = lib.mkIf config.system.nvidia.enable {
hardware.nvidia = {
modesetting.enable = true;
nvidiaSettings = false;
open = true;
};
boot.kernelParams = [ "nvidia_drm.fbdev=1" ]; # Framebuffer fixes TTY access
services.xserver.videoDrivers = [ "nvidia" ];
nixpkgs.allowUnfreePackages = [ "nvidia-x11" ];
specialisation.nouveau.configuration.config.system.nvidia.enable = lib.mkForce false;
specialisation.nouveau.configuration.config.services.xserver.videoDrivers = lib.mkForce [ "nouveau" ];
} // {
boot.kernelParams = [ "nouveau.config=NvGspRm=1" ];
};
}

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
{
config = lib.mkIf config.system.desktop.enable {
config = lib.mkIf (builtins.elem "pc" config.system.nixos.tags) {
programs.sway.enable = true;
security.pam.services.swaylock = {};
};

View file

@ -1,7 +1,7 @@
{ config, ... }:
{
programs.gamemode = {
enable = config.system.desktop.enable;
enable = builtins.elem "pc" config.system.nixos.tags;
settings = {
general.renice = 10;
gpu = {

View file

@ -1,4 +1,4 @@
{ config, ... }:
{ ... }:
{
programs.udevil.enable = config.system.desktop.enable;
programs.udevil.enable = true;
}

Binary file not shown.

View file

@ -6,7 +6,6 @@
./libvirtd
./snowflake
./ssh
./tlp
./userborn
./vmware
];

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.system.desktop.enable {
config = lib.mkIf (builtins.elem "pc" config.system.nixos.tags) {
services.greetd = {
enable = true;
settings.default_session.command = lib.mkDefault (lib.strings.concatStringsSep " " [

View file

@ -14,13 +14,15 @@
};
};
programs.virt-manager.enable = true;
networking.firewall.trustedInterfaces = [
"virbr0"
"virbr1"
# Isolate devices into more IOMMU groups
boot.kernelParams = [
"pcie_acs_override=downstream,multifunction"
"pci=routeirq"
];
programs.virt-manager.enable = true;
# Allow looking glass to be accessed by users
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 - libvirtd -" ];
environment.persistence."/persist".directories = [ "/var/lib/libvirt" ];

View file

@ -1,4 +0,0 @@
{ config, ... }:
{
services.tlp.enable = config.system.desktop.enable;
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
{
config = lib.mkIf config.services.cloudflare-dyndns.enable {
services.cloudflare-dyndns.apiTokenFile = "/var/lib/private/cloudflare-dyndns/key";

View file

@ -5,7 +5,6 @@
./forgejo
./icecast
./jellyfin
./lemmy
./mailserver
./mastodon
./matrix

View file

@ -8,17 +8,17 @@
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.nixfox.ca";
ROOT_URL = "https://git.nixfox.ca:443";
DOMAIN = "git.${config.vars.mainDomain}";
ROOT_URL = "https://git.${config.vars.mainDomain}:443";
HTTP_PORT = 3110;
SSH_PORT = 2299;
START_SSH_SERVER = true;
};
mailer = {
ENABLED = true;
SMTP_ADDR = "mx.nixfox.ca";
FROM = "NixFox Git <noreply@nixfox.ca>";
USER = "noreply@nixfox.ca";
SMTP_ADDR = "mx.${config.vars.mainDomain}";
FROM = "NixFox Git <noreply@${config.vars.mainDomain}>";
USER = "noreply@${config.vars.mainDomain}";
PASSWD = config.secrets.mailPass.nixfoxNoReply;
PROTOCOL = "smtps";
};
@ -32,7 +32,7 @@
networking.firewall.allowedTCPPorts = [ 2299 ];
services.cloudflare-dyndns.domains = [ "git.nixfox.ca" ];
services.cloudflare-dyndns.domains = [ "git.${config.vars.mainDomain}" ];
environment.persistence."/persist".directories = [ "/var/lib/forgejo" ];
};

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
{
services.nginx.virtualHosts."git.nixfox.ca" = lib.mkIf config.services.forgejo.enable {
services.nginx.virtualHosts."git.${config.vars.mainDomain}" = lib.mkIf config.services.forgejo.enable {
enableACME = true;
forceSSL = true;
locations."/" = {

Some files were not shown because too many files have changed in this diff Show more