24 Commits
i3 ... main

Author SHA1 Message Date
47518f0ec2 removed swayfx and enables sway on gridlock 2024-03-26 21:18:12 +01:00
116743a296 removed kepassx autostart 2024-03-11 12:19:28 +01:00
03da387f05 added i3 to gridlock 2024-03-11 12:10:32 +01:00
b7d788fe10 tewaked wayland conf 2024-03-11 12:07:47 +01:00
f7934e9ba8 tweaked borg script 2024-03-11 12:07:34 +01:00
82dd8fef47 moved i3 conf into extra files 2024-02-28 11:40:17 +01:00
bd44bdcd29 added sway for x230 2024-02-28 11:34:23 +01:00
374236d8b7 arandr and gimp 2024-02-28 11:00:42 +01:00
19f013c123 added vpn-config to private 2024-02-20 01:20:44 +01:00
2870e812df enabled kdeconnect 2024-02-19 08:41:29 +01:00
3c7ed4b66b yt-dlp 2024-02-18 16:52:46 +01:00
c6bc885ef9 installed Go 2024-02-18 16:50:20 +01:00
201bf683b8 shutdown on critical battery level 2024-02-18 16:49:55 +01:00
6528fc625c including git annex archives into backup 2024-02-14 18:14:47 +01:00
9db4d5758e ledger budget alias 2024-02-14 18:14:31 +01:00
2f8eac64f7 mount nas command 2024-02-14 16:35:02 +01:00
c28905a081 enabled batsignal on x230 2024-02-12 12:53:19 +01:00
2b2fa4508c replaced git annex mirror with much safer git annex get 2024-02-12 01:37:30 +01:00
d4e70e33f5 added audio repo in backup script 2024-02-12 00:34:48 +01:00
83de6e9837 removed signal here due to home-manager not using latest package 2024-02-11 01:32:06 +01:00
2c4d3fb15b set default workspace startup cmd 2024-02-10 15:31:38 +01:00
15ba62a5f8 tweaked the display scaling script 2024-02-09 19:00:58 +01:00
55f1ce62d7 fixed xss-lock 2024-02-09 14:03:47 +01:00
be1bb0b3a4 removed bitrate from gridlock 2024-02-08 04:22:56 +01:00
9 changed files with 330 additions and 149 deletions

View File

@@ -47,6 +47,9 @@ borg create --progress --stats --exclude-caches \
--exclude $HOME/tmp \ --exclude $HOME/tmp \
--exclude $HOME/.local/Steam \ --exclude $HOME/.local/Steam \
--exclude $HOME/.local/share/Steam \ --exclude $HOME/.local/share/Steam \
--exclude $HOME/Audio \
--exclude $HOME/nas \
--exclude $HOME/go \
$ARCHIVE $SRC && if ! $LOCAL; then date +%s > $HOME/.lastbak; fi $ARCHIVE $SRC && if ! $LOCAL; then date +%s > $HOME/.lastbak; fi
@@ -54,20 +57,39 @@ $ARCHIVE $SRC && if ! $LOCAL; then date +%s > $HOME/.lastbak; fi
borg prune --stats --list --keep-within 1d --glob-archives "$HOSTNAME*" \ borg prune --stats --list --keep-within 1d --glob-archives "$HOSTNAME*" \
-d 7 \ -d 7 \
-w 4 \ -w 4 \
-m 12 \ -m 6 \
-y 3 \ -y 1 \
$REPO $REPO
if $LOCAL && nmcli connection show --active | grep '^vt-net' > /dev/null if $LOCAL
then then
SRC=""
if ! nmcli connection show --active | grep '^vt-net' > /dev/null
then
SRC="--from local"
fi
echo "backing up Photo archive..." echo "backing up Photo archive..."
cd "/run/media/$USER/$DISK/photos" cd "/run/media/$USER/$DISK/photos"
git annex sync git annex sync
set +e # set +e
git annex mirror --from=origin # git annex mirror --from=origin
set -e git annex get $SRC
# set -e
git annex sync
echo "backing up Audio archive..."
cd "/run/media/$USER/$DISK/audio"
git annex sync
### git annex mirror --from=origin
git annex get $SRC
git annex sync git annex sync
cd / cd /
udisksctl unmount -b "/dev/disk/by-label/$DISK" udisksctl unmount -b "/dev/disk/by-label/$DISK"
udisksctl lock -b "/dev/disk/by-partlabel/$DISK" udisksctl lock -b "/dev/disk/by-partlabel/$DISK"
else
echo "Backing up Audo archive..."
cd "$HOME/Audio"
git annex copy --to origin > /dev/null
echo "Backing up Photo archive..."
cd "$HOME/Photos"
git annex copy --to origin > /dev/null
fi fi

