Large module update
This commit is contained in:
parent
492ae9d92a
commit
a61bfe3c50
18 changed files with 463 additions and 87 deletions
|
|
@ -12,7 +12,7 @@
|
||||||
background_darkness = 0.95
|
background_darkness = 0.95
|
||||||
background_type = transparent
|
background_type = transparent
|
||||||
cursor_color = "#d8dee9"
|
cursor_color = "#d8dee9"
|
||||||
font = FuraCode Nerd Font Mono weight=450 10
|
font = FuraCode Nerd Font Mono weight=450 9
|
||||||
foreground_color = "#d8dee9"
|
foreground_color = "#d8dee9"
|
||||||
show_titlebar = False
|
show_titlebar = False
|
||||||
scrollbar_position = hidden
|
scrollbar_position = hidden
|
||||||
|
|
|
||||||
15
custom/default.nix
Normal file
15
custom/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ system ? builtins.currentSystem }:
|
||||||
|
|
||||||
|
let
|
||||||
|
pkgs = import <nixpkgs> { inherit system; };
|
||||||
|
# pkgs = import (builtins.fetchTarball {
|
||||||
|
# name = "nixos-unstable-2021-05-26";
|
||||||
|
# url = "https://github.com/nixos/nixpkgs/archive/9b7fb215d4d8399772a4f3d6f00fab3747136f53.tar.gz";
|
||||||
|
# sha256 = "02d1841j7jg161q7cwh7vryxhv7x3bmnhd1jczx14ggfa66vqfhm";
|
||||||
|
# }) { inherit system; };
|
||||||
|
callPackage = pkgs.lib.callPackageWith ( pkgs // self );
|
||||||
|
self = {
|
||||||
|
gallery-tagger = callPackage ./gallery-tagger {};
|
||||||
|
};
|
||||||
|
in self
|
||||||
|
|
||||||
23
custom/gallery-tagger/default.nix
Normal file
23
custom/gallery-tagger/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ lib, stdenv,
|
||||||
|
cargo,
|
||||||
|
rustc,
|
||||||
|
rustPlatform,
|
||||||
|
gexiv2,
|
||||||
|
glib,
|
||||||
|
gcc,
|
||||||
|
pkg-config
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
version = "0.1.2";
|
||||||
|
pname = "gallery-tagger";
|
||||||
|
nativeBuildInputs = [ cargo rustc gcc pkg-config ];
|
||||||
|
buildInputs = [ gexiv2.dev glib.dev ];
|
||||||
|
src = builtins.fetchGit {
|
||||||
|
url = "git@gitlab.com:bertof/galllery-tagger.git";
|
||||||
|
ref = "5389813e62dfa790cf20441242d8a7d89f345fa9";
|
||||||
|
};
|
||||||
|
doCheck = true;
|
||||||
|
cargoSha256 = "sha256:0nskc778m8nj2v4qidq4jzrb3ac8yg9bjc1l546c1k984321k187";
|
||||||
|
}
|
||||||
|
|
||||||
43
home.nix
43
home.nix
|
|
@ -1,7 +1,9 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
callPackage = pkgs.lib.callPackageWith pkgs;
|
||||||
nixpkgs = import <nixpkgs> {};
|
nixpkgs = import <nixpkgs> {};
|
||||||
|
custom = import ./custom/default.nix {};
|
||||||
colorscheme.theme = import ./packages/nord.nix;
|
colorscheme.theme = import ./packages/nord.nix;
|
||||||
in {
|
in {
|
||||||
fonts.fontconfig = {
|
fonts.fontconfig = {
|
||||||
|
|
@ -13,43 +15,61 @@ in {
|
||||||
keyboard.layout = "it";
|
keyboard.layout = "it";
|
||||||
keyboard.options = ["terminate:ctrl_alt_bksp" "compose:rctrl"];
|
keyboard.options = ["terminate:ctrl_alt_bksp" "compose:rctrl"];
|
||||||
packages = (with pkgs; [
|
packages = (with pkgs; [
|
||||||
|
authy
|
||||||
|
blender
|
||||||
discord
|
discord
|
||||||
evolution
|
evolution
|
||||||
firefox
|
firefox
|
||||||
gallery-dl
|
gallery-dl
|
||||||
|
gnome3.dconf-editor
|
||||||
|
gnome3.easytag
|
||||||
|
gnome3.eog
|
||||||
gnome3.evince
|
gnome3.evince
|
||||||
gnome3.file-roller
|
gnome3.file-roller
|
||||||
|
gnome3.ghex
|
||||||
|
gnome3.gitg
|
||||||
gnome3.gnome-screenshot
|
gnome3.gnome-screenshot
|
||||||
|
gnome3.gnome-system-monitor
|
||||||
gnome3.gnome-tweaks
|
gnome3.gnome-tweaks
|
||||||
gnome3.nautilus
|
gnome3.nautilus
|
||||||
|
gnome3.seahorse
|
||||||
|
gnome3.sushi
|
||||||
htop
|
htop
|
||||||
jetbrains.datagrip
|
jetbrains.datagrip
|
||||||
|
keepassxc
|
||||||
|
krita
|
||||||
libreoffice-fresh
|
libreoffice-fresh
|
||||||
lutris
|
lutris
|
||||||
megasync
|
megasync
|
||||||
mpv
|
mpv
|
||||||
neofetch
|
neofetch
|
||||||
nerdfonts
|
nerdfonts
|
||||||
|
nix-prefetch-git
|
||||||
obsidian
|
obsidian
|
||||||
openvpn
|
openvpn
|
||||||
pavucontrol
|
pavucontrol
|
||||||
pcmanfm
|
pcmanfm
|
||||||
|
pentablet-driver
|
||||||
polybarFull
|
polybarFull
|
||||||
procps-ng
|
procps-ng
|
||||||
shotwell
|
shotwell
|
||||||
skypeforlinux
|
|
||||||
slack
|
slack
|
||||||
spotify
|
spotify
|
||||||
steam
|
|
||||||
wireguard
|
|
||||||
]) ++ (with nixpkgs; [
|
|
||||||
authy
|
|
||||||
keepassxc
|
|
||||||
tdesktop
|
tdesktop
|
||||||
teams
|
teams
|
||||||
|
transmission-gtk
|
||||||
|
wireguard
|
||||||
|
zotero
|
||||||
|
]) ++ (with nixpkgs; [
|
||||||
|
# steam
|
||||||
|
skypeforlinux
|
||||||
|
]) ++ (with custom; [
|
||||||
|
gallery-tagger
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./extralib.nix
|
./extralib.nix
|
||||||
|
|
||||||
|
|
@ -58,8 +78,8 @@ in {
|
||||||
./modules/alacritty.nix
|
./modules/alacritty.nix
|
||||||
./modules/bash.nix
|
./modules/bash.nix
|
||||||
./modules/bat.nix
|
./modules/bat.nix
|
||||||
./modules/broot.nix
|
|
||||||
./modules/bottom.nix
|
./modules/bottom.nix
|
||||||
|
./modules/broot.nix
|
||||||
./modules/dircolors.nix
|
./modules/dircolors.nix
|
||||||
./modules/dunst.nix
|
./modules/dunst.nix
|
||||||
# ./modules/fzf.nix
|
# ./modules/fzf.nix
|
||||||
|
|
@ -70,20 +90,25 @@ in {
|
||||||
./modules/jq.nix
|
./modules/jq.nix
|
||||||
./modules/kakoune.nix
|
./modules/kakoune.nix
|
||||||
./modules/keychain.nix
|
./modules/keychain.nix
|
||||||
|
# ./modules/kitty.nix
|
||||||
|
./modules/lf.nix
|
||||||
./modules/man.nix
|
./modules/man.nix
|
||||||
# ./modules/nix-index.nix
|
# ./modules/nix-index.nix
|
||||||
./modules/noti.nix
|
./modules/noti.nix
|
||||||
./modules/obs-studio.nix
|
./modules/obs-studio.nix
|
||||||
./modules/pazi.nix
|
# ./modules/pazi.nix
|
||||||
./modules/picom.nix
|
./modules/picom.nix
|
||||||
./modules/qogir_theme.nix
|
./modules/qogir_theme.nix
|
||||||
./modules/rofi.nix
|
./modules/rofi.nix
|
||||||
./modules/ssh.nix
|
|
||||||
./modules/screen_locker.nix
|
./modules/screen_locker.nix
|
||||||
./modules/ssh.nix
|
./modules/ssh.nix
|
||||||
./modules/sxhkd.nix
|
./modules/sxhkd.nix
|
||||||
|
./modules/syncthing.nix
|
||||||
./modules/terminator.nix
|
./modules/terminator.nix
|
||||||
./modules/tmux.nix
|
./modules/tmux.nix
|
||||||
|
./modules/update_background.nix
|
||||||
|
./modules/zoxide.nix
|
||||||
|
./modules/zsh.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Autolock services: xss-lock.service xautolock-session.service
|
# Autolock services: xss-lock.service xautolock-session.service
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ in {
|
||||||
settings = {
|
settings = {
|
||||||
scrolling.history = 3000;
|
scrolling.history = 3000;
|
||||||
font = {
|
font = {
|
||||||
normal.family = "FuraCode Nerd Font";
|
normal.family = "FuraCode Nerd Font Mono";
|
||||||
size = 9.0;
|
size = 9.0;
|
||||||
};
|
};
|
||||||
background_opacity = 0.95;
|
background_opacity = 0.95;
|
||||||
mouse = {
|
mouse = {
|
||||||
hide_when_typing = true;
|
hide_when_typing = true;
|
||||||
url.modifiers = "Control";
|
hints.modifiers = "Control";
|
||||||
};
|
};
|
||||||
|
|
||||||
# NORD Theme: https://github.com/arcticicestudio/nord-alacritty
|
# NORD Theme: https://github.com/arcticicestudio/nord-alacritty
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,10 @@
|
||||||
"la" = "ls -la";
|
"la" = "ls -la";
|
||||||
".." = "cd ..";
|
".." = "cd ..";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bashrcExtra = ''
|
||||||
|
source $HOME/.profile
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
188
modules/git.nix
188
modules/git.nix
|
|
@ -1,8 +1,180 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
kakouneCommand = "${pkgs.kakoune}/bin/kak";
|
kak = "${pkgs.kakoune}/bin/kak";
|
||||||
meldCommand = "${pkgs.meld}/bin/meld";
|
meld = "${pkgs.meld}/bin/meld";
|
||||||
in {
|
shellAliases = {
|
||||||
|
"g" = "git";
|
||||||
|
"ga" = "git add";
|
||||||
|
"gaa" = "git add --all";
|
||||||
|
# "gapa"="git add --patch";
|
||||||
|
"gau" = "git add --update";
|
||||||
|
"gav" = "git add --verbose";
|
||||||
|
# "gap"="git apply";
|
||||||
|
# "gapt"="git apply --3way";
|
||||||
|
"gb" = "git branch";
|
||||||
|
"gba" = "git branch -a";
|
||||||
|
"gbd" = "git branch -d";
|
||||||
|
# "gbda"="git branch --no-color --merged \| command grep -vE"^(\+\|\*\|\s*($(git_main_branch)\|development\|develop\|devel\|dev)\s*$)"\| command xargs -n 1 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";
|
||||||
|
# "gcam"="git commit -a -m";
|
||||||
|
"gcas" = "git commit -a -s";
|
||||||
|
# "gcasm"="git commit -a -s -m";
|
||||||
|
# "gcsm"="git commit -s -m";
|
||||||
|
"gcb" = "git checkout -b";
|
||||||
|
# "gcf"="git config --list";
|
||||||
|
"gcl" = "git clone --recurse-submodules";
|
||||||
|
"gclean" = "git clean -id";
|
||||||
|
"gpristine" = "git reset --hard && git clean -dffx";
|
||||||
|
# "gcm"="git checkout $(git_main_branch)";
|
||||||
|
# "gcd"="git checkout develop";
|
||||||
|
# "gcmsg"="git commit -m";
|
||||||
|
"gco" = "git checkout";
|
||||||
|
"gcount" = "git shortlog -sn";
|
||||||
|
"gcp" = "git cherry-pick";
|
||||||
|
"gcpa" = "git cherry-pick --abort";
|
||||||
|
"gcpc" = "git cherry-pick --continue";
|
||||||
|
# "gcs"="git commit -S";
|
||||||
|
"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";
|
||||||
|
# "gdnolock"="git diff $@":(exclude)package-lock.json"":(exclude)*.lock"";
|
||||||
|
# "gdv"="git diff -w $@ \| view -";
|
||||||
|
"gdw" = "git diff --word-diff";
|
||||||
|
"gf" = "git fetch";
|
||||||
|
"gfa" = "git fetch --all --prune";
|
||||||
|
"gfg" = "git ls-files \| grep";
|
||||||
|
# "gfo"="git fetch origin";
|
||||||
|
# "gg"="git gui citool";
|
||||||
|
# "gga"="git gui citool --amend";
|
||||||
|
# "ggf"="git push --force origin $(current_branch)";
|
||||||
|
# "ggfl"="git push --force-with-lease origin $(current_branch)";
|
||||||
|
# "ggl"="git pull origin $(current_branch)";
|
||||||
|
# "ggp"="git push origin $(current_branch)";
|
||||||
|
# "ggpnp"="ggl && ggp";
|
||||||
|
# "ggpull"="git pull origin"$(git_current_branch)"";
|
||||||
|
# "ggpur"="ggu";
|
||||||
|
# "ggpush"="git push origin"$(git_current_branch)"";
|
||||||
|
# "ggsup"="git branch --set-upstream-to=origin/$(git_current_branch)";
|
||||||
|
# "ggu"="git pull --rebase origin $(current_branch)";
|
||||||
|
# "gpsup"="git push --set-upstream origin $(git_current_branch)";
|
||||||
|
# "ghh"="git help";
|
||||||
|
# "gignore"="git update-index --assume-unchanged";
|
||||||
|
"gignored" = ''git ls-files -v \| grep"^[[ :lower: ]]"'';
|
||||||
|
# "git-svn-dcommit-push"="git svn dcommit && git push github $(git_main_branch):svntrunk";
|
||||||
|
# "gk"="gitk --all --branches";
|
||||||
|
# "gke"="gitk --all $(git log -g --pretty=%h)";
|
||||||
|
# "gl"="git pull";
|
||||||
|
# "glg"="git log --stat";
|
||||||
|
# "glgp"="git log --stat -p";
|
||||||
|
# "glgg"="git log --graph";
|
||||||
|
# "glgga"="git log --graph --decorate --all";
|
||||||
|
# "glgm"="git log --graph --max-count=10";
|
||||||
|
"glo" = "git log --oneline --decorate";
|
||||||
|
# "glol"="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'";
|
||||||
|
"glols" = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --stat";
|
||||||
|
# "glod"="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'";
|
||||||
|
# "glods"="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short";
|
||||||
|
"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";
|
||||||
|
# "glp"="git log --pretty=\<format\>";
|
||||||
|
"gm" = "git merge";
|
||||||
|
# "gmom"="git merge origin/$(git_main_branch)";
|
||||||
|
# "gmt"="git mergetool --no-prompt";
|
||||||
|
# "gmtvim"="git mergetool --no-prompt --tool=vimdiff";
|
||||||
|
# "gmum"="git merge upstream/$(git_main_branch)";
|
||||||
|
"gma" = "git merge --abort";
|
||||||
|
"gp" = "git push";
|
||||||
|
# "gpd"="git push --dry-run";
|
||||||
|
# "gpf"="git push --force-with-lease";
|
||||||
|
"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";
|
||||||
|
# "grbd"="git rebase develop";
|
||||||
|
"grbi" = "git rebase -i";
|
||||||
|
# "grbm"="git rebase $(git_main_branch)";
|
||||||
|
# "grbo"="git rebase --onto";
|
||||||
|
# "grbs"="git rebase --skip";
|
||||||
|
"grev" = "git revert";
|
||||||
|
"grh" = "git reset";
|
||||||
|
"grhh" = "git reset --hard";
|
||||||
|
# "groh"="git reset origin/$(git_current_branch) --hard";
|
||||||
|
"grm" = "git rm";
|
||||||
|
"grmc" = "git rm --cached";
|
||||||
|
# "grmv"="git remote rename";
|
||||||
|
# "grrm"="git remote remove";
|
||||||
|
"grs" = "git restore";
|
||||||
|
# "grset"="git remote set-url";
|
||||||
|
# "grss"="git restore --source";
|
||||||
|
# "grst"="git restore --staged";
|
||||||
|
# "grt"="cd"$(git rev-parse --show-toplevel \|\| echo .)"";
|
||||||
|
# "gru"="git reset --";
|
||||||
|
# "grup"="git remote update";
|
||||||
|
"grv" = "git remote -v";
|
||||||
|
# "gsb"="git status -sb";
|
||||||
|
# "gsd"="git svn dcommit";
|
||||||
|
# "gsh"="git show";
|
||||||
|
# "gsi"="git submodule init";
|
||||||
|
# "gsps"="git show --pretty=short --show-signature";
|
||||||
|
# "gsr"="git svn rebase";
|
||||||
|
"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";
|
||||||
|
# "gstu"="git stash --include-untracked";
|
||||||
|
# "gstall"="git stash --all";
|
||||||
|
# "gsu"="git submodule update";
|
||||||
|
# "gsw"="git switch";
|
||||||
|
# "gswc"="git switch -c";
|
||||||
|
# "gts"="git tag -s";
|
||||||
|
# "gtv"="git tag \| sort -V";
|
||||||
|
# "gtl"="gtl(){ git tag --sort=-v:refname -n -l ${1}* }; noglob gtl";
|
||||||
|
# "gunignore"="git update-index --no-assume-unchanged";
|
||||||
|
# "gunwip"="git log -n 1 \| grep -q -c"\-\-wip\-\-"&& git reset HEAD~1";
|
||||||
|
"gup" = "git pull --rebase";
|
||||||
|
"gupv" = "git pull --rebase -v";
|
||||||
|
# "gupa"="git pull --rebase --autostash";
|
||||||
|
# "gupav"="git pull --rebase --autostash -v";
|
||||||
|
# "glum"="git pull upstream $(git_main_branch)";
|
||||||
|
# "gwch"="git whatchanged -p --abbrev-commit --pretty=medium";
|
||||||
|
# "gwip"="git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m"--wip-- [skip ci]"";
|
||||||
|
# "gam"="git am";
|
||||||
|
# "gamc"="git am --continue";
|
||||||
|
# "gams"="git am --skip";
|
||||||
|
# "gama"="git am --abort";
|
||||||
|
# "gamscp"="git am --show-current-patch";
|
||||||
|
};
|
||||||
|
in{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Filippo Berto";
|
userName = "Filippo Berto";
|
||||||
|
|
@ -12,10 +184,10 @@ in {
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
};
|
};
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
core.editor = kakouneCommand;
|
core.editor = kak;
|
||||||
credential.helper = "cache --timeout=3600";
|
credential.helper = "cache --timeout = 3600 ";
|
||||||
diff.guitool = meldCommand;
|
diff.guitool = meld;
|
||||||
merge.guitool = meldCommand;
|
merge.guitool = meld;
|
||||||
pull.rebase = true;
|
pull.rebase = true;
|
||||||
rebase.autostash = true;
|
rebase.autostash = true;
|
||||||
init.defaultBranch = "master";
|
init.defaultBranch = "master";
|
||||||
|
|
@ -23,4 +195,6 @@ in {
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
delta.enable = true;
|
delta.enable = true;
|
||||||
};
|
};
|
||||||
|
programs.bash.shellAliases = shellAliases;
|
||||||
|
programs.zsh.shellAliases = shellAliases;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
nixpkgs = import <nixpkgs> {};
|
nixpkgs = import <nixpkgs> {};
|
||||||
|
kakCmd = "kak";
|
||||||
in {
|
in {
|
||||||
home.packages = with pkgs; [
|
home.sessionVariables = {
|
||||||
kak-lsp
|
EDITOR = kakCmd;
|
||||||
rnix-lsp
|
VISUAL = kakCmd;
|
||||||
gocode
|
};
|
||||||
gogetdoc
|
programs.bash.shellAliases = { k = kakCmd; };
|
||||||
jq
|
programs.zsh.shellAliases = { k = kakCmd; };
|
||||||
aspell
|
|
||||||
aspellDicts.it
|
|
||||||
aspellDicts.en
|
|
||||||
aspellDicts.en-computers
|
|
||||||
aspellDicts.en-science
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.kakoune = {
|
programs.kakoune = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -21,6 +16,7 @@ in {
|
||||||
colorScheme = "nord";
|
colorScheme = "nord";
|
||||||
tabStop = 2;
|
tabStop = 2;
|
||||||
indentWidth = 2;
|
indentWidth = 2;
|
||||||
|
alignWithTabs = true;
|
||||||
scrollOff = {
|
scrollOff = {
|
||||||
lines = 5;
|
lines = 5;
|
||||||
columns = 3;
|
columns = 3;
|
||||||
|
|
@ -55,8 +51,8 @@ in {
|
||||||
{ mode = "user"; docstring = "Paste from clipboard (after)"; key = "P"; effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
{ mode = "user"; docstring = "Paste from clipboard (after)"; key = "P"; effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||||
];
|
];
|
||||||
hooks = [
|
hooks = [
|
||||||
{ name = "WinSetOption"; option = "filetype=(rust|python|c|cpp|latex|javascript|go)"; commands = builtins.concatStringsSep "\n" [ "lsp-enable-window" ]; }
|
{ name = "WinSetOption"; option = "filetype=(rust|python|c|cpp|latex|javascript|go|nix)"; commands = builtins.concatStringsSep "\n" [ "lsp-enable-window" ]; }
|
||||||
{ name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; }
|
# { name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; }
|
||||||
{ name = "ModuleLoaded"; option = "powerline"; commands = builtins.concatStringsSep "\n" [ "powerline-enable" ]; }
|
{ name = "ModuleLoaded"; option = "powerline"; commands = builtins.concatStringsSep "\n" [ "powerline-enable" ]; }
|
||||||
{ name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
|
{ name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
|
||||||
{ name = "InsertCompletionShow"; option = ".*"; commands = builtins.concatStringsSep "\n" [ "map window insert <tab> <c-n>" "map window insert <s-tab> <c-p>" ]; }
|
{ name = "InsertCompletionShow"; option = ".*"; commands = builtins.concatStringsSep "\n" [ "map window insert <tab> <c-n>" "map window insert <s-tab> <c-p>" ]; }
|
||||||
|
|
@ -64,20 +60,30 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
extraConfig = builtins.concatStringsSep "\n" [
|
extraConfig = builtins.concatStringsSep "\n" [
|
||||||
"# Extra"
|
"# Custom commands"
|
||||||
"define-command -docstring 'save and quit' x 'write-all; quit'"
|
"define-command -docstring 'save and quit' x 'write-all; quit' # Save and quit with 'x'"
|
||||||
"add-highlighter global/ regex \\h+$ 0:Error # "
|
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
||||||
"eval %sh{kak-lsp --kakoune -s \$kak_session} # Start kak-lsp"
|
"eval %sh{kak-lsp --kakoune -s \$kak_session} # Start kak-lsp"
|
||||||
"require-module auto-pairs"
|
"# require-module auto-pairs"
|
||||||
"require-module powerline"
|
"require-module powerline"
|
||||||
];
|
];
|
||||||
plugins = (with pkgs.kakounePlugins; [
|
plugins = (with pkgs; [
|
||||||
kak-auto-pairs
|
aspell
|
||||||
]) ++ (with nixpkgs; [
|
aspellDicts.en
|
||||||
kakounePlugins.prelude-kak
|
aspellDicts.en-computers
|
||||||
|
aspellDicts.en-science
|
||||||
|
aspellDicts.it
|
||||||
|
kak-lsp
|
||||||
kakounePlugins.powerline-kak
|
kakounePlugins.powerline-kak
|
||||||
|
rnix-lsp
|
||||||
|
]) ++ (with nixpkgs; [
|
||||||
|
# kakounePlugins.kak-lsp
|
||||||
|
# kakounePlugins.prelude-kak
|
||||||
|
# kakounePlugins.auto-pairs-kak
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."kak-lsp/kak-lsp.toml".source = ../configs/kak-lsp/kak-lsp.toml;
|
xdg.configFile."kak-lsp/kak-lsp.toml".source = ../configs/kak-lsp/kak-lsp.toml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
17
modules/kitty.nix
Normal file
17
modules/kitty.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
nord = import ../configs/themes/nord.nix;
|
||||||
|
in {
|
||||||
|
home.packages = [ pkgs.nerdfonts ];
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
# font = {
|
||||||
|
# package = pkgs.nerdfonts;
|
||||||
|
# name = "Fira Code Retina Nerd Font Complete";
|
||||||
|
# size = 9;
|
||||||
|
# };
|
||||||
|
font = "FuraCode Nerd Font Mono 10";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/lf.nix
Normal file
13
modules/lf.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
programs.lf = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
dircounts = true;
|
||||||
|
icons = true;
|
||||||
|
# mouse = true;
|
||||||
|
number = true;
|
||||||
|
# scrollof = 3;
|
||||||
|
tabstop = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -6,5 +6,6 @@
|
||||||
fade = true;
|
fade = true;
|
||||||
shadow = true;
|
shadow = true;
|
||||||
vSync = true;
|
vSync = true;
|
||||||
|
# backend = "xrender";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = [ pkgs.betterlockscreen ];
|
|
||||||
services.screen-locker = {
|
services.screen-locker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lockCmd = "${pkgs.betterlockscreen}/bin/betterlockscreen -l";
|
lockCmd = ''i3lock-color -B 10 --greetertext="Welcome back $USER"'';
|
||||||
inactiveInterval = 10; # miutes
|
inactiveInterval = 10; # miutes
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,13 @@
|
||||||
identityFile = "~/.ssh/heroku";
|
identityFile = "~/.ssh/heroku";
|
||||||
identitiesOnly = true;
|
identitiesOnly = true;
|
||||||
};
|
};
|
||||||
"*ngrok.io" = {
|
"ngrok.io" = {
|
||||||
hostname = "*ngrok.io";
|
hostname = "ngrok.io";
|
||||||
identityFile = "~/.ssh/local";
|
identityFile = "~/.ssh/local";
|
||||||
identitiesOnly = true;
|
identitiesOnly = true;
|
||||||
};
|
};
|
||||||
"172.27.108.*" = {
|
"172.27.108.?" = {
|
||||||
hostname = "172.27.108.*";
|
hostname = "172.27.108.?";
|
||||||
identityFile = "~/.ssh/local";
|
identityFile = "~/.ssh/local";
|
||||||
identitiesOnly = true;
|
identitiesOnly = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,56 +5,56 @@
|
||||||
bash
|
bash
|
||||||
betterlockscreen
|
betterlockscreen
|
||||||
bspwm
|
bspwm
|
||||||
dunst
|
# dunst
|
||||||
findutils
|
findutils
|
||||||
gnome3.nautilus
|
gnome3.nautilus
|
||||||
playerctl
|
|
||||||
pulseaudio-ctl
|
|
||||||
rofi
|
rofi
|
||||||
sxhkd
|
sxhkd
|
||||||
terminator
|
terminator
|
||||||
|
i3lock-color
|
||||||
];
|
];
|
||||||
|
|
||||||
services.sxhkd = let
|
services.sxhkd = let
|
||||||
alacritty = "${pkgs.alacritty}/bin/alacritty";
|
alacritty = "${pkgs.alacritty}/bin/alacritty";
|
||||||
terminator = "${pkgs.terminator}/bin/terminator";
|
|
||||||
bspc = "${pkgs.bspwm}/bin/bspc";
|
bspc = "${pkgs.bspwm}/bin/bspc";
|
||||||
betterlockscreen = "${pkgs.betterlockscreen}/bin/betterlockscreen";
|
dunstify = "${pkgs.dunst}/bin/dunstify";
|
||||||
|
i3lock-color = "${pkgs.i3lock-color}/bin/i3lock-color";
|
||||||
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
|
pulseaudio-ctl = "${pkgs.pulseaudio-ctl}/bin/pulseaudio-ctl";
|
||||||
|
rofi = "${pkgs.rofi}/bin/rofi";
|
||||||
|
terminator = "${pkgs.terminator}/bin/terminator";
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
keybindings = {
|
keybindings = {
|
||||||
"super + alt + {h,j,k,l}" = "${bspc} node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}";
|
"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 + {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 + shift + {h,j,k,l}" = "bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
|
||||||
"super + alt + {,+ shift} + m" = ''${betterlockscreen} {-l,-s} -t "Welcome back $USER"'';
|
"super + alt + m" = ''i3lock-color -B 10 --greetertext="Welcome back $USER"'';
|
||||||
"super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local";
|
"super + bracket{left,right}" = "bspc desktop -f {prev,next}.local";
|
||||||
"super + ctrl + {1-9}" = "${bspc} node -o 0.{1-9}";
|
"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 + {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 + {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 + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel";
|
||||||
"super + ctrl + space" = "${bspc} node -p cancel";
|
"super + ctrl + space" = "bspc node -p cancel";
|
||||||
"super + e" = "nautilus -w";
|
"super + e" = "nautilus -w";
|
||||||
"super + Escape" = "pkill -USR1 -x sxhkd";
|
"super + Escape" = "pkill -USR1 -x sxhkd";
|
||||||
"super + g" = "${bspc} node -s biggest";
|
"super + g" = "bspc node -s biggest";
|
||||||
"super + {grave,Tab}" = "${bspc} {node,desktop} -f last";
|
"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 + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}";
|
||||||
"super + m" = "${bspc} desktop -l next";
|
"super + m" = "bspc desktop -l next";
|
||||||
"super + {o,i}" = "${bspc} wm -h off;${bspc} node {older,newer} -f;${bspc} wm -h on";
|
"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 + {p,b,comma,period}" = "bspc node -f @{parent,brother,first,second}";
|
||||||
"super + {_,shift + } Return" = "{${alacritty},${terminator}}";
|
"super + {_,shift + } Return" = "{alacritty,terminator}";
|
||||||
"super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f,node -d} 'focused:^{1-9,10}'";
|
"super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} 'focused:^{1-9,10}'";
|
||||||
"super + {_,shift + }c" = "${bspc} node -f {next,prev}.local";
|
"super + {_,shift + }c" = "bspc node -f {next,prev}.local";
|
||||||
"super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}";
|
"super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}";
|
||||||
"super + {_,shift + }w" = "${bspc} node -{c,k}";
|
"super + {_,shift + }w" = "bspc node -{c,k}";
|
||||||
"super + @space" = "rofi -show drun";
|
"super + @space" = "rofi -show drun";
|
||||||
"super + {t,shift + t,s,f}" = "${bspc} node -t {tiled,pseudo_tiled,floating,fullscreen}";
|
"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";
|
"super + y" = "bspc node newest.marked.local -n newest.!automatic.local";
|
||||||
"XF86AudioLowerVolume" = "pulseaudio-ctl down";
|
"{XF86AudioLowerVolume,XF86AudioMute,XF86AudioRaiseVolume}" = "${dunstify} ${pulseaudio-ctl} {down,mute,up}";
|
||||||
"XF86AudioMute" = "pulseaudio-ctl mute";
|
# "XF86Audio{LowerVolume,Mute,RaiseVolume}" = "${pulseaudio-ctl} {down,mute,up}";
|
||||||
"XF86AudioNext" = "playerctl next";
|
"XF86Audio{Next,Play,Prev}" = "${playerctl} {next,play-pause,previous}";
|
||||||
"XF86AudioPlay" = "playerctl play-pause";
|
|
||||||
"XF86AudioPrev" = "playerctl previous";
|
|
||||||
"XF86AudioRaiseVolume" = "pulseaudio-ctl up";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
modules/syncthing.nix
Normal file
5
modules/syncthing.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
45
modules/update_background.nix
Normal file
45
modules/update_background.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
fehCmd = "${pkgs.feh}/bin/feh";
|
||||||
|
backgrounds_directory = ~/Immagini/Sfondi ;
|
||||||
|
update_time = 10;
|
||||||
|
in {
|
||||||
|
home.file.".local/bin/update_background.sh" = {
|
||||||
|
text = ''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
image=`find ${backgrounds_directory} -type f | grep -v "/\." | shuf -n 1`
|
||||||
|
${fehCmd} --bg-fill --no-fehbg "$image"
|
||||||
|
'';
|
||||||
|
target = ".local/bin/update_background.sh";
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services."update-background" = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Update the desktop background";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
RequiresMountsFor = [ "/home/bertof/Immagini" ];
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${config.home.homeDirectory}/${config.home.file.".local/bin/update_background.sh".target}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.timers."update-background" = {
|
||||||
|
Unit = {
|
||||||
|
Description="Run update-background every ${toString update_time} minutes";
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Timer = {
|
||||||
|
OnUnitActiveSec="${toString update_time}m";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/zoxide.nix
Normal file
10
modules/zoxide.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
zoxideCmd = "zoxide";
|
||||||
|
in {
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
38
modules/zsh.nix
Normal file
38
modules/zsh.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
autocd = true;
|
||||||
|
# plugins = [{
|
||||||
|
# name = "powerlevel10k";
|
||||||
|
# src = pkgs.zsh-powerlevel10k;
|
||||||
|
# file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||||
|
# }];
|
||||||
|
# initExtraBeforeCompInit = ''
|
||||||
|
# source $HOME/.p10k.zsh
|
||||||
|
# '';
|
||||||
|
# localVariables = {
|
||||||
|
# POWERLEVEL9K_LEFT_PROMPT_ELEMENTS = [ "os_icon" "dir" "vcs" "prompt_char" ];
|
||||||
|
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS = [ "status" "command_execution_time" "background_jobs" "direnv" "nix_shell" "time" "vpn_ip" ]
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
settings = {
|
||||||
|
# format = "[$all](inverted)";
|
||||||
|
|
||||||
|
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)@";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue