1
1
Fork 0

Compare commits

..

7 commits

Author SHA1 Message Date
32f419cdb1
hyprland: enable mouse refocus
Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 20:15:20 -05:00
a344b8fcf6
toggle: remove debug flag
Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 20:15:20 -05:00
d5141091bd
nix: change nixpkgs-local dir
Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 20:15:20 -05:00
3a26b31226
hyprland: disable shadow for tiled windows
Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 20:15:06 -05:00
ed3384b223
hyprland: modify binds
Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 20:15:06 -05:00
b13a75f429
anyrun: fix build
Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 20:15:06 -05:00
47e12fd9c9
boot: enable hibernation for mynix
Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 20:14:48 -05:00
175 changed files with 2147 additions and 2090 deletions

View file

@ -3,75 +3,86 @@
inputs, inputs,
lib, lib,
... ...
}: { }:
age.secrets = let
secret = filename: { {
file = "${inputs.self}/secrets/${filename}"; age.secrets =
let
secret = filename: {
file = "${inputs.self}/secrets/${filename}";
};
in
{
"common/nix/access-tokens.conf" = secret "common/nix/access-tokens.conf";
}; };
in {
"common/nix/access-tokens.conf" = secret "common/nix/access-tokens.conf";
};
### NixOS ### NixOS
nixpkgs = let nixpkgs =
config = { let
allowUnfree = true; config = {
allowUnfree = true;
allowInsecurePredicate = pkg: let allowInsecurePredicate =
name = lib.getName pkg; pkg:
in let
# HACK: Allow all insecure electron versions name = lib.getName pkg;
name in
== "electron" # HACK: Allow all insecure electron versions
# HACK: Some Matrix clients rely on libolm, which is deprecated name == "electron"
# 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 = [ # HACK: Some Matrix clients rely on libolm, which is deprecated
( # https://github.com/NixOS/nixpkgs/pull/334638
final: prev: let || name == "cinny"
nixpkgs = branch: || name == "cinny-unwrapped"
import inputs."nixpkgs-${branch}" { || name == "fluffychat-linux"
inherit config; || name == "olm"
system = prev.system; || 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;
}; };
stable = nixpkgs "stable"; # Development
unstable = nixpkgs "unstable"; ciscoPacketTracer8 = local.ciscoPacketTracer8;
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 = { nix = {
#!! Override upstream nix #!! Override upstream nix

View file

@ -59,17 +59,24 @@
fw-fanctrl = flake "github:TamtamHero/fw-fanctrl/packaging/nix" // unstable "nixpkgs"; fw-fanctrl = flake "github:TamtamHero/fw-fanctrl/packaging/nix" // unstable "nixpkgs";
hypridle = flake "github:hyprwm/hypridle" // 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?submodules=1" // unstable "nixpkgs";
hyprland = flake "git+https://github.com/hyprwm/Hyprland?ref=refs/tags/v0.43.0&submodules=1" // unstable "nixpkgs"; hyprland =
#// hyprland = flake "git+https://github.com/UjinT34/Hyprland?ref=vrr-cursor-fix&submodules=1" // unstable "nixpkgs"; 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-contrib = flake "github:hyprwm/contrib" // unstable "nixpkgs";
hyprland-plugins = flake "github:hyprwm/hyprland-plugins" // unstable "nixpkgs" // follows "hyprland"; hyprland-plugins =
flake "github:hyprwm/hyprland-plugins" // unstable "nixpkgs" // follows "hyprland";
hyprlock = flake "github:hyprwm/hyprlock" // unstable "nixpkgs"; hyprlock = flake "github:hyprwm/hyprlock" // unstable "nixpkgs";
hyprpaper = flake "github:hyprwm/hyprpaper" // unstable "nixpkgs"; hyprpaper = flake "github:hyprwm/hyprpaper" // unstable "nixpkgs";
hyprpicker = flake "github:hyprwm/hyprpicker" // unstable "nixpkgs"; hyprpicker = flake "github:hyprwm/hyprpicker" // unstable "nixpkgs";
nix-flatpak = flake "github:gmodena/nix-flatpak?ref=v0.4.1"; nix-flatpak = flake "github:gmodena/nix-flatpak?ref=v0.4.1";
nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs"; nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs";
nixd = flake "github:nix-community/nixd" // unstable "nixpkgs"; nixd = flake "github:nix-community/nixd" // unstable "nixpkgs";
xdg-desktop-portal-hyprland = flake "github:hyprwm/xdg-desktop-portal-hyprland" // unstable "nixpkgs"; xdg-desktop-portal-hyprland =
flake "github:hyprwm/xdg-desktop-portal-hyprland"
// unstable "nixpkgs";
# Server flakes # Server flakes
conduwuit = flake "github:Myned/conduwuit" // unstable "nixpkgs"; conduwuit = flake "github:Myned/conduwuit" // unstable "nixpkgs";
@ -105,7 +112,10 @@
common = branch: arch: modules: common = branch: arch: modules:
inputs."nixpkgs-${branch}".lib.nixosSystem { inputs."nixpkgs-${branch}".lib.nixosSystem {
system = arch; system = arch;
specialArgs = {inherit inputs;};
specialArgs = {
inherit inputs;
};
# TODO: Clean up optional attributes with each new release # TODO: Clean up optional attributes with each new release
#!! Options will diverge between branches over time #!! Options will diverge between branches over time
@ -148,14 +158,36 @@
unstable = arch: modules: common "unstable" "${arch}-linux" modules; unstable = arch: modules: common "unstable" "${arch}-linux" modules;
in { in {
### Stable ### Stable
myarm = stable "aarch64" [./profiles/server ./machines/myarm]; myarm = stable "aarch64" [
myne = stable "x86_64" [./profiles/server ./machines/myne]; ./profiles/server
mypi3 = stable "aarch64" [./profiles/sbc ./machines/mypi3]; ./machines/myarm
];
myne = stable "x86_64" [
./profiles/server
./machines/myne
];
mypi3 = stable "aarch64" [
./profiles/sbc
./machines/mypi3
];
### Unstable ### Unstable
myeck = unstable "x86_64" [./profiles/console ./machines/myeck]; myeck = unstable "x86_64" [
mynix = unstable "x86_64" [./profiles/desktop ./machines/mynix]; ./profiles/console
myork = unstable "x86_64" [./profiles/laptop ./machines/myork]; ./machines/myeck
];
mynix = unstable "x86_64" [
./profiles/desktop
./machines/mynix
];
myork = unstable "x86_64" [
./profiles/laptop
./machines/myork
];
}; };
}; };
} }

View file

@ -21,7 +21,7 @@
size = "100%"; size = "100%";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = ["-f"]; extraArgs = [ "-f" ];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";

View file

@ -7,17 +7,19 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: { }:
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"xhci_pci" "xhci_pci"
"virtio_scsi" "virtio_scsi"
"sr_mod" "sr_mod"
]; ];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [ ];
boot.kernelModules = []; boot.kernelModules = [ ];
boot.extraModulePackages = []; boot.extraModulePackages = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -19,5 +19,5 @@
}; };
}; };
systemd.tmpfiles.rules = ["z /mnt/external 0755 myned users"]; systemd.tmpfiles.rules = [ "z /mnt/external 0755 myned users" ];
} }

View file

@ -21,7 +21,7 @@
size = "100%"; size = "100%";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = ["-f"]; extraArgs = [ "-f" ];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";

View file

@ -7,8 +7,10 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: { }:
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"nvme" "nvme"
@ -19,9 +21,9 @@
"sd_mod" "sd_mod"
"sdhci_pci" "sdhci_pci"
]; ];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [ ];
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = []; boot.extraModulePackages = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -26,7 +26,7 @@
size = "100%"; size = "100%";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = ["-f"]; extraArgs = [ "-f" ];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";

View file