View File

@@ -1,6 +1,10 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
imports = [
# ./home-i3.nix
./home-wl.nix
];
home.packages = with pkgs; [ home.packages = with pkgs; [
darktable darktable
]; ];
@@ -9,7 +13,7 @@
"wireless wlp6s0" = { "wireless wlp6s0" = {
position = 2; position = 2;
settings = { settings = {
format_up = "%essid %bitrate"; format_up = "%essid";
format_down = "down"; format_down = "down";
}; };
}; };
@@ -22,5 +26,9 @@
}; };
xsession.windowManager.i3.extraConfig = '' xsession.windowManager.i3.extraConfig = ''
exec xrandr --output DisplayPort-0 --scale 0.75x0.75 exec xrandr --output DisplayPort-0 --scale 0.75x0.75
exec feh --bg-scale ~/.config/home-manager/xenia.png
'';
wayland.windowManager.sway.extraConfig = ''
exec swaymsg "output * scale 1.5"
''; '';
} }

141
home-i3.nix Normal file
View File

@@ -0,0 +1,141 @@
{ config, pkgs, lib, ... }:
{
home.packages = with pkgs; [
arandr
feh
dmenu
i3lock-blur
xclip
];
xsession.windowManager.i3.enable = true;
xsession.windowManager.i3.config = {
fonts = {
names = [ "Ubuntu" ];
style = "Regular";
size = 12.0;
};
defaultWorkspace = "1";
bars = [{
position = "top";
colors.background = "#ef5ffc";
colors.focusedWorkspace = {
text = "#333333";
border = "#ef5ffc";
background = "#a15ffc";
};
colors.inactiveWorkspace = {
text = "#333333";
border = "#ef5ffc";
background = "#ef5ffc";
};
colors.statusline = "#333333";
fonts = {
names = [ "Ubuntu" ];
style = "Regular";
size = 13.0;
};
statusCommand = "~/.borg/i3status-bakage.sh";
extraConfig = ''
height 24
'';
}];
colors.focused = {
border = "#ef5ffc";
background = "#ef5ffc";
text = "#333333";
indicator = "#2e9ef4";
childBorder = "#ef5ffc";
};
floating = {
criteria = [
{
instance = "keepassxc";
class = "KeePassXC";
}
];
};
gaps = {
inner = 8;
smartBorders = "on";
smartGaps = true;
};
keybindings =
let
modifier = config.xsession.windowManager.i3.config.modifier;
menu = config.xsession.windowManager.i3.config.menu;
in lib.mkOptionDefault {
"${modifier}+space" = "exec ${menu}";
"${modifier}+Control+Space" = "focus mode_toggle";
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
# "XF86Launch1" = "exec ~/scripts/sunset.sh";
"${modifier}+Control+p" = "exec i3lock -n -c ef5ffc";
"${modifier}+Control+x" = "exec ~/scripts/scale.sh";
};
menu = "rofi -show drun";
modifier = "Mod4";
window.titlebar = false;
terminal = "alacritty";
window.border = 2;
startup = [
{ command = "feh --bg-scale ~/.config/home-manager/xenia.png"; }
{ command = "keepassxc"; }
{ command = "i3-msg workspace 1"; }
];
};
services.redshift = {
enable = true;
latitude = 49.0;
longitude = 9.0;
tray = true;
};
services.caffeine.enable = true;
services.screen-locker.enable = true;
services.screen-locker.lockCmd = "/home/vi/.nix-profile/bin/i3lock -n -c ef5ffc";
programs.i3status = {
enable = true;
enableDefault = false;
general = {
colors = true;
interval = 5;
color_good = "#333333";
color_degraded = "#333333";
color_bad = "#333333";
color_separator = "#a15ffc";
separator = " ";
};
modules = {
"volume master".position = 1;
"wireless wlp2s0" = {
position = 2;
settings = {
format_up = "%essid %bitrate";
format_down = "down";
};
};
"battery 0" = {
position = 3;
settings = {
color_good = "#333333";
color_degraded = "#d6cf19";
color_bad = "#d6191f";
format = "%status %percentage %remaining";
status_chr = "C";
status_bat = "B";
status_full = "F";
};
};
"time" = {
position = 4;
settings = {
format = "%a, %d.%m.%Y - %H:%M ";
};
};
};
};
}

116
home-wl.nix Normal file
View File

