2024-06-18 20:32:19 +02:00
|
|
|
{ moduleWithSystem, ... }: {
|
|
|
|
flake.homeManagerModules = {
|
|
|
|
dev = moduleWithSystem (
|
|
|
|
top@{ ... }:
|
|
|
|
perSystem@{ pkgs, ... }: {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
openssh
|
|
|
|
procs
|
|
|
|
ripgrep
|
|
|
|
fswatch
|
|
|
|
nvim
|
|
|
|
];
|
2024-07-05 16:40:04 +02:00
|
|
|
programs = {
|
|
|
|
git = {
|
|
|
|
enable = true;
|
|
|
|
delta.enable = true;
|
|
|
|
userName = pkgs.lib.mkDefault "Ivan Kirilov Dimitrov";
|
|
|
|
userEmail = pkgs.lib.mkDefault "ivan@idimitrov.dev";
|
|
|
|
signing = {
|
|
|
|
signByDefault = true;
|
|
|
|
key = "ivan@idimitrov.dev";
|
|
|
|
};
|
|
|
|
extraConfig = {
|
|
|
|
color.ui = "auto";
|
|
|
|
pull.rebase = true;
|
|
|
|
push.autoSetupRemote = true;
|
|
|
|
};
|
|
|
|
aliases = {
|
|
|
|
a = "add .";
|
|
|
|
c = "commit";
|
|
|
|
d = "diff --cached";
|
|
|
|
p = "push";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.pueue.enable = true;
|
2024-06-18 20:32:19 +02:00
|
|
|
}
|
|
|
|
);
|
2024-07-05 16:40:04 +02:00
|
|
|
shell = moduleWithSystem (
|
2024-06-18 20:32:19 +02:00
|
|
|
top@{ ... }:
|
|
|
|
perSystem@{ pkgs, ... }: {
|
2024-07-05 16:40:04 +02:00
|
|
|
programs = {
|
|
|
|
zsh = {
|
|
|
|
enable = true;
|
|
|
|
dotDir = ".config/zsh";
|
|
|
|
defaultKeymap = "viins";
|
|
|
|
enableVteIntegration = true;
|
|
|
|
syntaxHighlighting.enable = true;
|
|
|
|
autosuggestion.enable = true;
|
|
|
|
loginExtra = ''
|
|
|
|
[ "$(tty)" = "/dev/tty1" ] && exec sway
|
|
|
|
'';
|
|
|
|
sessionVariables = {
|
|
|
|
TERM = "screen-256color";
|
|
|
|
};
|
|
|
|
shellAliases = {
|
|
|
|
cal = "cal $(date +%Y)";
|
|
|
|
GG = "git add . && git commit -m 'GG' && git push --set-upstream origin HEAD";
|
|
|
|
gad = "git add . && git diff --cached";
|
|
|
|
gac = "ga && gc";
|
|
|
|
gach = "gac -C HEAD";
|
|
|
|
ga = "git add .";
|
|
|
|
gc = "git commit";
|
|
|
|
dev = "nix develop --command $SHELL";
|
|
|
|
ls = "${pkgs.nushell}/bin/nu -c 'ls'";
|
|
|
|
la = "${pkgs.nushell}/bin/nu -c 'ls -al'";
|
|
|
|
torrent = "transmission-remote";
|
|
|
|
vi = "nvim";
|
|
|
|
sc = "systemctl";
|
|
|
|
};
|
|
|
|
shellGlobalAliases.comp = "-vcodec libx265 -crf 28";
|
|
|
|
history.expireDuplicatesFirst = true;
|
|
|
|
historySubstringSearch.enable = true;
|
|
|
|
};
|
|
|
|
tmux = {
|
|
|
|
enable = true;
|
|
|
|
clock24 = true;
|
|
|
|
baseIndex = 1;
|
|
|
|
escapeTime = 0;
|
|
|
|
keyMode = "vi";
|
|
|
|
shell = "\${SHELL}";
|
|
|
|
terminal = "screen-256color";
|
|
|
|
plugins = with pkgs.tmuxPlugins; [ tilish catppuccin ];
|
|
|
|
extraConfig = ''
|
|
|
|
set-option -a terminal-features 'screen-256color:RGB'
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
nushell = {
|
|
|
|
enable = true;
|
|
|
|
environmentVariables = {
|
|
|
|
config = ''
|
|
|
|
{
|
|
|
|
show_banner: false,
|
|
|
|
completions: {
|
|
|
|
quick: false
|
|
|
|
partial: false
|
|
|
|
algorithm: "prefix"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
PATH = "($env.PATH | split row (char esep) | append ($env.HOME | path join .local bin))";
|
|
|
|
};
|
|
|
|
shellAliases = {
|
|
|
|
gcal = ''
|
|
|
|
bash -c "cal $(date +%Y)"
|
|
|
|
'';
|
|
|
|
la = "ls -al";
|
|
|
|
dev = "nix develop --command $env.SHELL";
|
|
|
|
torrent = "transmission-remote";
|
|
|
|
vi = "nvim";
|
|
|
|
sc = "systemctl";
|
|
|
|
neofetch = "${pkgs.fastfetch}/bin/fastfetch -c all.jsonc";
|
|
|
|
};
|
|
|
|
loginFile.text = ''
|
|
|
|
if (tty) == "/dev/tty1" {
|
|
|
|
sway
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
starship = {
|
|
|
|
enable = true;
|
|
|
|
enableNushellIntegration = true;
|
|
|
|
enableZshIntegration = true;
|
|
|
|
enableBashIntegration = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.pueue.enable = true;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
base = moduleWithSystem (
|
|
|
|
top@{ ... }:
|
|
|
|
perSystem@{ pkgs, ... }: {
|
|
|
|
programs.home-manager.enable = true;
|
2024-06-18 20:32:19 +02:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
gopass
|
|
|
|
ffmpeg
|
2024-07-01 21:28:59 +02:00
|
|
|
transmission_4
|
2024-06-23 15:38:55 +02:00
|
|
|
speedtest-cli
|
2024-06-18 20:32:19 +02:00
|
|
|
];
|
2024-07-05 16:40:04 +02:00
|
|
|
bat = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2024-06-18 20:32:19 +02:00
|
|
|
}
|
|
|
|
);
|
|
|
|
random = moduleWithSystem (
|
|
|
|
top@{ ... }:
|
|
|
|
perSystem@{ pkgs, ... }: {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
xonotic
|
2024-06-23 19:02:57 +02:00
|
|
|
tor-browser
|
2024-06-25 21:16:25 +02:00
|
|
|
electrum
|
2024-06-26 00:05:42 +02:00
|
|
|
bisq-desktop
|
2024-06-18 20:32:19 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
2024-07-05 16:40:04 +02:00
|
|
|
sway = moduleWithSystem (
|
|
|
|
top@{ ... }:
|
|
|
|
perSystem@{ pkgs, ... }: {
|
|
|
|
wayland.windowManager.sway = {
|
|
|
|
enable = true;
|
|
|
|
catppuccin.enable = true;
|
|
|
|
systemd.enable = true;
|
|
|
|
config = rec {
|
|
|
|
menu = "rofi -show run";
|
|
|
|
terminal = "kitty";
|
|
|
|
modifier = "Mod4";
|
|
|
|
startup = [
|
|
|
|
{ command = "swaymsg 'workspace 1; exec kitty'"; }
|
|
|
|
{ command = "swaymsg 'workspace 2; exec firefox'"; }
|
|
|
|
];
|
|
|
|
bars = [ ];
|
|
|
|
window.titlebar = false;
|
|
|
|
keybindings = pkgs.lib.mkOptionDefault {
|
|
|
|
# Audio
|
|
|
|
"XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
|
|
|
"XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
|
|
|
"XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
|
|
|
"Alt+XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ +5%";
|
|
|
|
"Alt+XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%";
|
|
|
|
"XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
|
|
|
# Display
|
|
|
|
"Alt+Shift+l" = "exec ${pkgs.swaylock}/bin/swaylock"; # Lock screen
|
|
|
|
"XF86ScreenSaver" = "output 'eDP-1' toggle"; # Turn screen off
|
|
|
|
"XF86MonBrightnessUp" = "exec doas ${pkgs.light}/bin/light -A 10";
|
|
|
|
"XF86MonBrightnessDown" = "exec doas ${pkgs.light}/bin/light -U 10";
|
|
|
|
# Programs
|
|
|
|
"${modifier}+p" = "exec ${menu}";
|
|
|
|
"${modifier}+Shift+a" = "exec screenshot area";
|
|
|
|
"${modifier}+Shift+s" = "exec screenshot";
|
|
|
|
"${modifier}+c" = "exec ${pkgs.sal}/bin/sal";
|
|
|
|
"End" = "exec rofi -show calc";
|
|
|
|
# sway commands
|
|
|
|
"${modifier}+Shift+r" = "reload";
|
|
|
|
"${modifier}+Shift+c" = "kill";
|
|
|
|
"${modifier}+Shift+q" = "exit";
|
|
|
|
};
|
|
|
|
input = {
|
|
|
|
"*" = {
|
|
|
|
xkb_layout = "us,bg";
|
|
|
|
xkb_options = "grp:win_space_toggle";
|
|
|
|
xkb_variant = ",phonetic";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
swaynag = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
audacity
|
|
|
|
gimp
|
|
|
|
grim
|
|
|
|
libnotify
|
|
|
|
libreoffice-qt
|
|
|
|
mupdf
|
|
|
|
slurp
|
|
|
|
wl-clipboard
|
|
|
|
xdg-user-dirs
|
|
|
|
xdg-utils
|
|
|
|
xwayland
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
2024-06-18 20:32:19 +02:00
|
|
|
all = moduleWithSystem
|
|
|
|
(
|
|
|
|
top@{ ... }:
|
|
|
|
perSystem@{ pkgs, ... }:
|
|
|
|
rec {
|
|
|
|
imports = [ ../programs ];
|
|
|
|
|
|
|
|
gtk = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
home = rec {
|
|
|
|
username = "ivand";
|
|
|
|
homeDirectory = "/home/ivand";
|
|
|
|
sessionPath = [
|
|
|
|
"$HOME/.local/bin"
|
|
|
|
];
|
|
|
|
sessionVariables = {
|
|
|
|
PASSWORD_STORE_DIR = "${homeDirectory}/.password-store";
|
|
|
|
EDITOR = "nvim";
|
|
|
|
PAGER = "bat";
|
|
|
|
TERM = "screen-256color";
|
2024-06-23 17:09:24 +02:00
|
|
|
MAKEFLAGS = "-j 4";
|
2024-06-18 20:32:19 +02:00
|
|
|
};
|
2024-06-28 11:14:10 +02:00
|
|
|
pointerCursor = with pkgs; {
|
|
|
|
name = lib.mkForce "BreezeX-RosePine-Linux";
|
|
|
|
package = lib.mkForce rose-pine-cursor;
|
2024-06-25 09:31:17 +02:00
|
|
|
size = 24;
|
|
|
|
gtk.enable = true;
|
2024-06-18 20:32:19 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user = {
|
|
|
|
timers = {
|
|
|
|
rbingwp = {
|
|
|
|
Timer = {
|
|
|
|
OnCalendar = "*-*-* 10:00:00";
|
|
|
|
Persistent = true;
|
|
|
|
};
|
|
|
|
Install = {
|
|
|
|
WantedBy = [ "timers.target" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services = {
|
|
|
|
wpd = {
|
|
|
|
Service = {
|
|
|
|
Environment = [
|
|
|
|
"PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.swaybg}/bin"
|
|
|
|
];
|
|
|
|
ExecStart = [ "${pkgs.nushell}/bin/nu -c 'swaybg -i ((xdg-user-dir PICTURES) | path split | path join bg.png)'" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
bingwp = {
|
|
|
|
Service = {
|
|
|
|
Type = "oneshot";
|
|
|
|
Environment = [
|
|
|
|
"PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.nushell}/bin"
|
|
|
|
];
|
|
|
|
ExecStart = [ "${pkgs.scripts}/bin/bingwp" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
rbingwp = {
|
|
|
|
Install = {
|
|
|
|
WantedBy = [ "sway-session.target" ];
|
|
|
|
};
|
|
|
|
Unit = {
|
|
|
|
Description = "Restart bingwp and wpd services";
|
|
|
|
After = "graphical-session-pre.target";
|
|
|
|
PartOf = "graphical-session.target";
|
|
|
|
};
|
|
|
|
Service = {
|
|
|
|
Type = "oneshot";
|
|
|
|
ExecStart = [ "${pkgs.nushell}/bin/nu -c '${pkgs.systemd}/bin/systemctl --user restart bingwp.service; ${pkgs.systemd}/bin/systemctl --user restart wpd.service'" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
xdg = {
|
|
|
|
enable = true;
|
|
|
|
userDirs = {
|
|
|
|
enable = true;
|
|
|
|
createDirectories = true;
|
|
|
|
desktop = "${home.homeDirectory}/dt";
|
|
|
|
documents = "${home.homeDirectory}/doc";
|
|
|
|
download = "${home.homeDirectory}/dl";
|
|
|
|
pictures = "${home.homeDirectory}/pic";
|
|
|
|
videos = "${home.homeDirectory}/vid";
|
|
|
|
templates = "${home.homeDirectory}/tpl";
|
|
|
|
publicShare = "${home.homeDirectory}/pub";
|
|
|
|
music = "${home.homeDirectory}/mus";
|
|
|
|
};
|
|
|
|
mimeApps = {
|
|
|
|
enable = true;
|
|
|
|
defaultApplications = {
|
|
|
|
"text/html" = "firefox.desktop";
|
|
|
|
"x-scheme-handler/http" = "firefox.desktop";
|
|
|
|
"x-scheme-handler/https" = "firefox.desktop";
|
|
|
|
"x-scheme-handler/about" = "firefox.desktop";
|
|
|
|
"x-scheme-handler/unknown" = "firefox.desktop";
|
|
|
|
"x-scheme-handler/mailto" = "userapp-Thunderbird-LDALA2.desktop";
|
|
|
|
"message/rfc822" = "userapp-Thunderbird-LDALA2.desktop";
|
|
|
|
"x-scheme-handler/mid" = "userapp-Thunderbird-LDALA2.desktop";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
2024-06-18 20:56:19 +02:00
|
|
|
reminders =
|
|
|
|
moduleWithSystem (
|
|
|
|
top@{ ... }:
|
|
|
|
perSystem@{ pkgs, ... }: {
|
|
|
|
systemd.user = {
|
|
|
|
timers = {
|
|
|
|
track-time = {
|
|
|
|
Timer = {
|
|
|
|
OnCalendar = "Mon..Fri *-*-* 16:00:*";
|
|
|
|
Persistent = true;
|
|
|
|
};
|
|
|
|
Install = {
|
|
|
|
WantedBy = [ "timers.target" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services = {
|
|
|
|
track-time = {
|
|
|
|
Service = {
|
|
|
|
Type = "oneshot";
|
|
|
|
ExecStart = [ "${pkgs.libnotify}/bin/notify-send -u critical 'Reminder: Track time'" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
2024-06-19 16:00:50 +02:00
|
|
|
cust = moduleWithSystem (
|
|
|
|
top@{ ... }:
|
|
|
|
perSystem@{ pkgs, ... }: {
|
|
|
|
imports = [ ../programs/zsh ../programs/nushell ../programs/starship ../programs/carapace ../programs/bottom ../programs/firefox ];
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
openssh
|
|
|
|
procs
|
|
|
|
ripgrep
|
|
|
|
fswatch
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
2024-06-18 20:32:19 +02:00
|
|
|
};
|
|
|
|
}
|