19 Commits
i3 ... wayland

Author SHA1 Message Date
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 308 additions and 146 deletions

View File

@@ -47,6 +47,9 @@ borg create --progress --stats --exclude-caches \
--exclude $HOME/tmp \
--exclude $HOME/.local/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
@@ -63,11 +66,25 @@ then
echo "backing up Photo archive..."
cd "/run/media/$USER/$DISK/photos"
git annex sync
set +e
git annex mirror --from=origin
set -e
# set +e
# git annex mirror --from=origin
git annex get
# 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
git annex sync
cd /
udisksctl unmount -b "/dev/disk/by-label/$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

View File

@@ -9,7 +9,7 @@
"wireless wlp6s0" = {
position = 2;
settings = {
format_up = "%essid %bitrate";
format_up = "%essid";
format_down = "down";
};
};
@@ -22,5 +22,6 @@
};
xsession.windowManager.i3.extraConfig = ''
exec xrandr --output DisplayPort-0 --scale 0.75x0.75
exec feh --bg-scale ~/.config/home-manager/xenia.png
'';
}

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 ";
};
};
};
};
}

109
home-wl.nix Normal file
View File

@@ -0,0 +1,109 @@
{ 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
include ~/.config/sway/device-conf
'';
# Let Home Manager install and manage itself.
services.swayidle = {
enable = true;
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.packages = with pkgs; [
feh
gimp
yt-dlp
openssl
killall
sshfs
hledger
@@ -48,7 +50,6 @@
neofetch
telegram-desktop
git-annex
dmenu
python3
eza
bat
@@ -59,7 +60,7 @@
git
waybar
wofi
signal-desktop
# signal-desktop
element-desktop
# thunderbird
keepassxc
@@ -72,12 +73,14 @@
libreoffice
borgbackup
gnupg
i3lock-blur
xclip
firefox
thunderbird
rofi
go
gopls
];
services.kdeconnect.enable = true;
services.kdeconnect.indicator = true;
programs.taskwarrior = {
enable = true;
config = {
@@ -147,140 +150,12 @@
EDITOR = "nvim";
VISUAL = "nvim";
LEDGER_FILE = "$HOME/hledger/hledger.journal";
PATH = "$PATH:$HOME/go/bin";
};
# Let Home Manager install and manage itself.
xsession.windowManager.i3.enable = true;
# 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.fish.enable = true;
home.shellAliases = {
@@ -293,6 +168,10 @@
backup = "$HOME/.borg/backup.sh";
grep = "rg";
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 = {
enable = true;

Submodule private updated: 059a3ea7b4...4619ba0a74

View File

@@ -6,3 +6,4 @@ then
else
xrandr --output DisplayPort-0 --scale 0.75x0.75
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, ... }:
{
home.packages = with pkgs; [
wlsunset
imports = [
./home-wl.nix
./x230-wl.nix
];
wayland.windowManager.sway.config = {
startup = [
{ command = "bash ~/scripts/sunset.sh"; }
];
};
services.batsignal.enable = true;
services.batsignal.extraArgs = [ "-D poweroff" ];
}