@@ -0,0 +1,116 @@
{ config, pkgs, lib, ... }:
{
home.packages = with pkgs; [
swayimg
wl-clipboard
waybar
wofi
];
home.file = {
".config/waybar" = {
source = ./waybar;
};
".config/wofi/config".text = ''
show=drun
drun-print_command=true
'';
};
wayland.windowManager.sway.enable = true;
# wayland.windowManager.sway.package = pkgs.swayfx;
wayland.windowManager.sway.config = {
bars = [{
command = "waybar";
position = "top";
}];
colors.focused = {
border = "#ef5ffc";
background = "#ef5ffc";
text = "#333333";
indicator = "#2e9ef4";
childBorder = "#ef5ffc";
};
defaultWorkspace = "1";
floating = {
criteria = [
{
app_id = "org.keepassxc.KeePassXC";
}
];
};
gaps = {
inner = 8;
smartBorders = "on";
smartGaps = true;
};
input = {
"type:keyboard" = {
xkb_layout = "us";
xkb_variant = "altgr-intl";
xkb_options = "caps:escape,compose:102,shift:both_capslock,eurosign:e";
};
};
keybindings =
let
modifier = config.wayland.windowManager.sway.config.modifier;
menu = config.wayland.windowManager.sway.config.menu;
in lib.mkOptionDefault {
"${modifier}+space" = "exec ${menu}";
"${modifier}+Control+Space" = "focus mode_toggle";
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86Launch1" = "exec ~/scripts/sunset.sh";
"${modifier}+Control+p" = "exec swaylock -f -c ef5ffc";
};
menu = "wofi -G | xargs swaymsg exec --";
modifier = "Mod4";
output = {
"*" = {
bg = "~/.config/sway/xenia.png fill";
};
};
window.titlebar = false;
terminal = "alacritty";
window.border = 2;
};
wayland.windowManager.sway.extraConfig = ''
# blur enable
# blur_xray disable
# corner_radius 4
# shadows enable
# default_dim_inactive 0.1
# dim_inactive_colors.unfocused #fc28c3
exec swayidle -w \
timeout 300 'swaylock -f -c ef5ffc' \
timeout 600 'swaymsg output * dpms off' \
resume 'swaymsg putput * dpms on' \
before-sleep 'swaylock -f -c ef5ffc'
include ~/.config/sway/device-conf
'';
# Let Home Manager install and manage itself.
services.swayidle = {
enable = false;
events = [
{
event = "before-sleep";
command = "/run/current-system/sw/bin/swaylock -f -c ef5ffc";
}
];
timeouts = [
{
command = "/run/current-system/sw/bin/swaylock -f -c ef5ffc";
timeout = 300;
}
{
command = "swaymsg \"output * dpms off\"";
resumeCommand = "swaymsg \"output * dpms on\"";
timeout = 600;
}
];
};
}

147
home.nix
View File