@ -7,8 +7,10 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: { }:
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"ahci" "ahci"
@ -18,9 +20,9 @@
"sd_mod" "sd_mod"
"sr_mod" "sr_mod"
]; ];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [ ];
boot.kernelModules = []; boot.kernelModules = [ ];
boot.extraModulePackages = []; boot.extraModulePackages = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -26,7 +26,7 @@
passwordFile = "/tmp/secret.key"; passwordFile = "/tmp/secret.key";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = ["-f"]; extraArgs = [ "-f" ];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";

View file

@ -7,8 +7,10 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: { }:
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"xhci_pci" "xhci_pci"
@ -19,9 +21,9 @@
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
]; ];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [ ];
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = []; boot.extraModulePackages = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -4,9 +4,12 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
in { in
{
imports = [ imports = [
inputs.nixos-hardware.nixosModules.framework-13-7040-amd inputs.nixos-hardware.nixosModules.framework-13-7040-amd
@ -32,7 +35,7 @@ in {
home-manager.users.${config.custom.username} = with lib; { home-manager.users.${config.custom.username} = with lib; {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
exec-once = ["${brightnessctl} set 0%"]; exec-once = [ "${brightnessctl} set 0%" ];
master = { master = {
mfact = mkForce 0.5; mfact = mkForce 0.5;

View file

@ -26,7 +26,7 @@
passwordFile = "/tmp/secret.key"; passwordFile = "/tmp/secret.key";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = ["-f"]; extraArgs = [ "-f" ];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";

View file

@ -7,8 +7,10 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: { }:
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"nvme" "nvme"
@ -18,9 +20,9 @@
"uas" "uas"
"sd_mod" "sd_mod"
]; ];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [ ];
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = []; boot.extraModulePackages = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -1,5 +1,5 @@
{ {
imports = [./hardware-configuration.nix]; imports = [ ./hardware-configuration.nix ];
custom.hostname = "mypi3"; custom.hostname = "mypi3";

View file

@ -7,20 +7,22 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: { }:
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = []; {
boot.initrd.kernelModules = []; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.kernelModules = [];
boot.extraModulePackages = []; boot.initrd.availableKernelModules = [ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = []; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -1,38 +1,38 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom; cfg = config.custom;
in { in
{
options.custom = { options.custom = {
### Profiles ### Profiles
default = mkOption {default = true;}; default = mkOption { default = true; };
full = mkOption {default = false;}; full = mkOption { default = false; };
minimal = mkOption {default = cfg.full;}; minimal = mkOption { default = cfg.full; };
profile = mkOption {}; profile = mkOption { };
### Users ### Users
domain = mkOption {default = "bjork.tech";}; domain = mkOption { default = "bjork.tech"; };
hostname = mkOption {}; hostname = mkOption { };
realname = mkOption {default = "Myned";}; realname = mkOption { default = "Myned"; };
username = mkOption {default = "myned";}; username = mkOption { default = "myned"; };
### Hardware ### Hardware
width = mkOption {default = 1920;}; width = mkOption { default = 1920; };
height = mkOption {default = 1080;}; height = mkOption { default = 1080; };
ultrawide = mkOption {default = cfg.width * 9 / 16 > cfg.height;}; # Wider than 16:9 ultrawide = mkOption { default = cfg.width * 9 / 16 > cfg.height; }; # Wider than 16:9
hidpi = mkOption {default = cfg.scale > 1;}; hidpi = mkOption { default = cfg.scale > 1; };
scale = mkOption {default = 1;}; scale = mkOption { default = 1; };
# TODO: Use option for border size # TODO: Use option for border size
border = mkOption {default = 2;}; border = mkOption { default = 2; };
gap = mkOption {default = 10;}; gap = mkOption { default = 10; };
padding = mkOption {default = 56;}; # ?? journalctl --user -u waybar.service | grep height: padding = mkOption { default = 56; }; # ?? journalctl --user -u waybar.service | grep height:
### Misc ### Misc
wallpaper = mkOption {default = false;}; wallpaper = mkOption { default = false; };
}; };
} }

View file

@ -1,8 +1,7 @@
{ config, lib, ... }:
with lib;
{ {
config,
lib,
...
}:
with lib; {
config.custom.desktops.hyprland.enable = config.custom.full; config.custom.desktops.hyprland.enable = config.custom.full;
} }

View file

@ -4,12 +4,16 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.desktops.gnome; cfg = config.custom.desktops.gnome;
in { in
{
options.custom.desktops.gnome = { options.custom.desktops.gnome = {
enable = mkOption {default = false;}; enable = mkOption { default = false; };
gdm = mkOption {default = true;}; gdm = mkOption { default = true; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -26,6 +30,6 @@ in {
# Remove default packages # Remove default packages
# https://wiki.nixos.org/wiki/GNOME#Excluding_GNOME_Applications # https://wiki.nixos.org/wiki/GNOME#Excluding_GNOME_Applications
environment.gnome.excludePackages = [pkgs.gnome-shell-extensions]; environment.gnome.excludePackages = [ pkgs.gnome-shell-extensions ];
}; };
} }

View file

@ -4,10 +4,14 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.desktops.hyprland; cfg = config.custom.desktops.hyprland;
in { in
options.custom.desktops.hyprland.enable = mkOption {default = false;}; {
options.custom.desktops.hyprland.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
custom.desktops.hyprland = mkIf config.custom.full { custom.desktops.hyprland = mkIf config.custom.full {
@ -22,7 +26,7 @@ in {
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk]; extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
# Prefer hyprland over gtk portal # Prefer hyprland over gtk portal
config.common.default = [ config.common.default = [
@ -34,7 +38,7 @@ in {
# https://wiki.hyprland.org # https://wiki.hyprland.org
home-manager.users.${config.custom.username}.wayland.windowManager.hyprland = { home-manager.users.${config.custom.username}.wayland.windowManager.hyprland = {
enable = true; enable = true;
systemd.variables = ["--all"]; # Import some environment variables into session systemd.variables = [ "--all" ]; # Import some environment variables into session
}; };
}; };
} }

View file

@ -4,18 +4,22 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
hyprctl = "${pkgs.hyprland}/bin/hyprctl"; hyprctl = "${pkgs.hyprland}/bin/hyprctl";
cfg = config.custom.desktops.hyprland.plugins; cfg = config.custom.desktops.hyprland.plugins;
in { in
options.custom.desktops.hyprland.plugins.enable = mkOption {default = false;}; {
options.custom.desktops.hyprland.plugins.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
# https://github.com/hyprwm/hyprland-plugins/tree/main/hyprbars # https://github.com/hyprwm/hyprland-plugins/tree/main/hyprbars
# https://wiki.hyprland.org/Plugins/Using-Plugins # https://wiki.hyprland.org/Plugins/Using-Plugins
plugins = with pkgs.hyprlandPlugins; [hyprbars]; plugins = with pkgs.hyprlandPlugins; [ hyprbars ];
settings = { settings = {
#!! Static rules #!! Static rules

View file

@ -4,7 +4,10 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
clipse = "${pkgs.clipse}/bin/clipse"; clipse = "${pkgs.clipse}/bin/clipse";
firefox-esr = "${ firefox-esr = "${
config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage
@ -19,8 +22,9 @@ with lib; let
}/bin/waybar"; }/bin/waybar";
cfg = config.custom.desktops.hyprland.settings; cfg = config.custom.desktops.hyprland.settings;
in { in
options.custom.desktops.hyprland.settings.enable = mkOption {default = false;}; {
options.custom.desktops.hyprland.settings.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
@ -47,14 +51,12 @@ in {
#?? envd = VARIABLE, VALUE #?? envd = VARIABLE, VALUE
# HACK: Mapped home-manager variables to envd in lieu of upstream fix # HACK: Mapped home-manager variables to envd in lieu of upstream fix
# https://github.com/nix-community/home-manager/issues/2659 # https://github.com/nix-community/home-manager/issues/2659
envd = with builtins; envd =
attrValues with builtins;
( attrValues (
mapAttrs mapAttrs (
(
name: value: "${name}, ${toString value}" 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" "EDITOR, gnome-text-editor"
@ -64,16 +66,15 @@ in {
#// exec = [ ]; #// exec = [ ];
# https://wiki.hyprland.org/Configuring/Keywords/#executing # https://wiki.hyprland.org/Configuring/Keywords/#executing
exec-once = exec-once = [
[ "${rm} ~/.config/qalculate/qalc.dmenu.history" # Clear calc history
"${rm} ~/.config/qalculate/qalc.dmenu.history" # Clear calc history "${clipse} -clear" # Clear clipboard history
"${clipse} -clear" # Clear clipboard history "${clipse} -listen" # Monitor clipboard
"${clipse} -listen" # Monitor clipboard sway-audio-idle-inhibit # Inhibit idle while audio is playing
sway-audio-idle-inhibit # Inhibit idle while audio is playing
# TODO: Remove when systemd service fixed # TODO: Remove when systemd service fixed
# https://github.com/Alexays/Waybar/issues/2882 # https://github.com/Alexays/Waybar/issues/2882
"${sleep} 2 && ${systemctl} --user restart waybar" "${sleep} 2 && ${systemctl} --user restart waybar"
"[group new lock; tile] ${firefox-esr}" "[group new lock; tile] ${firefox-esr}"
] ]
@ -142,10 +143,7 @@ in {
"col.inactive" = "rgba(6c71c440)"; "col.inactive" = "rgba(6c71c440)";
"col.locked_active" = "rgb(d33682)"; "col.locked_active" = "rgb(d33682)";
"col.locked_inactive" = "rgba(d3368240)"; "col.locked_inactive" = "rgba(d3368240)";
font_size = font_size = if config.custom.hidpi then 16 else 10;
if config.custom.hidpi
then 16
else 10;
height = 5; height = 5;
render_titles = false; render_titles = false;
text_color = "rgb(93a1a1)"; text_color = "rgb(93a1a1)";

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
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;}; 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; };
} }

View file

@ -1,16 +1,16 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.files.agenix; cfg = config.custom.files.agenix;
in { in
{
# https://wiki.nixos.org/wiki/Agenix # https://wiki.nixos.org/wiki/Agenix
# https://github.com/ryantm/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 { 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
}; };
} }

View file

@ -1,9 +1,8 @@
{ config, lib, ... }:
with lib;
{ {
config,
lib,
...
}:
with lib; {
config.custom.files = mkIf config.custom.default { config.custom.files = mkIf config.custom.default {
agenix.enable = true; agenix.enable = true;
dev.enable = true; dev.enable = true;

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.files.dev; cfg = config.custom.files.dev;
in { in
options.custom.files.dev.enable = mkOption {default = false;}; {
options.custom.files.dev.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# .keep empty file needed to create empty directory # .keep empty file needed to create empty directory

View file

@ -1,15 +1,15 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.files.mnt; cfg = config.custom.files.mnt;
in { in
options.custom.files.mnt.enable = mkOption {default = false;}; {
options.custom.files.mnt.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Set /mnt permissions # Set /mnt permissions
systemd.tmpfiles.rules = ["z /mnt 0755 root root"]; systemd.tmpfiles.rules = [ "z /mnt 0755 root root" ];
}; };
} }

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.files.nixos; cfg = config.custom.files.nixos;
in { in
options.custom.files.nixos.enable = mkOption {default = false;}; {
options.custom.files.nixos.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html # https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html

View file

@ -1,17 +1,17 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.adb; cfg = config.custom.programs.adb;
in { in
options.custom.programs.adb.enable = mkOption {default = false;}; {
options.custom.programs.adb.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/Android # https://wiki.nixos.org/wiki/Android
# https://developer.android.com/tools/adb # https://developer.android.com/tools/adb
programs.adb.enable = true; programs.adb.enable = true;
users.users.${config.custom.username}.extraGroups = ["adbusers"]; users.users.${config.custom.username}.extraGroups = [ "adbusers" ];
}; };
} }

View file

@ -4,13 +4,17 @@
lib, lib,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.ags; cfg = config.custom.programs.ags;
in { in
options.custom.programs.ags.enable = mkOption {default = false;}; {
options.custom.programs.ags.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { 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://aylur.github.io/ags-docs
# https://github.com/Aylur/ags # https://github.com/Aylur/ags

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.alacritty; cfg = config.custom.programs.alacritty;
in { in
options.custom.programs.alacritty.enable = mkOption {default = false;}; {
options.custom.programs.alacritty.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/alacritty/alacritty # https://github.com/alacritty/alacritty

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.anime-game-launcher; cfg = config.custom.programs.anime-game-launcher;
in { in
options.custom.programs.anime-game-launcher.enable = mkOption {default = false;}; {
options.custom.programs.anime-game-launcher.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/an-anime-team # https://github.com/an-anime-team

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.appimage; cfg = config.custom.programs.appimage;
in { in
options.custom.programs.appimage.enable = mkOption {default = false;}; {
options.custom.programs.appimage.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/Appimage # https://wiki.nixos.org/wiki/Appimage

View file

@ -1,14 +1,14 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi"; wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi";
cfg = config.custom.programs.bitwarden-menu; cfg = config.custom.programs.bitwarden-menu;
in { in
options.custom.programs.bitwarden-menu.enable = mkOption {default = false;}; {
options.custom.programs.bitwarden-menu.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/firecat53/bitwarden-menu # https://github.com/firecat53/bitwarden-menu

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.chromium; cfg = config.custom.programs.chromium;
in { in
options.custom.programs.chromium.enable = mkOption {default = false;}; {
options.custom.programs.chromium.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/Chromium # https://wiki.nixos.org/wiki/Chromium

View file

@ -4,10 +4,14 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.clipse; cfg = config.custom.programs.clipse;
in { in
options.custom.programs.clipse.enable = mkOption {default = false;}; {
options.custom.programs.clipse.enable = mkOption { default = false; };
config = { config = {
# https://github.com/savedra1/clipse # https://github.com/savedra1/clipse

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.dconf; cfg = config.custom.programs.dconf;
in { in
options.custom.programs.dconf.enable = mkOption {default = false;}; {
options.custom.programs.dconf.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://gitlab.gnome.org/GNOME/dconf # https://gitlab.gnome.org/GNOME/dconf

View file

@ -1,9 +1,8 @@
{ config, lib, ... }:
with lib;
{ {
config,
lib,
...
}:
with lib; {
config.custom.programs = mkMerge [ config.custom.programs = mkMerge [
(mkIf config.custom.default { (mkIf config.custom.default {
direnv.enable = true; direnv.enable = true;

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.direnv; cfg = config.custom.programs.direnv;
in { in
options.custom.programs.direnv.enable = mkOption {default = false;}; {
options.custom.programs.direnv.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/direnv/direnv # https://github.com/direnv/direnv

View file

@ -1,16 +1,16 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.discord; cfg = config.custom.programs.discord;
in { in
options.custom.programs.discord.enable = mkOption {default = false;}; {
options.custom.programs.discord.enable = mkOption { default = false; };
config.home-manager.users.myned = mkIf cfg.enable { config.home-manager.users.myned = mkIf cfg.enable {
home.file.".config/BetterDiscord".source = home.file.".config/BetterDiscord".source =
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink 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";
}; };
} }

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.element-desktop; cfg = config.custom.programs.element-desktop;
in { in
options.custom.programs.element-desktop.enable = mkOption {default = false;}; {
options.custom.programs.element-desktop.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# Element Desktop custom themes # Element Desktop custom themes

View file

@ -4,19 +4,23 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
fastfetch = "${pkgs.fastfetch}/bin/fastfetch"; fastfetch = "${pkgs.fastfetch}/bin/fastfetch";
cfg = config.custom.programs.fastfetch; cfg = config.custom.programs.fastfetch;
in { in
{
options.custom.programs.fastfetch = { options.custom.programs.fastfetch = {
enable = mkOption {default = false;}; enable = mkOption { default = false; };
greet = mkOption {default = false;}; greet = mkOption { default = false; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/fastfetch-cli/fastfetch # https://github.com/fastfetch-cli/fastfetch
environment.systemPackages = [pkgs.fastfetch]; environment.systemPackages = [ pkgs.fastfetch ];
# System info greeting # System info greeting
programs.fish.interactiveShellInit = mkIf cfg.greet '' programs.fish.interactiveShellInit = mkIf cfg.greet ''

View file

@ -5,10 +5,14 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.firefox; cfg = config.custom.programs.firefox;
in { in
options.custom.programs.firefox.enable = mkOption {default = false;}; {
options.custom.programs.firefox.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# TODO: Switch to librewolf when supported by module # TODO: Switch to librewolf when supported by module
@ -112,12 +116,13 @@ in {
# https://mozilla.github.io/policy-templates/#extensionsettings # https://mozilla.github.io/policy-templates/#extensionsettings
#?? https://addons.mozilla.org/en-US/firefox #?? https://addons.mozilla.org/en-US/firefox
#?? about:support#addons #?? about:support#addons
ExtensionSettings = let ExtensionSettings =
extension = id: { let
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${id}/latest.xpi"; extension = id: {
installation_mode = "normal_installed"; install_url = "https://addons.mozilla.org/firefox/downloads/latest/${id}/latest.xpi";
}; installation_mode = "normal_installed";
in };
in
mkMerge [ mkMerge [
(mkIf config.custom.minimal { (mkIf config.custom.minimal {
"uBlock0@raymondhill.net" = extension "ublock-origin"; # uBlock Origin "uBlock0@raymondhill.net" = extension "ublock-origin"; # uBlock Origin
@ -189,57 +194,59 @@ in {
#!! Only certain preferences are supported via policies #!! Only certain preferences are supported via policies
# https://mozilla.github.io/policy-templates/#preferences # https://mozilla.github.io/policy-templates/#preferences
#?? about:config #?? about:config
Preferences = let Preferences =
locked = value: { let
Value = value; locked = value: {
Status = "locked"; 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;
}; };
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"; SearchBar = "unified";
@ -545,7 +552,7 @@ in {
"Downloads/stg" = mkIf config.custom.full { "Downloads/stg" = mkIf config.custom.full {
source = source =
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink 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 # Work around icon dissociation due to missing --name flag in actions

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.fish; cfg = config.custom.programs.fish;
in { in
options.custom.programs.fish.enable = mkOption {default = false;}; {
options.custom.programs.fish.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/Fish # https://wiki.nixos.org/wiki/Fish

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.foot; cfg = config.custom.programs.foot;
in { in
options.custom.programs.foot.enable = mkOption {default = false;}; {
options.custom.programs.foot.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://codeberg.org/dnkl/foot # https://codeberg.org/dnkl/foot

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.fuzzel; cfg = config.custom.programs.fuzzel;
in { in
options.custom.programs.fuzzel.enable = mkOption {default = false;}; {
options.custom.programs.fuzzel.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://codeberg.org/dnkl/fuzzel # https://codeberg.org/dnkl/fuzzel

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.gamemode; cfg = config.custom.programs.gamemode;
in { in
options.custom.programs.gamemode.enable = mkOption {default = false;}; {
options.custom.programs.gamemode.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/FeralInteractive/gamemode # https://github.com/FeralInteractive/gamemode

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.gamescope; cfg = config.custom.programs.gamescope;
in { in
options.custom.programs.gamescope.enable = mkOption {default = false;}; {
options.custom.programs.gamescope.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/ValveSoftware/gamescope # https://github.com/ValveSoftware/gamescope

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.git; cfg = config.custom.programs.git;
in { in
options.custom.programs.git.enable = mkOption {default = false;}; {
options.custom.programs.git.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://wiki.archlinux.org/title/Git # https://wiki.archlinux.org/title/Git

View file

@ -4,38 +4,43 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.gnome-shell; cfg = config.custom.programs.gnome-shell;
in { in
options.custom.programs.gnome-shell.enable = mkOption {default = false;}; {
options.custom.programs.gnome-shell.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# BUG: programs.gnome-shell.theme option forces installation of gnome-shell-extensions # BUG: programs.gnome-shell.theme option forces installation of gnome-shell-extensions
programs.gnome-shell = { programs.gnome-shell = {
enable = true; enable = true;
extensions = with pkgs.gnomeExtensions; extensions =
with pkgs.gnomeExtensions;
optionals config.custom.default [ 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 [ ++ optionals config.custom.minimal [
{package = caffeine;} # https://github.com/eonpatapon/gnome-shell-extension-caffeine { package = caffeine; } # https://github.com/eonpatapon/gnome-shell-extension-caffeine
{package = dash-to-dock;} # https://github.com/micheleg/dash-to-dock { package = dash-to-dock; } # https://github.com/micheleg/dash-to-dock
#// { package = dash2dock-lite; } # https://github.com/icedman/dash2dock-lite #// { package = dash2dock-lite; } # https://github.com/icedman/dash2dock-lite
{package = gsconnect;} # https://github.com/GSConnect/gnome-shell-extension-gsconnect { package = gsconnect; } # https://github.com/GSConnect/gnome-shell-extension-gsconnect
{package = just-perfection;} # https://gitlab.gnome.org/jrahmatzadeh/just-perfection { package = just-perfection; } # https://gitlab.gnome.org/jrahmatzadeh/just-perfection
{package = rounded-window-corners-reborn;} # https://github.com/flexagoon/rounded-window-corners { package = rounded-window-corners-reborn; } # https://github.com/flexagoon/rounded-window-corners
#// { package = user-themes; } # https://gitlab.gnome.org/GNOME/gnome-shell-extensions #// { package = user-themes; } # https://gitlab.gnome.org/GNOME/gnome-shell-extensions
] ]
++ optionals config.custom.full [ ++ optionals config.custom.full [
#// { package = auto-move-windows; } # https://gitlab.gnome.org/GNOME/gnome-shell-extensions #// { 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 = clipboard-indicator; } # https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator
{package = ddterm;} # https://github.com/ddterm/gnome-shell-extension-ddterm { package = ddterm; } # https://github.com/ddterm/gnome-shell-extension-ddterm
#// { package = hide-top-bar; } # https://gitlab.gnome.org/tuxor1337/hidetopbar #// { 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 = smart-auto-move; } # https://github.com/khimaros/smart-auto-move
{package = tailscale-qs;} # https://github.com/joaophi/tailscale-gnome-qs { package = tailscale-qs; } # https://github.com/joaophi/tailscale-gnome-qs
{package = tiling-assistant;} # https://github.com/Leleat/Tiling-Assistant { package = tiling-assistant; } # https://github.com/Leleat/Tiling-Assistant
]; ];
}; };
}; };

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.gnome-terminal; cfg = config.custom.programs.gnome-terminal;
in { in
options.custom.programs.gnome-terminal.enable = mkOption {default = false;}; {
options.custom.programs.gnome-terminal.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://gitlab.gnome.org/GNOME/gnome-terminal # https://gitlab.gnome.org/GNOME/gnome-terminal

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.gpg; cfg = config.custom.programs.gpg;
in { in
options.custom.programs.gpg.enable = mkOption {default = false;}; {
options.custom.programs.gpg.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://wiki.archlinux.org/title/GnuPG # https://wiki.archlinux.org/title/GnuPG

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.htop; cfg = config.custom.programs.htop;
in { in
options.custom.programs.htop.enable = mkOption {default = false;}; {
options.custom.programs.htop.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/htop-dev/htop # https://github.com/htop-dev/htop
@ -71,25 +71,25 @@ in {
} }
// ( // (
with config.home-manager.users.${config.custom.username}.lib.htop; with config.home-manager.users.${config.custom.username}.lib.htop;
leftMeters [ leftMeters [
(bar "LeftCPUs4") (bar "LeftCPUs4")
(text "Blank") (text "Blank")
(bar "CPU") (bar "CPU")
(bar "MemorySwap") (bar "MemorySwap")
(text "System") (text "System")
(text "DateTime") (text "DateTime")
] ]
) )
// ( // (
with config.home-manager.users.${config.custom.username}.lib.htop; with config.home-manager.users.${config.custom.username}.lib.htop;
rightMeters [ rightMeters [
(bar "RightCPUs4") (bar "RightCPUs4")
(text "Blank") (text "Blank")
(bar "NetworkIO") (bar "NetworkIO")
(bar "DiskIO") (bar "DiskIO")
(text "Hostname") (text "Hostname")
(text "Uptime") (text "Uptime")
] ]
); );
}; };

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.hyprlock; cfg = config.custom.programs.hyprlock;
in { in
options.custom.programs.hyprlock.enable = mkOption {default = false;}; {
options.custom.programs.hyprlock.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.hyprlock.enable = true; # Grant PAM access programs.hyprlock.enable = true; # Grant PAM access

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.kdeconnect; cfg = config.custom.programs.kdeconnect;
in { in
options.custom.programs.kdeconnect.enable = mkOption {default = false;}; {
options.custom.programs.kdeconnect.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/KDE/kdeconnect-kde # https://github.com/KDE/kdeconnect-kde

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.kitty; cfg = config.custom.programs.kitty;
in { in
options.custom.programs.kitty.enable = mkOption {default = false;}; {
options.custom.programs.kitty.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://sw.kovidgoyal.net/kitty/ # https://sw.kovidgoyal.net/kitty/

View file

@ -4,21 +4,25 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.libreoffice; cfg = config.custom.programs.libreoffice;
in { in
{
options.custom.programs.libreoffice = { options.custom.programs.libreoffice = {
enable = mkOption {default = false;}; enable = mkOption { default = false; };
package = mkOption {default = pkgs.libreoffice-fresh;}; package = mkOption { default = pkgs.libreoffice-fresh; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://www.libreoffice.org # https://www.libreoffice.org
environment.systemPackages = [cfg.package]; environment.systemPackages = [ cfg.package ];
#!! Options not available, files synced #!! Options not available, files synced
home-manager.users.${config.custom.username}.home.file.".config/libreoffice/4/user".source = home-manager.users.${config.custom.username}.home.file.".config/libreoffice/4/user".source =
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink 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";
}; };
} }

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.librewolf; cfg = config.custom.programs.librewolf;
in { in
options.custom.programs.librewolf.enable = mkOption {default = false;}; {
options.custom.programs.librewolf.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://codeberg.org/librewolf # https://codeberg.org/librewolf

View file

@ -1,16 +1,15 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.localsend; cfg = config.custom.programs.localsend;
in { in
options.custom.programs.localsend.enable = mkOption {default = false;}; {
options.custom.programs.localsend.enable = mkOption { default = false; };
config = config =
if (versionAtLeast version "24.11") if (versionAtLeast version "24.11") then
then
(mkIf cfg.enable { (mkIf cfg.enable {
# https://github.com/localsend/localsend # https://github.com/localsend/localsend
programs.localsend = { programs.localsend = {
@ -18,5 +17,6 @@ in {
openFirewall = true; openFirewall = true;
}; };
}) })
else {}; else
{ };
} }

View file

@ -1,17 +1,17 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.logseq; cfg = config.custom.programs.logseq;
in { in
options.custom.programs.logseq.enable = mkOption {default = false;}; {
options.custom.programs.logseq.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
#!! Synced imperative configuration #!! Synced imperative configuration
home.file.".logseq/".source = home.file.".logseq/".source =
config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink 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/";
}; };
} }

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.man; cfg = config.custom.programs.man;
in { in
options.custom.programs.man.enable = mkOption {default = false;}; {
options.custom.programs.man.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Enable as much offline docs as possible # Enable as much offline docs as possible

View file

@ -4,10 +4,14 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.mangohud; cfg = config.custom.programs.mangohud;
in { in
options.custom.programs.mangohud.enable = mkOption {default = false;}; {
options.custom.programs.mangohud.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/flightlessmango/MangoHud # https://github.com/flightlessmango/MangoHud

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.mosh; cfg = config.custom.programs.mosh;
in { in
options.custom.programs.mosh.enable = mkOption {default = false;}; {
options.custom.programs.mosh.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/Mosh # https://wiki.nixos.org/wiki/Mosh

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.nano; cfg = config.custom.programs.nano;
in { in
options.custom.programs.nano.enable = mkOption {default = false;}; {
options.custom.programs.nano.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://wiki.archlinux.org/title/Nano # https://wiki.archlinux.org/title/Nano

View file

@ -4,10 +4,14 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.nautilus; cfg = config.custom.programs.nautilus;
in { in
options.custom.programs.nautilus.enable = mkOption {default = false;}; {
options.custom.programs.nautilus.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.gvfs.enable = true; # Trash dependency services.gvfs.enable = true; # Trash dependency

View file

@ -1,26 +1,28 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.networkmanager-dmenu; cfg = config.custom.programs.networkmanager-dmenu;
in { in
options.custom.programs.networkmanager-dmenu.enable = mkOption {default = false;}; {
options.custom.programs.networkmanager-dmenu.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/firecat53/networkmanager-dmenu # https://github.com/firecat53/networkmanager-dmenu
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example # https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
#!! Option not available, files written directly #!! Option not available, files written directly
# FIXME: active_chars does not take effect # FIXME: active_chars does not take effect
home.file.".config/networkmanager-dmenu/config.ini".text = let home.file.".config/networkmanager-dmenu/config.ini".text =
wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi"; let
in '' wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi";
[dmenu] in
dmenu_command = ${wofi} --dmenu --lines 11 ''
active_chars = > [dmenu]
wifi_icons = 󰤯󰤟󰤢󰤥󰤨 dmenu_command = ${wofi} --dmenu --lines 11
format = {icon} {name} active_chars = >
''; wifi_icons = 󰤯󰤟󰤢󰤥󰤨
format = {icon} {name}
'';
}; };
} }

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.nh; cfg = config.custom.programs.nh;
in { in
options.custom.programs.nh.enable = mkOption {default = false;}; {
options.custom.programs.nh.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/viperML/nh # https://github.com/viperML/nh
@ -16,11 +16,7 @@ in {
clean = { clean = {
enable = true; enable = true;
extraArgs = "--keep-since ${ extraArgs = "--keep-since ${if config.custom.minimal then "7" else "30"}d";
if config.custom.minimal
then "7"
else "30"
}d";
}; };
}; };
}; };

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.nheko; cfg = config.custom.programs.nheko;
in { in
options.custom.programs.nheko.enable = mkOption {default = false;}; {
options.custom.programs.nheko.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/Nheko-Reborn/nheko # https://github.com/Nheko-Reborn/nheko

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.nix-index; cfg = config.custom.programs.nix-index;
in { in
options.custom.programs.nix-index.enable = mkOption {default = false;}; {
options.custom.programs.nix-index.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/nix-community/nix-index # https://github.com/nix-community/nix-index

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.nix-ld; cfg = config.custom.programs.nix-ld;
in { in
options.custom.programs.nix-ld.enable = mkOption {default = false;}; {
options.custom.programs.nix-ld.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/nix-community/nix-ld # https://github.com/nix-community/nix-ld

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.nushell; cfg = config.custom.programs.nushell;
in { in
options.custom.programs.nushell.enable = mkOption {default = false;}; {
options.custom.programs.nushell.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# TODO: Create config # TODO: Create config

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.nvtop; cfg = config.custom.programs.nvtop;
in { in
options.custom.programs.nvtop.enable = mkOption {default = false;}; {
options.custom.programs.nvtop.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/Syllo/nvtop # https://github.com/Syllo/nvtop

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.obs-studio; cfg = config.custom.programs.obs-studio;
in { in
options.custom.programs.obs-studio.enable = mkOption {default = false;}; {
options.custom.programs.obs-studio.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/obsproject/obs-studio # https://github.com/obsproject/obs-studio

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.onedrive; cfg = config.custom.programs.onedrive;
in { in
options.custom.programs.onedrive.enable = mkOption {default = false;}; {
options.custom.programs.onedrive.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/abraunegg/onedrive # https://github.com/abraunegg/onedrive

View file

@ -4,10 +4,14 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.path-of-building; cfg = config.custom.programs.path-of-building;
in { in
options.custom.programs.path-of-building.enable = mkOption {default = false;}; {
options.custom.programs.path-of-building.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
xdg.desktopEntries.path-of-building = { xdg.desktopEntries.path-of-building = {

View file

@ -4,10 +4,14 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.rbw; cfg = config.custom.programs.rbw;
in { in
options.custom.programs.rbw.enable = mkOption {default = false;}; {
options.custom.programs.rbw.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/doy/rbw # https://github.com/doy/rbw

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.rofi-rbw; cfg = config.custom.programs.rofi-rbw;
in { in
options.custom.programs.rofi-rbw.enable = mkOption {default = false;}; {
options.custom.programs.rofi-rbw.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/fdw/rofi-rbw # https://github.com/fdw/rofi-rbw

View file

@ -4,10 +4,14 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.rofi; cfg = config.custom.programs.rofi;
in { in
options.custom.programs.rofi.enable = mkOption {default = false;}; {
options.custom.programs.rofi.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
#!! Creates package derivation #!! Creates package derivation
@ -26,8 +30,8 @@ in {
# Build against rofi-wayland due to ABI incompatibility with upstream # Build against rofi-wayland due to ABI incompatibility with upstream
# https://github.com/lbonn/rofi/issues/96 # https://github.com/lbonn/rofi/issues/96
# https://github.com/NixOS/nixpkgs/issues/298539 # https://github.com/NixOS/nixpkgs/issues/298539
(rofi-calc.override {rofi-unwrapped = rofi-wayland-unwrapped;}) # Calculator (rofi-calc.override { rofi-unwrapped = rofi-wayland-unwrapped; }) # Calculator
(rofi-top.override {rofi-unwrapped = rofi-wayland-unwrapped;}) # System monitor (rofi-top.override { rofi-unwrapped = rofi-wayland-unwrapped; }) # System monitor
]; ];
#?? rofi-theme-selector #?? rofi-theme-selector

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.seahorse; cfg = config.custom.programs.seahorse;
in { in
options.custom.programs.seahorse.enable = mkOption {default = false;}; {
options.custom.programs.seahorse.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.seahorse.enable = true; programs.seahorse.enable = true;

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.slurp; cfg = config.custom.programs.slurp;
in { in
options.custom.programs.slurp.enable = mkOption {default = false;}; {
options.custom.programs.slurp.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/emersion/slurp # https://github.com/emersion/slurp

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.ssh; cfg = config.custom.programs.ssh;
in { in
options.custom.programs.ssh.enable = mkOption {default = false;}; {
options.custom.programs.ssh.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Disable prompt for new hosts # Disable prompt for new hosts

View file

@ -4,31 +4,33 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.steam; cfg = config.custom.programs.steam;
in { in
{
# https://wiki.nixos.org/wiki/Steam # https://wiki.nixos.org/wiki/Steam
# https://store.steampowered.com # https://store.steampowered.com
options.custom.programs.steam = { options.custom.programs.steam = {
enable = mkOption {default = false;}; enable = mkOption { default = false; };
extest = mkOption {default = false;}; extest = mkOption { default = false; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.steam = programs.steam = {
{ enable = true;
enable = true; extest.enable = cfg.extest; # Work around invisible cursor on Wayland
extest.enable = cfg.extest; # Work around invisible cursor on Wayland extraCompatPackages = [ pkgs.proton-ge-bin ];
extraCompatPackages = [pkgs.proton-ge-bin];
gamescopeSession = { gamescopeSession = {
enable = true; enable = true;
# args = [ # args = [
# "--backend sdl" # "--backend sdl"
# "--fullscreen" # "--fullscreen"
# ]; # ];
}; };
} } // optionalAttrs (versionAtLeast version "24.11") { protontricks.enable = true; };
// optionalAttrs (versionAtLeast version "24.11") {protontricks.enable = true;};
}; };
} }

View file

@ -4,15 +4,19 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.swaylock; cfg = config.custom.programs.swaylock;
in { in
options.custom.programs.swaylock.enable = mkOption {default = false;}; {
options.custom.programs.swaylock.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Allow swaylock to unlock the session # Allow swaylock to unlock the session
# https://wiki.nixos.org/wiki/Sway#Swaylock_cannot_be_unlocked_with_the_correct_password # 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 # https://github.com/swaywm/swaylock
home-manager.users.${config.custom.username}.programs.swaylock = { home-manager.users.${config.custom.username}.programs.swaylock = {

View file

@ -5,10 +5,14 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.thunderbird; cfg = config.custom.programs.thunderbird;
in { in
options.custom.programs.thunderbird.enable = mkOption {default = false;}; {
options.custom.programs.thunderbird.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/Thunderbird # https://wiki.nixos.org/wiki/Thunderbird

View file

@ -1,17 +1,17 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.tio; cfg = config.custom.programs.tio;
in { in
options.custom.programs.tio.enable = mkOption {default = false;}; {
options.custom.programs.tio.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Allow serial device access # Allow serial device access
# https://github.com/tio/tio?tab=readme-ov-file#46-known-issues # 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 # https://github.com/tio/tio
#!! Options not available, files written directly #!! Options not available, files written directly

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.tmux; cfg = config.custom.programs.tmux;
in { in
options.custom.programs.tmux.enable = mkOption {default = false;}; {
options.custom.programs.tmux.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/Tmux # https://wiki.nixos.org/wiki/Tmux

View file

@ -5,10 +5,14 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.programs.vscode; cfg = config.custom.programs.vscode;
in { in
options.custom.programs.vscode.enable = mkOption {default = false;}; {
options.custom.programs.vscode.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/VSCodium # https://wiki.nixos.org/wiki/VSCodium

View file

@ -4,7 +4,6 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib; let with lib; let
bash = "${pkgs.bash}/bin/bash"; bash = "${pkgs.bash}/bin/bash";
blueberry = "${pkgs.blueberry}/bin/blueberry"; blueberry = "${pkgs.blueberry}/bin/blueberry";
@ -33,8 +32,6 @@ with lib; let
wttrbar = "${pkgs.wttrbar}/bin/wttrbar"; wttrbar = "${pkgs.wttrbar}/bin/wttrbar";
cfg = config.custom.programs.waybar; cfg = config.custom.programs.waybar;
in {
options.custom.programs.waybar.enable = mkOption {default = false;};
in { in {
options.custom.programs.waybar.enable = mkOption {default = false;}; options.custom.programs.waybar.enable = mkOption {default = false;};
@ -49,52 +46,6 @@ in {
### SETTINGS ### ### SETTINGS ###
# https://github.com/Alexays/Waybar/wiki/Configuration # https://github.com/Alexays/Waybar/wiki/Configuration
#?? pkill -SIGUSR2 -x waybar #?? 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;
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";
settings = let settings = let
## INHERIT ## ## INHERIT ##
#!! Module defaults are not accurate to documentation #!! Module defaults are not accurate to documentation
@ -142,26 +93,6 @@ in {
layer = "top"; layer = "top";
position = "bottom"; 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"
];
## POSITION ## ## POSITION ##
modules-left = [ modules-left = [
"custom/power" "custom/power"
@ -183,14 +114,6 @@ in {
"battery" "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 ''";
};
## MODULES ## ## MODULES ##
# https://github.com/Alexays/Waybar/wiki/Module:-Custom # https://github.com/Alexays/Waybar/wiki/Module:-Custom
"custom/power" = { "custom/power" = {
@ -200,26 +123,12 @@ in {
on-click-middle = "${loginctl} terminate-session ''"; on-click-middle = "${loginctl} terminate-session ''";
}; };
"custom/inhibitor" = {
interval = 5;
exec = "~/.config/waybar/scripts/inhibitor.sh";
on-click = "~/.local/bin/inhibit";
};
"custom/inhibitor" = { "custom/inhibitor" = {
interval = 5; interval = 5;
exec = "~/.config/waybar/scripts/inhibitor.sh"; exec = "~/.config/waybar/scripts/inhibitor.sh";
on-click = "~/.local/bin/inhibit"; 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/vm" = { "custom/vm" = {
interval = 5; interval = 5;
exec = "~/.config/waybar/scripts/vm.sh"; exec = "~/.config/waybar/scripts/vm.sh";
@ -230,27 +139,12 @@ in {
}"; }";
}; };
"custom/vpn" = {
interval = 5;
exec = "~/.config/waybar/scripts/vpn.sh";
on-click = "~/.local/bin/vpn mypi3";
};
"custom/vpn" = { "custom/vpn" = {
interval = 5; interval = 5;
exec = "~/.config/waybar/scripts/vpn.sh"; exec = "~/.config/waybar/scripts/vpn.sh";
on-click = "~/.local/bin/vpn mypi3"; 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:-Idle-Inhibitor # https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor
# FIXME: Not currently usable # FIXME: Not currently usable
# https://github.com/Alexays/Waybar/issues/690 # https://github.com/Alexays/Waybar/issues/690
@ -262,17 +156,8 @@ in {
}; };
}; };
# https://github.com/Alexays/Waybar/wiki/Module:-Hyprland
# https://github.com/Alexays/Waybar/wiki/Module:-Hyprland # https://github.com/Alexays/Waybar/wiki/Module:-Hyprland
# https://www.nerdfonts.com/cheat-sheet # https://www.nerdfonts.com/cheat-sheet
"hyprland/workspaces" = {
show-special = true;
format = "{icon}";
format-icons = {
android = "";
dropdown = "󰞷";
game = "󰊴";
music = "󰝚";
"hyprland/workspaces" = { "hyprland/workspaces" = {
show-special = true; show-special = true;
format = "{icon}"; format = "{icon}";
@ -283,7 +168,6 @@ in {
music = "󰝚"; music = "󰝚";
office = "󰈙"; office = "󰈙";
pip = "󰹙"; pip = "󰹙";
pip = "󰹙";
scratchpad = ""; scratchpad = "";
steam = "󰓓"; steam = "󰓓";
terminal = ""; terminal = "";
@ -291,28 +175,9 @@ in {
wallpaper = "󰏩"; wallpaper = "󰏩";
}; };
}; };
steam = "󰓓";
terminal = "";
vm = "󰢹";
wallpaper = "󰏩";
};
};
cava = cava-config;
cava = cava-config; 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>";
};
# https://github.com/Alexays/Waybar/wiki/Module:-Clock # https://github.com/Alexays/Waybar/wiki/Module:-Clock
clock = { clock = {
# https://fmt.dev/latest/syntax.html#chrono-specs # https://fmt.dev/latest/syntax.html#chrono-specs
@ -333,19 +198,7 @@ in {
on-scroll-up = "${swayosd-client} --output-volume raise"; on-scroll-up = "${swayosd-client} --output-volume raise";
on-scroll-down = "${swayosd-client} --output-volume lower"; on-scroll-down = "${swayosd-client} --output-volume lower";
}; };
# 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";
# https://github.com/bjesus/wttrbar # https://github.com/bjesus/wttrbar
"custom/weather" = { "custom/weather" = {
format = "{}°"; format = "{}°";
@ -358,13 +211,9 @@ in {
"--fahrenheit" "--fahrenheit"
"--hide-conditions" "--hide-conditions"
"--main-indicator temp_F" "--main-indicator temp_F"
"--location 'Cedar Falls Iowa'"
]; ];
}; };
"cava#reverse" =
cava-config
// {
"cava#reverse" = "cava#reverse" =
cava-config cava-config
// { // {
@ -387,37 +236,7 @@ in {
on-scroll-up = "${swayosd-client} --output-volume raise"; on-scroll-up = "${swayosd-client} --output-volume raise";
on-scroll-down = "${swayosd-client} --output-volume lower"; on-scroll-down = "${swayosd-client} --output-volume lower";
}; };
# 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:-WirePlumber # https://github.com/Alexays/Waybar/wiki/Module:-WirePlumber
wireplumber = { wireplumber = {
format = "{icon} {volume}%"; format = "{icon} {volume}%";
@ -433,16 +252,6 @@ in {
on-scroll-down = "${swayosd-client} --output-volume lower"; 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:-Bluetooth # https://github.com/Alexays/Waybar/wiki/Module:-Bluetooth
bluetooth = { bluetooth = {
format-disabled = "󰂲"; format-disabled = "󰂲";
@ -454,22 +263,6 @@ in {
on-click-middle = "${rfkill} toggle bluetooth"; # Toggle bluetooth on/off 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 = [
"󰤯"
"󰤟"
"󰤢"
"󰤥"
"󰤨"
];
};
# https://github.com/Alexays/Waybar/wiki/Module:-Network # https://github.com/Alexays/Waybar/wiki/Module:-Network
network = { network = {
format = "{icon}"; format = "{icon}";
@ -490,31 +283,7 @@ in {
on-click = nm-connection-editor; on-click = nm-connection-editor;
on-click-right = "~/.local/bin/network"; # Toggle networking on/off on-click-right = "~/.local/bin/network"; # Toggle networking on/off
}; };
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:-Battery # https://github.com/Alexays/Waybar/wiki/Module:-Battery
"battery" = { "battery" = {
format = "{icon} {power:.0f}W"; format = "{icon} {power:.0f}W";
@ -541,10 +310,6 @@ in {
}; };
}; };
}; };
on-click = "~/.local/bin/power"; # Toggle power-saver mode
};
};
};
}; };
# TODO: Convert to writeShellApplication # TODO: Convert to writeShellApplication

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.wezterm; cfg = config.custom.programs.wezterm;
in { in
options.custom.programs.wezterm.enable = mkOption {default = false;}; {
options.custom.programs.wezterm.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/wez/wezterm # https://github.com/wez/wezterm

View file

@ -1,13 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
pkgs,
... let
}:
with lib; let
cfg = config.custom.programs.wireshark; cfg = config.custom.programs.wireshark;
in { in
options.custom.programs.wireshark.enable = mkOption {default = false;}; {
options.custom.programs.wireshark.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://gitlab.com/wireshark/wireshark # https://gitlab.com/wireshark/wireshark
@ -16,6 +15,6 @@ in {
package = pkgs.wireshark; # GUI package = pkgs.wireshark; # GUI
}; };
users.users.${config.custom.username}.extraGroups = ["wireshark"]; users.users.${config.custom.username}.extraGroups = [ "wireshark" ];
}; };
} }

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.wofi; cfg = config.custom.programs.wofi;
in { in
options.custom.programs.wofi.enable = mkOption {default = false;}; {
options.custom.programs.wofi.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://hg.sr.ht/~scoopta/wofi # https://hg.sr.ht/~scoopta/wofi

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.programs.wpaperd; cfg = config.custom.programs.wpaperd;
in { in
options.custom.programs.wpaperd.enable = mkOption {default = false;}; {
options.custom.programs.wpaperd.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/danyspin97/wpaperd # https://github.com/danyspin97/wpaperd

View file

@ -4,174 +4,180 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
# Use packages from local derivation # Use packages from local derivation
git = config.home-manager.users.${config.custom.username}.programs.git.package; git = config.home-manager.users.${config.custom.username}.programs.git.package;
hyprland = hyprland =
config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage; config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage;
wofi = config.home-manager.users.${config.custom.username}.programs.wofi.package; wofi = config.home-manager.users.${config.custom.username}.programs.wofi.package;
in { in
config.home-manager.users.${config.custom.username}.home.file = let {
# Place script.ext in the same directory as this file config.home-manager.users.${config.custom.username}.home.file =
#?? pkg = (SHELL "NAME" [ DEPENDENCIES ]) let
# https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeShellApplication # Place script.ext in the same directory as this file
bash = name: dependencies: { #?? pkg = (SHELL "NAME" [ DEPENDENCIES ])
".local/bin/${name}".source = # https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeShellApplication
pkgs.writeShellApplication { bash = name: dependencies: {
inherit name; ".local/bin/${name}".source =
runtimeInputs = dependencies; pkgs.writeShellApplication {
text = builtins.readFile ./${name}.sh; inherit name;
} runtimeInputs = dependencies;
+ "/bin/${name}"; text = builtins.readFile ./${name}.sh;
}; }
+ "/bin/${name}";
};
# https://wiki.nixos.org/wiki/Nix-writers#Python3 # https://wiki.nixos.org/wiki/Nix-writers#Python3
# Always latest python version in nixpkgs, use writers.makePythonWriter to pin version # 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 # https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/writers/scripts.nix#L605
python = name: dependencies: { python = name: dependencies: {
".local/bin/${name}".source = ".local/bin/${name}".source =
pkgs.writers.writePython3Bin name {libraries = dependencies;} pkgs.writers.writePython3Bin name { libraries = dependencies; }
# Disable linting # Disable linting
# https://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html#ignoring-entire-files # https://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html#ignoring-entire-files
("# flake8: noqa\n" + builtins.readFile ./${name}.py) ("# flake8: noqa\n" + builtins.readFile ./${name}.py)
+ "/bin/${name}"; + "/bin/${name}";
}; };
in in
mkIf config.custom.full ( mkIf config.custom.full (
with pkgs; with pkgs;
mkMerge ( mkMerge (
[ [
# Bash files with extension .sh # Bash files with extension .sh
(bash "audio" [ (bash "audio" [
easyeffects easyeffects
libnotify 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 ])
])
)
); );
} }

View file

@ -4,13 +4,17 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cat = "${pkgs.coreutils}/bin/cat"; cat = "${pkgs.coreutils}/bin/cat";
sed = "${pkgs.gnused}/bin/sed"; sed = "${pkgs.gnused}/bin/sed";
cfg = config.custom.services.agenix; cfg = config.custom.services.agenix;
in { in
options.custom.services.agenix.enable = mkOption {default = false;}; {
options.custom.services.agenix.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
xdg.configFile."hypr/hyprland.conf".force = true; xdg.configFile."hypr/hyprland.conf".force = true;
@ -36,7 +40,7 @@ in {
}; };
Install = { Install = {
WantedBy = ["default.target"]; WantedBy = [ "default.target" ];
}; };
}; };
}; };

View file

@ -1,17 +1,17 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.services.auto-cpufreq; cfg = config.custom.services.auto-cpufreq;
in { in
{
options.custom.services.auto-cpufreq = { options.custom.services.auto-cpufreq = {
enable = mkOption {default = false;}; enable = mkOption { default = false; };
max = { max = {
battery = mkOption {default = null;}; # GHz battery = mkOption { default = null; }; # GHz
charger = mkOption {default = null;}; # GHz charger = mkOption { default = null; }; # GHz
}; };
}; };

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.services.avizo; cfg = config.custom.services.avizo;
in { in
options.custom.services.avizo.enable = mkOption {default = false;}; {
options.custom.services.avizo.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/misterdanb/avizo # https://github.com/misterdanb/avizo

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.services.blueman-applet; cfg = config.custom.services.blueman-applet;
in { in
options.custom.services.blueman-applet.enable = mkOption {default = false;}; {
options.custom.services.blueman-applet.enable = mkOption { default = false; };
config.home-manager.users.${config.custom.username} = mkIf cfg.enable { config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://github.com/blueman-project/blueman # https://github.com/blueman-project/blueman

View file

@ -1,12 +1,12 @@
{ { config, lib, ... }:
config,
lib, with lib;
...
}: let
with lib; let
cfg = config.custom.services.blueman; cfg = config.custom.services.blueman;
in { in
options.custom.services.blueman.enable = mkOption {default = false;}; {
options.custom.services.blueman.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://github.com/blueman-project/blueman # https://github.com/blueman-project/blueman

View file

@ -5,11 +5,15 @@
pkgs, pkgs,
... ...
}: }:
with lib; let
with lib;
let
cat = "${pkgs.coreutils}/bin/cat"; cat = "${pkgs.coreutils}/bin/cat";
cfg = config.custom.services.borgmatic; cfg = config.custom.services.borgmatic;
in { in
{
# https://wiki.nixos.org/wiki/Borg_backup # https://wiki.nixos.org/wiki/Borg_backup
# https://github.com/borgmatic-collective/borgmatic # https://github.com/borgmatic-collective/borgmatic
#!! Imperative initialization #!! Imperative initialization
@ -17,9 +21,9 @@ in {
#?? sudo borgmatic key export #?? sudo borgmatic key export
#?? sudo borgmatic -v 1 create --progress --stats #?? sudo borgmatic -v 1 create --progress --stats
options.custom.services.borgmatic = { options.custom.services.borgmatic = {
enable = mkOption {default = false;}; enable = mkOption { default = false; };
repositories = mkOption {default = [];}; repositories = mkOption { default = [ ]; };
sources = mkOption {default = [];}; sources = mkOption { default = [ ]; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -64,10 +68,12 @@ in {
}; };
}; };
age.secrets = let age.secrets =
secret = filename: {file = "${inputs.self}/secrets/${filename}";}; let
in { secret = filename: { file = "${inputs.self}/secrets/${filename}"; };
"${config.custom.profile}/borgmatic/borgbase.${config.custom.hostname}" = secret "${config.custom.profile}/borgmatic/borgbase.${config.custom.hostname}"; in
}; {
"${config.custom.profile}/borgmatic/borgbase.${config.custom.hostname}" = secret "${config.custom.profile}/borgmatic/borgbase.${config.custom.hostname}";
};
}; };
} }

View file

@ -4,21 +4,27 @@
lib, lib,
... ...
}: }:
with lib; let
with lib;
let
cfg = config.custom.services.caddy; cfg = config.custom.services.caddy;
in { in
options.custom.services.caddy.enable = mkOption {default = false;}; {
options.custom.services.caddy.enable = mkOption { default = false; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
age.secrets = let age.secrets =
secret = filename: { let
file = "${inputs.self}/secrets/${filename}"; secret = filename: {
owner = "caddy"; file = "${inputs.self}/secrets/${filename}";
group = "caddy"; owner = "caddy";
group = "caddy";
};
in
{
"${config.custom.profile}/caddy/Caddyfile" = secret "${config.custom.profile}/caddy/Caddyfile";
}; };
in {
"${config.custom.profile}/caddy/Caddyfile" = secret "${config.custom.profile}/caddy/Caddyfile";
};
# https://caddyserver.com/ # https://caddyserver.com/
# https://github.com/caddyserver/caddy # https://github.com/caddyserver/caddy

Some files were not shown because too many files have changed in this diff Show more