Secrets, scripts, clean..
This commit is contained in:
12
home/scripts/age.nix
Normal file
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 ]; }
|
||||
|
||||
Reference in New Issue
Block a user