Compare commits
18 commits
66300cae57
...
66869edc1a
Author | SHA1 | Date | |
---|---|---|---|
Jimbo | 66869edc1a | ||
Jimbo | cbd69206a3 | ||
Jimbo | f3d5ff594a | ||
Jimbo | d7a4ca2164 | ||
Jimbo | 018873c210 | ||
Jimbo | ca2b3d8ad3 | ||
Jimbo | 8334819de5 | ||
Jimbo | 5db5d349bf | ||
Jimbo | 0b699858fc | ||
Jimbo | 5ae5531455 | ||
Jimbo | 129e5e0d27 | ||
Jimbo | e48ac95c34 | ||
Jimbo | 978d7d37cf | ||
Jimbo | 61527d8c08 | ||
Jimbo | ff30aace39 | ||
Jimbo | c49adf9f4c | ||
Jimbo | a0447a18da | ||
Jimbo | 93541beed7 |
108
flake.lock
108
flake.lock
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"nodes": {
|
||||
"blender-bin": {
|
||||
"blender": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
|
@ -61,11 +61,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732221404,
|
||||
"narHash": "sha256-fWTyjgGt+BHmkeJ5IxOR4zGF4/uc+ceWmhBjOBSVkgQ=",
|
||||
"lastModified": 1732742778,
|
||||
"narHash": "sha256-i+Uw8VOHzQe9YdNwKRbzvaPWLE07tYVqUDzSFTXhRgk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "97c0c4d7072f19b598ed332e9f7f8ad562c6885b",
|
||||
"rev": "341482e2f4d888e3f60cae1c12c3df896e7230d8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -208,11 +208,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731880681,
|
||||
"narHash": "sha256-FmYTkIyPBUxSWgA7DPIVTsCCMvSSbs56yOtHpLNSnKg=",
|
||||
"lastModified": 1732466619,
|
||||
"narHash": "sha256-T1e5oceypZu3Q8vzICjv1X/sGs9XfJRMW5OuXHgpB3c=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "aecd341dfead1c3ef7a3c15468ecd71e8343b7c6",
|
||||
"rev": "f3111f62a23451114433888902a55cf0692b408d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -237,25 +237,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"jovian": {
|
||||
"inputs": {
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732032028,
|
||||
"narHash": "sha256-NjyfJQQxs/a2a/KwTmXM44K7XjeJwGsf4YFtebueQzo=",
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"rev": "65dc04371cf914c9af4f073638821e4787303005",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lanzaboote": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
|
@ -287,7 +268,7 @@
|
|||
"inputs": {
|
||||
"blobs": "blobs",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-24_05": "nixpkgs-24_05",
|
||||
"utils": "utils"
|
||||
},
|
||||
|
@ -310,14 +291,14 @@
|
|||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732153840,
|
||||
"narHash": "sha256-lt8Gdx6TNheby/9lRNE1GMP3vkdpLaXmyHQk+ZvYNAY=",
|
||||
"lastModified": 1732688645,
|
||||
"narHash": "sha256-SQBVnfTAhVmNs5mKjoe942GykhAh9RQbcqScK9XlsWM=",
|
||||
"owner": "Infinidoge",
|
||||
"repo": "nix-minecraft",
|
||||
"rev": "8325d463c1c424f2e6edeef2010c0d902a37b3d3",
|
||||
"rev": "6adec7f87f6c1d455f89f57bd697740bd6dc88fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -326,28 +307,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"jovian",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729697500,
|
||||
"narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=",
|
||||
"owner": "zhaofengli",
|
||||
"repo": "nix-github-actions",
|
||||
"rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zhaofengli",
|
||||
"ref": "matrix-name",
|
||||
"repo": "nix-github-actions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1722221733,
|
||||
|
@ -394,22 +353,6 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1729665710,
|
||||
"narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1717602782,
|
||||
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
|
||||
|
@ -424,7 +367,7 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1715266358,
|
||||
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
|
||||
|
@ -440,13 +383,13 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1731755305,
|
||||
"narHash": "sha256-v5P3dk5JdiT+4x69ZaB18B8+Rcu3TIOrcdG4uEX7WZ8=",
|
||||
"lastModified": 1732350895,
|
||||
"narHash": "sha256-GcOQbOgmwlsRhpLGSwZJwLbo3pu9ochMETuRSS1xpz4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "057f63b6dc1a2c67301286152eb5af20747a9cb4",
|
||||
"rev": "0c582677378f2d9ffcb01490af2f2c678dcb29d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -457,11 +400,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1732220928,
|
||||
"narHash": "sha256-OOFqnjTax0132/mBsRpVD1QTMlZUCbVexKgKUVUxJNg=",
|
||||
"lastModified": 1732745437,
|
||||
"narHash": "sha256-o0xF2tQ4dibaVWk7T9yLIDJZ68VpRwSY0T7q892m4MM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "8439fca0da7f67b331edcca08eb2a47249be72f4",
|
||||
"rev": "fbe88c0dba3181daf3ef9760e548329fcc320f9d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -499,15 +442,14 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"blender-bin": "blender-bin",
|
||||
"blender": "blender",
|
||||
"disko": "disko",
|
||||
"home-manager": "home-manager",
|
||||
"impermanence": "impermanence",
|
||||
"jovian": "jovian",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"mailserver": "mailserver",
|
||||
"minecraft": "minecraft",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nur": "nur",
|
||||
"unstable": "unstable"
|
||||
}
|
||||
|
@ -584,11 +526,11 @@
|
|||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1732014248,
|
||||
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
|
||||
"lastModified": 1732521221,
|
||||
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
|
||||
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
15
flake.nix
15
flake.nix
|
@ -17,7 +17,6 @@
|
|||
impermanence.url = "github:nix-community/impermanence";
|
||||
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
||||
minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||
jovian.url = "github:Jovian-Experiments/Jovian-NixOS";
|
||||
|
||||
# Home inputs
|
||||
home-manager = {
|
||||
|
@ -26,10 +25,11 @@
|
|||
};
|
||||
|
||||
nur.url = "github:nix-community/NUR";
|
||||
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.11.tar.gz";
|
||||
blender.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.11.tar.gz";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
unstable,
|
||||
lanzaboote,
|
||||
|
@ -37,10 +37,9 @@
|
|||
impermanence,
|
||||
mailserver,
|
||||
minecraft,
|
||||
jovian,
|
||||
home-manager,
|
||||
nur,
|
||||
blender-bin,
|
||||
blender,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -48,16 +47,16 @@
|
|||
inherit modules;
|
||||
specialArgs = {
|
||||
inherit
|
||||
self
|
||||
unstable
|
||||
lanzaboote
|
||||
disko
|
||||
impermanence
|
||||
mailserver
|
||||
minecraft
|
||||
jovian
|
||||
home-manager
|
||||
nur
|
||||
blender-bin
|
||||
blender
|
||||
;
|
||||
};
|
||||
};
|
||||
|
@ -67,7 +66,7 @@
|
|||
inherit
|
||||
unstable
|
||||
nur
|
||||
blender-bin
|
||||
blender
|
||||
;
|
||||
};
|
||||
};
|
||||
|
@ -80,7 +79,7 @@
|
|||
axolotl = mkNix [ ./hosts/axolotl ]; # PineBook Pro
|
||||
lacros = mkNix [ ./hosts/lacros ]; # Dell Chromebook
|
||||
redmond = mkNix [ ./hosts/redmond ]; # Lenovo Dual-Boot Laptop
|
||||
extern = mkNix [ ./hosts/extern ]; # Portable Hard-Drive
|
||||
extern = mkNix [ ./hosts/extern ]; # External Drive/USB
|
||||
|
||||
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010
|
||||
xenia = mkNix [ ./hosts/xenia ]; # Acer Veriton X2611G
|
||||
|
|
5
hosts/extern/boot/default.nix
vendored
5
hosts/extern/boot/default.nix
vendored
|
@ -1,7 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelPackages = pkgs.unstable.linuxPackages_latest;
|
||||
kernel.sysctl."vm.max_map_count" = 2147483642;
|
||||
blacklistedKernelModules = [ "pcspkr" ];
|
||||
};
|
||||
}
|
||||
|
|
13
hosts/extern/default.nix
vendored
13
hosts/extern/default.nix
vendored
|
@ -1,17 +1,16 @@
|
|||
{ lib, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot
|
||||
./disko
|
||||
./filesystems
|
||||
./hardware
|
||||
./nixmodules
|
||||
./wireguard
|
||||
./modules
|
||||
../../modules/system
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
services.btrfs.autoScrub.enable = lib.mkForce false;
|
||||
|
||||
system.video.nvidia.enable = true;
|
||||
system.wireguard.client.enable = true;
|
||||
networking.wireguard.interfaces.wgc.ips = [ "10.100.0.21/24" ];
|
||||
|
||||
networking.hostName = "extern";
|
||||
}
|
||||
|
|
97
hosts/extern/disko/default.nix
vendored
Normal file
97
hosts/extern/disko/default.nix
vendored
Normal file
|
@ -0,0 +1,97 @@
|
|||
{ disko, config, ... }:
|
||||
{
|
||||
imports = [ disko.nixosModules.disko ];
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
priority = 1;
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "${config.networking.hostName}-disk";
|
||||
settings.allowDiscards = true;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "${config.networking.hostName}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lvm_vg = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/prev" = {
|
||||
mountpoint = "/prev";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
|
||||
# Impermanence
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/persist/.snapshots" = { };
|
||||
|
||||
"/jimbo" = {
|
||||
mountpoint = "/persist/home/jimbo";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/jimbo/.snapshots" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "4G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Needed for impermanence
|
||||
fileSystems = {
|
||||
"/persist".neededForBoot = true;
|
||||
"/persist/home/jimbo".neededForBoot = true;
|
||||
};
|
||||
}
|
11
hosts/extern/filesystems/default.nix
vendored
Normal file
11
hosts/extern/filesystems/default.nix
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
fileSystems = {
|
||||
# Network mounts
|
||||
"/home/jimbo/JimboNFS" = {
|
||||
device = "10.100.0.1:/export/JimboNFS";
|
||||
fsType = "nfs4";
|
||||
options = [ "x-systemd.automount" "_netdev" "nofail" "noauto" ];
|
||||
};
|
||||
};
|
||||
}
|
32
hosts/extern/hardware/default.nix
vendored
32
hosts/extern/hardware/default.nix
vendored
|
@ -1,32 +1,8 @@
|
|||
{ config, lib, modulesPath, ... }:
|
||||
# nixos-generate-config --root ./ --no-filesystems
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/all-hardware.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"uas"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = [
|
||||
"dm-snapshot"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
# Remote
|
||||
"/home/jimbo/JimboNFS" = {
|
||||
device = "10.100.0.1:/export/JimboNFS";
|
||||
fsType = "nfs4";
|
||||
options = [ "x-systemd.automount" "_netdev" "nofail" "noauto" ];
|
||||
};
|
||||
};
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
|
1
hosts/extern/id_ed25519.pub
vendored
Normal file
1
hosts/extern/id_ed25519.pub
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC2lMkUd+BbXITE5LTg94hEzmA6UKsIIbaf5YOjGoLzl
|
7
hosts/extern/modules/default.nix
vendored
Normal file
7
hosts/extern/modules/default.nix
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/all-hardware.nix")
|
||||
#(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
}
|
7
hosts/extern/nixmodules/default.nix
vendored
7
hosts/extern/nixmodules/default.nix
vendored
|
@ -1,7 +0,0 @@
|
|||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
"${modulesPath}/installer/cd-dvd/channel.nix"
|
||||
];
|
||||
}
|
23
hosts/extern/wireguard/default.nix
vendored
23
hosts/extern/wireguard/default.nix
vendored
|
@ -1,23 +0,0 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedUDPPorts = [ 51820 ];
|
||||
trustedInterfaces = [ "wgc" ];
|
||||
};
|
||||
|
||||
wireguard.interfaces.wgc = {
|
||||
ips = [ "10.100.0.20/24" ];
|
||||
listenPort = 51820;
|
||||
privateKey = config.secrets.wgClientPriv;
|
||||
peers = [
|
||||
{ # Cyberspark Server
|
||||
publicKey = "qnOT/lXOJMaQgDUdXpyfGZB2IEyUouRje2m/bCe9ux8=";
|
||||
allowedIPs = [ "10.100.0.0/24" ];
|
||||
endpoint = "sv.${config.domains.jim1}:51820";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ jovian, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot
|
||||
|
@ -7,13 +7,10 @@
|
|||
./hardware
|
||||
./wireguard
|
||||
../../modules/system
|
||||
jovian.nixosModules.default
|
||||
];
|
||||
|
||||
system.lanzaboote.enable = true;
|
||||
system.libvirtd.enable = true;
|
||||
|
||||
jovian.steamos.useSteamOSConfig = true;
|
||||
|
||||
networking.hostName = "jupiter";
|
||||
}
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
allowPing = false;
|
||||
extraInputRules = ''
|
||||
ip saddr { ${config.ips.localSpan}.0/24, 10.100.0.0/24 } tcp dport 2049 accept comment "Accept NFS"
|
||||
ip saddr { ${config.ips.pc}, ${config.secrets.lunaIP}, ${config.secrets.cornIP} } tcp dport { 1935, 1945 } accept comment "Accept RTMP"
|
||||
'';
|
||||
};
|
||||
firewall.extraInputRules = ''
|
||||
ip saddr { ${config.ips.localSpan}.0/24, 10.100.0.0/24 } tcp dport 2049 accept comment "Accept NFS"
|
||||
ip saddr { ${config.ips.pc}, ${config.secrets.lunaIP}, ${config.secrets.cornIP} } tcp dport { 1935, 1945 } accept comment "Accept RTMP"
|
||||
'';
|
||||
|
||||
# Nftables configuration only if server is enabled
|
||||
nftables.tables.forwarding = {
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
networking = {
|
||||
firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
nat = {
|
||||
enable = config.system.wireguard.server.enable;
|
||||
externalInterface = "eno1";
|
||||
internalInterfaces = [ "wgs" ];
|
||||
};
|
||||
|
||||
wireguard.interfaces.wgs = {
|
||||
ips = [ "10.100.0.1/24" ];
|
||||
listenPort = 51820;
|
||||
privateKey = config.secrets.wgServerPriv;
|
||||
peers = [
|
||||
{ # NixOS Config Key
|
||||
publicKey = "OKUH/h6YSURI4vgeTZKQD15QsqaygdbTn1mAWzQp9S0=";
|
||||
allowedIPs = [ "10.100.0.16/28" ];
|
||||
}
|
||||
{ # Pixel 9
|
||||
publicKey = "dPCtjm67adMZCnyL1O2L+uUOk0RbjA9T/tht1r+qcE4=";
|
||||
allowedIPs = [ "10.100.0.2/32" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,38 +3,9 @@
|
|||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernel.sysctl."vm.max_map_count" = 2147483642;
|
||||
|
||||
initrd = {
|
||||
systemd = {
|
||||
enable = true;
|
||||
services.root-reset = {
|
||||
description = "Reset BTRFS root and snapshot last boot";
|
||||
wantedBy = [ "initrd.target" ];
|
||||
after = [ "dev-nixos-root.device" ];
|
||||
before = [ "sysroot.mount" ];
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
mkdir -p /mnt
|
||||
mount /dev/nixos/root /mnt
|
||||
|
||||
if [[ -e /mnt/@prev ]]; then
|
||||
btrfs subvolume delete /mnt/@prev
|
||||
fi
|
||||
|
||||
btrfs subvolume snapshot /mnt/@ /mnt/@prev
|
||||
|
||||
btrfs subvolume list -o /mnt/@ | cut -f9 -d' ' | while read subvolume; do
|
||||
btrfs subvolume delete "/mnt/$subvolume"
|
||||
done
|
||||
|
||||
btrfs subvolume delete /mnt/@
|
||||
btrfs subvolume create /mnt/@
|
||||
|
||||
umount /mnt
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
kernelParams = [
|
||||
"radeon.cik_support=0"
|
||||
"amdgpu.cik_support=1"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,27 +3,15 @@
|
|||
imports = [
|
||||
./boot
|
||||
./disko
|
||||
./filesystems
|
||||
./hardware
|
||||
|
||||
# Apps and programs
|
||||
../../modules/system
|
||||
../../modules/system/accounts
|
||||
../../modules/system/desktop
|
||||
../../modules/system/programs
|
||||
../../modules/system/services
|
||||
|
||||
# Devices and hardware
|
||||
../../modules/system/devices
|
||||
../../modules/system/devices/boot/systemd
|
||||
../../modules/system/devices/networking/wireless
|
||||
../../modules/system/devices/networking/firewall/pc
|
||||
../../modules/system/devices/networking/wireguard/pc
|
||||
|
||||
# Extras
|
||||
../../overlays
|
||||
../../variables
|
||||
];
|
||||
|
||||
system.lanzaboote.enable = true;
|
||||
|
||||
system.wireguard.client.enable = true;
|
||||
networking.wireguard.interfaces.wgc.ips = [ "10.100.0.23/24" ];
|
||||
|
||||
networking.hostName = "redmond";
|
||||
networking.wireguard.interfaces."${config.ips.wgInt}".ips = [ "${config.ips.wgSpan}.20/24" ];
|
||||
}
|
||||
|
|
14
hosts/redmond/filesystems/default.nix
Normal file
14
hosts/redmond/filesystems/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
{
|
||||
fileSystems = {
|
||||
"/mnt/Windrive" = {
|
||||
device = "/dev/disk/by-uuid/582C6B802C6B57D0";
|
||||
options = [ "nosuid" "nodev" ];
|
||||
};
|
||||
"/home/jimbo/JimboNFS" = {
|
||||
device = "10.100.0.1:/export/JimboNFS";
|
||||
fsType = "nfs4";
|
||||
options = [ "x-systemd.automount" "_netdev" "nofail" "noauto" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,27 +1,9 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"ehci_pci"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
"sdhci_pci"
|
||||
"rtsx_usb_sdmmc"
|
||||
];
|
||||
};
|
||||
};
|
||||
{ config, lib, ... }:
|
||||
|
||||
fileSystems = {
|
||||
"/home/jimbo/JimboNFS" = {
|
||||
device = "${config.ips.wgSpan}.1:/export/JimboNFS";
|
||||
fsType = "nfs4";
|
||||
options = ["x-systemd.automount" "_netdev" "nofail" "noauto"];
|
||||
};
|
||||
};
|
||||
{
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "sd_mod" "sr_mod" "sdhci_pci" "rtsx_usb_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
|
|
@ -1 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG9uITpyw5WgxT7UnswueFtyWxAqQCZv4h9DfcDkr+kn
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsPwxV2qr4IFC63SxPM5bI9iFCbH5wVxorNHYKSvE7i
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
commonKernelParams = [
|
||||
# VM/GPU passthrough
|
||||
|
@ -21,47 +21,29 @@ in {
|
|||
kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:1f82,10de:10fa" ];
|
||||
blacklistedKernelModules = [ "pcspkr" ];
|
||||
|
||||
# Enable cross-compilation
|
||||
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
# Needed for GPU passthrough
|
||||
initrd.kernelModules = [
|
||||
"vfio"
|
||||
"vfio_pci"
|
||||
"vfio_iommu_type1"
|
||||
];
|
||||
|
||||
initrd.systemd = {
|
||||
enable = true;
|
||||
services.root-reset = {
|
||||
description = "Reset root and snapshot last boot";
|
||||
wantedBy = [ "initrd.target" ];
|
||||
before = [ "sysroot.mount" ];
|
||||
after = [ "dev-${config.networking.hostName}-root.device" ];
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
mkdir -p /mnt
|
||||
mount /dev/${config.networking.hostName}/root /mnt
|
||||
|
||||
if [[ -e /mnt/prev ]]; then
|
||||
btrfs subvolume delete /mnt/prev
|
||||
fi
|
||||
|
||||
btrfs subvolume snapshot /mnt/root /mnt/prev
|
||||
|
||||
btrfs subvolume list -o /mnt/root | cut -f9 -d' ' | while read subvolume; do
|
||||
btrfs subvolume delete "/mnt/$subvolume"
|
||||
done
|
||||
|
||||
btrfs subvolume delete /mnt/root
|
||||
btrfs subvolume create /mnt/root
|
||||
|
||||
umount /mnt
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Use second GPU on boot
|
||||
specialisation.gputwo.configuration = {
|
||||
boot.kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:2504,10de:228e" ];
|
||||
};
|
||||
|
||||
# Use Nouveau
|
||||
specialisation.nouveau.configuration.config = {
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = lib.mkForce "0";
|
||||
WLR_RENDERER = lib.mkForce "vulkan";
|
||||
};
|
||||
system.video.nvidia.enable = lib.mkForce false;
|
||||
system.video.nouveau.enable = lib.mkForce true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
};
|
||||
"/prev" = {
|
||||
mountpoint = "/prev";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" "noexec" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
"/home/jimbo/JimboNFS" = {
|
||||
device = "${config.ips.server}:/export/JimboNFS";
|
||||
fsType = "nfs4";
|
||||
options = [ "x-systemd.automount" "_netdev" "nofail" "noauto" ];
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
6
hosts/tower/users/jimbo/default.nix
Normal file
6
hosts/tower/users/jimbo/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
home-manager.users.jimbo = {
|
||||
|
||||
};
|
||||
}
|
7
modules/extras/default.nix
Normal file
7
modules/extras/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./overlays
|
||||
./variables
|
||||
];
|
||||
}
|
56
modules/extras/variables/secrets/default.nix
Normal file
56
modules/extras/variables/secrets/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.secrets = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.secrets = {
|
||||
# User passwords, generated with 'mkpasswd -m sha-512'
|
||||
jimboAccPass = "$6$gYpE.pG/zPXgin06$2kydjDfd0K62Dhf9P0PFvJhRNz6xIC/bHYaf/XYqyKcLyZNzPQpy8uy9tCRcSYlj1wwBhzVtTRyItwajOHCEj0";
|
||||
|
||||
# Cloudflare API key
|
||||
flareApiKey = "ICUi1Zj0e_boCkeUJbXP9dJusv_qX_zhKWQGPcFe";
|
||||
|
||||
# Wireguard keys, generated with the wg command
|
||||
wgServerPriv = "WHxxi53Yp8NRZhT+BQnvC62BckOeG1x2SOvkWlm0tGo=";
|
||||
wgClientPriv = "MK9j0eYlgv+MZ9sSYO6C3lfqScpLPwcBqEckJ7o7tU4=";
|
||||
|
||||
# Icecast, plaintext
|
||||
castAdminPass = "Gw9P8tW$omeq#reZA$b^jDy9VN";
|
||||
castSourcePass = "KkFDeM0SHIL*s6!d4x*a4b#bcq";
|
||||
|
||||
# Photoprism, plaintext
|
||||
prismAdminPass = "gr3SkIqSBjDmypyxU!Zj9*CJ4X";
|
||||
|
||||
# Matrix secrets
|
||||
matrixSecret = "bea7db528a95d8225c5fe6bf92614816fe9d31496b510dff78b1608cfb36f82a";
|
||||
coturnSecret = "@OvhK7r4wu!71d9dcmQ$Z6PkqA#LP0niyJHLTiMVJFILo7@6ks3wwmjWJ*zDBV43";
|
||||
|
||||
# Pixelfed secret, must be 32 characters long
|
||||
pixelfedKey = ''APP_KEY=W9qein6055k9GdvwGbdJ6WxQ71Lr51cQ'';
|
||||
|
||||
# Transmission credentials, plaintext
|
||||
transmissionCredFile = ''
|
||||
{
|
||||
"rpc-username": "jimbo",
|
||||
"rpc-password": "w%QbIEZhoi4jh*j*PKaZLkKk96"
|
||||
}
|
||||
'';
|
||||
|
||||
# Email cleartext passwords
|
||||
noreplyPassword = "5mpEp3P^n6A%r3fznJA5";
|
||||
|
||||
# Email account hashes, generated with 'mkpasswd -m bcrypt'
|
||||
noreplyMailHash = "$2b$05$7VibcFKXy5Ff9sUMh3KWBeSXkInXNeaADa71Md/swt5RCk5s7UnM2";
|
||||
jimboMailHash = "$2a$12$vHeFInRpfp.lpfR/k8ptNecs3ztKjkRTr9hae0DP8yEN1ZHKM2sxe";
|
||||
lunaMailHash = "$2y$10$ksBfmuuojCWnzFqpBDoE/OoGZyqfP.Luo2il7wWcqHemHgqhpQdi6";
|
||||
cornMailHash = "$2b$05$qpG1aOA2tv3zLjzwh8/kyO3zZ8BZxvXcav0ioX7Y3Tps0tyhE/c7q";
|
||||
tinyMailHash = "$2a$12$beq/ZO3hRz5mmGe9Cvvx8u/sNJcjVHlQQ5axv8IBmdJav60n7fuK6";
|
||||
|
||||
# IPs
|
||||
jimIP = "99.247.177.43";
|
||||
lunaIP = "71.87.124.226";
|
||||
cornIP = "24.66.98.13";
|
||||
};
|
||||
}
|
29
modules/extras/variables/workspaces/default.nix
Normal file
29
modules/extras/variables/workspaces/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.ws = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.ws = {
|
||||
w0 = ''0'';
|
||||
w1 = ''1'';
|
||||
w2 = ''2'';
|
||||
w3 = ''3'';
|
||||
w4 = ''4'';
|
||||
w5 = ''5'';
|
||||
w6 = ''6'';
|
||||
w7 = ''7'';
|
||||
w8 = ''8'';
|
||||
w9 = ''9'';
|
||||
w1a = ''I'';
|
||||
w2a = ''II'';
|
||||
w3a = ''III'';
|
||||
w4a = ''IV'';
|
||||
w5a = ''V'';
|
||||
w6a = ''VI'';
|
||||
w7a = ''VII'';
|
||||
w8a = ''VIII'';
|
||||
w9a = ''IX'';
|
||||
};
|
||||
}
|
|
@ -2,13 +2,13 @@
|
|||
{
|
||||
imports = [
|
||||
./files
|
||||
./options
|
||||
./programs
|
||||
./services
|
||||
./settings
|
||||
./wms
|
||||
./users
|
||||
../../overlays
|
||||
../../variables
|
||||
./user
|
||||
../extras
|
||||
|
||||
# Imports
|
||||
nur.nixosModules.nur
|
||||
|
|
8
modules/home/options/default.nix
Normal file
8
modules/home/options/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ lib, ... }:
|
||||
with lib; {
|
||||
options.home.desktop.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable desktop apps and services, but home-manager";
|
||||
};
|
||||
}
|
|
@ -4,10 +4,11 @@
|
|||
./easyeffects
|
||||
./foot
|
||||
./librewolf
|
||||
./mako
|
||||
./mangohud
|
||||
./mpv
|
||||
./pcmanfm-qt
|
||||
./pcmanfm
|
||||
./rofi
|
||||
./swappy
|
||||
./thunderbird
|
||||
];
|
||||
}
|
||||
|
|
|
@ -112,6 +112,28 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
commonBookmarks = [
|
||||
{
|
||||
name = "Jimbo";
|
||||
url = "https://jimbosfiles.com";
|
||||
}
|
||||
{
|
||||
name = "Corn";
|
||||
url = "https://freecorn1854.win";
|
||||
}
|
||||
{
|
||||
name = "Luna";
|
||||
url = "https://www.lunamoonlight.xyz";
|
||||
}
|
||||
{
|
||||
name = "Kernel";
|
||||
url = "https://www.kernel.org";
|
||||
}
|
||||
{
|
||||
name = "Github";
|
||||
url = "https://github.com";
|
||||
}
|
||||
];
|
||||
commonSettings = {
|
||||
"general.autoScroll" = true;
|
||||
|
||||
|
@ -123,23 +145,55 @@ in {
|
|||
|
||||
"browser.uidensity" = 1;
|
||||
"browser.compactmode.show" = true;
|
||||
"browser.send_pings" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.toolbars.bookmarks.visibility" = "never";
|
||||
"browser.contentblocking.category" = "strict";
|
||||
"browser.helperApps.deleteTempFileOnExit" = true;
|
||||
"browser.search.separatePrivateDefault" = false;
|
||||
"browser.download.useDownloadDir" = true;
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.startup.page" = 3;
|
||||
"browser.theme.content-theme" = 0;
|
||||
"browser.theme.toolbar-theme" = 0;
|
||||
"browser.newtabpage.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false;
|
||||
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;
|
||||
"browser.tabs.inTitlebar" = 0;
|
||||
"browser.tabs.closeWindowWithLastTab" = false;
|
||||
"browser.urlbar.speculativeConnect.enabled" = false;
|
||||
"browser.discovery.enabled" = false;
|
||||
|
||||
"browser.safebrowsing.downloads.enabled" = false;
|
||||
"browser.safebrowsing.downloads.remote.enabled" = false;
|
||||
"browser.safebrowsing.downloads.remote.block_uncommon" = false;
|
||||
"browser.safebrowsing.downloads.remote.block_potentially_unwanted" = false;
|
||||
"browser.safebrowsing.malware.enabled" = false;
|
||||
"browser.safebrowsing.phishing.enabled" = false;
|
||||
"browser.safebrowsing.blockedURIs.enabled" = false;
|
||||
"browser.safebrowsing.provider.google4.gethashURL" = false;
|
||||
"browser.safebrowsing.provider.google4.updateURL" = false;
|
||||
"browser.safebrowsing.provider.google.gethashURL" = false;
|
||||
"browser.safebrowsing.provider.google.updateURL" = false;
|
||||
|
||||
"extensions.pocket.enabled" = false;
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
"extensions.formautofill.addresses.enabled" = false;
|
||||
"extensions.formautofill.creditCards.enabled" = false;
|
||||
"extensions.getAddons.showPane" = false;
|
||||
"extensions.webservice.discoverURL" = "";
|
||||
"extensions.getAddons.discovery.api_url" = "";
|
||||
"extensions.htmlaboutaddons.discover.enabled" = false;
|
||||
"extensions.htmlaboutaddons.recommendations.enabled" = false;
|
||||
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"toolkit.tabbox.switchByScrolling" = true;
|
||||
|
||||
"privacy.resistFingerprinting" = true;
|
||||
"privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" = true;
|
||||
"privacy.firstparty.isolate" = true;
|
||||
"privacy.fingerprintingProtection" = true;
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"privacy.globalprivacycontrol.enabled" = true;
|
||||
|
@ -154,8 +208,11 @@ in {
|
|||
|
||||
"network.trr.mode" = 3;
|
||||
"network.trr.uri" = "https://doh.libredns.gr/noads";
|
||||
"network.http.referer.XOriginPolicy" = true;
|
||||
"network.cookie.cookieBehavior" = 1;
|
||||
"network.cookie.sameSite.noneRequiresSecure" = true;
|
||||
"network.http.referer.XOriginPolicy" = 2;
|
||||
"network.http.referer.XOriginTrimmingPolicy" = 2;
|
||||
"network.http.referer.trimmingPolicy" = 2;
|
||||
|
||||
"media.ffmpeg.vaapi.enabled" = true;
|
||||
"media.rdd-ffmpeg.enabled" = true;
|
||||
|
@ -164,11 +221,25 @@ in {
|
|||
"gfx.webrender.all" = true;
|
||||
"gfx.x11-egl.force-enabled" = true;
|
||||
|
||||
"signon.rememberSignons" = false;
|
||||
"signon.management.page.breach-alerts.enabled" = false;
|
||||
|
||||
"dom.private-attribution.submission.enabled" = false;
|
||||
"dom.battery.enabled" = false;
|
||||
"dom.security.https_only_mode" = true;
|
||||
"dom.security.https_only_mode.upgrade_local" = true;
|
||||
"dom.security.https_only_mode_ever_enabled" = true;
|
||||
"dom.security.https_only_mode_ever_enabled_pbm" = true;
|
||||
|
||||
"clipboard.autocopy" = false;
|
||||
"middlemouse.paste" = false;
|
||||
|
||||
"identity.fxaccounts.enabled" = false;
|
||||
"datareporting.healthreport.uploadEnabled" = false;
|
||||
"svg.context-properties.content.enabled" = true;
|
||||
"services.sync.engine.addresses.available" = false;
|
||||
"device.sensors.motion.enabled" = false;
|
||||
"security.OCSP.require" = true;
|
||||
"gnomeTheme.hideSingleTab" = true;
|
||||
"webgl.disabled" = false;
|
||||
};
|
||||
|
@ -178,8 +249,10 @@ in {
|
|||
profiles = {
|
||||
Main = {
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
extensions = commonExtensions;
|
||||
search = commonSearch;
|
||||
bookmarks = commonBookmarks;
|
||||
settings = commonSettings;
|
||||
userChrome = ''
|
||||
${themeJim}
|
||||
|
@ -191,6 +264,7 @@ in {
|
|||
id = 1;
|
||||
extensions = commonExtensions;
|
||||
search = commonSearch;
|
||||
bookmarks = commonBookmarks;
|
||||
settings = commonSettings;
|
||||
userChrome = ''
|
||||
${themeAlt}
|
||||
|
@ -202,8 +276,8 @@ in {
|
|||
id = 2;
|
||||
extensions = commonExtensions;
|
||||
search = commonSearch;
|
||||
bookmarks = commonBookmarks;
|
||||
settings = commonSettings;
|
||||
containersForce = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -211,7 +285,7 @@ in {
|
|||
# Fixes
|
||||
home.file = {
|
||||
# Symlinks to Librewolf
|
||||
".librewolf".source = config.lib.file.mkOutOfStoreSymlink "/home/jimbo/.mozilla/firefox";
|
||||
".librewolf".source = config.lib.file.mkOutOfStoreSymlink "/home/${config.home.username}/.mozilla/firefox";
|
||||
|
||||
# Gnome theme
|
||||
".mozilla/firefox/Misc/chrome".source = fetchTarball {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* try increasing if you encounter problems */
|
||||
--urlbar-height-setting: 24px;
|
||||
--tab-min-height: 20px !important;
|
||||
|
||||
/* I don't recommend you touch this */
|
||||
|
||||
/* I don't recommend you touch this unless you know what you're doing */
|
||||
--arrowpanel-menuitem-padding: 2px !important;
|
||||
--arrowpanel-border-radius: 0px !important;
|
||||
--arrowpanel-menuitem-border-radius: 0px !important;
|
||||
|
@ -13,20 +13,20 @@
|
|||
--toolbar-field-focus-border-color: transparent !important;
|
||||
}
|
||||
|
||||
/* --- General debloat ------------------------------ */
|
||||
/* --- GENERAL DEBLOAT ---------------------------------- */
|
||||
|
||||
/* bottom left page loading status or url preview */
|
||||
/* Bottom left page loading status or url preview */
|
||||
#statuspanel { display: none !important; }
|
||||
|
||||
/* remove radius from right-click popup */
|
||||
menupopup, panel { --panel-border-radius: 0px !important; }
|
||||
menu, menuitem, menucaption { border-radius: 0px !important; }
|
||||
|
||||
/* no large buttons in right-click menu */
|
||||
/* no stupid large buttons in right-click menu */
|
||||
menupopup > #context-navigation { display: none !important; }
|
||||
menupopup > #context-sep-navigation { display: none !important; }
|
||||
|
||||
/* --- Debloat navbar ------------------------------- */
|
||||
/* --- DEBLOAT NAVBAR ----------------------------------- */
|
||||
|
||||
#back-button { display: none; }
|
||||
#forward-button { display: none; }
|
||||
|
@ -38,11 +38,21 @@ menupopup > #context-sep-navigation { display: none !important; }
|
|||
/* empty space before and after the url bar */
|
||||
#customizableui-special-spring1, #customizableui-special-spring2 { display: none; }
|
||||
|
||||
/* --- Style navbar -------------------------------- */
|
||||
/* --- STYLE NAVBAR ------------------------------------ */
|
||||
|
||||
/* remove padding between toolbar buttons */
|
||||
toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
||||
|
||||
/* add it back to the downloads button, otherwise it's too close to the urlbar */
|
||||
#downloads-button {
|
||||
margin-left: 2px !important;
|
||||
}
|
||||
|
||||
/* add padding to the right of the last button so that it doesn't touch the edge of the window */
|
||||
#PanelUI-menu-button {
|
||||
padding: 0px 4px 0px 0px !important;
|
||||
}
|
||||
|
||||
#urlbar-container {
|
||||
--urlbar-container-height: var(--urlbar-height-setting) !important;
|
||||
margin-left: 0 !important;
|
||||
|
@ -70,16 +80,16 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
|||
}
|
||||
|
||||
/* keep pop-up menus from overlapping with navbar */
|
||||
#widget-overflow { margin: 0 !important; }
|
||||
#appmenu-popup { margin: 0 !important; }
|
||||
#customizationui-widget-panel { margin: 0 !important; }
|
||||
#unified-extensions-panel { margin: 0 !important; }
|
||||
#widget-overflow { margin: 4px !important; }
|
||||
#customizationui-widget-panel { margin: 4px !important; }
|
||||
#unified-extensions-panel { margin-top: 4px !important; }
|
||||
#appMenu-popup { margin-top: 4px !important; }
|
||||
|
||||
/* --- Unified extensions button -------------------- */
|
||||
/* --- UNIFIED EXTENSIONS BUTTON ------------------------ */
|
||||
|
||||
/* make extension icons smaller */
|
||||
#unified-extensions-view {
|
||||
--uei-icon-size: 18px;
|
||||
--uei-icon-size: 16px;
|
||||
}
|
||||
|
||||
/* hide bloat */
|
||||
|
@ -95,10 +105,6 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
|||
padding: 3px 0px !important;
|
||||
}
|
||||
|
||||
#unified-extensions-view .unified-extensions-item-menu-button {
|
||||
margin-inline-end: 0 !important;
|
||||
}
|
||||
|
||||
#unified-extensions-view .toolbarbutton-icon {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
@ -108,7 +114,16 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
|||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
/* --- Debloat URL bar ------------------------------- */
|
||||
#unified-extensions-panel .unified-extensions-item {
|
||||
margin-block: 0 !important;
|
||||
}
|
||||
|
||||
.toolbar-menupopup :is(menu, menuitem), .subview-subheader, panelview
|
||||
.toolbarbutton-1, .subviewbutton, .widget-overflow-list .toolbarbutton-1 {
|
||||
padding: 4px !important;
|
||||
}
|
||||
|
||||
/* --- DEBLOAT URLBAR ----------------------------------- */
|
||||
|
||||
#identity-box { display: none; }
|
||||
#pageActionButton { display: none; }
|
||||
|
@ -125,7 +140,7 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
|||
/* remove container indicator from urlbar */
|
||||
#userContext-label, #userContext-indicator { display: none !important;}
|
||||
|
||||
/* --- Style tab toolbar ---------------------------- */
|
||||
/* --- STYLE TAB TOOLBAR -------------------------------- */
|
||||
|
||||
#titlebar {
|
||||
--proton-tab-block-margin: 0px !important;
|
||||
|
@ -135,7 +150,6 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
|||
#TabsToolbar, .tabbrowser-tab {
|
||||
max-height: var(--tab-min-height) !important;
|
||||
font-size: 14px !important;
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
/* Change color of normal tabs */
|
||||
|
@ -147,6 +161,17 @@ tab:not([selected="true"]) {
|
|||
tab {
|
||||
font-family: var(--tab-font, monospace);
|
||||
border: none !important;
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
padding: 0 0 0 var(--tab-inline-padding);
|
||||
}
|
||||
|
||||
.tab-background {
|
||||
margin-block: 0 !important;
|
||||
min-height: var(--tab-min-height);
|
||||
outline-offset: 0 !important;
|
||||
}
|
||||
|
||||
/* safari style tab width */
|
||||
|
@ -158,6 +183,9 @@ tab {
|
|||
/* Hide close button on tabs */
|
||||
#tabbrowser-tabs .tabbrowser-tab .tab-close-button { display: none !important; }
|
||||
|
||||
/* disable favicons in tab */
|
||||
/* .tab-icon-stack:not([pinned]) { display: none !important; } */
|
||||
|
||||
.tabbrowser-tab {
|
||||
/* remove border between tabs */
|
||||
padding-inline: 0px !important;
|
||||
|
@ -204,6 +232,10 @@ tab {
|
|||
height: var(--tab-min-height) !important;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs {
|
||||
min-height: var(--tab-min-height) !important;
|
||||
}
|
||||
|
||||
/* remove overflow scroll buttons */
|
||||
#scrollbutton-up, #scrollbutton-down { display: none !important; }
|
||||
|
||||
|
@ -212,27 +244,40 @@ tab {
|
|||
display: none !important;
|
||||
}
|
||||
|
||||
/* --- Autohide Navbar ------------------------------ */
|
||||
|
||||
/* hide navbar unless focused */
|
||||
#nav-bar {
|
||||
min-height: 0 !important;
|
||||
max-height: 0 !important;
|
||||
height: 0 !important;
|
||||
--moz-transform: scaleY(0) !important;
|
||||
transform: scaleY(0) !important;
|
||||
/* hide private browsing indicator */
|
||||
#private-browsing-indicator-with-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* --- AUTOHIDE NAVBAR ---------------------------------- */
|
||||
|
||||
#nav-bar,
|
||||
#urlbar {
|
||||
transform: translateY(calc(0px - var(--urlbar-height-setting)));
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
min-height: var(--tab-min-height) !important;
|
||||
height: var(--tab-min-height) !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox:focus-within {
|
||||
min-height: calc(var(--urlbar-height-setting) + var(--tab-min-height)) !important;
|
||||
height: calc(var(--urlbar-height-setting) + var(--tab-min-height)) !important;
|
||||
transform: translateY(calc(0px - var(--tab-min-height)));
|
||||
}
|
||||
|
||||
#TabsToolbar {
|
||||
transform: translateY(var(--tab-min-height));
|
||||
}
|
||||
|
||||
/* show on focus */
|
||||
#nav-bar:focus-within {
|
||||
--moz-transform: scale(1) !important;
|
||||
transform: scale(1) !important;
|
||||
max-height: var(--urlbar-height-setting) !important;
|
||||
height: var(--urlbar-height-setting) !important;
|
||||
min-height: var(--urlbar-height-setting) !important;
|
||||
transform: translateY(var(--tab-min-height));
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#navigator-toolbox:focus-within > .browser-toolbar {
|
||||
#urlbar:focus-within {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
packages = with pkgs; [ mangohud ];
|
||||
file = {
|
||||
# These options exist in Nixlang, but the order is not respected.
|
||||
# As of 24.11, exec is no longer respected either. No clue why.
|
||||
".config/MangoHud/MangoHud.conf".text = ''
|
||||
table_columns=2
|
||||
frametime=0
|
||||
|
@ -12,7 +11,6 @@
|
|||
font_scale=0.80
|
||||
background_alpha=0.25
|
||||
|
||||
exec=echo $(echo $XDG_CURRENT_DESKTOP | sed 's/./\U&/') on $(cat /etc/os-release | grep PRETTY_NAME | cut -d '"' -f 2)
|
||||
fps
|
||||
fps_color_change
|
||||
ram
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
pcmanfm-qt
|
||||
file-roller
|
||||
];
|
||||
file = {
|
||||
".config/pcmanfm-qt/default/settings.conf".text = ''
|
||||
[Behavior]
|
||||
BookmarkOpenMethod=current_tab
|
||||
ConfirmDelete=true
|
||||
RecentFilesNumber=0
|
||||
|
||||
[Desktop]
|
||||
HideItems=false
|
||||
SortColumn=name
|
||||
SortFolderFirst=true
|
||||
SortHiddenLast=false
|
||||
SortOrder=ascending
|
||||
|
||||
[FolderView]
|
||||
Mode=icon
|
||||
ScrollPerPixel=true
|
||||
ShadowHidden=true
|
||||
ShowFilter=false
|
||||
ShowFullNames=true
|
||||
ShowHidden=true
|
||||
SortCaseSensitive=false
|
||||
SortColumn=mtime
|
||||
SortFolderFirst=true
|
||||
SortHiddenLast=false
|
||||
SortOrder=descending
|
||||
|
||||
[Places]
|
||||
HiddenPlaces=menu://applications/, network:///, computer:///, /home/jimbo/Desktop
|
||||
|
||||
[System]
|
||||
Archiver=file-roller
|
||||
Terminal=foot
|
||||
|
||||
[Thumbnail]
|
||||
MaxExternalThumbnailFileSize=-1
|
||||
MaxThumbnailFileSize=4096
|
||||
ShowThumbnails=true
|
||||
ThumbnailLocalFilesOnly=false
|
||||
|
||||
[Window]
|
||||
AlwaysShowTabs=false
|
||||
PathBarButtons=true
|
||||
ShowMenuBar=true
|
||||
ShowTabClose=true
|
||||
SwitchToNewTab=true
|
||||
TabPaths=@Invalid()
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
84
modules/home/programs/gui/pcmanfm/default.nix
Normal file
84
modules/home/programs/gui/pcmanfm/default.nix
Normal file
|
@ -0,0 +1,84 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
pcmanfm
|
||||
file-roller
|
||||
];
|
||||
file = {
|
||||
".config/pcmanfm/default/pcmanfm.conf".text = ''
|
||||
[config]
|
||||
bm_open_method=0
|
||||
|
||||
[volume]
|
||||
mount_on_startup=0
|
||||
mount_removable=1
|
||||
autorun=0
|
||||
|
||||
[ui]
|
||||
always_show_tabs=0
|
||||
max_tab_chars=32
|
||||
win_width=943
|
||||
win_height=1039
|
||||
splitter_pos=150
|
||||
media_in_new_tab=0
|
||||
desktop_folder_new_win=0
|
||||
change_tab_on_drop=1
|
||||
close_on_unmount=1
|
||||
focus_previous=0
|
||||
side_pane_mode=places
|
||||
view_mode=icon
|
||||
show_hidden=1
|
||||
sort=mtime;descending;
|
||||
toolbar=newtab;navigation;home;
|
||||
show_statusbar=1
|
||||
pathbar_mode_buttons=0
|
||||
'';
|
||||
|
||||
".config/libfm/libfm.conf".text = ''
|
||||
[config]
|
||||
single_click=0
|
||||
use_trash=0
|
||||
confirm_del=1
|
||||
confirm_trash=0
|
||||
advanced_mode=1
|
||||
si_unit=0
|
||||
force_startup_notify=1
|
||||
backup_as_hidden=1
|
||||
no_usb_trash=1
|
||||
no_child_non_expandable=0
|
||||
show_full_names=0
|
||||
only_user_templates=0
|
||||
template_run_app=0
|
||||
template_type_once=0
|
||||
auto_selection_delay=600
|
||||
drop_default_action=auto
|
||||
defer_content_test=0
|
||||
quick_exec=0
|
||||
terminal=foot
|
||||
archiver=file-roller
|
||||
thumbnail_local=1
|
||||
thumbnail_max=2048
|
||||
smart_desktop_autodrop=1
|
||||
|
||||
[ui]
|
||||
big_icon_size=48
|
||||
small_icon_size=16
|
||||
pane_icon_size=16
|
||||
thumbnail_size=128
|
||||
show_thumbnail=1
|
||||
shadow_hidden=1
|
||||
|
||||
[places]
|
||||
places_home=1
|
||||
places_desktop=1
|
||||
places_root=0
|
||||
places_computer=0
|
||||
places_trash=1
|
||||
places_applications=1
|
||||
places_network=0
|
||||
places_unmounted=1
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -127,7 +127,7 @@
|
|||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "rofiscripts" ''
|
||||
# Scratchpad function
|
||||
handle_scratchpads() {
|
||||
scratchpads() {
|
||||
SCRATCHPADS=$(echo -e "Gotop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads")
|
||||
case $SCRATCHPADS in
|
||||
Gotop) foot -a gotop -T Gotop gotop;;
|
||||
|
@ -138,43 +138,24 @@
|
|||
}
|
||||
|
||||
# Lock menu
|
||||
handle_power() {
|
||||
power() {
|
||||
POWER=$(echo -e "Shutdown\nReboot\nSleep\nLock\nKill" | rofi -dmenu -i -p "Power")
|
||||
case $POWER in
|
||||
Shutdown) poweroff;;
|
||||
Reboot) reboot;;
|
||||
Sleep) swaysleep &;;
|
||||
Sleep) sleep-$XDG_CURRENT_DESKTOP &;;
|
||||
Lock) swaylock &;;
|
||||
Kill) pkill -9 sway;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Resolutions
|
||||
handle_resolutions() {
|
||||
RET=$(echo -e "Default\nWide\nGPU2" | rofi -dmenu -i -p "Resolutions")
|
||||
case $RET in
|
||||
Default) swaymsg reload ;;
|
||||
Wide) swaymsg "
|
||||
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 ${config.displays.d2} enable pos 1680 0 mode 1920x1080@60Hz
|
||||
output ${config.displays.d3} enable pos 0 0 transform 0
|
||||
";;
|
||||
Kill) pkill -9 $XDG_CURRENT_DESKTOP;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Check for command-line arguments
|
||||
if [ "$1" == "--scratchpads" ]; then
|
||||
handle_scratchpads
|
||||
scratchpads
|
||||
elif [ "$1" == "--power" ]; then
|
||||
handle_power
|
||||
elif [ "$1" == "--resolutions" ]; then
|
||||
handle_resolutions
|
||||
power
|
||||
else
|
||||
echo "Please use a valid argument."
|
||||
echo "Please --scratchpads or --power."
|
||||
fi
|
||||
'')
|
||||
rofi-bluetooth
|
||||
|
|
69
modules/home/programs/gui/thunderbird/default.nix
Normal file
69
modules/home/programs/gui/thunderbird/default.nix
Normal file
|
@ -0,0 +1,69 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
Main = {
|
||||
isDefault = true;
|
||||
userContent = ''
|
||||
*{scrollbar-width:none !important}
|
||||
'';
|
||||
settings = {
|
||||
"general.autoScroll" = true;
|
||||
|
||||
"signon.rememberSignons" = false;
|
||||
"signon.autofillForms" = false;
|
||||
|
||||
"security.password_lifetime" = 0;
|
||||
"security.password.useMasterPassword" = false;
|
||||
"security.mixed_content.block_active_content" = true;
|
||||
"security.mixed_content.block_display_content" = true;
|
||||
|
||||
"extensions.enabled" = false;
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"extensions.allow-non-mpc-extensions" = false;
|
||||
"extensions.installDistroAddons" = false;
|
||||
"extensions.getAddons.cache.enabled" = false;
|
||||
"extensions.blocklist.enabled" = true;
|
||||
"extensions.webextensions.userSelection" = false;
|
||||
"extensions.checkCompatibility" = false;
|
||||
"extensions.allowRemoteAddons" = false;
|
||||
"extensions.ui.enabled" = false;
|
||||
"extensions.ui.useSystemTheme" = true;
|
||||
"extensions.activeThemeID" = "thunderbird-compact-dark@mozilla.org";
|
||||
|
||||
"privacy.clearOnShutdown.cookies" = true;
|
||||
"privacy.clearOnShutdown.cache" = true;
|
||||
"privacy.clearOnShutdown.formdata" = true;
|
||||
"privacy.clearOnShutdown.passwords" = true;
|
||||
"privacy.clearOnShutdown.siteSettings" = true;
|
||||
"privacy.trackingprotection.enabled" = true;
|
||||
"privacy.firstparty.isolate" = true;
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"privacy.resistFingerprinting" = true;
|
||||
|
||||
"browser.history.enabled" = false;
|
||||
"browser.sessionstore.privacy_level" = 2;
|
||||
"browser.tabs.warnOnClose" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.urlbar.suggest.openpage" = false;
|
||||
"browser.urlbar.suggest.bookmark" = false;
|
||||
"browser.urlbar.suggest.history" = false;
|
||||
"browser.urlbar.suggest.searches" = false;
|
||||
"browser.urlbar.suggest.topsites" = false;
|
||||
"browser.download.promptForDownload" = true;
|
||||
|
||||
"network.cookie.cookieBehavior" = 1;
|
||||
"network.dns.dnsOverHttps.enabled" = true;
|
||||
"network.http.speculative-parallel-limit" = 0;
|
||||
"network.http.pipelining" = false;
|
||||
"network.predictor.enabled" = false;
|
||||
"network.cookie.lifetimePolicy" = 2;
|
||||
|
||||
"dom.storage.enabled" = false;
|
||||
"dom.indexedDB.enabled" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
28
modules/home/programs/gui/thunderbird/policies.json
Normal file
28
modules/home/programs/gui/thunderbird/policies.json
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"policies": {
|
||||
"OfferToSaveLogins": false,
|
||||
"PasswordManagerEnabled": false,
|
||||
"DisablePasswordReveal": true,
|
||||
"DisableMasterPasswordCreation": true,
|
||||
"Extensions": {
|
||||
"install": false
|
||||
},
|
||||
"ExtensionSettings": {},
|
||||
"BlockAboutAddons": true,
|
||||
"BlockAboutConfig": true,
|
||||
"BlockAboutProfiles": true,
|
||||
"BlockAboutSupport": true,
|
||||
"DisableTelemetry": true,
|
||||
"DisableSafeMode": true,
|
||||
"DisableSecurityBypass": true,
|
||||
"DisableBuiltinPDFViewer": true,
|
||||
"DisableAppUpdate": true,
|
||||
"DNSOverHTTPS": true,
|
||||
"CaptivePortal": false,
|
||||
"PromptForDownloadLocation": true,
|
||||
"NetworkPrediction": false,
|
||||
"SearchEngines": {
|
||||
"PreventInstalls": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
home.packages = with pkgs; [
|
||||
ffmpeg
|
||||
alsa-utils
|
||||
puddletag
|
||||
pulsemixer
|
||||
];
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
home.packages = with pkgs; [
|
||||
vesktop
|
||||
fractal
|
||||
telegram-desktop
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
./launchers
|
||||
./games
|
||||
./emulators
|
||||
./xash3d
|
||||
];
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
ryujinx
|
||||
duckstation
|
||||
pcsx2
|
||||
#unstable.lime3ds
|
||||
lime3ds
|
||||
];
|
||||
}
|
||||
|
|
7
modules/home/programs/misc/gaming/games/default.nix
Normal file
7
modules/home/programs/misc/gaming/games/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
openarena
|
||||
xash3d
|
||||
];
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ xash3d ];
|
||||
}
|
|
@ -1,11 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
imv
|
||||
libreoffice-fresh
|
||||
libreoffice
|
||||
ffmpegthumbnailer
|
||||
thunderbird
|
||||
protonvpn-cli_2
|
||||
imv
|
||||
bc
|
||||
];
|
||||
}
|
||||
|
|
|
@ -5,6 +5,5 @@
|
|||
p7zip
|
||||
vimv
|
||||
dua
|
||||
protonvpn-cli_2
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
{ pkgs, blender-bin, ... }:
|
||||
{ pkgs, blender, ... }:
|
||||
{
|
||||
imports = [ ./obs ];
|
||||
|
||||
nixpkgs.overlays = [ blender.overlays.default ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
krita
|
||||
inkscape
|
||||
audacity
|
||||
blender_4_3
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [ blender-bin.overlays.default ];
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
{
|
||||
home.packages = with pkgs; [
|
||||
moonlight-qt
|
||||
#rustdesk-flutter
|
||||
rustdesk-flutter
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
home.packages = with pkgs; [
|
||||
remmina
|
||||
freerdp
|
||||
zoom-us
|
||||
gpauth
|
||||
];
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
},
|
||||
{
|
||||
"type": "command",
|
||||
"text": "date -d @$(stat -c %W /) '+%a %b %d %r %Z %Y'",
|
||||
"text": "date -d @$(stat -c %W /persist) '+%a %b %d %r %Z %Y'",
|
||||
"key": " "
|
||||
},
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ ./small ];
|
||||
home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc;
|
||||
|
||||
programs.fastfetch.enable = true;
|
||||
home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [ (pkgs.writeScriptBin "pfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc") ];
|
||||
file.".config/fastfetch/small.jsonc".source = ./small.jsonc;
|
||||
packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "pfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc")
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [ ./lazygit ];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Jimbo";
|
||||
userEmail = "jimbo@${config.domains.jim2}";
|
||||
};
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.lazygit.enable = true;
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ mpc-cli ];
|
||||
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
@ -15,8 +17,4 @@
|
|||
};
|
||||
|
||||
services.mpd-discord-rpc.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
mpc-cli
|
||||
];
|
||||
}
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
# Nerdtree
|
||||
nerdtree
|
||||
vim-nerdtree-syntax-highlight
|
||||
|
||||
# Misc languages
|
||||
kdl-vim
|
||||
];
|
||||
extraConfig = ''
|
||||
lua <<EOF
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.ranger = {
|
||||
enable = true;
|
||||
|
@ -13,12 +13,6 @@
|
|||
hidden_filter = ''^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$'';
|
||||
};
|
||||
rifle = [
|
||||
# Text editing
|
||||
{
|
||||
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'';
|
||||
|
@ -82,7 +76,7 @@
|
|||
}
|
||||
{
|
||||
condition = ''label open, has xdg-open'';
|
||||
command = ''xdg-open -- "$@"'';
|
||||
command = ''vim -- "$@"'';
|
||||
}
|
||||
];
|
||||
plugins = [
|
||||
|
@ -104,20 +98,20 @@
|
|||
file = {
|
||||
".local/share/ranger/bookmarks".text = ''
|
||||
# Local files
|
||||
h:/home/jimbo/
|
||||
k:/home/jimbo/Keepers
|
||||
j:/home/jimbo/Downloads
|
||||
v:/home/jimbo/Videos
|
||||
c:/home/jimbo/.config
|
||||
l:/home/jimbo/.local
|
||||
h:/home/${config.home.username}/
|
||||
k:/home/${config.home.username}/Keepers
|
||||
j:/home/${config.home.username}/Downloads
|
||||
v:/home/${config.home.username}/Videos
|
||||
c:/home/${config.home.username}/.config
|
||||
l:/home/${config.home.username}/.local
|
||||
d:/mnt
|
||||
n:/etc/nixos
|
||||
|
||||
# Remote files
|
||||
J:/home/jimbo/JimboNFS
|
||||
K:/home/jimbo/JimboNFS/Files
|
||||
V:/home/jimbo/JimboNFS/Media
|
||||
M:/home/jimbo/JimboNFS/Music
|
||||
J:/home/${config.home.username}/JimboNFS
|
||||
K:/home/${config.home.username}/JimboNFS/Files
|
||||
V:/home/${config.home.username}/JimboNFS/Media
|
||||
M:/home/${config.home.username}/JimboNFS/Music
|
||||
'';
|
||||
};
|
||||
packages = with pkgs; [
|
||||
|
|
|
@ -22,21 +22,20 @@
|
|||
nixscrub = "nixclean; nixpurge; nixoptimize";
|
||||
|
||||
# Shortcut aliases
|
||||
neo = "clear && fastfetch";
|
||||
ff = "clear && fastfetch";
|
||||
ip = "ip -c";
|
||||
ls = "${pkgs.eza}/bin/eza -a --color=always --group-directories-first --icons";
|
||||
nls = "/usr/bin/env ls";
|
||||
cat = "${pkgs.bat}/bin/bat --paging never";
|
||||
ncat = "/usr/bin/env cat";
|
||||
copycat = "wl-copy <";
|
||||
sunshinehost = "WAYLAND_DISPLAY=wayland-1 DISPLAY=:1 sunshine -0";
|
||||
myip = "curl ifconfig.co";
|
||||
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
|
||||
};
|
||||
initExtra = ''
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch
|
||||
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
||||
source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt RM_STAR_WAIT
|
||||
'';
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
MANPAGER = "nvim +Man!";
|
||||
LIBVIRT_DEFAULT_URI = "qemu:///system";
|
||||
HISTCONTROL = "ignoreboth";
|
||||
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||
NIXPKGS_ALLOW_UNFREE = 1;
|
||||
};
|
||||
};
|
|
@ -1,8 +1,28 @@
|
|||
{ ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
options.home = {
|
||||
sway.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable SwayWM";
|
||||
};
|
||||
|
||||
niri = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable SwayWM";
|
||||
};
|
||||
settings = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./niri
|
||||
./programs
|
||||
./sway
|
||||
./swaylock
|
||||
./waybar
|
||||
];
|
||||
}
|
||||
|
|
23
modules/home/wms/niri/autostart/default.nix
Normal file
23
modules/home/wms/niri/autostart/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
config.home.niri.settings.autostart = pkgs.writeText "autostart" ''
|
||||
// Everpresent bar
|
||||
spawn-at-startup "waybar"
|
||||
|
||||
// Daemons and tray apps
|
||||
spawn-at-startup "hyprpaper"
|
||||
spawn-at-startup "wl-paste" "-t" "text" "--watch" "clipman" "store" "-P"
|
||||
spawn-at-startup "wl-copy"
|
||||
spawn-at-startup "mako"
|
||||
spawn-at-startup "sunshine"
|
||||
spawn-at-startup "xwayland-satellite"
|
||||
spawn-at-startup "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
|
||||
|
||||
// Foreground apps
|
||||
spawn-at-startup "librewolf" "-p" "Misc" "--name" "MiscBrowser"
|
||||
spawn-at-startup "vesktop"
|
||||
spawn-at-startup "fractal"
|
||||
spawn-at-startup "telegram-desktop"
|
||||
spawn-at-startup "thunderbird"
|
||||
'';
|
||||
}
|
21
modules/home/wms/niri/default.nix
Normal file
21
modules/home/wms/niri/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./autostart
|
||||
./hotkeys
|
||||
./inputs
|
||||
./outputs
|
||||
./programs
|
||||
./rules
|
||||
./theme
|
||||
];
|
||||
|
||||
home.file.".config/niri/config.kdl".text = ''
|
||||
${builtins.readFile config.home.niri.settings.autostart}
|
||||
${builtins.readFile config.home.niri.settings.hotkeys}
|
||||
${builtins.readFile config.home.niri.settings.inputs}
|
||||
${builtins.readFile config.home.niri.settings.outputs}
|
||||
${builtins.readFile config.home.niri.settings.rules}
|
||||
${builtins.readFile config.home.niri.settings.theme}
|
||||
'';
|
||||
}
|
151
modules/home/wms/niri/hotkeys/default.nix
Normal file
151
modules/home/wms/niri/hotkeys/default.nix
Normal file
|
@ -0,0 +1,151 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
config.home.niri.settings.hotkeys = let
|
||||
primeMod = "Mod";
|
||||
secMod = "Alt";
|
||||
resizeAmount = "5";
|
||||
in pkgs.writeText "hotkeys" ''
|
||||
binds {
|
||||
//// Launchers
|
||||
|
||||
// Browser
|
||||
${primeMod}+F1 { spawn "sh" "-c" "librewolf -p Main --name MainBrowser | notify-send \"Main Browser\""; }
|
||||
${primeMod}+F2 { spawn "sh" "-c" "librewolf -p Alt --name AltBrowser | notify-send \"Alternate Browser\""; }
|
||||
${primeMod}+F3 { spawn "sh" "-c" "librewolf -p Misc --name MiscBrowser | notify-send \"Miscellaneous Browser\""; }
|
||||
|
||||
// Virtual machines
|
||||
${primeMod}+F4 { spawn "sh" "-c" "virt-manager | notify-send \"Virtual Machines\""; }
|
||||
${primeMod}+F5 { spawn "sh" "-c" "looking-glass-client input:rawMouse=yes | notify-send \"Looking Glass\""; }
|
||||
|
||||
// ${primeMod} + key
|
||||
${primeMod}+s { spawn "sh" "-c" "rofi -show run -p Command"; }
|
||||
${primeMod}+c { spawn "sh" "-c" "clipman pick -t rofi"; }
|
||||
${primeMod}+x { spawn "sh" "-c" "rofiscripts --power"; }
|
||||
${primeMod}+b { spawn "sh" "-c" "pkill -USR1 waybar"; }
|
||||
${primeMod}+Return { spawn "sh" "-c" "foot"; }
|
||||
|
||||
// ${primeMod} + shift + key
|
||||
${primeMod}+Shift+s { spawn "sh" "-c" "rofi -show drun -modi drun -drun-display-format {name} -show-icons -disable-history"; }
|
||||
${primeMod}+Shift+t { spawn "sh" "-c" "pcmanfm"; }
|
||||
${primeMod}+Shift+e { spawn "sh" "-c" "bemoji -n -P 0"; }
|
||||
${primeMod}+Shift+b { spawn "sh" "-c" "rofi-bluetooth"; }
|
||||
${primeMod}+Shift+Return { spawn "sh" "-c" "foot ranger"; }
|
||||
|
||||
// ${primeMod} + ctrl + key
|
||||
${primeMod}+Ctrl+s { spawn "sh" "-c" "rofiscripts --scratchpads"; }
|
||||
${primeMod}+Ctrl+c { spawn "sh" "-c" "wlpicker && notify-send \"Color copied to clipboard\""; }
|
||||
|
||||
//// Media
|
||||
|
||||
// Volume
|
||||
${secMod}+j { spawn "sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"; }
|
||||
${secMod}+k { spawn "sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"; }
|
||||
|
||||
// MPD
|
||||
${primeMod}+Backslash { spawn "sh" "-c" "mpc toggle"; }
|
||||
${secMod}+Shift+h { spawn "sh" "-c" "mpc prev"; }
|
||||
${secMod}+Shift+j { spawn "sh" "-c" "mpc volume -3"; }
|
||||
${secMod}+Shift+k { spawn "sh" "-c" "mpc volume +3"; }
|
||||
${secMod}+Shift+l { spawn "sh" "-c" "mpc next"; }
|
||||
|
||||
//// Miscellaneous
|
||||
|
||||
// Notifications
|
||||
${primeMod}+n { spawn "sh" "-c" "makotoggle"; }
|
||||
${primeMod}+Shift+n { spawn "sh" "-c" "makoctl restore"; }
|
||||
${primeMod}+Ctrl+n { spawn "sh" "-c" "makoctl dismiss -a"; }
|
||||
|
||||
// Screenshots
|
||||
${secMod}+F { screenshot; }
|
||||
${secMod}+Shift+F { screenshot-screen; }
|
||||
${secMod}+Ctrl+F { screenshot-window; }
|
||||
|
||||
// Display and keyboard brightness
|
||||
${primeMod}+equal { spawn "sh" "-c" "light -A 5"; }
|
||||
${primeMod}+minus { spawn "sh" "-c" "light -U 5"; }
|
||||
${primeMod}+Shift+equal { spawn "sh" "-c" "light -A 1"; }
|
||||
${primeMod}+Shift+minus { spawn "sh" "-c" "light -U 1"; }
|
||||
XF86KbdBrightnessUp { spawn "sh" "-c" "light -s sysfs/leds/smc::kbd_backlight -A 5"; }
|
||||
XF86KbdBrightnessDown { spawn "sh" "-c" "light -s sysfs/leds/smc::kbd_backlight -U 5"; }
|
||||
|
||||
//// Window manager
|
||||
${primeMod}+q { close-window; }
|
||||
|
||||
// Switch to workspaces
|
||||
${primeMod}+grave { focus-workspace "${config.ws.w0}"; }
|
||||
${primeMod}+1 { focus-workspace "${config.ws.w1}"; }
|
||||
${primeMod}+2 { focus-workspace "${config.ws.w2}"; }
|
||||
${primeMod}+3 { focus-workspace "${config.ws.w3}"; }
|
||||
${primeMod}+4 { focus-workspace "${config.ws.w4}"; }
|
||||
${primeMod}+5 { focus-workspace "${config.ws.w5}"; }
|
||||
${primeMod}+6 { focus-workspace "${config.ws.w6}"; }
|
||||
${primeMod}+7 { focus-workspace "${config.ws.w7}"; }
|
||||
${primeMod}+8 { focus-workspace "${config.ws.w8}"; }
|
||||
${primeMod}+9 { focus-workspace "${config.ws.w9}"; }
|
||||
|
||||
// Switch to alternate workspaces
|
||||
${secMod}+F1 { focus-workspace "${config.ws.w1a}"; }
|
||||
${secMod}+F2 { focus-workspace "${config.ws.w2a}"; }
|
||||
${secMod}+F3 { focus-workspace "${config.ws.w3a}"; }
|
||||
${secMod}+F4 { focus-workspace "${config.ws.w4a}"; }
|
||||
${secMod}+F5 { focus-workspace "${config.ws.w5a}"; }
|
||||
${secMod}+F6 { focus-workspace "${config.ws.w6a}"; }
|
||||
${secMod}+F7 { focus-workspace "${config.ws.w7a}"; }
|
||||
${secMod}+F8 { focus-workspace "${config.ws.w8a}"; }
|
||||
${secMod}+F9 { focus-workspace "${config.ws.w9a}"; }
|
||||
|
||||
// Move window to and focus workspace
|
||||
${primeMod}+Shift+grave { move-window-to-workspace "${config.ws.w0}"; }
|
||||
${primeMod}+Shift+1 { move-window-to-workspace "${config.ws.w1}"; }
|
||||
${primeMod}+Shift+2 { move-window-to-workspace "${config.ws.w2}"; }
|
||||
${primeMod}+Shift+3 { move-window-to-workspace "${config.ws.w3}"; }
|
||||
${primeMod}+Shift+4 { move-window-to-workspace "${config.ws.w4}"; }
|
||||
${primeMod}+Shift+5 { move-window-to-workspace "${config.ws.w5}"; }
|
||||
${primeMod}+Shift+6 { move-window-to-workspace "${config.ws.w6}"; }
|
||||
${primeMod}+Shift+7 { move-window-to-workspace "${config.ws.w7}"; }
|
||||
${primeMod}+Shift+8 { move-window-to-workspace "${config.ws.w8}"; }
|
||||
${primeMod}+Shift+9 { move-window-to-workspace "${config.ws.w9}"; }
|
||||
|
||||
// Move window to and focus workspace
|
||||
${secMod}+Shift+F1 { move-window-to-workspace "${config.ws.w1a}"; }
|
||||
${secMod}+Shift+F2 { move-window-to-workspace "${config.ws.w2a}"; }
|
||||
${secMod}+Shift+F3 { move-window-to-workspace "${config.ws.w3a}"; }
|
||||
${secMod}+Shift+F4 { move-window-to-workspace "${config.ws.w4a}"; }
|
||||
${secMod}+Shift+F5 { move-window-to-workspace "${config.ws.w5a}"; }
|
||||
${secMod}+Shift+F6 { move-window-to-workspace "${config.ws.w6a}"; }
|
||||
${secMod}+Shift+F7 { move-window-to-workspace "${config.ws.w7a}"; }
|
||||
${secMod}+Shift+F8 { move-window-to-workspace "${config.ws.w8a}"; }
|
||||
${secMod}+Shift+F9 { move-window-to-workspace "${config.ws.w9a}"; }
|
||||
|
||||
// Change focused window
|
||||
${primeMod}+h { focus-column-or-monitor-left; }
|
||||
${primeMod}+j { focus-window-down; }
|
||||
${primeMod}+k { focus-window-up; }
|
||||
${primeMod}+l { focus-column-or-monitor-right; }
|
||||
|
||||
// Move focused window
|
||||
${primeMod}+Shift+h { move-column-left-or-to-monitor-left; }
|
||||
${primeMod}+Shift+j { move-window-down; }
|
||||
${primeMod}+Shift+k { move-window-up; }
|
||||
${primeMod}+Shift+l { move-column-right-or-to-monitor-right; }
|
||||
|
||||
// Resize window
|
||||
${primeMod}+${secMod}+h { set-column-width "-${resizeAmount}%"; }
|
||||
${primeMod}+${secMod}+j { set-window-height "-${resizeAmount}%"; }
|
||||
${primeMod}+${secMod}+k { set-window-height "+${resizeAmount}%"; }
|
||||
${primeMod}+${secMod}+l { set-column-width "+${resizeAmount}%"; }
|
||||
|
||||
// There are also commands that consume or expel a single window to the side.
|
||||
${primeMod}+Ctrl+h { consume-or-expel-window-left; }
|
||||
${primeMod}+Ctrl+l { consume-or-expel-window-right; }
|
||||
|
||||
// Toggle fullscreen
|
||||
${primeMod}+f { maximize-column; }
|
||||
${primeMod}+Shift+f { fullscreen-window; }
|
||||
|
||||
// Niri specific
|
||||
${primeMod}+Shift+r { reset-window-height; }
|
||||
${primeMod}+Shift+c { center-column; }
|
||||
}
|
||||
'';
|
||||
}
|
20
modules/home/wms/niri/inputs/default.nix
Normal file
20
modules/home/wms/niri/inputs/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
config.home.niri.settings.inputs = pkgs.writeText "inputs" ''
|
||||
input {
|
||||
mouse {
|
||||
accel-profile "flat"
|
||||
accel-speed -0.9
|
||||
}
|
||||
touchpad {
|
||||
accel-profile "flat"
|
||||
scroll-method "two-finger"
|
||||
}
|
||||
trackpoint {
|
||||
off
|
||||
}
|
||||
warp-mouse-to-focus
|
||||
focus-follows-mouse
|
||||
}
|
||||
'';
|
||||
}
|
88
modules/home/wms/niri/outputs/default.nix
Normal file
88
modules/home/wms/niri/outputs/default.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
config.home.niri.settings.outputs = pkgs.writeText "outputs" ''
|
||||
// Workspace 1
|
||||
workspace "${config.ws.w0}" {
|
||||
open-on-output "${config.displays.d1}"
|
||||
}
|
||||
workspace "${config.ws.w1}" {
|
||||
open-on-output "${config.displays.d1}"
|
||||
}
|
||||
workspace "${config.ws.w2}" {
|
||||
open-on-output "${config.displays.d1}"
|
||||
}
|
||||
workspace "${config.ws.w3}" {
|
||||
open-on-output "${config.displays.d1}"
|
||||
}
|
||||
workspace "${config.ws.w1a}" {
|
||||
open-on-output "${config.displays.d1}"
|
||||
}
|
||||
workspace "${config.ws.w2a}" {
|
||||
open-on-output "${config.displays.d1}"
|
||||
}
|
||||
workspace "${config.ws.w3a}" {
|
||||
open-on-output "${config.displays.d1}"
|
||||
}
|
||||
|
||||
// Workspace 2
|
||||
workspace "${config.ws.w4}" {
|
||||
open-on-output "${config.displays.d2}"
|
||||
}
|
||||
workspace "${config.ws.w5}" {
|
||||
open-on-output "${config.displays.d2}"
|
||||
}
|
||||
workspace "${config.ws.w6}" {
|
||||
open-on-output "${config.displays.d2}"
|
||||
}
|
||||
workspace "${config.ws.w4a}" {
|
||||
open-on-output "${config.displays.d2}"
|
||||
}
|
||||
workspace "${config.ws.w5a}" {
|
||||
open-on-output "${config.displays.d2}"
|
||||
}
|
||||
|
||||
// Workspace 3
|
||||
workspace "${config.ws.w7}" {
|
||||
open-on-output "${config.displays.d3}"
|
||||
}
|
||||
workspace "${config.ws.w8}" {
|
||||
open-on-output "${config.displays.d3}"
|
||||
}
|
||||
workspace "${config.ws.w9}" {
|
||||
open-on-output "${config.displays.d3}"
|
||||
}
|
||||
workspace "${config.ws.w7a}" {
|
||||
open-on-output "${config.displays.d3}"
|
||||
}
|
||||
workspace "${config.ws.w8a}" {
|
||||
open-on-output "${config.displays.d3}"
|
||||
}
|
||||
|
||||
// Workspace 4
|
||||
workspace "${config.ws.w6a}" {
|
||||
open-on-output "${config.displays.d4}"
|
||||
}
|
||||
workspace "${config.ws.w9a}" {
|
||||
open-on-output "${config.displays.d4}"
|
||||
}
|
||||
|
||||
// Monitors
|
||||
output "${config.displays.d1}" {
|
||||
mode "1920x1080@143.980"
|
||||
position x=3840 y=405
|
||||
}
|
||||
output "${config.displays.d2}" {
|
||||
mode "1920x1080@60"
|
||||
position x=1920 y=405
|
||||
}
|
||||
output "${config.displays.d3}" {
|
||||
mode "1680x1050@59.883"
|
||||
transform "90"
|
||||
position x=5760 y=0
|
||||
}
|
||||
output "${config.displays.d4}" {
|
||||
mode "1920x1080@60"
|
||||
position x=0 y=405
|
||||
}
|
||||
'';
|
||||
}
|
6
modules/home/wms/niri/programs/default.nix
Normal file
6
modules/home/wms/niri/programs/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./sleep-niri
|
||||
];
|
||||
}
|
10
modules/home/wms/niri/programs/sleep-niri/default.nix
Normal file
10
modules/home/wms/niri/programs/sleep-niri/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "sleep-niri" ''
|
||||
swaylock & ${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 1 'niri msg action power-off-monitors' \
|
||||
resume 'niri msg action power-on-monitors; pkill -9 swayidle'
|
||||
'')
|
||||
];
|
||||
}
|
59
modules/home/wms/niri/rules/default.nix
Normal file
59
modules/home/wms/niri/rules/default.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
config.home.niri.settings.rules = pkgs.writeText "rules" ''
|
||||
// Browsers
|
||||
window-rule {
|
||||
match app-id="MainBrowser"
|
||||
open-on-workspace "${config.ws.w1}"
|
||||
}
|
||||
window-rule {
|
||||
match app-id="AltBrowser"
|
||||
open-on-workspace "${config.ws.w1a}"
|
||||
}
|
||||
|
||||
// Communication
|
||||
window-rule {
|
||||
match app-id="MiscBrowser"
|
||||
match app-id="vesktop"
|
||||
block-out-from "screencast"
|
||||
open-on-workspace "${config.ws.w7}"
|
||||
}
|
||||
window-rule {
|
||||
match app-id="org.gnome.Fractal"
|
||||
match app-id="org.telegram.desktop"
|
||||
open-on-workspace "${config.ws.w8}"
|
||||
}
|
||||
window-rule {
|
||||
match app-id="thunderbird"
|
||||
open-maximized true
|
||||
open-on-workspace "${config.ws.w9}"
|
||||
}
|
||||
|
||||
// Etc
|
||||
window-rule {
|
||||
match app-id="looking-glass-client"
|
||||
open-on-workspace "${config.ws.w2a}"
|
||||
}
|
||||
window-rule {
|
||||
match app-id="com.obsproject.Studio"
|
||||
open-on-workspace "${config.ws.w4a}"
|
||||
}
|
||||
|
||||
//// Layer rules (Uncomment after 0.1.11)
|
||||
//layer-rule {
|
||||
// match namespace="^notifications$"
|
||||
// block-out-from "screencast"
|
||||
//}
|
||||
|
||||
// Everything else
|
||||
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||
|
||||
hotkey-overlay {
|
||||
skip-at-startup
|
||||
}
|
||||
|
||||
environment {
|
||||
DISPLAY ":0"
|
||||
}
|
||||
'';
|
||||
}
|
22
modules/home/wms/niri/theme/default.nix
Normal file
22
modules/home/wms/niri/theme/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
config.home.niri.settings.theme = pkgs.writeText "theme" ''
|
||||
prefer-no-csd
|
||||
|
||||
layout {
|
||||
gaps 7
|
||||
center-focused-column "never"
|
||||
default-column-width { proportion 0.5; }
|
||||
|
||||
focus-ring {
|
||||
off
|
||||
}
|
||||
|
||||
border {
|
||||
width 3
|
||||
active-color "#${config.look.colors.prime}"
|
||||
inactive-color "#${config.look.colors.split}"
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
22
modules/home/wms/programs/default.nix
Normal file
22
modules/home/wms/programs/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hyprpaper
|
||||
./mako
|
||||
./swaylock
|
||||
./waybar
|
||||
./wlpicker
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
clipman
|
||||
hyprpicker
|
||||
libnotify
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
wdisplays
|
||||
xwayland-satellite
|
||||
jq
|
||||
];
|
||||
}
|
21
modules/home/wms/programs/hyprpaper/default.nix
Normal file
21
modules/home/wms/programs/hyprpaper/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ hyprpaper ];
|
||||
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
splash = false;
|
||||
preload = [
|
||||
"~/.assets/wallpapers/1.png"
|
||||
"~/.assets/wallpapers/2.png"
|
||||
"~/.assets/wallpapers/3.png"
|
||||
];
|
||||
wallpaper = [
|
||||
",~/.assets/wallpapers/1.png"
|
||||
"${config.displays.d2},~/.assets/wallpapers/2.png"
|
||||
"${config.displays.d3},~/.assets/wallpapers/3.png"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
28
modules/home/wms/programs/mako/default.nix
Normal file
28
modules/home/wms/programs/mako/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./makotoggle
|
||||
];
|
||||
|
||||
services.mako = {
|
||||
enable = true;
|
||||
borderColor = "#${config.look.colors.accent}";
|
||||
backgroundColor = "#${config.look.colors.dark}D9";
|
||||
output = "${config.displays.d1}";
|
||||
sort = "+time";
|
||||
layer = "overlay";
|
||||
padding = "8";
|
||||
margin = "0";
|
||||
borderSize = config.look.border.int;
|
||||
maxIconSize = 40;
|
||||
defaultTimeout = 4500;
|
||||
font = "${config.look.fonts.main} 12";
|
||||
anchor = "bottom-right";
|
||||
extraConfig = ''
|
||||
on-button-right=dismiss-all
|
||||
outer-margin=10
|
||||
[mode=do-not-disturb]
|
||||
invisible=1
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,27 +1,5 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
borderColor = "#${config.look.colors.accent}";
|
||||
backgroundColor = "#${config.look.colors.dark}D9";
|
||||
output = "${config.displays.d1}";
|
||||
sort = "+time";
|
||||
layer = "overlay";
|
||||
padding = "8";
|
||||
margin = "0";
|
||||
borderSize = config.look.border.int;
|
||||
maxIconSize = 40;
|
||||
defaultTimeout = 6000;
|
||||
font = "${config.look.fonts.main} 12";
|
||||
anchor = "bottom-right";
|
||||
extraConfig = ''
|
||||
on-button-right=dismiss-all
|
||||
outer-margin=10
|
||||
[mode=do-not-disturb]
|
||||
invisible=1
|
||||
'';
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "makotoggle" ''
|
||||
# Run makoctl mode and store the output in a variable
|
|
@ -8,7 +8,7 @@ let
|
|||
text = "#FFFFFFFF";
|
||||
in {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
enable = config.home.desktop.enable;
|
||||
package = pkgs.swaylock-effects;
|
||||
settings = {
|
||||
clock = true;
|
|
@ -1,8 +1,9 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.waybar = let
|
||||
swayWorkspacesModule = {
|
||||
swayWorkspaceModule = {
|
||||
format = "{name}";
|
||||
sort-by-number = true;
|
||||
enable-bar-scroll = true;
|
||||
warp-on-scroll = false;
|
||||
disable-scroll-wraparound = true;
|
||||
|
@ -32,18 +33,24 @@
|
|||
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
|
||||
# Monitoring
|
||||
cpuModule = {
|
||||
format = " {usage}%";
|
||||
interval = 3;
|
||||
};
|
||||
|
||||
ramModule = {
|
||||
format = " {used}G";
|
||||
tooltip = false;
|
||||
interval = 3;
|
||||
};
|
||||
|
||||
vramModule = {
|
||||
exec = pkgs.writeScript "vramScript" ''
|
||||
# Don't run the script if running on integrated graphics
|
||||
|
@ -56,7 +63,7 @@
|
|||
|
||||
elif [ "$gpu_driver" == "amdgpu" ]; then
|
||||
vram_usage_mb=$(echo "$(cat /sys/class/drm/card0/device/mem_info_vram_used || cat /sys/class/drm/card1/device/mem_info_vram_used) / 1024 / 1024" | bc)
|
||||
temperature=$(sensors | grep 'edge' | awk '{print $2}' | sed 's/[^0-9.-]//g')
|
||||
temperature=$(${pkgs.lm_sensors}/bin/sensors | grep 'edge' | awk '{print $2}' | sed 's/[^0-9.-]//g')
|
||||
fi
|
||||
|
||||
# Check if VRAM usage is under 1GB
|
||||
|
@ -80,7 +87,6 @@
|
|||
# Clocks
|
||||
longClockModule = {
|
||||
exec = pkgs.writeScript "longClock" ''
|
||||
# Long clock format, with a numeric date and military time tooltip
|
||||
time=$(date +'%a %b %d %l:%M:%S%p' | tr -s ' ')
|
||||
date=$(date "+%Y-%m-%d")
|
||||
echo "{\"text\":\" $time\",\"tooltip\":\"$date\"}"
|
||||
|
@ -91,6 +97,7 @@
|
|||
interval = 1;
|
||||
tooltip = true;
|
||||
};
|
||||
|
||||
shortClockModule = {
|
||||
exec = "echo ' '$(date +'%l:%M%p' | sed 's/^ //')";
|
||||
on-click = ''wl-copy $(date "+%Y-%m-%d-%H%M%S"); notify-send "Date copied."'';
|
||||
|
@ -98,10 +105,9 @@
|
|||
tooltip = false;
|
||||
};
|
||||
|
||||
# Tray, gamemode, bluetooth, and network tray modules
|
||||
trayModule = {
|
||||
spacing = 5;
|
||||
};
|
||||
# Misc
|
||||
trayModule.spacing = 5;
|
||||
|
||||
networkModule = {
|
||||
format-ethernet = "";
|
||||
format-wifi = "";
|
||||
|
@ -111,6 +117,7 @@
|
|||
tooltip-format-wifi = "{ipaddr}\n{essid} ({signalStrength}%)";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
};
|
||||
|
||||
bluetoothModule = {
|
||||
format = "";
|
||||
format-disabled = "";
|
||||
|
@ -121,56 +128,36 @@
|
|||
tooltip-format-enumerate-connected-battery = "{device_alias} {device_battery_percentage}%";
|
||||
on-click = "rofi-bluetooth";
|
||||
};
|
||||
|
||||
scratchpadModule = {
|
||||
format = " {count}";
|
||||
show-empty = false;
|
||||
tooltip = true;
|
||||
tooltip-format = "{title}";
|
||||
};
|
||||
|
||||
gamemodeModule = {
|
||||
format = "{glyph}";
|
||||
glyph = "";
|
||||
hide-not-running = true;
|
||||
use-icon = true;
|
||||
icon-spacing = 3;
|
||||
icon-size = 19;
|
||||
icon-spacing = 3;
|
||||
tooltip = true;
|
||||
tooltip-format = "Gamemode On";
|
||||
};
|
||||
|
||||
# Special per-bar modules
|
||||
privacyModule = {
|
||||
icon-spacing = 5;
|
||||
icon-size = 15;
|
||||
};
|
||||
|
||||
mediaModule = {
|
||||
exec-if = "mpc status | grep -q '^\\[playing\\] \\|^\\[paused\\]'";
|
||||
exec = pkgs.writeScript "mpvMetadata" ''
|
||||
get_metadata() {
|
||||
mpc | head -n 1
|
||||
}
|
||||
|
||||
truncate_string() {
|
||||
local str="$1"
|
||||
local max_length=30
|
||||
if [ $(expr length "$str") -gt $max_length ]; then
|
||||
str=$(expr substr "$str" 1 $max_length)...
|
||||
fi
|
||||
echo "$str"
|
||||
}
|
||||
|
||||
if mpc status 2>/dev/null | grep -q playing; then
|
||||
song_name=$(get_metadata | awk -F ' - ' '{print $2}')
|
||||
if [ -z "$song_name" ]; then
|
||||
song_name=$(get_metadata)
|
||||
fi
|
||||
echo "{\"text\":\"$(truncate_string " $song_name")\",\"tooltip\":\"$(get_metadata)\"}"
|
||||
elif mpc status 2>/dev/null | grep -q paused; then
|
||||
artist_name=$(get_metadata | awk -F ' - ' '{print $1}')
|
||||
if [ -z "$artist_name" ]; then
|
||||
artist_name=$(get_metadata)
|
||||
fi
|
||||
echo "{\"text\":\"$(truncate_string " $artist_name")\",\"tooltip\":\"$(get_metadata)\",\"class\":\"paused\"}"
|
||||
fi
|
||||
'';
|
||||
format = "{}";
|
||||
return-type = "json";
|
||||
format = " {title}";
|
||||
format-paused = " {artist}";
|
||||
format-stopped = "";
|
||||
format-disconnected = "";
|
||||
tooltip-format = "{artist} - {title}";
|
||||
interval = 2;
|
||||
max-length = 30;
|
||||
on-click = "mpc toggle";
|
||||
|
@ -195,40 +182,19 @@
|
|||
interval = 2;
|
||||
on-click = "makotoggle";
|
||||
};
|
||||
weatherModule = {
|
||||
exec = let
|
||||
weatherConf = pkgs.writeText "weather.jsonc" ''
|
||||
{
|
||||
"logo": {
|
||||
"source": "none"
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"type": "weather",
|
||||
"outputFormat": "%0A%t%0A%C%0A%l"
|
||||
}
|
||||
]
|
||||
}
|
||||
'';
|
||||
in pkgs.writeScript "weatherScript" ''
|
||||
# Fetch weather data
|
||||
fetch=$(fastfetch -c ${weatherConf} | sed 's/[[:space:]]*$//')
|
||||
temp=$(echo "$fetch" | sed -n '2s/^\+//p')
|
||||
condition=$(echo "$fetch" | sed -n '3p')
|
||||
location=$(echo "$fetch" | sed -n '4p')
|
||||
|
||||
# Display weather emoji and temperature
|
||||
echo {\"text\":\" $temp\",\"tooltip\":\"$location: $condition\"}
|
||||
'';
|
||||
format = "<span font_size='11pt'>{}</span>";
|
||||
weatherModule = {
|
||||
exec = "${pkgs.wttrbar}/bin/wttrbar --ampm";
|
||||
format = "{}°";
|
||||
tooltip = true;
|
||||
return-type = "json";
|
||||
interval = 150;
|
||||
interval = 3600;
|
||||
};
|
||||
|
||||
# Laptop modules
|
||||
backlightModule = {
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = ["" ""];
|
||||
format-icons = [ "" "" ];
|
||||
tooltip = false;
|
||||
};
|
||||
batteryModule = {
|
||||
|
@ -238,17 +204,25 @@
|
|||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
enable = config.home.desktop.enable;
|
||||
settings = {
|
||||
display1 = {
|
||||
name = "bar1";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
output = [ config.displays.d1 "VGA-1" ];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
layer = "top";
|
||||
output = [
|
||||
config.displays.d1
|
||||
"VGA-1"
|
||||
];
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
|
@ -257,18 +231,21 @@
|
|||
"custom/clock-long"
|
||||
"gamemode"
|
||||
"sway/scratchpad"
|
||||
"privacy"
|
||||
"tray"
|
||||
"bluetooth"
|
||||
"network"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"niri/window" = swayWindowsModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
"custom/vram" = vramModule;
|
||||
"custom/clock-long" = longClockModule;
|
||||
"gamemode" = gamemodeModule;
|
||||
"privacy" = privacyModule;
|
||||
"sway/scratchpad" = scratchpadModule;
|
||||
"tray" = trayModule;
|
||||
"bluetooth" = bluetoothModule;
|
||||
|
@ -277,22 +254,28 @@
|
|||
display2 = {
|
||||
name = "bar2";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
layer = "top";
|
||||
output = [ config.displays.d2 ];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"custom/media"
|
||||
"mpd"
|
||||
"custom/notifs"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-long"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"niri/window" = swayWindowsModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"custom/media" = mediaModule;
|
||||
"mpd" = mediaModule;
|
||||
"custom/notifs" = notificationModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
|
@ -302,9 +285,14 @@
|
|||
display3 = {
|
||||
name = "bar3";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
layer = "top";
|
||||
output = [ config.displays.d3 ];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"custom/weather"
|
||||
|
@ -313,8 +301,9 @@
|
|||
"custom/vram"
|
||||
"custom/clock-short"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"niri/window" = swayWindowsModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"custom/weather" = weatherModule;
|
||||
"cpu" = cpuModule;
|
||||
|
@ -326,11 +315,21 @@
|
|||
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"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"custom/media"
|
||||
"mpd"
|
||||
"custom/notifs"
|
||||
"custom/weather2"
|
||||
"cpu"
|
||||
|
@ -345,10 +344,11 @@
|
|||
"bluetooth"
|
||||
"network"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"niri/window" = swayWindowsModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"custom/media" = mediaModule;
|
||||
"mpd" = mediaModule;
|
||||
"custom/notifs" = notificationModule;
|
||||
"custom/weather2" = weatherModule;
|
||||
"cpu" = cpuModule;
|
||||
|
@ -397,7 +397,7 @@
|
|||
border-bottom: 3px solid transparent;
|
||||
min-width: 20px;
|
||||
}
|
||||
#workspaces button.visible {
|
||||
#workspaces button.visible, #workspaces button.active {
|
||||
border-bottom: 3px solid #${config.look.colors.prime};
|
||||
background: #${config.look.colors.mid};
|
||||
}
|
||||
|
@ -411,7 +411,7 @@
|
|||
#scratchpad {
|
||||
margin-left: 2px;
|
||||
}
|
||||
#cpu, #memory, #custom-vram, #custom-media, #custom-clock-long, #custom-clock-short, #backlight, #battery, #custom-weather, #custom-weather2, #custom-notifs {
|
||||
#cpu, #memory, #custom-vram, #mpd, #custom-clock-long, #custom-clock-short, #backlight, #battery, #custom-weather, #custom-weather2, #custom-notifs {
|
||||
margin: 0 5px 0 2px;
|
||||
}
|
||||
#cpu {
|
||||
|
@ -423,9 +423,12 @@
|
|||
#custom-vram {
|
||||
border-bottom: 3px solid #33FF00;
|
||||
}
|
||||
#custom-media {
|
||||
#mpd {
|
||||
border-bottom: 3px solid #ffb066;
|
||||
}
|
||||
#mpd.paused {
|
||||
color: #888;
|
||||
}
|
||||
#custom-clock-long {
|
||||
border-bottom: 3px solid #0a6cf5;
|
||||
}
|
||||
|
@ -438,9 +441,6 @@
|
|||
#battery {
|
||||
border-bottom: 3px solid #fcfc16;
|
||||
}
|
||||
#custom-media.paused {
|
||||
color: #888;
|
||||
}
|
||||
#custom-weather {
|
||||
border-bottom: 3px solid #3823C4;
|
||||
}
|
15
modules/home/wms/programs/wlpicker/default.nix
Normal file
15
modules/home/wms/programs/wlpicker/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "wlpicker" ''
|
||||
# Get color position
|
||||
position=$(slurp -b 00000000 -p)
|
||||
|
||||
# Sleep to prevet grim always returning improper color
|
||||
sleep 1
|
||||
|
||||
# Store the hex color value using imagemagick
|
||||
grim -g "$position" -t png - | convert - -format '%[pixel:p{0,0}]' txt:- | tail -n 1 | cut -d ' ' -f 4 | wl-copy -n
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -4,28 +4,25 @@
|
|||
bars = [{ command = "waybar"; }];
|
||||
|
||||
startup = [
|
||||
# Lock on startup
|
||||
{ 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"; }
|
||||
|
||||
# Daemons and tray apps
|
||||
{ command = "hyprpaper"; }
|
||||
{ command = "wl-paste -t text --watch clipman store -P"; }
|
||||
{ command = "wl-copy"; }
|
||||
{ command = "mako"; }
|
||||
{ command = "sunshine"; }
|
||||
|
||||
# Polkit agent
|
||||
{ command = "xwayland-satellite"; }
|
||||
{ command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; }
|
||||
|
||||
# Foreground apps
|
||||
{ command = "librewolf -P Misc --name=MiscBrowser"; }
|
||||
{ command = "vesktop"; }
|
||||
{ command = "fractal"; }
|
||||
{ command = "telegram-desktop"; }
|
||||
{ command = "thunderbird"; }
|
||||
];
|
||||
};
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
{
|
||||
imports = [
|
||||
./autostart
|
||||
./hardware
|
||||
./hotkeys
|
||||
./inputs
|
||||
./outputs
|
||||
./programs
|
||||
./rules
|
||||
./swayshot
|
||||
./swaysleep
|
||||
./theme
|
||||
];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
enable = config.home.sway.enable;
|
||||
package = null;
|
||||
wrapperFeatures.gtk = true;
|
||||
checkConfig = false;
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
wayland.windowManager.sway.config = {
|
||||
# Define monitors
|
||||
output = {
|
||||
${config.displays.d1} = {
|
||||
pos = "3840 405";
|
||||
mode = "1920x1080@143.980Hz";
|
||||
max_render_time = "3";
|
||||
bg = "~/.assets/wallpapers/1.png fill";
|
||||
adaptive_sync = "on";
|
||||
};
|
||||
${config.displays.d2} = {
|
||||
pos = "1920 405";
|
||||
mode = "1920x1080@60Hz";
|
||||
max_render_time = "3";
|
||||
bg = "~/.assets/wallpapers/2.png fill";
|
||||
};
|
||||
${config.displays.d3} = {
|
||||
pos = "5760 0";
|
||||
mode = "1680x1050@59.883Hz";
|
||||
transform = "270";
|
||||
max_render_time = "3";
|
||||
bg = "~/.assets/wallpapers/3.png fill";
|
||||
};
|
||||
${config.displays.d4} = {
|
||||
pos = "0 405";
|
||||
mode = "1920x1080@60Hz";
|
||||
max_render_time = "3";
|
||||
};
|
||||
"*" = {
|
||||
bg = "~/.assets/wallpapers/1.png fill";
|
||||
};
|
||||
};
|
||||
|
||||
# HID device config
|
||||
input = {
|
||||
"9610:4103:SINOWEALTH_Game_Mouse" = {
|
||||
pointer_accel = "-0.9";
|
||||
};
|
||||
"9639:64097:Compx_2.4G_Receiver_Mouse" = {
|
||||
pointer_accel = "-0.82";
|
||||
};
|
||||
"1452:627:bcm5974" = {
|
||||
scroll_factor = "0.3";
|
||||
};
|
||||
"*" = {
|
||||
accel_profile = "flat";
|
||||
dwt = "disabled";
|
||||
natural_scroll = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -5,120 +5,66 @@
|
|||
primeMod = "Mod4";
|
||||
secMod = "Mod1";
|
||||
resizeAmount = "55";
|
||||
sendNotif = "notify-send --expire-time=1500";
|
||||
in {
|
||||
# Hotkeys
|
||||
modifier = "${primeMod}";
|
||||
keybindings = let
|
||||
# Define scripts specific to Sway
|
||||
pinWindow = pkgs.writeScript "pin-window" ''
|
||||
# Get the current border style of the focused window
|
||||
current_style=$(swaymsg -t get_tree | jq -r '.. | select(.focused?).border')
|
||||
keybindings = {
|
||||
## Launchers
|
||||
|
||||
# Toggle between "normal" (default) and "pixel ${config.look.border.string}" border styles
|
||||
if [ "$current_style" == "none" ]; then
|
||||
swaymsg "sticky disable, border pixel ${config.look.border.string}"
|
||||
else
|
||||
swaymsg "sticky enable, border none"
|
||||
fi
|
||||
'';
|
||||
# Browser profiles
|
||||
"${primeMod}+F1" = ''exec librewolf -p Main --name MainBrowser | notify-send "Main Browser"'';
|
||||
"${primeMod}+F2" = ''exec librewolf -p Alt --name AltBrowser | notify-send "Alternate Browser"'';
|
||||
"${primeMod}+F3" = ''exec librewolf -p Misc --name MiscBrowser | notify-send "Miscellaneous Browser"'';
|
||||
|
||||
# Kill a window or probe it for info
|
||||
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 ${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'))
|
||||
notify-send "$(echo -e "Window's app_id: $app_id\nWindow System: $system")"
|
||||
fi
|
||||
}
|
||||
# Virtual machines
|
||||
"${primeMod}+F4" = ''exec virt-manager | notify-send "Virtual Machines"'';
|
||||
"${primeMod}+F5" = ''exec looking-glass-client input:rawMouse=yes | notify-send "Looking Glass"'';
|
||||
|
||||
# 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 ${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"
|
||||
fi
|
||||
}
|
||||
|
||||
# Handle which tool we use
|
||||
if [ "$1" == "--prop" ]; then
|
||||
swayprop
|
||||
elif [ "$1" == "--kill" ]; then
|
||||
swaykill
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
## Launcher keys
|
||||
|
||||
# LibreWolf profiles
|
||||
"${primeMod}+F1" = ''exec librewolf -P Main --name=MainBrowser | ${sendNotif} "Main Browser"'';
|
||||
"${primeMod}+F2" = ''exec librewolf -P Alt --name=AltBrowser | ${sendNotif} "Alternate Browser"'';
|
||||
"${primeMod}+F3" = ''exec librewolf -P Misc --name=MiscBrowser | ${sendNotif} "Miscellaneous Browser"'';
|
||||
|
||||
# Virtual Machines
|
||||
"${primeMod}+F4" = ''exec virt-manager | ${sendNotif} "Virtual Machines"'';
|
||||
"${primeMod}+F5" = ''exec looking-glass-client input:rawMouse=yes | ${sendNotif} "Looking Glass"'';
|
||||
|
||||
# BeMenu scripts
|
||||
"${primeMod}+${secMod}+s" = ''exec rofiscripts --scratchpads'';
|
||||
"${primeMod}+${secMod}+r" = ''exec rofiscripts --resolutions'';
|
||||
|
||||
# Mod + Key
|
||||
# Mod + key
|
||||
"${primeMod}+s" = ''exec rofi -show run -p Command'';
|
||||
"${primeMod}+c" = ''exec clipman pick -t rofi'';
|
||||
"${primeMod}+x" = ''exec rofiscripts --power'';
|
||||
"${primeMod}+b" = ''exec pkill -USR1 waybar'';
|
||||
"${primeMod}+Return" = ''exec foot'';
|
||||
"${primeMod}+Escape" = ''exec ${swayTools} --kill'';
|
||||
"${primeMod}+Delete" = ''exec foot ranger /etc/nixos | ${sendNotif} "Nix Config"'';
|
||||
"${primeMod}+Escape" = ''exec tools-sway --kill'';
|
||||
|
||||
# Mod + shift + key
|
||||
"${primeMod}+Shift+s" = ''exec rofi -show drun -modi drun -drun-display-format {name} -show-icons -disable-history'';
|
||||
"${primeMod}+Shift+t" = ''exec pcmanfm-qt'';
|
||||
"${primeMod}+Shift+e" = ''exec BEMOJI_PICKER_CMD="rofi -dmenu -i -p Emoji" bemoji -n -P 0'';
|
||||
"${primeMod}+Shift+t" = ''exec pcmanfm'';
|
||||
"${primeMod}+Shift+e" = ''exec bemoji -n -P 0'';
|
||||
"${primeMod}+Shift+b" = ''exec rofi-bluetooth'';
|
||||
"${primeMod}+Shift+Return" = ''exec foot ranger'';
|
||||
|
||||
# Mod + ctrl + key
|
||||
"${primeMod}+Ctrl+x" = ''exec ${swayTools} --prop'';
|
||||
"${primeMod}+Ctrl+c" = ''exec ${pkgs.hyprpicker}/bin/hyprpicker -an && ${sendNotif} "Color copied to clipboard"'';
|
||||
"${primeMod}+Ctrl+Prior" = ''exec ${pkgs.obs-cmd}/bin/obs-cmd scene switch "Main"'';
|
||||
"${primeMod}+Ctrl+Next" = ''exec ${pkgs.obs-cmd}/bin/obs-cmd scene switch "Guest"'';
|
||||
"${primeMod}+Ctrl+x" = ''exec tools-sway --prop'';
|
||||
"${primeMod}+Ctrl+s" = ''exec rofiscripts --scratchpads'';
|
||||
"${primeMod}+Ctrl+c" = ''exec wlpicker && notify-send "Color copied to clipboard"'';
|
||||
|
||||
## Media keys
|
||||
## Media
|
||||
|
||||
# Volume control
|
||||
# Volume
|
||||
"${secMod}+j" = ''exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-'';
|
||||
"${secMod}+k" = ''exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+'';
|
||||
|
||||
# MPD Controls
|
||||
# MPD
|
||||
"${primeMod}+Backslash" = ''exec mpc toggle'';
|
||||
"${secMod}+Shift+h" = ''exec mpc prev'';
|
||||
"${secMod}+Shift+j" = ''exec mpc volume -3'';
|
||||
"${secMod}+Shift+k" = ''exec mpc volume +3'';
|
||||
"${secMod}+Shift+l" = ''exec mpc next'';
|
||||
|
||||
## Notification keys
|
||||
## Miscellaneous
|
||||
|
||||
# Toggle mako
|
||||
# Notifications
|
||||
"${primeMod}+n" = ''exec makotoggle'';
|
||||
"${primeMod}+Shift+n" = ''exec makoctl restore'';
|
||||
"${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a'';
|
||||
|
||||
## Miscellaneous keys
|
||||
|
||||
# Screenshots
|
||||
"${secMod}+f" = ''exec swayshot --swappy'';
|
||||
"${secMod}+Shift+f" = ''exec swayshot --screen'';
|
||||
"${secMod}+f" = ''exec screen-sway --swappy'';
|
||||
"${secMod}+Shift+f" = ''exec screen-sway --screen'';
|
||||
|
||||
# SSH
|
||||
"${primeMod}+${secMod}+Return" = ''exec foot ssh ${config.ips.server}'';
|
||||
|
||||
# Display Brightness and Keyboard Brightness
|
||||
# Display and keyboard brightness
|
||||
"${primeMod}+equal" = ''exec light -A 5'';
|
||||
"${primeMod}+minus" = ''exec light -U 5'';
|
||||
"${primeMod}+Shift+equal" = ''exec light -A 1'';
|
||||
|
@ -126,81 +72,78 @@
|
|||
"XF86KbdBrightnessUp" = ''exec light -s sysfs/leds/smc::kbd_backlight -A 5'';
|
||||
"XF86KbdBrightnessDown" = ''exec light -s sysfs/leds/smc::kbd_backlight -U 5'';
|
||||
|
||||
## Window manager keys
|
||||
## Window manager
|
||||
"${primeMod}+q" = ''kill'';
|
||||
"${primeMod}+Shift+r" = ''reload'';
|
||||
|
||||
# Switch to workspaces
|
||||
"${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}'';
|
||||
"${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}'';
|
||||
|
||||
# Switch to alternate workspaces
|
||||
"${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}'';
|
||||
"${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}'';
|
||||
|
||||
# Move window to and focus new workspace
|
||||
"${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 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}'';
|
||||
|
||||
# Move window to and focus new alternate workspace
|
||||
"${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}'';
|
||||
# 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}'';
|
||||
|
||||
# Change focus across windows
|
||||
# Change focused window
|
||||
"${primeMod}+h" = ''focus left'';
|
||||
"${primeMod}+j" = ''focus down'';
|
||||
"${primeMod}+k" = ''focus up'';
|
||||
"${primeMod}+l" = ''focus right'';
|
||||
|
||||
# Resize windows
|
||||
"${primeMod}+${secMod}+h" = ''resize shrink width ${resizeAmount} px or 5 ppt'';
|
||||
"${primeMod}+${secMod}+j" = ''resize shrink height ${resizeAmount} px or 5 ppt'';
|
||||
"${primeMod}+${secMod}+k" = ''resize grow height ${resizeAmount} px or 5 ppt'';
|
||||
"${primeMod}+${secMod}+l" = ''resize grow width ${resizeAmount} px or 5 ppt'';
|
||||
|
||||
# Move focused window
|
||||
"${primeMod}+Shift+h" = ''move left ${resizeAmount} px'';
|
||||
"${primeMod}+Shift+j" = ''move down ${resizeAmount} px'';
|
||||
"${primeMod}+Shift+k" = ''move up ${resizeAmount} px'';
|
||||
"${primeMod}+Shift+l" = ''move right ${resizeAmount} px'';
|
||||
|
||||
# Resize window
|
||||
"${primeMod}+${secMod}+h" = ''resize shrink width ${resizeAmount} px or 5 ppt'';
|
||||
"${primeMod}+${secMod}+j" = ''resize shrink height ${resizeAmount} px or 5 ppt'';
|
||||
"${primeMod}+${secMod}+k" = ''resize grow height ${resizeAmount} px or 5 ppt'';
|
||||
"${primeMod}+${secMod}+l" = ''resize grow width ${resizeAmount} px or 5 ppt'';
|
||||
|
||||
# Change focus between floating/tiled, toggle floating
|
||||
"${primeMod}+space" = ''focus mode_toggle'';
|
||||
"${primeMod}+Shift+space" = ''floating toggle'';
|
||||
|
||||
# Allow a window to be visible on all workspaces, toggle border
|
||||
"${primeMod}+0" = ''exec ${pinWindow}'';
|
||||
|
||||
# Toggle fullscreen
|
||||
"${primeMod}+f" = ''fullscreen toggle'';
|
||||
"${primeMod}+${secMod}+Ctrl+f" = ''fullscreen toggle global'';
|
||||
|
@ -220,7 +163,6 @@
|
|||
"Shift+Ctrl+Backslash" = ''[app_id="gotop"] scratchpad show, move position center, resize set 1216 888'';
|
||||
"${primeMod}+Shift+m" = ''[app_id="music"] scratchpad show, move position center, resize set 1006 657'';
|
||||
"${primeMod}+Shift+v" = ''[app_id="sound"] scratchpad show, move position center, resize set 1000 800'';
|
||||
"${primeMod}+Shift+Backslash" = ''[app_id="com.github.wwmm.easyeffects"] scratchpad show, move position center, resize set 1000 800'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
20
modules/home/wms/sway/inputs/default.nix
Normal file
20
modules/home/wms/sway/inputs/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
# HID devices
|
||||
wayland.windowManager.sway.config.input = {
|
||||
"9610:4103:SINOWEALTH_Game_Mouse" = {
|
||||
pointer_accel = "-0.9";
|
||||
};
|
||||
"9639:64097:Compx_2.4G_Receiver_Mouse" = {
|
||||
pointer_accel = "-0.82";
|
||||
};
|
||||
"1452:627:bcm5974" = {
|
||||
scroll_factor = "0.3";
|
||||
};
|
||||
"*" = {
|
||||
accel_profile = "flat";
|
||||
dwt = "disabled";
|
||||
natural_scroll = "disabled";
|
||||
};
|
||||
};
|
||||
}
|
70
modules/home/wms/sway/outputs/default.nix
Normal file
70
modules/home/wms/sway/outputs/default.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
# Monitors
|
||||
wayland.windowManager.sway.config = {
|
||||
workspaceOutputAssign = 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}"
|
||||
];
|
||||
workspaces2 = [
|
||||
"4:${config.ws.w4}"
|
||||
"5:${config.ws.w5}"
|
||||
"6:${config.ws.w6}"
|
||||
"44:${config.ws.w4a}"
|
||||
"55:${config.ws.w5a}"
|
||||
];
|
||||
workspaces3 = [
|
||||
"7:${config.ws.w7}"
|
||||
"8:${config.ws.w8}"
|
||||
"9:${config.ws.w9}"
|
||||
"77:${config.ws.w7a}"
|
||||
"88:${config.ws.w8a}"
|
||||
];
|
||||
workspaces4 = [
|
||||
"66:${config.ws.w6a}"
|
||||
"99:${config.ws.w9a}"
|
||||
];
|
||||
assign = output: workspaces:
|
||||
map (workspace: {
|
||||
inherit workspace;
|
||||
inherit output;
|
||||
})
|
||||
workspaces;
|
||||
in
|
||||
(assign "${config.displays.d1}" workspaces1) ++
|
||||
(assign "${config.displays.d2}" workspaces2) ++
|
||||
(assign "${config.displays.d3}" workspaces3) ++
|
||||
(assign "${config.displays.d4}" workspaces4);
|
||||
|
||||
output = {
|
||||
${config.displays.d1} = {
|
||||
pos = "3840 405";
|
||||
mode = "1920x1080@143.980Hz";
|
||||
max_render_time = "3";
|
||||
adaptive_sync = "on";
|
||||
};
|
||||
${config.displays.d2} = {
|
||||
pos = "1920 405";
|
||||
mode = "1920x1080@60Hz";
|
||||
max_render_time = "3";
|
||||
};
|
||||
${config.displays.d3} = {
|
||||
pos = "5760 0";
|
||||
mode = "1680x1050@59.883Hz";
|
||||
transform = "270";
|
||||
max_render_time = "3";
|
||||
};
|
||||
${config.displays.d4} = {
|
||||
pos = "0 405";
|
||||
mode = "1920x1080@60Hz";
|
||||
max_render_time = "3";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,15 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
clipman
|
||||
swaybg
|
||||
libnotify
|
||||
grim
|
||||
slurp
|
||||
swappy
|
||||
lm_sensors
|
||||
wl-clipboard
|
||||
wdisplays
|
||||
jq
|
||||
imports = [
|
||||
./screen-sway
|
||||
./sleep-sway
|
||||
./tools-sway
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./swappy
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "swayshot" ''
|
||||
# Swappy
|
||||
handle_swappy() {
|
||||
(pkgs.writeScriptBin "screen-sway" ''
|
||||
swappy() {
|
||||
# Create an imv window to act as a static screen
|
||||
grim -t jpeg -q 90 - | imv -w "GlobalShot" - & imv_pid=$!
|
||||
|
||||
|
@ -16,44 +11,31 @@
|
|||
| 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"
|
||||
|
||||
# Kill the imv window
|
||||
kill $imv_pid
|
||||
|
||||
# Copy the screenshot to the clipboard
|
||||
swappy -f - < "$temp_file"
|
||||
|
||||
# Clean up the temporary file
|
||||
# Copy the screenshot to the clipboard and clear the temp
|
||||
${pkgs.swappy}/bin/swappy -f - < "$temp_file"
|
||||
rm "$temp_file"
|
||||
}
|
||||
|
||||
# Screen
|
||||
handle_screen() {
|
||||
# Take a screenshot and save it to the temporary file
|
||||
screen() {
|
||||
temp_file=$(mktemp -u).png
|
||||
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') "$temp_file"
|
||||
|
||||
# Check if the screenshot was successfully taken
|
||||
if [ $? -eq 0 ]; then
|
||||
# Copy the screenshot to the clipboard
|
||||
wl-copy < "$temp_file"
|
||||
|
||||
# Show a notification with the screenshot
|
||||
notify-send -i "$temp_file" "Current screen copied."
|
||||
|
||||
# Remove the temporary file
|
||||
rm "$temp_file"
|
||||
else
|
||||
# If the screenshot capture failed, show an error notification
|
||||
notify-send "Error: Unable to capture screenshot."
|
||||
fi
|
||||
}
|
||||
|
||||
# Check for command-line arguments
|
||||
if [ "$1" == "--swappy" ]; then
|
||||
handle_swappy
|
||||
swappy
|
||||
elif [ "$1" == "--screen" ]; then
|
||||
handle_screen
|
||||
screen
|
||||
else
|
||||
echo "Please use the arguments --swappy or --screen."
|
||||
fi
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "swaysleep" ''
|
||||
(pkgs.writeScriptBin "sleep-sway" ''
|
||||
swaylock & ${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 1 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"; pkill -9 swayidle'
|
33
modules/home/wms/sway/programs/tools-sway/default.nix
Normal file
33
modules/home/wms/sway/programs/tools-sway/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "tools-sway" ''
|
||||
# List the app name and whether or not it uses wayland
|
||||
prop() {
|
||||
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'))
|
||||
notify-send "$(echo -e "Window's app_id: $app_id\nWindow System: $system")"
|
||||
fi
|
||||
}
|
||||
|
||||
# Kill a selected window
|
||||
kill() {
|
||||
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"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" == "--prop" ]; then
|
||||
prop
|
||||
elif [ "$1" == "--kill" ]; then
|
||||
kill
|
||||
else
|
||||
echo "Please use the arguments --prop or --kill."
|
||||
fi
|
||||
'')
|
||||
];
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue