update
This commit is contained in:
parent
57cab5fa52
commit
1ed7675095
@ -1,11 +1,11 @@
|
|||||||
keys:
|
keys:
|
||||||
- &primary age12yvtj49pfh3fqzqflscm0ek4yzrjhr6cqhn7x89gdxnlykq0xudq5c7334
|
- &primary age12yvtj49pfh3fqzqflscm0ek4yzrjhr6cqhn7x89gdxnlykq0xudq5c7334
|
||||||
creation_rules:
|
creation_rules:
|
||||||
- path_regex: secrets/laptop.yaml$
|
- path_regex: hosts/laptop/secrets/laptop.yaml$
|
||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
- *primary
|
- *primary
|
||||||
- path_regex: secrets/server.yaml$
|
- path_regex: hosts/server/secrets/server.yaml$
|
||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
- *primary
|
- *primary
|
||||||
|
@ -51,14 +51,17 @@ It's a simple way to manage your system configuration and dotfiles.
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
- 🏠 `home` are the dotfiles and configuration files for the user
|
- 🏠 `home` are the dotfiles and configuration files for the users
|
||||||
|
- 'programs' is a collection of apps configured with home-manager
|
||||||
|
- 'scripts' is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
||||||
|
- 'system' is some desktop environment like configuration
|
||||||
|
- 'wallpapers' are... wallpapers
|
||||||
- 💻 `hosts` are the system configuration files
|
- 💻 `hosts` are the system configuration files
|
||||||
- 'laptop' is my configuration for my laptop with Nvidia
|
- 'laptop' is my configuration for my laptop with Nvidia
|
||||||
- 'server' is for my homeserver (w/nextcloud, nginx, vaultwarden, ... look `hosts/server`)
|
- 'server' is for my homeserver (w/nextcloud, nginx, vaultwarden, ... look `hosts/server`)
|
||||||
- 'guest' is a *template* that you can copy and modify for *your own system*
|
- 'guest' is a *template* that you can copy and modify for *your own system*
|
||||||
- 'themes' contains all the *themes* available *(see [THEMES.md](docs/THEMES.md))*
|
- 'themes' contains all the *themes* available *(see [THEMES.md](docs/THEMES.md))*
|
||||||
- 'modules' are some nix modules that you can import (Nvidia, prime, fonts, ...)
|
- 'modules' are some nix modules that you can import (Nvidia, prime, fonts, ...)
|
||||||
- 🤫 `secrets` are the secrets files encrypted with sops-nix
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
|
|||||||
- [ ] MacOS theme
|
- [ ] MacOS theme
|
||||||
- [ ] Write a hyprland shortcuts markdown file (Parse the hyprland settings conf)
|
- [ ] Write a hyprland shortcuts markdown file (Parse the hyprland settings conf)
|
||||||
- [ ] Tofi (Wofi but terminal based)
|
- [ ] Tofi (Wofi but terminal based)
|
||||||
|
- [ ] add golang bin dir to path
|
||||||
|
|
||||||
- [ ] Waybar
|
- [ ] Waybar
|
||||||
- [ ] Caffeine status
|
- [ ] Caffeine status
|
||||||
|
@ -26,5 +26,5 @@ variables=$(echo "$variables" | sed 's/tailscale = true/tailscale = false/')
|
|||||||
echo "$variables" >"$GUEST_CONFIG/variables.nix"
|
echo "$variables" >"$GUEST_CONFIG/variables.nix"
|
||||||
|
|
||||||
home=$(cat "$LAPTOP_CONFIG/home.nix")
|
home=$(cat "$LAPTOP_CONFIG/home.nix")
|
||||||
home=$(echo "$home" | sed 's/\.\/sops.nix/# .\/sops.nix/')
|
home=$(echo "$home" | sed 's/\.\/secrets/# .\/secrets/')
|
||||||
echo "$home" >"$GUEST_CONFIG/home.nix"
|
echo "$home" >"$GUEST_CONFIG/home.nix"
|
@ -7,7 +7,7 @@
|
|||||||
README_FILE="./README.md"
|
README_FILE="./README.md"
|
||||||
|
|
||||||
header=$(cat "./docs/src/header.md")
|
header=$(cat "./docs/src/header.md")
|
||||||
table_of_content=$(~/go/bin/md-table-of-contents ./docs/src/README_template.md)
|
table_of_content=$(md-table-of-contents ./docs/src/README_template.md)
|
||||||
version=$(git describe --tags --abbrev=0)
|
version=$(git describe --tags --abbrev=0)
|
||||||
readme_content=$(cat "./docs/src/README_template.md")
|
readme_content=$(cat "./docs/src/README_template.md")
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
[[ -f "./home/system/hyprland/default.nix" ]] || (echo "File ./home/system/hyprland/default.nix not found" && exit 1)
|
|
||||||
|
|
||||||
config=$( cat "./home/system/hyprland/default.nix")
|
|
||||||
|
|
||||||
# get text between
|
|
||||||
# bind = [
|
|
||||||
# and next ]
|
|
||||||
|
|
||||||
# Example:
|
|
||||||
# "$mod, E, exec, ${pkgs.xfce.thunar}/bin/thunar" # Description
|
|
||||||
# Steps:
|
|
||||||
# We should remove the ""
|
|
||||||
# $mod replace by Super key
|
|
||||||
# $shiftMod replace by "Super Shift"
|
|
||||||
# Concat with key
|
|
||||||
# Remove , exec,
|
|
||||||
# Remove variables and /bin/ if present
|
|
||||||
|
|
||||||
# Create a markdown table with everything
|
|
54
docs/scripts/keybindings_to_markdown.sh
Normal file
54
docs/scripts/keybindings_to_markdown.sh
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function getList(){
|
||||||
|
content=$1
|
||||||
|
name=$2
|
||||||
|
list_start=$(echo "$content" | sed "/$name = \[/!d;=;Q")
|
||||||
|
list=$(echo "$content" | tail +$list_start)
|
||||||
|
list_end=$(echo "$list" | sed '/\]/!d;=;Q')
|
||||||
|
list=$(echo "$list" | head -n$list_end)
|
||||||
|
|
||||||
|
echo "$list"
|
||||||
|
}
|
||||||
|
|
||||||
|
[[ -f "./home/system/hyprland/default.nix" ]] || (echo "File ./home/system/hyprland/default.nix not found" && exit 1)
|
||||||
|
|
||||||
|
config=$( cat "./home/system/hyprland/default.nix")
|
||||||
|
|
||||||
|
# Bind
|
||||||
|
bind=$(getList "$config" "bind")
|
||||||
|
echo "$bind"
|
||||||
|
|
||||||
|
# Bindm (mouse)
|
||||||
|
bindm=$(getList "$config" "bindm")
|
||||||
|
echo "$bindm"
|
||||||
|
|
||||||
|
# Bindl (lock)
|
||||||
|
bindl=$(getList "$config" "bindl")
|
||||||
|
echo "$bindl"
|
||||||
|
|
||||||
|
# Bindle (lock, repetition)
|
||||||
|
bindle=$(getList "$config" "bindle")
|
||||||
|
echo "$bindle"
|
||||||
|
|
||||||
|
# Join the lists:
|
||||||
|
# ...
|
||||||
|
|
||||||
|
# Remove lines not containing a "
|
||||||
|
# ...
|
||||||
|
|
||||||
|
# Parse the keybindings:
|
||||||
|
# Example: "mod, key, dispatcher, params" # Description
|
||||||
|
# 1. Get the description/remove it
|
||||||
|
# 2. Remove the quotes
|
||||||
|
# 3. Get mod /remove it (replace $mod and $shiftmod by SUPER and SUPER_SHIFT)
|
||||||
|
# 4. Get key /remove it
|
||||||
|
# 5. Get dispatcher /remove it
|
||||||
|
# 6. Get params
|
||||||
|
|
||||||
|
# Manually add workspace shortcuts
|
||||||
|
|
||||||
|
# Markdown table:
|
||||||
|
# | Description | keybinding | params |
|
||||||
|
# | -- | -- | -- |
|
||||||
|
# ...
|
@ -14,14 +14,17 @@ It's a simple way to manage your system configuration and dotfiles.
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
- 🏠 `home` are the dotfiles and configuration files for the user
|
- 🏠 `home` are the dotfiles and configuration files for the users
|
||||||
|
- 'programs' is a collection of apps configured with home-manager
|
||||||
|
- 'scripts' is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
||||||
|
- 'system' is some desktop environment like configuration
|
||||||
|
- 'wallpapers' are... wallpapers
|
||||||
- 💻 `hosts` are the system configuration files
|
- 💻 `hosts` are the system configuration files
|
||||||
- 'laptop' is my configuration for my laptop with Nvidia
|
- 'laptop' is my configuration for my laptop with Nvidia
|
||||||
- 'server' is for my homeserver (w/nextcloud, nginx, vaultwarden, ... look `hosts/server`)
|
- 'server' is for my homeserver (w/nextcloud, nginx, vaultwarden, ... look `hosts/server`)
|
||||||
- 'guest' is a *template* that you can copy and modify for *your own system*
|
- 'guest' is a *template* that you can copy and modify for *your own system*
|
||||||
- 'themes' contains all the *themes* available *(see [THEMES.md](docs/THEMES.md))*
|
- 'themes' contains all the *themes* available *(see [THEMES.md](docs/THEMES.md))*
|
||||||
- 'modules' are some nix modules that you can import (Nvidia, prime, fonts, ...)
|
- 'modules' are some nix modules that you can import (Nvidia, prime, fonts, ...)
|
||||||
- 🤫 `secrets` are the secrets files encrypted with sops-nix
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -7,7 +7,5 @@
|
|||||||
./tmux.nix
|
./tmux.nix
|
||||||
./lazygit.nix
|
./lazygit.nix
|
||||||
./eza.nix
|
./eza.nix
|
||||||
./fetch
|
|
||||||
./lf
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -50,34 +50,32 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
bind = [
|
bind = [
|
||||||
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
|
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty" # Kitty
|
||||||
"$mod, E, exec, ${pkgs.xfce.thunar}/bin/thunar"
|
"$mod, E, exec, ${pkgs.xfce.thunar}/bin/thunar" # Thunar
|
||||||
"$mod, B, exec, ${pkgs.qutebrowser}/bin/qutebrowser"
|
"$mod, B, exec, ${pkgs.qutebrowser}/bin/qutebrowser" # Qutebrowser
|
||||||
"$mod, K, exec, ${pkgs.bitwarden}/bin/bitwarden"
|
"$mod, K, exec, ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
|
||||||
"$mod, C, exec, ${pkgs.kitty}/bin/kitty --class peaclock peaclock"
|
"$mod, C, exec, ${pkgs.kitty}/bin/kitty --class peaclock peaclock" # Peaclock
|
||||||
"$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
"$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock
|
||||||
"$mod, X, exec, powermenu"
|
"$mod, X, exec, powermenu" # Powermenu
|
||||||
"$mod, SPACE, exec, menu"
|
"$mod, SPACE, exec, menu" # Launcher
|
||||||
# Windows control
|
|
||||||
"$mod, Q, killactive,"
|
"$mod, Q, killactive," # Close window
|
||||||
"$mod, T, togglefloating,"
|
"$mod, T, togglefloating," # Toggle Floating
|
||||||
"$mod, F, fullscreen"
|
"$mod, F, fullscreen" # Toggle Fullscreen
|
||||||
"$mod, left, movefocus, l"
|
"$mod, left, movefocus, l" # Move focus left
|
||||||
"$mod, right, movefocus, r"
|
"$mod, right, movefocus, r" # Move focus Right
|
||||||
"$mod, up, movefocus, u"
|
"$mod, up, movefocus, u" # Move focus Up
|
||||||
"$mod, down, movefocus, d"
|
"$mod, down, movefocus, d" # Move focus Down
|
||||||
# Screenshots
|
|
||||||
"$mod, PRINT, exec, screenshot window"
|
"$mod, PRINT, exec, screenshot window" # Screenshot window
|
||||||
", PRINT, exec, screenshot monitor"
|
", PRINT, exec, screenshot monitor" # Screenshot monitor
|
||||||
"$shiftMod, PRINT, exec, screenshot region"
|
"$shiftMod, PRINT, exec, screenshot region" # Screenshot region
|
||||||
"ALT, PRINT, exec, screenshot region swappy"
|
"ALT, PRINT, exec, screenshot region swappy" # Screenshot region then edit
|
||||||
# Night Shift
|
|
||||||
"$mod, F2, exec, night-shift-off"
|
"$mod, F2, exec, night-shift-off" # Turn off night shift
|
||||||
"$mod, F3, exec, night-shift-on"
|
"$mod, F3, exec, night-shift-on" # Turn on night shift
|
||||||
# Sound output
|
|
||||||
"$mod, F5, exec, ${pkgs.kitty}/bin/kitty --class floating zsh -c sound-output"
|
"$mod, F5, exec, ${pkgs.kitty}/bin/kitty --class floating zsh -c sound-output" # Choose sound output
|
||||||
"$mod, F6, exec, ${pkgs.kitty}/bin/kitty --class floating zsh -c sound-output"
|
|
||||||
"$mod, F7, exec, ${pkgs.kitty}/bin/kitty --class floating zsh -c sound-output"
|
|
||||||
] ++ (builtins.concatLists (builtins.genList (i:
|
] ++ (builtins.concatLists (builtins.genList (i:
|
||||||
let ws = i + 1;
|
let ws = i + 1;
|
||||||
in [
|
in [
|
||||||
@ -85,18 +83,21 @@
|
|||||||
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
|
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
|
||||||
]) 9));
|
]) 9));
|
||||||
|
|
||||||
bindm = [ "$mod, mouse:272, movewindow" "$mod, R, resizewindow" ];
|
bindm = [
|
||||||
|
"$mod, mouse:272, movewindow" # Move Window (mouse)
|
||||||
|
"$mod, R, resizewindow" # Resize Window (mouse)
|
||||||
|
];
|
||||||
|
|
||||||
bindl = [
|
bindl = [
|
||||||
",XF86AudioMute, exec, sound-toggle"
|
",XF86AudioMute, exec, sound-toggle" # Toggle Mute
|
||||||
",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock when closing Lid
|
||||||
];
|
];
|
||||||
|
|
||||||
bindle = [
|
bindle = [
|
||||||
", XF86AudioRaiseVolume, exec, sound-up"
|
", XF86AudioRaiseVolume, exec, sound-up" # Sound Up
|
||||||
", XF86AudioLowerVolume, exec, sound-down"
|
", XF86AudioLowerVolume, exec, sound-down" # Sound Down
|
||||||
", XF86MonBrightnessUp, exec, brightness-up"
|
", XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
|
||||||
", XF86MonBrightnessDown, exec, brightness-down"
|
", XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
|
||||||
];
|
];
|
||||||
|
|
||||||
env = [
|
env = [
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
../../home/programs/spicetify
|
../../home/programs/spicetify
|
||||||
../../home/programs/zathura
|
../../home/programs/zathura
|
||||||
../../home/programs/shell
|
../../home/programs/shell
|
||||||
|
../../home/programs/fetch
|
||||||
|
../../home/programs/lf
|
||||||
../../home/programs/git
|
../../home/programs/git
|
||||||
|
|
||||||
# Scripts
|
# Scripts
|
||||||
@ -28,7 +30,7 @@
|
|||||||
../../home/system/mime
|
../../home/system/mime
|
||||||
../../home/system/udiskie
|
../../home/system/udiskie
|
||||||
|
|
||||||
# ./sops.nix # You should probably remove this line
|
# ./secrets # You should probably remove this line
|
||||||
];
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
../../home/programs/spicetify
|
../../home/programs/spicetify
|
||||||
../../home/programs/zathura
|
../../home/programs/zathura
|
||||||
../../home/programs/shell
|
../../home/programs/shell
|
||||||
|
../../home/programs/fetch
|
||||||
|
../../home/programs/lf
|
||||||
../../home/programs/git
|
../../home/programs/git
|
||||||
|
|
||||||
# Scripts
|
# Scripts
|
||||||
@ -28,7 +30,7 @@
|
|||||||
../../home/system/mime
|
../../home/system/mime
|
||||||
../../home/system/udiskie
|
../../home/system/udiskie
|
||||||
|
|
||||||
./sops.nix # You should probably remove this line
|
./secrets # You should probably remove this line
|
||||||
];
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
||||||
defaultSopsFile = ../../secrets/laptop.yaml;
|
defaultSopsFile = ./laptop.yaml;
|
||||||
secrets = {
|
secrets = {
|
||||||
sshconfig = { path = "/home/hadi/.ssh/config"; };
|
sshconfig = { path = "/home/hadi/.ssh/config"; };
|
||||||
github-key = { path = "/home/hadi/.ssh/github"; };
|
github-key = { path = "/home/hadi/.ssh/github"; };
|
@ -6,7 +6,6 @@
|
|||||||
# internal
|
# internal
|
||||||
./modules/internal/security.nix
|
./modules/internal/security.nix
|
||||||
./modules/internal/openssh.nix
|
./modules/internal/openssh.nix
|
||||||
./modules/internal/sops.nix
|
|
||||||
./modules/internal/adguard.nix
|
./modules/internal/adguard.nix
|
||||||
# ./modules/internal/unifi.nix # FIXME: unifi5 is deprecated
|
# ./modules/internal/unifi.nix # FIXME: unifi5 is deprecated
|
||||||
|
|
||||||
@ -23,6 +22,8 @@
|
|||||||
|
|
||||||
# jackflix
|
# jackflix
|
||||||
./modules/jackflix
|
./modules/jackflix
|
||||||
|
|
||||||
|
./secrets
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
||||||
defaultSopsFile = ../../../../secrets/server.yaml;
|
defaultSopsFile = ./server.yaml;
|
||||||
defaultSopsFormat = "yaml";
|
defaultSopsFormat = "yaml";
|
||||||
secrets = {
|
secrets = {
|
||||||
sshconfig = {
|
sshconfig = {
|
Loading…
Reference in New Issue
Block a user