It builds now.

This commit is contained in:
Jimbo 2024-10-15 02:40:43 -04:00
parent 9c71495c73
commit f3d9e8a188
47 changed files with 577 additions and 401 deletions

View file

@ -1,5 +1,30 @@
{
"nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1723293904,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"blender-bin": {
"inputs": {
"nixpkgs": "nixpkgs"
@ -14,7 +39,7 @@
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/blender-bin/1.0.8.tar.gz"
"url": "https://flakehub.com/f/edolstra/blender-bin/1.0.9.tar.gz"
}
},
"blobs": {
@ -54,6 +79,28 @@
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -125,7 +172,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems"
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
@ -143,7 +190,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1681202837,
@ -366,18 +413,17 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1727540905,
"narHash": "sha256-40J9tW7Y794J7Uw4GwcAKlMxlX2xISBl6IBigo83ih8=",
"owner": "nixos",
"lastModified": 1728740863,
"narHash": "sha256-u+rxA79a0lyhG+u+oPBRtTDtzz8kvkc9a6SWSt9ekVc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fbca5e745367ae7632731639de5c21f29c8744ed",
"rev": "a3f9ad65a0bf298ed5847629a57808b97e6e8077",
"type": "github"
},
"original": {
"owner": "nixos",
"id": "nixpkgs",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
"type": "indirect"
}
},
"nur": {
@ -424,6 +470,7 @@
},
"root": {
"inputs": {
"agenix": "agenix",
"blender-bin": "blender-bin",
"hardware": "hardware",
"home-manager": "home-manager",
@ -505,25 +552,39 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"owner": "nixos",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"type": "github"
},
"original": {
"owner": "nixos",
"id": "nixpkgs",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
"type": "indirect"
}
},
"utils": {
"inputs": {
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1709126324,

100
flake.nix
View file

@ -1,93 +1,57 @@
{
description = "Jimbo's systems as a flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.9.tar.gz";
minecraft.url = "github:Infinidoge/nix-minecraft";
hardware.url = "github:nixos/nixos-hardware/master";
# Secure boot
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "nixpkgs/nixos-24.05";
unstable.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.9.tar.gz";
hardware.url = "github:nixos/nixos-hardware/master";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
unstable,
nur,
mailserver,
blender-bin,
hardware,
lanzaboote,
home-manager,
...
}@inputs:
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
minecraft.url = "github:Infinidoge/nix-minecraft";
};
outputs = { self, nixpkgs, unstable, home-manager, nur, blender-bin, hardware, lanzaboote, agenix, mailserver, minecraft, ... }:
let
mkNixos = modules: nixpkgs.lib.nixosSystem {
inherit modules;
specialArgs = { inherit (self) inputs outputs; };
specialArgs = { inherit nixpkgs unstable hardware lanzaboote mailserver minecraft; };
};
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
inherit modules pkgs;
extraSpecialArgs = { inherit (self) inputs outputs; };
extraSpecialArgs = { inherit unstable nur blender-bin; };
};
in {
# Variables defined so they can be accessed globally
secrets = import ./variables/secrets;
displays = import ./variables/displays;
ips = import ./variables/ips;
look = import ./variables/look;
ws = import ./variables/workspaces;
# NixOS config entrypoint, use 'nixos-rebuild --flake .#your-hostname'
# nixos-rebuild switch --flake .#hostname
nixosConfigurations = {
firefly = mkNixos [
./hosts/firefly/system
lanzaboote.nixosModules.lanzaboote
];
cyberspark = mkNixos [
./hosts/cyberspark/system
mailserver.nixosModule
];
shuttleworth = mkNixos [
./hosts/shuttleworth/system
hardware.nixosModules.pine64-pinebook-pro
];
firefly = mkNixos [ ./hosts/firefly/system ];
cyberspark = mkNixos [ ./hosts/cyberspark/system ];
shuttleworth = mkNixos [ ./hosts/shuttleworth/system ];
};
# Home-manager configuration, use 'home-manager --flake .#your-username@your-hostname'
# home-manager switch --flake .#username@hostname
homeConfigurations = {
"jimbo@firefly" = mkHome [
./hosts/firefly/home
nur.nixosModules.nur
] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@cyberspark" = mkHome [
./hosts/cyberspark/home
] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@shuttleworth" = mkHome [
./hosts/shuttleworth/home
nur.nixosModules.nur
] nixpkgs.legacyPackages.aarch64-linux;
# Profile for ssh envrionments on different non-root systems
"jimbo@terminal" = mkHome [
./hosts/terminal/home
] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@firefly" = mkHome [ ./hosts/firefly/home ] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@cyberspark" = mkHome [ ./hosts/cyberspark/home ] nixpkgs.legacyPackages.x86_64-linux;
"jimbo@shuttleworth" = mkHome [ ./hosts/shuttleworth/home ] nixpkgs.legacyPackages.aarch64-linux;
"jimbo@guest" = mkHome [ ./hosts/guest/home ] nixpkgs.legacyPackages.x86_64-linux;
};
};
}

View file

