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": {
|
"nodes": {
|
||||||
"blender-bin": {
|
"blender": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
|
@ -61,11 +61,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732221404,
|
"lastModified": 1732742778,
|
||||||
"narHash": "sha256-fWTyjgGt+BHmkeJ5IxOR4zGF4/uc+ceWmhBjOBSVkgQ=",
|
"narHash": "sha256-i+Uw8VOHzQe9YdNwKRbzvaPWLE07tYVqUDzSFTXhRgk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "97c0c4d7072f19b598ed332e9f7f8ad562c6885b",
|
"rev": "341482e2f4d888e3f60cae1c12c3df896e7230d8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -208,11 +208,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731880681,
|
"lastModified": 1732466619,
|
||||||
"narHash": "sha256-FmYTkIyPBUxSWgA7DPIVTsCCMvSSbs56yOtHpLNSnKg=",
|
"narHash": "sha256-T1e5oceypZu3Q8vzICjv1X/sGs9XfJRMW5OuXHgpB3c=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "aecd341dfead1c3ef7a3c15468ecd71e8343b7c6",
|
"rev": "f3111f62a23451114433888902a55cf0692b408d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -237,25 +237,6 @@
|
||||||
"type": "github"
|
"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": {
|
"lanzaboote": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"crane": "crane",
|
"crane": "crane",
|
||||||
|
@ -287,7 +268,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blobs": "blobs",
|
"blobs": "blobs",
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-24_05": "nixpkgs-24_05",
|
"nixpkgs-24_05": "nixpkgs-24_05",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
|
@ -310,14 +291,14 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_3",
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732153840,
|
"lastModified": 1732688645,
|
||||||
"narHash": "sha256-lt8Gdx6TNheby/9lRNE1GMP3vkdpLaXmyHQk+ZvYNAY=",
|
"narHash": "sha256-SQBVnfTAhVmNs5mKjoe942GykhAh9RQbcqScK9XlsWM=",
|
||||||
"owner": "Infinidoge",
|
"owner": "Infinidoge",
|
||||||
"repo": "nix-minecraft",
|
"repo": "nix-minecraft",
|
||||||
"rev": "8325d463c1c424f2e6edeef2010c0d902a37b3d3",
|
"rev": "6adec7f87f6c1d455f89f57bd697740bd6dc88fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -326,28 +307,6 @@
|
||||||
"type": "github"
|
"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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722221733,
|
"lastModified": 1722221733,
|
||||||
|
@ -394,22 +353,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"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": {
|
"locked": {
|
||||||
"lastModified": 1717602782,
|
"lastModified": 1717602782,
|
||||||
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
|
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
|
||||||
|
@ -424,7 +367,7 @@
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715266358,
|
"lastModified": 1715266358,
|
||||||
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
|
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
|
||||||
|
@ -440,13 +383,13 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731755305,
|
"lastModified": 1732350895,
|
||||||
"narHash": "sha256-v5P3dk5JdiT+4x69ZaB18B8+Rcu3TIOrcdG4uEX7WZ8=",
|
"narHash": "sha256-GcOQbOgmwlsRhpLGSwZJwLbo3pu9ochMETuRSS1xpz4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "057f63b6dc1a2c67301286152eb5af20747a9cb4",
|
"rev": "0c582677378f2d9ffcb01490af2f2c678dcb29d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -457,11 +400,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732220928,
|
"lastModified": 1732745437,
|
||||||
"narHash": "sha256-OOFqnjTax0132/mBsRpVD1QTMlZUCbVexKgKUVUxJNg=",
|
"narHash": "sha256-o0xF2tQ4dibaVWk7T9yLIDJZ68VpRwSY0T7q892m4MM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "8439fca0da7f67b331edcca08eb2a47249be72f4",
|
"rev": "fbe88c0dba3181daf3ef9760e548329fcc320f9d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -499,15 +442,14 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blender-bin": "blender-bin",
|
"blender": "blender",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
"jovian": "jovian",
|
|
||||||
"lanzaboote": "lanzaboote",
|
"lanzaboote": "lanzaboote",
|
||||||
"mailserver": "mailserver",
|
"mailserver": "mailserver",
|
||||||
"minecraft": "minecraft",
|
"minecraft": "minecraft",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"unstable": "unstable"
|
"unstable": "unstable"
|
||||||
}
|
}
|
||||||
|
@ -584,11 +526,11 @@
|
||||||
},
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732014248,
|
"lastModified": 1732521221,
|
||||||
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
|
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
|
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
15
flake.nix
15
flake.nix
|
@ -17,7 +17,6 @@
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
||||||
minecraft.url = "github:Infinidoge/nix-minecraft";
|
minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||||
jovian.url = "github:Jovian-Experiments/Jovian-NixOS";
|
|
||||||
|
|
||||||
# Home inputs
|
# Home inputs
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
@ -26,10 +25,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nur.url = "github:nix-community/NUR";
|
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 = {
|
outputs = {
|
||||||
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
unstable,
|
unstable,
|
||||||
lanzaboote,
|
lanzaboote,
|
||||||
|
@ -37,10 +37,9 @@
|
||||||
impermanence,
|
impermanence,
|
||||||
mailserver,
|
mailserver,
|
||||||
minecraft,
|
minecraft,
|
||||||
jovian,
|
|
||||||
home-manager,
|
home-manager,
|
||||||
nur,
|
nur,
|
||||||
blender-bin,
|
blender,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -48,16 +47,16 @@
|
||||||
inherit modules;
|
inherit modules;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit
|
inherit
|
||||||
|
self
|
||||||
unstable
|
unstable
|
||||||
lanzaboote
|
lanzaboote
|
||||||
disko
|
disko
|
||||||
impermanence
|
impermanence
|
||||||
mailserver
|
mailserver
|
||||||
minecraft
|
minecraft
|
||||||
jovian
|
|
||||||
home-manager
|
home-manager
|
||||||
nur
|
nur
|
||||||
blender-bin
|
blender
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -67,7 +66,7 @@
|
||||||
inherit
|
inherit
|
||||||
unstable
|
unstable
|
||||||
nur
|
nur
|
||||||
blender-bin
|
blender
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -80,7 +79,7 @@
|
||||||
axolotl = mkNix [ ./hosts/axolotl ]; # PineBook Pro
|
axolotl = mkNix [ ./hosts/axolotl ]; # PineBook Pro
|
||||||
lacros = mkNix [ ./hosts/lacros ]; # Dell Chromebook
|
lacros = mkNix [ ./hosts/lacros ]; # Dell Chromebook
|
||||||
redmond = mkNix [ ./hosts/redmond ]; # Lenovo Dual-Boot Laptop
|
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
|
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010
|
||||||
xenia = mkNix [ ./hosts/xenia ]; # Acer Veriton X2611G
|
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 = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.unstable.linuxPackages_latest;
|
||||||
kernel.sysctl."vm.max_map_count" = 2147483642;
|
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 = [
|
imports = [
|
||||||
./boot
|
./boot
|
||||||
|
./disko
|
||||||
|
./filesystems
|
||||||
./hardware
|
./hardware
|
||||||
./nixmodules
|
./modules
|
||||||
./wireguard
|
|
||||||
../../modules/system
|
../../modules/system
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
system.wireguard.client.enable = true;
|
||||||
services.btrfs.autoScrub.enable = lib.mkForce false;
|
networking.wireguard.interfaces.wgc.ips = [ "10.100.0.21/24" ];
|
||||||
|
|
||||||
system.video.nvidia.enable = true;
|
|
||||||
|
|
||||||
networking.hostName = "extern";
|
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 = [ "xhci_pci" "sr_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
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" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
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 = [
|
imports = [
|
||||||
./boot
|
./boot
|
||||||
|
@ -7,13 +7,10 @@
|
||||||
./hardware
|
./hardware
|
||||||
./wireguard
|
./wireguard
|
||||||
../../modules/system
|
../../modules/system
|
||||||
jovian.nixosModules.default
|
|
||||||
];
|
];
|
||||||
|
|
||||||
system.lanzaboote.enable = true;
|
system.lanzaboote.enable = true;
|
||||||
system.libvirtd.enable = true;
|
system.libvirtd.enable = true;
|
||||||
|
|
||||||
jovian.steamos.useSteamOSConfig = true;
|
|
||||||
|
|
||||||
networking.hostName = "jupiter";
|
networking.hostName = "jupiter";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall.extraInputRules = ''
|
||||||
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.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"
|
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 configuration only if server is enabled
|
||||||
nftables.tables.forwarding = {
|
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 = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
kernel.sysctl."vm.max_map_count" = 2147483642;
|
kernel.sysctl."vm.max_map_count" = 2147483642;
|
||||||
|
kernelParams = [
|
||||||
initrd = {
|
"radeon.cik_support=0"
|
||||||
systemd = {
|
"amdgpu.cik_support=1"
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,27 +3,15 @@
|
||||||
imports = [
|
imports = [
|
||||||
./boot
|
./boot
|
||||||
./disko
|
./disko
|
||||||
|
./filesystems
|
||||||
./hardware
|
./hardware
|
||||||
|
|
||||||
# Apps and programs
|
|
||||||
../../modules/system
|
../../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.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, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
|
||||||
boot = {
|
|
||||||
kernelModules = [ "kvm-amd" ];
|
|
||||||
initrd = {
|
|
||||||
availableKernelModules = [
|
|
||||||
"xhci_pci"
|
|
||||||
"ahci"
|
|
||||||
"ehci_pci"
|
|
||||||
"sd_mod"
|
|
||||||
"sr_mod"
|
|
||||||
"sdhci_pci"
|
|
||||||
"rtsx_usb_sdmmc"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems = {
|
{
|
||||||
"/home/jimbo/JimboNFS" = {
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "sd_mod" "sr_mod" "sdhci_pci" "rtsx_usb_sdmmc" ];
|
||||||
device = "${config.ips.wgSpan}.1:/export/JimboNFS";
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
fsType = "nfs4";
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
options = ["x-systemd.automount" "_netdev" "nofail" "noauto"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
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
|
let
|
||||||
commonKernelParams = [
|
commonKernelParams = [
|
||||||
# VM/GPU passthrough
|
# VM/GPU passthrough
|
||||||
|
@ -21,47 +21,29 @@ in {
|
||||||
kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:1f82,10de:10fa" ];
|
kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:1f82,10de:10fa" ];
|
||||||
blacklistedKernelModules = [ "pcspkr" ];
|
blacklistedKernelModules = [ "pcspkr" ];
|
||||||
|
|
||||||
|
# Enable cross-compilation
|
||||||
|
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
|
|
||||||
# Needed for GPU passthrough
|
# Needed for GPU passthrough
|
||||||
initrd.kernelModules = [
|
initrd.kernelModules = [
|
||||||
"vfio"
|
"vfio"
|
||||||
"vfio_pci"
|
"vfio_pci"
|
||||||
"vfio_iommu_type1"
|
"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
|
# Use second GPU on boot
|
||||||
specialisation.gputwo.configuration = {
|
specialisation.gputwo.configuration = {
|
||||||
boot.kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:2504,10de:228e" ];
|
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" = {
|
"/prev" = {
|
||||||
mountpoint = "/prev";
|
mountpoint = "/prev";
|
||||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
mountOptions = [ "compress=zstd" "noatime" "ssd" "noexec" ];
|
||||||
};
|
};
|
||||||
"/nix" = {
|
"/nix" = {
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
"/home/jimbo/JimboNFS" = {
|
"/home/jimbo/JimboNFS" = {
|
||||||
device = "${config.ips.server}:/export/JimboNFS";
|
device = "${config.ips.server}:/export/JimboNFS";
|
||||||
fsType = "nfs4";
|
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 = [
|
imports = [
|
||||||
./files
|
./files
|
||||||
|
./options
|
||||||
./programs
|
./programs
|
||||||
./services
|
./services
|
||||||
./settings
|
./settings
|
||||||
./wms
|
./wms
|
||||||
./users
|
./user
|
||||||
../../overlays
|
../extras
|
||||||
../../variables
|
|
||||||
|
|
||||||
# Imports
|
# Imports
|
||||||
nur.nixosModules.nur
|
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
|
./easyeffects
|
||||||
./foot
|
./foot
|
||||||
./librewolf
|
./librewolf
|
||||||
./mako
|
|
||||||
./mangohud
|
./mangohud
|
||||||
./mpv
|
./mpv
|
||||||
./pcmanfm-qt
|
./pcmanfm
|
||||||
./rofi
|
./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 = {
|
commonSettings = {
|
||||||
"general.autoScroll" = true;
|
"general.autoScroll" = true;
|
||||||
|
|
||||||
|
@ -123,23 +145,55 @@ in {
|
||||||
|
|
||||||
"browser.uidensity" = 1;
|
"browser.uidensity" = 1;
|
||||||
"browser.compactmode.show" = true;
|
"browser.compactmode.show" = true;
|
||||||
|
"browser.send_pings" = false;
|
||||||
|
"browser.shell.checkDefaultBrowser" = false;
|
||||||
"browser.toolbars.bookmarks.visibility" = "never";
|
"browser.toolbars.bookmarks.visibility" = "never";
|
||||||
"browser.contentblocking.category" = "strict";
|
"browser.contentblocking.category" = "strict";
|
||||||
"browser.helperApps.deleteTempFileOnExit" = true;
|
"browser.helperApps.deleteTempFileOnExit" = true;
|
||||||
"browser.search.separatePrivateDefault" = false;
|
"browser.search.separatePrivateDefault" = false;
|
||||||
"browser.download.useDownloadDir" = true;
|
"browser.download.useDownloadDir" = true;
|
||||||
|
"browser.aboutConfig.showWarning" = false;
|
||||||
"browser.startup.page" = 3;
|
"browser.startup.page" = 3;
|
||||||
|
"browser.theme.content-theme" = 0;
|
||||||
|
"browser.theme.toolbar-theme" = 0;
|
||||||
"browser.newtabpage.enabled" = false;
|
"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.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.pocket.enabled" = false;
|
||||||
"extensions.autoDisableScopes" = 0;
|
"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.legacyUserProfileCustomizations.stylesheets" = true;
|
||||||
"toolkit.tabbox.switchByScrolling" = true;
|
"toolkit.tabbox.switchByScrolling" = true;
|
||||||
|
|
||||||
"privacy.resistFingerprinting" = true;
|
"privacy.resistFingerprinting" = true;
|
||||||
"privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" = true;
|
"privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" = true;
|
||||||
|
"privacy.firstparty.isolate" = true;
|
||||||
"privacy.fingerprintingProtection" = true;
|
"privacy.fingerprintingProtection" = true;
|
||||||
"privacy.donottrackheader.enabled" = true;
|
"privacy.donottrackheader.enabled" = true;
|
||||||
"privacy.globalprivacycontrol.enabled" = true;
|
"privacy.globalprivacycontrol.enabled" = true;
|
||||||
|
@ -154,8 +208,11 @@ in {
|
||||||
|
|
||||||
"network.trr.mode" = 3;
|
"network.trr.mode" = 3;
|
||||||
"network.trr.uri" = "https://doh.libredns.gr/noads";
|
"network.trr.uri" = "https://doh.libredns.gr/noads";
|
||||||
"network.http.referer.XOriginPolicy" = true;
|
"network.cookie.cookieBehavior" = 1;
|
||||||
"network.cookie.sameSite.noneRequiresSecure" = true;
|
"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.ffmpeg.vaapi.enabled" = true;
|
||||||
"media.rdd-ffmpeg.enabled" = true;
|
"media.rdd-ffmpeg.enabled" = true;
|
||||||
|
@ -164,11 +221,25 @@ in {
|
||||||
"gfx.webrender.all" = true;
|
"gfx.webrender.all" = true;
|
||||||
"gfx.x11-egl.force-enabled" = 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;
|
"clipboard.autocopy" = false;
|
||||||
"middlemouse.paste" = false;
|
"middlemouse.paste" = false;
|
||||||
|
|
||||||
|
"identity.fxaccounts.enabled" = false;
|
||||||
|
"datareporting.healthreport.uploadEnabled" = false;
|
||||||
"svg.context-properties.content.enabled" = true;
|
"svg.context-properties.content.enabled" = true;
|
||||||
|
"services.sync.engine.addresses.available" = false;
|
||||||
"device.sensors.motion.enabled" = false;
|
"device.sensors.motion.enabled" = false;
|
||||||
|
"security.OCSP.require" = true;
|
||||||
"gnomeTheme.hideSingleTab" = true;
|
"gnomeTheme.hideSingleTab" = true;
|
||||||
"webgl.disabled" = false;
|
"webgl.disabled" = false;
|
||||||
};
|
};
|
||||||
|
@ -178,8 +249,10 @@ in {
|
||||||
profiles = {
|
profiles = {
|
||||||
Main = {
|
Main = {
|
||||||
id = 0;
|
id = 0;
|
||||||
|
isDefault = true;
|
||||||
extensions = commonExtensions;
|
extensions = commonExtensions;
|
||||||
search = commonSearch;
|
search = commonSearch;
|
||||||
|
bookmarks = commonBookmarks;
|
||||||
settings = commonSettings;
|
settings = commonSettings;
|
||||||
userChrome = ''
|
userChrome = ''
|
||||||
${themeJim}
|
${themeJim}
|
||||||
|
@ -191,6 +264,7 @@ in {
|
||||||
id = 1;
|
id = 1;
|
||||||
extensions = commonExtensions;
|
extensions = commonExtensions;
|
||||||
search = commonSearch;
|
search = commonSearch;
|
||||||
|
bookmarks = commonBookmarks;
|
||||||
settings = commonSettings;
|
settings = commonSettings;
|
||||||
userChrome = ''
|
userChrome = ''
|
||||||
${themeAlt}
|
${themeAlt}
|
||||||
|
@ -202,8 +276,8 @@ in {
|
||||||
id = 2;
|
id = 2;
|
||||||
extensions = commonExtensions;
|
extensions = commonExtensions;
|
||||||
search = commonSearch;
|
search = commonSearch;
|
||||||
|
bookmarks = commonBookmarks;
|
||||||
settings = commonSettings;
|
settings = commonSettings;
|
||||||
containersForce = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -211,7 +285,7 @@ in {
|
||||||
# Fixes
|
# Fixes
|
||||||
home.file = {
|
home.file = {
|
||||||
# Symlinks to Librewolf
|
# 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
|
# Gnome theme
|
||||||
".mozilla/firefox/Misc/chrome".source = fetchTarball {
|
".mozilla/firefox/Misc/chrome".source = fetchTarball {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
--urlbar-height-setting: 24px;
|
--urlbar-height-setting: 24px;
|
||||||
--tab-min-height: 20px !important;
|
--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-menuitem-padding: 2px !important;
|
||||||
--arrowpanel-border-radius: 0px !important;
|
--arrowpanel-border-radius: 0px !important;
|
||||||
--arrowpanel-menuitem-border-radius: 0px !important;
|
--arrowpanel-menuitem-border-radius: 0px !important;
|
||||||
|
@ -13,20 +13,20 @@
|
||||||
--toolbar-field-focus-border-color: transparent !important;
|
--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; }
|
#statuspanel { display: none !important; }
|
||||||
|
|
||||||
/* remove radius from right-click popup */
|
/* remove radius from right-click popup */
|
||||||
menupopup, panel { --panel-border-radius: 0px !important; }
|
menupopup, panel { --panel-border-radius: 0px !important; }
|
||||||
menu, menuitem, menucaption { 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-navigation { display: none !important; }
|
||||||
menupopup > #context-sep-navigation { display: none !important; }
|
menupopup > #context-sep-navigation { display: none !important; }
|
||||||
|
|
||||||
/* --- Debloat navbar ------------------------------- */
|
/* --- DEBLOAT NAVBAR ----------------------------------- */
|
||||||
|
|
||||||
#back-button { display: none; }
|
#back-button { display: none; }
|
||||||
#forward-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 */
|
/* empty space before and after the url bar */
|
||||||
#customizableui-special-spring1, #customizableui-special-spring2 { display: none; }
|
#customizableui-special-spring1, #customizableui-special-spring2 { display: none; }
|
||||||
|
|
||||||
/* --- Style navbar -------------------------------- */
|
/* --- STYLE NAVBAR ------------------------------------ */
|
||||||
|
|
||||||
/* remove padding between toolbar buttons */
|
/* remove padding between toolbar buttons */
|
||||||
toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
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 {
|
||||||
--urlbar-container-height: var(--urlbar-height-setting) !important;
|
--urlbar-container-height: var(--urlbar-height-setting) !important;
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
|
@ -70,16 +80,16 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* keep pop-up menus from overlapping with navbar */
|
/* keep pop-up menus from overlapping with navbar */
|
||||||
#widget-overflow { margin: 0 !important; }
|
#widget-overflow { margin: 4px !important; }
|
||||||
#appmenu-popup { margin: 0 !important; }
|
#customizationui-widget-panel { margin: 4px !important; }
|
||||||
#customizationui-widget-panel { margin: 0 !important; }
|
#unified-extensions-panel { margin-top: 4px !important; }
|
||||||
#unified-extensions-panel { margin: 0 !important; }
|
#appMenu-popup { margin-top: 4px !important; }
|
||||||
|
|
||||||
/* --- Unified extensions button -------------------- */
|
/* --- UNIFIED EXTENSIONS BUTTON ------------------------ */
|
||||||
|
|
||||||
/* make extension icons smaller */
|
/* make extension icons smaller */
|
||||||
#unified-extensions-view {
|
#unified-extensions-view {
|
||||||
--uei-icon-size: 18px;
|
--uei-icon-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hide bloat */
|
/* hide bloat */
|
||||||
|
@ -95,10 +105,6 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
||||||
padding: 3px 0px !important;
|
padding: 3px 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#unified-extensions-view .unified-extensions-item-menu-button {
|
|
||||||
margin-inline-end: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#unified-extensions-view .toolbarbutton-icon {
|
#unified-extensions-view .toolbarbutton-icon {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +114,16 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
||||||
white-space: nowrap !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; }
|
#identity-box { display: none; }
|
||||||
#pageActionButton { display: none; }
|
#pageActionButton { display: none; }
|
||||||
|
@ -125,7 +140,7 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
||||||
/* remove container indicator from urlbar */
|
/* remove container indicator from urlbar */
|
||||||
#userContext-label, #userContext-indicator { display: none !important;}
|
#userContext-label, #userContext-indicator { display: none !important;}
|
||||||
|
|
||||||
/* --- Style tab toolbar ---------------------------- */
|
/* --- STYLE TAB TOOLBAR -------------------------------- */
|
||||||
|
|
||||||
#titlebar {
|
#titlebar {
|
||||||
--proton-tab-block-margin: 0px !important;
|
--proton-tab-block-margin: 0px !important;
|
||||||
|
@ -135,7 +150,6 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
||||||
#TabsToolbar, .tabbrowser-tab {
|
#TabsToolbar, .tabbrowser-tab {
|
||||||
max-height: var(--tab-min-height) !important;
|
max-height: var(--tab-min-height) !important;
|
||||||
font-size: 14px !important;
|
font-size: 14px !important;
|
||||||
outline: none !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change color of normal tabs */
|
/* Change color of normal tabs */
|
||||||
|
@ -147,6 +161,17 @@ tab:not([selected="true"]) {
|
||||||
tab {
|
tab {
|
||||||
font-family: var(--tab-font, monospace);
|
font-family: var(--tab-font, monospace);
|
||||||
border: none !important;
|
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 */
|
/* safari style tab width */
|
||||||
|
@ -158,6 +183,9 @@ tab {
|
||||||
/* Hide close button on tabs */
|
/* Hide close button on tabs */
|
||||||
#tabbrowser-tabs .tabbrowser-tab .tab-close-button { display: none !important; }
|
#tabbrowser-tabs .tabbrowser-tab .tab-close-button { display: none !important; }
|
||||||
|
|
||||||
|
/* disable favicons in tab */
|
||||||
|
/* .tab-icon-stack:not([pinned]) { display: none !important; } */
|
||||||
|
|
||||||
.tabbrowser-tab {
|
.tabbrowser-tab {
|
||||||
/* remove border between tabs */
|
/* remove border between tabs */
|
||||||
padding-inline: 0px !important;
|
padding-inline: 0px !important;
|
||||||
|
@ -204,6 +232,10 @@ tab {
|
||||||
height: var(--tab-min-height) !important;
|
height: var(--tab-min-height) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tabbrowser-tabs {
|
||||||
|
min-height: var(--tab-min-height) !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* remove overflow scroll buttons */
|
/* remove overflow scroll buttons */
|
||||||
#scrollbutton-up, #scrollbutton-down { display: none !important; }
|
#scrollbutton-up, #scrollbutton-down { display: none !important; }
|
||||||
|
|
||||||
|
@ -212,27 +244,40 @@ tab {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- Autohide Navbar ------------------------------ */
|
/* hide private browsing indicator */
|
||||||
|
#private-browsing-indicator-with-label {
|
||||||
/* hide navbar unless focused */
|
display: none;
|
||||||
#nav-bar {
|
}
|
||||||
min-height: 0 !important;
|
|
||||||
max-height: 0 !important;
|
/* --- AUTOHIDE NAVBAR ---------------------------------- */
|
||||||
height: 0 !important;
|
|
||||||
--moz-transform: scaleY(0) !important;
|
#nav-bar,
|
||||||
transform: scaleY(0) !important;
|
#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 {
|
#nav-bar:focus-within {
|
||||||
--moz-transform: scale(1) !important;
|
transform: translateY(var(--tab-min-height));
|
||||||
transform: scale(1) !important;
|
opacity: 1;
|
||||||
max-height: var(--urlbar-height-setting) !important;
|
|
||||||
height: var(--urlbar-height-setting) !important;
|
|
||||||
min-height: var(--urlbar-height-setting) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#navigator-toolbox:focus-within > .browser-toolbar {
|
#urlbar:focus-within {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
packages = with pkgs; [ mangohud ];
|
packages = with pkgs; [ mangohud ];
|
||||||
file = {
|
file = {
|
||||||
# These options exist in Nixlang, but the order is not respected.
|
# 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 = ''
|
".config/MangoHud/MangoHud.conf".text = ''
|
||||||
table_columns=2
|
table_columns=2
|
||||||
frametime=0
|
frametime=0
|
||||||
|
@ -12,7 +11,6 @@
|
||||||
font_scale=0.80
|
font_scale=0.80
|
||||||
background_alpha=0.25
|
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
|
||||||
fps_color_change
|
fps_color_change
|
||||||
ram
|
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; [
|
home.packages = with pkgs; [
|
||||||
(pkgs.writeScriptBin "rofiscripts" ''
|
(pkgs.writeScriptBin "rofiscripts" ''
|
||||||
# Scratchpad function
|
# Scratchpad function
|
||||||
handle_scratchpads() {
|
scratchpads() {
|
||||||
SCRATCHPADS=$(echo -e "Gotop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads")
|
SCRATCHPADS=$(echo -e "Gotop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads")
|
||||||
case $SCRATCHPADS in
|
case $SCRATCHPADS in
|
||||||
Gotop) foot -a gotop -T Gotop gotop;;
|
Gotop) foot -a gotop -T Gotop gotop;;
|
||||||
|
@ -138,43 +138,24 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# Lock menu
|
# Lock menu
|
||||||
handle_power() {
|
power() {
|
||||||
POWER=$(echo -e "Shutdown\nReboot\nSleep\nLock\nKill" | rofi -dmenu -i -p "Power")
|
POWER=$(echo -e "Shutdown\nReboot\nSleep\nLock\nKill" | rofi -dmenu -i -p "Power")
|
||||||
case $POWER in
|
case $POWER in
|
||||||
Shutdown) poweroff;;
|
Shutdown) poweroff;;
|
||||||
Reboot) reboot;;
|
Reboot) reboot;;
|
||||||
Sleep) swaysleep &;;
|
Sleep) sleep-$XDG_CURRENT_DESKTOP &;;
|
||||||
Lock) swaylock &;;
|
Lock) swaylock &;;
|
||||||
Kill) pkill -9 sway;;
|
Kill) pkill -9 $XDG_CURRENT_DESKTOP;;
|
||||||
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
|
|
||||||
";;
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check for command-line arguments
|
# Check for command-line arguments
|
||||||
if [ "$1" == "--scratchpads" ]; then
|
if [ "$1" == "--scratchpads" ]; then
|
||||||
handle_scratchpads
|
scratchpads
|
||||||
elif [ "$1" == "--power" ]; then
|
elif [ "$1" == "--power" ]; then
|
||||||
handle_power
|
power
|
||||||
elif [ "$1" == "--resolutions" ]; then
|
|
||||||
handle_resolutions
|
|
||||||
else
|
else
|
||||||
echo "Please use a valid argument."
|
echo "Please --scratchpads or --power."
|
||||||
fi
|
fi
|
||||||
'')
|
'')
|
||||||
rofi-bluetooth
|
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; [
|
home.packages = with pkgs; [
|
||||||
ffmpeg
|
ffmpeg
|
||||||
alsa-utils
|
|
||||||
puddletag
|
puddletag
|
||||||
pulsemixer
|
pulsemixer
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,5 +3,6 @@
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
vesktop
|
vesktop
|
||||||
fractal
|
fractal
|
||||||
|
telegram-desktop
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./launchers
|
./launchers
|
||||||
|
./games
|
||||||
./emulators
|
./emulators
|
||||||
./xash3d
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
ryujinx
|
ryujinx
|
||||||
duckstation
|
duckstation
|
||||||
pcsx2
|
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, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
imv
|
libreoffice
|
||||||
libreoffice-fresh
|
|
||||||
ffmpegthumbnailer
|
ffmpegthumbnailer
|
||||||
thunderbird
|
imv
|
||||||
protonvpn-cli_2
|
|
||||||
bc
|
bc
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,5 @@
|
||||||
p7zip
|
p7zip
|
||||||
vimv
|
vimv
|
||||||
dua
|
dua
|
||||||
protonvpn-cli_2
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
{ pkgs, blender-bin, ... }:
|
{ pkgs, blender, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./obs ];
|
imports = [ ./obs ];
|
||||||
|
|
||||||
|
nixpkgs.overlays = [ blender.overlays.default ];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
krita
|
krita
|
||||||
inkscape
|
|
||||||
audacity
|
audacity
|
||||||
blender_4_3
|
blender_4_3
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = [ blender-bin.overlays.default ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
moonlight-qt
|
moonlight-qt
|
||||||
#rustdesk-flutter
|
rustdesk-flutter
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
remmina
|
remmina
|
||||||
freerdp
|
freerdp
|
||||||
zoom-us
|
|
||||||
gpauth
|
gpauth
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "command",
|
"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": " "
|
"key": " "
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./small ];
|
imports = [ ./small ];
|
||||||
home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc;
|
|
||||||
programs.fastfetch.enable = true;
|
programs.fastfetch.enable = true;
|
||||||
|
home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
|
packages = with pkgs; [ (pkgs.writeScriptBin "pfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc") ];
|
||||||
file.".config/fastfetch/small.jsonc".source = ./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, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./lazygit ];
|
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Jimbo";
|
userName = "Jimbo";
|
||||||
userEmail = "jimbo@${config.domains.jim2}";
|
userEmail = "jimbo@${config.domains.jim2}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.lazygit.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.lazygit.enable = true;
|
|
||||||
}
|
|
|
@ -1,5 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [ mpc-cli ];
|
||||||
|
|
||||||
programs.ncmpcpp = {
|
programs.ncmpcpp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -15,8 +17,4 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services.mpd-discord-rpc.enable = true;
|
services.mpd-discord-rpc.enable = true;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
mpc-cli
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
# Nerdtree
|
# Nerdtree
|
||||||
nerdtree
|
nerdtree
|
||||||
vim-nerdtree-syntax-highlight
|
vim-nerdtree-syntax-highlight
|
||||||
|
|
||||||
|
# Misc languages
|
||||||
|
kdl-vim
|
||||||
];
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
lua <<EOF
|
lua <<EOF
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
programs.ranger = {
|
programs.ranger = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -13,12 +13,6 @@
|
||||||
hidden_filter = ''^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$'';
|
hidden_filter = ''^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$'';
|
||||||
};
|
};
|
||||||
rifle = [
|
rifle = [
|
||||||
# Text editing
|
|
||||||
{
|
|
||||||
condition = ''ext xml|json|jsonc|m3u|m3u8|csv|tex|py|pl|rb|js|sh|php|md|nix'';
|
|
||||||
command = ''vim -- "$@"'';
|
|
||||||
}
|
|
||||||
|
|
||||||
# Media
|
# Media
|
||||||
{
|
{
|
||||||
condition = ''mime ^image, has imv, X, flag f'';
|
condition = ''mime ^image, has imv, X, flag f'';
|
||||||
|
@ -82,7 +76,7 @@
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
condition = ''label open, has xdg-open'';
|
condition = ''label open, has xdg-open'';
|
||||||
command = ''xdg-open -- "$@"'';
|
command = ''vim -- "$@"'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
plugins = [
|
plugins = [
|
||||||
|
@ -104,20 +98,20 @@
|
||||||
file = {
|
file = {
|
||||||
".local/share/ranger/bookmarks".text = ''
|
".local/share/ranger/bookmarks".text = ''
|
||||||
# Local files
|
# Local files
|
||||||
h:/home/jimbo/
|
h:/home/${config.home.username}/
|
||||||
k:/home/jimbo/Keepers
|
k:/home/${config.home.username}/Keepers
|
||||||
j:/home/jimbo/Downloads
|
j:/home/${config.home.username}/Downloads
|
||||||
v:/home/jimbo/Videos
|
v:/home/${config.home.username}/Videos
|
||||||
c:/home/jimbo/.config
|
c:/home/${config.home.username}/.config
|
||||||
l:/home/jimbo/.local
|
l:/home/${config.home.username}/.local
|
||||||
d:/mnt
|
d:/mnt
|
||||||
n:/etc/nixos
|
n:/etc/nixos
|
||||||
|
|
||||||
# Remote files
|
# Remote files
|
||||||
J:/home/jimbo/JimboNFS
|
J:/home/${config.home.username}/JimboNFS
|
||||||
K:/home/jimbo/JimboNFS/Files
|
K:/home/${config.home.username}/JimboNFS/Files
|
||||||
V:/home/jimbo/JimboNFS/Media
|
V:/home/${config.home.username}/JimboNFS/Media
|
||||||
M:/home/jimbo/JimboNFS/Music
|
M:/home/${config.home.username}/JimboNFS/Music
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
|
@ -22,21 +22,20 @@
|
||||||
nixscrub = "nixclean; nixpurge; nixoptimize";
|
nixscrub = "nixclean; nixpurge; nixoptimize";
|
||||||
|
|
||||||
# Shortcut aliases
|
# Shortcut aliases
|
||||||
neo = "clear && fastfetch";
|
ff = "clear && fastfetch";
|
||||||
ip = "ip -c";
|
ip = "ip -c";
|
||||||
ls = "${pkgs.eza}/bin/eza -a --color=always --group-directories-first --icons";
|
ls = "${pkgs.eza}/bin/eza -a --color=always --group-directories-first --icons";
|
||||||
nls = "/usr/bin/env ls";
|
nls = "/usr/bin/env ls";
|
||||||
cat = "${pkgs.bat}/bin/bat --paging never";
|
cat = "${pkgs.bat}/bin/bat --paging never";
|
||||||
ncat = "/usr/bin/env cat";
|
ncat = "/usr/bin/env cat";
|
||||||
copycat = "wl-copy <";
|
copycat = "wl-copy <";
|
||||||
sunshinehost = "WAYLAND_DISPLAY=wayland-1 DISPLAY=:1 sunshine -0";
|
|
||||||
myip = "curl ifconfig.co";
|
myip = "curl ifconfig.co";
|
||||||
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
|
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
|
||||||
};
|
};
|
||||||
initExtra = ''
|
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-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
|
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 HIST_IGNORE_SPACE
|
||||||
setopt RM_STAR_WAIT
|
setopt RM_STAR_WAIT
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
MANPAGER = "nvim +Man!";
|
MANPAGER = "nvim +Man!";
|
||||||
LIBVIRT_DEFAULT_URI = "qemu:///system";
|
LIBVIRT_DEFAULT_URI = "qemu:///system";
|
||||||
HISTCONTROL = "ignoreboth";
|
HISTCONTROL = "ignoreboth";
|
||||||
|
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||||
NIXPKGS_ALLOW_UNFREE = 1;
|
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 = [
|
imports = [
|
||||||
|
./niri
|
||||||
|
./programs
|
||||||
./sway
|
./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; [
|
home.packages = with pkgs; [
|
||||||
(pkgs.writeScriptBin "makotoggle" ''
|
(pkgs.writeScriptBin "makotoggle" ''
|
||||||
# Run makoctl mode and store the output in a variable
|
# Run makoctl mode and store the output in a variable
|
|
@ -8,7 +8,7 @@ let
|
||||||
text = "#FFFFFFFF";
|
text = "#FFFFFFFF";
|
||||||
in {
|
in {
|
||||||
programs.swaylock = {
|
programs.swaylock = {
|
||||||
enable = true;
|
enable = config.home.desktop.enable;
|
||||||
package = pkgs.swaylock-effects;
|
package = pkgs.swaylock-effects;
|
||||||
settings = {
|
settings = {
|
||||||
clock = true;
|
clock = true;
|
|
@ -1,8 +1,9 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
programs.waybar = let
|
programs.waybar = let
|
||||||
swayWorkspacesModule = {
|
swayWorkspaceModule = {
|
||||||
format = "{name}";
|
format = "{name}";
|
||||||
|
sort-by-number = true;
|
||||||
enable-bar-scroll = true;
|
enable-bar-scroll = true;
|
||||||
warp-on-scroll = false;
|
warp-on-scroll = false;
|
||||||
disable-scroll-wraparound = true;
|
disable-scroll-wraparound = true;
|
||||||
|
@ -32,18 +33,24 @@
|
||||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
on-click-middle = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 100%";
|
on-click-middle = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 100%";
|
||||||
on-click-right = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 60%";
|
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 = {
|
cpuModule = {
|
||||||
format = " {usage}%";
|
format = " {usage}%";
|
||||||
interval = 3;
|
interval = 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
ramModule = {
|
ramModule = {
|
||||||
format = " {used}G";
|
format = " {used}G";
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
|
interval = 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
vramModule = {
|
vramModule = {
|
||||||
exec = pkgs.writeScript "vramScript" ''
|
exec = pkgs.writeScript "vramScript" ''
|
||||||
# Don't run the script if running on integrated graphics
|
# Don't run the script if running on integrated graphics
|
||||||
|
@ -56,7 +63,7 @@
|
||||||
|
|
||||||
elif [ "$gpu_driver" == "amdgpu" ]; then
|
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)
|
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
|
fi
|
||||||
|
|
||||||
# Check if VRAM usage is under 1GB
|
# Check if VRAM usage is under 1GB
|
||||||
|
@ -80,7 +87,6 @@
|
||||||
# Clocks
|
# Clocks
|
||||||
longClockModule = {
|
longClockModule = {
|
||||||
exec = pkgs.writeScript "longClock" ''
|
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 ' ')
|
time=$(date +'%a %b %d %l:%M:%S%p' | tr -s ' ')
|
||||||
date=$(date "+%Y-%m-%d")
|
date=$(date "+%Y-%m-%d")
|
||||||
echo "{\"text\":\" $time\",\"tooltip\":\"$date\"}"
|
echo "{\"text\":\" $time\",\"tooltip\":\"$date\"}"
|
||||||
|
@ -91,6 +97,7 @@
|
||||||
interval = 1;
|
interval = 1;
|
||||||
tooltip = true;
|
tooltip = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
shortClockModule = {
|
shortClockModule = {
|
||||||
exec = "echo ' '$(date +'%l:%M%p' | sed 's/^ //')";
|
exec = "echo ' '$(date +'%l:%M%p' | sed 's/^ //')";
|
||||||
on-click = ''wl-copy $(date "+%Y-%m-%d-%H%M%S"); notify-send "Date copied."'';
|
on-click = ''wl-copy $(date "+%Y-%m-%d-%H%M%S"); notify-send "Date copied."'';
|
||||||
|
@ -98,10 +105,9 @@
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Tray, gamemode, bluetooth, and network tray modules
|
# Misc
|
||||||
trayModule = {
|
trayModule.spacing = 5;
|
||||||
spacing = 5;
|
|
||||||
};
|
|
||||||
networkModule = {
|
networkModule = {
|
||||||
format-ethernet = "";
|
format-ethernet = "";
|
||||||
format-wifi = "";
|
format-wifi = "";
|
||||||
|
@ -111,6 +117,7 @@
|
||||||
tooltip-format-wifi = "{ipaddr}\n{essid} ({signalStrength}%)";
|
tooltip-format-wifi = "{ipaddr}\n{essid} ({signalStrength}%)";
|
||||||
tooltip-format-disconnected = "Disconnected";
|
tooltip-format-disconnected = "Disconnected";
|
||||||
};
|
};
|
||||||
|
|
||||||
bluetoothModule = {
|
bluetoothModule = {
|
||||||
format = "";
|
format = "";
|
||||||
format-disabled = "";
|
format-disabled = "";
|
||||||
|
@ -121,56 +128,36 @@
|
||||||
tooltip-format-enumerate-connected-battery = "{device_alias} {device_battery_percentage}%";
|
tooltip-format-enumerate-connected-battery = "{device_alias} {device_battery_percentage}%";
|
||||||
on-click = "rofi-bluetooth";
|
on-click = "rofi-bluetooth";
|
||||||
};
|
};
|
||||||
|
|
||||||
scratchpadModule = {
|
scratchpadModule = {
|
||||||
format = " {count}";
|
format = " {count}";
|
||||||
show-empty = false;
|
show-empty = false;
|
||||||
tooltip = true;
|
tooltip = true;
|
||||||
tooltip-format = "{title}";
|
tooltip-format = "{title}";
|
||||||
};
|
};
|
||||||
|
|
||||||
gamemodeModule = {
|
gamemodeModule = {
|
||||||
format = "{glyph}";
|
format = "{glyph}";
|
||||||
glyph = "";
|
glyph = "";
|
||||||
hide-not-running = true;
|
hide-not-running = true;
|
||||||
use-icon = true;
|
use-icon = true;
|
||||||
icon-spacing = 3;
|
|
||||||
icon-size = 19;
|
icon-size = 19;
|
||||||
|
icon-spacing = 3;
|
||||||
tooltip = true;
|
tooltip = true;
|
||||||
tooltip-format = "Gamemode On";
|
tooltip-format = "Gamemode On";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Special per-bar modules
|
privacyModule = {
|
||||||
|
icon-spacing = 5;
|
||||||
|
icon-size = 15;
|
||||||
|
};
|
||||||
|
|
||||||
mediaModule = {
|
mediaModule = {
|
||||||
exec-if = "mpc status | grep -q '^\\[playing\\] \\|^\\[paused\\]'";
|
format = " {title}";
|
||||||
exec = pkgs.writeScript "mpvMetadata" ''
|
format-paused = " {artist}";
|
||||||
get_metadata() {
|
format-stopped = "";
|
||||||
mpc | head -n 1
|
format-disconnected = "";
|
||||||
}
|
tooltip-format = "{artist} - {title}";
|
||||||
|
|
||||||
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";
|
|
||||||
interval = 2;
|
interval = 2;
|
||||||
max-length = 30;
|
max-length = 30;
|
||||||
on-click = "mpc toggle";
|
on-click = "mpc toggle";
|
||||||
|
@ -195,40 +182,19 @@
|
||||||
interval = 2;
|
interval = 2;
|
||||||
on-click = "makotoggle";
|
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
|
weatherModule = {
|
||||||
echo {\"text\":\" $temp\",\"tooltip\":\"$location: $condition\"}
|
exec = "${pkgs.wttrbar}/bin/wttrbar --ampm";
|
||||||
'';
|
format = "{}°";
|
||||||
format = "<span font_size='11pt'>{}</span>";
|
tooltip = true;
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
interval = 150;
|
interval = 3600;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Laptop modules
|
# Laptop modules
|
||||||
backlightModule = {
|
backlightModule = {
|
||||||
format = "{icon} {percent}%";
|
format = "{icon} {percent}%";
|
||||||
format-icons = ["" ""];
|
format-icons = [ "" "" ];
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
};
|
};
|
||||||
batteryModule = {
|
batteryModule = {
|
||||||
|
@ -238,17 +204,25 @@
|
||||||
critical = 15;
|
critical = 15;
|
||||||
};
|
};
|
||||||
format = "{icon} {capacity}%";
|
format = "{icon} {capacity}%";
|
||||||
format-icons = ["" "" "" "" ""];
|
format-icons = [ "" "" "" "" "" ];
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = config.home.desktop.enable;
|
||||||
settings = {
|
settings = {
|
||||||
display1 = {
|
display1 = {
|
||||||
name = "bar1";
|
name = "bar1";
|
||||||
position = "top";
|
position = "top";
|
||||||
layer = "bottom";
|
layer = "top";
|
||||||
output = [ config.displays.d1 "VGA-1" ];
|
output = [
|
||||||
modules-left = ["sway/workspaces" "sway/window"];
|
config.displays.d1
|
||||||
|
"VGA-1"
|
||||||
|
];
|
||||||
|
modules-left = [
|
||||||
|
"sway/workspaces"
|
||||||
|
"sway/window"
|
||||||
|
"niri/workspaces"
|
||||||
|
"niri/window"
|
||||||
|
];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"pulseaudio"
|
"pulseaudio"
|
||||||
"cpu"
|
"cpu"
|
||||||
|
@ -257,18 +231,21 @@
|
||||||
"custom/clock-long"
|
"custom/clock-long"
|
||||||
"gamemode"
|
"gamemode"
|
||||||
"sway/scratchpad"
|
"sway/scratchpad"
|
||||||
|
"privacy"
|
||||||
"tray"
|
"tray"
|
||||||
"bluetooth"
|
"bluetooth"
|
||||||
"network"
|
"network"
|
||||||
];
|
];
|
||||||
"sway/workspaces" = swayWorkspacesModule;
|
"sway/workspaces" = swayWorkspaceModule;
|
||||||
"sway/window" = swayWindowsModule;
|
"sway/window" = swayWindowsModule;
|
||||||
|
"niri/window" = swayWindowsModule;
|
||||||
"pulseaudio" = pulseModule;
|
"pulseaudio" = pulseModule;
|
||||||
"cpu" = cpuModule;
|
"cpu" = cpuModule;
|
||||||
"memory" = ramModule;
|
"memory" = ramModule;
|
||||||
"custom/vram" = vramModule;
|
"custom/vram" = vramModule;
|
||||||
"custom/clock-long" = longClockModule;
|
"custom/clock-long" = longClockModule;
|
||||||
"gamemode" = gamemodeModule;
|
"gamemode" = gamemodeModule;
|
||||||
|
"privacy" = privacyModule;
|
||||||
"sway/scratchpad" = scratchpadModule;
|
"sway/scratchpad" = scratchpadModule;
|
||||||
"tray" = trayModule;
|
"tray" = trayModule;
|
||||||
"bluetooth" = bluetoothModule;
|
"bluetooth" = bluetoothModule;
|
||||||
|
@ -277,22 +254,28 @@
|
||||||
display2 = {
|
display2 = {
|
||||||
name = "bar2";
|
name = "bar2";
|
||||||
position = "top";
|
position = "top";
|
||||||
layer = "bottom";
|
layer = "top";
|
||||||
output = [ config.displays.d2 ];
|
output = [ config.displays.d2 ];
|
||||||
modules-left = ["sway/workspaces" "sway/window"];
|
modules-left = [
|
||||||
|
"sway/workspaces"
|
||||||
|
"sway/window"
|
||||||
|
"niri/workspaces"
|
||||||
|
"niri/window"
|
||||||
|
];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"pulseaudio"
|
"pulseaudio"
|
||||||
"custom/media"
|
"mpd"
|
||||||
"custom/notifs"
|
"custom/notifs"
|
||||||
"cpu"
|
"cpu"
|
||||||
"memory"
|
"memory"
|
||||||
"custom/vram"
|
"custom/vram"
|
||||||
"custom/clock-long"
|
"custom/clock-long"
|
||||||
];
|
];
|
||||||
"sway/workspaces" = swayWorkspacesModule;
|
"sway/workspaces" = swayWorkspaceModule;
|
||||||
"sway/window" = swayWindowsModule;
|
"sway/window" = swayWindowsModule;
|
||||||
|
"niri/window" = swayWindowsModule;
|
||||||
"pulseaudio" = pulseModule;
|
"pulseaudio" = pulseModule;
|
||||||
"custom/media" = mediaModule;
|
"mpd" = mediaModule;
|
||||||
"custom/notifs" = notificationModule;
|
"custom/notifs" = notificationModule;
|
||||||
"cpu" = cpuModule;
|
"cpu" = cpuModule;
|
||||||
"memory" = ramModule;
|
"memory" = ramModule;
|
||||||
|
@ -302,9 +285,14 @@
|
||||||
display3 = {
|
display3 = {
|
||||||
name = "bar3";
|
name = "bar3";
|
||||||
position = "top";
|
position = "top";
|
||||||
layer = "bottom";
|
layer = "top";
|
||||||
output = [ config.displays.d3 ];
|
output = [ config.displays.d3 ];
|
||||||
modules-left = ["sway/workspaces" "sway/window"];
|
modules-left = [
|
||||||
|
"sway/workspaces"
|
||||||
|
"sway/window"
|
||||||
|
"niri/workspaces"
|
||||||
|
"niri/window"
|
||||||
|
];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"pulseaudio"
|
"pulseaudio"
|
||||||
"custom/weather"
|
"custom/weather"
|
||||||
|
@ -313,8 +301,9 @@
|
||||||
"custom/vram"
|
"custom/vram"
|
||||||
"custom/clock-short"
|
"custom/clock-short"
|
||||||
];
|
];
|
||||||
"sway/workspaces" = swayWorkspacesModule;
|
"sway/workspaces" = swayWorkspaceModule;
|
||||||
"sway/window" = swayWindowsModule;
|
"sway/window" = swayWindowsModule;
|
||||||
|
"niri/window" = swayWindowsModule;
|
||||||
"pulseaudio" = pulseModule;
|
"pulseaudio" = pulseModule;
|
||||||
"custom/weather" = weatherModule;
|
"custom/weather" = weatherModule;
|
||||||
"cpu" = cpuModule;
|
"cpu" = cpuModule;
|
||||||
|
@ -326,11 +315,21 @@
|
||||||
name = "laptop";
|
name = "laptop";
|
||||||
position = "top";
|
position = "top";
|
||||||
layer = "bottom";
|
layer = "bottom";
|
||||||
output = [ "eDP-1" "LVDS-1" "DSI-1" "HDMI-A-1" ];
|
output = [
|
||||||
modules-left = [ "sway/workspaces" "sway/window" ];
|
"eDP-1"
|
||||||
|
"LVDS-1"
|
||||||
|
"DSI-1"
|
||||||
|
"HDMI-A-1"
|
||||||
|
];
|
||||||
|
modules-left = [
|
||||||
|
"sway/workspaces"
|
||||||
|
"sway/window"
|
||||||
|
"niri/workspaces"
|
||||||
|
"niri/window"
|
||||||
|
];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"pulseaudio"
|
"pulseaudio"
|
||||||
"custom/media"
|
"mpd"
|
||||||
"custom/notifs"
|
"custom/notifs"
|
||||||
"custom/weather2"
|
"custom/weather2"
|
||||||
"cpu"
|
"cpu"
|
||||||
|
@ -345,10 +344,11 @@
|
||||||
"bluetooth"
|
"bluetooth"
|
||||||
"network"
|
"network"
|
||||||
];
|
];
|
||||||
"sway/workspaces" = swayWorkspacesModule;
|
"sway/workspaces" = swayWorkspaceModule;
|
||||||
"sway/window" = swayWindowsModule;
|
"sway/window" = swayWindowsModule;
|
||||||
|
"niri/window" = swayWindowsModule;
|
||||||
"pulseaudio" = pulseModule;
|
"pulseaudio" = pulseModule;
|
||||||
"custom/media" = mediaModule;
|
"mpd" = mediaModule;
|
||||||
"custom/notifs" = notificationModule;
|
"custom/notifs" = notificationModule;
|
||||||
"custom/weather2" = weatherModule;
|
"custom/weather2" = weatherModule;
|
||||||
"cpu" = cpuModule;
|
"cpu" = cpuModule;
|
||||||
|
@ -397,7 +397,7 @@
|
||||||
border-bottom: 3px solid transparent;
|
border-bottom: 3px solid transparent;
|
||||||
min-width: 20px;
|
min-width: 20px;
|
||||||
}
|
}
|
||||||
#workspaces button.visible {
|
#workspaces button.visible, #workspaces button.active {
|
||||||
border-bottom: 3px solid #${config.look.colors.prime};
|
border-bottom: 3px solid #${config.look.colors.prime};
|
||||||
background: #${config.look.colors.mid};
|
background: #${config.look.colors.mid};
|
||||||
}
|
}
|
||||||
|
@ -411,7 +411,7 @@
|
||||||
#scratchpad {
|
#scratchpad {
|
||||||
margin-left: 2px;
|
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;
|
margin: 0 5px 0 2px;
|
||||||
}
|
}
|
||||||
#cpu {
|
#cpu {
|
||||||
|
@ -423,9 +423,12 @@
|
||||||
#custom-vram {
|
#custom-vram {
|
||||||
border-bottom: 3px solid #33FF00;
|
border-bottom: 3px solid #33FF00;
|
||||||
}
|
}
|
||||||
#custom-media {
|
#mpd {
|
||||||
border-bottom: 3px solid #ffb066;
|
border-bottom: 3px solid #ffb066;
|
||||||
}
|
}
|
||||||
|
#mpd.paused {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
#custom-clock-long {
|
#custom-clock-long {
|
||||||
border-bottom: 3px solid #0a6cf5;
|
border-bottom: 3px solid #0a6cf5;
|
||||||
}
|
}
|
||||||
|
@ -438,9 +441,6 @@
|
||||||
#battery {
|
#battery {
|
||||||
border-bottom: 3px solid #fcfc16;
|
border-bottom: 3px solid #fcfc16;
|
||||||
}
|
}
|
||||||
#custom-media.paused {
|
|
||||||
color: #888;
|
|
||||||
}
|
|
||||||
#custom-weather {
|
#custom-weather {
|
||||||
border-bottom: 3px solid #3823C4;
|
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"; }];
|
bars = [{ command = "waybar"; }];
|
||||||
|
|
||||||
startup = [
|
startup = [
|
||||||
# Lock on startup
|
|
||||||
{ command = "swaylock"; }
|
|
||||||
|
|
||||||
# Scratchpads
|
# Scratchpads
|
||||||
{ command = "foot -a gotop -T Gotop gotop"; }
|
{ command = "foot -a gotop -T Gotop gotop"; }
|
||||||
{ command = "foot -a music -T Music ncmpcpp"; }
|
{ command = "foot -a music -T Music ncmpcpp"; }
|
||||||
{ command = "foot -a sound -T Sound pulsemixer"; }
|
{ command = "foot -a sound -T Sound pulsemixer"; }
|
||||||
{ command = "easyeffects"; }
|
|
||||||
|
|
||||||
# Daemons and tray apps
|
# Daemons and tray apps
|
||||||
|
{ command = "hyprpaper"; }
|
||||||
{ command = "wl-paste -t text --watch clipman store -P"; }
|
{ command = "wl-paste -t text --watch clipman store -P"; }
|
||||||
{ command = "wl-copy"; }
|
{ command = "wl-copy"; }
|
||||||
{ command = "mako"; }
|
{ command = "mako"; }
|
||||||
{ command = "sunshine"; }
|
{ command = "sunshine"; }
|
||||||
|
{ command = "xwayland-satellite"; }
|
||||||
# Polkit agent
|
|
||||||
{ command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; }
|
{ command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; }
|
||||||
|
|
||||||
# Foreground apps
|
# Foreground apps
|
||||||
{ command = "librewolf -P Misc --name=MiscBrowser"; }
|
{ command = "librewolf -P Misc --name=MiscBrowser"; }
|
||||||
{ command = "vesktop"; }
|
{ command = "vesktop"; }
|
||||||
{ command = "fractal"; }
|
{ command = "fractal"; }
|
||||||
|
{ command = "telegram-desktop"; }
|
||||||
{ command = "thunderbird"; }
|
{ command = "thunderbird"; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,17 +2,16 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./autostart
|
./autostart
|
||||||
./hardware
|
|
||||||
./hotkeys
|
./hotkeys
|
||||||
|
./inputs
|
||||||
|
./outputs
|
||||||
./programs
|
./programs
|
||||||
./rules
|
./rules
|
||||||
./swayshot
|
|
||||||
./swaysleep
|
|
||||||
./theme
|
./theme
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = config.home.sway.enable;
|
||||||
package = null;
|
package = null;
|
||||||
wrapperFeatures.gtk = true;
|
wrapperFeatures.gtk = true;
|
||||||
checkConfig = false;
|
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";
|
primeMod = "Mod4";
|
||||||
secMod = "Mod1";
|
secMod = "Mod1";
|
||||||
resizeAmount = "55";
|
resizeAmount = "55";
|
||||||
sendNotif = "notify-send --expire-time=1500";
|
|
||||||
in {
|
in {
|
||||||
# Hotkeys
|
# Hotkeys
|
||||||
modifier = "${primeMod}";
|
modifier = "${primeMod}";
|
||||||
keybindings = let
|
keybindings = {
|
||||||
# Define scripts specific to Sway
|
## Launchers
|
||||||
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')
|
|
||||||
|
|
||||||
# Toggle between "normal" (default) and "pixel ${config.look.border.string}" border styles
|
# Browser profiles
|
||||||
if [ "$current_style" == "none" ]; then
|
"${primeMod}+F1" = ''exec librewolf -p Main --name MainBrowser | notify-send "Main Browser"'';
|
||||||
swaymsg "sticky disable, border pixel ${config.look.border.string}"
|
"${primeMod}+F2" = ''exec librewolf -p Alt --name AltBrowser | notify-send "Alternate Browser"'';
|
||||||
else
|
"${primeMod}+F3" = ''exec librewolf -p Misc --name MiscBrowser | notify-send "Miscellaneous Browser"'';
|
||||||
swaymsg "sticky enable, border none"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Kill a window or probe it for info
|
# Virtual machines
|
||||||
swayTools = pkgs.writeScript "swaytools" ''
|
"${primeMod}+F4" = ''exec virt-manager | notify-send "Virtual Machines"'';
|
||||||
# List the app name and whether or not it uses wayland
|
"${primeMod}+F5" = ''exec looking-glass-client input:rawMouse=yes | notify-send "Looking Glass"'';
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
# Kill a selected window
|
# Mod + key
|
||||||
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
|
|
||||||
"${primeMod}+s" = ''exec rofi -show run -p Command'';
|
"${primeMod}+s" = ''exec rofi -show run -p Command'';
|
||||||
"${primeMod}+c" = ''exec clipman pick -t rofi'';
|
"${primeMod}+c" = ''exec clipman pick -t rofi'';
|
||||||
"${primeMod}+x" = ''exec rofiscripts --power'';
|
"${primeMod}+x" = ''exec rofiscripts --power'';
|
||||||
"${primeMod}+b" = ''exec pkill -USR1 waybar'';
|
"${primeMod}+b" = ''exec pkill -USR1 waybar'';
|
||||||
"${primeMod}+Return" = ''exec foot'';
|
"${primeMod}+Return" = ''exec foot'';
|
||||||
"${primeMod}+Escape" = ''exec ${swayTools} --kill'';
|
"${primeMod}+Escape" = ''exec tools-sway --kill'';
|
||||||
"${primeMod}+Delete" = ''exec foot ranger /etc/nixos | ${sendNotif} "Nix Config"'';
|
|
||||||
|
|
||||||
# Mod + shift + key
|
# Mod + shift + key
|
||||||
"${primeMod}+Shift+s" = ''exec rofi -show drun -modi drun -drun-display-format {name} -show-icons -disable-history'';
|
"${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+t" = ''exec pcmanfm'';
|
||||||
"${primeMod}+Shift+e" = ''exec BEMOJI_PICKER_CMD="rofi -dmenu -i -p Emoji" bemoji -n -P 0'';
|
"${primeMod}+Shift+e" = ''exec bemoji -n -P 0'';
|
||||||
"${primeMod}+Shift+b" = ''exec rofi-bluetooth'';
|
"${primeMod}+Shift+b" = ''exec rofi-bluetooth'';
|
||||||
"${primeMod}+Shift+Return" = ''exec foot ranger'';
|
"${primeMod}+Shift+Return" = ''exec foot ranger'';
|
||||||
|
|
||||||
# Mod + ctrl + key
|
# Mod + ctrl + key
|
||||||
"${primeMod}+Ctrl+x" = ''exec ${swayTools} --prop'';
|
"${primeMod}+Ctrl+x" = ''exec tools-sway --prop'';
|
||||||
"${primeMod}+Ctrl+c" = ''exec ${pkgs.hyprpicker}/bin/hyprpicker -an && ${sendNotif} "Color copied to clipboard"'';
|
"${primeMod}+Ctrl+s" = ''exec rofiscripts --scratchpads'';
|
||||||
"${primeMod}+Ctrl+Prior" = ''exec ${pkgs.obs-cmd}/bin/obs-cmd scene switch "Main"'';
|
"${primeMod}+Ctrl+c" = ''exec wlpicker && notify-send "Color copied to clipboard"'';
|
||||||
"${primeMod}+Ctrl+Next" = ''exec ${pkgs.obs-cmd}/bin/obs-cmd scene switch "Guest"'';
|
|
||||||
|
|
||||||
## Media keys
|
## Media
|
||||||
|
|
||||||
# Volume control
|
# Volume
|
||||||
"${secMod}+j" = ''exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-'';
|
"${secMod}+j" = ''exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-'';
|
||||||
"${secMod}+k" = ''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'';
|
"${primeMod}+Backslash" = ''exec mpc toggle'';
|
||||||
"${secMod}+Shift+h" = ''exec mpc prev'';
|
"${secMod}+Shift+h" = ''exec mpc prev'';
|
||||||
"${secMod}+Shift+j" = ''exec mpc volume -3'';
|
"${secMod}+Shift+j" = ''exec mpc volume -3'';
|
||||||
"${secMod}+Shift+k" = ''exec mpc volume +3'';
|
"${secMod}+Shift+k" = ''exec mpc volume +3'';
|
||||||
"${secMod}+Shift+l" = ''exec mpc next'';
|
"${secMod}+Shift+l" = ''exec mpc next'';
|
||||||
|
|
||||||
## Notification keys
|
## Miscellaneous
|
||||||
|
|
||||||
# Toggle mako
|
# Notifications
|
||||||
"${primeMod}+n" = ''exec makotoggle'';
|
"${primeMod}+n" = ''exec makotoggle'';
|
||||||
"${primeMod}+Shift+n" = ''exec makoctl restore'';
|
"${primeMod}+Shift+n" = ''exec makoctl restore'';
|
||||||
"${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a'';
|
"${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a'';
|
||||||
|
|
||||||
## Miscellaneous keys
|
|
||||||
|
|
||||||
# Screenshots
|
# Screenshots
|
||||||
"${secMod}+f" = ''exec swayshot --swappy'';
|
"${secMod}+f" = ''exec screen-sway --swappy'';
|
||||||
"${secMod}+Shift+f" = ''exec swayshot --screen'';
|
"${secMod}+Shift+f" = ''exec screen-sway --screen'';
|
||||||
|
|
||||||
# SSH
|
# Display and keyboard brightness
|
||||||
"${primeMod}+${secMod}+Return" = ''exec foot ssh ${config.ips.server}'';
|
|
||||||
|
|
||||||
# Display Brightness and Keyboard Brightness
|
|
||||||
"${primeMod}+equal" = ''exec light -A 5'';
|
"${primeMod}+equal" = ''exec light -A 5'';
|
||||||
"${primeMod}+minus" = ''exec light -U 5'';
|
"${primeMod}+minus" = ''exec light -U 5'';
|
||||||
"${primeMod}+Shift+equal" = ''exec light -A 1'';
|
"${primeMod}+Shift+equal" = ''exec light -A 1'';
|
||||||
|
@ -126,81 +72,78 @@
|
||||||
"XF86KbdBrightnessUp" = ''exec light -s sysfs/leds/smc::kbd_backlight -A 5'';
|
"XF86KbdBrightnessUp" = ''exec light -s sysfs/leds/smc::kbd_backlight -A 5'';
|
||||||
"XF86KbdBrightnessDown" = ''exec light -s sysfs/leds/smc::kbd_backlight -U 5'';
|
"XF86KbdBrightnessDown" = ''exec light -s sysfs/leds/smc::kbd_backlight -U 5'';
|
||||||
|
|
||||||
## Window manager keys
|
## Window manager
|
||||||
"${primeMod}+q" = ''kill'';
|
"${primeMod}+q" = ''kill'';
|
||||||
"${primeMod}+Shift+r" = ''reload'';
|
"${primeMod}+Shift+r" = ''reload'';
|
||||||
|
|
||||||
# Switch to workspaces
|
# Switch to workspaces
|
||||||
"${primeMod}+grave" = ''workspace ${config.ws.w0}'';
|
"${primeMod}+grave" = ''workspace 0:${config.ws.w0}'';
|
||||||
"${primeMod}+1" = ''workspace ${config.ws.w1}'';
|
"${primeMod}+1" = ''workspace 1:${config.ws.w1}'';
|
||||||
"${primeMod}+2" = ''workspace ${config.ws.w2}'';
|
"${primeMod}+2" = ''workspace 2:${config.ws.w2}'';
|
||||||
"${primeMod}+3" = ''workspace ${config.ws.w3}'';
|
"${primeMod}+3" = ''workspace 3:${config.ws.w3}'';
|
||||||
"${primeMod}+4" = ''workspace ${config.ws.w4}'';
|
"${primeMod}+4" = ''workspace 4:${config.ws.w4}'';
|
||||||
"${primeMod}+5" = ''workspace ${config.ws.w5}'';
|
"${primeMod}+5" = ''workspace 5:${config.ws.w5}'';
|
||||||
"${primeMod}+6" = ''workspace ${config.ws.w6}'';
|
"${primeMod}+6" = ''workspace 6:${config.ws.w6}'';
|
||||||
"${primeMod}+7" = ''workspace ${config.ws.w7}'';
|
"${primeMod}+7" = ''workspace 7:${config.ws.w7}'';
|
||||||
"${primeMod}+8" = ''workspace ${config.ws.w8}'';
|
"${primeMod}+8" = ''workspace 8:${config.ws.w8}'';
|
||||||
"${primeMod}+9" = ''workspace ${config.ws.w9}'';
|
"${primeMod}+9" = ''workspace 9:${config.ws.w9}'';
|
||||||
|
|
||||||
# Switch to alternate workspaces
|
# Switch to alternate workspaces
|
||||||
"${secMod}+F1" = ''workspace ${config.ws.w1a}'';
|
"${secMod}+F1" = ''workspace 11:${config.ws.w1a}'';
|
||||||
"${secMod}+F2" = ''workspace ${config.ws.w2a}'';
|
"${secMod}+F2" = ''workspace 22:${config.ws.w2a}'';
|
||||||
"${secMod}+F3" = ''workspace ${config.ws.w3a}'';
|
"${secMod}+F3" = ''workspace 33:${config.ws.w3a}'';
|
||||||
"${secMod}+F4" = ''workspace ${config.ws.w4a}'';
|
"${secMod}+F4" = ''workspace 44:${config.ws.w4a}'';
|
||||||
"${secMod}+F5" = ''workspace ${config.ws.w5a}'';
|
"${secMod}+F5" = ''workspace 55:${config.ws.w5a}'';
|
||||||
"${secMod}+F6" = ''workspace ${config.ws.w6a}'';
|
"${secMod}+F6" = ''workspace 66:${config.ws.w6a}'';
|
||||||
"${secMod}+F7" = ''workspace ${config.ws.w7a}'';
|
"${secMod}+F7" = ''workspace 77:${config.ws.w7a}'';
|
||||||
"${secMod}+F8" = ''workspace ${config.ws.w8a}'';
|
"${secMod}+F8" = ''workspace 88:${config.ws.w8a}'';
|
||||||
"${secMod}+F9" = ''workspace ${config.ws.w9a}'';
|
"${secMod}+F9" = ''workspace 99:${config.ws.w9a}'';
|
||||||
|
|
||||||
# Move window to and focus new workspace
|
# Move window to and focus workspace
|
||||||
"${primeMod}+Shift+grave" = ''move container to workspace ${config.ws.w0}; workspace ${config.ws.w0}'';
|
"${primeMod}+Shift+grave" = ''move container to workspace 0:${config.ws.w0}; workspace 0:${config.ws.w0}'';
|
||||||
"${primeMod}+Shift+1" = ''move container to workspace ${config.ws.w1}; workspace ${config.ws.w1}'';
|
"${primeMod}+Shift+1" = ''move container to workspace 1:${config.ws.w1}; workspace 1:${config.ws.w1}'';
|
||||||
"${primeMod}+Shift+2" = ''move container to workspace ${config.ws.w2}; workspace ${config.ws.w2}'';
|
"${primeMod}+Shift+2" = ''move container to workspace 2:${config.ws.w2}; workspace 2:${config.ws.w2}'';
|
||||||
"${primeMod}+Shift+3" = ''move container to workspace ${config.ws.w3}; workspace ${config.ws.w3}'';
|
"${primeMod}+Shift+3" = ''move container to workspace 3:${config.ws.w3}; workspace 3:${config.ws.w3}'';
|
||||||
"${primeMod}+Shift+4" = ''move container to workspace ${config.ws.w4}; workspace ${config.ws.w4}'';
|
"${primeMod}+Shift+4" = ''move container to workspace 4:${config.ws.w4}; workspace 4:${config.ws.w4}'';
|
||||||
"${primeMod}+Shift+5" = ''move container to workspace ${config.ws.w5}; workspace ${config.ws.w5}'';
|
"${primeMod}+Shift+5" = ''move container to workspace 5:${config.ws.w5}; workspace 5:${config.ws.w5}'';
|
||||||
"${primeMod}+Shift+6" = ''move container to workspace ${config.ws.w6}; workspace ${config.ws.w6}'';
|
"${primeMod}+Shift+6" = ''move container to workspace 6:${config.ws.w6}; workspace 6:${config.ws.w6}'';
|
||||||
"${primeMod}+Shift+7" = ''move container to workspace ${config.ws.w7}; workspace ${config.ws.w7}'';
|
"${primeMod}+Shift+7" = ''move container to workspace 7:${config.ws.w7}; workspace 7:${config.ws.w7}'';
|
||||||
"${primeMod}+Shift+8" = ''move container to workspace ${config.ws.w8}; workspace ${config.ws.w8}'';
|
"${primeMod}+Shift+8" = ''move container to workspace 8:${config.ws.w8}; workspace 8:${config.ws.w8}'';
|
||||||
"${primeMod}+Shift+9" = ''move container to workspace ${config.ws.w9}; workspace ${config.ws.w9}'';
|
"${primeMod}+Shift+9" = ''move container to workspace 9:${config.ws.w9}; workspace 9:${config.ws.w9}'';
|
||||||
|
|
||||||
# Move window to and focus new alternate workspace
|
# Move window to and focus alternate workspace
|
||||||
"${secMod}+Shift+F1" = ''move container to workspace ${config.ws.w1a}; workspace ${config.ws.w1a}'';
|
"${secMod}+Shift+F1" = ''move container to workspace 11:${config.ws.w1a}; workspace 11:${config.ws.w1a}'';
|
||||||
"${secMod}+Shift+F2" = ''move container to workspace ${config.ws.w2a}; workspace ${config.ws.w2a}'';
|
"${secMod}+Shift+F2" = ''move container to workspace 22:${config.ws.w2a}; workspace 22:${config.ws.w2a}'';
|
||||||
"${secMod}+Shift+F3" = ''move container to workspace ${config.ws.w3a}; workspace ${config.ws.w3a}'';
|
"${secMod}+Shift+F3" = ''move container to workspace 33:${config.ws.w3a}; workspace 33:${config.ws.w3a}'';
|
||||||
"${secMod}+Shift+F4" = ''move container to workspace ${config.ws.w4a}; workspace ${config.ws.w4a}'';
|
"${secMod}+Shift+F4" = ''move container to workspace 44:${config.ws.w4a}; workspace 44:${config.ws.w4a}'';
|
||||||
"${secMod}+Shift+F5" = ''move container to workspace ${config.ws.w5a}; workspace ${config.ws.w5a}'';
|
"${secMod}+Shift+F5" = ''move container to workspace 55:${config.ws.w5a}; workspace 55:${config.ws.w5a}'';
|
||||||
"${secMod}+Shift+F6" = ''move container to workspace ${config.ws.w6a}; workspace ${config.ws.w6a}'';
|
"${secMod}+Shift+F6" = ''move container to workspace 66:${config.ws.w6a}; workspace 66:${config.ws.w6a}'';
|
||||||
"${secMod}+Shift+F7" = ''move container to workspace ${config.ws.w7a}; workspace ${config.ws.w7a}'';
|
"${secMod}+Shift+F7" = ''move container to workspace 77:${config.ws.w7a}; workspace 77:${config.ws.w7a}'';
|
||||||
"${secMod}+Shift+F8" = ''move container to workspace ${config.ws.w8a}; workspace ${config.ws.w8a}'';
|
"${secMod}+Shift+F8" = ''move container to workspace 88:${config.ws.w8a}; workspace 88:${config.ws.w8a}'';
|
||||||
"${secMod}+Shift+F9" = ''move container to workspace ${config.ws.w9a}; workspace ${config.ws.w9a}'';
|
"${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}+h" = ''focus left'';
|
||||||
"${primeMod}+j" = ''focus down'';
|
"${primeMod}+j" = ''focus down'';
|
||||||
"${primeMod}+k" = ''focus up'';
|
"${primeMod}+k" = ''focus up'';
|
||||||
"${primeMod}+l" = ''focus right'';
|
"${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
|
# Move focused window
|
||||||
"${primeMod}+Shift+h" = ''move left ${resizeAmount} px'';
|
"${primeMod}+Shift+h" = ''move left ${resizeAmount} px'';
|
||||||
"${primeMod}+Shift+j" = ''move down ${resizeAmount} px'';
|
"${primeMod}+Shift+j" = ''move down ${resizeAmount} px'';
|
||||||
"${primeMod}+Shift+k" = ''move up ${resizeAmount} px'';
|
"${primeMod}+Shift+k" = ''move up ${resizeAmount} px'';
|
||||||
"${primeMod}+Shift+l" = ''move right ${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
|
# Change focus between floating/tiled, toggle floating
|
||||||
"${primeMod}+space" = ''focus mode_toggle'';
|
"${primeMod}+space" = ''focus mode_toggle'';
|
||||||
"${primeMod}+Shift+space" = ''floating toggle'';
|
"${primeMod}+Shift+space" = ''floating toggle'';
|
||||||
|
|
||||||
# Allow a window to be visible on all workspaces, toggle border
|
|
||||||
"${primeMod}+0" = ''exec ${pinWindow}'';
|
|
||||||
|
|
||||||
# Toggle fullscreen
|
# Toggle fullscreen
|
||||||
"${primeMod}+f" = ''fullscreen toggle'';
|
"${primeMod}+f" = ''fullscreen toggle'';
|
||||||
"${primeMod}+${secMod}+Ctrl+f" = ''fullscreen toggle global'';
|
"${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'';
|
"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+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+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, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
imports = [
|
||||||
clipman
|
./screen-sway
|
||||||
swaybg
|
./sleep-sway
|
||||||
libnotify
|
./tools-sway
|
||||||
grim
|
|
||||||
slurp
|
|
||||||
swappy
|
|
||||||
lm_sensors
|
|
||||||
wl-clipboard
|
|
||||||
wdisplays
|
|
||||||
jq
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
./swappy
|
|
||||||
];
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
(pkgs.writeScriptBin "swayshot" ''
|
(pkgs.writeScriptBin "screen-sway" ''
|
||||||
# Swappy
|
swappy() {
|
||||||
handle_swappy() {
|
|
||||||
# Create an imv window to act as a static screen
|
# Create an imv window to act as a static screen
|
||||||
grim -t jpeg -q 90 - | imv -w "GlobalShot" - & imv_pid=$!
|
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)
|
| XCURSOR_SIZE=40 slurp -w ${config.look.border.string} -c ${config.look.colors.prime} -B 00000066 -b 00000099)
|
||||||
temp_file=$(mktemp -u).png
|
temp_file=$(mktemp -u).png
|
||||||
grim -g "$selected_area" "$temp_file"
|
grim -g "$selected_area" "$temp_file"
|
||||||
|
|
||||||
# Kill the imv window
|
|
||||||
kill $imv_pid
|
kill $imv_pid
|
||||||
|
|
||||||
# Copy the screenshot to the clipboard
|
# Copy the screenshot to the clipboard and clear the temp
|
||||||
swappy -f - < "$temp_file"
|
${pkgs.swappy}/bin/swappy -f - < "$temp_file"
|
||||||
|
|
||||||
# Clean up the temporary file
|
|
||||||
rm "$temp_file"
|
rm "$temp_file"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Screen
|
screen() {
|
||||||
handle_screen() {
|
|
||||||
# Take a screenshot and save it to the temporary file
|
|
||||||
temp_file=$(mktemp -u).png
|
temp_file=$(mktemp -u).png
|
||||||
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') "$temp_file"
|
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') "$temp_file"
|
||||||
|
|
||||||
# Check if the screenshot was successfully taken
|
# Check if the screenshot was successfully taken
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
# Copy the screenshot to the clipboard
|
|
||||||
wl-copy < "$temp_file"
|
wl-copy < "$temp_file"
|
||||||
|
|
||||||
# Show a notification with the screenshot
|
|
||||||
notify-send -i "$temp_file" "Current screen copied."
|
notify-send -i "$temp_file" "Current screen copied."
|
||||||
|
|
||||||
# Remove the temporary file
|
|
||||||
rm "$temp_file"
|
rm "$temp_file"
|
||||||
else
|
else
|
||||||
# If the screenshot capture failed, show an error notification
|
|
||||||
notify-send "Error: Unable to capture screenshot."
|
notify-send "Error: Unable to capture screenshot."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check for command-line arguments
|
|
||||||
if [ "$1" == "--swappy" ]; then
|
if [ "$1" == "--swappy" ]; then
|
||||||
handle_swappy
|
swappy
|
||||||
elif [ "$1" == "--screen" ]; then
|
elif [ "$1" == "--screen" ]; then
|
||||||
handle_screen
|
screen
|
||||||
else
|
else
|
||||||
echo "Please use the arguments --swappy or --screen."
|
echo "Please use the arguments --swappy or --screen."
|
||||||
fi
|
fi
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
(pkgs.writeScriptBin "swaysleep" ''
|
(pkgs.writeScriptBin "sleep-sway" ''
|
||||||
swaylock & ${pkgs.swayidle}/bin/swayidle -w \
|
swaylock & ${pkgs.swayidle}/bin/swayidle -w \
|
||||||
timeout 1 'swaymsg "output * dpms off"' \
|
timeout 1 'swaymsg "output * dpms off"' \
|
||||||
resume 'swaymsg "output * dpms on"; pkill -9 swayidle'
|
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