Compare commits
11 Commits
main
...
9c0bf5fabf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c0bf5fabf | ||
|
|
7fa9f95ce4 | ||
|
|
e5e4fe04ea | ||
| 73cc922bed | |||
| 3e07666c13 | |||
| b4cd147221 | |||
| 4a65f5e537 | |||
|
|
f16f941daf | ||
|
|
24fa6a4700 | ||
| 3b74e79fed | |||
| 18cc8751c9 |
18
flake.lock
generated
18
flake.lock
generated
@@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758287904,
|
"lastModified": 1760701190,
|
||||||
"narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=",
|
"narHash": "sha256-y7UhnWlER8r776JsySqsbTUh2Txf7K30smfHlqdaIQw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "67ff9807dd148e704baadbd4fd783b54282ca627",
|
"rev": "3a9450b26e69dcb6f8de6e2b07b3fc1c288d85f5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -38,11 +38,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760038930,
|
"lastModified": 1761373498,
|
||||||
"narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=",
|
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3",
|
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -67,11 +67,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759635238,
|
"lastModified": 1760998189,
|
||||||
"narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=",
|
"narHash": "sha256-ee2e1/AeGL5X8oy/HXsZQvZnae6XfEVdstGopKucYLY=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "6e5a38e08a2c31ae687504196a230ae00ea95133",
|
"rev": "5a7d18b5c55642df5c432aadb757140edfeb70b3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
df = "df -h";
|
df = "df -h";
|
||||||
du = "du -h";
|
du = "du -h";
|
||||||
};
|
};
|
||||||
|
# Defined in /etc/set-environnement. Require session restart
|
||||||
variables = {
|
variables = {
|
||||||
XDG_CONFIG_HOME = "$HOME/.config";
|
XDG_CONFIG_HOME = "$HOME/.config";
|
||||||
XDG_CACHE_HOME = "$HOME/.cache";
|
XDG_CACHE_HOME = "$HOME/.cache";
|
||||||
@@ -33,22 +34,12 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
autosuggestions.enable = false;
|
autosuggestions.enable = true;
|
||||||
histSize = 200000;
|
histSize = 200000;
|
||||||
histFile = "$HOME/.config/zsh/.zsh_history";
|
histFile = "$HOME/.config/zsh/.zsh_history";
|
||||||
setOptions = [
|
setOptions = [
|
||||||
"SHARE_HISTORY"
|
"SHARE_HISTORY"
|
||||||
];
|
];
|
||||||
# shellInit = ''
|
|
||||||
# export XDG_CONFIG_HOME=$HOME/.config
|
|
||||||
# export XDG_CACHE_HOME=$HOME/.cache
|
|
||||||
# export XDG_DATA_HOME=$HOME/.local/share
|
|
||||||
# export ZDOTDIR=$HOME/.config/zsh
|
|
||||||
# export TERMINAL=kitty
|
|
||||||
# export EDITOR=nvim
|
|
||||||
# export BROWSER=firefox
|
|
||||||
# export SAVEHIST=200000
|
|
||||||
# '';
|
|
||||||
promptInit = ''
|
promptInit = ''
|
||||||
stty stop undef # Disable ctrl+s to freeze terminal
|
stty stop undef # Disable ctrl+s to freeze terminal
|
||||||
|
|
||||||
@@ -59,6 +50,9 @@
|
|||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
zmodload zsh/complist
|
zmodload zsh/complist
|
||||||
|
|
||||||
|
# enable dotfiles in tab directory completion
|
||||||
|
setopt globdots
|
||||||
|
|
||||||
fzf-history() {
|
fzf-history() {
|
||||||
local selected
|
local selected
|
||||||
selected=$(fc -l 1 | fzf --tac --no-sort | sed 's/^[ ]*[0-9]*[ ]*//')
|
selected=$(fc -l 1 | fzf --tac --no-sort | sed 's/^[ ]*[0-9]*[ ]*//')
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
description = "Admin account";
|
description = "Admin account";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
"networkmanager"
|
|
||||||
"audio"
|
"audio"
|
||||||
"video"
|
"video"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -35,6 +35,16 @@
|
|||||||
# WEB_LOADER_ENGINE = "safe_web";
|
# WEB_LOADER_ENGINE = "safe_web";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
environment = {
|
||||||
environment.systemPackages = [ pkgs.lmstudio ];
|
systemPackages = [
|
||||||
|
pkgs.lmstudio
|
||||||
|
pkgs.aider-chat-full
|
||||||
|
];
|
||||||
|
variables = {
|
||||||
|
OLLAMA_API_BASE = "http://localhost:11434";
|
||||||
|
};
|
||||||
|
shellAliases = {
|
||||||
|
aider = "aider --config ~/.config/aider/.aider.conf.yml";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ ecosystem {
|
|||||||
###################
|
###################
|
||||||
|
|
||||||
$terminal = kitty
|
$terminal = kitty
|
||||||
source = /etc/xdg/hypr/rofi.conf
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
### AUTOSTART ###
|
### AUTOSTART ###
|
||||||
@@ -211,9 +210,10 @@ device {
|
|||||||
|
|
||||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||||
# Apps shortcut
|
# Apps shortcut
|
||||||
bind = $mainMod, D, exec, $rofi
|
bind = $mainMod, D, exec, rofi -show drun -show-icons -config /etc/xdg/rofi/config.rasi
|
||||||
bind = $mainMod, L, exec, /etc/xdg/scripts/wayland-disconnect.sh
|
bind = $mainMod, L, exec, /etc/xdg/scripts/wayland-disconnect.sh
|
||||||
bind = $mainMod, M, exec, /etc/xdg/scripts/wayland-mpv.sh
|
bind = $mainMod, M, exec, /etc/xdg/scripts/wayland-mpv.sh
|
||||||
|
bind = $mainMod, K, exec, /etc/xdg/scripts/rofi-ssh.sh
|
||||||
bind = $mainMod SHIFT, P, exec, pavucontrol
|
bind = $mainMod SHIFT, P, exec, pavucontrol
|
||||||
bind = $mainMod SHIFT, T, exec, teams-for-linux
|
bind = $mainMod SHIFT, T, exec, teams-for-linux
|
||||||
bind = $mainMod SHIFT, D, exec, discord
|
bind = $mainMod SHIFT, D, exec, discord
|
||||||
|
|||||||
16
modules/optionnals/desktop/config/etc/xdg/rofi/mpv.rasi
Normal file
16
modules/optionnals/desktop/config/etc/xdg/rofi/mpv.rasi
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
@import "launcher.rasi"
|
||||||
|
window {
|
||||||
|
width: 50%;
|
||||||
|
height: 50%;
|
||||||
|
margin: 0px;
|
||||||
|
location: center;
|
||||||
|
anchor: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
children: [inputbar,listview];
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
columns: 1;
|
||||||
|
}
|
||||||
12
modules/optionnals/desktop/config/etc/xdg/rofi/ssh.rasi
Normal file
12
modules/optionnals/desktop/config/etc/xdg/rofi/ssh.rasi
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
@import "launcher.rasi"
|
||||||
|
window {
|
||||||
|
width: 50%;
|
||||||
|
height: 50%;
|
||||||
|
margin: 0px;
|
||||||
|
location: center;
|
||||||
|
anchor: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
children: [inputbar,listview];
|
||||||
|
}
|
||||||
7
modules/optionnals/desktop/config/etc/xdg/scripts/rofi-ssh.sh
Executable file
7
modules/optionnals/desktop/config/etc/xdg/scripts/rofi-ssh.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
selected=$(cat ~/.config/zsh/.zsh_history | sed 's/^[ ]*[0-9]*[ ]*//' | grep '^ssh ' | rofi -dmenu -i -theme /etc/xdg/rofi/ssh.rasi -p SSH)
|
||||||
|
|
||||||
|
if [[ -n "$selected" ]]; then
|
||||||
|
kitty -e $selected
|
||||||
|
fi
|
||||||
26
modules/optionnals/desktop/config/etc/xdg/scripts/waybar-mailbox.sh
Executable file
26
modules/optionnals/desktop/config/etc/xdg/scripts/waybar-mailbox.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
_USER=beastie
|
||||||
|
_PASSWD='}q6658JD~{}{oiRWsb~Q{P@SV=Qsy,ae'
|
||||||
|
_SERVER=unixyourbrain.org
|
||||||
|
_FOLDER=Admin
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd -- "$(dirname -- "$0")"
|
||||||
|
_DIRNAME="$(pwd)"
|
||||||
|
|
||||||
|
### Sourcer à partir des secrets
|
||||||
|
#source ~/.config/polybar/imap_creds
|
||||||
|
|
||||||
|
|
||||||
|
_COUNT=$(curl -u "$_USER:$_PASSWD" "imaps://$_SERVER" -X "STATUS $_FOLDER (UNSEEN)" 2>/dev/null | \
|
||||||
|
sed -e 's/)\r//' -e 's/.*UNSEEN //')
|
||||||
|
|
||||||
|
_UNSEEN=$(curl -u "$_USER:$_PASSWD" "imaps://$_SERVER/$_FOLDER" -X "SEARCH UNSEEN" 2>/dev/null | \
|
||||||
|
sed -e "s|\\r||" -e "s|* SEARCH ||" -e "s| |,|g")
|
||||||
|
|
||||||
|
_MAILS=$(curl -v -u "$_USER:$_PASSWD" "imaps://$_SERVER/$_FOLDER" -X "FETCH $_UNSEEN BODY.PEEK[HEADER.FIELDS (From Subject)]" 2>&1 | \
|
||||||
|
sed -e "s|\\r||" | awk '/< Subject|< From/ {sub(/^< /, ""); printf "%s\\n", $0}')
|
||||||
|
|
||||||
|
printf '{"text": "%s ", "tooltip": "%s"}' "$_COUNT" "$_MAILS"
|
||||||
31
modules/optionnals/desktop/config/etc/xdg/scripts/wayland-disconnect.sh
Executable file
31
modules/optionnals/desktop/config/etc/xdg/scripts/wayland-disconnect.sh
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
selected=$(printf "Lock\0icon\x1fsystem-lock-screen
|
||||||
|
Update\0icon\x1fsystem-software-update
|
||||||
|
Shutdown\0icon\x1fsystem-shutdown
|
||||||
|
Reboot\0icon\x1fsystem-reboot
|
||||||
|
Exit hyprland\0icon\x1fsystem-log-out
|
||||||
|
Reload hyprland\0icon\x1fsystem-log-out" | rofi -dmenu -show-icons -i -theme /etc/xdg/rofi/disconnect.rasi -p System)
|
||||||
|
|
||||||
|
echo "$selected"
|
||||||
|
|
||||||
|
case $selected in
|
||||||
|
"Lock")
|
||||||
|
/nix/store/4pwvyyjrc7frwkycbszakd7z6nf44qgv-hyprlock-0.9.2/bin/hyprlock
|
||||||
|
;;
|
||||||
|
"Update")
|
||||||
|
kitty /usr/local/share/dotfiles/scripts/update.sh
|
||||||
|
;;
|
||||||
|
"Shutdown")
|
||||||
|
systemctl poweroff
|
||||||
|
;;
|
||||||
|
"Reboot")
|
||||||
|
reboot
|
||||||
|
;;
|
||||||
|
"Exit hyprland")
|
||||||
|
hyprctl dispatch exit
|
||||||
|
;;
|
||||||
|
"Reload hyprland")
|
||||||
|
hyprctl reload
|
||||||
|
;;
|
||||||
|
esac
|
||||||
31
modules/optionnals/desktop/config/etc/xdg/scripts/wayland-mpv.sh
Executable file
31
modules/optionnals/desktop/config/etc/xdg/scripts/wayland-mpv.sh
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd -- "$(dirname -- "$0")" || exit
|
||||||
|
|
||||||
|
## if not $1
|
||||||
|
if [[ -z $1 ]]
|
||||||
|
then
|
||||||
|
_LINES=$(curl "http://10.0.0.1:2013" 2>/dev/null | sed -e "s|.*<a href=\"\([^\"]*\).*|$1\1|" -e "s/.*<.*\|.*C=D.*\|.*\/\/$\|.*.nfo//" -e "/^$/d")
|
||||||
|
else
|
||||||
|
_LINES="$(curl "http://10.0.0.1:2013/$1" 2>/dev/null | sed -e "s|.*<a href=\"\([^\"]*\).*|$1\1|" -e "s/.*<.*\|.*C=D.*\|.*\/\/$\|.*.nfo//" -e "/^$/d")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
_RESULT=$(rofi -dmenu -i -theme /etc/xdg/rofi/mpv.rasi -p Mpv <<< "$_LINES")
|
||||||
|
|
||||||
|
# If no output
|
||||||
|
echo "$_RESULT"
|
||||||
|
if [[ -z $_RESULT ]]
|
||||||
|
then
|
||||||
|
echo "no output, exiting"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
#if line end vith /
|
||||||
|
if [[ "$_RESULT" =~ .*/$ ]]
|
||||||
|
then
|
||||||
|
echo "output is a directory"
|
||||||
|
./wayland-mpv.sh "$_RESULT"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
mpv "http://10.0.0.1:2013/$_RESULT"
|
||||||
@@ -7,12 +7,13 @@
|
|||||||
"memory",
|
"memory",
|
||||||
"disk",
|
"disk",
|
||||||
"network",
|
"network",
|
||||||
"pulseaudio",
|
"pulseaudio"
|
||||||
],
|
],
|
||||||
"modules-center": [
|
"modules-center": [
|
||||||
"hyprland/workspaces"
|
"hyprland/workspaces"
|
||||||
],
|
],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
|
"custom/alert",
|
||||||
"custom/maj",
|
"custom/maj",
|
||||||
"clock",
|
"clock",
|
||||||
"tray"
|
"tray"
|
||||||
@@ -78,11 +79,20 @@
|
|||||||
},
|
},
|
||||||
"format": "{name}",
|
"format": "{name}",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
"default": "",
|
"default": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
"custom/alert": {
|
||||||
|
"exec": "/etc/xdg/scripts/waybar-mailbox.sh",
|
||||||
|
"interval": 300,
|
||||||
|
"return-type": "json",
|
||||||
|
"format": "{icon}{text}",
|
||||||
|
"format-icons": {
|
||||||
|
"default": " "
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"custom/maj": {
|
"custom/maj": {
|
||||||
"exec": "/etc/xdg/scripts/update.sh",
|
"exec": "/etc/xdg/scripts/waybar-update.sh",
|
||||||
"interval": 300,
|
"interval": 300,
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"format": "{icon}{text}",
|
"format": "{icon}{text}",
|
||||||
|
|||||||
@@ -7,12 +7,13 @@
|
|||||||
"memory",
|
"memory",
|
||||||
"disk",
|
"disk",
|
||||||
"network",
|
"network",
|
||||||
"pulseaudio",
|
"pulseaudio"
|
||||||
],
|
],
|
||||||
"modules-center": [
|
"modules-center": [
|
||||||
"hyprland/workspaces"
|
"hyprland/workspaces"
|
||||||
],
|
],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
|
"custom/alert",
|
||||||
"custom/maj",
|
"custom/maj",
|
||||||
"clock",
|
"clock",
|
||||||
"tray"
|
"tray"
|
||||||
@@ -79,11 +80,20 @@
|
|||||||
},
|
},
|
||||||
"format": "{name}",
|
"format": "{name}",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
"default": "",
|
"default": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
"custom/alert": {
|
||||||
|
"exec": "/etc/xdg/scripts/waybar-mailbox.sh",
|
||||||
|
"interval": 300,
|
||||||
|
"return-type": "json",
|
||||||
|
"format": "{icon}{text}",
|
||||||
|
"format-icons": {
|
||||||
|
"default": " "
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"custom/maj": {
|
"custom/maj": {
|
||||||
"exec": "/etc/xdg/scripts/update.sh",
|
"exec": "/etc/xdg/scripts/waybar-update.sh",
|
||||||
"interval": 300,
|
"interval": 300,
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"format": "{icon}{text}",
|
"format": "{icon}{text}",
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#disk,
|
#disk,
|
||||||
#network,
|
#network,
|
||||||
#workspaces,
|
#workspaces,
|
||||||
|
#custom-alert,
|
||||||
#custom-maj,
|
#custom-maj,
|
||||||
#pulseaudio,
|
#pulseaudio,
|
||||||
#memory,
|
#memory,
|
||||||
@@ -87,24 +88,40 @@
|
|||||||
background: @red;
|
background: @red;
|
||||||
}
|
}
|
||||||
|
|
||||||
#network {
|
#custom-logo {
|
||||||
color: @pink;
|
color: @red;
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio {
|
|
||||||
color: @yellow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#cpu {
|
#cpu {
|
||||||
color: @blue;
|
color: @peach;
|
||||||
}
|
}
|
||||||
|
|
||||||
#memory {
|
#memory {
|
||||||
color: @green;
|
color: @maroon;
|
||||||
|
}
|
||||||
|
|
||||||
|
#disk {
|
||||||
|
color: @pink;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
color: @flamingo;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
color: @rosewater;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-alert {
|
||||||
|
color: @sky;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-maj {
|
||||||
|
color: @sapphire;
|
||||||
}
|
}
|
||||||
|
|
||||||
#clock {
|
#clock {
|
||||||
color: @red;
|
color: @blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tray {
|
#tray {
|
||||||
|
|||||||
@@ -6,78 +6,6 @@
|
|||||||
environment = {
|
environment = {
|
||||||
etc = {
|
etc = {
|
||||||
"xdg/rofi".source = ./config/etc/xdg/rofi;
|
"xdg/rofi".source = ./config/etc/xdg/rofi;
|
||||||
"xdg/scripts/wayland-disconnect.sh" = {
|
|
||||||
text = ''
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
selected=$(printf "Lock\0icon\x1fsystem-lock-screen
|
|
||||||
Update\0icon\x1fsystem-software-update
|
|
||||||
Shutdown\0icon\x1fsystem-shutdown
|
|
||||||
Reboot\0icon\x1fsystem-reboot
|
|
||||||
Exit hyprland\0icon\x1fsystem-log-out
|
|
||||||
Reload hyprland\0icon\x1fsystem-log-out" | ${pkgs.rofi}/bin/rofi -dmenu -show-icons -i -theme /etc/xdg/rofi/disconnect.rasi -p System)
|
|
||||||
|
|
||||||
echo "$selected"
|
|
||||||
|
|
||||||
case $selected in
|
|
||||||
"Lock")
|
|
||||||
${pkgs.hyprlock}/bin/hyprlock
|
|
||||||
;;
|
|
||||||
"Update")
|
|
||||||
kitty /usr/local/share/dotfiles/scripts/update.sh
|
|
||||||
;;
|
|
||||||
"Shutdown")
|
|
||||||
systemctl poweroff
|
|
||||||
;;
|
|
||||||
"Reboot")
|
|
||||||
reboot
|
|
||||||
;;
|
|
||||||
"Exit hyprland")
|
|
||||||
hyprctl dispatch exit
|
|
||||||
;;
|
|
||||||
"Reload hyprland")
|
|
||||||
hyprctl reload
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
'';
|
|
||||||
mode = "0755";
|
|
||||||
};
|
|
||||||
"xdg/scripts/wayland-mpv.sh" = {
|
|
||||||
text = ''
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
cd -- "$(dirname -- "$0")" || exit
|
|
||||||
|
|
||||||
## if not $1
|
|
||||||
if [[ -z $1 ]]
|
|
||||||
then
|
|
||||||
_LINES=$(curl "http://10.0.0.1:2013" 2>/dev/null | sed -e "s|.*<a href=\"\([^\"]*\).*|$1\1|" -e "s/.*<.*\|.*C=D.*\|.*\/\/$\|.*.nfo//" -e "/^$/d")
|
|
||||||
else
|
|
||||||
_LINES="$(curl "http://10.0.0.1:2013/$1" 2>/dev/null | sed -e "s|.*<a href=\"\([^\"]*\).*|$1\1|" -e "s/.*<.*\|.*C=D.*\|.*\/\/$\|.*.nfo//" -e "/^$/d")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
_RESULT=$(${pkgs.rofi}/bin/rofi -dmenu -config /etc/xdg/rofi/config.rasi -i <<< "$_LINES")
|
|
||||||
|
|
||||||
# If no output
|
|
||||||
echo "$_RESULT"
|
|
||||||
if [[ -z $_RESULT ]]
|
|
||||||
then
|
|
||||||
echo "no output, exiting"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
#if line end vith /
|
|
||||||
if [[ "$_RESULT" =~ .*/$ ]]
|
|
||||||
then
|
|
||||||
echo "output is a directory"
|
|
||||||
./wayland-mpv.sh "$_RESULT"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
mpv "http://10.0.0.1:2013/$_RESULT"
|
|
||||||
'';
|
|
||||||
mode = "0755";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
7
modules/optionnals/desktop/virt-manager.nix
Normal file
7
modules/optionnals/desktop/virt-manager.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
virtualisation.spiceUSBRedirection.enable = true;
|
||||||
|
}
|
||||||
@@ -28,16 +28,16 @@
|
|||||||
"xdg/hypr/hyprland-host.conf".source = ./config/etc/xdg/hypr/hyprland-${hostname}.conf;
|
"xdg/hypr/hyprland-host.conf".source = ./config/etc/xdg/hypr/hyprland-${hostname}.conf;
|
||||||
"xdg/hypr/hyprlock.conf".source = ./config/etc/xdg/hypr/hyprlock.conf;
|
"xdg/hypr/hyprlock.conf".source = ./config/etc/xdg/hypr/hyprlock.conf;
|
||||||
"xdg/hypr/hyprpaper.conf".source = ./config/etc/xdg/hypr/hyprpaper.conf;
|
"xdg/hypr/hyprpaper.conf".source = ./config/etc/xdg/hypr/hyprpaper.conf;
|
||||||
"xdg/hypr/rofi.conf" = {
|
|
||||||
text = ''
|
|
||||||
$rofi = ${pkgs.rofi}/bin/rofi -show drun -show-icons -config /etc/xdg/rofi/config.rasi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
"xdg/waybar/colors.css".source = ./config/etc/xdg/waybar/colors.css;
|
"xdg/waybar/colors.css".source = ./config/etc/xdg/waybar/colors.css;
|
||||||
"xdg/waybar/config.jsonc".source = ./config/etc/xdg/waybar/config-${hostname}.jsonc;
|
"xdg/waybar/config.jsonc".source = ./config/etc/xdg/waybar/config-${hostname}.jsonc;
|
||||||
"xdg/waybar/style.css".source = ./config/etc/xdg/waybar/style.css;
|
"xdg/waybar/style.css".source = ./config/etc/xdg/waybar/style.css;
|
||||||
"xdg/waybar/custom.css".source = ./config/etc/xdg/waybar/custom-${hostname}.css;
|
"xdg/waybar/custom.css".source = ./config/etc/xdg/waybar/custom-${hostname}.css;
|
||||||
"xdg/scripts/update.sh".source = ./config/etc/xdg/scripts/update.sh;
|
|
||||||
|
"xdg/scripts/rofi-ssh.sh".source = ./config/etc/xdg/scripts/rofi-ssh.sh;
|
||||||
|
"xdg/scripts/waybar-mailbox.sh".source = ./config/etc/xdg/scripts/waybar-mailbox.sh;
|
||||||
|
"xdg/scripts/waybar-update.sh".source = ./config/etc/xdg/scripts/waybar-update.sh;
|
||||||
|
"xdg/scripts/wayland-disconnect.sh".source = ./config/etc/xdg/scripts/wayland-disconnect.sh;
|
||||||
|
"xdg/scripts/wayland-mpv.sh".source = ./config/etc/xdg/scripts/wayland-mpv.sh;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
sops = {
|
sops = {
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
username,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../autologin.nix
|
../autologin.nix
|
||||||
../k8s.nix
|
../k8s.nix
|
||||||
|
../libvirt.nix
|
||||||
../openfortivpn.nix
|
../openfortivpn.nix
|
||||||
../packages.nix
|
../packages.nix
|
||||||
../sops-desktop.nix
|
../sops-desktop.nix
|
||||||
@@ -22,12 +23,21 @@
|
|||||||
../desktop/qwerty-fr.nix
|
../desktop/qwerty-fr.nix
|
||||||
../desktop/rofi.nix
|
../desktop/rofi.nix
|
||||||
../desktop/starship.nix
|
../desktop/starship.nix
|
||||||
|
../desktop/virt-manager.nix
|
||||||
../desktop/wayland.nix
|
../desktop/wayland.nix
|
||||||
|
|
||||||
### Import Graphics modules
|
### Import Graphics modules
|
||||||
../desktop/amd.nix
|
../desktop/amd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.wireless.iwd.enable = true;
|
networking = {
|
||||||
|
networkmanager.enable = true;
|
||||||
|
extraHosts = ''
|
||||||
|
carto-interavtive 172.18.20.134
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
users.users.${username} = {
|
||||||
|
extraGroups = [ "networkmanager" ];
|
||||||
|
};
|
||||||
programs.nm-applet.enable = true;
|
programs.nm-applet.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
21
modules/optionnals/libvirt.nix
Normal file
21
modules/optionnals/libvirt.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
virtualisation = {
|
||||||
|
libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
qemu = {
|
||||||
|
package = pkgs.qemu_full;
|
||||||
|
runAsRoot = true;
|
||||||
|
swtpm.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
users.users.${username} = {
|
||||||
|
extraGroups = [ "libvirtd" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user