Secrets, scripts, clean..
@@ -17,8 +17,9 @@
|
||||
./neofetch
|
||||
./spicetify
|
||||
./variables/theme
|
||||
./wallpaper
|
||||
./wallpapers
|
||||
./lf
|
||||
./secrets # REMOVE
|
||||
];
|
||||
|
||||
home = {
|
||||
@@ -40,6 +41,7 @@
|
||||
python3
|
||||
|
||||
# Utils
|
||||
age # Secrets
|
||||
fd
|
||||
bc
|
||||
gcc
|
||||
|
||||
@@ -169,7 +169,6 @@
|
||||
animation = [
|
||||
"windowsIn, 1, 3, easeOutCubic, popin 30% # window open"
|
||||
"windowsOut, 1, 3, fluent_decel, popin 70% # window close."
|
||||
"windowsMove, 1, 2, easeinoutsine, slide # everything in between, moving, dragging, resizing."
|
||||
"fadeIn, 1, 3, easeOutCubic # fade in (open) -> layers and windows"
|
||||
"fadeOut, 1, 2, easeOutCubic # fade out (close) -> layers and windows"
|
||||
"fadeSwitch, 0, 1, easeOutCirc # fade on changing activewindow and its opacity"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||
background {
|
||||
monitor =
|
||||
path = $HOME/.config/wallpaper/${config.theme.wallpaper}
|
||||
path = $HOME/.config/wallpapers/${config.theme.wallpaper}
|
||||
color = rgb(${config.theme.colors.bg})
|
||||
|
||||
blur_size = 4
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
home.packages = with pkgs; [ hyprpaper ];
|
||||
|
||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||
preload = ~/.config/wallpaper/${config.theme.wallpaper}
|
||||
wallpaper = ,~/.config/wallpaper/${config.theme.wallpaper}
|
||||
preload = ~/.config/wallpapers/${config.theme.wallpaper}
|
||||
wallpaper = ,~/.config/wallpapers/${config.theme.wallpaper}
|
||||
ipc=true
|
||||
splash=false
|
||||
'';
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
{ imports = [ ./sshconfig.nix ./cava/default.nix ]; }
|
||||
{
|
||||
imports = [
|
||||
./cava/default.nix
|
||||
./nextcloud.nix # REMOVE
|
||||
];
|
||||
}
|
||||
|
||||
27
home/misc/nextcloud.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ pkgs, ... }: {
|
||||
systemd.user.services.watch-nextcloud = {
|
||||
Unit = { Description = "Start Nextcloud if I'm on one of my network"; };
|
||||
Install = { WantedBy = [ "default.target" ]; };
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "watch-nextcloud" ''
|
||||
while 1;do
|
||||
ssid=$(nmcli -t -f name connection show --active | head -n1)
|
||||
if [[ $ssid == "inthecloud" || $ssid == "Wired connection 2" ]]; then
|
||||
status=$(systemctl --user status nextcloud-client)
|
||||
service_status=$(echo "$status" | awk '/Active:/ {print $2}')
|
||||
if [[ $service_status == "inactive" ]]; then
|
||||
systemctl --user start nextcloud-client
|
||||
fi
|
||||
else
|
||||
status=$(systemctl --user status nextcloud-client)
|
||||
service_status=$(echo "$status" | awk '/Active:/ {print $2}')
|
||||
if [[ $service_status == "active" ]]; then
|
||||
systemctl --user stop nextcloud-client
|
||||
fi
|
||||
fi
|
||||
sleep 120
|
||||
done
|
||||
''}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
home.file = {
|
||||
".ssh/config" = {
|
||||
text = ''
|
||||
Host github.com
|
||||
User git
|
||||
Hostname github.com
|
||||
PreferredAuthentications publickey
|
||||
IdentityFile ~/.ssh/github
|
||||
'';
|
||||
executable = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
12
home/scripts/age.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
homedir = config.home.homeDirectory;
|
||||
|
||||
add-secrets = pkgs.writeShellScriptBin "add-secrets" ''
|
||||
file=$1
|
||||
pubkey=$(cat ~/nixy.key | grep "public key" | cut -d':' -f2 | sed 's/ //g')
|
||||
${pkgs.age}/bin/age -r $pubkey -o ~/.config/nixos/home/secrets/$file.age -a $file
|
||||
'';
|
||||
|
||||
in { home.packages = with pkgs; [ add-secrets ]; }
|
||||
@@ -7,5 +7,6 @@
|
||||
./brightness.nix
|
||||
./caffeine.nix
|
||||
./night-shift.nix
|
||||
./age.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
let
|
||||
homedir = config.home.homeDirectory;
|
||||
|
||||
wallpaper = pkgs.writeShellScriptBin "wallpaper" ''
|
||||
WALLPAPER_FOLDER="${homedir}/Nextcloud/wallpaper"
|
||||
|
||||
cd $WALLPAPER_FOLDER
|
||||
|
||||
choosed_wallpaper=$(fd . |
|
||||
fzf \
|
||||
--preview='kitty icat --clear --transfer-mode=memory --stdin=no --place=''${FZF_PREVIEW_COLUMNS}x''${FZF_PREVIEW_LINES}@0x0 {}' \
|
||||
--preview-window=bottom,border-top \
|
||||
--border-label "Wallpaper" ) || exit 1
|
||||
|
||||
swww img $choosed_wallpaper
|
||||
cp $choosed_wallpaper $HOME/.config/wallpaper/default.png
|
||||
'';
|
||||
#wallpaper = pkgs.writeShellScriptBin "wallpaper" ''
|
||||
# WALLPAPER_FOLDER="${homedir}/Nextcloud/wallpaper"
|
||||
#
|
||||
# cd $WALLPAPER_FOLDER
|
||||
#
|
||||
# choosed_wallpaper=$(fd . |
|
||||
# fzf \
|
||||
# --preview='kitty icat --clear --transfer-mode=memory --stdin=no --place=''${FZF_PREVIEW_COLUMNS}x''${FZF_PREVIEW_LINES}@0x0 {}' \
|
||||
# --preview-window=bottom,border-top \
|
||||
# --border-label "Wallpaper" ) || exit 1
|
||||
#
|
||||
# swww img $choosed_wallpaper
|
||||
# cp $choosed_wallpaper $HOME/.config/wallpaper/default.png
|
||||
#'';
|
||||
|
||||
menu = pkgs.writeShellScriptBin "menu" ''
|
||||
if pgrep wofi; then
|
||||
@@ -34,4 +34,4 @@ let
|
||||
nmcli connection import type wireguard file "$0"
|
||||
'';
|
||||
|
||||
in { home.packages = with pkgs; [ wallpaper menu wireguard-import powermenu ]; }
|
||||
in { home.packages = with pkgs; [ menu wireguard-import powermenu ]; }
|
||||
|
||||
12
home/secrets/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, config, homeage, ... }: {
|
||||
imports = [ homeage.homeManagerModules.homeage ];
|
||||
homeage = {
|
||||
identityPaths = [ "~/nixy.key" ];
|
||||
installationType = "activation";
|
||||
|
||||
file."hadisecretkey" = {
|
||||
source = ./sshconfig.age;
|
||||
symlinks = [ "${config.home.homeDirectory}/.ssh/sshconfig" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
BIN
home/secrets/sshconfig.age
Normal file
@@ -12,7 +12,7 @@ with lib;
|
||||
|
||||
wallpaper = mkOption {
|
||||
type = types.str;
|
||||
description = "Name of the wallpaper (in the wallpaper directory)";
|
||||
description = "Name of the wallpaper (from the wallpapers directory)";
|
||||
};
|
||||
|
||||
font = mkOption {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{ config, ... }: {
|
||||
xdg.configFile."wallpaper" = {
|
||||
recursive = true;
|
||||
source = ./wallpaper;
|
||||
};
|
||||
}
|
||||
6
home/wallpapers/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ config, ... }: {
|
||||
xdg.configFile."wallpapers" = {
|
||||
recursive = true;
|
||||
source = ./wallpapers;
|
||||
};
|
||||
}
|
||||
|
Before Width: | Height: | Size: 826 KiB After Width: | Height: | Size: 826 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 12 MiB After Width: | Height: | Size: 12 MiB |
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 378 KiB |
|
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 288 KiB |
|
Before Width: | Height: | Size: 641 KiB After Width: | Height: | Size: 641 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 8.6 MiB After Width: | Height: | Size: 8.6 MiB |