Compare commits
6 Commits
feature/el
...
5122a8daad
| Author | SHA1 | Date | |
|---|---|---|---|
|
5122a8daad
|
|||
|
87047b5b1b
|
|||
|
b309aa3893
|
|||
|
019149b39b
|
|||
|
f59f0ea20a
|
|||
|
9105831fbb
|
@@ -132,13 +132,6 @@
|
|||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
elcafe = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit specialArgs;
|
|
||||||
modules = [
|
|
||||||
./hosts/elcafe/configuration.nix
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
];
|
|
||||||
};
|
|
||||||
gampo = nixpkgs.lib.nixosSystem {
|
gampo = nixpkgs.lib.nixosSystem {
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
modules = [
|
modules = [
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
{
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
inputs.home-manager.nixosModules.default
|
|
||||||
../../system
|
|
||||||
];
|
|
||||||
|
|
||||||
sops.secrets = {
|
|
||||||
"elcafe/traefik/env".restartUnits = ["traefik.service"];
|
|
||||||
"elcafe/traefik/dynamic".restartUnits = ["traefik.service"];
|
|
||||||
};
|
|
||||||
|
|
||||||
mySystem = {
|
|
||||||
boot = {
|
|
||||||
kernel = {
|
|
||||||
hardened = true;
|
|
||||||
cpuVendor = "intel";
|
|
||||||
};
|
|
||||||
zfs = {
|
|
||||||
enable = true;
|
|
||||||
pools = ["tank"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
dev.docker = {
|
|
||||||
enable = true;
|
|
||||||
extraDaemonSettings.data-root = "/tank/docker/";
|
|
||||||
};
|
|
||||||
misc.keymap = "fr";
|
|
||||||
networking = {
|
|
||||||
hostname = "elcafe";
|
|
||||||
id = "501c7fb9";
|
|
||||||
};
|
|
||||||
packages.nix = {
|
|
||||||
gc.automatic = true;
|
|
||||||
trusted-users = [
|
|
||||||
"root"
|
|
||||||
"phundrak"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
endlessh.enable = true;
|
|
||||||
plex = {
|
|
||||||
enable = true;
|
|
||||||
dataDir = "/tank/web/plex-config";
|
|
||||||
};
|
|
||||||
ssh = {
|
|
||||||
enable = true;
|
|
||||||
allowedUsers = ["phundrak"];
|
|
||||||
passwordAuthentication = false;
|
|
||||||
};
|
|
||||||
traefik = {
|
|
||||||
enable = true;
|
|
||||||
envFiles = [config.sops.secrets."elcafe/traefik/env".path];
|
|
||||||
dynConf = config.sops.secrets."elcafe/traefik/dynamic".path;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
users = {
|
|
||||||
root.disablePassword = true;
|
|
||||||
phundrak.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
initrd = {
|
|
||||||
availableKernelModules = ["ahci" "xhci_pci" "ehci_pci" "megaraid_sas" "usbhid" "usb_storage" "sd_mod" "sr_mod"];
|
|
||||||
kernelModules = [];
|
|
||||||
};
|
|
||||||
kernelModules = ["kvm-intel"];
|
|
||||||
extraModulePackages = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/d2e703f7-90e0-43e7-9872-ce036f201c4b";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno2.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno3.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno4.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
@@ -1,14 +1,10 @@
|
|||||||
elcafe:
|
|
||||||
traefik:
|
|
||||||
env: ENC[AES256_GCM,data:Mfm4Wt/7UWrpWGGa/rmC1wY6QtI2G/a6cbZiNjZz1gOTrREehFBZxH5JJ9ZgsxCMSuh/XCQa/75cPg==,iv:nrtTmtdFfTrCYzxFHDVMuaDdoa8SDi+pn4kghP4r9xE=,tag:gjlv8ohv1aDx2PB1rwx6fQ==,type:str]
|
|
||||||
dynamic: ENC[AES256_GCM,data:AYUojopOSi2kZ4ORxs4KrWHgqXZTMVtShb7T2iQ4JDyrlrIWCTpynt8/El9uoDaSryTgqxM8z3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t/KNmbOaVzLV+G3zBUVXE7nEQpZNqVom0rgNrEVDGzH3u/IaA5eqG5ce9lE0BomeY8Z4MWI1xujhX5KsXdv21aw4UwsNgyLPuWhkN2POUMfCJlvekc/TFfFvJHyysx8aKxeI4dsg==,iv:cxx0cVkjOPG+hMD8JctJHdcICJt7ozpfRBVSCDBo6Ro=,tag:JRjwwvieGaGZJ+k56HWFaw==,type:str]
|
bandcamp: ENC[AES256_GCM,data:diEx2fbkOR1oUav81jU5bNt/KNmbOaVzLV+G3zBUVXE7nEQpZNqVom0rgNrEVDGzH3u/IaA5eqG5ce9lE0BomeY8Z4MWI1xujhX5KsXdv21aw4UwsNgyLPuWhkN2POUMfCJlvekc/TFfFvJHyysx8aKxeI4dsg==,iv:cxx0cVkjOPG+hMD8JctJHdcICJt7ozpfRBVSCDBo6Ro=,tag:JRjwwvieGaGZJ+k56HWFaw==,type:str]
|
||||||
emailPassword: ENC[AES256_GCM,data:LALAvyuNN9bfa8D6ZK1YiFXRfxLOBi9kXA0N0Kr7h18eAI4hWQ==,iv:WtidILFfWCMKylax52JP+X57GfZyYlxJtiwrC6SADik=,tag:NvOrsL3fbmxQZp06GZhUZA==,type:str]
|
emailPassword: ENC[AES256_GCM,data:LALAvyuNN9bfa8D6ZK1YiFXRfxLOBi9kXA0N0Kr7h18eAI4hWQ==,iv:WtidILFfWCMKylax52JP+X57GfZyYlxJtiwrC6SADik=,tag:NvOrsL3fbmxQZp06GZhUZA==,type:str]
|
||||||
ssh:
|
ssh:
|
||||||
hosts: ENC[AES256_GCM,data:j7+Ua5G8dePL5GO+Tf8+hnoJsSfKo2z4I0OcVfSyJ3dc6yyYZVho8iG9bqPAqVR5d7SJr391zCLMJp/jRDpDFLkzQB54udVKI8ob0C2w2xBznPZJsC7qZMptQ+n4IHO1ZROSi/vBadCUfEWKNO9e8gsroBYmliy/31M5IlA85Vx6q4Zx0qIFylfIhBDto3jD2DRcbjWP8NvjJcY7YLrN2sv8RR7QqX1q+0ZxpgFhg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
|
||||||
- recipient: age1ajemtm502nn2n4q7v4j8meyd5mxtcqngkkedxq2pqzuwu78zp93qnw8q48
|
- recipient: age1ajemtm502nn2n4q7v4j8meyd5mxtcqngkkedxq2pqzuwu78zp93qnw8q48
|
||||||
@@ -65,7 +61,7 @@ sops:
|
|||||||
QmJKNDJUY0RSakhwNWlkOVpib0trc1kK0tQxD9I82pjfs54eruu+IjzVUmcVBCPw
|
QmJKNDJUY0RSakhwNWlkOVpib0trc1kK0tQxD9I82pjfs54eruu+IjzVUmcVBCPw
|
||||||
9mp1xKiYRRMXt3YQn6MPiyuuX3l3UB5MH0RJMNtRq0D961rs+iiS5A==
|
9mp1xKiYRRMXt3YQn6MPiyuuX3l3UB5MH0RJMNtRq0D961rs+iiS5A==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2025-11-02T00:42:02Z"
|
lastmodified: "2025-11-02T16:19:20Z"
|
||||||
mac: ENC[AES256_GCM,data:0rYURFETR06JRNY/vE89jEI+dovFNxsjSOalf1Id3H+yzl4UYdsHN1T3mD1EfssFwCloBxOo+188RkUe7JlNV7hC+tvO3nBrDNuqjzFBQu/IHEz+nTI3mwB7ZsywubvFMG65dohM8H9hB2bUXSSqtEUpFEiz7Ugn2BfGyex4BbI=,iv:vFJk6mz60d6CzSetd+bNvxTEWfGBPaBS4sYj/AiYbq4=,tag:2nHBGQ5P3mxLyzllvstBqg==,type:str]
|
mac: ENC[AES256_GCM,data:2UFvzqhsR9OecqRX/n2O5wJ1fcdhetNE37Vj56rL6tRxT42uU8SKy7hxROS0LcrwKs59Km7P1oO/mYW6eyuLAZ7R5MAm18R5UYIYpKV8oevNUYMl0bsJkMnzl+nxz2i0ceg38rsioS9frK9a29hbJiV6Vr9yubHNdtZF4YqRmH0=,iv:Cx2nN4Gm0L+aWi6jbLuSuzhhzD8W5PzCLmJajyb/oEo=,tag:6wM1m8LB+7Rd/F9h62C4gg==,type:str]
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.11.0
|
version: 3.11.0
|
||||||
|
|||||||
@@ -9,13 +9,6 @@ with lib; let
|
|||||||
in {
|
in {
|
||||||
options.mySystem.dev.docker = {
|
options.mySystem.dev.docker = {
|
||||||
enable = mkEnableOption "Enable Docker";
|
enable = mkEnableOption "Enable Docker";
|
||||||
extraDaemonSettings = mkOption {
|
|
||||||
type = types.nullOr (types.attrsOf types.str);
|
|
||||||
default = {};
|
|
||||||
example = {
|
|
||||||
data-root = "/custom/path";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
podman.enable = mkEnableOption "Enable Podman rather than Docker";
|
podman.enable = mkEnableOption "Enable Podman rather than Docker";
|
||||||
nvidia.enable = mkEnableOption "Activate Nvidia support";
|
nvidia.enable = mkEnableOption "Activate Nvidia support";
|
||||||
autoprune.enable = mkEnableOption "Enable autoprune";
|
autoprune.enable = mkEnableOption "Enable autoprune";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
{lib, ...}:
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./amdgpu.nix
|
./amdgpu.nix
|
||||||
@@ -8,5 +7,4 @@
|
|||||||
./opentablet.nix
|
./opentablet.nix
|
||||||
./sound.nix
|
./sound.nix
|
||||||
];
|
];
|
||||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,5 @@
|
|||||||
./printing.nix
|
./printing.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./sunshine.nix
|
./sunshine.nix
|
||||||
./traefik.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.mySystem.services.traefik;
|
|
||||||
in {
|
|
||||||
options.mySystem.services.traefik = {
|
|
||||||
enable = mkEnableOption "Enable Traefikse";
|
|
||||||
email = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "lucien@phundrak.com";
|
|
||||||
example = "admin@example.com";
|
|
||||||
};
|
|
||||||
envFiles = mkOption {
|
|
||||||
type = types.listOf types.path;
|
|
||||||
example = ["/run/secrets/traefik.env"];
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
dynConf = mkOption {
|
|
||||||
type = types.path;
|
|
||||||
example = "/var/traefik/dynamic.yaml";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
networking.firewall.allowedTCPPorts = [80 443];
|
|
||||||
services.traefik = {
|
|
||||||
inherit (cfg) enable;
|
|
||||||
environmentFiles = cfg.envFiles;
|
|
||||||
dynamicConfigFile = cfg.dynConf;
|
|
||||||
staticConfigOptions = {
|
|
||||||
log = {
|
|
||||||
level = "WARN";
|
|
||||||
filePath = "/var/log/traefik/traefik.log";
|
|
||||||
};
|
|
||||||
accessLog.filePath = "/var/log/traefik/access.log";
|
|
||||||
api.dashboard = true;
|
|
||||||
entryPoints = {
|
|
||||||
web = {
|
|
||||||
address = ":80";
|
|
||||||
http.redirections.entryPoint = {
|
|
||||||
to = "websecure";
|
|
||||||
scheme = "https";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
websecure.address = ":443";
|
|
||||||
};
|
|
||||||
certificatesResolvers.cloudflare.acme = {
|
|
||||||
inherit (cfg) email;
|
|
||||||
storage = "/var/lib/traefik/acme.json";
|
|
||||||
dnsChallenge = {
|
|
||||||
provider = "cloudflare";
|
|
||||||
resolvers = ["1.1.1.1:53" "1.0.0.1:53"];
|
|
||||||
propagation.delayBeforeChecks = 60;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
providers.docker = {
|
|
||||||
endpoint = "unix:///var/run/docker.sock";
|
|
||||||
exposedByDefault = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{pkgs, ...}:
|
{pkgs, ...}:
|
||||||
pkgs.writeShellScriptBin "askpass" ''
|
pkgs.writeShellScriptBin "askpass" ''
|
||||||
${pkgs.wofi}/bin/wofi -d -P -L 1 -p "$(printf $1 | sed s/://)"''
|
${pkgs.rofi}/bin/rofi -dmenu -password -no-fixed-num-lines -p $(printf \"$*\" | sed 's/://')''
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
{pkgs, ...}:
|
|
||||||
pkgs.writeShellScriptBin "rofi-emoji" ''
|
|
||||||
SELECTED_EMOJI=$(grep -v "#" ~/.config/emoji | ${pkgs.wofi}/bin/wofi --dmenu -p "Select emoji" -i | awk '{print $1}' | tr -d '\n')
|
|
||||||
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
|
|
||||||
printf "%s" "$SELECTED_EMOJI" | ${pkgs.wl-clipboard-rs}/bin/wl-copy
|
|
||||||
else
|
|
||||||
printf "%s" "$SELECTED_EMOJI" | ${pkgs.xclip}/bin/xclip -sel clip
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$XDG_SESSION_TYPE" = "wayland" ]
|
|
||||||
then EMOJI=$(${pkgs.wl-clipboard-rs}/bin/wl-paste)
|
|
||||||
else EMOJI=$(${pkgs.xclip}/bin/xclip -o)
|
|
||||||
fi
|
|
||||||
|
|
||||||
test -z "$EMOJI" && notify-send "No emoji copied" -u low && exit
|
|
||||||
EMOJI="$EMOJI copied to clipboard"
|
|
||||||
${pkgs.libnotify}/bin/notify-send -u low "$EMOJI"
|
|
||||||
''
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{pkgs, ...}:
|
{pkgs, ...}:
|
||||||
pkgs.writeShellScriptBin "ytplay" ''
|
pkgs.writeShellScriptBin "ytplay" ''
|
||||||
URL=$(${pkgs.wofi}/bin/wofi --dmenu -i -p "Video URL")
|
URL=$(rofi -dmenu -i -p "Video URL")
|
||||||
if [ -z "$URL" ]; then
|
if [ -z "$URL" ]; then
|
||||||
echo "You need to provide a URL"
|
echo "You need to provide a URL"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -9,7 +9,7 @@ pkgs.writeShellScriptBin "ytplay" ''
|
|||||||
grep -E "webm.*[0-9]+x[0-9]" | \
|
grep -E "webm.*[0-9]+x[0-9]" | \
|
||||||
awk '{print $3 " " $1}' | \
|
awk '{print $3 " " $1}' | \
|
||||||
sort -gu | \
|
sort -gu | \
|
||||||
${pkgs.wofi}/bin/wofi --dmenu -i -p "Resolution")
|
rofi -dmenu -i -p "Resolution")
|
||||||
mapfile -t RESOLUTION <<< "$RESOLUTION_CHOICE"
|
mapfile -t RESOLUTION <<< "$RESOLUTION_CHOICE"
|
||||||
RESOLUTION_CODE=''${RESOLUTION[0]}
|
RESOLUTION_CODE=''${RESOLUTION[0]}
|
||||||
${pkgs.mpv}/bin/mpv --ytdl-format="''${RESOLUTION_CODE}+bestaudio/best" "$URL"
|
${pkgs.mpv}/bin/mpv --ytdl-format="''${RESOLUTION_CODE}+bestaudio/best" "$URL"
|
||||||
|
|||||||
@@ -7,17 +7,17 @@ with lib; let
|
|||||||
cfg = config.home.desktop;
|
cfg = config.home.desktop;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./emoji.nix
|
|
||||||
./eww.nix
|
./eww.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./kdeconnect.nix
|
./kdeconnect.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./obs.nix
|
./obs.nix
|
||||||
./qt.nix
|
./qt.nix
|
||||||
|
./rofi
|
||||||
./swaync.nix
|
./swaync.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
|
./wlr-which-key.nix
|
||||||
./wlsunset.nix
|
./wlsunset.nix
|
||||||
./wofi.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
options.home.desktop.fullDesktop = mkEnableOption "Enable options for graphical environments";
|
options.home.desktop.fullDesktop = mkEnableOption "Enable options for graphical environments";
|
||||||
@@ -28,5 +28,7 @@ in {
|
|||||||
kitty.enable = mkDefault cfg.fullDesktop;
|
kitty.enable = mkDefault cfg.fullDesktop;
|
||||||
obs.enable = mkDefault cfg.fullDesktop;
|
obs.enable = mkDefault cfg.fullDesktop;
|
||||||
qt.enable = mkDefault cfg.fullDesktop;
|
qt.enable = mkDefault cfg.fullDesktop;
|
||||||
|
rofi.enable = mkDefault cfg.fullDesktop;
|
||||||
|
wlr-which-key.enable = mkDefault cfg.fullDesktop;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,13 +6,13 @@
|
|||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.home.desktop.hyprland;
|
cfg = config.home.desktop.hyprland;
|
||||||
rofi-emoji = import ../cli/scripts/rofi-emoji.nix {inherit pkgs;};
|
|
||||||
laptops = ["gampo"];
|
laptops = ["gampo"];
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./swaync.nix
|
./swaync.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
./wlsunset.nix
|
./wlsunset.nix
|
||||||
|
./hyprpaper.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.home.desktop.hyprland = {
|
options.home.desktop.hyprland = {
|
||||||
@@ -34,14 +34,16 @@ in {
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.desktop = {
|
home.desktop = {
|
||||||
|
hyprpaper.enable = true;
|
||||||
|
rofi.enable = mkDefault true;
|
||||||
swaync.enable = mkDefault true;
|
swaync.enable = mkDefault true;
|
||||||
waybar = {
|
waybar = {
|
||||||
enable = mkDefault true;
|
enable = mkDefault true;
|
||||||
battery = mkDefault (builtins.elem cfg.host laptops);
|
battery = mkDefault (builtins.elem cfg.host laptops);
|
||||||
};
|
};
|
||||||
wlsunset.enable = mkDefault true;
|
wlsunset.enable = mkDefault true;
|
||||||
wofi.enable = mkDefault true;
|
|
||||||
};
|
};
|
||||||
|
services.blueman-applet.enable = true;
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
@@ -112,11 +114,11 @@ in {
|
|||||||
$right = r
|
$right = r
|
||||||
$up = s
|
$up = s
|
||||||
$down = t
|
$down = t
|
||||||
$menu = ${pkgs.wofi}/bin/wofi --show drun
|
$menu = rofi -combi-modi drun,calc -show combi
|
||||||
|
|
||||||
bind = SUPER, Return, exec, ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux
|
bind = SUPER, Return, exec, ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux
|
||||||
bind = SUPER, Space, submap, leader
|
bind = SUPER, Space, exec, ${pkgs.wlr-which-key}/bin/wlr-which-key
|
||||||
bind = , Print, submap, screenshot
|
bind = , Print, exec, ${pkgs.wlr-which-key}/bin/wlr-which-key -k s
|
||||||
|
|
||||||
submap = leader
|
submap = leader
|
||||||
bind = , l, exec, plock
|
bind = , l, exec, plock
|
||||||
@@ -145,11 +147,13 @@ in {
|
|||||||
bind = , u, submap, reset
|
bind = , u, submap, reset
|
||||||
bind = , escape, submap, reset
|
bind = , escape, submap, reset
|
||||||
bind = CTRL, g, submap, reset
|
bind = CTRL, g, submap, reset
|
||||||
|
|
||||||
submap = buffers
|
submap = buffers
|
||||||
bind = , d, killactive,
|
bind = , d, killactive,
|
||||||
bind = , d, submap, reset
|
bind = , d, submap, reset
|
||||||
bind = , escape, submap, reset
|
bind = , escape, submap, reset
|
||||||
bind = CTRL, g, submap, reset
|
bind = CTRL, g, submap, reset
|
||||||
|
|
||||||
submap = resize
|
submap = resize
|
||||||
binde = , $left, resizeactive, -10 0
|
binde = , $left, resizeactive, -10 0
|
||||||
binde = , $right, resizeactive, 10 0
|
binde = , $right, resizeactive, 10 0
|
||||||
@@ -158,15 +162,21 @@ in {
|
|||||||
bind = , q, submap, reset
|
bind = , q, submap, reset
|
||||||
bind = , escape, submap, reset
|
bind = , escape, submap, reset
|
||||||
bind = CTRL, g, submap, reset
|
bind = CTRL, g, submap, reset
|
||||||
|
|
||||||
submap = rofi
|
submap = rofi
|
||||||
bind = , e, exec, ${rofi-emoji}/bin/rofi-emoji
|
bind = , b, exec, rofi-bluetooth
|
||||||
|
bind = , b, submap, reset
|
||||||
|
bind = , e, exec, rofi -show emoji
|
||||||
bind = , e, submap, reset
|
bind = , e, submap, reset
|
||||||
bind = , r, exec, $menu
|
bind = , r, exec, $menu
|
||||||
bind = , r, submap, reset
|
bind = , r, submap, reset
|
||||||
|
bind = , s, exec, rofi -show ssh
|
||||||
|
bind = , r, submap, reset
|
||||||
bind = , y, exec, ytplay
|
bind = , y, exec, ytplay
|
||||||
bind = , y, submap, reset
|
bind = , y, submap, reset
|
||||||
bind = , escape, submap, reset
|
bind = , escape, submap, reset
|
||||||
bind = CTRL, g, submap, reset
|
bind = CTRL, g, submap, reset
|
||||||
|
|
||||||
submap = screenshot
|
submap = screenshot
|
||||||
bind = , Print, exec, screenshot
|
bind = , Print, exec, screenshot
|
||||||
bind = , Print, submap, reset
|
bind = , Print, submap, reset
|
||||||
@@ -182,6 +192,7 @@ in {
|
|||||||
bind = Shift, s, submap, reset
|
bind = Shift, s, submap, reset
|
||||||
bind = , escape, submap, reset
|
bind = , escape, submap, reset
|
||||||
bind = CTRL, g, submap, reset
|
bind = CTRL, g, submap, reset
|
||||||
|
|
||||||
submap = windows
|
submap = windows
|
||||||
bind = , period, submap, resize
|
bind = , period, submap, resize
|
||||||
bind = , $left, movefocus, l
|
bind = , $left, movefocus, l
|
||||||
@@ -271,17 +282,5 @@ in {
|
|||||||
bind = SUPER_SHIFT, asterisk, movetoworkspace, 10
|
bind = SUPER_SHIFT, asterisk, movetoworkspace, 10
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services = {
|
|
||||||
blueman-applet.enable = true;
|
|
||||||
hyprpaper = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
ipc = "on";
|
|
||||||
splash = false;
|
|
||||||
preload = "/home/phundrak/Pictures/Wallpapers/nord/Nordic6.jpg";
|
|
||||||
wallpaper = ", /home/phundrak/Pictures/Wallpapers/nord/Nordic6.jpg";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
87
users/modules/desktop/hyprpaper.nix
Normal file
87
users/modules/desktop/hyprpaper.nix
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.home.desktop.hyprpaper;
|
||||||
|
in {
|
||||||
|
options.home.desktop.hyprpaper = {
|
||||||
|
enable = mkEnableOption "Enables Hyprpaper";
|
||||||
|
default = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/home/phundrak/Pictures/Wallpapers/nord/Nordic6.jpg";
|
||||||
|
example = "/home/user/image.jpg";
|
||||||
|
};
|
||||||
|
wallpapers-dir = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/home/phundrak/Pictures/Wallpapers/nord/";
|
||||||
|
example = "/home/user/Pictures/";
|
||||||
|
};
|
||||||
|
rotation-interval = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "5m";
|
||||||
|
example = "10m";
|
||||||
|
description = "Interval between wallpaper rotations";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.hyprpaper = {
|
||||||
|
inherit (cfg) enable;
|
||||||
|
settings = {
|
||||||
|
ipc = "on";
|
||||||
|
splash = false;
|
||||||
|
preload = cfg.default;
|
||||||
|
wallpaper = ", ${cfg.default}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user = {
|
||||||
|
services.hyprpaper-rotation = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Rotate Hyprpaper wallpaper";
|
||||||
|
After = "graphical-session.target";
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecCondition = "pidof Hyprland";
|
||||||
|
ExecStart = "${config.home.homeDirectory}/.config/hypr/hyprpaper-rotate.sh";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
timers.hyprpaper-rotation = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Timer for rotating Hyprpaper wallpaper";
|
||||||
|
};
|
||||||
|
Timer = {
|
||||||
|
OnBootSec = cfg.rotation-interval;
|
||||||
|
OnUnitActiveSec = cfg.rotation-interval;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = ["timers.target"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.file.".config/hypr/hyprpaper-rotate.sh" = {
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
WALLPAPER_DIR="${cfg.wallpapers-dir}"
|
||||||
|
|
||||||
|
# Find a random wallpaper
|
||||||
|
WP=$(find "$WALLPAPER_DIR" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) | shuf -n 1)
|
||||||
|
|
||||||
|
if [ -z "$WP" ]; then
|
||||||
|
echo "No wallpapers found in $WALLPAPER_DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Setting wallpaper to: $WP"
|
||||||
|
|
||||||
|
# Load and set the wallpaper
|
||||||
|
hyprctl hyprpaper preload "$WP" && hyprctl hyprpaper wallpaper ",$WP"
|
||||||
|
'';
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
107
users/modules/desktop/rofi/default.nix
Normal file
107
users/modules/desktop/rofi/default.nix
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.home.desktop.rofi;
|
||||||
|
inherit (config.lib.formats.rasi) mkLiteral;
|
||||||
|
in {
|
||||||
|
options.home.desktop.rofi = {
|
||||||
|
enable = mkEnableOption "Enable Rofi";
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [rofi-bluetooth];
|
||||||
|
programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs; [
|
||||||
|
rofi-calc
|
||||||
|
rofi-emoji
|
||||||
|
];
|
||||||
|
terminal = "${pkgs.kitty}/bin/kitty";
|
||||||
|
location = "center";
|
||||||
|
modes = ["drun" "emoji" "calc" "combi"];
|
||||||
|
extraConfig.show-icons = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
font = "Cascadia Code 14";
|
||||||
|
blur = true;
|
||||||
|
padding = mkLiteral "10px";
|
||||||
|
background-color = mkLiteral "transparent";
|
||||||
|
border-radius = mkLiteral "0px";
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
width = mkLiteral "1050px";
|
||||||
|
height = mkLiteral "625px";
|
||||||
|
location = mkLiteral "center";
|
||||||
|
blur = true;
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "3px";
|
||||||
|
border-color = mkLiteral "#61afef";
|
||||||
|
background-color = mkLiteral "transparent";
|
||||||
|
padding = mkLiteral "0px";
|
||||||
|
margin = mkLiteral "30px 50px";
|
||||||
|
};
|
||||||
|
mainbox = {
|
||||||
|
orientation = mkLiteral "horizontal";
|
||||||
|
children = map mkLiteral ["borderbox"];
|
||||||
|
spacing = mkLiteral "0px";
|
||||||
|
padding = mkLiteral "0px";
|
||||||
|
};
|
||||||
|
borderbox = {
|
||||||
|
orientation = mkLiteral "horizontal";
|
||||||
|
children = map mkLiteral ["imagebox" "contentbox"];
|
||||||
|
padding = mkLiteral "0px";
|
||||||
|
spacing = mkLiteral "0px";
|
||||||
|
border-radius = mkLiteral "3px";
|
||||||
|
};
|
||||||
|
contentbox = {
|
||||||
|
orientation = mkLiteral "vertical";
|
||||||
|
children = map mkLiteral ["entry" "listview"];
|
||||||
|
spacing = mkLiteral "0px";
|
||||||
|
padding = mkLiteral "0px";
|
||||||
|
expand = true;
|
||||||
|
};
|
||||||
|
imagebox = {
|
||||||
|
background-image = mkLiteral "url(\"${./image.jpg}\")";
|
||||||
|
background-repeat = false;
|
||||||
|
size = mkLiteral "200px 625px";
|
||||||
|
};
|
||||||
|
element = {
|
||||||
|
border-radius = mkLiteral "0px";
|
||||||
|
};
|
||||||
|
"element-text, element-icon" = {
|
||||||
|
padding = mkLiteral "6px 8px";
|
||||||
|
spacing = mkLiteral "2px";
|
||||||
|
text-color = mkLiteral "#fab387";
|
||||||
|
};
|
||||||
|
"element selected" = {
|
||||||
|
background-color = mkLiteral "#191919";
|
||||||
|
text-color = mkLiteral "#e5c07b";
|
||||||
|
border-radius = mkLiteral "3px";
|
||||||
|
};
|
||||||
|
prompt = {
|
||||||
|
enabled = false;
|
||||||
|
background-color = mkLiteral "transparent";
|
||||||
|
text-color = mkLiteral "#61afef";
|
||||||
|
padding = mkLiteral "5px 10px";
|
||||||
|
};
|
||||||
|
entry = {
|
||||||
|
padding = mkLiteral "8px";
|
||||||
|
expand = false;
|
||||||
|
font = "Cascadia Code 14";
|
||||||
|
text-color = mkLiteral "#fab387";
|
||||||
|
border-radius = mkLiteral "0px 3px 0px 0px";
|
||||||
|
background-color = mkLiteral "#292e36";
|
||||||
|
};
|
||||||
|
listview = {
|
||||||
|
lines = mkLiteral "1";
|
||||||
|
background-color = mkLiteral "rgba(46, 52, 64, 0.8)";
|
||||||
|
border-radius = mkLiteral "0px 0px 3px 0px";
|
||||||
|
padding = mkLiteral "5px";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
users/modules/desktop/rofi/image.jpg
Normal file
BIN
users/modules/desktop/rofi/image.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 228 KiB |
189
users/modules/desktop/wlr-which-key.nix
Normal file
189
users/modules/desktop/wlr-which-key.nix
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit
|
||||||
|
(lib)
|
||||||
|
literalExpression
|
||||||
|
mkIf
|
||||||
|
mkOption
|
||||||
|
mkEnableOption
|
||||||
|
types
|
||||||
|
;
|
||||||
|
cfg = config.home.desktop.wlr-which-key;
|
||||||
|
yamlFormat = pkgs.formats.yaml {};
|
||||||
|
|
||||||
|
# Convert kebab-case to snake_case
|
||||||
|
toSnakeCase = str: builtins.replaceStrings ["-"] ["_"] str;
|
||||||
|
|
||||||
|
# Recursively filter out null values and convert kebab-case keys to snake_case
|
||||||
|
filterNulls = value:
|
||||||
|
if lib.isAttrs value
|
||||||
|
then lib.mapAttrs' (n: v: lib.nameValuePair (toSnakeCase n) (filterNulls v)) (lib.filterAttrs (n: v: v != null) value)
|
||||||
|
else if lib.isList value
|
||||||
|
then map filterNulls value
|
||||||
|
else value;
|
||||||
|
menuEntryType = types.submodule {
|
||||||
|
freeformType = yamlFormat.type;
|
||||||
|
options = with types; {
|
||||||
|
key = mkOption {
|
||||||
|
type = str;
|
||||||
|
example = "p";
|
||||||
|
};
|
||||||
|
desc = mkOption {
|
||||||
|
type = str;
|
||||||
|
example = "Power";
|
||||||
|
};
|
||||||
|
cmd = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "echo example";
|
||||||
|
};
|
||||||
|
keep-open = mkOption {
|
||||||
|
type = nullOr bool;
|
||||||
|
default = null;
|
||||||
|
example = true;
|
||||||
|
};
|
||||||
|
submenu = mkOption {
|
||||||
|
type = nullOr (listOf menuEntryType);
|
||||||
|
default = null;
|
||||||
|
example = literalExpression ''
|
||||||
|
[
|
||||||
|
{ key = "s"; desc = "Suspend"; cmd = "systemctl suspend"; }
|
||||||
|
{ key = "r"; desc = "Reboot"; cmd = "systemctl reboot"; }
|
||||||
|
{ key = "o"; desc = "Poweroff"; cmd = "systemctl poweroff"; }
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
settingsType = types.submodule {
|
||||||
|
freeformType = yamlFormat.type;
|
||||||
|
options = with types; {
|
||||||
|
background = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "#282828FF";
|
||||||
|
};
|
||||||
|
color = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "#FBF1C7FF";
|
||||||
|
};
|
||||||
|
border = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "#8EC07CFF";
|
||||||
|
};
|
||||||
|
anchor = mkOption {
|
||||||
|
type = nullOr (enum ["center" "top" "bottom" "left" "right" "top-left" "top-right" "bottom-left" "bottom-right"]);
|
||||||
|
default = null;
|
||||||
|
example = "top-left";
|
||||||
|
};
|
||||||
|
margin-top = mkOption {
|
||||||
|
type = nullOr int;
|
||||||
|
default = null;
|
||||||
|
example = "0";
|
||||||
|
};
|
||||||
|
margin-right = mkOption {
|
||||||
|
type = nullOr int;
|
||||||
|
default = null;
|
||||||
|
example = "0";
|
||||||
|
};
|
||||||
|
margin-bottom = mkOption {
|
||||||
|
type = nullOr int;
|
||||||
|
default = null;
|
||||||
|
example = "0";
|
||||||
|
};
|
||||||
|
margin-left = mkOption {
|
||||||
|
type = nullOr int;
|
||||||
|
default = null;
|
||||||
|
example = "0";
|
||||||
|
};
|
||||||
|
font = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "monospace 10";
|
||||||
|
};
|
||||||
|
separator = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = " ➜ ";
|
||||||
|
};
|
||||||
|
border-width = mkOption {
|
||||||
|
type = nullOr (either float int);
|
||||||
|
default = null;
|
||||||
|
example = 4.0;
|
||||||
|
};
|
||||||
|
corder-r = mkOption {
|
||||||
|
type = nullOr (either float int);
|
||||||
|
default = null;
|
||||||
|
example = 20.0;
|
||||||
|
};
|
||||||
|
padding = mkOption {
|
||||||
|
type = nullOr (either float int);
|
||||||
|
default = null;
|
||||||
|
example = 15.0;
|
||||||
|
};
|
||||||
|
rows-per-column = mkOption {
|
||||||
|
type = nullOr int;
|
||||||
|
default = null;
|
||||||
|
example = 5;
|
||||||
|
};
|
||||||
|
column-padding = mkOption {
|
||||||
|
type = nullOr (either float int);
|
||||||
|
default = null;
|
||||||
|
example = 25.0;
|
||||||
|
};
|
||||||
|
inhibit-compositor-keyboard-shortcuts = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
};
|
||||||
|
auto_kbd_layout = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
};
|
||||||
|
namespace = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
example = "wlr_which_key";
|
||||||
|
};
|
||||||
|
menu = mkOption {
|
||||||
|
type = listOf menuEntryType;
|
||||||
|
default = [];
|
||||||
|
example = literalExpression ''
|
||||||
|
[
|
||||||
|
{
|
||||||
|
key = "p";
|
||||||
|
desc = "Power";
|
||||||
|
submenu = [
|
||||||
|
{ key = "s"; desc = "Suspend"; cmd = "systemctl suspend"; }
|
||||||
|
{ key = "r"; desc = "Reboot"; cmd = "systemctl reboot"; }
|
||||||
|
{ key = "o"; desc = "Poweroff"; cmd = "systemctl poweroff"; }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
options.home.desktop.wlr-which-key = {
|
||||||
|
enable = mkEnableOption "Enables wlr-which-key";
|
||||||
|
package = lib.mkPackageOption pkgs "wlr-which-key" {};
|
||||||
|
settings = mkOption {
|
||||||
|
type = settingsType;
|
||||||
|
default = {};
|
||||||
|
description = "Configuration written to {file}`$XDG_CONFIG_HOME/wlr-which-key/config.yaml`.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
xdg.configFile = {
|
||||||
|
"wlr-which-key/config.yaml".source = yamlFormat.generate "wlr-which-key-config.yml" (filterNulls cfg.settings);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.home.desktop.wofi;
|
|
||||||
in {
|
|
||||||
options.home.desktop.wofi.enable = mkEnableOption "Enable wofi support";
|
|
||||||
config.programs.wofi = mkIf cfg.enable {
|
|
||||||
inherit (cfg) enable;
|
|
||||||
settings = {
|
|
||||||
modi = "ssh,drun,combi";
|
|
||||||
sidebar-mode = false;
|
|
||||||
width = 50;
|
|
||||||
line-margin = 10;
|
|
||||||
lines = 6;
|
|
||||||
columns = 2;
|
|
||||||
display-ssh = "";
|
|
||||||
display-run = "";
|
|
||||||
display-drun = "";
|
|
||||||
display-window = "";
|
|
||||||
display-combi = "";
|
|
||||||
show-icons = true;
|
|
||||||
};
|
|
||||||
# from https://github.com/alxndr13/wofi-nord-theme
|
|
||||||
style = ''
|
|
||||||
* {
|
|
||||||
font-family: "Hack", monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
window {
|
|
||||||
background-color: #3B4252;
|
|
||||||
}
|
|
||||||
|
|
||||||
#input {
|
|
||||||
margin: 5px;
|
|
||||||
border-radius: 0px;
|
|
||||||
border: none;
|
|
||||||
background-color: #3B4252;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#inner-box {
|
|
||||||
background-color: #383C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
#outer-box {
|
|
||||||
margin: 2px;
|
|
||||||
padding: 10px;
|
|
||||||
background-color: #383C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
#scroll {
|
|
||||||
margin: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#text {
|
|
||||||
padding: 4px;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry:nth-child(even){
|
|
||||||
background-color: #404552;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry:selected {
|
|
||||||
background-color: #4C566A;
|
|
||||||
}
|
|
||||||
|
|
||||||
#text:selected {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -6,10 +6,11 @@
|
|||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
emacsDefaultPackage = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages (
|
emacsDefaultPackage = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages (
|
||||||
epkgs: [
|
epkgs:
|
||||||
epkgs.mu4e
|
with epkgs; [
|
||||||
epkgs.pdf-tools
|
mu4e
|
||||||
]
|
pdf-tools
|
||||||
|
]
|
||||||
));
|
));
|
||||||
cfg = config.home.dev.editors.emacs;
|
cfg = config.home.dev.editors.emacs;
|
||||||
in {
|
in {
|
||||||
@@ -25,7 +26,10 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.packages = [pkgs.emacs-all-the-icons-fonts];
|
home.packages = with pkgs; [
|
||||||
|
emacs-all-the-icons-fonts
|
||||||
|
emacs-lsp-booster
|
||||||
|
];
|
||||||
programs.emacs = mkIf cfg.enable {
|
programs.emacs = mkIf cfg.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit (cfg) package;
|
inherit (cfg) package;
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ in {
|
|||||||
enable = mkEnableOption "enables signing jj commits";
|
enable = mkEnableOption "enables signing jj commits";
|
||||||
sshKey = mkOption {
|
sshKey = mkOption {
|
||||||
type = with types; nullOr (either path str);
|
type = with types; nullOr (either path str);
|
||||||
example = "~/.ssh/id_ed25519.pub";
|
example = "~/.ssh/id_ed25519";
|
||||||
default = "~/.ssh/id_ed25519.pub";
|
default = "~/.ssh/id_ed25519";
|
||||||
description = "Path to the public SSH key or its content.";
|
description = "Path to the private SSH key for signing.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -54,8 +54,8 @@ in {
|
|||||||
behavior = "own";
|
behavior = "own";
|
||||||
backend = "ssh";
|
backend = "ssh";
|
||||||
key = cfg.signing.sshKey;
|
key = cfg.signing.sshKey;
|
||||||
backends."ssh.allowed-signers" = "~/.ssh/allowed_signers";
|
backends.ssh.allowed-signers = "${config.home.homeDirectory}/.ssh/allowed_signers";
|
||||||
backends."ssh.program" = "${pkgs.openssh}/bin/ssh-keygen";
|
backends.ssh.program = "${pkgs.openssh}/bin/ssh-keygen";
|
||||||
};
|
};
|
||||||
aliases = {
|
aliases = {
|
||||||
blame = ["file" "annotate"];
|
blame = ["file" "annotate"];
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
Sent from GNU/Emacs
|
Sent from GNU/Emacs
|
||||||
|
|
||||||
*** Sauvez un arbre, mangez un castor ***
|
@@@ Sauvez un arbre, mangez un castor @@@
|
||||||
*** Save a tree, eat a beaver ***
|
@@@ Save a tree, eat a beaver @@@
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
home.file.".signature" = {
|
home.file.".signature" = {
|
||||||
|
|||||||
@@ -1,21 +1,49 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./light-home.nix
|
./light-home.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./email.nix
|
./email.nix
|
||||||
|
./wlr-which-key
|
||||||
../modules
|
../modules
|
||||||
];
|
];
|
||||||
|
|
||||||
config = let
|
config = let
|
||||||
emacsPkg = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages (
|
emacsPackage = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages (
|
||||||
epkgs: [
|
epkgs:
|
||||||
epkgs.mu4e
|
with epkgs; [
|
||||||
epkgs.pdf-tools
|
mu4e
|
||||||
]
|
pdf-tools
|
||||||
|
tree-sitter
|
||||||
|
tree-sitter-langs
|
||||||
|
(treesit-grammars.with-grammars (grammar:
|
||||||
|
with grammar; [
|
||||||
|
tree-sitter-bash
|
||||||
|
tree-sitter-c
|
||||||
|
tree-sitter-cpp
|
||||||
|
tree-sitter-css
|
||||||
|
tree-sitter-dockerfile
|
||||||
|
tree-sitter-http
|
||||||
|
tree-sitter-javascript
|
||||||
|
tree-sitter-jsdoc
|
||||||
|
tree-sitter-json
|
||||||
|
tree-sitter-just
|
||||||
|
tree-sitter-markdown
|
||||||
|
tree-sitter-markdown-inline
|
||||||
|
tree-sitter-nix
|
||||||
|
tree-sitter-rust
|
||||||
|
tree-sitter-sql
|
||||||
|
tree-sitter-toml
|
||||||
|
tree-sitter-typescript
|
||||||
|
tree-sitter-typst
|
||||||
|
tree-sitter-vue
|
||||||
|
tree-sitter-yaml
|
||||||
|
]))
|
||||||
|
]
|
||||||
));
|
));
|
||||||
askpass = import ../modules/cli/scripts/askpass.nix {inherit pkgs;};
|
askpass = import ../modules/cli/scripts/askpass.nix {inherit pkgs;};
|
||||||
launchWithEmacsclient = import ../modules/cli/scripts/launch-with-emacsclient.nix {
|
launchWithEmacsclient = import ../modules/cli/scripts/launch-with-emacsclient.nix {
|
||||||
@@ -30,18 +58,34 @@
|
|||||||
|
|
||||||
home = {
|
home = {
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
EDITOR = "${emacsPkg}/bin/emacsclient -c -a ${emacsPkg}/bin/emacs";
|
EDITOR = "${config.home.dev.editors.emacs.package}/bin/emacsclient -c -a ${config.home.dev.editors.emacs.package}/bin/emacs";
|
||||||
LAUNCH_EDITOR = "${launchWithEmacsclient}/bin/launch-with-emacsclient";
|
LAUNCH_EDITOR = "${launchWithEmacsclient}/bin/launch-with-emacsclient";
|
||||||
SUDO_ASKPASS = "${askpass}/bin/askpass";
|
SUDO_ASKPASS = "${askpass}/bin/askpass";
|
||||||
LSP_USE_PLISTS = "true";
|
LSP_USE_PLISTS = "true";
|
||||||
};
|
};
|
||||||
|
|
||||||
desktop.waybar.style = ./config/waybar/style.css;
|
desktop.waybar.style = ./config/waybar/style.css;
|
||||||
dev.ai.claude.enable = true;
|
dev = {
|
||||||
|
ai.claude.enable = true;
|
||||||
|
editors.emacs.package = emacsPackage;
|
||||||
|
vcs.jj.signing.enable = true;
|
||||||
|
};
|
||||||
fullDesktop = true;
|
fullDesktop = true;
|
||||||
shell.fish.enable = true;
|
file."${config.home.homeDirectory}/.ssh/allowed_signers" = {
|
||||||
|
enable = true;
|
||||||
|
text = lib.strings.join "\n" (
|
||||||
|
map (file: let
|
||||||
|
content = lib.strings.trim (builtins.readFile file);
|
||||||
|
parts = lib.strings.splitString " " content;
|
||||||
|
email = lib.lists.last parts;
|
||||||
|
in "${email} namespaces=\"git\" ${content}")
|
||||||
|
(lib.filesystem.listFilesRecursive ../../keys)
|
||||||
|
);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
manual.html.enable = true;
|
manual = {
|
||||||
|
html.enable = true;
|
||||||
|
manpages.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
4
users/phundrak/wlr-which-key/center-window.nix
Normal file
4
users/phundrak/wlr-which-key/center-window.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{pkgs, ...}:
|
||||||
|
pkgs.writeShellScriptBin "center-window" ''
|
||||||
|
pidof -x Hyprland && hyprctl dispatch centerwindow
|
||||||
|
''
|
||||||
4
users/phundrak/wlr-which-key/close-window.nix
Normal file
4
users/phundrak/wlr-which-key/close-window.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{pkgs, ...}:
|
||||||
|
pkgs.writeShellScriptBin "close-window" ''
|
||||||
|
pidof -x Hyprland && hyprctl dispatch killactive
|
||||||
|
''
|
||||||
221
users/phundrak/wlr-which-key/default.nix
Normal file
221
users/phundrak/wlr-which-key/default.nix
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config.home.desktop.wlr-which-key.settings = {
|
||||||
|
font = "Cascadia Code 12";
|
||||||
|
background = "#3b4252d0";
|
||||||
|
color = "#eceff4";
|
||||||
|
border = "#2e3440";
|
||||||
|
border_width = 2;
|
||||||
|
corner_r = 10;
|
||||||
|
rows_per_column = 5;
|
||||||
|
column_padding = 25;
|
||||||
|
inhibit_compositor_keyboard_shortcuts = true;
|
||||||
|
auto_kbd_layout = true;
|
||||||
|
menu = let
|
||||||
|
left = "c";
|
||||||
|
down = "t";
|
||||||
|
up = "s";
|
||||||
|
right = "r";
|
||||||
|
center-window = import ./center-window.nix {inherit pkgs;};
|
||||||
|
close-window = import ./close-window.nix {inherit pkgs;};
|
||||||
|
float-window = import ./float-window.nix {inherit pkgs;};
|
||||||
|
focus-urgent = import ./focus-urgent.nix {inherit pkgs;};
|
||||||
|
fullscreen = import ./fullscreen.nix {inherit pkgs;};
|
||||||
|
ytplay = import ../../modules/cli/scripts/ytplay.nix {inherit pkgs;};
|
||||||
|
in [
|
||||||
|
{
|
||||||
|
key = "a";
|
||||||
|
desc = "Apps";
|
||||||
|
submenu = [
|
||||||
|
{
|
||||||
|
key = "b";
|
||||||
|
desc = "Browser";
|
||||||
|
cmd = "zen";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "B";
|
||||||
|
desc = "Qutebrowser";
|
||||||
|
cmd = "${pkgs.qutebrowser}/bin/qutebrowser";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "d";
|
||||||
|
desc = "Discord";
|
||||||
|
cmd = "${pkgs.vesktop}/bin/vesktop";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "e";
|
||||||
|
desc = "Emacs";
|
||||||
|
cmd = "${config.home.dev.editors.emacs.package}/bin/emacsclient -c -n";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "g";
|
||||||
|
desc = "Gimp";
|
||||||
|
cmd = "${pkgs.gimp}/bin/gimp";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "n";
|
||||||
|
desc = "Nemo";
|
||||||
|
cmd = "${pkgs.nemo}/bin/nemo";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "N";
|
||||||
|
desc = "Nextcloud";
|
||||||
|
cmd = "${pkgs.nextcloud-client}/bin/nextcloud";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "r";
|
||||||
|
desc = "Rofi";
|
||||||
|
submenu = [
|
||||||
|
{
|
||||||
|
key = "b";
|
||||||
|
desc = "Bluetooth";
|
||||||
|
cmd = "${pkgs.rofi-bluetooth}/bin/rofi-bluetooth";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "e";
|
||||||
|
desc = "Emoji";
|
||||||
|
cmd = "rofi -show emoji";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "r";
|
||||||
|
desc = "App Menu";
|
||||||
|
cmd = "rofi -combi-modi drun,calc -show combi";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "s";
|
||||||
|
desc = "SSH";
|
||||||
|
cmd = "rofi -show ssh";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "y";
|
||||||
|
desc = "YouTube";
|
||||||
|
cmd = "${ytplay}/bin/ytplay";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "b";
|
||||||
|
desc = "Buffers";
|
||||||
|
submenu = [
|
||||||
|
{
|
||||||
|
key = "c";
|
||||||
|
desc = "Center";
|
||||||
|
cmd = "${center-window}/bin/center-window";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "d";
|
||||||
|
desc = "Close";
|
||||||
|
cmd = "${close-window}/bin/close-window";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "f";
|
||||||
|
desc = "Fullscreen";
|
||||||
|
cmd = "${fullscreen}/bin/fullscreen";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "F";
|
||||||
|
desc = "Float";
|
||||||
|
cmd = "${float-window}/bin/float-window";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "u";
|
||||||
|
desc = "Urgent";
|
||||||
|
cmd = "${focus-urgent}/bin/focus-urgent";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = ".";
|
||||||
|
desc = "Resize";
|
||||||
|
submenu = [
|
||||||
|
{
|
||||||
|
key = left;
|
||||||
|
desc = "Decrease Width";
|
||||||
|
cmd = "echo decrease width";
|
||||||
|
keep-open = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = down;
|
||||||
|
desc = "Increase Height";
|
||||||
|
cmd = "echo decrease height";
|
||||||
|
keep-open = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = up;
|
||||||
|
desc = "Decrease Height";
|
||||||
|
cmd = "echo decrease height";
|
||||||
|
keep-open = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = right;
|
||||||
|
desc = "Increase Width";
|
||||||
|
cmd = "echo increase width";
|
||||||
|
keep-open = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "p";
|
||||||
|
desc = "Power";
|
||||||
|
submenu = [
|
||||||
|
{
|
||||||
|
key = "s";
|
||||||
|
desc = "Suspend";
|
||||||
|
cmd = "systemctl suspend";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "r";
|
||||||
|
desc = "Reboot";
|
||||||
|
cmd = "systemctl reboot";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "o";
|
||||||
|
desc = "Poweroff";
|
||||||
|
cmd = "systemctl poweroff";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "s";
|
||||||
|
desc = "Screenshots";
|
||||||
|
submenu = [
|
||||||
|
{
|
||||||
|
key = "Print";
|
||||||
|
desc = "Screenshot";
|
||||||
|
cmd = "screenshot";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "d";
|
||||||
|
desc = "Delayed";
|
||||||
|
cmd = "screenshot -d 3";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "D";
|
||||||
|
desc = "Select, Delay, Edit, and Copy";
|
||||||
|
cmd = "screenshot -secd 3";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "e";
|
||||||
|
desc = "Select, Edit, and Copy";
|
||||||
|
cmd = "screenshot -sec";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "g";
|
||||||
|
desc = "Select, Gimp, and Copy";
|
||||||
|
cmd = "screenshot -sgc";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "s";
|
||||||
|
desc = "Select and Copy";
|
||||||
|
cmd = "screenshot -sc";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
5
users/phundrak/wlr-which-key/float-window.nix
Normal file
5
users/phundrak/wlr-which-key/float-window.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{pkgs, ...}:
|
||||||
|
pkgs.writeShellScriptBin "float" ''
|
||||||
|
pidof -x Hyprland && hyprctl dispatch togglefloating
|
||||||
|
echo test
|
||||||
|
''
|
||||||
4
users/phundrak/wlr-which-key/focus-urgent.nix
Normal file
4
users/phundrak/wlr-which-key/focus-urgent.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{pkgs, ...}:
|
||||||
|
pkgs.writeShellScriptBin "focus-urgent" ''
|
||||||
|
pidof -x Hyprland && hyprctl dispatch focusurgentorlast
|
||||||
|
''
|
||||||
4
users/phundrak/wlr-which-key/fullscreen.nix
Normal file
4
users/phundrak/wlr-which-key/fullscreen.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{pkgs, ...}:
|
||||||
|
pkgs.writeShellScriptBin "fullscreen" ''
|
||||||
|
pidof -x Hyprland && hyprctl dispatch fullscreen
|
||||||
|
''
|
||||||
Reference in New Issue
Block a user