Cleanup home-manager modules
This commit is contained in:
parent
6a00933db4
commit
c1d2701998
72 changed files with 551 additions and 580 deletions
|
|
@ -1,54 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
strPalette = with pkgs.rice; palette.toRgbHex rec {
|
||||
inherit (colorPalette) normal bright;
|
||||
dim = colorPalette.dark;
|
||||
|
||||
primary = {
|
||||
background = normal.black;
|
||||
foreground = normal.white;
|
||||
dim_foreground = dim.white;
|
||||
};
|
||||
cursor = {
|
||||
cursor = normal.white;
|
||||
text = normal.black;
|
||||
};
|
||||
vi_mode_cursor = {
|
||||
cursor = normal.white;
|
||||
text = normal.black;
|
||||
};
|
||||
selection.background = dim.blue;
|
||||
search = {
|
||||
matches.background = dim.cyan;
|
||||
bar = {
|
||||
foreground = dim.cyan;
|
||||
background = dim.yellow;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
# Include fonts packages
|
||||
home.packages = [ pkgs.rice.font.monospace.package ];
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# env.TERM = "xterm-256color";
|
||||
env.TERM = "alacritty";
|
||||
scrolling.history = 3000;
|
||||
font = {
|
||||
normal.family = pkgs.rice.font.monospace.name;
|
||||
size = pkgs.rice.font.monospace.size;
|
||||
};
|
||||
window.opacity = pkgs.rice.opacity;
|
||||
mouse = {
|
||||
# hide_when_typing = true;
|
||||
hints.modifiers = "Control";
|
||||
};
|
||||
colors = with pkgs.rice; strPalette // {
|
||||
selection.text = "CellForeground";
|
||||
search.matches.foreground = "CellForeground";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableVteIntegration = true;
|
||||
shellAliases = {
|
||||
"ll" = "ls -l";
|
||||
"la" = "ls -la";
|
||||
".." = "cd ..";
|
||||
};
|
||||
|
||||
bashrcExtra = ''
|
||||
source $HOME/.profile
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "Nord";
|
||||
tabs = "2";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
tomlGenerate = (pkgs.formats.toml {}).generate "bottom-toml";
|
||||
in {
|
||||
home.packages = with pkgs; [ bottom ];
|
||||
xdg.configFile."bottom/bottom.toml".source = tomlGenerate {
|
||||
"flags" = {
|
||||
"left_legend" = true;
|
||||
"color" = "nord";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
programs.broot = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
monitorPages = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX" "X" ];
|
||||
strPalette = pkgs.rice.palette.toRGBHex pkgs.rice.colorPalette;
|
||||
xrandr = "${pkgs.xorg.xrandr}/bin/xrandr";
|
||||
in
|
||||
{
|
||||
xsession.windowManager.bspwm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
border_width = 2;
|
||||
border_radius = 8;
|
||||
window_gap = 4;
|
||||
split_ratio = 0.5;
|
||||
top_padding = 0;
|
||||
borderless_monocle = true;
|
||||
gapless_monocle = false;
|
||||
normal_border_color = strPalette.normal.blue;
|
||||
focused_border_color = strPalette.bright.blue;
|
||||
};
|
||||
monitors = {
|
||||
# Intel
|
||||
"eDP1" = monitorPages;
|
||||
"DP1" = monitorPages;
|
||||
|
||||
# Nvidia
|
||||
"eDP-1-1" = monitorPages;
|
||||
"HDMI-0" = monitorPages;
|
||||
"DP-1-1" = monitorPages;
|
||||
};
|
||||
extraConfig = ''
|
||||
${pkgs.wmname}/bin/wmname LG3D
|
||||
${pkgs.polybar}/bin/polybar-msg cmd restart
|
||||
|
||||
if grep DP-1-1 <(${xrandr} --listactivemonitors); then
|
||||
${xrandr} --output DP-1-1 --auto --left-of HDMI-0 --rotate right ||
|
||||
${xrandr} --output DP-1-1 --auto --left-of eDP-1-1 --rotate right
|
||||
elif grep DP1 <(${xrandr} --listactivemonitors); then
|
||||
${xrandr} --output DP-1-1 --auto --above eDP1;
|
||||
fi
|
||||
|
||||
systemctl --user restart polybar.service update-background.service || true
|
||||
'';
|
||||
startupPrograms = [];
|
||||
};
|
||||
|
||||
# xdg.configFile."bspwm/bspwmrc" = {
|
||||
# executable = true;
|
||||
# text = ''
|
||||
# #!/bin/sh
|
||||
|
||||
# bspc monitor DP1 -d I II III IV V VI VII VIII IX X
|
||||
# bspc monitor HDMI-0 -d I II III IV V VI VII VIII IX X
|
||||
# bspc monitor eDP-1-1 -d I II III IV V VI VII VIII IX X
|
||||
# bspc monitor eDP1 -d I II III IV V VI VII VIII IX X
|
||||
# bspc config border_radius 8
|
||||
# bspc config border_width 2
|
||||
# bspc config borderless_monocle true
|
||||
# bspc config focused_border_color '#678EBD'
|
||||
# bspc config gapless_monocle false
|
||||
# bspc config normal_border_color '#5E81AC'
|
||||
# bspc config split_ratio 0.500000
|
||||
# bspc config top_padding 0
|
||||
# bspc config window_gap 4
|
||||
# # java gui fixes
|
||||
# export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
# bspc rule -a sun-awt-X11-XDialogPeer state=floating
|
||||
|
||||
# sleep 2
|
||||
# polybar-msg cmd restart
|
||||
# '';
|
||||
# };
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
home.file.".editorconfig".text = ''
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
# max_line_length = 120
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.py]
|
||||
indent_size = 4
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
programs.dircolors = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
rofi_dmenu = "${pkgs.rofi} -dmenu";
|
||||
firefox = "${pkgs.firefox}/bin/firefox";
|
||||
dmenu = "${pkgs.dmenu}/bin/dmenu";
|
||||
palette = pkgs.rice.palette.toRGBHex pkgs.rice.colorPalette;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [ dunst rice.font.normal.package ];
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
package = pkgs.qogir-icon-theme;
|
||||
name = "Qogir-dark";
|
||||
};
|
||||
settings = {
|
||||
global = {
|
||||
monitor = 0;
|
||||
follow = "mouse";
|
||||
geometry = "300x6-20+50";
|
||||
indicate_hidden = "yes";
|
||||
shrink = "yes";
|
||||
transparency = 10;
|
||||
notification_height = 0;
|
||||
separator_height = 2;
|
||||
padding = 8;
|
||||
horizontal_padding = 8;
|
||||
frame_width = 2;
|
||||
frame_color = palette.normal.black;
|
||||
separator_color = palette.normal.blue;
|
||||
sort = "yes";
|
||||
idle_threshold = 120;
|
||||
|
||||
font = "${pkgs.rice.font.normal.name} 10";
|
||||
line_height = 0;
|
||||
markup = "full";
|
||||
format = "<b>%s</b>\\n%b";
|
||||
alignment = "left";
|
||||
show_age_threshold = 60;
|
||||
word_wrap = "yes";
|
||||
ellipsize = "middle";
|
||||
ignore_newline = "no";
|
||||
stack_duplicates = "true";
|
||||
hide_duplicate_count = "false";
|
||||
show_indicators = "yes";
|
||||
icon_position = "off";
|
||||
max_icon_size = 32;
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
dmenu = "${dmenu} -p dunst:";
|
||||
browser = "${firefox} -new-tab";
|
||||
always_run_script = "true";
|
||||
title = "Dunst";
|
||||
class = "Dunst";
|
||||
startup_notification = "false";
|
||||
verbosity = "mesg";
|
||||
corner_radius = 0;
|
||||
force_xinerama = "false";
|
||||
mouse_left_click = "close_current";
|
||||
mouse_middle_click = "do_action";
|
||||
mouse_right_click = "close_all";
|
||||
};
|
||||
urgency_low = {
|
||||
background = palette.normal.black;
|
||||
foreground = palette.normal.white;
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_normal = {
|
||||
background = palette.normal.black;
|
||||
foreground = palette.normal.white;
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_critical = {
|
||||
background = palette.normal.black;
|
||||
foreground = palette.normal.white;
|
||||
frame_color = palette.bright.red;
|
||||
timeout = 0;
|
||||
};
|
||||
shortcuts = {
|
||||
close = "ctrl+space";
|
||||
close_all = "ctrl+shift+space";
|
||||
history = "ctrl+backslash";
|
||||
context = "ctrl+shift+period";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
dejavu_fonts
|
||||
noto-fonts
|
||||
noto-fonts-extra
|
||||
noto-fonts-cjk
|
||||
font-awesome
|
||||
];
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
tmux.enableShellIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
121
modules/git.nix
121
modules/git.nix
|
|
@ -1,121 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
kak = "${pkgs.kakoune}/bin/kak";
|
||||
meld = "${pkgs.meld}/bin/meld";
|
||||
shellAliases = {
|
||||
"g" = "git";
|
||||
"ga" = "git add";
|
||||
"gaa" = "git add --all";
|
||||
"gau" = "git add --update";
|
||||
"gav" = "git add --verbose";
|
||||
"gb" = "git branch";
|
||||
"gba" = "git branch -a";
|
||||
"gbd" = "git branch -d";
|
||||
"gbD" = "git branch -D";
|
||||
"gbl" = "git blame -b -w";
|
||||
"gbnm" = "git branch --no-merged";
|
||||
"gbr" = "git branch --remote";
|
||||
"gbs" = "git bisect";
|
||||
"gbsb" = "git bisect bad";
|
||||
"gbsg" = "git bisect good";
|
||||
"gbsr" = "git bisect reset";
|
||||
"gbss" = "git bisect start";
|
||||
"gc" = "git commit -v";
|
||||
"gc!" = "git commit -v --amend";
|
||||
"gcn!" = "git commit -v --no-edit --amend";
|
||||
"gca" = "git commit -v -a";
|
||||
"gca!" = "git commit -v -a --amend";
|
||||
"gcan!" = "git commit -v -a --no-edit --amend";
|
||||
"gcans!" = "git commit -v -a -s --no-edit --amend";
|
||||
"gcas" = "git commit -a -s";
|
||||
"gcb" = "git checkout -b";
|
||||
"gcl" = "git clone --recurse-submodules";
|
||||
"gclean" = "git clean -id";
|
||||
"gpristine" = "git reset --hard && git clean -dffx";
|
||||
"gco" = "git checkout";
|
||||
"gcount" = "git shortlog -sn";
|
||||
"gcp" = "git cherry-pick";
|
||||
"gcpa" = "git cherry-pick --abort";
|
||||
"gcpc" = "git cherry-pick --continue";
|
||||
"gd" = "git diff";
|
||||
"gdca" = "git diff --cached";
|
||||
"gdcw" = "git diff --cached --word-diff";
|
||||
"gdct" = "git describe --tags $(git rev-list --tags --max-count=1)";
|
||||
"gds" = "git diff --staged";
|
||||
"gdt" = "git diff-tree --no-commit-id --name-only -r";
|
||||
"gdw" = "git diff --word-diff";
|
||||
"gf" = "git fetch";
|
||||
"gfa" = "git fetch --all --prune";
|
||||
"gfg" = "git ls-files \| grep";
|
||||
"gignored" = ''git ls-files -v \| grep"^[[ :lower: ]]"'';
|
||||
"glo" = "git log --oneline --decorate";
|
||||
"glols" = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --stat";
|
||||
"glola" = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all";
|
||||
"glog" = "git log --oneline --decorate --graph";
|
||||
"gloga" = "git log --oneline --decorate --graph --all";
|
||||
"gm" = "git merge";
|
||||
"gma" = "git merge --abort";
|
||||
"gp" = "git push";
|
||||
"gpa" = "git push --all";
|
||||
"gpf!" = "git push --force";
|
||||
"gpoat" = "git push origin --all && git push origin --tags";
|
||||
"gpu" = "git push upstream";
|
||||
"gpv" = "git push -v";
|
||||
"gr" = "git remote";
|
||||
"gra" = "git remote add";
|
||||
"grb" = "git rebase";
|
||||
"grba" = "git rebase --abort";
|
||||
"grbc" = "git rebase --continue";
|
||||
"grbi" = "git rebase -i";
|
||||
"grev" = "git revert";
|
||||
"grh" = "git reset";
|
||||
"grhh" = "git reset --hard";
|
||||
"grm" = "git rm";
|
||||
"grmc" = "git rm --cached";
|
||||
"grs" = "git restore";
|
||||
"grv" = "git remote -v";
|
||||
"gss" = "git status -s";
|
||||
"gst" = "git status";
|
||||
"gsta" = "git stash push";
|
||||
"gstas" = "git stash save";
|
||||
"gstaa" = "git stash apply";
|
||||
"gstc" = "git stash clear";
|
||||
"gstd" = "git stash drop";
|
||||
"gstl" = "git stash list";
|
||||
"gstp" = "git stash pop";
|
||||
"gsts" = "git stash show --text";
|
||||
"gup" = "git pull --rebase";
|
||||
"gupv" = "git pull --rebase -v";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Filippo Berto";
|
||||
userEmail = "berto.f@protonmail.com";
|
||||
# signing = {
|
||||
# key = "berto.f@protonmail.com";
|
||||
# signByDefault = true;
|
||||
# };
|
||||
extraConfig = {
|
||||
commit.gpgSign = true;
|
||||
core.editor = kak;
|
||||
credential.helper = "cache --timeout = 3600 ";
|
||||
diff.guitool = meld;
|
||||
init.defaultBranch = "main";
|
||||
merge.guitool = meld;
|
||||
pull.rebase = true;
|
||||
rebase.autoStash = true;
|
||||
user.signingKey = "berto.f@protonmail.com";
|
||||
};
|
||||
lfs.enable = true;
|
||||
delta.enable = true;
|
||||
};
|
||||
programs.bash.shellAliases = shellAliases;
|
||||
programs.zsh.shellAliases = shellAliases;
|
||||
home.packages = with pkgs; [
|
||||
gh
|
||||
git-secret
|
||||
glab
|
||||
];
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
programs.go = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 600;
|
||||
# extraConfig = "allow-loopback-pinentry";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.grobi = {
|
||||
enable = true;
|
||||
rules = [
|
||||
{
|
||||
name = "Nvidia2screens";
|
||||
outputs_connected = [ "HDMI-0" "eDP-1-1" ];
|
||||
configure_column = [ "HDMI-0" "eDP-1-1" ];
|
||||
primary = "HDMI-0";
|
||||
}
|
||||
{
|
||||
name = "FallbackIntel";
|
||||
outputs_connected = [ "eDP1" ];
|
||||
configure_single = "eDP1";
|
||||
}
|
||||
{
|
||||
name = "FallbackNvidia";
|
||||
outputs_connected = [ "eDP-1-1" ];
|
||||
configure_single = "eDP-1-1";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
gtk = with pkgs.rice; {
|
||||
enable = true;
|
||||
font = font.normal;
|
||||
iconTheme = {
|
||||
package = pkgs.qogir-icon-theme;
|
||||
name = "Qogir-dark";
|
||||
};
|
||||
theme = {
|
||||
package = pkgs.nordic;
|
||||
name = "Nordic-bluish-accent";
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk";
|
||||
};
|
||||
|
||||
xsession = {
|
||||
pointerCursor = {
|
||||
package = pkgs.qogir-icon-theme;
|
||||
name = "Qogir";
|
||||
size = 24;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
programs.info = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{ pkgs, ...}:
|
||||
{ programs.java.enable = true;
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake";
|
||||
in
|
||||
{
|
||||
systemd.user.services."joystickwake" = {
|
||||
Unit = {
|
||||
Description = "Keep lockscreen from activating";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = joystickwakeCmd;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
programs.jq = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,453 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
strPalette = with pkgs.rice;
|
||||
palette.toRgbShortHex colorPalette;
|
||||
packages = with pkgs;
|
||||
[
|
||||
(pkgs.makeDesktopItem
|
||||
{
|
||||
name = "kakoune";
|
||||
exec = "kak %U";
|
||||
icon = "kakoune";
|
||||
desktopName = "Kakoune";
|
||||
comment = "Kakoune text editor";
|
||||
terminal = true;
|
||||
categories = [ "Development" ];
|
||||
})
|
||||
] ++ [
|
||||
# editorconfig-core-c
|
||||
python3.pkgs.editorconfig
|
||||
] ++ (
|
||||
[
|
||||
clang-tools
|
||||
]
|
||||
) ++ (
|
||||
[
|
||||
yaml-language-server
|
||||
nodePackages.vscode-langservers-extracted
|
||||
]
|
||||
) ++ (
|
||||
[
|
||||
nodePackages.vscode-langservers-extracted
|
||||
]
|
||||
) ++ (
|
||||
[
|
||||
flow
|
||||
]
|
||||
) ++ (
|
||||
[
|
||||
texlab
|
||||
]
|
||||
) ++ (
|
||||
[
|
||||
rnix-lsp
|
||||
]
|
||||
) ++ (
|
||||
with python3.pkgs;
|
||||
[
|
||||
black
|
||||
# pyls-black
|
||||
pyls-flake8
|
||||
pyls-isort
|
||||
# pyls-mypy
|
||||
python-lsp-server
|
||||
]
|
||||
) ++ (
|
||||
[
|
||||
cargo
|
||||
cargo-watch
|
||||
clippy
|
||||
rust-analyzer
|
||||
rustc
|
||||
rustfmt
|
||||
]
|
||||
) ++ (
|
||||
[
|
||||
nodePackages.bash-language-server
|
||||
]
|
||||
) ++ (
|
||||
[
|
||||
aspell
|
||||
aspellDicts.en
|
||||
aspellDicts.en-computers
|
||||
aspellDicts.en-science
|
||||
aspellDicts.it
|
||||
]
|
||||
);
|
||||
|
||||
in
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = "kak";
|
||||
VISUAL = "kak";
|
||||
};
|
||||
programs.bash.shellAliases = { k = "kak"; };
|
||||
programs.zsh.shellAliases = { k = "kak"; };
|
||||
home.packages = packages;
|
||||
programs.kakoune = {
|
||||
enable = true;
|
||||
config = {
|
||||
colorScheme = "nord";
|
||||
tabStop = 2;
|
||||
indentWidth = 2;
|
||||
alignWithTabs = true;
|
||||
scrollOff = {
|
||||
lines = 5;
|
||||
columns = 3;
|
||||
};
|
||||
ui = {
|
||||
setTitle = true;
|
||||
changeColors = true;
|
||||
enableMouse = true;
|
||||
};
|
||||
wrapLines = {
|
||||
enable = true;
|
||||
word = true;
|
||||
};
|
||||
numberLines = {
|
||||
enable = true;
|
||||
highlightCursor = true;
|
||||
};
|
||||
keyMappings = with pkgs;
|
||||
[
|
||||
{
|
||||
mode = "normal";
|
||||
docstring = "Edit file";
|
||||
key = "<c-e>";
|
||||
effect = ":edit<space>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Code actions";
|
||||
key = "a";
|
||||
effect = ":lsp-code-actions<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Comment block";
|
||||
key = "b";
|
||||
effect = ":comment-block<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Comment line";
|
||||
key = "l";
|
||||
effect = ":comment-line<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Copy to clipboard";
|
||||
key = "y";
|
||||
effect = "<a-|>${xclip}/bin/xclip -i -selection clipboard<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Format code with formatter";
|
||||
key = "f";
|
||||
effect = ":format<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Format code with LSP";
|
||||
key = "F";
|
||||
effect = ":lsp-formatting-sync<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Jump to definition";
|
||||
key = "d";
|
||||
effect = ":lsp-definition<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Rename object";
|
||||
key = "r";
|
||||
effect = ":lsp-rename-prompt<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Jump to type definition";
|
||||
key = "t";
|
||||
effect = ":lsp-type-definition<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "List project diagnostics";
|
||||
key = "i";
|
||||
effect = ":lsp-diagnostics<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Paste from clipboard (after)";
|
||||
key = "P";
|
||||
effect = "<a-!>${xclip}/bin/xclip -selection clipboard -o<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Paste from clipboard (before)";
|
||||
key = "p";
|
||||
effect = "!${xclip}/bin/xclip -selection clipboard -o<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Show hover info";
|
||||
key = "q";
|
||||
effect = ":lsp-hover<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Spellcheck English";
|
||||
key = "S";
|
||||
effect = ":spell en<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Spellcheck";
|
||||
key = "s";
|
||||
effect = ":spell ";
|
||||
}
|
||||
{
|
||||
mode = "normal";
|
||||
docstring = "Try next snippet placeholder";
|
||||
key = "<c-n>";
|
||||
effect = "<a-;>: insert-c-n<ret>";
|
||||
}
|
||||
# {
|
||||
# mode = "normal";
|
||||
# docstring = "Search";
|
||||
# key = "/";
|
||||
# effect = "/(?i)";
|
||||
# }
|
||||
# {
|
||||
# mode = "normal";
|
||||
# docstring = "Reverse search";
|
||||
# key = "<a-/>";
|
||||
# effect = "<a-/>(?i)";
|
||||
# }
|
||||
];
|
||||
hooks = with pkgs;
|
||||
[
|
||||
{
|
||||
name = "BufCreate";
|
||||
option = ".*";
|
||||
commands = "editorconfig-load";
|
||||
}
|
||||
# {
|
||||
# name = "ModuleLoaded";
|
||||
# option = "auto-pairs";
|
||||
# commands = "auto-pairs-enable";
|
||||
# }
|
||||
{
|
||||
name = "ModuleLoaded";
|
||||
option = "powerline";
|
||||
commands = builtins.concatStringsSep "\n" [ "powerline-enable" ];
|
||||
}
|
||||
] ++ (
|
||||
[
|
||||
{
|
||||
name = "BufSetOption";
|
||||
option = "filetype=latex";
|
||||
commands = "set-option buffer formatcmd ${texlive.bin.latexindent}/bin/latexindent";
|
||||
}
|
||||
]
|
||||
) ++ (
|
||||
[
|
||||
{
|
||||
name = "BufSetOption";
|
||||
option = "filetype=python";
|
||||
commands = "set-option buffer formatcmd '${python3.pkgs.black}/bin/black -'";
|
||||
}
|
||||
]
|
||||
) ++ (
|
||||
[
|
||||
{
|
||||
name = "BufSetOption";
|
||||
option = "filetype=(markdown|html|json|yaml|css|scss|less)";
|
||||
commands = "set-option buffer formatcmd ${nodePackages.prettier}/bin/prettier";
|
||||
}
|
||||
]
|
||||
);
|
||||
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
|
||||
};
|
||||
extraConfig = builtins.concatStringsSep "\n" [
|
||||
"# Custom commands"
|
||||
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
||||
"eval %sh{kak-lsp --kakoune -s $kak_session}"
|
||||
"lsp-enable"
|
||||
''
|
||||
def -hidden insert-c-n %{
|
||||
try %{
|
||||
lsp-snippets-select-next-placeholders
|
||||
exec '<a-;>d'
|
||||
} catch %{
|
||||
exec -with-hooks '<c-n>'
|
||||
}
|
||||
}
|
||||
''
|
||||
"require-module powerline"
|
||||
"powerline-start"
|
||||
"require-module connect-broot"
|
||||
"require-module connect-lf"
|
||||
"require-module connect-rofi"
|
||||
];
|
||||
plugins = with pkgs.kakounePlugins; [
|
||||
prelude-kak
|
||||
kak-lsp
|
||||
auto-pairs-kak
|
||||
powerline-kak
|
||||
connect-kak
|
||||
];
|
||||
};
|
||||
xdg.configFile."kak/colors/nord.kak".text = with strPalette; ''
|
||||
set-face global value rgb:${normal.magenta},default
|
||||
set-face global type rgb:${bright.white},default
|
||||
set-face global identifier rgb:${normal.cyan},default
|
||||
set-face global string rgb:${normal.green},default
|
||||
set-face global error rgb:${normal.red},default
|
||||
set-face global keyword rgb:${normal.blue},default
|
||||
set-face global operator rgb:${normal.blue},default
|
||||
set-face global attribute rgb:${bright.blue},default
|
||||
set-face global comment rgb:${bright.blue},default
|
||||
set-face global meta rgb:${normal.yellow},default
|
||||
set-face global Default rgb:${normal.white},default
|
||||
set-face global PrimarySelection rgb:${normal.black},rgb:${dark.yellow}
|
||||
set-face global SecondarySelection rgb:${normal.black},rgb:${dark.white}
|
||||
set-face global PrimaryCursor rgb:${normal.black},rgb:${normal.yellow}
|
||||
set-face global SecondaryCursor rgb:${normal.black},rgb:${normal.white}
|
||||
set-face global MenuForeground rgb:${normal.white},rgb:${bright.black}
|
||||
set-face global MenuBackground default,rgb:${normal.black}
|
||||
set-face global MenuInfo default,rgb:${normal.black}
|
||||
set-face global Information rgb:${dark.black},rgb:${normal.cyan}
|
||||
set-face global StatusLine rgb:${normal.white},rgb:${normal.black}
|
||||
set-face global StatusLineMode rgb:${normal.blue},rgb:${normal.black}
|
||||
set-face global StatusLineInfo rgb:${normal.blue},rgb:${normal.black}
|
||||
set-face global StatusLineValue rgb:${normal.blue},rgb:${normal.black}
|
||||
set-face global StatusCursor rgb:${dark.black},rgb:${normal.yellow}
|
||||
set-face global Prompt rgb:${normal.cyan},rgb:${normal.black}
|
||||
set-face global BufferPadding default,default
|
||||
'';
|
||||
xdg.configFile."kak-lsp/kak-lsp.toml".text = with pkgs; builtins.concatStringsSep "\n"
|
||||
[
|
||||
''
|
||||
snippet_support = false
|
||||
verbosity = 2
|
||||
[server]
|
||||
timeout = 1800 # seconds = 30 minutes
|
||||
''
|
||||
''
|
||||
[language.c_cpp]
|
||||
filetypes = ["c", "cpp"]
|
||||
roots = ["compile_commands.json", ".clangd"]
|
||||
command = "${clang-tools}/bin/clangd"
|
||||
offset_encoding = "utf-8"
|
||||
''
|
||||
''
|
||||
[language.json]
|
||||
filetypes = ["json"]
|
||||
roots = ["package.json"]
|
||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-json-language-server"
|
||||
args = ["--stdio"]
|
||||
[language.yaml]
|
||||
filetypes = ["yaml"]
|
||||
roots = [".git"]
|
||||
command = "${yaml-language-server}/bin/yaml-language-server"
|
||||
args = ["--stdio"]
|
||||
[language.yaml.settings]
|
||||
# See https://github.com/redhat-developer/yaml-language-server#language-server-settings
|
||||
# Defaults are at https://github.com/redhat-developer/yaml-language-server/blob/master/src/yamlSettings.ts
|
||||
yaml.format.enable = true
|
||||
''
|
||||
''
|
||||
[language.go]
|
||||
filetypes = ["go"]
|
||||
roots = ["Gopkg.toml", "go.mod", ".git", ".hg"]
|
||||
command = "gopls"
|
||||
offset_encoding = "utf-8"
|
||||
settings_section = "gopls"
|
||||
[language.go.settings.gopls]
|
||||
# See https://github.com/golang/tools/blob/master/gopls/doc/settings.md
|
||||
# "build.buildFlags" = []
|
||||
''
|
||||
''
|
||||
[language.html]
|
||||
filetypes = ["html"]
|
||||
roots = ["package.json"]
|
||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-html-language-server"
|
||||
args = ["--stdio"]
|
||||
[language.css]
|
||||
filetypes = ["css"]
|
||||
roots = ["package.json", ".git"]
|
||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
||||
args = ["--stdio"]
|
||||
[language.less]
|
||||
filetypes = ["less"]
|
||||
roots = ["package.json", ".git"]
|
||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
||||
args = ["--stdio"]
|
||||
[language.scss]
|
||||
filetypes = ["scss"]
|
||||
roots = ["package.json", ".git"]
|
||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
||||
args = ["--stdio"]
|
||||
''
|
||||
''
|
||||
[language.javascript]
|
||||
filetypes = ["javascript"]
|
||||
roots = [".flowconfig"]
|
||||
command = "${flow}/bin/flow"
|
||||
args = ["lsp"]
|
||||
''
|
||||
''
|
||||
[language.latex]
|
||||
filetypes = ["latex"]
|
||||
roots = [".git"]
|
||||
command = "${texlab}/bin/texlab"
|
||||
settings_section = "texlab"
|
||||
[language.latex.settings.texlab]
|
||||
# See https://github.com/latex-lsp/texlab/blob/master/src/options.rs
|
||||
# bibtexFormatter = "${texlab}/bin/texlab"
|
||||
''
|
||||
''
|
||||
[language.nix]
|
||||
filetypes = ["nix"]
|
||||
roots = ["flake.nix", "shell.nix", ".git"]
|
||||
command = "${rnix-lsp}/bin/rnix-lsp"
|
||||
''
|
||||
''
|
||||
[language.python]
|
||||
filetypes = ["python"]
|
||||
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
|
||||
command = "${python3.pkgs.python-lsp-server}/bin/pylsp"
|
||||
offset_encoding = "utf-8"
|
||||
[language.python.settings]
|
||||
# See https://github.com/palantir/python-language-server#configuration
|
||||
# and https://github.com/palantir/python-language-server/blob/develop/vscode-client/package.json
|
||||
# "pyls.configurationSources" = ["flake8"]
|
||||
''
|
||||
''
|
||||
[language.rust]
|
||||
filetypes = ["rust"]
|
||||
roots = ["Cargo.toml"]
|
||||
command = "${rust-analyzer}/bin/rust-analyzer"
|
||||
settings_section = "rust-analyzer"
|
||||
[language.rust.settings.rust-analyzer]
|
||||
hoverActions.enable = false # kak-lsp doesn't support this at the moment
|
||||
# cargo.features = []
|
||||
# See https://rust-analyzer.github.io/manual.html#configuration
|
||||
# If you get 'unresolved proc macro' warnings, you have two options
|
||||
# 1. The safe choice is two disable the warning:
|
||||
diagnostics.disabled = ["unresolved-proc-macro"]
|
||||
# 2. Or you can opt-in for proc macro support
|
||||
procMacro.enable = true
|
||||
cargo.loadOutDirsFromCheck = true
|
||||
# See https://github.com/rust-analyzer/rust-analyzer/issues/6448
|
||||
''
|
||||
''
|
||||
[language.bash]
|
||||
filetypes = ["sh"]
|
||||
roots = [".git", ".hg"]
|
||||
command = "${nodePackages.bash-language-server}/bin/bash-language-server"
|
||||
args = ["start"]
|
||||
''
|
||||
];
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
config.systemd.user.services.keepassxc = {
|
||||
Unit = {
|
||||
Description = "KeePassXC password manager";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
Partof = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
|
||||
Service = { ExecStart = "${pkgs.keepassxc}/bin/keepassxc"; };
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
programs.keychain = {
|
||||
enable = true;
|
||||
keys = [ "id_ed25519" ];
|
||||
agents = [ "gpg" "ssh" ];
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableXsessionIntegration = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let strPalette = with pkgs.rice; palette.toRgbHex rec {
|
||||
foreground = colorPalette.normal.white;
|
||||
background = colorPalette.normal.black;
|
||||
color0 = colorPalette.normal.black;
|
||||
color1 = colorPalette.normal.red;
|
||||
color2 = colorPalette.normal.green;
|
||||
color3 = colorPalette.normal.yellow;
|
||||
color4 = colorPalette.normal.blue;
|
||||
color5 = colorPalette.normal.magenta;
|
||||
color6 = colorPalette.normal.cyan;
|
||||
color7 = colorPalette.normal.white;
|
||||
color8 = colorPalette.bright.black;
|
||||
color9 = colorPalette.bright.red;
|
||||
color10 = colorPalette.bright.green;
|
||||
color11 = colorPalette.bright.yellow;
|
||||
color12 = colorPalette.bright.blue;
|
||||
color13 = colorPalette.bright.magenta;
|
||||
color14 = colorPalette.bright.cyan;
|
||||
color15 = colorPalette.bright.white;
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
visual_bell_duration = toString 0.1;
|
||||
update_check_interval = 0;
|
||||
background_opacity = toString pkgs.rice.opacity;
|
||||
close_on_child_death = "yes";
|
||||
clipboard_control = "write-clipboard write-primary read-clipboard read-primary";
|
||||
disable_ligatures = "never";
|
||||
editor = "kak";
|
||||
} // strPalette;
|
||||
keybindings = {
|
||||
"ctrl+shift+t" = "new_tab_with_cwd";
|
||||
"ctrl+shift+enter" = "new_window_with_cwd";
|
||||
};
|
||||
font = pkgs.rice.font.monospace;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{ pkgs, lib, ...}:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.texlive.combined.scheme-full
|
||||
];
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
dircounts = true;
|
||||
icons = true;
|
||||
# mouse = true;
|
||||
number = true;
|
||||
# scrollof = 3;
|
||||
hidden = true;
|
||||
tabstop = 2;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
libinputGesturesCmd = "${pkgs.libinput-gestures}/bin/libinput-gestures";
|
||||
xdotool = "${pkgs.xdotool}/bin/xdotool";
|
||||
in
|
||||
{
|
||||
systemd.user.services."libinput-gestures" = {
|
||||
Unit = {
|
||||
Description = "Touchpad gestures";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = libinputGesturesCmd;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."libinput-gestures.conf".text = ''
|
||||
gesture swipe left ${xdotool} key alt+Right
|
||||
gesture swipe right ${xdotool} key alt+Left
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
services.lorri.enable = true;
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
programs.man = {
|
||||
enable = true;
|
||||
# generateCaches = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.mangohud = {
|
||||
enable = true;
|
||||
enableSessionWide = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
megasyncCmd = "${pkgs.megacmd}/bin/mega-cmd-server";
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.megacmd
|
||||
];
|
||||
|
||||
systemd.user.services."mega-cmd-server" = {
|
||||
Unit = {
|
||||
Description = "Mega command server";
|
||||
After = [ "default.target" ];
|
||||
PartOf = [ "default.target" ];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = megasyncCmd;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
programs.noti = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
# obs-linuxbrowser
|
||||
# obs-gstreamer
|
||||
# obs-move-transition
|
||||
# obs-multi-rtmp
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{pkgs, lib,...}:
|
||||
with pkgs;
|
||||
{
|
||||
home.packages = [
|
||||
# libreoffice-fresh
|
||||
onlyoffice-bin
|
||||
hunspellDicts.en_GB-large
|
||||
hunspellDicts.en_US-large
|
||||
hunspellDicts.it_IT
|
||||
];
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
onedriveCmd = "${pkgs.onedrive}/bin/onedrive --monitor";
|
||||
in
|
||||
{
|
||||
systemd.user.services."onedrive" = {
|
||||
Unit = {
|
||||
Description = "OneDrive synchronization service";
|
||||
After = [ "network.target" ];
|
||||
PartOf = [ "default.target" ];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = onedriveCmd;
|
||||
Restart = "always";
|
||||
RestartSec = "30s";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.picom = {
|
||||
enable = true;
|
||||
|
||||
blur = true;
|
||||
experimentalBackends = true;
|
||||
fade = false;
|
||||
shadow = true;
|
||||
vSync = true;
|
||||
extraOptions = ''
|
||||
blur:
|
||||
{
|
||||
method = "gaussian";
|
||||
size = 10;
|
||||
deviation = 7.0;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,339 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
grep = "${pkgs.gnugrep}/bin/grep";
|
||||
cut = "${pkgs.coreutils}/bin/cut";
|
||||
head = "${pkgs.coreutils}/bin/head";
|
||||
pavucontrol = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||
pkill = "${pkgs.procps}/bin/pkill";
|
||||
playerCtl = "${pkgs.playerctl}/bin/playerctl";
|
||||
playerStatus = "${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata | ${head} -c 60";
|
||||
alacritty = "${pkgs.alacritty}/bin/alacritty";
|
||||
btm = "${pkgs.bottom}/bin/btm";
|
||||
colors = with pkgs.rice; palette.toARGBHex rec {
|
||||
|
||||
normal = {
|
||||
foreground = colorPalette.normal.white;
|
||||
background = colorPalette.normal.black;
|
||||
underline = colorPalette.normal.blue;
|
||||
};
|
||||
|
||||
active = palette.brighten "50%" normal;
|
||||
|
||||
selected = {
|
||||
foreground = colorPalette.bright.white;
|
||||
background = color.tAlphaRgba (v: 240) colorPalette.dark.blue;
|
||||
underline = colorPalette.dark.white;
|
||||
};
|
||||
|
||||
alert = colorPalette.bright.red;
|
||||
|
||||
green = colorPalette.normal.green;
|
||||
yellow = colorPalette.normal.yellow;
|
||||
orange = colorPalette.bright.red;
|
||||
red = colorPalette.normal.red;
|
||||
|
||||
transparent = color.transparent;
|
||||
};
|
||||
|
||||
commonBar = {
|
||||
locale = config.home.language.base;
|
||||
monitor = "\${env:MONITOR}";
|
||||
width = "100%";
|
||||
height = 20;
|
||||
radius = 6.0;
|
||||
fixed-center = false;
|
||||
background = colors.normal.background;
|
||||
foreground = colors.normal.foreground;
|
||||
line-size = 2;
|
||||
line-color = colors.normal.underline;
|
||||
padding = {
|
||||
left = 0;
|
||||
right = 0;
|
||||
};
|
||||
module.margin = { left = 0; right = 0; };
|
||||
separator = " ";
|
||||
border = {
|
||||
color = colors.transparent;
|
||||
left.size = 2;
|
||||
righ.sizet = 2;
|
||||
top.size = 2;
|
||||
bottom.size = 0;
|
||||
};
|
||||
font = [
|
||||
"${pkgs.rice.font.monospace.name}:size=${toString pkgs.rice.font.monospace.size};2"
|
||||
"Material Design Icons:size=${toString pkgs.rice.font.monospace.size};2"
|
||||
"NotoEmoji Nerd Font Mono:size=${toString pkgs.rice.font.monospace.size};0"
|
||||
];
|
||||
wm-restack = "bspwm";
|
||||
};
|
||||
|
||||
ramp = [ "▂" "▃" "▄" "▅" "▆" "▇" ];
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
pkgs.rice.font.monospace.package
|
||||
emojione
|
||||
noto-fonts-emoji
|
||||
material-design-icons
|
||||
];
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
package = pkgs.polybarFull;
|
||||
script =
|
||||
''
|
||||
monitor=`polybar -m | ${grep} primary | ${cut} -d":" -f1`
|
||||
MONITOR=$monitor polybar primary &
|
||||
monitors=(`polybar -m | ${grep} -v primary | ${cut} -d":" -f1`)
|
||||
for monitor in "''${monitors[@]}"; do
|
||||
MONITOR=$monitor polybar secondary &
|
||||
done
|
||||
'';
|
||||
|
||||
settings = {
|
||||
"settings" = {
|
||||
screenchange-reload = false;
|
||||
};
|
||||
|
||||
"bar/primary" = commonBar // {
|
||||
modules-left = "bspwm";
|
||||
# modules-center =
|
||||
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
|
||||
enable-ipc = true;
|
||||
tray = {
|
||||
position = "right";
|
||||
padding = 0;
|
||||
};
|
||||
};
|
||||
|
||||
"bar/secondary" = commonBar // {
|
||||
modules-left = "bspwm";
|
||||
# modules-center =
|
||||
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
|
||||
enable-ipc = true;
|
||||
};
|
||||
|
||||
"module/battery" = {
|
||||
type = "internal/battery";
|
||||
|
||||
adapter = "AC";
|
||||
battery = "BAT0";
|
||||
full.at = 98;
|
||||
|
||||
animation = {
|
||||
charging = {
|
||||
text = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
framerate = "750";
|
||||
};
|
||||
discharging = {
|
||||
text = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
framerate = "750";
|
||||
};
|
||||
};
|
||||
|
||||
format = {
|
||||
charging = colors.selected // {
|
||||
padding = 1;
|
||||
text = "<animation-charging> <label-charging>";
|
||||
};
|
||||
discharging = colors.active // {
|
||||
padding = 1;
|
||||
text = "<animation-discharging> <label-discharging>";
|
||||
};
|
||||
full = colors.normal // {
|
||||
padding = 1;
|
||||
text = " <label-full>";
|
||||
};
|
||||
};
|
||||
|
||||
label = {
|
||||
chargin = "%percentage%%";
|
||||
dischargin = "%percentage%%";
|
||||
full = "%percentage%%";
|
||||
};
|
||||
};
|
||||
|
||||
"module/bspwm" = {
|
||||
type = "internal/bspwm";
|
||||
format = "<label-state>";
|
||||
|
||||
label = let
|
||||
common = {
|
||||
padding = 1;
|
||||
separator = " ";
|
||||
text = "%name%";
|
||||
};
|
||||
in
|
||||
{
|
||||
focused = colors.selected // common;
|
||||
occupied = colors.active // common;
|
||||
urgent = colors.active // common // { background = colors.alert; };
|
||||
empty = colors.normal // common // { text = ""; padding = 0; };
|
||||
};
|
||||
};
|
||||
|
||||
"module/cpu" = {
|
||||
type = "internal/cpu";
|
||||
format = colors.normal // {
|
||||
text = " <label>";
|
||||
padding = 1;
|
||||
};
|
||||
interval = 2;
|
||||
label = "%percentage-sum%%";
|
||||
ramp-load = ramp;
|
||||
};
|
||||
|
||||
"module/date" = {
|
||||
type = "internal/date";
|
||||
date = {
|
||||
alt = "%Y-%m-%d";
|
||||
text = "%a %d/%m/%y";
|
||||
};
|
||||
interval = "1";
|
||||
label = "%date% %time%";
|
||||
time = {
|
||||
alt = "%H:%M:%S";
|
||||
text = "%H:%M";
|
||||
};
|
||||
format = colors.normal // {
|
||||
padding = 1;
|
||||
};
|
||||
};
|
||||
|
||||
"module/memory" = {
|
||||
type = "internal/memory";
|
||||
format = colors.normal // {
|
||||
padding = 1;
|
||||
text = " <label>";
|
||||
};
|
||||
interval = 2;
|
||||
label = "%percentage_used%%";
|
||||
ramp-used = ramp;
|
||||
};
|
||||
|
||||
"module/pulseaudio" = {
|
||||
bar.volume = {
|
||||
empty = {
|
||||
font = "2";
|
||||
text = "─";
|
||||
};
|
||||
fill = {
|
||||
text = "─";
|
||||
font = "2";
|
||||
};
|
||||
foreground = [
|
||||
colors.green
|
||||
colors.green
|
||||
colors.green
|
||||
colors.green
|
||||
colors.green
|
||||
colors.yellow
|
||||
colors.orange
|
||||
colors.red
|
||||
];
|
||||
indicator = {
|
||||
text = "|";
|
||||
font = "2";
|
||||
};
|
||||
width = "10";
|
||||
};
|
||||
click.right = "${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
|
||||
format = {
|
||||
padding = 1;
|
||||
muted = colors.active // {
|
||||
padding = 1;
|
||||
};
|
||||
volume = colors.normal // {
|
||||
padding = 1;
|
||||
text = "<ramp-volume> <label-volume>";
|
||||
};
|
||||
};
|
||||
label.muted = {
|
||||
text = "";
|
||||
};
|
||||
label.volume = {
|
||||
text = "%percentage%%";
|
||||
};
|
||||
ramp.volume = [ "" "" "" ];
|
||||
type = "internal/pulseaudio";
|
||||
};
|
||||
|
||||
"module/temperature" = {
|
||||
format = colors.normal // {
|
||||
padding = 1;
|
||||
text = "<ramp> <label>";
|
||||
warn = {
|
||||
padding = 1;
|
||||
text = "<ramp> <label-warn>";
|
||||
underline = colors.alert;
|
||||
};
|
||||
};
|
||||
hwmon.path = "/sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input";
|
||||
label = {
|
||||
text = "%temperature-c%";
|
||||
warn = "%temperature-c%";
|
||||
};
|
||||
ramp = {
|
||||
text = [ "" "" "" "" "" ];
|
||||
};
|
||||
thermal.zone = "0";
|
||||
type = "internal/temperature";
|
||||
warn.temperature = "90";
|
||||
};
|
||||
|
||||
"module/powermenu" = {
|
||||
type = "custom/menu";
|
||||
expand.right = true;
|
||||
format = {
|
||||
spacing = 1;
|
||||
suffix = " ";
|
||||
};
|
||||
label = {
|
||||
open = colors.normal // {
|
||||
text = " ⏻ ";
|
||||
};
|
||||
close = colors.normal // {
|
||||
text = "Cancel";
|
||||
};
|
||||
separator = {
|
||||
text = "|";
|
||||
};
|
||||
};
|
||||
menu = [
|
||||
[
|
||||
({ text = "Logout"; exec = "#powermenu.open.1"; })
|
||||
({ text = "Reboot"; exec = "#powermenu.open.2"; })
|
||||
({ text = "Hibernate"; exec = "#powermenu.open.3"; })
|
||||
({ text = "Power off"; exec = "#powermenu.open.4"; })
|
||||
]
|
||||
[
|
||||
({ text = "Logout"; exec = "${pkgs.systemd}/bin/loginctl terminate-session self"; })
|
||||
]
|
||||
[
|
||||
({ text = "Reboot"; exec = "${pkgs.systemd}/bin/systemctl reboot"; })
|
||||
]
|
||||
[
|
||||
({ text = "Hibernate"; exec = "${pkgs.systemd}/bin/systemctl hibernate"; })
|
||||
]
|
||||
[
|
||||
({ text = "Power off"; exec = "${pkgs.systemd}/bin/shutdown now"; })
|
||||
]
|
||||
];
|
||||
};
|
||||
|
||||
"module/player" = {
|
||||
type = "custom/script";
|
||||
format = colors.normal // {
|
||||
padding = 1;
|
||||
};
|
||||
exec = playerStatus;
|
||||
click.left = "${playerCtl} play-pause";
|
||||
scroll = {
|
||||
up = "${playerCtl} previous";
|
||||
down = "${playerCtl} next";
|
||||
};
|
||||
interval = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
variables = {
|
||||
DSSI_PATH = "$HOME/.dssi:$HOME/.nix-profile/lib/dssi:/run/current-system/sw/lib/dssi";
|
||||
LADSPA_PATH = "$HOME/.ladspa:$HOME/.nix-profile/lib/ladspa:/run/current-system/sw/lib/ladspa";
|
||||
LV2_PATH = "$HOME/.lv2:$HOME/.nix-profile/lib/lv2:/run/current-system/sw/lib/lv2";
|
||||
LXVST_PATH = "$HOME/.lxvst:$HOME/.nix-profile/lib/lxvst:/run/current-system/sw/lib/lxvst";
|
||||
VST_PATH = "$HOME/.vst:$HOME/.nix-profile/lib/vst:/run/current-system/sw/lib/vst";
|
||||
VST3_PATH = "$HOME/.vst3:$HOME/.nix-profile/lib/vst3:/run/current-system/sw/lib/vst3";
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
carla
|
||||
rnnoise
|
||||
ardour
|
||||
# zrythm
|
||||
mixxx
|
||||
|
||||
# Plugins
|
||||
# artyFX
|
||||
autotalent
|
||||
boops
|
||||
# cardinal
|
||||
geonkick
|
||||
helm
|
||||
(lsp-plugins.overrideAttrs (old: { version = "1.2.0"; }))
|
||||
# noise-repellent
|
||||
samplv1
|
||||
# speech-denoiser
|
||||
# stochas
|
||||
# sunvox
|
||||
# surge
|
||||
surge-XT
|
||||
talentedhack
|
||||
tunefish
|
||||
vocproc
|
||||
x42-plugins
|
||||
zita-at1
|
||||
zynaddsubfx
|
||||
zyn-fusion
|
||||
];
|
||||
|
||||
home.sessionVariables = variables;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
jetbrains.pycharm-professional
|
||||
python3
|
||||
# pypy3
|
||||
];
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
# location = "center";
|
||||
# font = "${pkgs.rice.font.monospace.name} ${toString pkgs.rice.font.monospace.size}";
|
||||
# extraConfig = {
|
||||
# modi = "drun,emoji,run,ssh,window";
|
||||
# };
|
||||
# theme = ../configs/rofi/nord.rasi;
|
||||
};
|
||||
|
||||
xdg.configFile."rofi/config.rasi".text = ''
|
||||
configuration {
|
||||
font: "${pkgs.rice.font.monospace.name} 12";
|
||||
location: 0;
|
||||
yoffset: 0;
|
||||
xoffset: 0;
|
||||
modi: "drun,run,ssh,window";
|
||||
}
|
||||
|
||||
@theme "nord"
|
||||
'';
|
||||
xdg.configFile."rofi/nord.rasi".source = ../configs/rofi/nord.rasi;
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.rofimoji
|
||||
];
|
||||
|
||||
xdg.configFile."rofimoji.rc".text = ''
|
||||
action=copy
|
||||
skin-tone=light
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.screen-locker = {
|
||||
enable = false;
|
||||
lockCmd = "${pkgs.lockscreen}";
|
||||
inactiveInterval = 10; # miutes
|
||||
};
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# RECOGNITION
|
||||
nmap
|
||||
|
||||
# WEB
|
||||
# altair
|
||||
# burpsuite
|
||||
httpie
|
||||
|
||||
# REVERSING
|
||||
bintools
|
||||
ghidra-bin
|
||||
radare2
|
||||
# cutter
|
||||
|
||||
# INFRASTRUCTURE
|
||||
cocktail-bar-cli
|
||||
];
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
shellAliases = {
|
||||
"dkc" = "docker-compose";
|
||||
"dk" = "docker";
|
||||
"hm" = "home-manager";
|
||||
"jc" = "sudo journalctl";
|
||||
"jcu" = "journalctl --user";
|
||||
"nf" = "find /nix/store/ -maxdepth 1 | grep";
|
||||
"nr" = "nix run";
|
||||
"ns" = "nix search nixpkgs";
|
||||
"nS" = "nix shell";
|
||||
"sc" = "sudo systemctl";
|
||||
"scu" = "systemctl --user";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.bash = { inherit shellAliases; };
|
||||
programs.zsh = { inherit shellAliases; };
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
compression = true;
|
||||
matchBlocks = {
|
||||
"*" = { identityFile = "~/.ssh/id_ed25519"; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
directory.truncation_symbol = "…/";
|
||||
hostname.format = "[$hostname]($style) ";
|
||||
line_break.disabled = true;
|
||||
nix_shell.symbol = "❄️ ";
|
||||
python.python_binary = "python3";
|
||||
status = {
|
||||
disabled = false;
|
||||
format = "[$symbol $status]($style) ";
|
||||
};
|
||||
username.format = "[$user]($style)@";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
services.sxhkd = let
|
||||
alacritty = "${pkgs.alacritty}/bin/alacritty";
|
||||
bspc = "${pkgs.bspwm}/bin/bspc";
|
||||
dunstify = "${pkgs.dunst}/bin/dunstify";
|
||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||
pulseaudio-ctl = "${pkgs.pulseaudio-ctl}/bin/pulseaudio-ctl";
|
||||
rofi = "${pkgs.rofi}/bin/rofi";
|
||||
terminator = "${pkgs.terminator}/bin/terminator";
|
||||
nautilus = "${pkgs.gnome.nautilus}/bin/nautilus";
|
||||
pcmanfm = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
update-backgroundCmd = "${pkgs.update-background}";
|
||||
xbacklight = "${pkgs.xorg.xbacklight}/bin/xbacklight";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
keybindings = {
|
||||
"super + b" = update-backgroundCmd;
|
||||
"super + alt + {h,j,k,l}" = "${bspc} node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}";
|
||||
"super + alt + {q,r}" = "${bspc} {quit,wm -r}";
|
||||
"super + alt + shift + {h,j,k,l}" = "${bspc} node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
|
||||
"super + alt + m" = "${pkgs.lockscreen}";
|
||||
"super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local";
|
||||
"super + ctrl + {1-9}" = "${bspc} node -o 0.{1-9}";
|
||||
"super + ctrl + {h,j,k,l}" = "${bspc} node -p {west,south,north,east}";
|
||||
"super + ctrl + {m,x,y,z}" = "${bspc} node -g {marked,locked,sticky,private}";
|
||||
"super + ctrl + shift + space" = "${bspc} query -N -d | xargs -I id -n 1 ${bspc} node id -p cancel";
|
||||
"super + ctrl + space" = "${bspc} node -p cancel";
|
||||
"super + {_,shift +} e" = "{${nautilus} -w, ${pcmanfm} -n}";
|
||||
"super + Escape" = "pkill -USR1 -x sxhkd";
|
||||
"super + g" = "${bspc} node -s biggest";
|
||||
"super + {grave,Tab}" = "${bspc} {node,desktop} -f last";
|
||||
"super + {Left,Down,Up,Right}" = "${bspc} node -v {-20 0,0 20,0 -20,20 0}";
|
||||
"super + m" = "${bspc} desktop -l next";
|
||||
"super + {o,i}" = "${bspc} wm -h off;${bspc} node {older,newer} -f;${bspc} wm -h on";
|
||||
"super + {p,b,comma,period}" = "${bspc} node -f @{parent,brother,first,second}";
|
||||
"super + {_,shift + } Return" = "{${alacritty} , ${terminator}}";
|
||||
"super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f,node -d} 'focused:^{1-9,10}'";
|
||||
"super + {_,shift + }c" = "${bspc} node -f {next,prev}.local";
|
||||
"super + {h,j,k,l}" = "${bspc} node -f {west,south,north,east}";
|
||||
"super + shift + {h,j,k,l}" = ''dir={west,south,north,east}; bspc node -s "$dir.local" --follow || bspc node -m "$dir" --follow'';
|
||||
"super + {_,shift + }w" = "${bspc} node -{c,k}";
|
||||
"super + @space" = "rofi -show drun";
|
||||
"super + {t,shift + t,s,f}" = "${bspc} node -t {tiled,pseudo_tiled,floating,fullscreen}";
|
||||
"super + y" = "${bspc} node newest.marked.local -n newest.!automatic.local";
|
||||
"{XF86AudioLowerVolume,XF86AudioMute,XF86AudioRaiseVolume}" = "${pulseaudio-ctl} {down,mute,up}";
|
||||
"XF86Audio{Next,Play,Prev}" = "${playerctl} {next,play-pause,previous}";
|
||||
"XF86MonBrightness{Up,Down}" = "${xbacklight} {+,-}10%";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
strPalette = with pkgs.rice; palette.toRgbHex rec {
|
||||
inherit (colorPalette) normal bright dark;
|
||||
background = normal.black;
|
||||
foreground = normal.white;
|
||||
};
|
||||
opacity = toString pkgs.rice.opacity;
|
||||
font = pkgs.rice.font.monospace;
|
||||
colorString = with strPalette; normal: bright: builtins.concatStringsSep ":" [ normal.black normal.red normal.green normal.yellow normal.blue normal.magenta normal.cyan normal.white bright.black bright.red bright.green bright.yellow bright.blue bright.magenta bright.cyan bright.white ];
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
terminator
|
||||
];
|
||||
|
||||
xdg.configFile."terminator/config".text = with strPalette; ''
|
||||
[global_config]
|
||||
scroll_tabbar = True
|
||||
enabled_plugins = ActivityWatch, LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
|
||||
suppress_multiple_term_dialog = True
|
||||
always_split_with_profile = True
|
||||
[keybindings]
|
||||
help = None
|
||||
[profiles]
|
||||
[[default]]
|
||||
visible_bell = True
|
||||
background_color = "${background}"
|
||||
background_darkness = ${opacity}
|
||||
background_type = transparent
|
||||
cursor_color = "${foreground}"
|
||||
font = ${font.name} weight=450 ${toString font.size}
|
||||
foreground_color = "${foreground}"
|
||||
show_titlebar = False
|
||||
scrollbar_position = hidden
|
||||
scrollback_lines = 10000
|
||||
palette = "${colorString normal bright}"
|
||||
use_system_font = False
|
||||
[[presentation]]
|
||||
visible_bell = True
|
||||
background_color = "${background}"
|
||||
cursor_color = "${foreground}"
|
||||
font = ${font.name} weight=450 20
|
||||
foreground_color = "${foreground}"
|
||||
show_titlebar = False
|
||||
palette = "${colorString normal bright}"
|
||||
use_system_font = False
|
||||
[layouts]
|
||||
[[default]]
|
||||
[[[child1]]]
|
||||
parent = window0
|
||||
type = Terminal
|
||||
profile = default
|
||||
[[[window0]]]
|
||||
parent = ""
|
||||
type = Window
|
||||
[plugins]
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
escapeTime = 25;
|
||||
terminal = "screen-256color";
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
nord
|
||||
prefix-highlight
|
||||
];
|
||||
extraConfig = ''
|
||||
set -g mouse on
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
update_time = "10m";
|
||||
in
|
||||
{
|
||||
systemd.user.services."update-background" = {
|
||||
Unit = {
|
||||
Description = "Set random desktop background using feh";
|
||||
After = [ "graphical-session.pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
RequiresMountsFor = [ "/home/bertof/Immagini" ];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
IOSchedulingClass = "idle";
|
||||
ExecStart = "${pkgs.update-background}";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers."update-background" = {
|
||||
Unit = { Description = "Set random desktop background using feh"; };
|
||||
Timer = { OnUnitActiveSec = update_time; };
|
||||
Install = { WantedBy = [ "timers.target" ]; };
|
||||
};
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
# Categories: https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry
|
||||
let
|
||||
cmd = link: "${pkgs.google-chrome}/bin/google-chrome-stable --app=${link}";
|
||||
links = [
|
||||
{ desktopName = "Google Calendar"; link = "https://google.com/calendar"; categories = [ "Office" ]; }
|
||||
{ desktopName = "Google Keep"; link = "https://keep.google.com"; categories = [ "Office" ]; }
|
||||
{ desktopName = "Monkeytype"; link = "https://monkeytype.com/"; }
|
||||
{ desktopName = "Netflix"; link = "https://www.netflix.com"; categories = [ "AudioVideo" ]; }
|
||||
{ desktopName = "Notion"; link = "https://notion.so"; categories = [ "Office" ]; }
|
||||
{ desktopName = "Prime Video"; link = "https://primevideo.com"; categories = [ "AudioVideo" ]; }
|
||||
{ desktopName = "Protonmail"; link = "https://mail.protonmail.com"; categories = [ "Office" ]; }
|
||||
{ desktopName = "Twitch"; link = "https://www.twitch.tv"; categories = [ "AudioVideo" ]; }
|
||||
{ desktopName = "WhatsApp"; link = "https://web.whatsapp.com/"; }
|
||||
{ desktopName = "YouTube"; link = "https://www.youtube.com"; categories = [ "AudioVideo" ]; }
|
||||
{ desktopName = "Plex"; link = "https://app.plex.tv"; categories = [ "AudioVideo" ]; }
|
||||
];
|
||||
webAppBuilder =
|
||||
{ desktopName
|
||||
, name ? builtins.replaceStrings [ " " ] [ "_" ] desktopName
|
||||
, link
|
||||
, icon ? lib.toLower name
|
||||
, comment ? null
|
||||
, categories ? [ "Network" ]
|
||||
}: pkgs.makeDesktopItem {
|
||||
inherit name icon desktopName comment categories;
|
||||
exec = cmd link;
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = map webAppBuilder links;
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
xscreensaverCmd = "${pkgs.xscreensaver}/bin/xscreensaver-command -activate";
|
||||
lockCmd = "${pkgs.lockscreen}";
|
||||
in
|
||||
{
|
||||
services.xidlehook = {
|
||||
enable = true;
|
||||
# not-when-audio = false;
|
||||
not-when-fullscreen = true;
|
||||
timers = [
|
||||
{
|
||||
command = lockCmd;
|
||||
delay = 300;
|
||||
}
|
||||
{
|
||||
command = xscreensaverCmd;
|
||||
delay = 300;
|
||||
}
|
||||
];
|
||||
};
|
||||
services.xscreensaver = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mode = "blank";
|
||||
fadeTicks = 20;
|
||||
lock = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
zoxideCmd = "zoxide";
|
||||
in {
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
nix-zsh-completions
|
||||
zsh-completions
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
plugins = [ ];
|
||||
initExtraBeforeCompInit = ''
|
||||
zstyle ':completion:*' menu select
|
||||
setopt CORRECT
|
||||
setopt AUTO_CD
|
||||
setopt CHASE_LINKS
|
||||
setopt PUSHD_TO_HOME
|
||||
'';
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"common-aliases"
|
||||
"cp"
|
||||
"dirhistory"
|
||||
"git-auto-fetch"
|
||||
"git"
|
||||
"sudo"
|
||||
];
|
||||
extraConfig = "";
|
||||
};
|
||||
|
||||
# prezto = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue