Compare commits

...

9 Commits

Author SHA1 Message Date
faba8b6abe Cleanup 2024-12-24 16:46:55 +01:00
a424a7d1a3 hyprland cleanup and fixes 2024-12-24 16:46:31 +01:00
59413dd08f rofi clipboard added 2024-12-24 16:37:05 +01:00
1468d5fa1b waybar firefox fix 2024-12-24 13:25:12 +01:00
1dafa64d23 stylix icon pack 2024-12-23 21:45:25 +01:00
938a72ce9e Sops, security 2024-12-23 21:09:16 +01:00
2540cb9dd5 Tinkered some configs 2024-12-23 21:08:15 +01:00
810eb43783 System update 2024-12-23 21:06:49 +01:00
836627be8e System update & Sops 2024-12-23 14:01:30 +01:00
18 changed files with 492 additions and 128 deletions

121
config/clipboard.rasi Normal file
View File

@ -0,0 +1,121 @@
// Config //
configuration {
modi: "drun";
show-icons: false;
}
* {
main-bg : #11111be6;
main-fg : #cdd6f4ff;
main-br : #cba6f7ff;
main-ex : #f5e0dcff;
select-bg : #b4befeff;
select-fg : #11111bff;
separatorcolor : transparent;
border-color : transparent;
}
// Main //
window {
width: 23em;
height: 30em;
transparency: "real";
fullscreen: false;
enabled: true;
cursor: "default";
spacing: 0em;
padding: 0em;
border-color: @main-br;
background-color: @main-bg;
}
mainbox {
enabled: true;
spacing: 0em;
padding: 0.5em;
orientation: vertical;
children: [ "wallbox" , "listbox" ];
background-color: transparent;
}
wallbox {
spacing: 0em;
padding: 0em;
expand: false;
orientation: horizontal;
background-color: transparent;
background-image: url("~/dotfiles/config/backgrounds/aurora_borealis.png", width);
children: [ "wallframe" , "inputbar" ];
}
wallframe {
width: 5em;
spacing: 0em;
padding: 0em;
expand: false;
background-color: @main-bg;
background-image: url("~/dotfiles/config/backgrounds/aurora_borealis.png", width);
}
// Inputs //
inputbar {
enabled: true;
padding: 0em;
children: [ "entry" ];
background-color: @main-bg;
expand: true;
}
entry {
enabled: true;
padding: 1.8em;
text-color: @main-fg;
background-color: transparent;
}
// Lists //
listbox {
spacing: 0em;
padding: 0em;
orientation: vertical;
children: [ "dummy" , "listview" , "dummy" ];
background-color: transparent;
}
listview {
enabled: true;
padding: 0.5em;
columns: 1;
lines: 11;
cycle: true;
fixed-height: true;
fixed-columns: false;
expand: false;
cursor: "default";
background-color: transparent;
text-color: @main-fg;
}
dummy {
spacing: 0em;
padding: 0em;
background-color: transparent;
}
// Elements //
element {
enabled: true;
padding: 0.5em;
cursor: pointer;
background-color: transparent;
text-color: @main-fg;
}
element selected.normal {
background-color: @select-bg;
text-color: @select-fg;
}
element-text {
vertical-align: 0.0;
horizontal-align: 0.0;
cursor: inherit;
background-color: transparent;
text-color: inherit;
}

View File

@ -20,11 +20,11 @@
]
},
"locked": {
"lastModified": 1731959031,
"narHash": "sha256-TGcvIjftziC1CjuiHCzrYDwmOoSFYIhdiKmLetzB5L0=",
"lastModified": 1734906446,
"narHash": "sha256-6OWluVE2A8xi+8V3jN9KA72RCgJjYdyyuLBUjxZ2q2U=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "4468981c1c50999f315baa1508f0e53c4ee70c52",
"rev": "eecb74dc79bb6752a2a507e6edee3042390a6091",
"type": "github"
},
"original": {
@ -108,11 +108,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1734062601,
"narHash": "sha256-xdFJkNGNMEJGLujqok0VqZV+gpbQrnHmKeQwpYM7nwE=",
"lastModified": 1734943800,
"narHash": "sha256-T6tJ1fGRcVksmRqbDRsvYD3Qnw8AU3e2j0Im01twFcI=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "f7455e6750b5691e7357908676c810cb4e285dc3",
"rev": "2c702b4a038306dce64a90fc011c92ebabb82f63",
"type": "gitlab"
},
"original": {
@ -268,11 +268,11 @@
]
},
"locked": {
"lastModified": 1734043726,
"narHash": "sha256-e9YAMReFV1fDPcZLFC2pa4k/8TloSXeX0z2VysNMAoA=",
"lastModified": 1734944412,
"narHash": "sha256-36QfCAl8V6nMIRUCgiC79VriJPUXXkHuR8zQA1vAtSU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3066cc58f552421a2c5414e78407fa5603405b1e",
"rev": "8264bfe3a064d704c57df91e34b795b6ac7bad9e",
"type": "github"
},
"original": {
@ -318,11 +318,11 @@
]
},
"locked": {
"lastModified": 1728669738,
"narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=",
"lastModified": 1734906540,
"narHash": "sha256-vQ/L9hZFezC0LquLo4TWXkyniWtYBlFHAKIsDc7PYJE=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "0264e698149fcb857a66a53018157b41f8d97bb0",
"rev": "69270ba8f057d55b0e6c2dca0e165d652856e613",
"type": "github"
},
"original": {
@ -347,11 +347,11 @@
]
},
"locked": {
"lastModified": 1733248371,
"narHash": "sha256-FFLJzFTyNhS7tBEEECx0B8Ye/bpmxhFVEKlECgMLc6c=",
"lastModified": 1734906236,
"narHash": "sha256-vH/ysV2ONGQgYZPtcJKwc8jJivzyVxru2aaOxC20ZOE=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "cc95e5babc6065bc3ab4cd195429a9900836ef13",
"rev": "6dea3fba08fd704dd624b6d4b261638fb4003c9c",
"type": "github"
},
"original": {
@ -378,11 +378,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1734005819,
"narHash": "sha256-hbA0aFybdxjpu4Tr4xH57mOLjRMqcop6iBVA0ZFIIx4=",
"lastModified": 1734907157,
"narHash": "sha256-sF3Wot4jIemoSo0YigdHyoR5JMaXgKja+mPJGoXXk/k=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "aefaeedf5e3f773c923373795267c1633141566c",
"rev": "5f7ad767dbf0bac9ddd6bf6c825fb9ed7921308a",
"type": "github"
},
"original": {
@ -432,11 +432,11 @@
]
},
"locked": {
"lastModified": 1733472316,
"narHash": "sha256-PvXiFLIExJEJj+goLbIuXLTN5CSDSAUsAfiYSdbbWg0=",
"lastModified": 1734906472,
"narHash": "sha256-pWPRv/GA/X/iAwoE6gMNUqn/ZeJX1IeLPRpZI0tTPK0=",
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"rev": "969427419276c7ee170301ef1ebe0f68eb6eb2e2",
"rev": "c77109d7e1ddbcdb87cafd32ce411f76328ae152",
"type": "github"
},
"original": {
@ -461,11 +461,11 @@
]
},
"locked": {
"lastModified": 1728168612,
"narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
"lastModified": 1734906259,
"narHash": "sha256-P79t/7HbACO4/PuJBroGpTptvCWJtXTv+gWsF+sM6MI=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
"rev": "0404833ea18d543df44df935ebf1b497310eb046",
"type": "github"
},
"original": {
@ -486,11 +486,11 @@
]
},
"locked": {
"lastModified": 1732288281,
"narHash": "sha256-XTU9B53IjGeJiJ7LstOhuxcRjCOFkQFl01H78sT9Lg4=",
"lastModified": 1734796073,
"narHash": "sha256-TnuKsa8OHrSJEmHm3TLGOWbPNA1gRjmZLsRzKrCqOsg=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "b26f33cc1c8a7fd5076e19e2cce3f062dca6351c",
"rev": "c3331116ebd0b71df5ae8c6efe9a7f94148b03bf",
"type": "github"
},
"original": {
@ -511,11 +511,11 @@
]
},
"locked": {
"lastModified": 1726874836,
"narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"lastModified": 1734793513,
"narHash": "sha256-rrrHcXapXJvGFqX+L/Bb0182L25jofAZ0fm1FInvrTQ=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"rev": "4d7367b6eee87397e2dbca2e78078dd0a4ef4c61",
"type": "github"
},
"original": {
@ -531,11 +531,11 @@
]
},
"locked": {
"lastModified": 1733733360,
"narHash": "sha256-q6pp7uqkAxbsENjJr2U7vPVEoLX0m7ouCTBg/0J5v3g=",
"lastModified": 1734943676,
"narHash": "sha256-j82D0J4XkteyE/nJ+Wn+9eSdnM5RXz+1vWR3XvRN7nY=",
"owner": "Mic92",
"repo": "nix-ld",
"rev": "0c74021f8e3779a68684e893a5fb9a72078d5e18",
"rev": "76cbe0384ce6be86cba9310f617ad3abecc7f67b",
"type": "github"
},
"original": {
@ -546,11 +546,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1733940404,
"narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=",
"lastModified": 1734649271,
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
"type": "github"
},
"original": {
@ -578,11 +578,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1733808091,
"narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=",
"lastModified": 1734875076,
"narHash": "sha256-Pzyb+YNG5u3zP79zoi8HXYMs15Q5dfjDgwCdUI5B0nY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e",
"rev": "1807c2b91223227ad5599d7067a61665c52d1295",
"type": "github"
},
"original": {
@ -626,11 +626,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1733318908,
"narHash": "sha256-SVQVsbafSM1dJ4fpgyBqLZ+Lft+jcQuMtEL3lQWx2Sk=",
"lastModified": 1734797603,
"narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "6f4e2a2112050951a314d2733a994fbab94864c6",
"rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498",
"type": "github"
},
"original": {
@ -648,10 +648,31 @@
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable_2",
"plasma-manager": "plasma-manager",
"sops-nix": "sops-nix",
"spicetify-nix": "spicetify-nix",
"stylix": "stylix"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1734546875,
"narHash": "sha256-6OvJbqQ6qPpNw3CA+W8Myo5aaLhIJY/nNFDk3zMXLfM=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "ed091321f4dd88afc28b5b4456e0a15bd8374b4d",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
},
"spicetify-nix": {
"inputs": {
"flake-compat": "flake-compat_2",
@ -660,11 +681,11 @@
]
},
"locked": {
"lastModified": 1734063436,
"narHash": "sha256-wE1sIAnsjWbyXXjwC/+oxSFXFDCROiwLY1pSQ7pU9js=",
"lastModified": 1734927365,
"narHash": "sha256-xuYqPNPPsmb5djiU4odmyTidFQC3TeLe814ubuvXJo4=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
"rev": "7981c1e87aa1adeec524524db52f75bf6598fb55",
"rev": "678dd4c5c2957f1f359a329ef00e17cbd273bd50",
"type": "github"
},
"original": {
@ -692,11 +713,11 @@
"tinted-tmux": "tinted-tmux"
},
"locked": {
"lastModified": 1734012548,
"narHash": "sha256-72z7fZNeFtG+UWmbMn5by4K47HHBxk3JtV91D/qZEhg=",
"lastModified": 1734885904,
"narHash": "sha256-NxA4JnLuXyle2/nUKDbW8vORwSd+Z20limIl7DhlZbs=",
"owner": "danth",
"repo": "stylix",
"rev": "ccee633284cde8a9f825004e00dd84a31b10e6c6",
"rev": "4d87b96ceca38532f39c1b7efd8a9235bfcee3d6",
"type": "github"
},
"original": {
@ -813,11 +834,11 @@
]
},
"locked": {
"lastModified": 1733157064,
"narHash": "sha256-NetqJHAN4bbZDQADvpep+wXk2AbMZ2bN6tINz8Kpz6M=",
"lastModified": 1734907020,
"narHash": "sha256-p6HxwpRKVl1KIiY5xrJdjcEeK3pbmc///UOyV6QER+w=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "fd85ef39369f95eed67fdf3f025e86916edeea2f",
"rev": "d7f18dda5e511749fa1511185db3536208fb1a63",
"type": "github"
},
"original": {

View File

@ -40,6 +40,11 @@
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
@ -92,6 +97,7 @@
inputs.stylix.nixosModules.stylix
inputs.nix-ld.nixosModules.nix-ld
inputs.sops-nix.nixosModules.sops
];
};
leanix = nixpkgs.lib.nixosSystem {

View File

@ -16,6 +16,7 @@
nmap
netcat-openbsd
bettercap
burpsuite
hashcat
tcpdump
sqlmap

View File

@ -0,0 +1,186 @@
{
lib,
config,
pkgs,
...
}:
{
options = {
rofi.clipboard.enable = lib.mkEnableOption "rofi-clipboard";
};
config = lib.mkIf config.rofi.clipboard.enable {
home.file = {
".config/rofi/cliboard.rasi".source = ../../../../config/clipboard.rasi;
};
home.packages = with pkgs; [
wl-clipboard
cliphist
(writeShellScriptBin "clipboard" ''
export confDir="''${XDG_CONFIG_HOME:-$HOME/.config}"
roconf="''${confDir}/rofi/clipboard.rasi"
favoritesFile="''${HOME}/.cliphist_favorites"
if printenv HYPRLAND_INSTANCE_SIGNATURE &> /dev/null; then
export hypr_border="$(hyprctl -j getoption decoration:rounding | jq '.int')"
export hypr_width="$(hyprctl -j getoption general:border_size | jq '.int')"
fi
# Set rofi scaling
[[ "''${rofiScale}" =~ ^[0-9]+$ ]] || rofiScale=10
r_scale="configuration {font: \"JetBrainsMono Nerd Font ''${rofiScale}\";}"
wind_border=$((hypr_border * 3 / 2))
elem_border=$([ $hypr_border -eq 0 ] && echo "5" || echo $hypr_border)
# Evaluate spawn position
readarray -t curPos < <(hyprctl cursorpos -j | jq -r '.x,.y')
readarray -t monRes < <(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width,.height,.scale,.x,.y')
readarray -t offRes < <(hyprctl -j monitors | jq -r '.[] | select(.focused==true).reserved | map(tostring) | join("\n")')
monRes[2]="$(echo "''${monRes[2]}" | sed "s/\.//")"
monRes[0]="$(( ''${monRes[0]} * 100 / ''${monRes[2]} ))"
monRes[1]="$(( ''${monRes[1]} * 100 / ''${monRes[2]} ))"
curPos[0]="$(( ''${curPos[0]} - ''${monRes[3]} ))"
curPos[1]="$(( ''${curPos[1]} - ''${monRes[4]} ))"
if [ "''${curPos[0]}" -ge "$((monRes[0] / 2))" ] ; then
x_pos="east"
x_off="-$((monRes[0] - curPos[0] - offRes[2]))"
else
x_pos="west"
x_off="$((curPos[0] - offRes[0]))"
fi
if [ "''${curPos[1]}" -ge "$((monRes[1] / 2))" ] ; then
y_pos="south"
y_off="-$((monRes[1] - curPos[1] - offRes[3]))"
else
y_pos="north"
y_off="$((curPos[1] - offRes[1]))"
fi
r_override="window{location:''${x_pos} ''${y_pos};anchor:''${x_pos} ''${y_pos};x-offset:''${x_off}px;y-offset:''${y_off}px;border:''${hypr_width}px;border-radius:''${wind_border}px;} wallbox{border-radius:''${elem_border}px;} element{border-radius:''${elem_border}px;}"
# Show main menu if no arguments are passed
if [ $# -eq 0 ]; then
main_action=$(echo -e "History\nDelete\nView Favorites\nManage Favorites\nClear History" | rofi -dmenu -theme-str "entry { placeholder: \"Choose action\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
else
main_action="History"
fi
case "''${main_action}" in
"History")
selected_item=$(cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"History...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
if [ -n "$selected_item" ]; then
echo "$selected_item" | cliphist decode | wl-copy
notify-send "Copied to clipboard."
fi
;;
"Delete")
selected_item=$(cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Delete...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
if [ -n "$selected_item" ]; then
echo "$selected_item" | cliphist delete
notify-send "Deleted."
fi
;;
"View Favorites")
if [ -f "$favoritesFile" ] && [ -s "$favoritesFile" ]; then
mapfile -t favorites < "$favoritesFile"
decoded_lines=()
for favorite in "''${favorites[@]}"; do
decoded_favorite=$(echo "$favorite" | base64 --decode)
single_line_favorite=$(echo "$decoded_favorite" | tr '\n' ' ')
decoded_lines+=("$single_line_favorite")
done
selected_favorite=$(printf "%s\n" "''${decoded_lines[@]}" | rofi -dmenu -theme-str "entry { placeholder: \"View Favorites\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
if [ -n "$selected_favorite" ]; then
index=$(printf "%s\n" "''${decoded_lines[@]}" | grep -nxF "$selected_favorite" | cut -d: -f1)
if [ -n "$index" ]; then
selected_encoded_favorite="''${favorites[$((index - 1))]}"
echo "$selected_encoded_favorite" | base64 --decode | wl-copy
notify-send "Copied to clipboard."
else
notify-send "Error: Selected favorite not found."
fi
fi
else
notify-send "No favorites."
fi
;;
"Manage Favorites")
manage_action=$(echo -e "Add to Favorites\nDelete from Favorites\nClear All Favorites" | rofi -dmenu -theme-str "entry { placeholder: \"Manage Favorites\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
case "''${manage_action}" in
"Add to Favorites")
item=$(cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Add to Favorites...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
if [ -n "$item" ]; then
full_item=$(echo "$item" | cliphist decode)
encoded_item=$(echo "$full_item" | base64 -w 0)
if grep -Fxq "$encoded_item" "$favoritesFile"; then
notify-send "Item is already in favorites."
else
echo "$encoded_item" >> "$favoritesFile"
notify-send "Added in favorites."
fi
fi
;;
"Delete from Favorites")
if [ -f "$favoritesFile" ] && [ -s "$favoritesFile" ]; then
mapfile -t favorites < "$favoritesFile"
decoded_lines=()
for favorite in "''${favorites[@]}"; do
decoded_favorite=$(echo "$favorite" | base64 --decode)
single_line_favorite=$(echo "$decoded_favorite" | tr '\n' ' ')
decoded_lines+=("$single_line_favorite")
done
selected_favorite=$(printf "%s\n" "''${decoded_lines[@]}" | rofi -dmenu -theme-str "entry { placeholder: \"Remove from Favorites...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
if [ -n "$selected_favorite" ]; then
index=$(printf "%s\n" "''${decoded_lines[@]}" | grep -nxF "$selected_favorite" | cut -d: -f1)
if [ -n "$index" ]; then
selected_encoded_favorite="''${favorites[$((index - 1))]}"
if [ "$(wc -l < "$favoritesFile")" -eq 1 ]; then
> "$favoritesFile"
else
grep -vF -x "$selected_encoded_favorite" "$favoritesFile" > "''${favoritesFile}.tmp" && mv "''${favoritesFile}.tmp" "$favoritesFile"
fi
notify-send "Item removed from favorites."
else
notify-send "Error: Selected favorite not found."
fi
fi
else
notify-send "No favorites to remove."
fi
;;
"Clear All Favorites")
if [ -f "$favoritesFile" ] && [ -s "$favoritesFile" ]; then
confirm=$(echo -e "Yes\nNo" | rofi -dmenu -theme-str "entry { placeholder: \"Clear All Favorites?\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
if [ "$confirm" = "Yes" ]; then
> "$favoritesFile"
notify-send "All favorites have been deleted."
fi
else
notify-send "No favorites to delete."
fi
;;
*)
echo "Invalid action"
exit 1
;;
esac
;;
"Clear History")
if [ "$(echo -e "Yes\nNo" | rofi -dmenu -theme-str "entry { placeholder: \"Clear Clipboard History?\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")" == "Yes" ] ; then
cliphist wipe
notify-send "Clipboard history cleared."
fi
;;
*)
echo "Invalid action"
exit 1
;;
esac
'')
];
};
}

View File

@ -5,27 +5,20 @@
}: {
home.packages =
(with pkgs; [
hyprlock
hyprpicker
hypridle
hyprpolkitagent
dunst
libnotify
swayosd
#swww
playerctl
hyprshade
swappy
grimblast
udiskie
wl-clipboard
cliphist
#dunst
#swww
#hyprshade
(writeShellScriptBin "dontkillsteam" ''
if [[ $(hyprctl activewindow -j | ${pkgs.jq}/bin/jq -r ".class") == "Steam" ]]; then
xdotool windowunmap $(xdotool getactivewindow)
@ -43,7 +36,7 @@
# Saves the current shader and turns it off
save_shader() {
shader=$(hyprshade current)
shader=$(${pkgs.hyprshade}/bin/hyprshade current)
${pkgs.hyprshade}/bin/hyprshade off
trap restore_shader EXIT
}
@ -55,13 +48,13 @@
case $1 in
p) # print all outputs
grimblast copysave screen $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;;
${pkgs.grimblast}/bin/grimblast copysave screen $temp_screenshot && restore_shader && ${pkgs.swappy}/bin/swappy -f $temp_screenshot ;;
s) # drag to manually snip an area / click on a window to print it
grimblast copysave area $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;;
${pkgs.grimblast}/bin/grimblast copysave area $temp_screenshot && restore_shader && ${pkgs.swappy}/bin/swappy -f $temp_screenshot ;;
sf) # frozen screen, drag to manually snip an area / click on a window to print it
grimblast --freeze copysave area $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;;
${pkgs.grimblast}/bin/grimblast --freeze copysave area $temp_screenshot && restore_shader && ${pkgs.swappy}/bin/swappy -f $temp_screenshot ;;
m) # print focused monitor
grimblast copysave output $temp_screenshot && restore_shader && swappy -f $temp_screenshot ;;
${pkgs.grimblast}/bin/grimblast copysave output $temp_screenshot && restore_shader && ${pkgs.swappy}/bin/swappy -f $temp_screenshot ;;
*) # invalid option
print_error ;;
esac

View File

@ -19,6 +19,7 @@
config = lib.mkIf config.desktop.hyprland.enable {
waybar.enable = lib.mkDefault true;
rofi.enable = lib.mkDefault true;
rofi.clipboard.enable = lib.mkDefault true;
wlogout.enable = lib.mkDefault true;
xdg.portal.enable = true;
@ -32,21 +33,24 @@
services.network-manager-applet.enable = true;
services.dunst.enable = true;
home.packages = [
pkgs.toybox
];
home.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
NIXOS_OZONE_WL = "1";
};
stylix.iconTheme = {
enable = true;
package = pkgs.papirus-icon-theme;
dark = "Papirus-Dark";
};
stylix.targets = {
dunst.enable = true;
kde.enable = true;
gtk.enable = true;
waybar = {
enable = true;
enableCenterBackColors = false;
enableLeftBackColors = false;
enableRightBackColors = false;
@ -56,6 +60,10 @@
wayland.windowManager.hyprland = {
enable = true;
plugins = [
pkgs.hyprlandPlugins.hyprspace
];
settings = {
monitor = [
"eDP-1,1920x1080,0x0,1"
@ -75,7 +83,6 @@
"sensitivity" = "0";
"force_no_accel" = "1";
#"numlock_by_default" = "true";
};
gestures = {
@ -108,7 +115,7 @@
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
"QT_QPA_PLATFORM,wayland;xcb"
#"QT_QPA_PLATFORMTHEME,qt6ct"
"QT_QPA_PLATFORMTHEME,qt6ct"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
"MOZ_ENABLE_WAYLAND,1"
@ -120,30 +127,22 @@
];
exec-once = [
#"discord --start-minimized"
"${pkgs.vesktop}/bin/vesktop --start-minimized"
"${pkgs.ferdium}/bin/ferdium --minimized"
"${pkgs.kdePackages.kdeconnect-kde}/bin/kdeconnect-indicator"
"systemctl --user start hyprpolkitagent"
#"swww-daemon --format xrgb"
#"swww ../../aurora_borealis.png"
"${pkgs.hypridle}/bin/hypridle"
"${pkgs.waybar}/bin/waybar"
"${pkgs.udiskie}/bin/udiskie --no-automount --smart-tray"
"${pkgs.blueman}/bin/blueman-applet"
"${pkgs.wl-clipboard}/bin/wl-paste --type text --watch cliphist store # clipboard store text data"
"${pkgs.wl-clipboard}/bin/wl-paste --type image --watch cliphist store # clipboard store image data"
"systemctl --user start hyprpolkitagent"
"swayosd-server"
"blueman-applet"
"udiskie --no-automount --smart-tray"
"nm-applet --indicator"
"dunst"
"wl-paste --type text --watch cliphist store # clipboard store text data"
"wl-paste --type image --watch cliphist store # clipboard store image data"
#"swww-daemon --format xrgb"
#"swww ../../aurora_borealis.png"
#"$scrPath/batterynotify.sh # battery notification"
#"$scrPath/resetxdgportal.sh # reset XDPH for screenshare"
#"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH"
#"dbus-update-activation-environment --systemd --all # for XDPH"
#"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH"
];
"$mod" = "SUPER";
@ -181,7 +180,7 @@
#];
bindd = [
"$mod SHIFT, P, Color Picker, exec, hyprpicker -a"
"$mod SHIFT, P, Color Picker, exec, ${pkgs.hyprpicker}/bin/hyprpicker -a"
"$mod SHIFT, R, Random Background, exec, background-switch-random"
];
@ -191,9 +190,9 @@
",XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle"
# Media
"Alt, P, exec, playerctl play-pause"
"Alt, I, exec, playerctl next"
"Alt, O, exec, playerctl previous"
"Alt, P, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
"Alt, I, exec, ${pkgs.playerctl}/bin/playerctl next"
"Alt, O, exec, ${pkgs.playerctl}/bin/playerctl previous"
];
bindel = [
@ -229,18 +228,20 @@
"$mod, Escape, exec, ${pkgs.hyprlock}/bin/hyprlock"
#"$mod+Shift,F, exec, windowpin.sh"
"$mod, Backspace, exec, ${pkgs.wlogout}/bin/wlogout -b 2"
"$Ctrl+Alt, W, exec, killall waybar || ${pkgs.waybar}/bin/waybar" # toggle waybar
"$Ctrl+Alt, W, exec, ${pkgs.toybox}/bin/killall waybar || ${pkgs.waybar}/bin/waybar" # toggle waybar
"$mod, T, exec, $term"
"$mod, F, exec, $browser"
"$mod, E, exec, $file"
"$mod, C, exec, $editor"
"Ctrl+Shift, Escape, exec, ${pkgs.btop}/bin/btop"
"Ctrl+Shift, Escape, exec, ${pkgs.kitty}/bin/kitty -e ${pkgs.btop}/bin/btop"
# Rofi
"$mod, A, exec, pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show drun"
"$mod, Tab, exec, pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show window"
"$mod+Shift, E, exec, pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show emoji"
"$mod, A, exec, ${pkgs.toybox}/bin/pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show drun"
"$mod, Tab, exec, ${pkgs.toybox}/bin/pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show window"
"$mod+Shift, E, exec, ${pkgs.toybox}/bin/pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show emoji"
# Clipboard manager
"$mod, V, exec, ${pkgs.toybox}/bin/pkill -x rofi || clipboard"
# Grouped Windows
"$mod CTRL, H, changegroupactive, b"
@ -252,9 +253,6 @@
"$mod+Alt, P, exec, screenshot m"
", Print, exec, screenshot p" # All monitors screenshot capture
# Custom scripts
"$mod, V, exec, pkill -x rofi || scliphist c"
# Move/Change window focus
"$mod, H, movefocus, l"
"$mod, L, movefocus, r"

View File

@ -8,11 +8,11 @@
rofi.enable = lib.mkEnableOption "enable Rofi module";
};
config = lib.mkIf config.rofi.enable {
home.packages = [
pkgs.rofi-wayland
];
imports = [
./clipboard-rofi.nix
];
config = lib.mkIf config.rofi.enable {
programs.rofi = {
enable = true;
cycle = true;
@ -23,17 +23,6 @@
theme = let
inherit (config.lib.formats.rasi) mkLiteral;
in {
# "*" = {
# main-bg = mkLiteral "#11111be6";
# main-fg = mkLiteral "#cdd6f4ff";
# main-br = mkLiteral "#cba6f7ff";
# main-ex = mkLiteral "#f5e0dcff";
# select-bg = mkLiteral "#b4befeff";
# select-fg = mkLiteral "#11111bff";
# separatorcolor = mkLiteral "transparent";
# border-color = mkLiteral "transparent";
# };
#
"configuration" = {
modi = "drun,filebrowser,window,run";
show-icons = true;

View File

@ -120,16 +120,13 @@
format = "{:%H:%M}";
rotate = 0;
format-alt = "{:%R 󰃭 %d·%m·%y}";
tooltip-format = "<span>{calendar}</span>";
tooltip-format = "<span size='8pt' font='JetBrains Mono'><tt>{calendar}</tt></span>";
calendar = {
mode = "month";
mode-mon-col = 3;
on-scroll = 1;
on-click-right = "mode";
format = {
months = "<span color='#ffead3'><b>{}</b></span>";
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
today = "<span color='#ff6699'><b>{}</b></span>";
months = "<span color='#ffffff'><b>{}</b></span>";
weekdays = "<span color='#ffffff'><b>{}</b></span>";
today = "<span color='#ffffff'><b>{}</b></span>";
};
};
actions = {

View File

@ -14,7 +14,7 @@
layout = [
{
"label" = "lock";
"action" = "swaylock";
"action" = "hyprlock";
"text" = "Lock";
"keybind" = "l";
}

View File

@ -33,7 +33,7 @@
userSettings = {
"files.autoSave" = "afterDelay";
"explorer.confirmDragAndDrop" = false;
"editor.fontSize" = 16;
#"editor.fontSize" = 16;
"editor.minimap.side" = "right";
"editor.scrollbar.vertical" = "hidden";
"editor.scrollbar.verticalScrollbarSize" = 0;

View File

@ -21,6 +21,7 @@
yubikey.enable = lib.mkDefault false;
};
sys.desktop.steamdeck.enable = lib.mkDefault false;
sys.default-applications.enable = lib.mkDefault true;
programs.kdeconnect.enable = lib.mkDefault true;
programs.wireshark.enable = lib.mkDefault true;
}

View File

@ -59,6 +59,8 @@
package = inputs.hyprland.packages."${pkgs.system}".hyprland;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
};
services.udisks2.enable = true;
})
];
}

View File

@ -34,7 +34,7 @@
monospace = {
name = "JetBrainsMono Nerd Font";
package = (pkgs-stable.nerdfonts.override { fonts = [ "JetBrainsMono" ]; });
package = pkgs-stable.nerdfonts.override {fonts = ["JetBrainsMono"];};
};
};
};

7
zenith/.sops.yaml Normal file
View File

@ -0,0 +1,7 @@
keys:
- &primary age1xzkhm0m0gzph8akd7zjv4880hrauynk80ldktld0r44pgn48le5q3tfw8l
creation_rules:
- path_regex: secrets/secrets.yaml$
key_groups:
- age:
- *primary

View File

@ -3,6 +3,7 @@
pkgs,
pkgs-stable,
userSettings,
config,
...
}: {
imports = [
@ -10,11 +11,21 @@
../nixos/system/packages.nix
../nixos/system/system.nix
inputs.home-manager.nixosModules.home-manager
inputs.sops-nix.nixosModules.sops
];
nix.settings.experimental-features = ["nix-command" "flakes"];
programs.nix-ld.dev.enable = true;
sops.defaultSopsFile = ./secrets/secrets.yaml;
sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "/home/foglar/.config/sops/age/keys.txt";
sops.secrets."zenith/password-hash" = {
neededForUsers = true;
};
# Home manager
home-manager = {
extraSpecialArgs = {inherit inputs pkgs pkgs-stable userSettings;};
@ -22,7 +33,10 @@
users = {
${userSettings.username} = import ./home.nix;
};
sharedModules = [inputs.plasma-manager.homeManagerModules.plasma-manager];
sharedModules = [
inputs.sops-nix.homeManagerModules.sops
inputs.plasma-manager.homeManagerModules.plasma-manager
];
};
# User configuration
@ -30,6 +44,7 @@
isNormalUser = true;
description = "${userSettings.username}";
extraGroups = ["wheel"];
hashedPasswordFile = "${config.sops.secrets."zenith/password-hash".path}";
};
# Bootloader
@ -44,7 +59,7 @@
sys = {
audio.enable = true;
desktop = {
plasma.enable = true;
plasma.enable = false;
gnome.enable = false;
hyprland.enable = true;
steamdeck.enable = true;
@ -81,6 +96,8 @@
programs.kdeconnect.enable = true;
programs.wireshark.enable = true;
services.twingate.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;

View File

@ -37,6 +37,7 @@
vscode = {
enable = true;
nix.enable = true;
};
git.enable = true;
neovim.enable = true;

View File

@ -0,0 +1,24 @@
zenith:
password-hash: ENC[AES256_GCM,data:J0OpGQHKugEvDMJJsLApO4JFmAM4e01WODyonrwUinND/MpzxAjbozlMrDQqb8Lghay3RTOCrslizYIYOkNwUU+MhyFlTAbF7Q==,iv:J4PXhVAUcv1QSycdvQL2jb/IcayyXVdfiJDHiNUalXk=,tag:bm4N8mq/6QUdzwOcy6WVaw==,type:str]
leanix:
password-hash: ENC[AES256_GCM,data:C5oGejwFkhhYvaDunG0AF9PcCKTQQA//uqi1LaWwEwOphepROoP9d1r1vD8k2cgcrikVSX4NQUBca6fQrqZTXMuxZKBxslE2Fw==,iv:oM2pWAifpCEpTRiGKbbG/QdQ0m8YaoyESzD3rIZkvmc=,tag:W+w3Bbtr8rBfp6SjYwcW0Q==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1xzkhm0m0gzph8akd7zjv4880hrauynk80ldktld0r44pgn48le5q3tfw8l
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBwME1uUDlWc2RDTWw0dGly
TEx0dWtxOGlsdGtLVmpMZzRqcUN0d0VNOGxZCkkraGs3cjRIQ3o1MUN4eXZnbXhU
MXROMzYrenkyVS9TTStmZnVGRXF4YVkKLS0tIFhVUnIyMHdtQ2VZQlQrbCtTWHVG
T0cxV21SN0hJaFg3R3hpTjIxa3lJNVEKdIrR5XDHxpCojk2A1pxc4dYtSJRrObbY
JS/nDgu74LugEchiOhuIJ7nh3MS5XBOmmt2GTHrqxZEZFoIykjIGug==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-12-23T18:49:40Z"
mac: ENC[AES256_GCM,data:fWWZ3+RnGkQYP1R7q47JyB6NXHKG+D+y+qaB7i+uGfHsIf6VCkerO/ITCk4WSkvsXJDpB9mZWp2ciYypcDAHuBOlZzLscf/et9xDoDhXdM7MgRsX3fA9oeK9Q8D83cUptELlfXKU0Kvs02fAjbDrbwx5rdUtcUxfPNjW2X5lJ3o=,iv:5UwqRhZnj+u29O+x+KjxZJ9x1hcKuuZlnFYbgFnjkTs=,tag:w/z8u8PYkcW7etYg7y6y8w==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.2