@ -1,7 +1,9 @@
{ ... }:
{ mailserver, ... }:
{
imports = [
./hardware
mailserver.nixosModule
../../../modules/system
../../../modules/system/accounts
../../../modules/system/devices/filesystems

View file

@ -1,7 +1,7 @@
{ ... }:
{ nur, ... }:
{
imports = [
../../../overlays
# Apps and programs
../../../modules/home
../../../modules/home/users
../../../modules/home/files
@ -9,5 +9,10 @@
../../../modules/home/programs
../../../modules/home/sway
../../../modules/home/utils
# Misc
nur.nixosModules.nur
../../../overlays
../../../variables
];
}

View file

@ -1,20 +1,23 @@
{ ... }:
{ lanzaboote, ... }:
{
imports = [
./hardware
# Apps and programs
../../../overlays
../../../modules/system
../../../modules/system/accounts
../../../modules/system/desktop
../../../modules/system/programs
../../../modules/system/services
../../../overlays
../../../variables
# Devices and hardware
./hardware
lanzaboote.nixosModules.lanzaboote
../../../modules/system/devices
../../../modules/system/devices/boot/lanzaboote
../../../modules/system/devices/video/nvidia
../../../modules/system/devices/networking/firewall/server
../../../modules/system/devices/networking/firewall/pc
];
networking.hostName = "firefly";

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, outputs, modulesPath, ... }:
{ config, lib, pkgs, modulesPath, ... }:
let
# Set common boot paramaters
commonKernelParams = [
@ -23,9 +23,8 @@ in {
(modulesPath + "/installer/scan/not-detected.nix")
];
# Set all boot options
boot = {
kernelPackages = pkgs.unstable.linuxPackages_zen;
kernelPackages = pkgs.unstable.linuxPackages_latest;
blacklistedKernelModules = [
"pcspkr"
];
@ -48,66 +47,103 @@ in {
"vfio_iommu_type1"
"kvm-amd"
];
# Encryption and TPM
systemd.enable = true;
luks.devices = {
"crypt-ssd" = {
device = "/dev/disk/by-uuid/52110c74-19b6-40ef-9710-e6c9b157005f";
preLVM = true;
allowDiscards = true;
};
};
};
};
# Additional entry to boot from the second GPU
specialisation = {
gputwo.configuration = {
boot.kernelParams = commonKernelParams ++ ["vfio-pci.ids=10de:2504,10de:228e"];
boot.kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:2504,10de:228e" ];
};
};
# Mount everything as necessary
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/f0786b07-8303-416f-87ff-276bfd696387";
fsType = "bcachefs";
device = "/dev/disk/by-uuid/bbfed7d1-62f2-4d8e-b63f-7f6ec932105b";
fsType = "btrfs";
options = [ "subvol=@" "noatime" "nodiratime" "discard" ];
};
"/home" = {
device = "/dev/disk/by-uuid/bbfed7d1-62f2-4d8e-b63f-7f6ec932105b";
fsType = "btrfs";
options = [ "subvol=@home" "noatime" "nodiratime" "discard" ];
};
"/nix" = {
device = "/dev/disk/by-uuid/bbfed7d1-62f2-4d8e-b63f-7f6ec932105b";
fsType = "btrfs";
options = [ "subvol=@nix" "noatime" "nodiratime" "discard" ];
};
"/var" = {
device = "/dev/disk/by-uuid/bbfed7d1-62f2-4d8e-b63f-7f6ec932105b";
fsType = "btrfs";
options = [ "subvol=@var" "noatime" "nodiratime" "discard" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/EF6D-9009";
device = "/dev/disk/by-uuid/3B4A-76C9";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
"/etc/libvirt" = {
device = "/dev/disk/by-label/Qemu";
options = ["nosuid" "nodev" "nofail"];
};
"/var/lib/libvirt" = {
depends = ["/etc/libvirt"];
device = "/etc/libvirt/varlibvirt";
options = ["bind" "rw"];
};
# Games and such
"/mnt/Linux1" = {
device = "/dev/disk/by-label/Linux1";
options = ["nosuid" "nodev" "nofail" "x-gvfs-show"];
device = "/dev/disk/by-uuid/b2901f8c-ffda-4b88-bb63-a9ea0c96ccb4";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
};
"/mnt/Linux2" = {
device = "/dev/disk/by-label/Linux2";
options = ["nosuid" "nodev" "nofail" "x-gvfs-show"];
device = "/dev/disk/by-uuid/f08e4f38-162c-402f-ba2a-5925151b78bf";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
};
"/mnt/Windows1" = {
device = "/dev/disk/by-label/Windows1";
options = ["nosuid" "nodev" "noauto"];
device = "/dev/disk/by-uuid/10BC97B2BC979138";
options = [ "nosuid" "nodev" "noauto" ];
};
"/mnt/Windows2" = {
device = "/dev/disk/by-label/Windows2";
options = ["nosuid" "nodev" "noauto"];
device = "/dev/disk/by-uuid/0A5A3420237C863A";
options = [ "nosuid" "nodev" "noauto" ];
};
# Miscellaneous mounts
"/etc/libvirt" = {
device = "/dev/disk/by-uuid/f18a0302-9914-471d-828c-85ab1a67a8be";
options = [ "nosuid" "nodev" "nofail" ];
};
"/etc/libvirt/VMs/Bulk" = {
depends = [ "/etc/libvirt" ];
device = "/dev/disk/by-uuid/3eb36c3e-81ac-4281-89f0-c89242d88dd6";
options = [ "nosuid" "nodev" "nofail" ];
};
"/var/lib/libvirt" = {
depends = [ "/etc/libvirt" ];
device = "/etc/libvirt/varlibvirt";
options = [ "bind" "rw" ];
};
# Network mounts
"/home/jimbo/JimboNFS" = {
device = "${outputs.ips.server}:/export/JimboNFS";
device = "${config.ips.server}:/export/JimboNFS";
fsType = "nfs4";
options = ["x-systemd.automount" "_netdev" "nofail" "noauto"];
options = [ "x-systemd.automount" "_netdev" "nofail" "noauto" ];
};
};
# Set the swap partition
swapDevices = [
{device = "/dev/disk/by-uuid/2e4c5120-716d-4cdc-84a0-c9e6391760db";}
{ device = "/dev/disk/by-uuid/1a6a68d0-8ae7-4836-a585-b708597937a1"; }
];
# Enables DHCP on each ethernet and wireless interface.
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,13 @@
{ nur, ... }:
{
imports = [
nur.nixosModules.nur
../../../modules/home
../../../modules/home/users
../../../modules/home/files
../../../modules/home/settings
../../../modules/home/programs
../../../modules/home/sway
../../../modules/home/utils
];
}

View file

@ -0,0 +1,25 @@
{ hardware, ... }:
{
imports = [
./hardware
# Apps and programs
../../../modules/system
../../../modules/system/accounts
../../../modules/system/desktop
../../../modules/system/programs
../../../modules/system/services
# Devices and hardware
hardware.nixosModules.pine64-pinebook-pro
../../../modules/system/devices
../../../modules/system/devices/boot/extlinux
../../../modules/system/devices/networking/firewall/pc
../../../modules/system/devices/networking/wireguard/pc
];
networking.hostName = "shuttleworth";
# Force Electron to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
}

View file

@ -1,4 +1,4 @@
{ outputs, ... }:
{ config, ... }:
{
programs.foot = {
enable = true;
@ -6,14 +6,14 @@
settings = {
main = {
term = "xterm-256color";
font = "${outputs.look.fonts.nerd}:size=14.7";
font = "${config.look.fonts.nerd}:size=14.7";
};
cursor = {
style = "beam";
};
colors = {
alpha = "0.65";
background = "${outputs.look.colors.dark}";
background = "${config.look.colors.dark}";
regular0 = "3f3f3f";
regular1 = "cc0000";
regular2 = "4e9a06";

View file

@ -1,31 +1,31 @@
{ pkgs, config, outputs, ... }:
{ pkgs, config, ... }:
let
# FireFox colors
themeJim = ''
:root {
--tab-active-bg-color: #${outputs.look.colors.prime};
--tab-hover-bg-color: #${outputs.look.colors.accent};
--tab-inactive-bg-color: #${outputs.look.colors.dark};
--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-fg-fallback-color: #FFFFFF;
--tab-inactive-fg-fallback-color: #${outputs.look.colors.text};
--urlbar-focused-bg-color: #${outputs.look.colors.dark};
--urlbar-not-focused-bg-color: #${outputs.look.colors.dark};
--toolbar-bgcolor: #${outputs.look.colors.dark} !important;
--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;
'';
themeAlt = ''
:root {
--tab-active-bg-color: #${outputs.look.colors.dark};
--tab-hover-bg-color: #${outputs.look.colors.accent};
--tab-inactive-bg-color: #${outputs.look.colors.prime};
--tab-active-fg-fallback-color: #${outputs.look.colors.text};
--tab-active-bg-color: #${config.look.colors.dark};
--tab-hover-bg-color: #${config.look.colors.accent};
--tab-inactive-bg-color: #${config.look.colors.prime};
--tab-active-fg-fallback-color: #${config.look.colors.text};
--tab-inactive-fg-fallback-color: #FFFFFF;
--urlbar-focused-bg-color: #${outputs.look.colors.prime};
--urlbar-not-focused-bg-color: #${outputs.look.colors.prime};
--toolbar-bgcolor: #${outputs.look.colors.prime} !important;
--urlbar-focused-bg-color: #${config.look.colors.prime};
--urlbar-not-focused-bg-color: #${config.look.colors.prime};
--toolbar-bgcolor: #${config.look.colors.prime} !important;
'';
quteFoxCSS = ''
--tab-font: '${outputs.look.fonts.main}';
--urlbar-font: '${outputs.look.fonts.main}';
--tab-font: '${config.look.fonts.main}';
--urlbar-font: '${config.look.fonts.main}';
/* try increasing if you encounter problems */
--urlbar-height-setting: 24px;
@ -336,9 +336,9 @@ in {
};
};
commonSettings = {
"font.name.serif.x-western" = "${outputs.look.fonts.main}";
"font.name.sans-serif.x-western" = "${outputs.look.fonts.main}";
"font.name.monospace.x-western" = "${outputs.look.fonts.nerd}";
"font.name.serif.x-western" = "${config.look.fonts.main}";
"font.name.sans-serif.x-western" = "${config.look.fonts.main}";
"font.name.monospace.x-western" = "${config.look.fonts.nerd}";
"general.autoScroll" = true;
"browser.compactmode.show" = true;
"browser.uidensity" = 1;

View file

@ -1,18 +1,18 @@
{ pkgs, outputs, ... }:
{ pkgs, config, ... }:
{
services.mako = {
enable = true;
borderColor = "#${outputs.look.colors.accent}";
backgroundColor = "#${outputs.look.colors.dark}CC";
output = "${outputs.displays.d1}";
borderColor = "#${config.look.colors.accent}";
backgroundColor = "#${config.look.colors.dark}CC";
output = "${config.displays.d1}";
sort = "+time";
layer = "overlay";
padding = "8";
margin = "0";
borderSize = outputs.look.border.int;
borderSize = config.look.border.int;
maxIconSize = 40;
defaultTimeout = 6000;
font = "${outputs.look.fonts.main} 12";
font = "${config.look.fonts.main} 12";
anchor = "bottom-right";
extraConfig = "on-button-right=dismiss-all\nouter-margin=10\n[mode=do-not-disturb]\ninvisible=1";
};

View file

@ -1,10 +1,10 @@
{ pkgs, config, outputs, ... }:
{ pkgs, config, ... }:
{
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
terminal = "foot";
font = "${outputs.look.fonts.main} 14";
font = "${config.look.fonts.main} 14";
theme = let
inherit (config.lib.formats.rasi) mkLiteral;
in {
@ -15,24 +15,24 @@
red = mkLiteral "#DC322F";
background-color = mkLiteral "#00000000";
separatorcolor = mkLiteral "#00000000";
normal-foreground = mkLiteral "#${outputs.look.colors.text}";
normal-background = mkLiteral "#${outputs.look.colors.dark}1A";
urgent-foreground = mkLiteral "#${outputs.look.colors.urgent}";
active-foreground = mkLiteral "#${outputs.look.colors.split}";
selected-active-foreground = mkLiteral "#${outputs.look.colors.prime}";
background = mkLiteral "#${outputs.look.colors.dark}B3";
bordercolor = mkLiteral "#${outputs.look.colors.prime}";
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}B3";
bordercolor = mkLiteral "#${config.look.colors.prime}";
selected-normal-foreground = mkLiteral "#FFFFFF";
selected-normal-background = mkLiteral "#${outputs.look.colors.prime}80";
border-color = mkLiteral "#${outputs.look.colors.prime}";
urgent-background = mkLiteral "#${outputs.look.colors.accent}26";
active-background = mkLiteral "#${outputs.look.colors.accent}26";
selected-active-background = mkLiteral "#${outputs.look.colors.split}54";
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";
};
"#window" = {
background-color = mkLiteral "@background";
width = 500;
border = mkLiteral "${outputs.look.border.string}";
border = mkLiteral "${config.look.border.string}";
padding = 5;
};
"#message" = {
@ -155,13 +155,13 @@
case $RET in
Default) swaymsg reload ;;
Wide) swaymsg "
output ${outputs.displays.d1} enable pos 1680 0 mode 1680x1050@59.954Hz
output ${outputs.displays.d2} enable pos 0 0 mode 1680x1050@59.954Hz
output ${outputs.displays.d3} enable pos 3360 0 transform 0
output ${config.displays.d1} enable pos 1680 0 mode 1680x1050@59.954Hz
output ${config.displays.d2} enable pos 0 0 mode 1680x1050@59.954Hz
output ${config.displays.d3} enable pos 3360 0 transform 0
";;
GPU2) swaymsg "
output ${outputs.displays.d2} enable pos 1680 0 mode 1920x1080@60Hz
output ${outputs.displays.d3} enable pos 0 0 transform 0
output ${config.displays.d2} enable pos 1680 0 mode 1920x1080@60Hz
output ${config.displays.d3} enable pos 0 0 transform 0
";;
esac
}

View file

@ -7,6 +7,5 @@
./general
./headless
./production
./remote-desktop
];
}

View file

@ -6,6 +6,6 @@
ryujinx
duckstation
pcsx2
unstable.lime3ds
#lime3ds
];
}

View file

@ -1,4 +1,4 @@
{ pkgs, lib, config, ... }:
{ pkgs, blender-bin, ... }:
{
home.packages = with pkgs; [
krita
@ -7,4 +7,6 @@
blender_4_2
sunvox
];
nixpkgs.overlays = [ blender-bin.overlays.default ];
}

View file

@ -1,9 +1,8 @@
{ pkgs, outputs, ... }:
{ pkgs, ... }:
{
programs.git = {
enable = true;
lfs.enable = true;
userName = outputs.secrets.jimUsername;
userEmail = outputs.secrets.jimEmail;
userName = "Jimbo";
userEmail = "jimbo@jimbosfiles.com";
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, outputs, ... }:
{ config, pkgs, ... }:
{
programs.neovim = {
enable = true;
@ -85,8 +85,8 @@
let g:airline_theme='onedark'
let g:airline#extensions#tabline#enabled = 1
hi Normal guibg=none ctermbg=235
hi Visual guibg=#${outputs.look.colors.mid} ctermbg=238
hi Pmenu guibg=#${outputs.look.colors.mid} ctermbg=238
hi Visual guibg=#${config.look.colors.mid} ctermbg=238
hi Pmenu guibg=#${config.look.colors.mid} ctermbg=238
hi EndOfBuffer guibg=none ctermbg=235
hi LineNr guibg=none ctermbg=none
lua require'colorizer'.setup()

View file

@ -1,9 +1,9 @@
{ pkgs, outputs, ... }:
{ pkgs, config, ... }:
{
gtk = {
enable = true;
font = {
name = "${outputs.look.fonts.main}";
name = "${config.look.fonts.main}";
size = 11;
};
theme = {

View file

@ -1,15 +1,16 @@
{ config, pkgs, outputs, ... }:
{ config, pkgs, ... }:
{
imports = [
./hardware
./theme
./hotkeys
./programs
./rules
./autostart
./waybar
./swayshot
./swaylock
./swayfx
#./swayfx
];
# Enable Sway and write some scripts
@ -20,7 +21,7 @@
checkConfig = false;
extraConfig = ''
# Options I can't find in Nix yet
default_floating_border pixel ${outputs.look.border.string}
default_floating_border pixel ${config.look.border.string}
hide_edge_borders --i3 smart
titlebar_padding 10 1
primary_selection disabled
@ -32,8 +33,8 @@
}}
# Switch to workspace 1
workspace ${outputs.ws.w7}
workspace ${outputs.ws.w1}
workspace ${config.ws.w7}
workspace ${config.ws.w1}
'';
};
}

View file

@ -1,10 +1,10 @@
{ pkgs, outputs, ... }:
{ pkgs, config, ... }:
{
wayland.windowManager.sway = {
config = {
# Define monitors
output = {
${outputs.displays.d1} = {
${config.displays.d1} = {
pos = "1920 405";
mode = "1920x1080@143.980Hz";
max_render_time = "3";
@ -12,13 +12,13 @@
adaptive_sync = "on";
#tearing_allowed = "1";
};
${outputs.displays.d2} = {
${config.displays.d2} = {
pos = "0 405";
mode = "1920x1080@60Hz";
max_render_time = "3";
bg = "~/.wallpapers/2.png fill";
};
${outputs.displays.d3} = {
${config.displays.d3} = {
pos = "3840 0";
mode = "1680x1050@59.883Hz";
transform = "270";

View file

@ -1,4 +1,4 @@
{ pkgs, outputs, ... }:
{ pkgs, config, ... }:
{
wayland.windowManager.sway = {
config = let
@ -16,9 +16,9 @@
# Get the current border style of the focused window
current_style=$(swaymsg -t get_tree | jq -r '.. | select(.focused?).border')
# Toggle between "normal" (default) and "pixel ${outputs.look.border.string}" border styles
# Toggle between "normal" (default) and "pixel ${config.look.border.string}" border styles
if [ "$current_style" == "none" ]; then
swaymsg "sticky disable, border pixel ${outputs.look.border.string}"
swaymsg "sticky disable, border pixel ${config.look.border.string}"
else
swaymsg "sticky enable, border none"
fi
@ -28,7 +28,7 @@
swayTools = pkgs.writeScript "swaytools" ''
# List the app name and whether or not it uses wayland
swayprop() {
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | slurp -r -c ${outputs.look.colors.prime} -B 00000066 -b 00000000)
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | slurp -r -c ${config.look.colors.prime} -B 00000066 -b 00000000)
if [ -n "$selected_window" ]; then
app_id=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .app_id')
system=$(sed 's/xdg_shell/Wayland/g; s/xwayland/Xorg/g' < <(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .shell'))
@ -38,7 +38,7 @@
# Kill a selected window
swaykill() {
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | slurp -r -c ${outputs.look.colors.prime} -B 00000066 -b 00000000)
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | slurp -r -c ${config.look.colors.prime} -B 00000066 -b 00000000)
if [ -n "$selected_window" ]; then
pid=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .pid')
kill -9 "$pid"
@ -143,7 +143,7 @@
"Shift+Print" = ''exec swayshot --screen'';
# Server SSH
"${primeMod}+Ctrl+Return" = ''exec foot ssh ${outputs.ips.server} -p 2222'';
"${primeMod}+Ctrl+Return" = ''exec foot ssh ${config.ips.server} -p 2222'';
# Display Brightness and Keyboard Brightness
"XF86MonBrightnessUp" = ''exec light -A 5'';
@ -158,50 +158,50 @@
"${primeMod}+Shift+r" = ''reload'';
# Switch to workspaces
"${primeMod}+grave" = ''workspace ${outputs.ws.w0}'';
"${primeMod}+1" = ''workspace ${outputs.ws.w1}'';
"${primeMod}+2" = ''workspace ${outputs.ws.w2}'';
"${primeMod}+3" = ''workspace ${outputs.ws.w3}'';
"${primeMod}+4" = ''workspace ${outputs.ws.w4}'';
"${primeMod}+5" = ''workspace ${outputs.ws.w5}'';
"${primeMod}+6" = ''workspace ${outputs.ws.w6}'';
"${primeMod}+7" = ''workspace ${outputs.ws.w7}'';
"${primeMod}+8" = ''workspace ${outputs.ws.w8}'';
"${primeMod}+9" = ''workspace ${outputs.ws.w9}'';
"${primeMod}+grave" = ''workspace ${config.ws.w0}'';
"${primeMod}+1" = ''workspace ${config.ws.w1}'';
"${primeMod}+2" = ''workspace ${config.ws.w2}'';
"${primeMod}+3" = ''workspace ${config.ws.w3}'';
"${primeMod}+4" = ''workspace ${config.ws.w4}'';
"${primeMod}+5" = ''workspace ${config.ws.w5}'';
"${primeMod}+6" = ''workspace ${config.ws.w6}'';
"${primeMod}+7" = ''workspace ${config.ws.w7}'';
"${primeMod}+8" = ''workspace ${config.ws.w8}'';
"${primeMod}+9" = ''workspace ${config.ws.w9}'';
# Switch to alternate workspaces
"${secMod}+F1" = ''workspace ${outputs.ws.w1a}'';
"${secMod}+F2" = ''workspace ${outputs.ws.w2a}'';
"${secMod}+F3" = ''workspace ${outputs.ws.w3a}'';
"${secMod}+F4" = ''workspace ${outputs.ws.w4a}'';
"${secMod}+F5" = ''workspace ${outputs.ws.w5a}'';
"${secMod}+F6" = ''workspace ${outputs.ws.w6a}'';
"${secMod}+F7" = ''workspace ${outputs.ws.w7a}'';
"${secMod}+F8" = ''workspace ${outputs.ws.w8a}'';
"${secMod}+F9" = ''workspace ${outputs.ws.w9a}'';
"${secMod}+F1" = ''workspace ${config.ws.w1a}'';
"${secMod}+F2" = ''workspace ${config.ws.w2a}'';
"${secMod}+F3" = ''workspace ${config.ws.w3a}'';
"${secMod}+F4" = ''workspace ${config.ws.w4a}'';
"${secMod}+F5" = ''workspace ${config.ws.w5a}'';
"${secMod}+F6" = ''workspace ${config.ws.w6a}'';
"${secMod}+F7" = ''workspace ${config.ws.w7a}'';
"${secMod}+F8" = ''workspace ${config.ws.w8a}'';
"${secMod}+F9" = ''workspace ${config.ws.w9a}'';
# Move window to and focus new workspace
"${primeMod}+Shift+grave" = ''move container to workspace ${outputs.ws.w0}; workspace ${outputs.ws.w0}'';
"${primeMod}+Shift+1" = ''move container to workspace ${outputs.ws.w1}; workspace ${outputs.ws.w1}'';
"${primeMod}+Shift+2" = ''move container to workspace ${outputs.ws.w2}; workspace ${outputs.ws.w2}'';
"${primeMod}+Shift+3" = ''move container to workspace ${outputs.ws.w3}; workspace ${outputs.ws.w3}'';
"${primeMod}+Shift+4" = ''move container to workspace ${outputs.ws.w4}; workspace ${outputs.ws.w4}'';
"${primeMod}+Shift+5" = ''move container to workspace ${outputs.ws.w5}; workspace ${outputs.ws.w5}'';
"${primeMod}+Shift+6" = ''move container to workspace ${outputs.ws.w6}; workspace ${outputs.ws.w6}'';
"${primeMod}+Shift+7" = ''move container to workspace ${outputs.ws.w7}; workspace ${outputs.ws.w7}'';
"${primeMod}+Shift+8" = ''move container to workspace ${outputs.ws.w8}; workspace ${outputs.ws.w8}'';
"${primeMod}+Shift+9" = ''move container to workspace ${outputs.ws.w9}; workspace ${outputs.ws.w9}'';
"${primeMod}+Shift+grave" = ''move container to workspace ${config.ws.w0}; workspace ${config.ws.w0}'';
"${primeMod}+Shift+1" = ''move container to workspace ${config.ws.w1}; workspace ${config.ws.w1}'';
"${primeMod}+Shift+2" = ''move container to workspace ${config.ws.w2}; workspace ${config.ws.w2}'';
"${primeMod}+Shift+3" = ''move container to workspace ${config.ws.w3}; workspace ${config.ws.w3}'';
"${primeMod}+Shift+4" = ''move container to workspace ${config.ws.w4}; workspace ${config.ws.w4}'';
"${primeMod}+Shift+5" = ''move container to workspace ${config.ws.w5}; workspace ${config.ws.w5}'';
"${primeMod}+Shift+6" = ''move container to workspace ${config.ws.w6}; workspace ${config.ws.w6}'';
"${primeMod}+Shift+7" = ''move container to workspace ${config.ws.w7}; workspace ${config.ws.w7}'';
"${primeMod}+Shift+8" = ''move container to workspace ${config.ws.w8}; workspace ${config.ws.w8}'';
"${primeMod}+Shift+9" = ''move container to workspace ${config.ws.w9}; workspace ${config.ws.w9}'';
# Move window to and focus new alternate workspace
"${secMod}+Shift+F1" = ''move container to workspace ${outputs.ws.w1a}; workspace ${outputs.ws.w1a}'';
"${secMod}+Shift+F2" = ''move container to workspace ${outputs.ws.w2a}; workspace ${outputs.ws.w2a}'';
"${secMod}+Shift+F3" = ''move container to workspace ${outputs.ws.w3a}; workspace ${outputs.ws.w3a}'';
"${secMod}+Shift+F4" = ''move container to workspace ${outputs.ws.w4a}; workspace ${outputs.ws.w4a}'';
"${secMod}+Shift+F5" = ''move container to workspace ${outputs.ws.w5a}; workspace ${outputs.ws.w5a}'';
"${secMod}+Shift+F6" = ''move container to workspace ${outputs.ws.w6a}; workspace ${outputs.ws.w6a}'';
"${secMod}+Shift+F7" = ''move container to workspace ${outputs.ws.w7a}; workspace ${outputs.ws.w7a}'';
"${secMod}+Shift+F8" = ''move container to workspace ${outputs.ws.w8a}; workspace ${outputs.ws.w8a}'';
"${secMod}+Shift+F9" = ''move container to workspace ${outputs.ws.w9a}; workspace ${outputs.ws.w9a}'';
"${secMod}+Shift+F1" = ''move container to workspace ${config.ws.w1a}; workspace ${config.ws.w1a}'';
"${secMod}+Shift+F2" = ''move container to workspace ${config.ws.w2a}; workspace ${config.ws.w2a}'';
"${secMod}+Shift+F3" = ''move container to workspace ${config.ws.w3a}; workspace ${config.ws.w3a}'';
"${secMod}+Shift+F4" = ''move container to workspace ${config.ws.w4a}; workspace ${config.ws.w4a}'';
"${secMod}+Shift+F5" = ''move container to workspace ${config.ws.w5a}; workspace ${config.ws.w5a}'';
"${secMod}+Shift+F6" = ''move container to workspace ${config.ws.w6a}; workspace ${config.ws.w6a}'';
"${secMod}+Shift+F7" = ''move container to workspace ${config.ws.w7a}; workspace ${config.ws.w7a}'';
"${secMod}+Shift+F8" = ''move container to workspace ${config.ws.w8a}; workspace ${config.ws.w8a}'';
"${secMod}+Shift+F9" = ''move container to workspace ${config.ws.w9a}; workspace ${config.ws.w9a}'';
# Change focus across windows
"${primeMod}+Up" = ''focus up'';
@ -209,10 +209,10 @@
"${primeMod}+Left" = ''focus left'';
"${primeMod}+Right" = ''focus right'';
# Switch focus across outputs
"${primeMod}+j" = ''focus output ${outputs.displays.d2}'';
"${primeMod}+k" = ''focus output ${outputs.displays.d1}'';
"${primeMod}+l" = ''focus output ${outputs.displays.d3}'';
# Switch focus across config
"${primeMod}+j" = ''focus output ${config.displays.d2}'';
"${primeMod}+k" = ''focus output ${config.displays.d1}'';
"${primeMod}+l" = ''focus output ${config.displays.d3}'';
# Move focused window
"${primeMod}+Shift+Up" = ''move up ${resizeAmount} px'';
@ -220,10 +220,10 @@
"${primeMod}+Shift+Left" = ''move left ${resizeAmount} px'';
"${primeMod}+Shift+Right" = ''move right ${resizeAmount} px'';
# Move window across outputs
"${primeMod}+Shift+j" = ''move output ${outputs.displays.d2}; focus output ${outputs.displays.d2}'';
"${primeMod}+Shift+k" = ''move output ${outputs.displays.d1}; focus output ${outputs.displays.d1}'';
"${primeMod}+Shift+l" = ''move output ${outputs.displays.d3}; focus output ${outputs.displays.d3}'';
# Move window across config
"${primeMod}+Shift+j" = ''move output ${config.displays.d2}; focus output ${config.displays.d2}'';
"${primeMod}+Shift+k" = ''move output ${config.displays.d1}; focus output ${config.displays.d1}'';
"${primeMod}+Shift+l" = ''move output ${config.displays.d3}; focus output ${config.displays.d3}'';
# Change focus between floating/tiled, toggle floating
"${primeMod}+space" = ''focus mode_toggle'';

View file

@ -1,33 +1,33 @@
{ pkgs, outputs, ... }:
{ pkgs, config, ... }:
{
wayland.windowManager.sway = {
config = {
# Assign workspaces to outputs
# Assign workspaces to config
workspaceOutputAssign = let
workspaces1 = [
"${outputs.ws.w0}"
"${outputs.ws.w1}"
"${outputs.ws.w2}"
"${outputs.ws.w3}"
"${outputs.ws.w1a}"
"${outputs.ws.w2a}"
"${outputs.ws.w3a}"
"${config.ws.w0}"
"${config.ws.w1}"
"${config.ws.w2}"
"${config.ws.w3}"
"${config.ws.w1a}"
"${config.ws.w2a}"
"${config.ws.w3a}"
];
workspaces2 = [
"${outputs.ws.w4}"
"${outputs.ws.w5}"
"${outputs.ws.w6}"
"${outputs.ws.w4a}"
"${outputs.ws.w5a}"
"${outputs.ws.w6a}"
"${config.ws.w4}"
"${config.ws.w5}"
"${config.ws.w6}"
"${config.ws.w4a}"
"${config.ws.w5a}"
"${config.ws.w6a}"
];
workspaces3 = [
"${outputs.ws.w7}"
"${outputs.ws.w8}"
"${outputs.ws.w9}"
"${outputs.ws.w7a}"
"${outputs.ws.w8a}"
"${outputs.ws.w9a}"
"${config.ws.w7}"
"${config.ws.w8}"
"${config.ws.w9}"
"${config.ws.w7a}"
"${config.ws.w8a}"
"${config.ws.w9a}"
];
assign = output: workspaces:
map (workspace: {
@ -36,13 +36,13 @@
})
workspaces;
in
(assign "${outputs.displays.d1}" workspaces1) ++
(assign "${outputs.displays.d2}" workspaces2) ++
(assign "${outputs.displays.d3}" workspaces3);
(assign "${config.displays.d1}" workspaces1) ++
(assign "${config.displays.d2}" workspaces2) ++
(assign "${config.displays.d3}" workspaces3);
# Rules
window = {
border = outputs.look.border.int;
border = config.look.border.int;
titlebar = false;
commands = [
# Scratchpads
@ -76,7 +76,7 @@
# Give apps that don't have them borders
{
criteria = {con_mark = "borderless";};
command = ''border pixel ${outputs.look.border.string}'';
command = ''border pixel ${config.look.border.string}'';
}
{
criteria = {app_id = "com.github.wwmm.easyeffects";};
@ -111,20 +111,20 @@
];
};
assigns = {
# Brooutputs.wsers
"${outputs.ws.w1}" = [{app_id = "JimBrowser";}];
"${outputs.ws.w1a}" = [{app_id = "AltBrowser";}];
# Broconfig.wsers
"${config.ws.w1}" = [{app_id = "JimBrowser";}];
"${config.ws.w1a}" = [{app_id = "AltBrowser";}];
# Communication
"${outputs.ws.w3a}" = [{class = "zoom";}];
"${outputs.ws.w7}" = [{app_id = "MiscBrowser";} {app_id = "vesktop";} {class = "vesktop";}];
"${outputs.ws.w8}" = [{app_id = "org.gnome.Fractal";}];
"${outputs.ws.w9}" = [{app_id = "thunderbird";}];
"${config.ws.w3a}" = [{class = "zoom";}];
"${config.ws.w7}" = [{app_id = "MiscBrowser";} {app_id = "vesktop";} {class = "vesktop";}];
"${config.ws.w8}" = [{app_id = "org.gnome.Fractal";}];
"${config.ws.w9}" = [{app_id = "thunderbird";}];
# Else
"${outputs.ws.w2}" = [{class = "steam";} {app_id = "heroic";}];
"${outputs.ws.w2a}" = [{app_id = "looking-glass-client";}];
"${outputs.ws.w4a}" = [{app_id = "com.obsproject.Studio";}];
"${config.ws.w2}" = [{class = "steam";} {app_id = "heroic";}];
"${config.ws.w2a}" = [{app_id = "looking-glass-client";}];
"${config.ws.w4a}" = [{app_id = "com.obsproject.Studio";}];
};
focus.newWindow = "focus";
};

View file

@ -1,7 +1,7 @@
{ pkgs, ... }:
{
wayland.windowManager.sway = {
package = pkgs.unstable.sway;
package = pkgs.swayfx;
extraConfig = ''
blur enable
blur_passes 3

View file

@ -1,14 +1,14 @@
{ pkgs, outputs, ... }:
{ pkgs, config, ... }:
let
swayLock = pkgs.writeScriptBin "swaylock" ''
# Set the lock script
lockscript() {
BLANK='#00000000'
CLEAR='#FFFFFF22'
DEFAULT='#${outputs.look.colors.prime}FF'
DEFAULT='#${config.look.colors.prime}FF'
TEXT='#FFFFFFFF'
WRONG='#${outputs.look.colors.split}FF'
VERIFYING='#${outputs.look.colors.accent}FF'
WRONG='#${config.look.colors.split}FF'
VERIFYING='#${config.look.colors.accent}FF'
${pkgs.swaylock-effects}/bin/swaylock -f -e \
--key-hl-color=$VERIFYING \
@ -35,7 +35,7 @@ let
--indicator-radius=80 \
--image=~/.wallpapers/lock.png \
--clock \
--font=${outputs.look.fonts.main} \
--font=${config.look.fonts.main} \
--font-size=30 \
--timestr="%I:%M%p" \
--datestr="%a %b %d %Y"

View file

@ -1,4 +1,4 @@
{ pkgs, outputs, ... }:
{ pkgs, config, ... }:
{
imports = [
./swappy
@ -13,7 +13,7 @@
# Capture the screenshot of the selected area and save to a temporary file
selected_area=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"'\
| XCURSOR_SIZE=40 slurp -w ${outputs.look.border.string} -c ${outputs.look.colors.prime} -B 00000066 -b 00000099)
| XCURSOR_SIZE=40 slurp -w ${config.look.border.string} -c ${config.look.colors.prime} -B 00000066 -b 00000099)
temp_file=$(mktemp -u).png
grim -g "$selected_area" "$temp_file"
@ -31,7 +31,7 @@
handle_screen() {
# Take a screenshot and save it to the temporary file
temp_file=$(mktemp -u).png
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') "$temp_file"
grim -o $(swaymsg -t get_config | jq -r '.[] | select(.focused) | .name') "$temp_file"
# Check if the screenshot was successfully taken
if [ $? -eq 0 ]; then

View file

@ -1,4 +1,4 @@
{ config, pkgs, outputs, ... }:
{ config, pkgs, ... }:
{
wayland.windowManager.sway = {
enable = true;
@ -7,36 +7,36 @@
config = {
colors = {
focused = {
border = "#${outputs.look.colors.prime}";
background = "#${outputs.look.colors.prime}";
border = "#${config.look.colors.prime}";
background = "#${config.look.colors.prime}";
text = "#FFFFFF";
indicator = "#${outputs.look.colors.actSplit}";
childBorder = "#${outputs.look.colors.prime}";
indicator = "#${config.look.colors.actSplit}";
childBorder = "#${config.look.colors.prime}";
};
focusedInactive = {
border = "#${outputs.look.colors.accent}";
background = "#${outputs.look.colors.accent}";
text = "#${outputs.look.colors.text}";
indicator = "#${outputs.look.colors.split}";
childBorder = "#${outputs.look.colors.accent}";
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}";
};
unfocused = {
border = "#${outputs.look.colors.dark}";
background = "#${outputs.look.colors.dark}";
text = "#${outputs.look.colors.text}";
indicator = "#${outputs.look.colors.split}";
childBorder = "#${outputs.look.colors.split}";
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}";
};
urgent = {
border = "#${outputs.look.colors.urgent}";
background = "#${outputs.look.colors.urgent}";
text = "#${outputs.look.colors.text}";
indicator = "#${outputs.look.colors.urgent}";
childBorder = "#${outputs.look.colors.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}";
};
};
fonts = {
names = ["${outputs.look.fonts.main}"];
names = ["${config.look.fonts.main}"];
size = 10.5;
};
gaps = {

View file

@ -1,4 +1,4 @@
{ pkgs, outputs, ... }:
{ pkgs, config, ... }:
{
programs.waybar = let
swayWorkspacesModule = {
@ -11,7 +11,7 @@
swayWindowsModule = {
icon = true;
icon-size = 15;
all-outputs = true;
all-config = true;
tooltip = false;
rewrite = {
"(.*) LibreWolf" = " $1";
@ -262,7 +262,7 @@
name = "bar1";
position = "top";
layer = "bottom";
output = [outputs.displays.d1 "VGA-1"];
output = [config.displays.d1 "VGA-1"];
modules-left = ["sway/workspaces" "sway/window"];
modules-right = [
"pulseaudio"
@ -293,7 +293,7 @@
name = "bar2";
position = "top";
layer = "bottom";
output = [outputs.displays.d2];
output = [config.displays.d2];
modules-left = ["sway/workspaces" "sway/window"];
modules-right = [
"pulseaudio"
@ -318,7 +318,7 @@
name = "bar3";
position = "top";
layer = "bottom";
output = [outputs.displays.d3];
output = [config.displays.d3];
modules-left = ["sway/workspaces" "sway/window"];
modules-right = [
"pulseaudio"
@ -383,12 +383,12 @@
border: 0;
border-radius: 0;
min-height: 0;
font-family: ${outputs.look.fonts.main}, ${outputs.look.fonts.nerd};
font-family: ${config.look.fonts.main}, ${config.look.fonts.nerd};
font-size: 15.5px;
color: #${outputs.look.colors.text};
color: #${config.look.colors.text};
}
#waybar {
background: #${outputs.look.colors.dark};
background: #${config.look.colors.dark};
}
#workspaces {
padding: 0 6px 0 0;
@ -413,15 +413,15 @@
min-width: 20px;
}
#workspaces button.visible {
border-bottom: 3px solid #${outputs.look.colors.prime};
background: #${outputs.look.colors.mid};
border-bottom: 3px solid #${config.look.colors.prime};
background: #${config.look.colors.mid};
}
#workspaces button.urgent {
border-bottom: 3px solid #${outputs.look.colors.urgent};
border-bottom: 3px solid #${config.look.colors.urgent};
}
#workspaces button:hover {
box-shadow: none;
background: #${outputs.look.colors.light};
background: #${config.look.colors.light};
}
#scratchpad {
margin-left: 2px;
@ -457,13 +457,13 @@
color: #888;
}
#custom-weather {
border-bottom: 3px solid #${outputs.look.colors.prime};
border-bottom: 3px solid #${config.look.colors.prime};
}
#custom-weather2 {
border-bottom: 3px solid #c75bd3;
}
#custom-notifs {
border-bottom: 3px solid #${outputs.look.colors.prime};
border-bottom: 3px solid #${config.look.colors.prime};
}
#custom-notifs.disabled {
color: #888;

View file

@ -1,11 +1,11 @@
{ pkgs, outputs, ... }:
{ pkgs, config, ... }:
{
users.users = {
jimbo = {
description = "Jimbo";
hashedPassword = outputs.secrets.jimboAccPass;
hashedPassword = config.secrets.jimboAccPass;
isNormalUser = true;
openssh.authorizedKeys.keys = outputs.secrets.jimKeys;
openssh.authorizedKeys.keys = config.secrets.jimKeys;
extraGroups = [
"wheel"
"audio"

View file

@ -1,10 +1,12 @@
{ ... }:
{
users.users = {
nextcloud = {
users = {
users.liquidsoap = {
group = "liquidsoap";
extraGroups = [ "nginx" ];
isSystemUser = true;
uid = 155;
};
groups.liquidsoap = {};
};
}

View file

@ -1,9 +1,12 @@
{ ... }: {
users.users = {
nextcloud = {
{ ... }:
{
users = {
users.nextcloud = {
group = "nextcloud";
extraGroups = [ "nfsShare" ];
isSystemUser = true;
uid = 995;
};
groups.nextcloud = {};
};
}

View file

@ -1,10 +1,12 @@
{ ... }:
{
users.users = {
nginx = {
users = {
users.nginx = {
group = "nginx";
extraGroups = [ "turnserver" "virtualMail" ];
isSystemUser = true;
uid = 60;
};
groups.nginx = {};
};
}

View file

@ -1,4 +1,4 @@
{ outputs, config, pkgs, ... }:
{ config, pkgs, ... }:
{
nix = {
settings = {
@ -12,7 +12,9 @@
};
};
time.timeZone = outputs.secrets.timeZone;
nixpkgs.config.allowUnfree = true;
time.timeZone = "America/Toronto";
programs = {
zsh.enable = true;
@ -29,7 +31,6 @@
packages = with pkgs; [ terminus_font ];
};
nixpkgs.config.allowUnfree = true;
hardware.enableRedistributableFirmware = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion

View file

@ -2,6 +2,7 @@
{
boot.loader.systemd-boot = {
enable = true;
editor = false;
netbootxyz.enable = true;
};
}

View file

@ -1,9 +1,9 @@
{ outputs, ... }:
{ config, ... }:
{
networking.firewall = {
allowPing = false;
extraInputRules = ''
ip saddr { ${outputs.ips.server}, ${outputs.ips.wgSpan}.1 } accept comment "Accept Server"
ip saddr { ${config.ips.server}, ${config.ips.wgSpan}.1 } accept comment "Accept Server"
'';
};
}

View file

@ -1,9 +1,8 @@
{ outputs, ... }:
{ ... }:
{
services.fail2ban = {
enable = true;
maxretry = 5;
bantime = "5m";
ignoreIP = [ "${outputs.ips.localSpan}.0/24" ];
};
}

View file

@ -1,9 +1,8 @@
{ inputs, ... }:
{ unstable, ... }:
{
nixpkgs.overlays = [
inputs.blender-bin.overlays.default
(import ./unstable { inherit unstable; })
(final: _prev: import ./packages { pkgs = final; })
(import ./mpv)
(import ./unstable { inherit inputs; })
];
}

View file

@ -1,5 +1,4 @@
{ ... }:
self: super: {
(self: super: {
mpv = super.mpv.override {
scripts = with self.mpvScripts; [
mpris
@ -7,4 +6,4 @@ self: super: {
thumbnail
];
};
}
})

View file

@ -1,7 +1,7 @@
{ inputs, ... }:
final: prev: {
unstable = import inputs.unstable {
{ unstable, ... }:
(final: prev: {
unstable = import unstable {
system = final.system;
config.allowUnfree = true;
};
}
})

10
variables/default.nix Normal file
View file

@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./displays
./ips
./look
./secrets
./workspaces
];
}

View file

@ -1,7 +1,14 @@
{ ... }:
{ lib, config, ... }:
{
options.displays = lib.mkOption {
type = lib.types.attrs;
default = {};
};
config.displays = {
d1 = "DP-3";
d2 = "DP-1";
d3 = "DP-2";
dI = "eDP-1";
};
}

View file

@ -1,5 +1,11 @@
{ ... }:
rec {
{ lib, config, ... }:
{
options.ips = lib.mkOption {
type = lib.types.attrs;
default = {};
};
config.ips = rec {
netInt = "eno1";
localSpan = "10.0.0";
server = "${localSpan}.2";
@ -9,4 +15,5 @@ rec {
wgInt = "wg0";
wgSpan = "10.100.0";
};
}

View file

@ -0,0 +1,12 @@
{ lib, config, ... }:
{
options.look.border = lib.mkOption {
type = lib.types.attrs;
default = {};
};
config.look.border = rec {
int = 3;
string = toString int;
};
}

View file

@ -0,0 +1,19 @@
{ lib, config, ... }:
{
options.look.colors = lib.mkOption {
type = lib.types.attrs;
default = {};
};
config.look.colors = {
prime = ''3823C4''; #3823C4
accent = ''1B1F59''; #1B1F59
split = ''555B9E''; #555B9E
actSplit = ''5980B7''; #5980B7
dark = ''101419''; #101419
mid = ''171C23''; #171C23
light = ''272b33''; #272B33
urgent = ''C43823''; #C43823
text = ''C7D3E3''; #C7D3E3
};
}

View file

@ -1,22 +1,8 @@
{ ... }:
{
colors = {
prime = ''3823C4''; #3823C4
accent = ''1B1F59''; #1B1F59
split = ''555B9E''; #555B9E
actSplit = ''5980B7''; #5980B7
dark = ''101419''; #101419
mid = ''171C23''; #171C23
light = ''272b33''; #272B33
urgent = ''C43823''; #C43823
text = ''C7D3E3''; #C7D3E3
};
fonts = {
main = ''Ubuntu'';
nerd = ''UbuntuMono Nerd Font'';
};
border = rec {
int = 3;
string = toString int;
};
imports = [
./border
./colors
./fonts
];
}

View file

@ -0,0 +1,12 @@
{ lib, config, ... }:
{
options.look.fonts = lib.mkOption {
type = lib.types.attrs;
default = {};
};
config.look.fonts = {
main = ''Ubuntu'';
nerd = ''UbuntuMono Nerd Font'';
};
}

Binary file not shown.

View file

@ -1,5 +1,11 @@
{ ... }:
{ lib, config, ... }:
{
options.ws = lib.mkOption {
type = lib.types.attrs;
default = {};
};
config.ws = {
w0 = ''0:0'';
w1 = ''1:1'';
w2 = ''2:2'';
@ -19,4 +25,5 @@
w7a = ''77:VII'';
w8a = ''88:VIII'';
w9a = ''99:IX'';
};
}