@@ -12,7 +12,9 @@
home.stateVersion = "23.11"; # Please read the comment before changing. home.stateVersion = "23.11"; # Please read the comment before changing.
home.packages = with pkgs; [ home.packages = with pkgs; [
feh gimp
yt-dlp
openssl
killall killall
sshfs sshfs
hledger hledger
@@ -48,7 +50,6 @@
neofetch neofetch
telegram-desktop telegram-desktop
git-annex git-annex
dmenu
python3 python3
eza eza
bat bat
@@ -59,7 +60,7 @@
git git
waybar waybar
wofi wofi
signal-desktop # signal-desktop
element-desktop element-desktop
# thunderbird # thunderbird
keepassxc keepassxc
@@ -72,12 +73,14 @@
libreoffice libreoffice
borgbackup borgbackup
gnupg gnupg
i3lock-blur
xclip
firefox firefox
thunderbird thunderbird
rofi rofi
go
gopls
]; ];
services.kdeconnect.enable = true;
services.kdeconnect.indicator = true;
programs.taskwarrior = { programs.taskwarrior = {
enable = true; enable = true;
config = { config = {
@@ -147,140 +150,12 @@
EDITOR = "nvim"; EDITOR = "nvim";
VISUAL = "nvim"; VISUAL = "nvim";
LEDGER_FILE = "$HOME/hledger/hledger.journal"; LEDGER_FILE = "$HOME/hledger/hledger.journal";
PATH = "$PATH:$HOME/go/bin";
}; };
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
xsession.windowManager.i3.enable = true;
# xsession.windowManager.i3.package = ; # xsession.windowManager.i3.package = ;
xsession.windowManager.i3.config = {
fonts = {
names = [ "Ubuntu" ];
style = "Regular";
size = 12.0;
};
defaultWorkspace = "workspace 1";
bars = [{
position = "top";
colors.background = "#ef5ffc";
colors.focusedWorkspace = {
text = "#333333";
border = "#ef5ffc";
background = "#a15ffc";
};
colors.inactiveWorkspace = {
text = "#333333";
border = "#ef5ffc";
background = "#ef5ffc";
};
colors.statusline = "#333333";
fonts = {
names = [ "Ubuntu" ];
style = "Regular";
size = 13.0;
};
statusCommand = "~/.borg/i3status-bakage.sh";
extraConfig = ''
height 24
'';
}];
colors.focused = {
border = "#ef5ffc";
background = "#ef5ffc";
text = "#333333";
indicator = "#2e9ef4";
childBorder = "#ef5ffc";
};
floating = {
criteria = [
{
instance = "keepassxc";
class = "KeePassXC";
}
];
};
gaps = {
inner = 8;
smartBorders = "on";
smartGaps = true;
};
keybindings =
let
modifier = config.xsession.windowManager.i3.config.modifier;
menu = config.xsession.windowManager.i3.config.menu;
in lib.mkOptionDefault {
"${modifier}+space" = "exec ${menu}";
"${modifier}+Control+Space" = "focus mode_toggle";
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
# "XF86Launch1" = "exec ~/scripts/sunset.sh";
"${modifier}+Control+p" = "exec i3lock -n -c ef5ffc";
"${modifier}+Control+x" = "exec ~/scripts/scale.sh";
};
menu = "rofi -show drun";
modifier = "Mod4";
window.titlebar = false;
terminal = "alacritty";
window.border = 2;
startup = [
{ command = "feh --bg-scale ~/.config/home-manager/xenia.png"; }
{ command = "keepassxc"; }
];
};
services.redshift = {
enable = true;
latitude = 49.0;
longitude = 9.0;
tray = true;
};
services.caffeine.enable = true;
services.screen-locker.enable = true;
services.screen-locker.lockCmd = "i3lock -n -c ef5ffc";
programs.i3status = {
enable = true;
enableDefault = false;
general = {
colors = true;
interval = 5;
color_good = "#333333";
color_degraded = "#333333";
color_bad = "#333333";
color_separator = "#a15ffc";
separator = " ";
};
modules = {
"volume master".position = 1;
"wireless wlp2s0" = {
position = 2;
settings = {
format_up = "%essid %bitrate";
format_down = "down";
};
};
"battery 0" = {
position = 3;
settings = {
color_good = "#333333";
color_degraded = "#d6cf19";
color_bad = "#d6191f";
format = "%status %percentage %remaining";
status_chr = "C";
status_bat = "B";
status_full = "F";
};
};
"time" = {
position = 4;
settings = {
format = "%a, %d.%m.%Y - %H:%M ";
};
};
};
};
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.fish.enable = true; programs.fish.enable = true;
home.shellAliases = { home.shellAliases = {
@@ -293,6 +168,10 @@
backup = "$HOME/.borg/backup.sh"; backup = "$HOME/.borg/backup.sh";
grep = "rg"; grep = "rg";
fox = "cat"; fox = "cat";
t = "task";
hl = "hledger";
mountNas = "systemctl start home-vi-nas.mount";
budget = "hledger print income:krankengeld | grep -Po \'^\\d\\d\\d\\d-\\d\\d-\\d\\d\' | tail -1 | xargs -I{} hledger balance budgets date:{}-today";
}; };
programs.neovim = { programs.neovim = {
enable = true; enable = true;

Submodule private updated: 059a3ea7b4...4619ba0a74

View File

@@ -6,3 +6,4 @@ then
else else
xrandr --output DisplayPort-0 --scale 0.75x0.75 xrandr --output DisplayPort-0 --scale 0.75x0.75
fi fi
feh --bg-scale ~/.config/home-manager/xenia.png

15
x230-wl.nix Normal file
View File

@@ -0,0 +1,15 @@
{ config, pkgs, lib, ... }:
{
programs.alacritty.settings.font.size = lib.mkForce 11;
home.packages = with pkgs; [
wlsunset
];
wayland.windowManager.sway.config = {
startup = [
{ command = "bash ~/scripts/sunset.sh"; }
];
};
}

View File

@@ -1,12 +1,11 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
home.packages = with pkgs; [ imports = [
wlsunset ./home-wl.nix
./x230-wl.nix
]; ];
wayland.windowManager.sway.config = { services.batsignal.enable = true;
startup = [ services.batsignal.extraArgs = [ "-D poweroff" ];
{ command = "bash ~/scripts/sunset.sh"; }
];
};
} }