Current derivation

This commit is contained in:
Filippo Berto 2021-05-21 22:30:33 +02:00
parent 0aae761f89
commit f7226d5fa6
20 changed files with 342 additions and 79 deletions

View file

@ -48,7 +48,7 @@ in {
};
};
normal = {
black = nord.n1;
black = nord.n0;
red = nord.n11;
green = nord.n14;
yellow = nord.n13;
@ -75,7 +75,7 @@ in {
blue = "#68809a";
magenta = "#8c738c";
cyan = "#6d96a5";
white = "#aeb3bb";
white = nord.n4;
};
};
};

11
modules/bash.nix Normal file
View file

@ -0,0 +1,11 @@
{
programs.bash = {
enable = true;
enableVteIntegration = true;
shellAliases = {
"ll" = "ls -l";
"la" = "ls -la";
".." = "cd ..";
};
};
}

View file

@ -7,6 +7,7 @@ in {
xdg.configFile."bottom/bottom.toml".source = tomlGenerate {
"flags" = {
"left_legend" = true;
"color" = "nord";
};
};
}

View file

@ -0,0 +1,6 @@
{
home.file.".editorconfig" = {
source = ../configs/editorconfig;
target = ".editorconfig";
};
}

5
modules/info.nix Normal file
View file

@ -0,0 +1,5 @@
{
programs.info = {
enable = true;
};
}

5
modules/jq.nix Normal file
View file

@ -0,0 +1,5 @@
{
programs.jq = {
enable = true;
};
}

10
modules/keychain.nix Normal file
View file

@ -0,0 +1,10 @@
{
programs.keychain = {
enable = true;
keys = [ "id_ed25519" "bitbucket" "github" "gitlab" "heroku" "local" ];
agents = [ "gpg" "ssh" ];
enableBashIntegration = true;
enableZshIntegration = true;
enableXsessionIntegration = true;
};
}

5
modules/man.nix Normal file
View file

@ -0,0 +1,5 @@
{
programs.man = {
enable = true;
};
}

7
modules/nix-index.nix Normal file
View file

@ -0,0 +1,7 @@
{
programs.nix-index = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
};
}

5
modules/noti.nix Normal file
View file

@ -0,0 +1,5 @@
{
programs.noti = {
enable = true;
};
}

12
modules/obs-studio.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
programs.obs-studio = {
enable = true;
plugins = with pkgs; [
# obs-linuxbrowser
obs-v4l2sink
obs-gstreamer
obs-move-transition
];
};
}

7
modules/pazi.nix Normal file
View file

@ -0,0 +1,7 @@
{
programs.pazi = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
};
}

View file

@ -1,14 +1,14 @@
{
programs.rofi = {
enable = true;
# extraConfig = {
# modi = "drun,run,ssh,window";
# theme = "nord";
# };
extraConfig = "
modi = drun,run,ssh,window
theme = nord
";
# # extraConfig = {
# # modi = "drun,run,ssh,window";
# # theme = "nord";
# # };
# extraConfig = "
# modi = drun,run,ssh,window
# theme = nord
# ";
};
xdg.configFile."rofi/nord.rasi".source = ../configs/rofi/nord.rasi;

View file

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

46
modules/ssh.nix Normal file
View file

@ -0,0 +1,46 @@
{
programs.ssh = {
enable = true;
compression = true;
matchBlocks = {
"gitlab.com" = {
hostname = "gitlab.com";
identityFile = "~/.ssh/gitlab";
identitiesOnly = true;
};
"github.com" = {
hostname = "github.com";
identityFile = "~/.ssh/github";
identitiesOnly = true;
};
"bitbucket.com" = {
hostname = "bitbucket.com";
identityFile = "~/.ssh/bitbucket";
identitiesOnly = true;
};
"aur.archlinux.org" = {
hostname = "aur.archlinux.org";
identityFile = "~/.ssh/aur";
identitiesOnly = true;
};
"heroku.com" = {
hostname = "heroku.com";
identityFile = "~/.ssh/heroku";
identitiesOnly = true;
};
"*ngrok.io" = {
hostname = "*ngrok.io";
identityFile = "~/.ssh/local";
identitiesOnly = true;
};
"172.27.108.*" = {
hostname = "172.27.108.*";
identityFile = "~/.ssh/local";
identitiesOnly = true;
};
"*" = {
identityFile = "~/.ssh/id_ed25519";
};
};
};
}

View file

@ -1,66 +1,62 @@
{ config, pkgs, lib, ... }:
{
home.packages = with pkgs; [
bspwm
findutils
gnome3.nautilus
pulseaudio-ctl
playerctl
alacritty
terminator
rofi
bash
betterlockscreen
];
home.packages = with pkgs; [
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";
alacritty = "${pkgs.alacritty}/bin/alacritty";
terminator= "${pkgs.terminator}/bin/terminator";
rofi = "${pkgs.rofi}/bin/rofi";
bash = "${pkgs.bash}/bin/bash";
betterlockscreen = "betterlockscreen";
in {
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 + shift + {h,j,k,l}" = "${bspc} node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
"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";
};
};
services.sxhkd = let
alacritty = "${pkgs.alacritty}/bin/alacritty";
bash = "${pkgs.bash}/bin/bash";
rofi = "${pkgs.rofi}/bin/rofi";
terminator = "${pkgs.terminator}/bin/terminator";
in {
enable = true;
keybindings = {
"super + Return" = ''${alacritty} -c "${alacritty} || /usr/bin/alacritty || ${terminator}"'';
"super + @space" = "${rofi} -show drun";
"super + e" = "nautilus -w";
"super + alt + e" = ''dunstify "Welcome back $USER"'';
"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 + shift + {h,j,k,l}" = "bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
"super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}";
"XF86AudioRaiseVolume" = "pulseaudio-ctl up";
"XF86AudioLowerVolume" = "pulseaudio-ctl down";
"XF86AudioMute" = "pulseaudio-ctl mute";
"XF86AudioPlay" = "playerctl play-pause";
"XF86AudioNext" = "playerctl next";
"XF86AudioPrev" = "playerctl previous";
};
};
}

20
modules/tmux.nix Normal file
View file

@ -0,0 +1,20 @@
{ pkgs, ... }:
{
programs.tmux = {
enable = true;
clock24 = true;
escapeTime = 25;
plugins = with pkgs; [
tmuxPlugins.continuum
tmuxPlugins.prefix-highlight
tmuxPlugins.nord
];
extraConfig = ''
set -g mouse on
'';
# set -g default-terminal "screen"
# set -ga terminal-overrides ",col:Tc"
};
}