Format with Alejandra. Prepare for flakes.
This commit is contained in:
parent
e402113111
commit
85f4107c82
|
@ -1,10 +1,14 @@
|
|||
{ config, pkgs, options, lib, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
options,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
# Set common boot paramaters
|
||||
commonKernelParams = [
|
||||
# Nvidia settings
|
||||
"nvidia_drm.fbdev=1"
|
||||
"nouveau.config=NvGspRm=1"
|
||||
|
||||
# VM/GPU passthrough
|
||||
"amd_iommu=on"
|
||||
|
@ -18,12 +22,11 @@ let
|
|||
"pcie_acs_override=downstream,multifunction"
|
||||
"pci=routeirq"
|
||||
];
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
# Import other nix files and firmware
|
||||
imports = let
|
||||
homeManager = fetchTarball
|
||||
homeManager =
|
||||
fetchTarball
|
||||
"https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz";
|
||||
in [
|
||||
./hardware-configuration.nix
|
||||
|
@ -36,12 +39,18 @@ in
|
|||
config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: {
|
||||
unstable = import (fetchTarball
|
||||
unstable =
|
||||
import (
|
||||
fetchTarball
|
||||
"https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"
|
||||
){ inherit pkgs; config.allowUnfree = true; };
|
||||
nur = import (fetchTarball
|
||||
) {
|
||||
inherit pkgs;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
nur = import (
|
||||
fetchTarball
|
||||
"https://github.com/nix-community/NUR/archive/master.tar.gz"
|
||||
){ inherit pkgs; };
|
||||
) {inherit pkgs;};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -50,8 +59,7 @@ in
|
|||
# MPV scripts
|
||||
(self: super: {
|
||||
mpv = super.mpv.override {
|
||||
scripts = with self.mpvScripts;
|
||||
[ mpris sponsorblock thumbnail ];
|
||||
scripts = with self.mpvScripts; [mpris sponsorblock thumbnail];
|
||||
};
|
||||
})
|
||||
];
|
||||
|
@ -59,7 +67,7 @@ in
|
|||
|
||||
# Allow flakes and enable garbage collection
|
||||
nix = {
|
||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
settings.experimental-features = ["nix-command" "flakes"];
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
|
@ -71,9 +79,9 @@ in
|
|||
boot = {
|
||||
# Set a kernel version and load/blacklist drivers
|
||||
kernelPackages = pkgs.unstable.linuxPackages_zen;
|
||||
blacklistedKernelModules = [ "pcspkr" ];
|
||||
kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:1f82,10de:10fa" ];
|
||||
initrd.kernelModules = [ "vfio" "vfio_pci" "vfio_iommu_type1" ];
|
||||
blacklistedKernelModules = ["pcspkr"];
|
||||
kernelParams = commonKernelParams ++ ["vfio-pci.ids=10de:1f82,10de:10fa"];
|
||||
initrd.kernelModules = ["vfio" "vfio_pci" "vfio_iommu_type1"];
|
||||
kernel.sysctl."vm.max_map_count" = 2147483642;
|
||||
|
||||
# Manage supported filesystems
|
||||
|
@ -97,7 +105,7 @@ in
|
|||
# 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"];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -105,7 +113,7 @@ in
|
|||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Enable video drivers
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = false;
|
||||
|
@ -120,7 +128,11 @@ in
|
|||
enable = true;
|
||||
extraRules = [
|
||||
# Give wheel root access, allow persistant session
|
||||
{ groups = [ "wheel" ]; keepEnv = true; persist = true; }
|
||||
{
|
||||
groups = ["wheel"];
|
||||
keepEnv = true;
|
||||
persist = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -138,17 +150,24 @@ in
|
|||
users.users.jimbo = {
|
||||
description = "Jimbo Awesome";
|
||||
isNormalUser = true;
|
||||
hashedPassword =
|
||||
"$6$gYpE.pG/zPXgin06$2kydjDfd0K62Dhf9P0PFvJhRNz6xIC/bHYaf/XYqyKcLyZNzPQpy8uy9tCRcSYlj1wwBhzVtTRyItwajOHCEj0";
|
||||
hashedPassword = "$6$gYpE.pG/zPXgin06$2kydjDfd0K62Dhf9P0PFvJhRNz6xIC/bHYaf/XYqyKcLyZNzPQpy8uy9tCRcSYlj1wwBhzVtTRyItwajOHCEj0";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKC8Uqxb09V3msBgDv6lD/nETMYr/X0OgtpDo8ldcMK jimbo@JimDebianServer"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDLe/HioxCOkszFQdm1vb3ZwuzLzsOThqHNvEI4IXeXZ JimPhone"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPeqiMCRXtpoP+BvKBmzvkL7oLKKCmbfdaQIF3yk/S8I jimbo@DV-JHAMPTON-NIXOS"
|
||||
];
|
||||
extraGroups = [
|
||||
"wheel" "audio" "video" "input" "disk"
|
||||
"dialout" "networkmanager" "rtkit"
|
||||
"kvm" "libvirtd" "qemu-libvirtd"
|
||||
"wheel"
|
||||
"audio"
|
||||
"video"
|
||||
"input"
|
||||
"disk"
|
||||
"dialout"
|
||||
"networkmanager"
|
||||
"rtkit"
|
||||
"kvm"
|
||||
"libvirtd"
|
||||
"qemu-libvirtd"
|
||||
];
|
||||
uid = 1000;
|
||||
shell = pkgs.zsh;
|
||||
|
@ -157,14 +176,19 @@ in
|
|||
# Install programs system-wide
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Essential system tools
|
||||
cifs-utils parted git
|
||||
cifs-utils
|
||||
parted
|
||||
git
|
||||
|
||||
# Printer control
|
||||
system-config-printer
|
||||
|
||||
# Virtual machines
|
||||
virt-manager virtiofsd dnsmasq
|
||||
spice-vdagent looking-glass-client
|
||||
virt-manager
|
||||
virtiofsd
|
||||
dnsmasq
|
||||
spice-vdagent
|
||||
looking-glass-client
|
||||
];
|
||||
|
||||
# Disable the HTML documentation link
|
||||
|
@ -212,8 +236,8 @@ in
|
|||
|
||||
# Set hostnames
|
||||
hosts = {
|
||||
"10.0.0.2" = [ "server" ];
|
||||
"10.0.0.3" = [ "pc" ];
|
||||
"10.0.0.2" = ["server"];
|
||||
"10.0.0.3" = ["pc"];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -249,7 +273,7 @@ in
|
|||
destination = "/etc/udev/rules.d/10-pdp.rules";
|
||||
};
|
||||
in {
|
||||
packages = [ oculusRules pdpRules ];
|
||||
packages = [oculusRules pdpRules];
|
||||
};
|
||||
|
||||
# Enable audio
|
||||
|
@ -271,10 +295,15 @@ in
|
|||
# Fonts
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
liberation_ttf twitter-color-emoji ubuntu_font_family noto-fonts sarasa-gothic
|
||||
orbitron (nerdfonts.override { fonts = [ "UbuntuMono" ]; })
|
||||
liberation_ttf
|
||||
twitter-color-emoji
|
||||
ubuntu_font_family
|
||||
noto-fonts
|
||||
sarasa-gothic
|
||||
orbitron
|
||||
(nerdfonts.override {fonts = ["UbuntuMono"];})
|
||||
];
|
||||
fontconfig.defaultFonts.emoji = [ "Twitter Color Emoji" ];
|
||||
fontconfig.defaultFonts.emoji = ["Twitter Color Emoji"];
|
||||
};
|
||||
|
||||
# Enable Dconf and some portals
|
||||
|
@ -295,7 +324,7 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
extraPortals = with pkgs; [xdg-desktop-portal-gtk];
|
||||
};
|
||||
|
||||
# Configure greetd for remote login
|
||||
|
@ -345,7 +374,7 @@ in
|
|||
services = {
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [ hplip ];
|
||||
drivers = with pkgs; [hplip];
|
||||
webInterface = false;
|
||||
};
|
||||
avahi = {
|
||||
|
@ -364,7 +393,7 @@ in
|
|||
qemu = {
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [ pkgs.OVMFFull.fd ];
|
||||
packages = [pkgs.OVMFFull.fd];
|
||||
};
|
||||
swtpm.enable = true;
|
||||
};
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
# This file was generated by 'nixos-generate-config'
|
||||
# and may be overwritten by future invocations.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
# This file was generated by 'nixos-generate-config', try not to modify too much
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
@ -10,11 +13,11 @@
|
|||
# Load kernel modules on boot
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
kernelModules = [ ];
|
||||
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
kernelModules = [];
|
||||
};
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
extraModulePackages = [ ];
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModulePackages = [];
|
||||
};
|
||||
|
||||
# Mount everything as necessary
|
||||
|
@ -29,39 +32,39 @@
|
|||
};
|
||||
"/etc/libvirt" = {
|
||||
device = "/dev/disk/by-label/Qemu";
|
||||
options = [ "nosuid" "nodev" "nofail" ] ;
|
||||
options = ["nosuid" "nodev" "nofail"];
|
||||
};
|
||||
"/var/lib/libvirt" = {
|
||||
depends = [ "/etc/libvirt" ];
|
||||
depends = ["/etc/libvirt"];
|
||||
device = "/etc/libvirt/varlibvirt";
|
||||
options = [ "bind" "rw" ];
|
||||
options = ["bind" "rw"];
|
||||
};
|
||||
"/mnt/Linux1" = {
|
||||
device = "/dev/disk/by-label/Linux1";
|
||||
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
|
||||
options = ["nosuid" "nodev" "nofail" "x-gvfs-show"];
|
||||
};
|
||||
"/mnt/Linux2" = {
|
||||
device = "/dev/disk/by-label/Linux2";
|
||||
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
|
||||
options = ["nosuid" "nodev" "nofail" "x-gvfs-show"];
|
||||
};
|
||||
"/mnt/Windows1" = {
|
||||
device = "/dev/disk/by-label/Windows1";
|
||||
options = [ "nosuid" "nodev" "noauto" ];
|
||||
options = ["nosuid" "nodev" "noauto"];
|
||||
};
|
||||
"/mnt/Windows2" = {
|
||||
device = "/dev/disk/by-label/Windows2";
|
||||
options = [ "nosuid" "nodev" "noauto" ];
|
||||
options = ["nosuid" "nodev" "noauto"];
|
||||
};
|
||||
"/home/jimbo/JimboNFS" = {
|
||||
device = "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/2e4c5120-716d-4cdc-84a0-c9e6391760db";}
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface.
|
||||
|
|
503
PC/jimbo.nix
503
PC/jimbo.nix
|
@ -1,5 +1,9 @@
|
|||
{ config, pkgs, options, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
# Global color palette
|
||||
primeCol = ''3823C4''; #3823C4
|
||||
accentCol = ''1B1F59''; #1B1F59
|
||||
|
@ -18,10 +22,10 @@ let
|
|||
themeSettings = {
|
||||
name = "Colloid-Dark";
|
||||
package = pkgs.colloid-gtk-theme.override {
|
||||
themeVariants = [ "default" ];
|
||||
colorVariants = [ "dark" ];
|
||||
sizeVariants = [ "standard" ];
|
||||
tweaks = [ "black" "rimless" "normal" ];
|
||||
themeVariants = ["default"];
|
||||
colorVariants = ["dark"];
|
||||
sizeVariants = ["standard"];
|
||||
tweaks = ["black" "rimless" "normal"];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -47,10 +51,25 @@ let
|
|||
};
|
||||
|
||||
# Define the workspace names
|
||||
w0 = ''0:0''; w1 = ''1:1''; w2 = ''2:2''; w3 = ''3:3''; w4 = ''4:4'';
|
||||
w5 = ''5:5''; w6 = ''6:6''; w7 = ''7:7''; w8 = ''8:8''; w9 = ''9:9'';
|
||||
w1a = ''11:I''; w2a = ''22:II''; w3a = ''33:III''; w4a = ''44:IV'';
|
||||
w5a = ''55:V''; w6a = ''66:VI''; w7a = ''77:VII''; w8a = ''88:VIII''; w9a = ''99:IX'';
|
||||
w0 = ''0:0'';
|
||||
w1 = ''1:1'';
|
||||
w2 = ''2:2'';
|
||||
w3 = ''3:3'';
|
||||
w4 = ''4:4'';
|
||||
w5 = ''5:5'';
|
||||
w6 = ''6:6'';
|
||||
w7 = ''7:7'';
|
||||
w8 = ''8:8'';
|
||||
w9 = ''9:9'';
|
||||
w1a = ''11:I'';
|
||||
w2a = ''22:II'';
|
||||
w3a = ''33:III'';
|
||||
w4a = ''44:IV'';
|
||||
w5a = ''55:V'';
|
||||
w6a = ''66:VI'';
|
||||
w7a = ''77:VII'';
|
||||
w8a = ''88:VIII'';
|
||||
w9a = ''99:IX'';
|
||||
|
||||
# Define the primary monitor
|
||||
display1 = ''DP-3'';
|
||||
|
@ -771,7 +790,8 @@ let
|
|||
]
|
||||
}
|
||||
'';
|
||||
in pkgs.writeScriptBin "pfetch"
|
||||
in
|
||||
pkgs.writeScriptBin "pfetch"
|
||||
''fastfetch --config ${smallConf}'';
|
||||
|
||||
# Ranger's bookmarks
|
||||
|
@ -1083,42 +1103,82 @@ let
|
|||
overflow: hidden !important;
|
||||
}
|
||||
'';
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
# Define home manager programs and configs
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.jimbo = { config, pkgs, ... }: {
|
||||
users.jimbo = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Install user programs
|
||||
home.packages = (with pkgs; [
|
||||
home.packages = with pkgs; [
|
||||
# Useful programs
|
||||
rofi-bluetooth bemoji imv qbittorrent
|
||||
libreoffice-fresh easyeffects vesktop
|
||||
element-desktop ffmpegthumbnailer thunderbird
|
||||
rofi-bluetooth
|
||||
bemoji
|
||||
imv
|
||||
qbittorrent
|
||||
libreoffice-fresh
|
||||
easyeffects
|
||||
vesktop
|
||||
element-desktop
|
||||
ffmpegthumbnailer
|
||||
thunderbird
|
||||
|
||||
# Terminal programs
|
||||
dua vimv p7zip fastfetch gotop pciutils usbutils
|
||||
pulsemixer tcptrack mpc-cli protonvpn-cli_2
|
||||
dua
|
||||
vimv
|
||||
p7zip
|
||||
fastfetch
|
||||
gotop
|
||||
pciutils
|
||||
usbutils
|
||||
pulsemixer
|
||||
tcptrack
|
||||
mpc-cli
|
||||
protonvpn-cli_2
|
||||
|
||||
# Scripts as global programs
|
||||
rofiScripts makoToggle swayLock screenShot pFetch
|
||||
rofiScripts
|
||||
makoToggle
|
||||
swayLock
|
||||
screenShot
|
||||
pFetch
|
||||
|
||||
# Production tools
|
||||
krita inkscape audacity blender sunvox
|
||||
krita
|
||||
inkscape
|
||||
audacity
|
||||
blender
|
||||
sunvox
|
||||
|
||||
# File manager
|
||||
pcmanfm-qt gnome.file-roller imagemagick poppler_utils
|
||||
pcmanfm-qt
|
||||
gnome.file-roller
|
||||
imagemagick
|
||||
poppler_utils
|
||||
|
||||
# School tools
|
||||
remmina freerdp globalprotect-openconnect python3 zoom-us
|
||||
remmina
|
||||
freerdp
|
||||
globalprotect-openconnect
|
||||
python3
|
||||
zoom-us
|
||||
|
||||
# Audio/Video tools
|
||||
yt-dlp spotdl ani-cli playerctl ffmpeg
|
||||
yt-dlp
|
||||
spotdl
|
||||
ani-cli
|
||||
playerctl
|
||||
ffmpeg
|
||||
|
||||
# Unlimited games
|
||||
steam steam-run heroic prismlauncher
|
||||
steam
|
||||
steam-run
|
||||
heroic
|
||||
prismlauncher
|
||||
|
||||
# Emulators
|
||||
#dolphin-emu cemu ryujinx duckstation pcsx2 unstable.lime3ds
|
||||
|
@ -1127,9 +1187,18 @@ in
|
|||
#moonlight-qt
|
||||
|
||||
# Window manager apps
|
||||
swaybg wdisplays wl-clipboard clipman
|
||||
libnotify bc grim slurp swappy jq lm_sensors
|
||||
]);
|
||||
swaybg
|
||||
wdisplays
|
||||
wl-clipboard
|
||||
clipman
|
||||
libnotify
|
||||
bc
|
||||
grim
|
||||
slurp
|
||||
swappy
|
||||
jq
|
||||
lm_sensors
|
||||
];
|
||||
|
||||
# Enable Sway and write some scripts
|
||||
wayland.windowManager.sway = let
|
||||
|
@ -1180,39 +1249,39 @@ in
|
|||
'';
|
||||
in {
|
||||
enable = true;
|
||||
#package = pkgs.swayfx
|
||||
package = pkgs.unstable.sway;
|
||||
wrapperFeatures.gtk = true;
|
||||
checkConfig = false;
|
||||
config = {
|
||||
modifier = "${primeMod}";
|
||||
startup = [
|
||||
# Lock the screen on start, to allow an autostarted session
|
||||
{ command = "swaylock"; }
|
||||
{command = "swaylock";}
|
||||
|
||||
# Scratchpads
|
||||
{ command = "foot -a gotop -T Gotop gotop"; }
|
||||
{ command = "foot -a music -T Music ncmpcpp"; }
|
||||
{ command = "foot -a sound -T Sound pulsemixer"; }
|
||||
{ command = "easyeffects"; }
|
||||
{command = "foot -a gotop -T Gotop gotop";}
|
||||
{command = "foot -a music -T Music ncmpcpp";}
|
||||
{command = "foot -a sound -T Sound pulsemixer";}
|
||||
{command = "easyeffects";}
|
||||
|
||||
# Daemons and tray apps
|
||||
{ command = "wl-paste -t text --watch clipman store -P"; }
|
||||
{ command = "wl-copy"; }
|
||||
{ command = "mako"; }
|
||||
{ command = "${pkgs.rot8}/bin/rot8"; }
|
||||
{command = "wl-paste -t text --watch clipman store -P";}
|
||||
{command = "wl-copy";}
|
||||
{command = "mako";}
|
||||
{command = "${pkgs.rot8}/bin/rot8";}
|
||||
|
||||
# Polkit agent
|
||||
{ command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; }
|
||||
{command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";}
|
||||
|
||||
# Foreground apps
|
||||
{ command = "librewolf -P Misc --name=MiscBrowser"; }
|
||||
{ command = "vesktop --ozone-platform-hint=auto"; }
|
||||
{ command = "element-desktop"; }
|
||||
{ command = "thunderbird"; }
|
||||
{command = "librewolf -P Misc --name=MiscBrowser";}
|
||||
{command = "vesktop --ozone-platform-hint=auto";}
|
||||
{command = "element-desktop";}
|
||||
{command = "thunderbird";}
|
||||
];
|
||||
|
||||
# Use Waybar rather than Sway's
|
||||
bars = [{ command = "waybar"; }];
|
||||
bars = [{command = "waybar";}];
|
||||
|
||||
# Define hardware
|
||||
output = {
|
||||
|
@ -1270,16 +1339,21 @@ in
|
|||
|
||||
# Assign workspaces to outputs
|
||||
workspaceOutputAssign = let
|
||||
workspaces1 = [ "${w0}" "${w1}" "${w2}" "${w3}" "${w1a}" "${w2a}" "${w3a}" ];
|
||||
workspaces2 = [ "${w4}" "${w5}" "${w6}" "${w4a}" "${w5a}" "${w6a}" ];
|
||||
workspaces3 = [ "${w7}" "${w8}" "${w9}" "${w7a}" "${w8a}" "${w9a}" ];
|
||||
assign = output: workspaces: map (workspace: { inherit workspace; inherit output; }) workspaces;
|
||||
workspaces1 = ["${w0}" "${w1}" "${w2}" "${w3}" "${w1a}" "${w2a}" "${w3a}"];
|
||||
workspaces2 = ["${w4}" "${w5}" "${w6}" "${w4a}" "${w5a}" "${w6a}"];
|
||||
workspaces3 = ["${w7}" "${w8}" "${w9}" "${w7a}" "${w8a}" "${w9a}"];
|
||||
assign = output: workspaces:
|
||||
map (workspace: {
|
||||
inherit workspace;
|
||||
inherit output;
|
||||
})
|
||||
workspaces;
|
||||
in
|
||||
(assign "${display1}" workspaces1) ++ (assign "${display2}" workspaces2) ++ (assign "${display3}" workspaces3);
|
||||
|
||||
# Theming settings
|
||||
fonts = {
|
||||
names = [ "${mainFont}" ];
|
||||
names = ["${mainFont}"];
|
||||
size = 10.5;
|
||||
};
|
||||
gaps = {
|
||||
|
@ -1350,7 +1424,7 @@ in
|
|||
"${primeMod}+${secMod}+Ctrl+r" = ''exec rofiscripts --resolutions'';
|
||||
|
||||
# Open NixOS configuration files
|
||||
"${primeMod}+F12" = ''exec bash -c "foot nvim /etc/nixos/{configuration,jimbo,hardware-configuration}.nix" | ${sendNotif} "Nix Config"'';
|
||||
"${primeMod}+F12" = ''exec foot ranger /etc/nixos | ${sendNotif} "Nix Config"'';
|
||||
|
||||
# Terminal, rofi, clipmenu, media script, power menu, show/hide waybar
|
||||
"${primeMod}+Return" = ''exec foot'';
|
||||
|
@ -1543,48 +1617,85 @@ in
|
|||
titlebar = false;
|
||||
commands = [
|
||||
# Scratchpads
|
||||
{ criteria = { con_mark = "scratchpad"; };
|
||||
command = ''floating enable, sticky enable, move scratchpad, mark borderless''; }
|
||||
{ criteria = { app_id = "gotop"; };
|
||||
command = ''mark scratchpad''; }
|
||||
{ criteria = { app_id = "music"; };
|
||||
command = ''mark scratchpad''; }
|
||||
{ criteria = { app_id = "sound"; };
|
||||
command = ''mark scratchpad''; }
|
||||
{ criteria = { app_id = "com.github.wwmm.easyeffects"; };
|
||||
command = ''mark scratchpad, opacity 0.9''; }
|
||||
{
|
||||
criteria = {con_mark = "scratchpad";};
|
||||
command = ''floating enable, sticky enable, move scratchpad, mark borderless'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "gotop";};
|
||||
command = ''mark scratchpad'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "music";};
|
||||
command = ''mark scratchpad'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "sound";};
|
||||
command = ''mark scratchpad'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "com.github.wwmm.easyeffects";};
|
||||
command = ''mark scratchpad, opacity 0.9'';
|
||||
}
|
||||
|
||||
# Create a "Scratchpad" for apps I don't want to be seen when launched
|
||||
{ criteria = { con_mark = "hiddenaway"; }; command = ''move scratchpad''; }
|
||||
{
|
||||
criteria = {con_mark = "hiddenaway";};
|
||||
command = ''move scratchpad'';
|
||||
}
|
||||
|
||||
# Give apps that don't have them borders
|
||||
{ criteria = { con_mark = "borderless"; }; command = ''border pixel ${borderWeight}''; }
|
||||
{ criteria = { app_id = "com.github.wwmm.easyeffects"; }; command = ''mark borderless''; }
|
||||
{ criteria = { class = "steam"; }; command = ''mark borderless''; }
|
||||
{ criteria = { app_id = "swappy"; }; command = ''mark borderless''; }
|
||||
{ criteria = { app_id = "virt-manager"; }; command = ''mark borderless''; }
|
||||
{ criteria = { window_role = "pop-up"; }; command = ''mark borderless''; }
|
||||
{
|
||||
criteria = {con_mark = "borderless";};
|
||||
command = ''border pixel ${borderWeight}'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "com.github.wwmm.easyeffects";};
|
||||
command = ''mark borderless'';
|
||||
}
|
||||
{
|
||||
criteria = {class = "steam";};
|
||||
command = ''mark borderless'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "swappy";};
|
||||
command = ''mark borderless'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "virt-manager";};
|
||||
command = ''mark borderless'';
|
||||
}
|
||||
{
|
||||
criteria = {window_role = "pop-up";};
|
||||
command = ''mark borderless'';
|
||||
}
|
||||
|
||||
# Floating or fullscreen rules
|
||||
{ criteria = { app_id = "float"; }; command = ''floating enable''; }
|
||||
{ criteria = { title = "^GlobalShot"; }; command = ''floating enable, fullscreen enable global''; }
|
||||
{
|
||||
criteria = {app_id = "float";};
|
||||
command = ''floating enable'';
|
||||
}
|
||||
{
|
||||
criteria = {title = "^GlobalShot";};
|
||||
command = ''floating enable, fullscreen enable global'';
|
||||
}
|
||||
];
|
||||
};
|
||||
assigns = {
|
||||
# Browsers
|
||||
"${w1}" = [{ app_id = "JimBrowser"; }];
|
||||
"${w1a}" = [{ app_id = "SchoolBrowser"; }];
|
||||
"${w1}" = [{app_id = "JimBrowser";}];
|
||||
"${w1a}" = [{app_id = "SchoolBrowser";}];
|
||||
|
||||
# Communication
|
||||
"${w3a}" = [{ class = "zoom"; }];
|
||||
"${w7}" = [{ app_id = "MiscBrowser"; } { app_id = "vesktop"; }];
|
||||
"${w8}" = [{ class = "Element"; }];
|
||||
"${w9}" = [{ app_id = "thunderbird"; }];
|
||||
"${w3a}" = [{class = "zoom";}];
|
||||
"${w7}" = [{app_id = "MiscBrowser";} {app_id = "vesktop";}];
|
||||
"${w8}" = [{class = "Element";}];
|
||||
"${w9}" = [{app_id = "thunderbird";}];
|
||||
|
||||
# Else
|
||||
"${w2}" = [{ class = "SDL Application"; } { class = "heroic"; }];
|
||||
"${w2a}" = [{ app_id = "looking-glass-client"; }];
|
||||
"${w4a}" = [{ app_id = "com.obsproject.Studio"; }];
|
||||
"${w2}" = [{class = "SDL Application";} {class = "heroic";}];
|
||||
"${w2a}" = [{app_id = "looking-glass-client";}];
|
||||
"${w4a}" = [{app_id = "com.obsproject.Studio";}];
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
|
@ -1644,12 +1755,12 @@ in
|
|||
format-icons = {
|
||||
headphone = " ";
|
||||
headset = " ";
|
||||
default = [ " " " " ];
|
||||
default = [" " " "];
|
||||
};
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
on-click-middle = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 100%";
|
||||
on-click-right = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 60%";
|
||||
ignored-sinks = [ "Easy Effects Sink" "USB FS AUDIO Analog Stereo" ];
|
||||
ignored-sinks = ["Easy Effects Sink" "USB FS AUDIO Analog Stereo"];
|
||||
};
|
||||
|
||||
# CPU, Ram and Vram
|
||||
|
@ -1873,11 +1984,19 @@ in
|
|||
name = "bar1";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
output = [ display1 "VGA-1" ];
|
||||
modules-left = [ "sway/workspaces" "sway/window" ];
|
||||
output = [display1 "VGA-1"];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-right = [
|
||||
"pulseaudio" "cpu" "memory" "custom/vram" "custom/clock-long"
|
||||
"gamemode" "sway/scratchpad" "tray" "bluetooth" "network"
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-long"
|
||||
"gamemode"
|
||||
"sway/scratchpad"
|
||||
"tray"
|
||||
"bluetooth"
|
||||
"network"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
|
@ -1890,17 +2009,22 @@ in
|
|||
"sway/scratchpad" = scratchpadModule;
|
||||
"tray" = trayModule;
|
||||
"bluetooth" = bluetoothModule;
|
||||
"network" = networkModule // { interface = "enp*"; };
|
||||
"network" = networkModule // {interface = "enp*";};
|
||||
};
|
||||
display2 = {
|
||||
name = "bar2";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
output = [ display2 ];
|
||||
modules-left = [ "sway/workspaces" "sway/window" ];
|
||||
output = [display2];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-right = [
|
||||
"pulseaudio" "custom/media" "custom/notifs" "cpu"
|
||||
"memory" "custom/vram" "custom/clock-long"
|
||||
"pulseaudio"
|
||||
"custom/media"
|
||||
"custom/notifs"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-long"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
|
@ -1916,10 +2040,15 @@ in
|
|||
name = "bar3";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
output = [ display3 ];
|
||||
modules-left = [ "sway/workspaces" "sway/window" ];
|
||||
output = [display3];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-right = [
|
||||
"pulseaudio" "custom/weather" "cpu" "memory" "custom/vram" "custom/clock-short"
|
||||
"pulseaudio"
|
||||
"custom/weather"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-short"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
|
@ -1934,11 +2063,24 @@ in
|
|||
name = "laptop";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
output = [ "eDP-1" "LVDS-1" "DSI-1" "HDMI-A-1" ];
|
||||
modules-left = [ "sway/workspaces" "sway/window" ];
|
||||
output = ["eDP-1" "LVDS-1" "DSI-1" "HDMI-A-1"];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-right = [
|
||||
"pulseaudio" "custom/media" "custom/notifs" "custom/weather2" "cpu" "memory" "custom/vram" "backlight"
|
||||
"battery" "custom/clock-long" "gamemode" "sway/scratchpad" "tray" "bluetooth" "network"
|
||||
"pulseaudio"
|
||||
"custom/media"
|
||||
"custom/notifs"
|
||||
"custom/weather2"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"backlight"
|
||||
"battery"
|
||||
"custom/clock-long"
|
||||
"gamemode"
|
||||
"sway/scratchpad"
|
||||
"tray"
|
||||
"bluetooth"
|
||||
"network"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
|
@ -2074,7 +2216,7 @@ in
|
|||
};
|
||||
theme = themeSettings;
|
||||
iconTheme = {
|
||||
package = pkgs.papirus-icon-theme.override { color = "${folderCol}"; };
|
||||
package = pkgs.papirus-icon-theme.override {color = "${folderCol}";};
|
||||
name = "Papirus-Dark";
|
||||
};
|
||||
cursorTheme = {
|
||||
|
@ -2138,39 +2280,57 @@ in
|
|||
color-scheme = "prefer-dark";
|
||||
};
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = [ "qemu:///system" ];
|
||||
uris = [ "qemu:///system" ];
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
};
|
||||
|
||||
# Enable Librewolf and extensions
|
||||
programs.firefox = let
|
||||
commonExtensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin bitwarden darkreader sponsorblock return-youtube-dislikes no-pdf-download
|
||||
ublock-origin
|
||||
bitwarden
|
||||
darkreader
|
||||
sponsorblock
|
||||
return-youtube-dislikes
|
||||
no-pdf-download
|
||||
];
|
||||
commonSearch = {
|
||||
force = true;
|
||||
default = "Google";
|
||||
engines = {
|
||||
"Google" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.google.com/search";
|
||||
params = [
|
||||
{ name = "q"; value = "{searchTerms}"; }
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}];
|
||||
definedAliases = [ "@g" ];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@g"];
|
||||
};
|
||||
"NixPKGs" = {
|
||||
urls = [{
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{ name = "type"; value = "packages"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@pkgs" ];
|
||||
definedAliases = ["@pkgs"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -2234,8 +2394,16 @@ in
|
|||
settings = commonSettings;
|
||||
containersForce = true;
|
||||
containers = {
|
||||
Google = { color = "green"; icon = "fingerprint"; id = 200; };
|
||||
Seneca = { color = "red"; icon = "briefcase"; id = 201; };
|
||||
Google = {
|
||||
color = "green";
|
||||
icon = "fingerprint";
|
||||
id = 200;
|
||||
};
|
||||
Seneca = {
|
||||
color = "red";
|
||||
icon = "briefcase";
|
||||
id = 201;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -2287,19 +2455,26 @@ in
|
|||
vimAlias = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# Vim theme
|
||||
vim-airline vim-airline-themes
|
||||
vim-airline
|
||||
vim-airline-themes
|
||||
|
||||
# Internal clipboard
|
||||
vim-vsnip cmp-vsnip
|
||||
vim-vsnip
|
||||
cmp-vsnip
|
||||
|
||||
# Autocomplete manager
|
||||
lspkind-nvim
|
||||
|
||||
# Autocomplete plugins
|
||||
cmp-nvim-lsp cmp-buffer cmp-path cmp-cmdline nvim-cmp
|
||||
cmp-nvim-lsp
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-cmdline
|
||||
nvim-cmp
|
||||
|
||||
# Hex color visualizer and color theme
|
||||
nvim-colorizer-lua vim-monokai-pro
|
||||
nvim-colorizer-lua
|
||||
vim-monokai-pro
|
||||
];
|
||||
extraConfig = ''
|
||||
lua <<EOF
|
||||
|
@ -2409,28 +2584,76 @@ in
|
|||
};
|
||||
rifle = [
|
||||
# Text editing
|
||||
{ condition = ''ext xml|json|jsonc|m3u|m3u8|csv|tex|py|pl|rb|js|sh|php|md|nix''; command = ''vim -- "$@"''; }
|
||||
{
|
||||
condition = ''ext xml|json|jsonc|m3u|m3u8|csv|tex|py|pl|rb|js|sh|php|md|nix'';
|
||||
command = ''vim -- "$@"'';
|
||||
}
|
||||
|
||||
# Media
|
||||
{ condition = ''mime ^image, has imv, X, flag f''; command = ''imv -- "$@"''; }
|
||||
{ condition = ''mime ^video, terminal, has mpv''; command = ''mpv -- "$@"''; }
|
||||
{ condition = ''mime ^video, terminal, has mpv''; command = ''mpv --video-rotate=270 -- "$@"''; }
|
||||
{ condition = ''mime ^audio|ogg$, terminal, has mpv''; command = ''mpv --no-audio-display -- "$@"''; }
|
||||
{ condition = ''mime ^audio|ogg$, terminal, has mpv''; command = ''mpv --shuffle --no-audio-display -- "$@"''; }
|
||||
{ condition = ''ext x?html?|pdf, has librewolf, X, flag f''; command = ''librewolf -- "$@"''; }
|
||||
{ condition = ''ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f''; command = ''libreoffice "$@"''; }
|
||||
{
|
||||
condition = ''mime ^image, has imv, X, flag f'';
|
||||
command = ''imv -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^video, terminal, has mpv'';
|
||||
command = ''mpv -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^video, terminal, has mpv'';
|
||||
command = ''mpv --video-rotate=270 -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^audio|ogg$, terminal, has mpv'';
|
||||
command = ''mpv --no-audio-display -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^audio|ogg$, terminal, has mpv'';
|
||||
command = ''mpv --shuffle --no-audio-display -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''ext x?html?|pdf, has librewolf, X, flag f'';
|
||||
command = ''librewolf -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f'';
|
||||
command = ''libreoffice "$@"'';
|
||||
}
|
||||
|
||||
# Scripts
|
||||
{ condition = ''sh''; command = ''sh -- "$1"''; }
|
||||
{ condition = ''py''; command = ''python -- "$1"''; }
|
||||
{ condition = ''pl''; command = ''perl -- "$1"''; }
|
||||
{ condition = ''js''; command = ''node -- "$1"''; }
|
||||
{ condition = ''php''; command = ''php -- "$1"''; }
|
||||
{
|
||||
condition = ''sh'';
|
||||
command = ''sh -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''py'';
|
||||
command = ''python -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''pl'';
|
||||
command = ''perl -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''js'';
|
||||
command = ''node -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''php'';
|
||||
command = ''php -- "$1"'';
|
||||
}
|
||||
|
||||
# Misc
|
||||
{ condition = ''ext exe|msi''; command = ''wine "$1"''; }
|
||||
{ condition = ''ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz|iso|jar|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has 7z''; command = ''7z x -- "$@"''; }
|
||||
{ condition = ''label open, has xdg-open''; command = ''xdg-open -- "$@"''; }
|
||||
{
|
||||
condition = ''ext exe|msi'';
|
||||
command = ''wine "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz|iso|jar|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has 7z'';
|
||||
command = ''7z x -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''label open, has xdg-open'';
|
||||
command = ''xdg-open -- "$@"'';
|
||||
}
|
||||
];
|
||||
plugins = [
|
||||
{
|
||||
|
@ -2560,7 +2783,7 @@ in
|
|||
spacing = 0;
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
padding = 1;
|
||||
children = map mkLiteral [ "prompt" "textbox-prompt-colon" "entry" ];
|
||||
children = map mkLiteral ["prompt" "textbox-prompt-colon" "entry"];
|
||||
};
|
||||
"#textbox-prompt-colon" = {
|
||||
expand = false;
|
||||
|
@ -2585,8 +2808,11 @@ in
|
|||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
obs-pipewire-audio-capture obs-webkitgtk
|
||||
obs-multi-rtmp obs-vkcapture obs-tuna
|
||||
obs-pipewire-audio-capture
|
||||
obs-webkitgtk
|
||||
obs-multi-rtmp
|
||||
obs-vkcapture
|
||||
obs-tuna
|
||||
looking-glass-obs
|
||||
];
|
||||
};
|
||||
|
@ -2699,7 +2925,7 @@ in
|
|||
'';
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" ];
|
||||
plugins = ["git"];
|
||||
theme = "agnoster"; # Main PC
|
||||
#theme = "risto"; # Secondary/VM
|
||||
#theme = "half-life"; # Server
|
||||
|
@ -2736,8 +2962,7 @@ in
|
|||
spotdl = "spotdl --m3u --format opus";
|
||||
|
||||
# Flakes
|
||||
buildiso =
|
||||
"${pkgs.nixos-generators}/bin/nixos-generate -f install-iso -c /home/jimbo/Downloads/NixISO/configuration.nix";
|
||||
buildiso = "${pkgs.nixos-generators}/bin/nixos-generate -f install-iso -c /home/jimbo/Downloads/NixISO/configuration.nix";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue