diff --git a/home.nix b/home.nix index fab2361..37b3b3a 100644 --- a/home.nix +++ b/home.nix @@ -13,22 +13,22 @@ in { keyboard.layout = "it"; keyboard.options = ["terminate:ctrl_alt_bksp" "compose:rctrl"]; packages = (with pkgs; [ - neofetch discord evolution firefox gallery-dl gnome3.evince gnome3.file-roller - gnome3.nautilus gnome3.gnome-screenshot + gnome3.nautilus htop + jetbrains.datagrip libreoffice-fresh lutris - jetbrains.datagrip megasync mpv neofetch + neofetch nerdfonts obsidian openvpn @@ -51,6 +51,8 @@ in { }; imports = [ + ./modules/configurations.nix + ./modules/alacritty.nix ./modules/bat.nix ./modules/broot.nix @@ -61,6 +63,7 @@ in { ./modules/git.nix ./modules/go.nix ./modules/gpg.nix + ./modules/info.nix ./modules/kakoune.nix ./modules/picom.nix ./modules/qogir_theme.nix @@ -72,6 +75,8 @@ in { ./modules/tmux.nix ]; + # Autolock services: xss-lock.service xautolock-session.service + programs = { # command-not-found.enable = true; home-manager.enable = true; diff --git a/modules/configurations.nix b/modules/configurations.nix new file mode 100644 index 0000000..5dee611 --- /dev/null +++ b/modules/configurations.nix @@ -0,0 +1,6 @@ +{ + home.file.".editorconfig" = { + source = ../configs/editorconfig; + target = ".editorconfig"; + }; +} diff --git a/modules/info.nix b/modules/info.nix new file mode 100644 index 0000000..3f0ee2a --- /dev/null +++ b/modules/info.nix @@ -0,0 +1,5 @@ +{ + programs.info = { + enable = true; + }; +} diff --git a/modules/screen_locker.nix b/modules/screen_locker.nix index d8f0108..524b9e5 100644 --- a/modules/screen_locker.nix +++ b/modules/screen_locker.nix @@ -1,9 +1,9 @@ { pkgs, ... }: { - # home.packages = [ pkgs.betterlockscreen ]; + home.packages = [ pkgs.betterlockscreen ]; services.screen-locker = { enable = true; - lockCmd = "/usr/bin/betterlockscreen -l"; - inactiveInterval = 5; # miutes + lockCmd = "${pkgs.betterlockscreen}/bin/betterlockscreen -l"; + inactiveInterval = 10; # miutes }; } diff --git a/modules/ssh.nix b/modules/ssh.nix index 436ad48..84434ff 100644 --- a/modules/ssh.nix +++ b/modules/ssh.nix @@ -28,11 +28,12 @@ identityFile = "~/.ssh/heroku"; identitiesOnly = true; }; - "ngrok.io" = { + "*ngrok.io" = { + hostname = "*ngrok.io"; identityFile = "~/.ssh/local"; identitiesOnly = true; }; - "172.27.108.?" = { + "172.27.108.*" = { hostname = "172.27.108.*"; identityFile = "~/.ssh/local"; identitiesOnly = true; diff --git a/modules/sxhkd.nix b/modules/sxhkd.nix index 3703874..312a537 100644 --- a/modules/sxhkd.nix +++ b/modules/sxhkd.nix @@ -1,66 +1,61 @@ { config, pkgs, lib, ... }: { home.packages = with pkgs; [ - bspwm - findutils - gnome3.nautilus - pulseaudio-ctl - playerctl - alacritty - terminator - rofi - bash - betterlockscreen + alacritty + bash + betterlockscreen + bspwm + dunst + findutils + gnome3.nautilus + playerctl + pulseaudio-ctl + rofi + sxhkd + terminator ]; - services.sxhkd = let - sxhkd = "${pkgs.sxhkd}/bin/sxhkd"; - bspc = "${pkgs.bspwm}/bin/bspc"; - xarg = "${pkgs.findutils}/bin/xargs"; - nautilus = "${pkgs.gnome3.nautilus}/bin/nautilus"; - pulseaudioCtl = "${pkgs.pulseaudio-ctl}/bin/pulseaudio-ctl"; - playerctl = "${pkgs.playerctl}/bin/playerctl"; + services.sxhkd = let alacritty = "${pkgs.alacritty}/bin/alacritty"; - terminator= "${pkgs.terminator}/bin/terminator"; - rofi = "${pkgs.rofi}/bin/rofi"; - bash = "${pkgs.bash}/bin/bash"; - betterlockscreen = "betterlockscreen"; + terminator = "${pkgs.terminator}/bin/terminator"; + bspc = "${pkgs.bspwm}/bin/bspc"; + betterlockscreen = "${pkgs.betterlockscreen}/bin/betterlockscreen"; in { - enable = true; + enable = true; keybindings = { - "super + Return" = "${bash} -c ${alacritty} || /usr/bin/alacritty || ${terminator}"; - "super + @space" = "${rofi} -show drun"; - "super + e" = "${nautilus} -w"; - "super + alt + {,+ shift} + m" = ''${betterlockscreen} {-l,-s} -t "Welcome back $USER"''; - "super + Escape" = "pkill -USR1 -x sxhkd"; - "super + alt + {q,r}" = "${bspc} {quit,wm -r}"; - "super + {_,shift + }w" = "${bspc} node -{c,k}"; - "super + m" = "${bspc} desktop -l next"; - "super + y" = "${bspc} node newest.marked.local -n newest.!automatic.local"; - "super + g" = "${bspc} node -s biggest"; - "super + {t,shift + t,s,f}" = "${bspc} node -t {tiled,pseudo_tiled,floating,fullscreen}"; - "super + ctrl + {m,x,y,z}" = "${bspc} node -g {marked,locked,sticky,private}"; - "super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}"; - "super + {p,b,comma,period}" = "${bspc} node -f @{parent,brother,first,second}"; - "super + {_,shift + }c" = "${bspc} node -f {next,prev}.local"; - "super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local"; - "super + {grave,Tab}" = "${bspc} {node,desktop} -f last"; - "super + {o,i}" = "${bspc} wm -h off;${bspc} node {older,newer} -f;${bspc} wm -h on"; - "super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f,node -d} 'focused:^{1-9,10}'"; - "super + ctrl + {h,j,k,l}" = "${bspc} node -p {west,south,north,east}"; - "super + ctrl + {1-9}" = "${bspc} node -o 0.{1-9}"; - "super + ctrl + space" = "${bspc} node -p cancel"; - "super + ctrl + shift + space" = "${bspc} query -N -d | xargs -I id -n 1 ${bspc} node id -p cancel"; "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 + {,+ shift} + m" = ''${betterlockscreen} {-l,-s} -t "Welcome back $USER"''; + "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 + e" = "nautilus -w"; + "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}"; - "XF86AudioRaiseVolume" = "${pulseaudioCtl} up"; - "XF86AudioLowerVolume" = "${pulseaudioCtl} down"; - "XF86AudioMute" = "${pulseaudioCtl} mute"; - "XF86AudioPlay" = "${playerctl} play-pause"; - "XF86AudioNext" = "${playerctl} next"; - "XF86AudioPrev" = "${playerctl} previous"; - }; - }; + "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 + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}"; + "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" = "pulseaudio-ctl down"; + "XF86AudioMute" = "pulseaudio-ctl mute"; + "XF86AudioNext" = "playerctl next"; + "XF86AudioPlay" = "playerctl play-pause"; + "XF86AudioPrev" = "playerctl previous"; + "XF86AudioRaiseVolume" = "pulseaudio-ctl up"; + }; + }; } diff --git a/modules/tmux.nix b/modules/tmux.nix index 979ac5b..a2b8cec 100644 --- a/modules/tmux.nix +++ b/modules/tmux.nix @@ -18,4 +18,3 @@ }; } -