Compare commits
17 commits
2f78903651
...
1aed4c8c73
Author | SHA1 | Date | |
---|---|---|---|
1aed4c8c73 | |||
31f8470c94 | |||
48646441dd | |||
e6d85b157e | |||
db86039b20 | |||
a367890961 | |||
32d1553b4a | |||
b22a3fb2a2 | |||
0abea95956 | |||
566734e009 | |||
d6859a553a | |||
1bcd27d06e | |||
dd41c57304 | |||
003d9dc60b | |||
6bac40e352 | |||
b7bb3eeaa6 | |||
b8ef379dc1 |
183 changed files with 2645 additions and 2967 deletions
|
@ -3,86 +3,75 @@
|
|||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
age.secrets =
|
||||
let
|
||||
secret = filename: {
|
||||
file = "${inputs.self}/secrets/${filename}";
|
||||
};
|
||||
in
|
||||
{
|
||||
"common/nix/access-tokens.conf" = secret "common/nix/access-tokens.conf";
|
||||
}: {
|
||||
age.secrets = let
|
||||
secret = filename: {
|
||||
file = "${inputs.self}/secrets/${filename}";
|
||||
};
|
||||
in {
|
||||
"common/nix/access-tokens.conf" = secret "common/nix/access-tokens.conf";
|
||||
};
|
||||
|
||||
### NixOS
|
||||
nixpkgs =
|
||||
let
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
nixpkgs = let
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
|
||||
allowInsecurePredicate =
|
||||
pkg:
|
||||
let
|
||||
name = lib.getName pkg;
|
||||
in
|
||||
# HACK: Allow all insecure electron versions
|
||||
name == "electron"
|
||||
allowInsecurePredicate = pkg: let
|
||||
name = lib.getName pkg;
|
||||
in
|
||||
# HACK: Allow all insecure electron versions
|
||||
name
|
||||
== "electron"
|
||||
# HACK: Some Matrix clients rely on libolm, which is deprecated
|
||||
# https://github.com/NixOS/nixpkgs/pull/334638
|
||||
|| name == "cinny"
|
||||
|| name == "cinny-unwrapped"
|
||||
|| name == "fluffychat-linux"
|
||||
|| name == "olm"
|
||||
|| name == "openssl"; # Cisco Packet Tracer
|
||||
};
|
||||
in {
|
||||
inherit config;
|
||||
|
||||
# HACK: Some Matrix clients rely on libolm, which is deprecated
|
||||
# https://github.com/NixOS/nixpkgs/pull/334638
|
||||
|| name == "cinny"
|
||||
|| name == "cinny-unwrapped"
|
||||
|| name == "fluffychat-linux"
|
||||
|| name == "olm"
|
||||
|| name == "openssl"; # Cisco Packet Tracer
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit config;
|
||||
|
||||
overlays = [
|
||||
(
|
||||
final: prev:
|
||||
let
|
||||
nixpkgs =
|
||||
branch:
|
||||
import inputs."nixpkgs-${branch}" {
|
||||
inherit config;
|
||||
system = prev.system;
|
||||
};
|
||||
|
||||
stable = nixpkgs "stable";
|
||||
unstable = nixpkgs "unstable";
|
||||
staging-next = nixpkgs "staging-next";
|
||||
local = nixpkgs "local";
|
||||
in
|
||||
{
|
||||
# Overlay nixpkgs branches
|
||||
#?? nixpkgs.BRANCH.PACKAGE
|
||||
inherit stable unstable staging-next;
|
||||
|
||||
# Hypr*
|
||||
hypridle = inputs.hypridle.packages.${prev.system}.default;
|
||||
hyprland = inputs.hyprland.packages.${prev.system}.default;
|
||||
hyprlock = inputs.hyprlock.packages.${prev.system}.default;
|
||||
|
||||
# TODO: Remove when merged into unstable
|
||||
# https://github.com/NixOS/nixpkgs/pull/338836
|
||||
xdg-desktop-portal-hyprland =
|
||||
inputs.xdg-desktop-portal-hyprland.packages.${prev.system}.xdg-desktop-portal-hyprland;
|
||||
|
||||
hyprlandPlugins = {
|
||||
hyprbars = inputs.hyprland-plugins.packages.${prev.system}.hyprbars;
|
||||
overlays = [
|
||||
(
|
||||
final: prev: let
|
||||
nixpkgs = branch:
|
||||
import inputs."nixpkgs-${branch}" {
|
||||
inherit config;
|
||||
system = prev.system;
|
||||
};
|
||||
|
||||
# Development
|
||||
ciscoPacketTracer8 = local.ciscoPacketTracer8;
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
stable = nixpkgs "stable";
|
||||
unstable = nixpkgs "unstable";
|
||||
staging-next = nixpkgs "staging-next";
|
||||
local = nixpkgs "local";
|
||||
in {
|
||||
# Overlay nixpkgs branches
|
||||
#?? nixpkgs.BRANCH.PACKAGE
|
||||
inherit stable unstable staging-next;
|
||||
|
||||
# Hypr*
|
||||
hypridle = inputs.hypridle.packages.${prev.system}.default;
|
||||
hyprland = inputs.hyprland.packages.${prev.system}.default;
|
||||
hyprlock = inputs.hyprlock.packages.${prev.system}.default;
|
||||
|
||||
# TODO: Remove when merged into unstable
|
||||
# https://github.com/NixOS/nixpkgs/pull/338836
|
||||
xdg-desktop-portal-hyprland =
|
||||
inputs.xdg-desktop-portal-hyprland.packages.${prev.system}.xdg-desktop-portal-hyprland;
|
||||
|
||||
hyprlandPlugins = {
|
||||
hyprbars = inputs.hyprland-plugins.packages.${prev.system}.hyprbars;
|
||||
};
|
||||
|
||||
# Development
|
||||
ciscoPacketTracer8 = local.ciscoPacketTracer8;
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
|
||||
nix = {
|
||||
#!! Override upstream nix
|
||||
|
|
260
flake.in.nix
260
flake.in.nix
|
@ -6,133 +6,124 @@
|
|||
#?? nix run .#genflake flake.nix
|
||||
# TODO: Remove flakegen hook when nix expressions are officially implemented
|
||||
# https://github.com/NixOS/nix/issues/3966
|
||||
|
||||
{
|
||||
# https://wiki.nixos.org/wiki/Flakes
|
||||
# https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake.html
|
||||
inputs =
|
||||
let
|
||||
flake = url: { inherit url; };
|
||||
follows = input: { inputs.${input}.follows = input; };
|
||||
stable = input: { inputs.${input}.follows = "${input}-stable"; };
|
||||
unstable = input: { inputs.${input}.follows = "${input}-unstable"; };
|
||||
inputs = let
|
||||
flake = url: {inherit url;};
|
||||
follows = input: {inputs.${input}.follows = input;};
|
||||
stable = input: {inputs.${input}.follows = "${input}-stable";};
|
||||
unstable = input: {inputs.${input}.follows = "${input}-unstable";};
|
||||
|
||||
source = url: {
|
||||
inherit url;
|
||||
flake = false;
|
||||
};
|
||||
in
|
||||
{
|
||||
#?? branch = "git+https://REPO?ref=BRANCH"
|
||||
#?? commit = "git+https://REPO?ref=BRANCH&rev=COMMIT"
|
||||
#?? tag = "git+https://REPO?ref=refs/tags/TAG"
|
||||
|
||||
### Standalone
|
||||
nixos-hardware = flake "github:NixOS/nixos-hardware";
|
||||
|
||||
### Stable
|
||||
nixpkgs-stable = flake "github:NixOS/nixpkgs/nixos-24.05";
|
||||
|
||||
# Common flakes
|
||||
home-manager-stable = flake "github:nix-community/home-manager/release-24.05" // stable "nixpkgs";
|
||||
nix-index-database-stable = flake "github:nix-community/nix-index-database" // stable "nixpkgs";
|
||||
|
||||
# Desktop flakes
|
||||
aagl-gtk-on-nix-stable = flake "github:ezKEa/aagl-gtk-on-nix/release-24.05" // stable "nixpkgs";
|
||||
|
||||
### Unstable
|
||||
nixpkgs-unstable = flake "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
# Common flakes
|
||||
agenix = flake "github:ryantm/agenix" // unstable "nixpkgs";
|
||||
arion = flake "github:hercules-ci/arion" // unstable "nixpkgs";
|
||||
compose2nix = flake "github:aksiksi/compose2nix" // unstable "nixpkgs";
|
||||
disko = flake "github:nix-community/disko" // unstable "nixpkgs";
|
||||
home-manager-unstable = flake "github:nix-community/home-manager" // unstable "nixpkgs";
|
||||
nix-index-database-unstable = flake "github:nix-community/nix-index-database" // unstable "nixpkgs";
|
||||
|
||||
# Console flakes
|
||||
jovian-nixos = flake "github:Jovian-Experiments/Jovian-NixOS" // unstable "nixpkgs";
|
||||
|
||||
# Desktop flakes
|
||||
aagl-gtk-on-nix-unstable = flake "github:ezKEa/aagl-gtk-on-nix" // unstable "nixpkgs";
|
||||
ags = flake "github:Aylur/ags" // unstable "nixpkgs";
|
||||
anyrun = flake "github:Kirottu/anyrun" // unstable "nixpkgs";
|
||||
bitwarden-menu = flake "github:firecat53/bitwarden-menu" // unstable "nixpkgs";
|
||||
fw-fanctrl = flake "github:TamtamHero/fw-fanctrl/packaging/nix" // unstable "nixpkgs";
|
||||
hypridle = flake "github:hyprwm/hypridle" // unstable "nixpkgs";
|
||||
#// hyprland = flake "git+https://github.com/hyprwm/Hyprland?submodules=1" // unstable "nixpkgs";
|
||||
hyprland =
|
||||
flake "git+https://github.com/hyprwm/Hyprland?ref=refs/tags/v0.43.0&submodules=1"
|
||||
// unstable "nixpkgs";
|
||||
#// hyprland =
|
||||
#// flake "git+https://github.com/UjinT34/Hyprland?ref=vrr-cursor-fix&submodules=1"
|
||||
#// // unstable "nixpkgs";
|
||||
hyprland-contrib = flake "github:hyprwm/contrib" // unstable "nixpkgs";
|
||||
hyprland-plugins =
|
||||
flake "github:hyprwm/hyprland-plugins" // unstable "nixpkgs" // follows "hyprland";
|
||||
hyprlock = flake "github:hyprwm/hyprlock" // unstable "nixpkgs";
|
||||
hyprpaper = flake "github:hyprwm/hyprpaper" // unstable "nixpkgs";
|
||||
hyprpicker = flake "github:hyprwm/hyprpicker" // unstable "nixpkgs";
|
||||
nix-flatpak = flake "github:gmodena/nix-flatpak?ref=v0.4.1";
|
||||
nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs";
|
||||
nixd = flake "github:nix-community/nixd" // unstable "nixpkgs";
|
||||
xdg-desktop-portal-hyprland =
|
||||
flake "github:hyprwm/xdg-desktop-portal-hyprland"
|
||||
// unstable "nixpkgs";
|
||||
|
||||
# Server flakes
|
||||
conduwuit = flake "github:Myned/conduwuit" // unstable "nixpkgs";
|
||||
|
||||
### Staging
|
||||
nixpkgs-staging-next = flake "github:NixOS/nixpkgs/staging-next";
|
||||
|
||||
### Development
|
||||
nixpkgs-local = flake "git+file:///home/myned/.dev/nixpkgs?ref=7849cd48822de4dc0515c787b20dc85de30acdca";
|
||||
#// hyprland = flake "git+file:///home/myned/.dev/Hyprland?submodules=1";
|
||||
|
||||
### Source code
|
||||
firefox-gnome-theme = source "github:rafaelmardojai/firefox-gnome-theme/v128";
|
||||
lifx-cli = source "github:Rawa/lifx-cli";
|
||||
steamtinkerlaunch = source "github:sonic2kk/steamtinkerlaunch";
|
||||
thunderbird-gnome-theme = source "github:rafaelmardojai/thunderbird-gnome-theme";
|
||||
virtio-win = source "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.262-2/virtio-win.iso";
|
||||
source = url: {
|
||||
inherit url;
|
||||
flake = false;
|
||||
};
|
||||
in {
|
||||
#?? branch = "git+https://REPO?ref=BRANCH"
|
||||
#?? commit = "git+https://REPO?ref=BRANCH&rev=COMMIT"
|
||||
#?? tag = "git+https://REPO?ref=refs/tags/TAG"
|
||||
|
||||
### Standalone
|
||||
nixos-hardware = flake "github:NixOS/nixos-hardware";
|
||||
|
||||
### Stable
|
||||
nixpkgs-stable = flake "github:NixOS/nixpkgs/nixos-24.05";
|
||||
|
||||
# Common flakes
|
||||
home-manager-stable = flake "github:nix-community/home-manager/release-24.05" // stable "nixpkgs";
|
||||
nix-index-database-stable = flake "github:nix-community/nix-index-database" // stable "nixpkgs";
|
||||
|
||||
# Desktop flakes
|
||||
aagl-gtk-on-nix-stable = flake "github:ezKEa/aagl-gtk-on-nix/release-24.05" // stable "nixpkgs";
|
||||
|
||||
### Unstable
|
||||
nixpkgs-unstable = flake "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
# Common flakes
|
||||
agenix = flake "github:ryantm/agenix" // unstable "nixpkgs";
|
||||
arion = flake "github:hercules-ci/arion" // unstable "nixpkgs";
|
||||
compose2nix = flake "github:aksiksi/compose2nix" // unstable "nixpkgs";
|
||||
disko = flake "github:nix-community/disko" // unstable "nixpkgs";
|
||||
home-manager-unstable = flake "github:nix-community/home-manager" // unstable "nixpkgs";
|
||||
nix-index-database-unstable = flake "github:nix-community/nix-index-database" // unstable "nixpkgs";
|
||||
|
||||
# Console flakes
|
||||
jovian-nixos = flake "github:Jovian-Experiments/Jovian-NixOS" // unstable "nixpkgs";
|
||||
|
||||
# Desktop flakes
|
||||
aagl-gtk-on-nix-unstable = flake "github:ezKEa/aagl-gtk-on-nix" // unstable "nixpkgs";
|
||||
ags = flake "github:Aylur/ags" // unstable "nixpkgs";
|
||||
anyrun = flake "github:Kirottu/anyrun" // unstable "nixpkgs";
|
||||
bitwarden-menu = flake "github:firecat53/bitwarden-menu" // unstable "nixpkgs";
|
||||
fw-fanctrl = flake "github:TamtamHero/fw-fanctrl/packaging/nix" // unstable "nixpkgs";
|
||||
hypridle = flake "github:hyprwm/hypridle" // unstable "nixpkgs";
|
||||
#// hyprland = flake "git+https://github.com/hyprwm/Hyprland?submodules=1" // unstable "nixpkgs";
|
||||
hyprland = flake "git+https://github.com/hyprwm/Hyprland?ref=refs/tags/v0.43.0&submodules=1" // unstable "nixpkgs";
|
||||
#// hyprland = flake "git+https://github.com/UjinT34/Hyprland?ref=vrr-cursor-fix&submodules=1" // unstable "nixpkgs";
|
||||
hyprland-contrib = flake "github:hyprwm/contrib" // unstable "nixpkgs";
|
||||
hyprland-plugins = flake "github:hyprwm/hyprland-plugins" // unstable "nixpkgs" // follows "hyprland";
|
||||
hyprlock = flake "github:hyprwm/hyprlock" // unstable "nixpkgs";
|
||||
hyprpaper = flake "github:hyprwm/hyprpaper" // unstable "nixpkgs";
|
||||
hyprpicker = flake "github:hyprwm/hyprpicker" // unstable "nixpkgs";
|
||||
nix-flatpak = flake "github:gmodena/nix-flatpak?ref=v0.4.1";
|
||||
nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs";
|
||||
nixd = flake "github:nix-community/nixd" // unstable "nixpkgs";
|
||||
xdg-desktop-portal-hyprland = flake "github:hyprwm/xdg-desktop-portal-hyprland" // unstable "nixpkgs";
|
||||
|
||||
# Server flakes
|
||||
conduwuit = flake "github:Myned/conduwuit" // unstable "nixpkgs";
|
||||
|
||||
### Staging
|
||||
nixpkgs-staging-next = flake "github:NixOS/nixpkgs/staging-next";
|
||||
|
||||
### Development
|
||||
nixpkgs-local = flake "git+file:///home/myned/.dev/nixpkgs?ref=7849cd48822de4dc0515c787b20dc85de30acdca";
|
||||
#// hyprland = flake "git+file:///home/myned/.dev/Hyprland?submodules=1";
|
||||
|
||||
### Source code
|
||||
firefox-gnome-theme = source "github:rafaelmardojai/firefox-gnome-theme/v128";
|
||||
lifx-cli = source "github:Rawa/lifx-cli";
|
||||
steamtinkerlaunch = source "github:sonic2kk/steamtinkerlaunch";
|
||||
thunderbird-gnome-theme = source "github:rafaelmardojai/thunderbird-gnome-theme";
|
||||
virtio-win = source "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.262-2/virtio-win.iso";
|
||||
};
|
||||
|
||||
outputs = inputs: {
|
||||
# TODO: Use forAllSystems
|
||||
# FIXME: nixd always uses nixfmt when importing flakes
|
||||
# https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-fmt
|
||||
formatter.x86_64-linux = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux.nixfmt-rfc-style;
|
||||
# https://github.com/kamadorueda/alejandra/blob/main/STYLE.md
|
||||
formatter.x86_64-linux = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux.alejandra;
|
||||
|
||||
nixosConfigurations =
|
||||
let
|
||||
# TODO: Use inline modules instead of specialArgs
|
||||
# https://jade.fyi/blog/flakes-arent-real#nixos-modules
|
||||
# Boilerplate systems with global imports
|
||||
#!! There is no default nixpkgs, inputs.<nixpkgs|home-manager>-BRANCH must exist
|
||||
#?? branch = common "BRANCH" "ARCHITECTURE" [ MODULES ]
|
||||
common =
|
||||
branch: arch: modules:
|
||||
inputs."nixpkgs-${branch}".lib.nixosSystem {
|
||||
system = arch;
|
||||
nixosConfigurations = let
|
||||
# TODO: Use inline modules instead of specialArgs
|
||||
# https://jade.fyi/blog/flakes-arent-real#nixos-modules
|
||||
# Boilerplate systems with global imports
|
||||
#!! There is no default nixpkgs, inputs.<nixpkgs|home-manager>-BRANCH must exist
|
||||
#?? branch = common "BRANCH" "ARCHITECTURE" [ MODULES ]
|
||||
common = branch: arch: modules:
|
||||
inputs."nixpkgs-${branch}".lib.nixosSystem {
|
||||
system = arch;
|
||||
specialArgs = {inherit inputs;};
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
# TODO: Clean up optional attributes with each new release
|
||||
#!! Options will diverge between branches over time
|
||||
#?? with lib; optionalAttrs (versionAtLeast version "VERSION") { ... };
|
||||
modules = modules ++ [
|
||||
# TODO: Clean up optional attributes with each new release
|
||||
#!! Options will diverge between branches over time
|
||||
#?? with lib; optionalAttrs (versionAtLeast version "VERSION") { ... };
|
||||
modules =
|
||||
modules
|
||||
++ [
|
||||
./options
|
||||
./configuration.nix
|
||||
|
||||
#!! Avoid globally importing modules that are not guarded by .enable
|
||||
# https://github.com/NixOS/nixpkgs/issues/137168
|
||||
(
|
||||
{ config, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs."aagl-gtk-on-nix-${branch}".nixosModules.default
|
||||
inputs."home-manager-${branch}".nixosModules.home-manager
|
||||
|
@ -150,44 +141,21 @@
|
|||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
#?? system = branch "ARCHITECTURE" [ MODULES ]
|
||||
stable = arch: modules: common "stable" "${arch}-linux" modules;
|
||||
unstable = arch: modules: common "unstable" "${arch}-linux" modules;
|
||||
in
|
||||
{
|
||||
### Stable
|
||||
myarm = stable "aarch64" [
|
||||
./profiles/server
|
||||
./machines/myarm
|
||||
];
|
||||
#?? system = branch "ARCHITECTURE" [ MODULES ]
|
||||
stable = arch: modules: common "stable" "${arch}-linux" modules;
|
||||
unstable = arch: modules: common "unstable" "${arch}-linux" modules;
|
||||
in {
|
||||
### Stable
|
||||
myarm = stable "aarch64" [./profiles/server ./machines/myarm];
|
||||
myne = stable "x86_64" [./profiles/server ./machines/myne];
|
||||
mypi3 = stable "aarch64" [./profiles/sbc ./machines/mypi3];
|
||||
|
||||
myne = stable "x86_64" [
|
||||
./profiles/server
|
||||
./machines/myne
|
||||
];
|
||||
|
||||
mypi3 = stable "aarch64" [
|
||||
./profiles/sbc
|
||||
./machines/mypi3
|
||||
];
|
||||
|
||||
### Unstable
|
||||
myeck = unstable "x86_64" [
|
||||
./profiles/console
|
||||
./machines/myeck
|
||||
];
|
||||
|
||||
mynix = unstable "x86_64" [
|
||||
./profiles/desktop
|
||||
./machines/mynix
|
||||
];
|
||||
|
||||
myork = unstable "x86_64" [
|
||||
./profiles/laptop
|
||||
./machines/myork
|
||||
];
|
||||
};
|
||||
### Unstable
|
||||
myeck = unstable "x86_64" [./profiles/console ./machines/myeck];
|
||||
mynix = unstable "x86_64" [./profiles/desktop ./machines/mynix];
|
||||
myork = unstable "x86_64" [./profiles/laptop ./machines/myork];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
|
|
|
@ -7,19 +7,17 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
}: {
|
||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"virtio_scsi"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -19,5 +19,5 @@
|
|||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [ "z /mnt/external 0755 myned users" ];
|
||||
systemd.tmpfiles.rules = ["z /mnt/external 0755 myned users"];
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
|
|
|
@ -7,10 +7,8 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
|
@ -21,9 +19,9 @@
|
|||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
|
|
|
@ -7,10 +7,8 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
}: {
|
||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
|
@ -20,9 +18,9 @@
|
|||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
|
|
|
@ -7,10 +7,8 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
|
@ -21,9 +19,9 @@
|
|||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
}: let
|
||||
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
|
||||
|
@ -35,7 +32,7 @@ in
|
|||
|
||||
home-manager.users.${config.custom.username} = with lib; {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [ "${brightnessctl} set 0%" ];
|
||||
exec-once = ["${brightnessctl} set 0%"];
|
||||
|
||||
master = {
|
||||
mfact = mkForce 0.5;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
|
|
|
@ -7,10 +7,8 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
|
@ -20,9 +18,9 @@
|
|||
"uas"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
imports = [./hardware-configuration.nix];
|
||||
|
||||
custom.hostname = "mypi3";
|
||||
|
||||
|
|
|
@ -7,22 +7,20 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = [];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom;
|
||||
in {
|
||||
options.custom = {
|
||||
### Profiles
|
||||
default = mkOption { default = true; };
|
||||
full = mkOption { default = false; };
|
||||
minimal = mkOption { default = cfg.full; };
|
||||
profile = mkOption { };
|
||||
default = mkOption {default = true;};
|
||||
full = mkOption {default = false;};
|
||||
minimal = mkOption {default = cfg.full;};
|
||||
profile = mkOption {};
|
||||
|
||||
### Users
|
||||
domain = mkOption { default = "bjork.tech"; };
|
||||
hostname = mkOption { };
|
||||
realname = mkOption { default = "Myned"; };
|
||||
username = mkOption { default = "myned"; };
|
||||
domain = mkOption {default = "bjork.tech";};
|
||||
hostname = mkOption {};
|
||||
realname = mkOption {default = "Myned";};
|
||||
username = mkOption {default = "myned";};
|
||||
|
||||
### Hardware
|
||||
width = mkOption { default = 1920; };
|
||||
height = mkOption { default = 1080; };
|
||||
ultrawide = mkOption { default = cfg.width * 9 / 16 > cfg.height; }; # Wider than 16:9
|
||||
hidpi = mkOption { default = cfg.scale > 1; };
|
||||
scale = mkOption { default = 1; };
|
||||
width = mkOption {default = 1920;};
|
||||
height = mkOption {default = 1080;};
|
||||
ultrawide = mkOption {default = cfg.width * 9 / 16 > cfg.height;}; # Wider than 16:9
|
||||
hidpi = mkOption {default = cfg.scale > 1;};
|
||||
scale = mkOption {default = 1;};
|
||||
|
||||
# TODO: Use option for border size
|
||||
border = mkOption { default = 2; };
|
||||
border = mkOption {default = 2;};
|
||||
|
||||
gap = mkOption { default = 10; };
|
||||
padding = mkOption { default = 56; }; # ?? journalctl --user -u waybar.service | grep height:
|
||||
gap = mkOption {default = 10;};
|
||||
padding = mkOption {default = 56;}; # ?? journalctl --user -u waybar.service | grep height:
|
||||
|
||||
### Misc
|
||||
wallpaper = mkOption { default = false; };
|
||||
wallpaper = mkOption {default = false;};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
config.custom.desktops.hyprland.enable = config.custom.full;
|
||||
}
|
||||
|
|
|
@ -4,16 +4,12 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.desktops.gnome;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.custom.desktops.gnome = {
|
||||
enable = mkOption { default = false; };
|
||||
gdm = mkOption { default = true; };
|
||||
enable = mkOption {default = false;};
|
||||
gdm = mkOption {default = true;};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -30,6 +26,6 @@ in
|
|||
|
||||
# Remove default packages
|
||||
# https://wiki.nixos.org/wiki/GNOME#Excluding_GNOME_Applications
|
||||
environment.gnome.excludePackages = [ pkgs.gnome-shell-extensions ];
|
||||
environment.gnome.excludePackages = [pkgs.gnome-shell-extensions];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,27 +5,17 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
clipse = "${pkgs.clipse}/bin/clipse";
|
||||
codium = "${
|
||||
config.home-manager.users.${config.custom.username}.programs.vscode.package
|
||||
}/bin/codium";
|
||||
firefox-esr = "${
|
||||
config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage
|
||||
}/bin/firefox-esr";
|
||||
codium = "${config.home-manager.users.${config.custom.username}.programs.vscode.package}/bin/codium";
|
||||
firefox-esr = "${config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage}/bin/firefox-esr";
|
||||
gnome-text-editor = "${pkgs.gnome-text-editor}/bin/gnome-text-editor";
|
||||
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||
hyprlock = "${
|
||||
config.home-manager.users.${config.custom.username}.programs.hyprlock.package
|
||||
}/bin/hyprlock";
|
||||
hyprlock = "${config.home-manager.users.${config.custom.username}.programs.hyprlock.package}/bin/hyprlock";
|
||||
hyprpicker = "${pkgs.hyprpicker}/bin/hyprpicker";
|
||||
jq = "${pkgs.jq}/bin/jq";
|
||||
kill = "${pkgs.procps}/bin/kill";
|
||||
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
|
||||
libreoffice = "${config.custom.programs.libreoffice.package}/bin/libreoffice";
|
||||
loginctl = "${pkgs.systemd}/bin/loginctl";
|
||||
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
||||
networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu";
|
||||
|
@ -35,6 +25,7 @@ let
|
|||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||
rofi-rbw = "${pkgs.rofi-rbw}/bin/rofi-rbw";
|
||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
||||
steam = "${config.programs.steam.package}/bin/steam";
|
||||
swayosd-client = "${pkgs.swayosd}/bin/swayosd-client";
|
||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||
virt-manager = "${config.programs.virt-manager.package}/bin/virt-manager";
|
||||
|
@ -42,214 +33,206 @@ let
|
|||
wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi";
|
||||
|
||||
cfg = config.custom.desktops.hyprland.binds;
|
||||
in
|
||||
{
|
||||
options.custom.desktops.hyprland.binds.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.desktops.hyprland.binds.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
wayland.windowManager.hyprland.settings = let
|
||||
# Reverse mods and key for alphabetical sorting
|
||||
#?? key <"KEY"> <"MODS"|null> <"DISPATCHER"> <"PARAMS"|null>
|
||||
key = key: mods: dispatcher: params: "${
|
||||
if (isNull mods)
|
||||
then ""
|
||||
else mods
|
||||
}, ${key}, ${dispatcher}${
|
||||
if (isNull params)
|
||||
then ""
|
||||
else ", ${params}"
|
||||
}";
|
||||
in {
|
||||
# https://wiki.hyprland.org/Configuring/Binds
|
||||
#?? bind = MODS, KEY, DISPATCHER, [PARAMS]
|
||||
#?? wev
|
||||
binds = {
|
||||
allow_workspace_cycles = true;
|
||||
disable_keybind_grabbing = true;
|
||||
scroll_event_delay = 0;
|
||||
};
|
||||
|
||||
# Lockscreen binds
|
||||
bindl = [
|
||||
### System
|
||||
"CTRL, Delete, exec, ${hyprctl} reload"
|
||||
"CTRL+ALT, Delete, exec, ${loginctl} terminate-session ''"
|
||||
"SUPER, L, exec, ${hyprlock} --immediate & ${sleep} 1 && ${hyprctl} dispatch dpms off"
|
||||
(key "Delete" "Ctrl" "exec" "${hyprctl} reload")
|
||||
(key "Delete" "Ctrl+Alt" "exec" "${loginctl} terminate-session ''")
|
||||
(key "Delete" "Super" "exec" "inhibit")
|
||||
(key "L" "Super" "exec" "${hyprlock} --immediate & ${sleep} 1 && ${hyprctl} dispatch dpms off")
|
||||
|
||||
# Laptop lid switches
|
||||
# https://wiki.hyprland.org/Configuring/Binds/#switches
|
||||
#?? hyprctl devices
|
||||
", switch:on:Lid Switch, dpms, off" # Close
|
||||
", switch:off:Lid Switch, dpms, on" # Open
|
||||
|
||||
### Scripts
|
||||
"SUPER, Delete, exec, inhibit"
|
||||
(key "switch:off:Lid Switch" null "dpms" "on") # Open
|
||||
(key "switch:on:Lid Switch" null "dpms" "off") # Close
|
||||
];
|
||||
|
||||
# Mouse binds
|
||||
bindm = [
|
||||
"SUPER, mouse:272, movewindow" # LMB
|
||||
"SUPER, mouse:273, resizewindow" # RMB
|
||||
(key "mouse:272" "Super" "movewindow" null) # LMB
|
||||
(key "mouse:273" "Super" "resizewindow" null) # RMB
|
||||
];
|
||||
|
||||
# Repeat binds
|
||||
binde = [
|
||||
# Media keys
|
||||
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
||||
", XF86AudioMute, exec, ${swayosd-client} --output-volume mute-toggle"
|
||||
", XF86AudioLowerVolume, exec, ${swayosd-client} --output-volume lower"
|
||||
", XF86AudioRaiseVolume, exec, ${swayosd-client} --output-volume raise"
|
||||
", XF86AudioPlay, exec, ${playerctl} play-pause"
|
||||
", XF86AudioPrev, exec, ${playerctl} previous"
|
||||
", XF86AudioNext, exec, ${playerctl} next"
|
||||
", XF86MonBrightnessDown, exec, ${swayosd-client} --brightness lower"
|
||||
", XF86MonBrightnessUp, exec, ${swayosd-client} --brightness raise"
|
||||
|
||||
# TODO: Unused media key
|
||||
#// ", XF86AudioMedia, exec, null"
|
||||
(key "XF86AudioMute" null "exec" "${swayosd-client} --output-volume mute-toggle") # F1
|
||||
(key "XF86AudioLowerVolume" null "exec" "${swayosd-client} --output-volume lower") # F2
|
||||
(key "XF86AudioRaiseVolume" null "exec" "${swayosd-client} --output-volume raise") # F3
|
||||
(key "XF86AudioPrev" null "exec" "${playerctl} previous") # F4
|
||||
(key "XF86AudioPlay" null "exec" "${playerctl} play-pause") # F5
|
||||
(key "XF86AudioNext" null "exec" "${playerctl} next") # F6
|
||||
(key "XF86MonBrightnessDown" null "exec" "${swayosd-client} --brightness lower") # F7
|
||||
(key "XF86MonBrightnessUp" null "exec" "${swayosd-client} --brightness raise") # F8
|
||||
(key "XF86AudioMedia" null "exec" "${notify-send} test") # F12
|
||||
];
|
||||
|
||||
# Release binds
|
||||
bindr = [
|
||||
### Layouts
|
||||
"SUPER+CTRL, Control_L, layoutmsg, swapwithmaster master"
|
||||
"SUPER+SHIFT+CTRL, Control_L, layoutmsg, addmaster"
|
||||
"SUPER+SHIFT+CTRL+ALT, Control_L, layoutmsg, removemaster"
|
||||
|
||||
### Workspaces
|
||||
"SUPER+SHIFT, Shift_L, workspace, previous"
|
||||
|
||||
# Special workspaces
|
||||
"SUPER, Super_L, togglespecialworkspace, scratchpad"
|
||||
"SUPER+SHIFT, Super_L, movetoworkspacesilent, special:scratchpad"
|
||||
"SUPER+ALT, Alt_L, togglespecialworkspace, wallpaper"
|
||||
(key "Alt_L" "Super+Alt" "togglespecialworkspace" "wallpaper")
|
||||
(key "Control_L" "Super+Ctrl" "layoutmsg" "swapwithmaster master")
|
||||
(key "Control_L" "Super+Ctrl+Alt+Shift" "layoutmsg" "removemaster")
|
||||
(key "Control_L" "Super+Ctrl+Shift" "layoutmsg" "addmaster")
|
||||
(key "Shift_L" "Super+Shift" "workspace" "previous")
|
||||
(key "Super_L" "Super" "exec" "${pkill} wofi || ${wofi} --show drun")
|
||||
(key "Super_L" "Super+Alt" "exec" "${pkill} wofi || ${rofi-rbw}")
|
||||
(key "Super_L" "Super+Ctrl" "exec" "${pkill} wofi || calc")
|
||||
(key "Super_L" "Super+Ctrl+Shift" "exec" "${pkill} wofi || ${networkmanager_dmenu}")
|
||||
(key "Super_L" "Super+Shift" "exec" "${pkill} wofi || ${wofi} --show run")
|
||||
];
|
||||
|
||||
# Regular binds
|
||||
bind = [
|
||||
### Scripts
|
||||
", Print, exec, screenshot"
|
||||
"SHIFT, Print, exec, screenshot -d"
|
||||
"SUPER, Print, exec, screenshot -e"
|
||||
"SUPER+SHIFT, Print, exec, screenshot -ed"
|
||||
"SUPER+SHIFT, Delete, exec, vrr"
|
||||
"SUPER, Minus, exec, audio"
|
||||
"SUPER, Equal, exec, audio Normalizer"
|
||||
"SUPER+SHIFT, W, exec, vm -x ${if config.custom.hidpi then "/scale:140 +f" else ""}"
|
||||
"SUPER+SHIFT+CTRL, W, exec, vm ${virt-manager} --connect qemu:///system --show-domain-console myndows"
|
||||
"SUPER+SHIFT+CTRL, Q, exec, close" # Quit all windows
|
||||
(key "mouse:274" "Super" "layoutmsg" "swapwithmaster master")
|
||||
(key "mouse:274" "Super+Shift" "layoutmsg" "addmaster")
|
||||
(key "mouse:274" "Super+Ctrl+Shift" "layoutmsg" "removemaster")
|
||||
|
||||
# BUG: Freezes window when toggled
|
||||
# https://github.com/hyprwm/Hyprland/issues/7609
|
||||
"CTRL, Space, exec, toggle dropdown special:dropdown ${kitty} --app-id dropdown --override font_size=12"
|
||||
|
||||
"CTRL+SHIFT, Space, exec, toggle pip special:pip"
|
||||
(key "Backslash" "Super" "layoutmsg" "orientationcenter")
|
||||
(key "Backslash" "Super+Shift" "splitratio" "exact 0.5") # Reset layout ratio
|
||||
(key "Backspace" "Super" "changegroupactive" "f")
|
||||
(key "Backspace" "Super+Ctrl" "togglegroup" null)
|
||||
(key "Backspace" "Super+Ctrl+Shift" "lockactivegroup" "toggle")
|
||||
(key "Backspace" "Super+Shift" "changegroupactive" "b")
|
||||
(key "Bracketleft" "Super" "layoutmsg" "orientationprev")
|
||||
(key "Bracketleft" "Super+Shift" "splitratio" "-0.1")
|
||||
(key "Bracketright" "Super" "layoutmsg" "orientationnext")
|
||||
(key "Bracketright" "Super+Shift" "splitratio" "+0.1")
|
||||
|
||||
# TODO: Toggle trackball hand
|
||||
#// "SUPER, Delete, exec, left"
|
||||
#// (key "Delete" "Super" "exec" "left")
|
||||
|
||||
### Applications
|
||||
"SUPER, B, exec, [tag +browser] ${firefox-esr}"
|
||||
"SUPER, C, exec, ${codium}"
|
||||
"SUPER, E, exec, ${gnome-text-editor}"
|
||||
"SUPER, F, exec, ${nautilus}"
|
||||
"SUPER, K, exec, ${obsidian}"
|
||||
"SUPER, O, exec, ${libreoffice}"
|
||||
"SUPER, P, exec, ${hyprpicker} --autocopy"
|
||||
"SUPER+SHIFT, P, exec, ${hyprpicker} --autocopy --format rgb"
|
||||
"SUPER+CTRL, T, exec, ${kitty}"
|
||||
"SUPER+SHIFT+CTRL, T, exec, ${pkill} kitty"
|
||||
"SUPER, V, exec, ${kitty} --app-id clipboard --override font_size=12 ${clipse}"
|
||||
"SUPER+SHIFT, V, exec, ${clipse} -clear && ${notify-send} clipse 'Clipboard cleared' --urgency low"
|
||||
"SUPER, Space, exec, ${pkill} wofi || ${wofi} --show drun"
|
||||
"SUPER+SHIFT, Space, exec, ${pkill} wofi || ${wofi} --show run"
|
||||
"SUPER+CTRL, Space, exec, ${pkill} wofi || calc"
|
||||
"SUPER+ALT, Space, exec, ${pkill} wofi || ${rofi-rbw}"
|
||||
"SUPER+SHIFT+CTRL, Space, exec, ${pkill} wofi || ${networkmanager_dmenu}"
|
||||
(key "Delete" "Super+Shift" "exec" "vrr")
|
||||
(key "Down" "Super" "movewindoworgroup" "d")
|
||||
(key "Equal" "Super" "exec" "audio Normalizer")
|
||||
(key "Escape" "Super" "togglefloating" null)
|
||||
(key "Escape" "Super+Alt" "exec" "lifx state --color red")
|
||||
(key "Escape" "Super+Shift" "centerwindow" null)
|
||||
(key "Left" "Super" "movewindoworgroup" "l")
|
||||
(key "Minus" "Super" "exec" "audio")
|
||||
(key "Print" "Shift" "exec" "screenshot -d")
|
||||
(key "Print" "Super" "exec" "screenshot -e")
|
||||
(key "Print" "Super+Shift" "exec" "screenshot -ed")
|
||||
(key "Print" null "exec" "screenshot")
|
||||
(key "Return" "Super" "fullscreen" "1") # Maximize
|
||||
(key "Return" "Super+Shift" "fullscreen" "0") # Fullscreen
|
||||
(key "Right" "Super" "movewindoworgroup" "r")
|
||||
(key "Space" "Ctrl" "exec" (concatStringsSep " " [
|
||||
"toggle"
|
||||
"--focus"
|
||||
"--type class"
|
||||
"--expression '^dropdown$'"
|
||||
"--workspace special:dropdown"
|
||||
"--"
|
||||
"${kitty} --app-id dropdown --override font_size=12"
|
||||
]))
|
||||
(key "Space" "Ctrl+Alt" "exec" "lifx toggle")
|
||||
(key "Space" "Ctrl+Shift" "exec" (concatStringsSep " " [
|
||||
"toggle"
|
||||
"--type title"
|
||||
"--expression '^Picture.in.[Pp]icture$'"
|
||||
"--workspace special:pip"
|
||||
]))
|
||||
(key "Space" "Super" "togglespecialworkspace" "scratchpad")
|
||||
(key "Space" "Super+Ctrl" "movetoworkspacesilent" "special:scratchpad")
|
||||
(key "Tab" "Super" "cyclenext" "tiled")
|
||||
(key "Tab" "Super+Shift" "alterzorder" "top")
|
||||
(key "Tab" "Super+Shift" "cyclenext" "floating")
|
||||
(key "Up" "Super" "movewindoworgroup" "u")
|
||||
|
||||
# Kill applications
|
||||
"SUPER, Q, killactive"
|
||||
"SUPER+SHIFT, Q, exec, ${kill} -9 $(${hyprctl} -j activewindow | ${jq} .pid)"
|
||||
"SUPER+SHIFT, A, exec, ${waydroid} session stop"
|
||||
"SUPER+SHIFT, S, exec, ${pkill} steam"
|
||||
"SUPER+SHIFT+CTRL, G, exec, ${pkill} gamescope"
|
||||
|
||||
# LIFX
|
||||
"SUPER+ALT, Escape, exec, lifx state --color red"
|
||||
"SUPER+ALT, 1, exec, lifx state --kelvin 1500"
|
||||
"SUPER+ALT, 2, exec, lifx state --kelvin 2500"
|
||||
"SUPER+ALT, 3, exec, lifx state --kelvin 3000"
|
||||
"SUPER+ALT, 4, exec, lifx state --kelvin 4000"
|
||||
"SUPER+ALT, 5, exec, lifx state --kelvin 5000"
|
||||
"CTRL+ALT, 1, exec, lifx state --brightness 0.01"
|
||||
"CTRL+ALT, 2, exec, lifx state --brightness 0.25"
|
||||
"CTRL+ALT, 3, exec, lifx state --brightness 0.50"
|
||||
"CTRL+ALT, 4, exec, lifx state --brightness 0.75"
|
||||
"CTRL+ALT, 5, exec, lifx state --brightness 1.00"
|
||||
"CTRL+ALT, Space, exec, lifx toggle"
|
||||
|
||||
### Windows
|
||||
"SUPER, Escape, togglefloating"
|
||||
"SUPER+SHIFT, Escape, centerwindow"
|
||||
"SUPER, Return, fullscreen, 1" # Maximize
|
||||
"SUPER+SHIFT, Return, fullscreen, 0" # Fullscreen
|
||||
"SUPER, Tab, cyclenext, tiled"
|
||||
|
||||
# FIXME: Handle hover focus and zorder
|
||||
"SUPER+SHIFT, Tab, cyclenext, floating"
|
||||
"SUPER+SHIFT, Tab, alterzorder, top"
|
||||
|
||||
### Groups
|
||||
"SUPER, Backspace, changegroupactive, f"
|
||||
"SUPER+SHIFT, Backspace, changegroupactive, b"
|
||||
"SUPER+CTRL, Backspace, togglegroup"
|
||||
"SUPER+SHIFT+CTRL, Backspace, lockactivegroup, toggle"
|
||||
"SUPER, Up, movewindoworgroup, u"
|
||||
"SUPER, Down, movewindoworgroup, d"
|
||||
"SUPER, Left, movewindoworgroup, l"
|
||||
"SUPER, Right, movewindoworgroup, r"
|
||||
|
||||
### Layouts
|
||||
"SUPER, mouse:274, layoutmsg, swapwithmaster master"
|
||||
"SUPER+SHIFT, mouse:274, layoutmsg, addmaster"
|
||||
"SUPER+SHIFT+CTRL, mouse:274, layoutmsg, removemaster"
|
||||
"SUPER, Bracketleft, layoutmsg, orientationprev"
|
||||
"SUPER, Bracketright, layoutmsg, orientationnext"
|
||||
"SUPER, Backslash, layoutmsg, orientationcenter"
|
||||
"SUPER+SHIFT, Backslash, splitratio, exact 0.5" # Reset layout ratio
|
||||
"SUPER+SHIFT, Bracketleft, splitratio, -0.1"
|
||||
"SUPER+SHIFT, Bracketright, splitratio, +0.1"
|
||||
|
||||
### Workspaces
|
||||
"SUPER, 1, workspace, 1"
|
||||
"SUPER+SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"SUPER, 2, workspace, 2"
|
||||
"SUPER+SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"SUPER, 3, workspace, 3"
|
||||
"SUPER+SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"SUPER, 4, workspace, 4"
|
||||
"SUPER+SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"SUPER, 5, workspace, 5"
|
||||
"SUPER+SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"SUPER, 6, workspace, 6"
|
||||
"SUPER+SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"SUPER, 7, workspace, 7"
|
||||
"SUPER+SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"SUPER, 8, workspace, 8"
|
||||
"SUPER+SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"SUPER, 9, workspace, 9"
|
||||
"SUPER+SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"SUPER, 0, workspace, 10"
|
||||
"SUPER+SHIFT, 0, movetoworkspacesilent, 10"
|
||||
"SUPER, Z, workspace, -1"
|
||||
"SUPER+SHIFT, Z, movetoworkspacesilent, -1"
|
||||
"SUPER, X, workspace, +1"
|
||||
"SUPER+SHIFT, X, movetoworkspacesilent, +1"
|
||||
|
||||
# Named workspaces
|
||||
"SUPER, G, workspace, name:game"
|
||||
"SUPER+SHIFT, G, movetoworkspacesilent, name:game"
|
||||
"SUPER+CTRL, G, workspace, name:gamescope"
|
||||
|
||||
# Special workspaces
|
||||
"SUPER, A, togglespecialworkspace, android"
|
||||
"SUPER+SHIFT, A, movetoworkspacesilent, android"
|
||||
"SUPER, M, togglespecialworkspace, music"
|
||||
"SUPER+SHIFT, M, movetoworkspacesilent, music"
|
||||
"SUPER, S, togglespecialworkspace, steam"
|
||||
"SUPER+SHIFT, S, movetoworkspacesilent, steam"
|
||||
"SUPER, T, togglespecialworkspace, terminal"
|
||||
"SUPER+SHIFT, T, movetoworkspacesilent, terminal"
|
||||
"SUPER, W, togglespecialworkspace, vm"
|
||||
"SUPER+SHIFT, W, movetoworkspacesilent, vm"
|
||||
(key "0" "Super" "workspace" "10")
|
||||
(key "0" "Super+Ctrl" "movetoworkspacesilent" "10")
|
||||
(key "1" "Ctrl+Alt" "exec" "lifx state --brightness 0.01")
|
||||
(key "1" "Super" "workspace" "1")
|
||||
(key "1" "Super+Alt" "exec" "lifx state --kelvin 1500")
|
||||
(key "1" "Super+Ctrl" "movetoworkspacesilent" "1")
|
||||
(key "2" "Ctrl+Alt" "exec" "lifx state --brightness 0.25")
|
||||
(key "2" "Super" "workspace" "2")
|
||||
(key "2" "Super+Alt" "exec" "lifx state --kelvin 2500")
|
||||
(key "2" "Super+Ctrl" "movetoworkspacesilent" "2")
|
||||
(key "3" "Ctrl+Alt" "exec" "lifx state --brightness 0.50")
|
||||
(key "3" "Super" "workspace" "3")
|
||||
(key "3" "Super+Alt" "exec" "lifx state --kelvin 3000")
|
||||
(key "3" "Super+Ctrl" "movetoworkspacesilent" "3")
|
||||
(key "4" "Ctrl+Alt" "exec" "lifx state --brightness 0.75")
|
||||
(key "4" "Super" "workspace" "4")
|
||||
(key "4" "Super+Alt" "exec" "lifx state --kelvin 4000")
|
||||
(key "4" "Super+Ctrl" "movetoworkspacesilent" "4")
|
||||
(key "5" "Ctrl+Alt" "exec" "lifx state --brightness 1.00")
|
||||
(key "5" "Super" "workspace" "5")
|
||||
(key "5" "Super+Alt" "exec" "lifx state --kelvin 5000")
|
||||
(key "5" "Super+Ctrl" "movetoworkspacesilent" "5")
|
||||
(key "6" "Super" "workspace" "6")
|
||||
(key "6" "Super+Ctrl" "movetoworkspacesilent" "6")
|
||||
(key "7" "Super" "workspace" "7")
|
||||
(key "7" "Super+Ctrl" "movetoworkspacesilent" "7")
|
||||
(key "8" "Super" "workspace" "8")
|
||||
(key "8" "Super+Ctrl" "movetoworkspacesilent" "8")
|
||||
(key "9" "Super" "workspace" "9")
|
||||
(key "9" "Super+Ctrl" "movetoworkspacesilent" "9")
|
||||
(key "A" "Ctrl+Alt" "exec" "${waydroid} session stop")
|
||||
(key "A" "Super" "togglespecialworkspace" "android")
|
||||
(key "A" "Super+Ctrl" "movetoworkspacesilent" "android")
|
||||
(key "B" "Super" "exec" "[group new lock; tile] ${firefox-esr}")
|
||||
(key "C" "Super" "exec" codium)
|
||||
(key "E" "Super" "exec" gnome-text-editor)
|
||||
(key "F" "Super" "exec" nautilus)
|
||||
(key "G" "Super" "workspace" "name:game")
|
||||
(key "G" "Super+Alt" "workspace" "name:gamescope")
|
||||
(key "G" "Super+Ctrl" "movetoworkspacesilent" "name:game")
|
||||
(key "G" "Super+Ctrl+Alt" "exec" "${pkill} gamescope")
|
||||
(key "K" "Super" "exec" obsidian)
|
||||
(key "M" "Super" "togglespecialworkspace" "music")
|
||||
(key "M" "Super+Ctrl" "movetoworkspacesilent" "music")
|
||||
(key "O" "Super" "togglespecialworkspace" "office")
|
||||
(key "P" "Super" "exec" "${hyprpicker} --autocopy")
|
||||
(key "P" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb")
|
||||
(key "Q" "Ctrl+Alt" "exec" "${kill} -9 $(${hyprctl} -j activewindow | ${jq} .pid)")
|
||||
(key "Q" "Ctrl+Alt+Shift" "exec" "close") # Quit all windows
|
||||
(key "Q" "Super" "killactive" null)
|
||||
(key "S" "Ctrl+Alt" "exec" "${pkill} steam")
|
||||
(key "S" "Super" "togglespecialworkspace" "steam")
|
||||
(key "S" "Super+Ctrl" "movetoworkspacesilent" "steam")
|
||||
(key "S" "Super+Shift" "exec" steam)
|
||||
(key "T" "Ctrl+Alt" "exec" "${pkill} kitty")
|
||||
(key "T" "Super" "togglespecialworkspace" "terminal")
|
||||
(key "T" "Super+Ctrl" "movetoworkspacesilent" "terminal")
|
||||
(key "T" "Super+Shift" "exec" kitty)
|
||||
(key "V" "Super" "exec" "${kitty} --app-id clipboard --override font_size=12 ${clipse}")
|
||||
(key "V" "Super+Shift" "exec" "${clipse} -clear && ${notify-send} clipse 'Clipboard cleared' --urgency low")
|
||||
(key "W" "Super" "togglespecialworkspace" "vm")
|
||||
(key "W" "Super+Shift" "exec" "vm -x ${
|
||||
if config.custom.hidpi
|
||||
then "/scale:140 +f"
|
||||
else ""
|
||||
}")
|
||||
(key "W" "Super+Ctrl" "movetoworkspacesilent" "vm")
|
||||
(key "W" "Super+Ctrl+Shift" "exec" "vm ${virt-manager} --show-domain-console myndows")
|
||||
(key "X" "Super" "workspace" "+1")
|
||||
(key "X" "Super+Ctrl" "movetoworkspacesilent" "+1")
|
||||
(key "Z" "Super" "workspace" "-1")
|
||||
(key "Z" "Super+Ctrl" "movetoworkspacesilent" "-1")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -4,14 +4,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.desktops.hyprland;
|
||||
in
|
||||
{
|
||||
options.custom.desktops.hyprland.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.desktops.hyprland.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
custom.desktops.hyprland = mkIf config.custom.full {
|
||||
|
@ -26,7 +22,7 @@ in
|
|||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
|
||||
# Prefer hyprland over gtk portal
|
||||
config.common.default = [
|
||||
|
@ -38,7 +34,7 @@ in
|
|||
# https://wiki.hyprland.org
|
||||
home-manager.users.${config.custom.username}.wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.variables = [ "--all" ]; # Import some environment variables into session
|
||||
systemd.variables = ["--all"]; # Import some environment variables into session
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,22 +4,18 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||
|
||||
cfg = config.custom.desktops.hyprland.plugins;
|
||||
in
|
||||
{
|
||||
options.custom.desktops.hyprland.plugins.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.desktops.hyprland.plugins.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
# https://github.com/hyprwm/hyprland-plugins/tree/main/hyprbars
|
||||
# https://wiki.hyprland.org/Plugins/Using-Plugins
|
||||
plugins = with pkgs.hyprlandPlugins; [ hyprbars ];
|
||||
plugins = with pkgs.hyprlandPlugins; [hyprbars];
|
||||
|
||||
settings = {
|
||||
#!! Static rules
|
||||
|
|
|
@ -4,22 +4,20 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
gamescope = "${config.programs.gamescope.package}/bin/gamescope";
|
||||
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
|
||||
libreoffice = "${config.custom.programs.libreoffice.package}/bin/libreoffice";
|
||||
loupe = "${pkgs.loupe}/bin/loupe";
|
||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||
steam = "${config.programs.steam.package}/bin/steam";
|
||||
virt-manager = "${pkgs.virt-manager}/bin/virt-manager";
|
||||
waydroid = "${pkgs.waydroid}/bin/waydroid";
|
||||
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
|
||||
youtube-music = "${pkgs.youtube-music}/bin/youtube-music";
|
||||
|
||||
cfg = config.custom.desktops.hyprland.rules;
|
||||
in
|
||||
{
|
||||
options.custom.desktops.hyprland.rules.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.desktops.hyprland.rules.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
|
@ -30,246 +28,193 @@ in
|
|||
|
||||
"special:android, on-created-empty:${waydroid} app launch com.YoStarEN.Arknights"
|
||||
"special:music, on-created-empty:${youtube-music}"
|
||||
"special:office, on-created-empty:${libreoffice}"
|
||||
"special:steam, on-created-empty:${steam}"
|
||||
"special:terminal, on-created-empty:${kitty}"
|
||||
"special:vm, on-created-empty:${pgrep} -x vm || ${virt-manager}"
|
||||
"special:wallpaper, on-created-empty:[tile] ${loupe} /tmp/wallpaper.png"
|
||||
];
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Window-Rules
|
||||
#?? windowrulev2 = RULE, WINDOW
|
||||
windowrulev2 =
|
||||
with config.custom;
|
||||
let
|
||||
# Return hypr-formatted string, converting booleans into 0/1
|
||||
format =
|
||||
field: expr:
|
||||
"${field}:${
|
||||
toString (
|
||||
if expr == true then
|
||||
1
|
||||
else if expr == false then
|
||||
0
|
||||
else
|
||||
expr
|
||||
)
|
||||
}";
|
||||
windowrulev2 = with config.custom; let
|
||||
### Hardware-dependent rules
|
||||
# Convert truncated float to string
|
||||
tr = num: toString (builtins.floor num);
|
||||
|
||||
# Generate hypr-formatted window rules
|
||||
#?? merge <FIELD|{FIELDS}> <EXPRESSION> <RULES>
|
||||
merge =
|
||||
field: expr: rules:
|
||||
map (
|
||||
rule:
|
||||
if builtins.isAttrs field then
|
||||
"${rule}, ${lib.concatStringsSep ", " (lib.mapAttrsToList (f: e: format f e) field)}"
|
||||
else
|
||||
"${rule}, ${format field expr}"
|
||||
) rules;
|
||||
# Bottom center
|
||||
clipboard = rec {
|
||||
x = tr (width / scale / 2 - (toInt w) / 2);
|
||||
y = tr (height / scale - (toInt h) - gap - border - padding);
|
||||
w = "600";
|
||||
h = tr (height / scale * 0.5 * scale);
|
||||
};
|
||||
|
||||
class = expr: rules: merge "class" "^${expr}$" rules;
|
||||
floating = expr: rules: merge "floating" expr rules;
|
||||
fullscreen = expr: rules: merge "fullscreen" expr rules;
|
||||
pinned = expr: rules: merge "pinned" expr rules;
|
||||
tag = expr: rules: merge "tag" expr rules;
|
||||
title = expr: rules: merge "title" "^${expr}$" rules;
|
||||
# Bottom center
|
||||
dropdown = rec {
|
||||
x = tr (width / scale / 2 - (toInt w) / 2);
|
||||
y = tr (height / scale - (toInt h) - gap - border - padding);
|
||||
w = tr (width
|
||||
/ scale
|
||||
* (
|
||||
if ultrawide
|
||||
then 0.5
|
||||
else 1
|
||||
)
|
||||
- gap
|
||||
- gap / 2
|
||||
+ 1);
|
||||
h = tr (height / scale * 0.2 * scale);
|
||||
};
|
||||
|
||||
fields = fields: rules: merge fields null rules;
|
||||
# Top right
|
||||
pip = rec {
|
||||
x = tr (width / scale - (toInt w) - gap - border);
|
||||
y = tr (gap + border);
|
||||
w = tr (width / scale * 0.25 - gap - gap + 1);
|
||||
h = tr ((toInt w) * 9 / 16); # 16:9 aspect ratio
|
||||
};
|
||||
|
||||
### Hardware-dependent rules
|
||||
# Convert truncated float to string
|
||||
tr = num: toString (builtins.floor num);
|
||||
### Rules
|
||||
# Return hypr-formatted string, converting booleans into 0/1
|
||||
format = field: expr: "${field}:${
|
||||
toString (
|
||||
if expr == true
|
||||
then 1
|
||||
else if expr == false
|
||||
then 0
|
||||
else expr
|
||||
)
|
||||
}";
|
||||
|
||||
# Bottom center
|
||||
clipboard = rec {
|
||||
x = tr (width / scale / 2 - (toInt w) / 2);
|
||||
y = tr (height / scale - (toInt h) - gap - border - padding);
|
||||
w = "600";
|
||||
h = tr (height / scale * 0.5 * scale);
|
||||
};
|
||||
# Generate hypr-formatted window rules
|
||||
#?? merge <FIELD|{FIELDS}> <EXPRESSION> <RULES>
|
||||
merge = field: expr: rules:
|
||||
map (
|
||||
rule:
|
||||
if builtins.isAttrs field
|
||||
then "${rule}, ${lib.concatStringsSep ", " (lib.mapAttrsToList (f: e: format f e) field)}"
|
||||
else "${rule}, ${format field expr}"
|
||||
)
|
||||
rules;
|
||||
|
||||
# Bottom center
|
||||
dropdown = rec {
|
||||
x = tr (width / scale / 2 - (toInt w) / 2);
|
||||
y = tr (height / scale - (toInt h) - gap - border - padding);
|
||||
w = tr (width / scale * (if ultrawide then 0.5 else 1) - gap - gap / 2 + 1);
|
||||
h = tr (height / scale * 0.2 * scale);
|
||||
};
|
||||
class = expr: rules: merge "class" "^${expr}$" rules;
|
||||
floating = expr: rules: merge "floating" expr rules;
|
||||
fullscreen = expr: rules: merge "fullscreen" expr rules;
|
||||
pinned = expr: rules: merge "pinned" expr rules;
|
||||
title = expr: rules: merge "title" "^${expr}$" rules;
|
||||
|
||||
# Top right
|
||||
pip = rec {
|
||||
x = tr (width / scale - (toInt w) - gap - border);
|
||||
y = tr (gap + border);
|
||||
w = tr (width / scale * 0.25 - gap - gap + 1);
|
||||
h = tr ((toInt w) * 9 / 16); # 16:9 aspect ratio
|
||||
};
|
||||
in
|
||||
fields = fields: rules: merge fields null rules;
|
||||
|
||||
### Pseudo-tags
|
||||
# Wrap generated rules in Nix categories
|
||||
tag = {
|
||||
android = rules: [
|
||||
(class "waydroid.*" rules)
|
||||
];
|
||||
clipboard = rules: [
|
||||
(class "clipboard" rules)
|
||||
];
|
||||
dropdown = rules: [
|
||||
(class "dropdown" rules)
|
||||
];
|
||||
editor = rules: [
|
||||
(class "codium-url-handler" rules) # VSCode
|
||||
(class "obsidian" (rules ++ ["group barred"]))
|
||||
];
|
||||
files = rules: [
|
||||
(class "org\\.gnome\\.Nautilus" rules)
|
||||
];
|
||||
game = rules: [
|
||||
(class "moe\\.launcher\\.the-honkers-railway-launcher" (rules ++ ["size 1280 730"])) # Honkai: Star Rail
|
||||
(class "steam_app_.+" rules) # Proton
|
||||
];
|
||||
music = rules: [
|
||||
(class "Spotify" rules)
|
||||
(class "YouTube Music" rules)
|
||||
(title "Spotify Premium" rules)
|
||||
];
|
||||
office = rules: [
|
||||
(class "libreoffice.+" rules)
|
||||
];
|
||||
pip = rules: [
|
||||
(title "Picture.in.[Pp]icture" rules)
|
||||
];
|
||||
social = rules: [
|
||||
(class "cinny" rules)
|
||||
(class "discord" rules)
|
||||
(class "Element" rules)
|
||||
(class "org\\.telegram\\.desktop" rules)
|
||||
];
|
||||
steam = rules: [
|
||||
(class "SDL Application" rules) # Steam
|
||||
(class "steam" rules)
|
||||
];
|
||||
terminal = rules: [
|
||||
(class "foot" rules)
|
||||
(class "kitty" rules)
|
||||
(class "org\\.wezfurlong\\.wezterm" rules)
|
||||
];
|
||||
vm = rules: [
|
||||
(class "(sdl-|wl|x)freerdp" (rules ++ ["nomaxsize" "tile"]))
|
||||
(class "virt-manager" rules)
|
||||
];
|
||||
wine = rules: [
|
||||
(class ".*\\.(exe|x86_64)" rules) # Wine
|
||||
];
|
||||
};
|
||||
in
|
||||
flatten [
|
||||
### Defaults
|
||||
(class ".*" [
|
||||
"center"
|
||||
"float"
|
||||
"suppressevent maximize"
|
||||
"syncfullscreen"
|
||||
])
|
||||
(floating true [
|
||||
"bordercolor rgb(073642)"
|
||||
"workspace special:scratchpad"
|
||||
])
|
||||
(fullscreen true [ "idleinhibit focus" ])
|
||||
(pinned true [ "bordercolor rgb(073642) rgb(073642)" ])
|
||||
(class ".*" ["float" "suppressevent maximize" "syncfullscreen"])
|
||||
(floating true ["bordercolor rgb(073642)"])
|
||||
(fullscreen true ["idleinhibit focus"])
|
||||
(pinned true ["bordercolor rgb(073642) rgb(073642)"])
|
||||
|
||||
# TODO: Convert to nix variables instead of tags
|
||||
### Tags
|
||||
(tag "android" [
|
||||
"tile"
|
||||
"workspace special:android"
|
||||
])
|
||||
(tag "browser" [
|
||||
"group new lock"
|
||||
"tile"
|
||||
"workspace unset"
|
||||
])
|
||||
(tag "clipboard" [
|
||||
"move ${clipboard.x} ${clipboard.y}"
|
||||
"pin"
|
||||
"size ${clipboard.w} ${clipboard.h}"
|
||||
"stayfocused"
|
||||
])
|
||||
(tag "dropdown" [
|
||||
"move ${dropdown.x} ${dropdown.y}"
|
||||
"pin"
|
||||
"size ${dropdown.w} ${dropdown.h}"
|
||||
"workspace special:dropdown"
|
||||
])
|
||||
(tag "editor" [
|
||||
"group invade"
|
||||
"tile"
|
||||
"workspace unset"
|
||||
])
|
||||
(tag "files" [
|
||||
"size 1000 625"
|
||||
])
|
||||
(tag "game" [
|
||||
"group barred"
|
||||
"idleinhibit always"
|
||||
"noborder"
|
||||
"noshadow"
|
||||
"renderunfocused"
|
||||
"workspace name:game"
|
||||
])
|
||||
(tag "music" [
|
||||
"tile"
|
||||
"workspace special:music"
|
||||
])
|
||||
(tag "pip" [
|
||||
"keepaspectratio"
|
||||
"move ${pip.x} ${pip.y}"
|
||||
"pin"
|
||||
"size ${pip.w} ${pip.h}"
|
||||
])
|
||||
(tag "social" [
|
||||
"group"
|
||||
"tile"
|
||||
"workspace unset"
|
||||
])
|
||||
(tag "steam" [ "workspace special:steam" ])
|
||||
(tag "terminal" [
|
||||
"tile"
|
||||
"workspace unset"
|
||||
])
|
||||
(tag "vm" [ "workspace special:vm" ])
|
||||
(tag "wine" [
|
||||
"noborder"
|
||||
"noshadow"
|
||||
])
|
||||
|
||||
### Applications
|
||||
(class ".*\\.(exe|x86_64)" [ "tag +wine" ]) # Wine
|
||||
(class "(sdl-|wl|x)freerdp" [
|
||||
"nomaxsize"
|
||||
"tag +vm"
|
||||
"tile"
|
||||
])
|
||||
(class "cinny" [ "tag +social" ])
|
||||
(class "clipboard" [ "tag +clipboard" ])
|
||||
(class "codium-url-handler" [ "tag +editor" ]) # VSCode
|
||||
(class "discord" [ "tag +social" ])
|
||||
(class "dropdown" [ "tag +dropdown" ])
|
||||
(class "Element" [ "tag +social" ])
|
||||
(class "foot" [ "tag +terminal" ])
|
||||
(class "kitty" [ "tag +terminal" ])
|
||||
(class "libreoffice.+" [
|
||||
"tile"
|
||||
"workspace unset"
|
||||
])
|
||||
(class "moe\\.launcher\\.the-honkers-railway-launcher" [
|
||||
"size 1280 730"
|
||||
"tag +game"
|
||||
])
|
||||
(class "obsidian" [
|
||||
"group barred"
|
||||
"tag +editor"
|
||||
])
|
||||
(class "org\\.gnome\\.Nautilus" [ "tag +files" ])
|
||||
(class "org\\.telegram\\.desktop" [ "tag +social" ])
|
||||
(class "org\\.wezfurlong\\.wezterm" [ "tag +terminal" ])
|
||||
(class "SDL Application" [ "tag +steam" ]) # Steam
|
||||
(class "Spotify" [ "tag +music" ])
|
||||
(class "steam_app_1473350" [ "workspace 0" ]) # (the) Gnorp Apologue
|
||||
(class "steam" [ "tag +steam" ])
|
||||
(class "steam_app_.+" [ "tag +game" ]) # Proton
|
||||
(class "Tap Wizard 2.x86_64" [ "workspace 0" ])
|
||||
(class "virt-manager" [ "tag +vm" ])
|
||||
(class "waydroid.*" [ "tag +android" ])
|
||||
(class "YouTube Music" [ "tag +music" ])
|
||||
|
||||
(title "Picture.in.[Pp]icture" [ "tag +pip" ])
|
||||
(title "Spotify Premium" [ "tag +music" ])
|
||||
(tag.android ["tile" "workspace special:android"])
|
||||
(tag.clipboard ["move ${clipboard.x} ${clipboard.y}" "pin" "size ${clipboard.w} ${clipboard.h}" "stayfocused"])
|
||||
(tag.dropdown ["move ${dropdown.x} ${dropdown.y}" "pin" "size ${dropdown.w} ${dropdown.h}"])
|
||||
(tag.editor ["group invade" "tile"])
|
||||
(tag.files ["size 1000 625"])
|
||||
(tag.game ["group barred" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game"])
|
||||
(tag.music ["tile" "workspace special:music"])
|
||||
(tag.office ["tile" "workspace special:office"])
|
||||
(tag.pip ["keepaspectratio" "move ${pip.x} ${pip.y}" "pin" "size ${pip.w} ${pip.h}"])
|
||||
(tag.social ["group" "tile"])
|
||||
(tag.steam ["workspace special:steam"])
|
||||
(tag.terminal ["tile"])
|
||||
(tag.vm ["workspace special:vm"])
|
||||
(tag.wine ["noborder" "noshadow"])
|
||||
|
||||
### Overrides
|
||||
#!! Expressions are not wrapped in ^$
|
||||
(fields
|
||||
{
|
||||
class = "^lutris$";
|
||||
title = "^Lutris$";
|
||||
}
|
||||
[
|
||||
"center"
|
||||
"size 1000 500"
|
||||
]
|
||||
)
|
||||
(fields {
|
||||
tag = "steam";
|
||||
title = "^notificationtoasts$";
|
||||
} [ "workspace unset" ])
|
||||
(fields {
|
||||
tag = "steam";
|
||||
title = "^Steam$";
|
||||
} [ "tile" ])
|
||||
(class "steam_app_1473350" ["workspace 0"]) # (the) Gnorp Apologue
|
||||
(class "Tap Wizard 2.x86_64" ["workspace 0"])
|
||||
|
||||
(fields
|
||||
{
|
||||
class = "^com\\.github\\.wwmm\\.easyeffects$";
|
||||
title = "^Easy Effects$";
|
||||
}
|
||||
[
|
||||
"size 50% 50%"
|
||||
]
|
||||
)
|
||||
(fields
|
||||
{
|
||||
class = "^discord$";
|
||||
title = "^Discord Updater$";
|
||||
}
|
||||
[
|
||||
"float"
|
||||
"nofocus"
|
||||
]
|
||||
)
|
||||
#!! Expressions are not wrapped in ^$
|
||||
(fields {
|
||||
class = "^com\\.github\\.wwmm\\.easyeffects$";
|
||||
title = "^Easy Effects$"; # Main window
|
||||
} ["size 50% 50%"])
|
||||
(fields {
|
||||
class = "^discord$";
|
||||
title = "^Discord Updater$"; # Update dialog
|
||||
} ["float" "nofocus"])
|
||||
(fields {
|
||||
class = "^lutris$";
|
||||
title = "^Lutris$"; # Main window
|
||||
} ["center" "size 1000 500"])
|
||||
(fields {
|
||||
class = "^steam$";
|
||||
title = "^notificationtoasts$"; # Steam notifications
|
||||
} [])
|
||||
(fields {
|
||||
class = "^steam$";
|
||||
title = "^Steam$"; # Main window
|
||||
} ["tile"])
|
||||
(fields {
|
||||
class = "^virt-manager$";
|
||||
title = "^.+on QEMU/KVM$";
|
||||
} [ "tile" ])
|
||||
title = "^.+on QEMU/KVM$"; # VM window
|
||||
} ["tile"])
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
clipse = "${pkgs.clipse}/bin/clipse";
|
||||
firefox-esr = "${
|
||||
config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage
|
||||
|
@ -22,9 +19,8 @@ let
|
|||
}/bin/waybar";
|
||||
|
||||
cfg = config.custom.desktops.hyprland.settings;
|
||||
in
|
||||
{
|
||||
options.custom.desktops.hyprland.settings.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.desktops.hyprland.settings.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
|
@ -51,12 +47,14 @@ in
|
|||
#?? envd = VARIABLE, VALUE
|
||||
# HACK: Mapped home-manager variables to envd in lieu of upstream fix
|
||||
# https://github.com/nix-community/home-manager/issues/2659
|
||||
envd =
|
||||
with builtins;
|
||||
attrValues (
|
||||
mapAttrs (
|
||||
envd = with builtins;
|
||||
attrValues
|
||||
(
|
||||
mapAttrs
|
||||
(
|
||||
name: value: "${name}, ${toString value}"
|
||||
) config.home-manager.users.${config.custom.username}.home.sessionVariables
|
||||
)
|
||||
config.home-manager.users.${config.custom.username}.home.sessionVariables
|
||||
)
|
||||
++ [
|
||||
"EDITOR, gnome-text-editor"
|
||||
|
@ -66,18 +64,20 @@ in
|
|||
#// exec = [ ];
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Keywords/#executing
|
||||
exec-once = [
|
||||
"${rm} ~/.config/qalculate/qalc.dmenu.history" # Clear calc history
|
||||
"${clipse} -clear" # Clear clipboard history
|
||||
"${clipse} -listen" # Monitor clipboard
|
||||
sway-audio-idle-inhibit # Inhibit idle while audio is playing
|
||||
exec-once =
|
||||
[
|
||||
"${rm} ~/.config/qalculate/qalc.dmenu.history" # Clear calc history
|
||||
"${clipse} -clear" # Clear clipboard history
|
||||
"${clipse} -listen" # Monitor clipboard
|
||||
sway-audio-idle-inhibit # Inhibit idle while audio is playing
|
||||
|
||||
# TODO: Remove when systemd service fixed
|
||||
# https://github.com/Alexays/Waybar/issues/2882
|
||||
"${sleep} 2 && ${systemctl} --user restart waybar"
|
||||
# TODO: Remove when systemd service fixed
|
||||
# https://github.com/Alexays/Waybar/issues/2882
|
||||
"${sleep} 2 && ${systemctl} --user restart waybar"
|
||||
|
||||
"[tag +browser] ${firefox-esr}"
|
||||
] ++ optionals config.custom.wallpaper [ "wallpaper" ];
|
||||
"[group new lock; tile] ${firefox-esr}"
|
||||
]
|
||||
++ optionals config.custom.wallpaper ["wallpaper"];
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#xwayland
|
||||
xwayland = {
|
||||
|
@ -112,9 +112,9 @@ in
|
|||
#?? animation = NAME, ONOFF, SPEED, CURVE, [STYLE]
|
||||
animation = [
|
||||
"global, 1, 5, default"
|
||||
"windows, 1, 5, default, slide"
|
||||
"layers, 1, 5, default, slide"
|
||||
"specialWorkspace, 1, 5, default, fade"
|
||||
"windows, 1, 5, default, slide"
|
||||
"layers, 0"
|
||||
];
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
|
@ -142,7 +142,10 @@ in
|
|||
"col.inactive" = "rgba(6c71c440)";
|
||||
"col.locked_active" = "rgb(d33682)";
|
||||
"col.locked_inactive" = "rgba(d3368240)";
|
||||
font_size = if config.custom.hidpi then 16 else 10;
|
||||
font_size =
|
||||
if config.custom.hidpi
|
||||
then 16
|
||||
else 10;
|
||||
height = 5;
|
||||
render_titles = false;
|
||||
text_color = "rgb(93a1a1)";
|
||||
|
@ -166,13 +169,22 @@ in
|
|||
#// vrr = 2; # VRR in fullscreen
|
||||
};
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#binds
|
||||
binds = {
|
||||
allow_workspace_cycles = true;
|
||||
disable_keybind_grabbing = true;
|
||||
ignore_group_lock = true;
|
||||
scroll_event_delay = 0;
|
||||
};
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
input = {
|
||||
accel_profile = "flat";
|
||||
float_switch_override_focus = 0; # Disable float to tile hover focus
|
||||
focus_on_close = 1; # Focus window under mouse
|
||||
follow_mouse = 1; # Hover focus
|
||||
mouse_refocus = false;
|
||||
repeat_delay = 400;
|
||||
repeat_delay = 300;
|
||||
repeat_rate = 40;
|
||||
sensitivity = 0.5;
|
||||
#// scroll_factor = 0.75;
|
||||
|
@ -206,6 +218,9 @@ in
|
|||
|
||||
# https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs
|
||||
#?? device = { name = NAME ... }
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#custom-accel-profiles
|
||||
# https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html#the-custom-acceleration-profile
|
||||
#?? custom <STEP> <POINTS...>
|
||||
# TODO: Combine same devices
|
||||
# FIXME: Hotplugging may result in different id
|
||||
device = [
|
||||
|
@ -229,8 +244,8 @@ in
|
|||
|
||||
{
|
||||
name = "logitech-m570";
|
||||
accel_profile = "adaptive";
|
||||
sensitivity = -0.9;
|
||||
accel_profile = "custom 1 0 1 3";
|
||||
sensitivity = -0.1;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.desktops.kde;
|
||||
in
|
||||
{
|
||||
options.custom.desktops.kde.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.desktops.kde;
|
||||
in {
|
||||
options.custom.desktops.kde.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable { services.desktopManager.plasma6.enable = true; };
|
||||
config = mkIf cfg.enable {services.desktopManager.plasma6.enable = true;};
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.files.agenix;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.files.agenix;
|
||||
in {
|
||||
# https://wiki.nixos.org/wiki/Agenix
|
||||
# https://github.com/ryantm/agenix
|
||||
options.custom.files.agenix.enable = mkOption { default = false; };
|
||||
options.custom.files.agenix.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
age.identityPaths = [ "/etc/ssh/id_ed25519" ]; # !! Must be set without sshd
|
||||
age.identityPaths = ["/etc/ssh/id_ed25519"]; # !! Must be set without sshd
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
config.custom.files = mkIf config.custom.default {
|
||||
agenix.enable = true;
|
||||
dev.enable = true;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.files.dev;
|
||||
in
|
||||
{
|
||||
options.custom.files.dev.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.files.dev;
|
||||
in {
|
||||
options.custom.files.dev.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# .keep empty file needed to create empty directory
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.files.mnt;
|
||||
in
|
||||
{
|
||||
options.custom.files.mnt.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.files.mnt;
|
||||
in {
|
||||
options.custom.files.mnt.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Set /mnt permissions
|
||||
systemd.tmpfiles.rules = [ "z /mnt 0755 root root" ];
|
||||
systemd.tmpfiles.rules = ["z /mnt 0755 root root"];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.files.nixos;
|
||||
in
|
||||
{
|
||||
options.custom.files.nixos.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.files.nixos;
|
||||
in {
|
||||
options.custom.files.nixos.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.adb;
|
||||
in
|
||||
{
|
||||
options.custom.programs.adb.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.adb;
|
||||
in {
|
||||
options.custom.programs.adb.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://wiki.nixos.org/wiki/Android
|
||||
# https://developer.android.com/tools/adb
|
||||
programs.adb.enable = true;
|
||||
users.users.${config.custom.username}.extraGroups = [ "adbusers" ];
|
||||
users.users.${config.custom.username}.extraGroups = ["adbusers"];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,17 +4,13 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.ags;
|
||||
in
|
||||
{
|
||||
options.custom.programs.ags.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.ags.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
imports = [inputs.ags.homeManagerModules.default];
|
||||
|
||||
# https://aylur.github.io/ags-docs
|
||||
# https://github.com/Aylur/ags
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.alacritty;
|
||||
in
|
||||
{
|
||||
options.custom.programs.alacritty.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.alacritty;
|
||||
in {
|
||||
options.custom.programs.alacritty.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/alacritty/alacritty
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.anime-game-launcher;
|
||||
in
|
||||
{
|
||||
options.custom.programs.anime-game-launcher.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.anime-game-launcher;
|
||||
in {
|
||||
options.custom.programs.anime-game-launcher.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://github.com/an-anime-team
|
||||
|
|
|
@ -5,17 +5,13 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.anyrun;
|
||||
in
|
||||
{
|
||||
options.custom.programs.anyrun.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.anyrun.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
imports = [ inputs.anyrun.home-managerModules.default ];
|
||||
imports = [inputs.anyrun.home-managerModules.default];
|
||||
|
||||
# https://github.com/Kirottu/anyrun
|
||||
programs.anyrun = {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.appimage;
|
||||
in
|
||||
{
|
||||
options.custom.programs.appimage.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.appimage;
|
||||
in {
|
||||
options.custom.programs.appimage.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://wiki.nixos.org/wiki/Appimage
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi";
|
||||
|
||||
cfg = config.custom.programs.bitwarden-menu;
|
||||
in
|
||||
{
|
||||
options.custom.programs.bitwarden-menu.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.bitwarden-menu.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/firecat53/bitwarden-menu
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.chromium;
|
||||
in
|
||||
{
|
||||
options.custom.programs.chromium.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.chromium;
|
||||
in {
|
||||
options.custom.programs.chromium.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://wiki.nixos.org/wiki/Chromium
|
||||
|
|
|
@ -4,14 +4,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.clipse;
|
||||
in
|
||||
{
|
||||
options.custom.programs.clipse.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.clipse.enable = mkOption {default = false;};
|
||||
|
||||
config = {
|
||||
# https://github.com/savedra1/clipse
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.dconf;
|
||||
in
|
||||
{
|
||||
options.custom.programs.dconf.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.dconf;
|
||||
in {
|
||||
options.custom.programs.dconf.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://gitlab.gnome.org/GNOME/dconf
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
config.custom.programs = mkMerge [
|
||||
(mkIf config.custom.default {
|
||||
direnv.enable = true;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.direnv;
|
||||
in
|
||||
{
|
||||
options.custom.programs.direnv.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.direnv;
|
||||
in {
|
||||
options.custom.programs.direnv.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://github.com/direnv/direnv
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.discord;
|
||||
in
|
||||
{
|
||||
options.custom.programs.discord.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.discord;
|
||||
in {
|
||||
options.custom.programs.discord.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.myned = mkIf cfg.enable {
|
||||
home.file.".config/BetterDiscord".source =
|
||||
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink
|
||||
"/home/${config.custom.username}/SYNC/common/config/discord/BetterDiscord";
|
||||
"/home/${config.custom.username}/SYNC/common/config/discord/BetterDiscord";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.element-desktop;
|
||||
in
|
||||
{
|
||||
options.custom.programs.element-desktop.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.element-desktop;
|
||||
in {
|
||||
options.custom.programs.element-desktop.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# Element Desktop custom themes
|
||||
|
|
|
@ -4,23 +4,19 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
fastfetch = "${pkgs.fastfetch}/bin/fastfetch";
|
||||
|
||||
cfg = config.custom.programs.fastfetch;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.custom.programs.fastfetch = {
|
||||
enable = mkOption { default = false; };
|
||||
greet = mkOption { default = false; };
|
||||
enable = mkOption {default = false;};
|
||||
greet = mkOption {default = false;};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://github.com/fastfetch-cli/fastfetch
|
||||
environment.systemPackages = [ pkgs.fastfetch ];
|
||||
environment.systemPackages = [pkgs.fastfetch];
|
||||
|
||||
# System info greeting
|
||||
programs.fish.interactiveShellInit = mkIf cfg.greet ''
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.firefox;
|
||||
in
|
||||
{
|
||||
options.custom.programs.firefox.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.firefox.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# TODO: Switch to librewolf when supported by module
|
||||
|
@ -116,13 +112,12 @@ in
|
|||
# https://mozilla.github.io/policy-templates/#extensionsettings
|
||||
#?? https://addons.mozilla.org/en-US/firefox
|
||||
#?? about:support#addons
|
||||
ExtensionSettings =
|
||||
let
|
||||
extension = id: {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${id}/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
in
|
||||
ExtensionSettings = let
|
||||
extension = id: {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${id}/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
in
|
||||
mkMerge [
|
||||
(mkIf config.custom.minimal {
|
||||
"uBlock0@raymondhill.net" = extension "ublock-origin"; # uBlock Origin
|
||||
|
@ -194,59 +189,57 @@ in
|
|||
#!! Only certain preferences are supported via policies
|
||||
# https://mozilla.github.io/policy-templates/#preferences
|
||||
#?? about:config
|
||||
Preferences =
|
||||
let
|
||||
locked = value: {
|
||||
Value = value;
|
||||
Status = "locked";
|
||||
};
|
||||
in
|
||||
{
|
||||
"accessibility.browsewithcaret" = locked false;
|
||||
"accessibility.typeaheadfind" = locked false;
|
||||
"browser.aboutConfig.showWarning" = locked false;
|
||||
"browser.contentblocking.category" = locked "standard";
|
||||
"browser.crashReports.unsubmittedCheck.autoSubmit2" = locked false;
|
||||
"browser.ctrlTab.sortByRecentlyUsed" = locked false;
|
||||
"browser.download.always_ask_before_handling_new_types" = locked false;
|
||||
"browser.download.useDownloadDir" = locked true;
|
||||
"browser.link.open_newwindow" = locked 3; # New tab
|
||||
"browser.link.open_newwindow.restriction" = locked 0; # Popups in new tab
|
||||
"browser.newtabpage.enabled" = locked true;
|
||||
"browser.preferences.defaultPerformanceSettings.enabled" = locked true;
|
||||
"browser.quitShortcut.disabled" = locked true;
|
||||
"browser.search.widget.inNavBar" = locked false;
|
||||
"browser.startup.homepage" = locked "about:home";
|
||||
"browser.startup.page" = locked 3; # Previous session
|
||||
"browser.tabs.closeTabByDblclick" = locked true;
|
||||
"browser.tabs.closeWindowWithLastTab" = locked false;
|
||||
"browser.tabs.insertAfterCurrent" = locked false;
|
||||
"browser.tabs.insertRelatedAfterCurrent" = locked false;
|
||||
"browser.tabs.loadInBackground" = locked true;
|
||||
"browser.tabs.warnOnClose" = locked false;
|
||||
"browser.tabs.warnOnCloseOtherTabs" = locked false;
|
||||
"browser.theme.dark-private-windows" = locked false;
|
||||
"browser.toolbars.bookmarks.showOtherBookmarks" = locked false;
|
||||
"browser.uidensity" = locked 0;
|
||||
"browser.warnOnQuitShortcut" = locked true;
|
||||
"dom.security.https_only_mode" = locked true;
|
||||
"extensions.formautofill.addresses.enabled" = locked false;
|
||||
"extensions.formautofill.creditCards.enabled" = locked false;
|
||||
"general.autoScroll" = locked false;
|
||||
"general.smoothScroll" = locked true;
|
||||
"layers.acceleration.force-enabled" = locked true;
|
||||
"layout.css.always_underline_links" = locked false;
|
||||
"layout.css.backdrop-filter.enabled" = locked true;
|
||||
"layout.spellcheckDefault" = locked 0; # Disabled
|
||||
"media.eme.enabled" = locked true; # DRM
|
||||
"media.hardwaremediakeys.enabled" = locked true;
|
||||
"media.hardware-video-decoding.enabled" = locked false; # !! Disable video acceleration
|
||||
#// "media.rdd-process.enabled" = locked false; # RDD sandbox #!! Insecure
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = locked true;
|
||||
"ui.key.menuAccessKey" = locked 0; # Disable menu key
|
||||
"widget.gtk.overlay-scrollbars.enabled" = locked true;
|
||||
"widget.gtk.rounded-bottom-corners.enabled" = locked true;
|
||||
Preferences = let
|
||||
locked = value: {
|
||||
Value = value;
|
||||
Status = "locked";
|
||||
};
|
||||
in {
|
||||
"accessibility.browsewithcaret" = locked false;
|
||||
"accessibility.typeaheadfind" = locked false;
|
||||
"browser.aboutConfig.showWarning" = locked false;
|
||||
"browser.contentblocking.category" = locked "standard";
|
||||
"browser.crashReports.unsubmittedCheck.autoSubmit2" = locked false;
|
||||
"browser.ctrlTab.sortByRecentlyUsed" = locked false;
|
||||
"browser.download.always_ask_before_handling_new_types" = locked false;
|
||||
"browser.download.useDownloadDir" = locked true;
|
||||
"browser.link.open_newwindow" = locked 3; # New tab
|
||||
"browser.link.open_newwindow.restriction" = locked 0; # Popups in new tab
|
||||
"browser.newtabpage.enabled" = locked true;
|
||||
"browser.preferences.defaultPerformanceSettings.enabled" = locked true;
|
||||
"browser.quitShortcut.disabled" = locked true;
|
||||
"browser.search.widget.inNavBar" = locked false;
|
||||
"browser.startup.homepage" = locked "about:home";
|
||||
"browser.startup.page" = locked 3; # Previous session
|
||||
"browser.tabs.closeTabByDblclick" = locked true;
|
||||
"browser.tabs.closeWindowWithLastTab" = locked false;
|
||||
"browser.tabs.insertAfterCurrent" = locked false;
|
||||
"browser.tabs.insertRelatedAfterCurrent" = locked false;
|
||||
"browser.tabs.loadInBackground" = locked true;
|
||||
"browser.tabs.warnOnClose" = locked false;
|
||||
"browser.tabs.warnOnCloseOtherTabs" = locked false;
|
||||
"browser.theme.dark-private-windows" = locked false;
|
||||
"browser.toolbars.bookmarks.showOtherBookmarks" = locked false;
|
||||
"browser.uidensity" = locked 0;
|
||||
"browser.warnOnQuitShortcut" = locked true;
|
||||
"dom.security.https_only_mode" = locked true;
|
||||
"extensions.formautofill.addresses.enabled" = locked false;
|
||||
"extensions.formautofill.creditCards.enabled" = locked false;
|
||||
"general.autoScroll" = locked false;
|
||||
"general.smoothScroll" = locked true;
|
||||
"layers.acceleration.force-enabled" = locked true;
|
||||
"layout.css.always_underline_links" = locked false;
|
||||
"layout.css.backdrop-filter.enabled" = locked true;
|
||||
"layout.spellcheckDefault" = locked 0; # Disabled
|
||||
"media.eme.enabled" = locked true; # DRM
|
||||
"media.hardwaremediakeys.enabled" = locked true;
|
||||
"media.hardware-video-decoding.enabled" = locked false; # !! Disable video acceleration
|
||||
#// "media.rdd-process.enabled" = locked false; # RDD sandbox #!! Insecure
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = locked true;
|
||||
"ui.key.menuAccessKey" = locked 0; # Disable menu key
|
||||
"widget.gtk.overlay-scrollbars.enabled" = locked true;
|
||||
"widget.gtk.rounded-bottom-corners.enabled" = locked true;
|
||||
};
|
||||
|
||||
SearchBar = "unified";
|
||||
|
||||
|
@ -552,7 +545,7 @@ in
|
|||
"Downloads/stg" = mkIf config.custom.full {
|
||||
source =
|
||||
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink
|
||||
"/home/myned/SYNC/common/config/extensions/Simple Tab Groups";
|
||||
"/home/myned/SYNC/common/config/extensions/Simple Tab Groups";
|
||||
};
|
||||
|
||||
# Work around icon dissociation due to missing --name flag in actions
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.fish;
|
||||
in
|
||||
{
|
||||
options.custom.programs.fish.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.fish;
|
||||
in {
|
||||
options.custom.programs.fish.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://wiki.nixos.org/wiki/Fish
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.foot;
|
||||
in
|
||||
{
|
||||
options.custom.programs.foot.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.foot;
|
||||
in {
|
||||
options.custom.programs.foot.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://codeberg.org/dnkl/foot
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.fuzzel;
|
||||
in
|
||||
{
|
||||
options.custom.programs.fuzzel.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.fuzzel;
|
||||
in {
|
||||
options.custom.programs.fuzzel.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://codeberg.org/dnkl/fuzzel
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.gamemode;
|
||||
in
|
||||
{
|
||||
options.custom.programs.gamemode.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.gamemode;
|
||||
in {
|
||||
options.custom.programs.gamemode.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://github.com/FeralInteractive/gamemode
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.gamescope;
|
||||
in
|
||||
{
|
||||
options.custom.programs.gamescope.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.gamescope;
|
||||
in {
|
||||
options.custom.programs.gamescope.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://github.com/ValveSoftware/gamescope
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.git;
|
||||
in
|
||||
{
|
||||
options.custom.programs.git.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.git;
|
||||
in {
|
||||
options.custom.programs.git.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://wiki.archlinux.org/title/Git
|
||||
|
|
|
@ -4,43 +4,38 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.gnome-shell;
|
||||
in
|
||||
{
|
||||
options.custom.programs.gnome-shell.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.gnome-shell.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# BUG: programs.gnome-shell.theme option forces installation of gnome-shell-extensions
|
||||
programs.gnome-shell = {
|
||||
enable = true;
|
||||
|
||||
extensions =
|
||||
with pkgs.gnomeExtensions;
|
||||
extensions = with pkgs.gnomeExtensions;
|
||||
optionals config.custom.default [
|
||||
{ package = appindicator; } # https://github.com/ubuntu/gnome-shell-extension-appindicator
|
||||
{package = appindicator;} # https://github.com/ubuntu/gnome-shell-extension-appindicator
|
||||
]
|
||||
++ optionals config.custom.minimal [
|
||||
{ package = caffeine; } # https://github.com/eonpatapon/gnome-shell-extension-caffeine
|
||||
{ package = dash-to-dock; } # https://github.com/micheleg/dash-to-dock
|
||||
{package = caffeine;} # https://github.com/eonpatapon/gnome-shell-extension-caffeine
|
||||
{package = dash-to-dock;} # https://github.com/micheleg/dash-to-dock
|
||||
#// { package = dash2dock-lite; } # https://github.com/icedman/dash2dock-lite
|
||||
{ package = gsconnect; } # https://github.com/GSConnect/gnome-shell-extension-gsconnect
|
||||
{ package = just-perfection; } # https://gitlab.gnome.org/jrahmatzadeh/just-perfection
|
||||
{ package = rounded-window-corners-reborn; } # https://github.com/flexagoon/rounded-window-corners
|
||||
{package = gsconnect;} # https://github.com/GSConnect/gnome-shell-extension-gsconnect
|
||||
{package = just-perfection;} # https://gitlab.gnome.org/jrahmatzadeh/just-perfection
|
||||
{package = rounded-window-corners-reborn;} # https://github.com/flexagoon/rounded-window-corners
|
||||
#// { package = user-themes; } # https://gitlab.gnome.org/GNOME/gnome-shell-extensions
|
||||
]
|
||||
++ optionals config.custom.full [
|
||||
#// { package = auto-move-windows; } # https://gitlab.gnome.org/GNOME/gnome-shell-extensions
|
||||
{ package = clipboard-indicator; } # https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator
|
||||
{ package = ddterm; } # https://github.com/ddterm/gnome-shell-extension-ddterm
|
||||
{package = clipboard-indicator;} # https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator
|
||||
{package = ddterm;} # https://github.com/ddterm/gnome-shell-extension-ddterm
|
||||
#// { package = hide-top-bar; } # https://gitlab.gnome.org/tuxor1337/hidetopbar
|
||||
{ package = media-controls; } # https://github.com/sakithb/media-controls
|
||||
{package = media-controls;} # https://github.com/sakithb/media-controls
|
||||
#// { package = smart-auto-move; } # https://github.com/khimaros/smart-auto-move
|
||||
{ package = tailscale-qs; } # https://github.com/joaophi/tailscale-gnome-qs
|
||||
{ package = tiling-assistant; } # https://github.com/Leleat/Tiling-Assistant
|
||||
{package = tailscale-qs;} # https://github.com/joaophi/tailscale-gnome-qs
|
||||
{package = tiling-assistant;} # https://github.com/Leleat/Tiling-Assistant
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.gnome-terminal;
|
||||
in
|
||||
{
|
||||
options.custom.programs.gnome-terminal.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.gnome-terminal;
|
||||
in {
|
||||
options.custom.programs.gnome-terminal.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://gitlab.gnome.org/GNOME/gnome-terminal
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.gpg;
|
||||
in
|
||||
{
|
||||
options.custom.programs.gpg.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.gpg;
|
||||
in {
|
||||
options.custom.programs.gpg.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://wiki.archlinux.org/title/GnuPG
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.htop;
|
||||
in
|
||||
{
|
||||
options.custom.programs.htop.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.htop;
|
||||
in {
|
||||
options.custom.programs.htop.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/htop-dev/htop
|
||||
|
@ -71,25 +71,25 @@ in
|
|||
}
|
||||
// (
|
||||
with config.home-manager.users.${config.custom.username}.lib.htop;
|
||||
leftMeters [
|
||||
(bar "LeftCPUs4")
|
||||
(text "Blank")
|
||||
(bar "CPU")
|
||||
(bar "MemorySwap")
|
||||
(text "System")
|
||||
(text "DateTime")
|
||||
]
|
||||
leftMeters [
|
||||
(bar "LeftCPUs4")
|
||||
(text "Blank")
|
||||
(bar "CPU")
|
||||
(bar "MemorySwap")
|
||||
(text "System")
|
||||
(text "DateTime")
|
||||
]
|
||||
)
|
||||
// (
|
||||
with config.home-manager.users.${config.custom.username}.lib.htop;
|
||||
rightMeters [
|
||||
(bar "RightCPUs4")
|
||||
(text "Blank")
|
||||
(bar "NetworkIO")
|
||||
(bar "DiskIO")
|
||||
(text "Hostname")
|
||||
(text "Uptime")
|
||||
]
|
||||
rightMeters [
|
||||
(bar "RightCPUs4")
|
||||
(text "Blank")
|
||||
(bar "NetworkIO")
|
||||
(bar "DiskIO")
|
||||
(text "Hostname")
|
||||
(text "Uptime")
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.hyprlock;
|
||||
in
|
||||
{
|
||||
options.custom.programs.hyprlock.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.hyprlock;
|
||||
in {
|
||||
options.custom.programs.hyprlock.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.hyprlock.enable = true; # Grant PAM access
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.kdeconnect;
|
||||
in
|
||||
{
|
||||
options.custom.programs.kdeconnect.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.kdeconnect;
|
||||
in {
|
||||
options.custom.programs.kdeconnect.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://github.com/KDE/kdeconnect-kde
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.kitty;
|
||||
in
|
||||
{
|
||||
options.custom.programs.kitty.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.kitty;
|
||||
in {
|
||||
options.custom.programs.kitty.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://sw.kovidgoyal.net/kitty/
|
||||
|
|
|
@ -4,25 +4,21 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.libreoffice;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.custom.programs.libreoffice = {
|
||||
enable = mkOption { default = false; };
|
||||
package = mkOption { default = pkgs.libreoffice-fresh; };
|
||||
enable = mkOption {default = false;};
|
||||
package = mkOption {default = pkgs.libreoffice-fresh;};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://www.libreoffice.org
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
environment.systemPackages = [cfg.package];
|
||||
|
||||
#!! Options not available, files synced
|
||||
home-manager.users.${config.custom.username}.home.file.".config/libreoffice/4/user".source =
|
||||
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink
|
||||
"/home/${config.custom.username}/SYNC/linux/config/libreoffice/user";
|
||||
"/home/${config.custom.username}/SYNC/linux/config/libreoffice/user";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.librewolf;
|
||||
in
|
||||
{
|
||||
options.custom.programs.librewolf.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.librewolf;
|
||||
in {
|
||||
options.custom.programs.librewolf.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://codeberg.org/librewolf
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.localsend;
|
||||
in
|
||||
{
|
||||
options.custom.programs.localsend.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.localsend;
|
||||
in {
|
||||
options.custom.programs.localsend.enable = mkOption {default = false;};
|
||||
|
||||
config =
|
||||
if (versionAtLeast version "24.11") then
|
||||
if (versionAtLeast version "24.11")
|
||||
then
|
||||
(mkIf cfg.enable {
|
||||
# https://github.com/localsend/localsend
|
||||
programs.localsend = {
|
||||
|
@ -17,6 +18,5 @@ in
|
|||
openFirewall = true;
|
||||
};
|
||||
})
|
||||
else
|
||||
{ };
|
||||
else {};
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.logseq;
|
||||
in
|
||||
{
|
||||
options.custom.programs.logseq.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.logseq;
|
||||
in {
|
||||
options.custom.programs.logseq.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
#!! Synced imperative configuration
|
||||
home.file.".logseq/".source =
|
||||
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink
|
||||
"/home/${config.custom.username}/SYNC/common/config/logseq/";
|
||||
"/home/${config.custom.username}/SYNC/common/config/logseq/";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.man;
|
||||
in
|
||||
{
|
||||
options.custom.programs.man.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.man;
|
||||
in {
|
||||
options.custom.programs.man.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Enable as much offline docs as possible
|
||||
|
|
|
@ -4,14 +4,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.mangohud;
|
||||
in
|
||||
{
|
||||
options.custom.programs.mangohud.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.mangohud.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/flightlessmango/MangoHud
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.mosh;
|
||||
in
|
||||
{
|
||||
options.custom.programs.mosh.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.mosh;
|
||||
in {
|
||||
options.custom.programs.mosh.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://wiki.nixos.org/wiki/Mosh
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.nano;
|
||||
in
|
||||
{
|
||||
options.custom.programs.nano.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.nano;
|
||||
in {
|
||||
options.custom.programs.nano.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://wiki.archlinux.org/title/Nano
|
||||
|
@ -20,6 +20,7 @@ in
|
|||
set autoindent
|
||||
set magic
|
||||
set minibar
|
||||
set linenumbers
|
||||
set tabsize 2
|
||||
set tabstospaces
|
||||
set trimblanks
|
||||
|
|
|
@ -4,14 +4,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.nautilus;
|
||||
in
|
||||
{
|
||||
options.custom.programs.nautilus.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.nautilus.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.gvfs.enable = true; # Trash dependency
|
||||
|
|
|
@ -1,28 +1,26 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.networkmanager-dmenu;
|
||||
in
|
||||
{
|
||||
options.custom.programs.networkmanager-dmenu.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.networkmanager-dmenu;
|
||||
in {
|
||||
options.custom.programs.networkmanager-dmenu.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/firecat53/networkmanager-dmenu
|
||||
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
|
||||
#!! Option not available, files written directly
|
||||
# FIXME: active_chars does not take effect
|
||||
home.file.".config/networkmanager-dmenu/config.ini".text =
|
||||
let
|
||||
wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi";
|
||||
in
|
||||
''
|
||||
[dmenu]
|
||||
dmenu_command = ${wofi} --dmenu --lines 11
|
||||
active_chars = >
|
||||
wifi_icons =
|
||||
format = {icon} {name}
|
||||
'';
|
||||
home.file.".config/networkmanager-dmenu/config.ini".text = let
|
||||
wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi";
|
||||
in ''
|
||||
[dmenu]
|
||||
dmenu_command = ${wofi} --dmenu --lines 11
|
||||
active_chars = >
|
||||
wifi_icons =
|
||||
format = {icon} {name}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.nh;
|
||||
in
|
||||
{
|
||||
options.custom.programs.nh.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.nh;
|
||||
in {
|
||||
options.custom.programs.nh.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://github.com/viperML/nh
|
||||
|
@ -16,7 +16,11 @@ in
|
|||
|
||||
clean = {
|
||||
enable = true;
|
||||
extraArgs = "--keep-since ${if config.custom.minimal then "7" else "30"}d";
|
||||
extraArgs = "--keep-since ${
|
||||
if config.custom.minimal
|
||||
then "7"
|
||||
else "30"
|
||||
}d";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.nheko;
|
||||
in
|
||||
{
|
||||
options.custom.programs.nheko.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.nheko;
|
||||
in {
|
||||
options.custom.programs.nheko.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/Nheko-Reborn/nheko
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.nix-index;
|
||||
in
|
||||
{
|
||||
options.custom.programs.nix-index.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.nix-index;
|
||||
in {
|
||||
options.custom.programs.nix-index.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://github.com/nix-community/nix-index
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.nix-ld;
|
||||
in
|
||||
{
|
||||
options.custom.programs.nix-ld.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.nix-ld;
|
||||
in {
|
||||
options.custom.programs.nix-ld.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://github.com/nix-community/nix-ld
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.nushell;
|
||||
in
|
||||
{
|
||||
options.custom.programs.nushell.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.nushell;
|
||||
in {
|
||||
options.custom.programs.nushell.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# TODO: Create config
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.nvtop;
|
||||
in
|
||||
{
|
||||
options.custom.programs.nvtop.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.nvtop;
|
||||
in {
|
||||
options.custom.programs.nvtop.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/Syllo/nvtop
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.obs-studio;
|
||||
in
|
||||
{
|
||||
options.custom.programs.obs-studio.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.obs-studio;
|
||||
in {
|
||||
options.custom.programs.obs-studio.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/obsproject/obs-studio
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.onedrive;
|
||||
in
|
||||
{
|
||||
options.custom.programs.onedrive.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.onedrive;
|
||||
in {
|
||||
options.custom.programs.onedrive.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/abraunegg/onedrive
|
||||
|
|
|
@ -4,14 +4,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.path-of-building;
|
||||
in
|
||||
{
|
||||
options.custom.programs.path-of-building.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.path-of-building.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
xdg.desktopEntries.path-of-building = {
|
||||
|
|
|
@ -4,14 +4,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.rbw;
|
||||
in
|
||||
{
|
||||
options.custom.programs.rbw.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.rbw.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/doy/rbw
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.rofi-rbw;
|
||||
in
|
||||
{
|
||||
options.custom.programs.rofi-rbw.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.rofi-rbw;
|
||||
in {
|
||||
options.custom.programs.rofi-rbw.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/fdw/rofi-rbw
|
||||
|
|
|
@ -4,14 +4,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.rofi;
|
||||
in
|
||||
{
|
||||
options.custom.programs.rofi.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.rofi.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
#!! Creates package derivation
|
||||
|
@ -30,8 +26,8 @@ in
|
|||
# Build against rofi-wayland due to ABI incompatibility with upstream
|
||||
# https://github.com/lbonn/rofi/issues/96
|
||||
# https://github.com/NixOS/nixpkgs/issues/298539
|
||||
(rofi-calc.override { rofi-unwrapped = rofi-wayland-unwrapped; }) # Calculator
|
||||
(rofi-top.override { rofi-unwrapped = rofi-wayland-unwrapped; }) # System monitor
|
||||
(rofi-calc.override {rofi-unwrapped = rofi-wayland-unwrapped;}) # Calculator
|
||||
(rofi-top.override {rofi-unwrapped = rofi-wayland-unwrapped;}) # System monitor
|
||||
];
|
||||
|
||||
#?? rofi-theme-selector
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.seahorse;
|
||||
in
|
||||
{
|
||||
options.custom.programs.seahorse.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.seahorse;
|
||||
in {
|
||||
options.custom.programs.seahorse.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.seahorse.enable = true;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.slurp;
|
||||
in
|
||||
{
|
||||
options.custom.programs.slurp.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.slurp;
|
||||
in {
|
||||
options.custom.programs.slurp.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/emersion/slurp
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.ssh;
|
||||
in
|
||||
{
|
||||
options.custom.programs.ssh.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.ssh;
|
||||
in {
|
||||
options.custom.programs.ssh.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Disable prompt for new hosts
|
||||
|
|
|
@ -4,33 +4,31 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.steam;
|
||||
in
|
||||
{
|
||||
in {
|
||||
# https://wiki.nixos.org/wiki/Steam
|
||||
# https://store.steampowered.com
|
||||
options.custom.programs.steam = {
|
||||
enable = mkOption { default = false; };
|
||||
extest = mkOption { default = false; };
|
||||
enable = mkOption {default = false;};
|
||||
extest = mkOption {default = false;};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extest.enable = cfg.extest; # Work around invisible cursor on Wayland
|
||||
extraCompatPackages = [ pkgs.proton-ge-bin ];
|
||||
|
||||
gamescopeSession = {
|
||||
programs.steam =
|
||||
{
|
||||
enable = true;
|
||||
# args = [
|
||||
# "--backend sdl"
|
||||
# "--fullscreen"
|
||||
# ];
|
||||
};
|
||||
} // optionalAttrs (versionAtLeast version "24.11") { protontricks.enable = true; };
|
||||
extest.enable = cfg.extest; # Work around invisible cursor on Wayland
|
||||
extraCompatPackages = [pkgs.proton-ge-bin];
|
||||
|
||||
gamescopeSession = {
|
||||
enable = true;
|
||||
# args = [
|
||||
# "--backend sdl"
|
||||
# "--fullscreen"
|
||||
# ];
|
||||
};
|
||||
}
|
||||
// optionalAttrs (versionAtLeast version "24.11") {protontricks.enable = true;};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,19 +4,15 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.swaylock;
|
||||
in
|
||||
{
|
||||
options.custom.programs.swaylock.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.swaylock.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Allow swaylock to unlock the session
|
||||
# https://wiki.nixos.org/wiki/Sway#Swaylock_cannot_be_unlocked_with_the_correct_password
|
||||
security.pam.services.swaylock = { };
|
||||
security.pam.services.swaylock = {};
|
||||
|
||||
# https://github.com/swaywm/swaylock
|
||||
home-manager.users.${config.custom.username}.programs.swaylock = {
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.thunderbird;
|
||||
in
|
||||
{
|
||||
options.custom.programs.thunderbird.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.thunderbird.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://wiki.nixos.org/wiki/Thunderbird
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.tio;
|
||||
in
|
||||
{
|
||||
options.custom.programs.tio.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.tio;
|
||||
in {
|
||||
options.custom.programs.tio.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Allow serial device access
|
||||
# https://github.com/tio/tio?tab=readme-ov-file#46-known-issues
|
||||
users.users.${config.custom.username}.extraGroups = [ "dialout" ];
|
||||
users.users.${config.custom.username}.extraGroups = ["dialout"];
|
||||
|
||||
# https://github.com/tio/tio
|
||||
#!! Options not available, files written directly
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.tmux;
|
||||
in
|
||||
{
|
||||
options.custom.programs.tmux.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.tmux;
|
||||
in {
|
||||
options.custom.programs.tmux.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://wiki.nixos.org/wiki/Tmux
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.custom.programs.vscode;
|
||||
in
|
||||
{
|
||||
options.custom.programs.vscode.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.vscode.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://wiki.nixos.org/wiki/VSCodium
|
||||
|
@ -67,9 +63,9 @@ in
|
|||
home = {
|
||||
# Extension dependencies
|
||||
packages = with pkgs; [
|
||||
alejandra # nix-ide
|
||||
blueprint-compiler # blueprint-gtk
|
||||
nixd # nix-ide
|
||||
nixfmt-rfc-style # nix-ide
|
||||
shfmt # shell-format
|
||||
];
|
||||
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
bash = "${pkgs.bash}/bin/bash";
|
||||
blueberry = "${pkgs.blueberry}/bin/blueberry";
|
||||
bluetoothctl = "${pkgs.bluez}/bin/bluetoothctl";
|
||||
|
@ -35,9 +32,8 @@ let
|
|||
wttrbar = "${pkgs.wttrbar}/bin/wttrbar";
|
||||
|
||||
cfg = config.custom.programs.waybar;
|
||||
in
|
||||
{
|
||||
options.custom.programs.waybar.enable = mkOption { default = false; };
|
||||
in {
|
||||
options.custom.programs.waybar.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/Alexays/Waybar
|
||||
|
@ -50,265 +46,271 @@ in
|
|||
### SETTINGS ###
|
||||
# https://github.com/Alexays/Waybar/wiki/Configuration
|
||||
#?? pkill -SIGUSR2 -x waybar
|
||||
settings =
|
||||
let
|
||||
## INHERIT ##
|
||||
#!! Module defaults are not accurate to documentation
|
||||
# TODO: Submit pull request to fix in addition to inconsistent hyphen vs underscore
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Cava
|
||||
cava-config = {
|
||||
cava_config = null; # Default: null?
|
||||
framerate = 30; # Default: 30?
|
||||
autosens = 1; # Default: 1
|
||||
# sensitivity = 0; # Default: 100?
|
||||
bars = 16; # Default: 2
|
||||
lower_cutoff_freq = 50; # Default: 50?
|
||||
higher_cutoff_freq = 10000; # Default: 10000?
|
||||
sleep_timer = 5; # Default: 0
|
||||
hide_on_silence = true; # Default: false
|
||||
method = "pipewire"; # Default: pulse
|
||||
source = "auto"; # Default: auto?
|
||||
sample_rate = 44100; # Default: 44100?
|
||||
sample_bits = 16; # Default: 16?
|
||||
stereo = false; # Default: true
|
||||
reverse = false; # Default: false
|
||||
bar_delimiter = 32; # ASCII code for space, default: 59 or ;
|
||||
monstercat = true; # Default: false?
|
||||
waves = true; # Default: false?
|
||||
noise_reduction = 0.2; # Default: 0.77?
|
||||
input_delay = 1; # Default: 4
|
||||
format-icons = [
|
||||
"▁"
|
||||
"▂"
|
||||
"▃"
|
||||
"▄"
|
||||
"▅"
|
||||
"▆"
|
||||
"▇"
|
||||
"█"
|
||||
]; # !! Required
|
||||
on-click = easyeffects;
|
||||
settings = let
|
||||
## INHERIT ##
|
||||
#!! Module defaults are not accurate to documentation
|
||||
# TODO: Submit pull request to fix in addition to inconsistent hyphen vs underscore
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Cava
|
||||
cava-config = {
|
||||
cava_config = null; # Default: null?
|
||||
framerate = 30; # Default: 30?
|
||||
autosens = 1; # Default: 1
|
||||
# sensitivity = 0; # Default: 100?
|
||||
bars = 16; # Default: 2
|
||||
lower_cutoff_freq = 50; # Default: 50?
|
||||
higher_cutoff_freq = 10000; # Default: 10000?
|
||||
sleep_timer = 5; # Default: 0
|
||||
hide_on_silence = true; # Default: false
|
||||
method = "pipewire"; # Default: pulse
|
||||
source = "auto"; # Default: auto?
|
||||
sample_rate = 44100; # Default: 44100?
|
||||
sample_bits = 16; # Default: 16?
|
||||
stereo = false; # Default: true
|
||||
reverse = false; # Default: false
|
||||
bar_delimiter = 32; # ASCII code for space, default: 59 or ;
|
||||
monstercat = true; # Default: false?
|
||||
waves = true; # Default: false?
|
||||
noise_reduction = 0.2; # Default: 0.77?
|
||||
input_delay = 1; # Default: 4
|
||||
format-icons = [
|
||||
"▁"
|
||||
"▂"
|
||||
"▃"
|
||||
"▄"
|
||||
"▅"
|
||||
"▆"
|
||||
"▇"
|
||||
"█"
|
||||
]; # !! Required
|
||||
on-click = easyeffects;
|
||||
on-scroll-up = "${swayosd-client} --output-volume raise";
|
||||
on-scroll-down = "${swayosd-client} --output-volume lower";
|
||||
rotate = 180;
|
||||
};
|
||||
in {
|
||||
status = {
|
||||
## GLOBAL ##
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
|
||||
## POSITION ##
|
||||
modules-left = [
|
||||
"custom/power"
|
||||
"custom/inhibitor"
|
||||
"custom/vpn"
|
||||
"custom/vm"
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
"custom/weather"
|
||||
];
|
||||
modules-right = [
|
||||
"mpris"
|
||||
"tray"
|
||||
"wireplumber"
|
||||
"bluetooth"
|
||||
"network"
|
||||
"battery"
|
||||
];
|
||||
|
||||
## MODULES ##
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Custom
|
||||
"custom/power" = {
|
||||
format = "";
|
||||
on-click = "${systemctl} poweroff";
|
||||
on-click-right = "${systemctl} reboot";
|
||||
on-click-middle = "${loginctl} terminate-session ''";
|
||||
};
|
||||
|
||||
"custom/inhibitor" = {
|
||||
interval = 5;
|
||||
exec = "~/.config/waybar/scripts/inhibitor.sh";
|
||||
on-click = "~/.local/bin/inhibit";
|
||||
};
|
||||
|
||||
"custom/vm" = {
|
||||
interval = 5;
|
||||
exec = "~/.config/waybar/scripts/vm.sh";
|
||||
on-click = "~/.local/bin/vm -x ${
|
||||
if config.custom.hidpi
|
||||
then "/scale:140"
|
||||
else ""
|
||||
}";
|
||||
};
|
||||
|
||||
"custom/vpn" = {
|
||||
interval = 5;
|
||||
exec = "~/.config/waybar/scripts/vpn.sh";
|
||||
on-click = "~/.local/bin/vpn mypi3";
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor
|
||||
# FIXME: Not currently usable
|
||||
# https://github.com/Alexays/Waybar/issues/690
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Hyprland
|
||||
# https://www.nerdfonts.com/cheat-sheet
|
||||
"hyprland/workspaces" = {
|
||||
show-special = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
android = "";
|
||||
dropdown = "";
|
||||
game = "";
|
||||
music = "";
|
||||
office = "";
|
||||
pip = "";
|
||||
scratchpad = "";
|
||||
steam = "";
|
||||
terminal = "";
|
||||
vm = "";
|
||||
wallpaper = "";
|
||||
};
|
||||
};
|
||||
|
||||
cava = cava-config;
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Clock
|
||||
clock = {
|
||||
# https://fmt.dev/latest/syntax.html#chrono-specs
|
||||
format = "{:%a %b %d %I:%M %p}"; # Mon Jan 01 12:00 AM
|
||||
tooltip-format = "{calendar}";
|
||||
calendar.format = {
|
||||
months = "<span color='#eee8d5'>{}</span>";
|
||||
weeks = "<span color='#eee8d5'>{}</span>";
|
||||
weekdays = "<span color='#93a1a1'>{}</span>";
|
||||
days = "<span color='#586e75'>{}</span>";
|
||||
today = "<span color='#eee8d5'>{}</span>";
|
||||
};
|
||||
|
||||
# FIXME: Click release event sends to incorrect layer without sleeping
|
||||
# https://github.com/hyprwm/Hyprland/issues/1348
|
||||
on-click = "${swaync-client} --toggle-panel";
|
||||
# on-click-right = easyeffects;
|
||||
on-scroll-up = "${swayosd-client} --output-volume raise";
|
||||
on-scroll-down = "${swayosd-client} --output-volume lower";
|
||||
rotate = 180;
|
||||
};
|
||||
in
|
||||
{
|
||||
status = {
|
||||
## GLOBAL ##
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
|
||||
## POSITION ##
|
||||
modules-left = [
|
||||
"custom/power"
|
||||
"custom/inhibitor"
|
||||
"custom/vpn"
|
||||
"custom/vm"
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
"custom/weather"
|
||||
];
|
||||
modules-right = [
|
||||
"mpris"
|
||||
"tray"
|
||||
"wireplumber"
|
||||
"bluetooth"
|
||||
"network"
|
||||
"battery"
|
||||
# https://github.com/bjesus/wttrbar
|
||||
"custom/weather" = {
|
||||
format = "{}°";
|
||||
interval = 60 * 60;
|
||||
return-type = "json";
|
||||
|
||||
exec = lib.strings.concatStringsSep " " [
|
||||
"${wttrbar}"
|
||||
"--ampm"
|
||||
"--fahrenheit"
|
||||
"--hide-conditions"
|
||||
"--main-indicator temp_F"
|
||||
"--location 'Cedar Falls Iowa'"
|
||||
];
|
||||
};
|
||||
|
||||
## MODULES ##
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Custom
|
||||
"custom/power" = {
|
||||
format = "";
|
||||
on-click = "${systemctl} poweroff";
|
||||
on-click-right = "${systemctl} reboot";
|
||||
on-click-middle = "${loginctl} terminate-session ''";
|
||||
};
|
||||
|
||||
"custom/inhibitor" = {
|
||||
interval = 5;
|
||||
exec = "~/.config/waybar/scripts/inhibitor.sh";
|
||||
on-click = "~/.local/bin/inhibit";
|
||||
};
|
||||
|
||||
"custom/vm" = {
|
||||
interval = 5;
|
||||
exec = "~/.config/waybar/scripts/vm.sh";
|
||||
on-click = "~/.local/bin/vm -x ${if config.custom.hidpi then "/scale:140" else ""}";
|
||||
};
|
||||
|
||||
"custom/vpn" = {
|
||||
interval = 5;
|
||||
exec = "~/.config/waybar/scripts/vpn.sh";
|
||||
on-click = "~/.local/bin/vpn mypi3";
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor
|
||||
# FIXME: Not currently usable
|
||||
# https://github.com/Alexays/Waybar/issues/690
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Hyprland
|
||||
"hyprland/workspaces" = {
|
||||
show-special = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
android = "";
|
||||
dropdown = "";
|
||||
game = "";
|
||||
music = "";
|
||||
pip = "";
|
||||
scratchpad = "";
|
||||
steam = "";
|
||||
terminal = "";
|
||||
vm = "";
|
||||
wallpaper = "";
|
||||
};
|
||||
};
|
||||
|
||||
cava = cava-config;
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Clock
|
||||
clock = {
|
||||
# https://fmt.dev/latest/syntax.html#chrono-specs
|
||||
format = "{:%a %b %d %I:%M %p}"; # Mon Jan 01 12:00 AM
|
||||
tooltip-format = "{calendar}";
|
||||
calendar.format = {
|
||||
months = "<span color='#eee8d5'>{}</span>";
|
||||
weeks = "<span color='#eee8d5'>{}</span>";
|
||||
weekdays = "<span color='#93a1a1'>{}</span>";
|
||||
days = "<span color='#586e75'>{}</span>";
|
||||
today = "<span color='#eee8d5'>{}</span>";
|
||||
};
|
||||
|
||||
# FIXME: Click release event sends to incorrect layer without sleeping
|
||||
# https://github.com/hyprwm/Hyprland/issues/1348
|
||||
on-click = "${swaync-client} --toggle-panel";
|
||||
# on-click-right = easyeffects;
|
||||
on-scroll-up = "${swayosd-client} --output-volume raise";
|
||||
on-scroll-down = "${swayosd-client} --output-volume lower";
|
||||
};
|
||||
|
||||
# https://github.com/bjesus/wttrbar
|
||||
"custom/weather" = {
|
||||
format = "{}°";
|
||||
interval = 60 * 60;
|
||||
return-type = "json";
|
||||
|
||||
exec = lib.strings.concatStringsSep " " [
|
||||
"${wttrbar}"
|
||||
"--ampm"
|
||||
"--fahrenheit"
|
||||
"--hide-conditions"
|
||||
"--main-indicator temp_F"
|
||||
"--location 'Cedar Falls Iowa'"
|
||||
];
|
||||
};
|
||||
|
||||
"cava#reverse" = cava-config // {
|
||||
"cava#reverse" =
|
||||
cava-config
|
||||
// {
|
||||
reverse = true;
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-MPRIS
|
||||
mpris = {
|
||||
format = "{player_icon} {dynamic}";
|
||||
format-paused = "{status_icon} {dynamic}";
|
||||
dynamic-len = 50;
|
||||
dynamic-order = [
|
||||
"title"
|
||||
"artist"
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-MPRIS
|
||||
mpris = {
|
||||
format = "{player_icon} {dynamic}";
|
||||
format-paused = "{status_icon} {dynamic}";
|
||||
dynamic-len = 50;
|
||||
dynamic-order = [
|
||||
"title"
|
||||
"artist"
|
||||
];
|
||||
dynamic-separator = " ";
|
||||
player-icons.default = "";
|
||||
status-icons.paused = "";
|
||||
on-click-middle = ""; # TODO: Close music player
|
||||
on-scroll-up = "${swayosd-client} --output-volume raise";
|
||||
on-scroll-down = "${swayosd-client} --output-volume lower";
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-WirePlumber
|
||||
wireplumber = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = "";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = easyeffects;
|
||||
on-click-right = "${swayosd-client} --output-volume mute-toggle";
|
||||
on-scroll-up = "${swayosd-client} --output-volume raise";
|
||||
on-scroll-down = "${swayosd-client} --output-volume lower";
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Bluetooth
|
||||
bluetooth = {
|
||||
format-disabled = "";
|
||||
format-off = "";
|
||||
format-on = "";
|
||||
format-connected = "";
|
||||
on-click = blueberry;
|
||||
on-click-right = "${bluetoothctl} disconnect";
|
||||
on-click-middle = "${rfkill} toggle bluetooth"; # Toggle bluetooth on/off
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Network
|
||||
network = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
disabled = "";
|
||||
disconnected = "";
|
||||
ethernet = "";
|
||||
linked = "";
|
||||
wifi = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
dynamic-separator = " ";
|
||||
player-icons.default = "";
|
||||
status-icons.paused = "";
|
||||
on-click-middle = ""; # TODO: Close music player
|
||||
on-scroll-up = "${swayosd-client} --output-volume raise";
|
||||
on-scroll-down = "${swayosd-client} --output-volume lower";
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-WirePlumber
|
||||
wireplumber = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = "";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = easyeffects;
|
||||
on-click-right = "${swayosd-client} --output-volume mute-toggle";
|
||||
on-scroll-up = "${swayosd-client} --output-volume raise";
|
||||
on-scroll-down = "${swayosd-client} --output-volume lower";
|
||||
on-click = nm-connection-editor;
|
||||
on-click-right = "~/.local/bin/network"; # Toggle networking on/off
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Battery
|
||||
"battery" = {
|
||||
format = "{icon} {power:.0f}W";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
interval = 5;
|
||||
states = {
|
||||
critical = 15;
|
||||
warning = 30;
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Bluetooth
|
||||
bluetooth = {
|
||||
format-disabled = "";
|
||||
format-off = "";
|
||||
format-on = "";
|
||||
format-connected = "";
|
||||
on-click = blueberry;
|
||||
on-click-right = "${bluetoothctl} disconnect";
|
||||
on-click-middle = "${rfkill} toggle bluetooth"; # Toggle bluetooth on/off
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Network
|
||||
network = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
disabled = "";
|
||||
disconnected = "";
|
||||
ethernet = "";
|
||||
linked = "";
|
||||
wifi = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
|
||||
on-click = nm-connection-editor;
|
||||
on-click-right = "~/.local/bin/network"; # Toggle networking on/off
|
||||
};
|
||||
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Battery
|
||||
"battery" = {
|
||||
format = "{icon} {power:.0f}W";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
interval = 5;
|
||||
states = {
|
||||
critical = 15;
|
||||
warning = 30;
|
||||
};
|
||||
|
||||
on-click = "~/.local/bin/power"; # Toggle power-saver mode
|
||||
};
|
||||
on-click = "~/.local/bin/power"; # Toggle power-saver mode
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: Convert to writeShellApplication
|
||||
|
@ -341,7 +343,7 @@ in
|
|||
text = ''
|
||||
#! /usr/bin/env ${bash}
|
||||
|
||||
case "$(virsh --connect qemu:///system domstate myndows)" in
|
||||
case "$(virsh domstate myndows)" in
|
||||
'running')
|
||||
${echo}
|
||||
${echo} Online
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.wezterm;
|
||||
in
|
||||
{
|
||||
options.custom.programs.wezterm.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.wezterm;
|
||||
in {
|
||||
options.custom.programs.wezterm.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/wez/wezterm
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.wireshark;
|
||||
in
|
||||
{
|
||||
options.custom.programs.wireshark.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.wireshark;
|
||||
in {
|
||||
options.custom.programs.wireshark.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://gitlab.com/wireshark/wireshark
|
||||
programs.wireshark.enable = true;
|
||||
programs.wireshark = {
|
||||
enable = true;
|
||||
package = pkgs.wireshark; # GUI
|
||||
};
|
||||
|
||||
users.users.${config.custom.username}.extraGroups = [ "wireshark" ];
|
||||
users.users.${config.custom.username}.extraGroups = ["wireshark"];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.wofi;
|
||||
in
|
||||
{
|
||||
options.custom.programs.wofi.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.wofi;
|
||||
in {
|
||||
options.custom.programs.wofi.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://hg.sr.ht/~scoopta/wofi
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.custom.programs.wpaperd;
|
||||
in
|
||||
{
|
||||
options.custom.programs.wpaperd.enable = mkOption { default = false; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.wpaperd;
|
||||
in {
|
||||
options.custom.programs.wpaperd.enable = mkOption {default = false;};
|
||||
|
||||
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
||||
# https://github.com/danyspin97/wpaperd
|
||||
|
|
|
@ -4,180 +4,174 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
with lib; let
|
||||
# Use packages from local derivation
|
||||
git = config.home-manager.users.${config.custom.username}.programs.git.package;
|
||||
hyprland =
|
||||
config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage;
|
||||
wofi = config.home-manager.users.${config.custom.username}.programs.wofi.package;
|
||||
in
|
||||
{
|
||||
config.home-manager.users.${config.custom.username}.home.file =
|
||||
let
|
||||
# Place script.ext in the same directory as this file
|
||||
#?? pkg = (SHELL "NAME" [ DEPENDENCIES ])
|
||||
# https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeShellApplication
|
||||
bash = name: dependencies: {
|
||||
".local/bin/${name}".source =
|
||||
pkgs.writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = dependencies;
|
||||
text = builtins.readFile ./${name}.sh;
|
||||
}
|
||||
+ "/bin/${name}";
|
||||
};
|
||||
in {
|
||||
config.home-manager.users.${config.custom.username}.home.file = let
|
||||
# Place script.ext in the same directory as this file
|
||||
#?? pkg = (SHELL "NAME" [ DEPENDENCIES ])
|
||||
# https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeShellApplication
|
||||
bash = name: dependencies: {
|
||||
".local/bin/${name}".source =
|
||||
pkgs.writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = dependencies;
|
||||
text = builtins.readFile ./${name}.sh;
|
||||
}
|
||||
+ "/bin/${name}";
|
||||
};
|
||||
|
||||
# https://wiki.nixos.org/wiki/Nix-writers#Python3
|
||||
# Always latest python version in nixpkgs, use writers.makePythonWriter to pin version
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/writers/scripts.nix#L605
|
||||
python = name: dependencies: {
|
||||
".local/bin/${name}".source =
|
||||
pkgs.writers.writePython3Bin name { libraries = dependencies; }
|
||||
# Disable linting
|
||||
# https://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html#ignoring-entire-files
|
||||
("# flake8: noqa\n" + builtins.readFile ./${name}.py)
|
||||
+ "/bin/${name}";
|
||||
};
|
||||
in
|
||||
# https://wiki.nixos.org/wiki/Nix-writers#Python3
|
||||
# Always latest python version in nixpkgs, use writers.makePythonWriter to pin version
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/writers/scripts.nix#L605
|
||||
python = name: dependencies: {
|
||||
".local/bin/${name}".source =
|
||||
pkgs.writers.writePython3Bin name {libraries = dependencies;}
|
||||
# Disable linting
|
||||
# https://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html#ignoring-entire-files
|
||||
("# flake8: noqa\n" + builtins.readFile ./${name}.py)
|
||||
+ "/bin/${name}";
|
||||
};
|
||||
in
|
||||
mkIf config.custom.full (
|
||||
with pkgs;
|
||||
mkMerge (
|
||||
[
|
||||
# Bash files with extension .sh
|
||||
(bash "audio" [
|
||||
easyeffects
|
||||
libnotify
|
||||
mkMerge (
|
||||
[
|
||||
# Bash files with extension .sh
|
||||
(bash "audio" [
|
||||
easyeffects
|
||||
libnotify
|
||||
])
|
||||
(bash "bwm" [
|
||||
bitwarden-cli
|
||||
coreutils
|
||||
jq
|
||||
libnotify
|
||||
wl-clipboard
|
||||
wofi
|
||||
xclip
|
||||
])
|
||||
(bash "calc" [
|
||||
coreutils
|
||||
libnotify
|
||||
libqalculate
|
||||
wl-clipboard
|
||||
wofi
|
||||
xclip
|
||||
])
|
||||
(bash "clipboard" [
|
||||
cliphist
|
||||
libnotify
|
||||
procps
|
||||
wl-clipboard
|
||||
wofi
|
||||
xclip
|
||||
])
|
||||
(bash "close" [
|
||||
coreutils
|
||||
hyprland
|
||||
jq
|
||||
libnotify
|
||||
])
|
||||
(bash "fingerprints" [
|
||||
fprintd
|
||||
libnotify
|
||||
])
|
||||
(bash "flakegen" [
|
||||
git
|
||||
libnotify
|
||||
nix
|
||||
])
|
||||
(bash "inhibit" [
|
||||
coreutils
|
||||
libnotify
|
||||
systemd
|
||||
])
|
||||
(bash "left" [
|
||||
hyprland
|
||||
jq
|
||||
libnotify
|
||||
])
|
||||
(bash "minimize" [
|
||||
hyprland
|
||||
jq
|
||||
libnotify
|
||||
])
|
||||
(bash "network" [
|
||||
libnotify
|
||||
networkmanager
|
||||
])
|
||||
(bash "power" [
|
||||
libnotify
|
||||
power-profiles-daemon
|
||||
])
|
||||
(bash "rebuild" [
|
||||
libnotify
|
||||
nixos-rebuild
|
||||
])
|
||||
(bash "repl" [
|
||||
libnotify
|
||||
nixos-rebuild
|
||||
])
|
||||
(bash "screenshot" [
|
||||
coreutils
|
||||
grimblast
|
||||
imagemagick
|
||||
libnotify
|
||||
swappy
|
||||
])
|
||||
(bash "target" [
|
||||
libnotify
|
||||
nixos-rebuild
|
||||
])
|
||||
(bash "toggle" [
|
||||
gnugrep
|
||||
hyprland
|
||||
jq
|
||||
libnotify
|
||||
])
|
||||
(bash "upgrade" [
|
||||
libnotify
|
||||
nix
|
||||
nixos-rebuild
|
||||
])
|
||||
(bash "vm" [
|
||||
coreutils
|
||||
freerdp3
|
||||
iputils
|
||||
libnotify
|
||||
libvirt
|
||||
remmina
|
||||
])
|
||||
(bash "vpn" [
|
||||
gnused
|
||||
jq
|
||||
libnotify
|
||||
tailscale
|
||||
])
|
||||
(bash "vrr" [
|
||||
hyprland
|
||||
jq
|
||||
libnotify
|
||||
])
|
||||
(bash "wallpaper" [
|
||||
coreutils
|
||||
fd
|
||||
imagemagick
|
||||
libnotify
|
||||
rsync
|
||||
swww
|
||||
tailscale
|
||||
])
|
||||
]
|
||||
++ (with pkgs.python3Packages; [
|
||||
# Python files with extension .py
|
||||
(python "bcrypt" [bcrypt])
|
||||
])
|
||||
(bash "bwm" [
|
||||
bitwarden-cli
|
||||
coreutils
|
||||
jq
|
||||
libnotify
|
||||
wl-clipboard
|
||||
wofi
|
||||
xclip
|
||||
])
|
||||
(bash "calc" [
|
||||
coreutils
|
||||
libnotify
|
||||
libqalculate
|
||||
wl-clipboard
|
||||
wofi
|
||||
xclip
|
||||
])
|
||||
(bash "clipboard" [
|
||||
cliphist
|
||||
libnotify
|
||||
procps
|
||||
wl-clipboard
|
||||
wofi
|
||||
xclip
|
||||
])
|
||||
(bash "close" [
|
||||
coreutils
|
||||
hyprland
|
||||
jq
|
||||
libnotify
|
||||
])
|
||||
(bash "fingerprints" [
|
||||
fprintd
|
||||
libnotify
|
||||
])
|
||||
(bash "flakegen" [
|
||||
git
|
||||
libnotify
|
||||
nix
|
||||
])
|
||||
(bash "inhibit" [
|
||||
coreutils
|
||||
libnotify
|
||||
systemd
|
||||
])
|
||||
(bash "left" [
|
||||
hyprland
|
||||
jq
|
||||
libnotify
|
||||
])
|
||||
(bash "minimize" [
|
||||
hyprland
|
||||
jq
|
||||
libnotify
|
||||
])
|
||||
(bash "network" [
|
||||
libnotify
|
||||
networkmanager
|
||||
])
|
||||
(bash "power" [
|
||||
libnotify
|
||||
power-profiles-daemon
|
||||
])
|
||||
(bash "rebuild" [
|
||||
libnotify
|
||||
nixos-rebuild
|
||||
])
|
||||
(bash "repl" [
|
||||
libnotify
|
||||
nixos-rebuild
|
||||
])
|
||||
(bash "screenshot" [
|
||||
coreutils
|
||||
grimblast
|
||||
imagemagick
|
||||
libnotify
|
||||
swappy
|
||||
])
|
||||
(bash "target" [
|
||||
libnotify
|
||||
nixos-rebuild
|
||||
])
|
||||
(bash "toggle" [
|
||||
gnugrep
|
||||
hyprland
|
||||
jq
|
||||
libnotify
|
||||
])
|
||||
(bash "upgrade" [
|
||||
libnotify
|
||||
nix
|
||||
nixos-rebuild
|
||||
])
|
||||
(bash "vm" [
|
||||
coreutils
|
||||
freerdp3
|
||||
iputils
|
||||
libnotify
|
||||
libvirt
|
||||
remmina
|
||||
])
|
||||
(bash "vpn" [
|
||||
gnused
|
||||
jq
|
||||
libnotify
|
||||
tailscale
|
||||
])
|
||||
(bash "vrr" [
|
||||
hyprland
|
||||
jq
|
||||
libnotify
|
||||
])
|
||||
(bash "wallpaper" [
|
||||
coreutils
|
||||
fd
|
||||
imagemagick
|
||||
libnotify
|
||||
rsync
|
||||
swww
|
||||
tailscale
|
||||
])
|
||||
|
||||
]
|
||||
++ (with pkgs.python3Packages; [
|
||||
# Python files with extension .py
|
||||
(python "bcrypt" [ bcrypt ])
|
||||
])
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
workspace="$(hyprctl activewindow -j | jq -r .workspace.name)"
|
||||
|
||||
if [[ "$workspace" == "special:scratchpad" ]]; then
|
||||
hyprctl dispatch movetoworkspacesilent +0
|
||||
hyprctl dispatch movetoworkspacesilent 0
|
||||
else
|
||||
hyprctl dispatch movetoworkspacesilent special:scratchpad
|
||||
fi
|
||||
|
|
|
@ -15,9 +15,9 @@ function round() {
|
|||
# TODO: Use proper flags
|
||||
# TODO: Add clipboard support
|
||||
if [[ "${1-}" == '-e' ]]; then
|
||||
grimblast save area - | swappy --file -
|
||||
grimblast --freeze save area - | swappy --file -
|
||||
elif [[ "${1-}" == '-d' ]]; then
|
||||
grimblast save output - > "$XDG_SCREENSHOTS_DIR/$(date +'%F %H-%M-%S').png"
|
||||
grimblast --freeze save output - > "$XDG_SCREENSHOTS_DIR/$(date +'%F %H-%M-%S').png"
|
||||
else
|
||||
grimblast save area - > "$XDG_SCREENSHOTS_DIR/$(date +'%F %H-%M-%S').png"
|
||||
grimblast --freeze save area - > "$XDG_SCREENSHOTS_DIR/$(date +'%F %H-%M-%S').png"
|
||||
fi
|
||||
|
|
|
@ -1,27 +1,58 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
# Toggle tagged window, launch if needed
|
||||
#?? toggle TAG WORKSPACE [COMMAND]
|
||||
# TODO: Use proper flags
|
||||
# TODO: Support floating groups
|
||||
set -x
|
||||
|
||||
if (("$#" >= 3)); then
|
||||
# Launch if tag does not exist yet
|
||||
if ! hyprctl -j clients | jq -r '.[].tags[]' | grep "$1"; then
|
||||
hyprctl dispatch exec -- "${@:3}"
|
||||
# Toggle pinned window, launch if needed
|
||||
#?? toggle --type TYPE --expression EXPRESSION --workspace WORKSPACE [COMMAND]
|
||||
#!! Regex may need to be double-escaped
|
||||
# https://jqlang.github.io/jq/manual/#regular-expressions
|
||||
|
||||
focus=false
|
||||
|
||||
while (("$#" > 0)); do
|
||||
case "$1" in
|
||||
-e | --expression)
|
||||
shift
|
||||
expression="$1"
|
||||
;;
|
||||
-f | --focus)
|
||||
focus=true
|
||||
;;
|
||||
-t | --type)
|
||||
shift
|
||||
type="$1"
|
||||
;;
|
||||
-w | --workspace)
|
||||
shift
|
||||
workspace="$1"
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
command="${*}"
|
||||
|
||||
if [[ "$command" ]]; then
|
||||
if ! hyprctl -j clients | jq -re "any(.[].$type | test(\"$expression\"); . == true)"; then
|
||||
hyprctl dispatch exec -- "$command" # Launch window
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
# Dispatchers do not currently support matching by tag, so select address
|
||||
window="address:$(hyprctl -j clients | jq -r "first(.[] | select(.tags[] | startswith(\"$1\")).address)")"
|
||||
current_workspace="$(hyprctl -j clients | jq -r "first(.[] | select(.$type | test(\"$expression\")).workspace.name)")"
|
||||
|
||||
workspace="$(hyprctl -j clients | jq -r "first(.[] | select(.tags[] | startswith(\"$1\")).workspace.name)")"
|
||||
if [[ "$current_workspace" == "$workspace" ]]; then
|
||||
hyprctl dispatch movetoworkspacesilent "0,$type:$expression" # Move to current workspace first, otherwise some windows freeze
|
||||
hyprctl dispatch pin "$type:$expression" # Pin
|
||||
|
||||
if [[ "$workspace" == "$2" ]]; then
|
||||
hyprctl dispatch pin "$window" # Pin
|
||||
(("$#" >= 3)) && hyprctl dispatch focuswindow "$window" # Focus if third argument
|
||||
if "$focus"; then
|
||||
hyprctl dispatch focuswindow "$type:$expression" # Focus
|
||||
fi
|
||||
else
|
||||
hyprctl dispatch pin "$window" # Unpin
|
||||
hyprctl dispatch movetoworkspacesilent "$2,$window"
|
||||
hyprctl dispatch pin "$type:$expression" # Unpin
|
||||
hyprctl dispatch movetoworkspacesilent "$workspace,$type:$expression" # Move to workspace
|
||||
fi
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
# Start/resume VM if needed and launch viewer
|
||||
#?? man xfreerdp
|
||||
|
||||
function virsh() { command virsh --connect qemu:///system "$@"; }
|
||||
|
||||
state="$(virsh domstate myndows)"
|
||||
|
||||
if [[ "$state" == 'paused' ]]; then
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue