Reformat + swap odin SSD

This commit is contained in:
Filippo Berto 2022-09-01 15:11:16 +02:00
parent 1bc27dde82
commit 2f3d05a802
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
83 changed files with 1448 additions and 931 deletions

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
home = {
language.base = "it_IT.UTF-8";
packages = with pkgs; [

View file

@ -1,31 +1,32 @@
{ pkgs, ... }:
let
strPalette = with pkgs.rice; pkgs.lib.rice.palette.toRgbHex rec {
inherit (colorPalette) normal bright;
dim = colorPalette.dark;
strPalette = with pkgs.rice;
pkgs.lib.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;
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
@ -45,10 +46,11 @@ in
# hide_when_typing = true;
hints.modifiers = "Control";
};
colors = with pkgs.rice; strPalette // {
selection.text = "CellForeground";
search.matches.foreground = "CellForeground";
};
colors = with pkgs.rice;
strPalette // {
selection.text = "CellForeground";
search.matches.foreground = "CellForeground";
};
};
};
}

View file

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
programs.zsh.enable = true;
programs.zsh.initExtra = ''
source <(${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right)
'';
}

View file

@ -5,7 +5,8 @@
let
dell-laptop = {
dpi = 96;
fingerprint = "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5";
fingerprint =
"00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5";
mode = "1920x1080";
};
in
@ -13,43 +14,87 @@
odin-nvidia = {
fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; };
config = {
"eDP-1-1" = { inherit (dell-laptop) mode dpi; primary = true; crtc = 0; };
"eDP-1-1" = {
inherit (dell-laptop) mode dpi;
primary = true;
crtc = 0;
};
};
};
odin-intel = {
fingerprint = { "eDP1" = dell-laptop.fingerprint; };
config = {
"eDP1" = { inherit (dell-laptop) mode dpi; primary = true; crtc = 0; };
"eDP1" = {
inherit (dell-laptop) mode dpi;
primary = true;
crtc = 0;
};
};
};
odin-intel-laboratorio-dock-dell = {
fingerprint = {
"DP1-3" = "00ffffffffffff0010ac10d04c36453221110103682b1b78ee8db0a2544a9c25115054a54b00714f818001010101010101010101010121399030621a274068b03600ae0e1100001c000000ff00434b3632373738413245364c0a000000fd00384b1e530f000a202020202020000000fc0044454c4c20453230375746500a0088";
"DP1-3" =
"00ffffffffffff0010ac10d04c36453221110103682b1b78ee8db0a2544a9c25115054a54b00714f818001010101010101010101010121399030621a274068b03600ae0e1100001c000000ff00434b3632373738413245364c0a000000fd00384b1e530f000a202020202020000000fc0044454c4c20453230375746500a0088";
"eDP1" = dell-laptop.fingerprint;
};
config = {
"DP1-3" = { crtc = 1; mode = "1680x1050"; position = "120x0"; primary = true; dpi = 96; };
"eDP1" = { inherit (dell-laptop) mode dpi; crtc = 0; position = "0x1080"; };
"DP1-3" = {
crtc = 1;
mode = "1680x1050";
position = "120x0";
primary = true;
dpi = 96;
};
"eDP1" = {
inherit (dell-laptop) mode dpi;
crtc = 0;
position = "0x1080";
};
};
};
odin-intel-laboratorio = {
fingerprint = {
"DP1-3" = "00ffffffffffff0010ac71404c473344281601030e331d78eadd45a3554fa027125054a54b00714f8180d1c001010101010101010101023a801871382d40582c4500fe1f1100001e000000ff004b463837593241364433474c0a000000fc0044454c4c205532333132484d0a000000fd00384c1e5311000a2020202020200081";
"DP1-3" =
"00ffffffffffff0010ac71404c473344281601030e331d78eadd45a3554fa027125054a54b00714f8180d1c001010101010101010101023a801871382d40582c4500fe1f1100001e000000ff004b463837593241364433474c0a000000fc0044454c4c205532333132484d0a000000fd00384c1e5311000a2020202020200081";
"eDP1" = dell-laptop.fingerprint;
};
config = {
"DP1-3" = { crtc = 1; mode = "1920x1080"; position = "0x0"; primary = true; dpi = 96; };
"eDP1" = { inherit (dell-laptop) mode dpi; crtc = 0; position = "0x1080"; };
"DP1-3" = {
crtc = 1;
mode = "1920x1080";
position = "0x0";
primary = true;
dpi = 96;
};
"eDP1" = {
inherit (dell-laptop) mode dpi;
crtc = 0;
position = "0x1080";
};
};
};
thor-two-screens = {
fingerprint = {
"DP-4" = "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da";
"HDMI-0" = "00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa";
"DP-4" =
"00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da";
"HDMI-0" =
"00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa";
};
config = {
"DP-4" = { crtc = 0; mode = "2560x1440"; position = "1080x162"; primary = true; dpi = 96; };
"HDMI-0" = { crtc = 1; mode = "1920x1080"; position = "0x0"; rotate = "right"; dpi = 96; };
"DP-4" = {
crtc = 0;
mode = "2560x1440";
position = "1080x162";
primary = true;
dpi = 96;
};
"HDMI-0" = {
crtc = 1;
mode = "1920x1080";
position = "0x0";
rotate = "right";
dpi = 96;
};
};
};
};

View file

@ -1,8 +1,6 @@
{ pkgs, ... }:
let
tomlGenerate = (pkgs.formats.toml { }).generate "bottom-toml";
in
{
let tomlGenerate = (pkgs.formats.toml { }).generate "bottom-toml";
in {
home.packages = with pkgs; [ bottom ];
xdg.configFile."bottom/bottom.toml".source = tomlGenerate {
"flags" = {

View file

@ -1,11 +1,14 @@
{ pkgs, lib, ... }:
let
strPalette = with pkgs.rice; pkgs.lib.rice.palette.toRgbHex colorPalette;
fmtString = str: "\'${str}\'";
fmtString = str: "'${str}'";
in
{
xdg.configFile."cava/config".text = lib.generators.toINI { } {
general = { bar_width = 1; bar_spacing = 1; };
general = {
bar_width = 1;
bar_spacing = 1;
};
color = {
gradient = 1;
gradient_count = 5;

View file

@ -1,6 +1 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
clang-tools
];
}
{ pkgs, ... }: { home.packages = with pkgs; [ clang-tools ]; }

View file

@ -1,8 +1,6 @@
{ pkgs, ... }:
let
palette = pkgs.lib.rice.palette.toRGBHex pkgs.rice.colorPalette;
in
{
let palette = pkgs.lib.rice.palette.toRGBHex pkgs.rice.colorPalette;
in {
home.packages = with pkgs; [ dunst rice.font.normal.package ];
services.dunst = {
enable = true;

View file

@ -1,3 +1 @@
{
services.easyeffects.enable = true;
}
{ services.easyeffects.enable = true; }

View file

@ -1,8 +1,5 @@
{ pkgs, ... }:
{
fonts.fontconfig = {
enable = true;
};
{ pkgs, ... }: {
fonts.fontconfig = { enable = true; };
home.packages = with pkgs; [
dejavu_fonts
noto-fonts

View file

@ -44,11 +44,13 @@ let
"gdw" = "git diff --word-diff";
"gf" = "git fetch";
"gfa" = "git fetch --all --prune";
"gfg" = "git ls-files \| grep";
"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";
"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";
@ -117,10 +119,5 @@ in
};
programs.bash.shellAliases = shellAliases;
programs.zsh.shellAliases = shellAliases;
home.packages = with pkgs; [
gh
git-secret
glab
meld
];
home.packages = with pkgs; [ gh git-secret glab meld ];
}

View file

@ -4,7 +4,5 @@
goPath = ".go";
};
home.packages = with pkgs; [
gopls
];
home.packages = with pkgs; [ gopls ];
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
gtk = with pkgs.rice; {
enable = true;
font = font.normal;

View file

@ -1,36 +1,37 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
programs.bash.shellAliases = { x = "hx"; };
programs.zsh.shellAliases = { x = "hx"; };
home.sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; };
home.sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
};
home.packages = [
(pkgs.makeDesktopItem
{
name = "helix";
exec = "hx %F";
icon = "helix";
desktopName = "Helix";
comment = "Helix text editor";
terminal = true;
categories = [ "Development" ];
mimeTypes = [
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
];
})
(pkgs.makeDesktopItem {
name = "helix";
exec = "hx %F";
icon = "helix";
desktopName = "Helix";
comment = "Helix text editor";
terminal = true;
categories = [ "Development" ];
mimeTypes = [
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
];
})
];
programs.helix = {
enable = true;
@ -65,15 +66,34 @@
base16 = {
"ui.menu" = transparent;
"ui.menu.selected" = { modifiers = [ "reversed" ]; };
"ui.linenr" = { fg = gray; bg = dark-gray; };
"ui.linenr" = {
fg = gray;
bg = dark-gray;
};
"ui.popup" = { modifiers = [ "reversed" ]; };
"ui.linenr.selected" = { fg = white; bg = black; modifiers = [ "bold" ]; };
"ui.selection" = { fg = black; bg = blue; };
"ui.linenr.selected" = {
fg = white;
bg = black;
modifiers = [ "bold" ];
};
"ui.selection" = {
fg = black;
bg = blue;
};
"ui.selection.primary" = { modifiers = [ "reversed" ]; };
"comment" = { fg = gray; };
"ui.statusline" = { fg = white; bg = dark-gray; };
"ui.statusline.inactive" = { fg = dark-gray; bg = white; };
"ui.help" = { fg = dark-gray; bg = white; };
"ui.statusline" = {
fg = white;
bg = dark-gray;
};
"ui.statusline.inactive" = {
fg = dark-gray;
bg = white;
};
"ui.help" = {
fg = dark-gray;
bg = white;
};
"ui.cursor" = { modifiers = [ "reversed" ]; };
"variable" = red;
"variable.builtin" = orange;
@ -81,7 +101,10 @@
"constant" = orange;
"attributes" = yellow;
"type" = yellow;
"ui.cursor.match" = { fg = yellow; modifiers = [ "underlined" ]; };
"ui.cursor.match" = {
fg = yellow;
modifiers = [ "underlined" ];
};
"string" = green;
"variable.other.member" = red;
"constant.character.escape" = cyan;

View file

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

View file

@ -1,3 +1 @@
{
programs.java.enable = true;
}
{ programs.java.enable = true; }

View file

@ -1,7 +1,2 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
flow
];
}
{ pkgs, ... }: { home.packages = with pkgs; [ flow ]; }

View file

@ -1,17 +1,13 @@
{ pkgs, ... }:
let
joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake";
in
{
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" ];
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Service = {
Type = "simple";
ExecStart = joystickwakeCmd;

View file

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

View file

@ -1,33 +1,34 @@
{ pkgs, ... }:
let
themeBuilder = palette: with palette; ''
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
'';
themeBuilder = palette:
with palette; ''
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
'';
packages = with pkgs; [
yaml-language-server
@ -40,33 +41,32 @@ let
aspellDicts.en-science
aspellDicts.it
(pkgs.makeDesktopItem
{
name = "kakoune";
exec = "kak %F";
icon = "kakoune";
desktopName = "Kakoune";
comment = "Kakoune text editor";
terminal = true;
categories = [ "Development" ];
mimeTypes = [
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
];
})
(pkgs.makeDesktopItem {
name = "kakoune";
exec = "kak %F";
icon = "kakoune";
desktopName = "Kakoune";
comment = "Kakoune text editor";
terminal = true;
categories = [ "Development" ];
mimeTypes = [
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
];
})
];
in
@ -81,40 +81,166 @@ in
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; };
scrollOff = {
lines = 5;
columns = 3;
};
ui = {
setTitle = true;
changeColors = true;
enableMouse = true;
};
wrapLines = {
enable = true;
word = true;
};
numberLines = {
enable = true;
highlightCursor = true;
};
keyMappings = [
{ 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-|>${pkgs.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-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
{ mode = "user"; docstring = "Paste from clipboard (before)"; key = "p"; effect = "!${pkgs.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 = "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-|>${pkgs.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-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
}
{
mode = "user";
docstring = "Paste from clipboard (before)";
key = "p";
effect = "!${pkgs.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 = "BufCreate";
option = ".*";
commands = "editorconfig-load";
}
# { name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
{ name = "ModuleLoaded"; option = "powerline"; commands = "powerline-enable; powerline-start"; }
{ name = "BufSetOption"; option = "filetype=latex"; commands = "set-option buffer formatcmd latexindent"; }
{ name = "BufSetOption"; option = "filetype=python"; commands = "set-option buffer formatcmd 'black -'"; }
{ name = "BufSetOption"; option = "filetype=(markdown|html|json|yaml|css|scss|less)"; commands = "set-option buffer formatcmd prettier"; }
{ name = "BufSetOption"; option = "filetype=rust"; commands = "set-option buffer formatcmd 'rustfmt'"; }
{ name = "BufSetOption"; option = "filetype=sh"; commands = "set-option buffer formatcmd 'rustfmt'"; }
{
name = "ModuleLoaded";
option = "powerline";
commands = "powerline-enable; powerline-start";
}
{
name = "BufSetOption";
option = "filetype=latex";
commands = "set-option buffer formatcmd latexindent";
}
{
name = "BufSetOption";
option = "filetype=python";
commands = "set-option buffer formatcmd 'black -'";
}
{
name = "BufSetOption";
option = "filetype=(markdown|html|json|yaml|css|scss|less)";
commands = "set-option buffer formatcmd prettier";
}
{
name = "BufSetOption";
option = "filetype=rust";
commands = "set-option buffer formatcmd 'rustfmt'";
}
{
name = "BufSetOption";
option = "filetype=sh";
commands = "set-option buffer formatcmd 'rustfmt'";
}
];
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
};
@ -148,7 +274,8 @@ in
};
# THEME FILE
xdg.configFile."kak/colors/nord.kak".text = themeBuilder (pkgs.lib.rice.palette.toRgbShortHex pkgs.rice.colorPalette);
xdg.configFile."kak/colors/nord.kak".text =
themeBuilder (pkgs.lib.rice.palette.toRgbShortHex pkgs.rice.colorPalette);
xdg.configFile."kak-lsp/kak-lsp.toml".text = ''
snippet_support = false

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
config.systemd.user.services.keepassxc = {
Unit = {
Description = "KeePassXC password manager";

View file

@ -1,25 +1,26 @@
{ pkgs, ... }:
let
strPalette = with pkgs.rice; pkgs.lib.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;
};
strPalette = with pkgs.rice;
pkgs.lib.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 = {
@ -32,7 +33,8 @@ in
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";
clipboard_control =
"write-clipboard write-primary read-clipboard read-primary";
disable_ligatures = "never";
editor = "kak";
} // strPalette;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
home.packages = with pkgs; [
bibtool
tex2nix

View file

@ -34,43 +34,46 @@ in
source = lf_kitty_preview;
# keybinding = "i";
};
keybindings = {
"<c-f>" = "$EDITOR $(fzf)";
};
keybindings = { "<c-f>" = "$EDITOR $(fzf)"; };
commands = {
"z" = ''''${{
result="$(zoxide query --exclude "$PWD" -- "$@")"
lf -remote "send $id cd '$result'"
}}'';
"zi" = ''''${{
result="$(zoxide query -i -- "$@")"
lf -remote "send $id cd '$result'"
}}'';
"extract" = ''''${{
set -f
case $f in
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
*.tar.gz|*.tgz) tar xzvf $f;;
*.tar.xz|*.txz) tar xJvf $f;;
*.zip) unzip $f;;
*.rar) unrar x $f;;
*.7z) 7z x $f;;
esac
}}'';
"tar" = ''''${{
set -f
mkdir $1
cp -r $fx $1
tar czf $1.tar.gz $1
rm -rf $1
}}'';
"zip" = ''''${{
set -f
mkdir $1
cp -r $fx $1
zip -r $1.zip $1
rm -rf $1
}}'';
"z" = ''
''${{
result="$(zoxide query --exclude "$PWD" -- "$@")"
lf -remote "send $id cd '$result'"
}}'';
"zi" = ''
''${{
result="$(zoxide query -i -- "$@")"
lf -remote "send $id cd '$result'"
}}'';
"extract" = ''
''${{
set -f
case $f in
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
*.tar.gz|*.tgz) tar xzvf $f;;
*.tar.xz|*.txz) tar xJvf $f;;
*.zip) unzip $f;;
*.rar) unrar x $f;;
*.7z) 7z x $f;;
esac
}}'';
"tar" = ''
''${{
set -f
mkdir $1
cp -r $fx $1
tar czf $1.tar.gz $1
rm -rf $1
}}'';
"zip" = ''
''${{
set -f
mkdir $1
cp -r $fx $1
zip -r $1.zip $1
rm -rf $1
}}'';
};
extraConfig = ''
set cleaner ${lf_kitty_cleaner}

View file

@ -10,9 +10,7 @@ in
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Service = {
Type = "simple";
ExecStart = libinputGesturesCmd;

View file

@ -1,3 +1 @@
{
services.lorri.enable = true;
}
{ services.lorri.enable = true; }

View file

@ -3,7 +3,38 @@
enable = true;
enableSessionWide = true;
settings = {
toggle_fps_limit = "F1";
legacy_layout = false;
gpu_stats = true;
gpu_temp = true;
gpu_text = "GPU";
cpu_stats = true;
cpu_temp = true;
cpu_color = "2e97cb";
cpu_text = "CPU";
io_color = "a491d3";
vram = true;
vram_color = "ad64c1";
ram = true;
ram_color = "c26693";
fps = true;
engine_color = "eb5b5b";
gpu_color = "2e9762";
wine_color = "eb5b5b";
frame_timing = 1;
frametime_color = "00ff00";
media_player_color = "ffffff";
background_alpha = 0.4;
font_size = 24;
background_color = "020202";
position = "top-left";
text_color = "ffffff";
round_corners = 0;
toggle_hud = "Shift_L+F12";
toggle_logging = "Shift_L+F2";
upload_log = "F5";
output_folder = "/home/bertof";
media_player_name = "spotify";
};
};
}

View file

@ -1,11 +1,7 @@
{ pkgs, ... }:
let
megasyncCmd = "${pkgs.megacmd}/bin/mega-cmd-server";
in
{
home.packages = [
pkgs.megacmd
];
let megasyncCmd = "${pkgs.megacmd}/bin/mega-cmd-server";
in {
home.packages = [ pkgs.megacmd ];
systemd.user.services."mega-cmd-server" = {
Unit = {
@ -13,9 +9,7 @@ in
After = [ "default.target" ];
PartOf = [ "default.target" ];
};
Install = {
WantedBy = [ "default.target" ];
};
Install = { WantedBy = [ "default.target" ]; };
Service = {
Type = "simple";
ExecStart = megasyncCmd;

View file

@ -1,4 +1 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ gnome.nautilus ];
}
{ pkgs, ... }: { home.packages = with pkgs; [ gnome.nautilus ]; }

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
programs.nix-index = {
enable = true;
enableBashIntegration = true;
@ -20,7 +19,11 @@
timers."nix-index" = {
Unit.Description = "Daily update the nix-locate database";
Timer = { OnCalendar = "daily"; Persistent = true; Unit = "nix-index.service"; };
Timer = {
OnCalendar = "daily";
Persistent = true;
Unit = "nix-index.service";
};
Install.WantedBy = [ "timers.target" ];
};
};

View file

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

View file

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

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
programs.obs-studio = {
enable = true;
package = pkgs.obs-studio;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
home.packages = with pkgs; [
# libreoffice-fresh
onlyoffice-bin

View file

@ -1,17 +1,13 @@
{ pkgs, ... }:
let
onedriveCmd = "${pkgs.unstable.onedrive}/bin/onedrive --monitor";
in
{
let onedriveCmd = "${pkgs.unstable.onedrive}/bin/onedrive --monitor";
in {
systemd.user.services."onedrive" = {
Unit = {
Description = "OneDrive synchronization service";
After = [ "network.target" ];
PartOf = [ "default.target" ];
};
Install = {
WantedBy = [ "default.target" ];
};
Install = { WantedBy = [ "default.target" ]; };
Service = {
ExecStart = onedriveCmd;
Restart = "always";

View file

@ -1,5 +1 @@
{
programs.password-store = {
enable = true;
};
}
{ programs.password-store = { enable = true; }; }

View file

@ -9,7 +9,8 @@ let
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";
playerStatus =
"${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata | ${head} -c 60";
systemctl = "${pkgs.systemd}/bin/systemctl";
loginctl = "${pkgs.systemd}/bin/loginctl";
shutdown = "${pkgs.systemd}/bin/shutdown";
@ -17,39 +18,39 @@ let
session=`${loginctl} session-status | ${pkgs.coreutils}/bin/head -n 1 | ${pkgs.gawk}/bin/awk '{print $1}'`
${loginctl} terminate-session $session
'';
colors = with pkgs.lib.rice; let
alpha = 255 * opacity;
in
palette.toARGBHex rec {
colors = with pkgs.lib.rice;
let alpha = 255 * opacity;
in palette.toARGBHex rec {
normal = {
foreground = colorPalette.normal.white;
background = color.setAlphaRgba alpha (colorPalette.normal.black);
underline = colorPalette.dark.blue;
normal = {
foreground = colorPalette.normal.white;
background = color.setAlphaRgba alpha (colorPalette.normal.black);
underline = colorPalette.dark.blue;
};
active = {
foreground = colorPalette.bright.white;
background = color.setAlphaRgba alpha (colorPalette.normal.black);
underline = colorPalette.bright.blue;
};
selected = {
foreground = colorPalette.bright.white;
background = color.setAlphaRgba alpha
(color.brighten 10 colorPalette.bright.black);
underline = colorPalette.bright.red;
};
alert = colorPalette.bright.red;
green = colorPalette.normal.green;
yellow = colorPalette.normal.yellow;
orange = colorPalette.bright.red;
red = colorPalette.normal.red;
transparent = color.transparent;
};
active = {
foreground = colorPalette.bright.white;
background = color.setAlphaRgba alpha (colorPalette.normal.black);
underline = colorPalette.bright.blue;
};
selected = {
foreground = colorPalette.bright.white;
background = color.setAlphaRgba alpha (color.brighten 10 colorPalette.bright.black);
underline = colorPalette.bright.red;
};
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}";
@ -61,8 +62,14 @@ let
foreground = colors.normal.foreground;
line-size = 2;
line-color = colors.normal.underline;
padding = { left = 0; right = 0; };
module.margin = { left = 0; right = 0; };
padding = {
left = 0;
right = 0;
};
module.margin = {
left = 0;
right = 0;
};
separator = " ";
border = {
color = colors.transparent;
@ -72,7 +79,9 @@ let
bottom.size = 0;
};
font = [
"${pkgs.rice.font.monospace.name}:size=${toString pkgs.rice.font.monospace.size};2"
"${pkgs.rice.font.monospace.name}:size=${
toString pkgs.rice.font.monospace.size
};2"
# "Font Awesome 6 Free:size=14;0"
# "Noto Color Emoji:size=2;2"
"Noto Sans Symbols2:size=${toString pkgs.rice.font.monospace.size};2"
@ -96,25 +105,23 @@ in
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
'';
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;
};
"settings" = { screenchange-reload = false; };
"bar/primary" = recursiveUpdate commonBar {
modules-left = "bspwm";
# modules-center =
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
modules-right =
"player pulseaudio temperature cpu memory battery date powermenu";
enable-ipc = true;
tray = {
position = "right";
@ -125,7 +132,8 @@ in
"bar/secondary" = recursiveUpdate commonBar {
modules-left = "bspwm";
# modules-center =
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
modules-right =
"player pulseaudio temperature cpu memory battery date powermenu";
enable-ipc = true;
};
@ -148,8 +156,12 @@ in
};
format = {
charging = recursiveUpdate colors.selected { text = "<animation-charging> <label-charging>"; };
discharging = recursiveUpdate colors.active { text = "<animation-discharging> <label-discharging>"; };
charging = recursiveUpdate colors.selected {
text = "<animation-charging> <label-charging>";
};
discharging = recursiveUpdate colors.active {
text = "<animation-discharging> <label-discharging>";
};
full = recursiveUpdate colors.normal { text = " <label-full>"; };
};
@ -176,8 +188,13 @@ in
{
focused = recursiveUpdate colors.selected common;
occupied = recursiveUpdate colors.active common;
urgent = recursiveUpdate (recursiveUpdate colors.active common) { background = colors.alert; };
empty = recursiveUpdate (recursiveUpdate colors.normal common) { text = "󰧟"; padding = 0; };
urgent = recursiveUpdate (recursiveUpdate colors.active common) {
background = colors.alert;
};
empty = recursiveUpdate (recursiveUpdate colors.normal common) {
text = "󰧟";
padding = 0;
};
};
};
@ -230,11 +247,14 @@ in
colors.red
];
};
click.right = "${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
click.right =
"${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
format = {
padding = 1;
muted = colors.active;
volume = recursiveUpdate colors.normal { text = "<ramp-volume> <label-volume>"; };
volume = recursiveUpdate colors.normal {
text = "<ramp-volume> <label-volume>";
};
};
label.muted.text = " muted";
label.volume.text = "%percentage%%";
@ -250,7 +270,8 @@ in
underline = colors.alert;
};
};
hwmon.path = "/sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input";
hwmon.path =
"/sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input";
label = {
text = "%temperature-c%";
warn = "%temperature-c%";
@ -275,22 +296,46 @@ in
};
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 = "#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 = logout; })
({
text = "Logout";
exec = logout;
})
]
[
({ text = "Reboot"; exec = "${systemctl} reboot"; })
({
text = "Reboot";
exec = "${systemctl} reboot";
})
]
[
({ text = "Hibernate"; exec = "${systemctl} hibernate"; })
({
text = "Hibernate";
exec = "${systemctl} hibernate";
})
]
[
({ text = "Power off"; exec = "${shutdown} now"; })
({
text = "Power off";
exec = "${shutdown} now";
})
]
];
};

View file

@ -2,10 +2,12 @@
let
user = "bertof";
systemLibFolder = "/run/current-system/sw/lib/";
userLibFolder = "/nix/var/nix/profiles/per-user/${user}/home-manager/home-path/lib/";
userLibFolder =
"/nix/var/nix/profiles/per-user/${user}/home-manager/home-path/lib/";
variables = {
DSSI_PATH = "$HOME/.dssi:${userLibFolder}/dssi:${systemLibFolder}/dssi";
LADSPA_PATH = "$HOME/.ladspa:${userLibFolder}/ladspa:${systemLibFolder}/ladspa";
LADSPA_PATH =
"$HOME/.ladspa:${userLibFolder}/ladspa:${systemLibFolder}/ladspa";
LV2_PATH = "$HOME/.lv2:${userLibFolder}/lv2:${systemLibFolder}/lv2";
LXVST_PATH = "$HOME/.lxvst:${userLibFolder}/lxvst:${systemLibFolder}/lxvst";
VST_PATH = "$HOME/.vst:${userLibFolder}/vst:${systemLibFolder}/vst";

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
home.packages = with pkgs; [
jetbrains.pycharm-professional
python3

View file

@ -1,10 +1,9 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
black
] ++ (with pkgs.python3Packages; [
python-lsp-server
# pyls-black # not updated to the new pylsp
pyls-flake8
pyls-isort
]);
home.packages = with pkgs;
[ black ] ++ (with pkgs.python3Packages; [
python-lsp-server
# pyls-black # not updated to the new pylsp
pyls-flake8
pyls-isort
]);
}

View file

@ -2,10 +2,10 @@
programs.rofi = {
enable = true;
location = "center";
font = "${pkgs.rice.font.monospace.name} ${toString pkgs.rice.font.monospace.size}";
extraConfig = {
modi = "drun,run,ssh,window";
};
font = "${pkgs.rice.font.monospace.name} ${
toString pkgs.rice.font.monospace.size
}";
extraConfig = { modi = "drun,run,ssh,window"; };
terminal = "kitty";
theme = "onedark";
};

View file

@ -1,8 +1,5 @@
{ pkgs, ... }:
{
home.packages = [
pkgs.rofimoji
];
{ pkgs, ... }: {
home.packages = [ pkgs.rofimoji ];
xdg.configFile."rofimoji.rc".text = ''
action=copy

View file

@ -1,10 +1,3 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
bacon
cargo
clippy
rust-analyzer
rustfmt
];
{ pkgs, ... }: {
home.packages = with pkgs; [ bacon cargo clippy rust-analyzer rustfmt ];
}

View file

@ -1,12 +1,8 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
services.screen-locker = {
enable = true;
lockCmd = "${pkgs.lockscreen}/bin/lockscreen";
inactiveInterval = 2; # minutes
xautolock.extraOptions = [
"-secure"
"-lockaftersleep"
];
xautolock.extraOptions = [ "-secure" "-lockaftersleep" ];
};
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
home.packages = with pkgs; [
# RECOGNITION
nmap

View file

@ -2,8 +2,6 @@
programs.ssh = {
enable = true;
compression = true;
matchBlocks = {
"*" = { identityFile = "~/.ssh/id_ed25519"; };
};
matchBlocks = { "*" = { identityFile = "~/.ssh/id_ed25519"; }; };
};
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
imports = [ ./nautilus.nix ];
home.packages = with pkgs; [
bc
@ -25,41 +24,55 @@
keybindings = {
"alt + Tab" = "rofi -show window";
"Print" = "gnome-screenshot";
"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 + m" = "lockscreen";
"super + alt + p" = "autorandr -c";
"super + alt + {q,r}" = "bspc {quit,wm -r}";
"super + alt + {Right,Down,Left}" = "playerctl {next,play-pause,previous}";
"super + alt + shift + {h,j,k,l}" = "bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
"super + alt + {Right,Down,Left}" =
"playerctl {next,play-pause,previous}";
"super + alt + shift + {h,j,k,l}" =
"bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
"super + bracket{left,right}" = "bspc desktop -f {prev,next}.local";
"super + b" = "update-background";
"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 + {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" = fileManager;
"super + Escape" = "pkill -USR1 -x sxhkd";
"super + g" = "bspc node -s biggest";
"super + {grave,Tab}" = "bspc {node,desktop} -f last";
"super + {h,j,k,l}" = "dir={west,south,north,east}; bspc node -f $dir || bspc monitor -f $dir";
"super + {h,j,k,l}" =
"dir={west,south,north,east}; bspc node -f $dir || bspc monitor -f $dir";
"super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}";
"super + m" = "bspc desktop -l next";
"super + n {_, + shift}" = "bsp-layout {next, previous}";
"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 + }{1-9,0}" = "bspc {desktop -f,node -d} 'focused:^{1-9,10}'";
"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 + }{1-9,0}" =
"bspc {desktop -f,node -d} 'focused:^{1-9,10}'";
"super + {_,shift + }c" = "bspc node -f {next,prev}.local";
"super + shift + e" = emojiChooser;
"super + shift + {h,j,k,l}" = ''dir={west,south,north,east}; bspc node -s "$dir.local" --follow || bspc node -m "$dir" --follow'';
"super + {_,shift + } Return" = "{${primaryTerminal} , ${secondaryTerminal}}";
"super + shift + {h,j,k,l}" = ''
dir={west,south,north,east}; bspc node -s "$dir.local" --follow || bspc node -m "$dir" --follow'';
"super + {_,shift + } Return" =
"{${primaryTerminal} , ${secondaryTerminal}}";
"super + {_,shift + }@space " = "rofi -show {drun,run}";
"super + {_,shift + }w" = "bspc node -{c,k}";
"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";
"{XF86AudioLowerVolume,XF86AudioMute,XF86AudioRaiseVolume}" = "pamixer {-d 2 -u,-t,-i 2 -u} && dunstify -r 1 Volume `pamixer --get-volume-human`";
"{XF86AudioLowerVolume,XF86AudioMute,XF86AudioRaiseVolume}" =
"pamixer {-d 2 -u,-t,-i 2 -u} && dunstify -r 1 Volume `pamixer --get-volume-human`";
"XF86Audio{Next,Play,Prev}" = "playerctl {next,play-pause,previous}";
"XF86MonBrightness{Up,Down}" = ''xbacklight -{inc,dec} 10 && dunstify -r 2 Luminosità `printf "%.0f" $(xbacklight -get)`'';
"XF86MonBrightness{Up,Down}" = ''
xbacklight -{inc,dec} 10 && dunstify -r 2 Luminosità `printf "%.0f" $(xbacklight -get)`'';
};
};
}

View file

@ -1,5 +1 @@
{
services.syncthing = {
enable = true;
};
}
{ services.syncthing = { enable = true; }; }

View file

@ -7,12 +7,29 @@ let
};
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 ];
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
];
home.packages = with pkgs; [ terminator ];
xdg.configFile."terminator/config".text = with strPalette; ''
[global_config]

View file

@ -1,8 +1 @@
{ pkgs, ... }:
{
home.packages = with pkgs.xfce; [
thunar
tumbler
xfconf
];
}
{ pkgs, ... }: { home.packages = with pkgs.xfce; [ thunar tumbler xfconf ]; }

View file

@ -1,14 +1,10 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
programs.tmux = {
enable = true;
clock24 = true;
escapeTime = 25;
terminal = "screen-256color";
plugins = with pkgs.tmuxPlugins; [
nord
prefix-highlight
];
plugins = with pkgs.tmuxPlugins; [ nord prefix-highlight ];
extraConfig = ''
set -g mouse on
'';

View file

@ -1,8 +1,6 @@
{ pkgs, ... }:
let
update_time = "10m";
in
{
let update_time = "10m";
in {
home.packages = [ pkgs.update-background ];
systemd.user.services."update-background" = {
@ -12,9 +10,7 @@ in
PartOf = [ "graphical-session.target" ];
RequiresMountsFor = [ "/home/bertof/Immagini" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Service = {
Type = "oneshot";
IOSchedulingClass = "idle";

View file

@ -4,17 +4,59 @@ let
# cmd = link: "google-chrome-stable --app=${link}";
cmd = link: "firefox ${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" ]; }
{
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
@ -23,11 +65,10 @@ let
, icon ? lib.toLower name
, comment ? null
, categories ? [ "Network" ]
}: pkgs.makeDesktopItem {
}:
pkgs.makeDesktopItem {
inherit name icon desktopName comment categories;
exec = cmd link;
};
in
{
home.packages = map webAppBuilder links;
}
{ home.packages = map webAppBuilder links; }

View file

@ -10,7 +10,8 @@ let
lightLevel = 10;
saveLightLevel = "${xbacklightCmd} -get > /run/user/$UID/xbacklight_v";
lowerLight = "${xbacklightCmd} -set ${toString lightLevel}";
resetLight = "${xbacklightCmd} -set $(</run/user/$UID/xbacklight_v) || ${xbacklightCmd} -set 100";
resetLight =
"${xbacklightCmd} -set $(</run/user/$UID/xbacklight_v) || ${xbacklightCmd} -set 100";
in
{
services.xidlehook = {

View file

@ -1,8 +1,6 @@
{ pkgs, ... }:
let
strPalette = pkgs.lib.rice.palette.toRgbHex pkgs.rice.colorPalette;
in
{
let strPalette = pkgs.lib.rice.palette.toRgbHex pkgs.rice.colorPalette;
in {
programs.zathura = {
enable = true;
options = {

View file

@ -1,9 +1,5 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
nix-zsh-completions
zsh-completions
];
{ pkgs, ... }: {
home.packages = with pkgs; [ nix-zsh-completions zsh-completions ];
programs.zsh = {
enable = true;
@ -19,14 +15,8 @@
oh-my-zsh = {
enable = true;
plugins = [
"common-aliases"
"cp"
"dirhistory"
"git-auto-fetch"
"git"
"sudo"
];
plugins =
[ "common-aliases" "cp" "dirhistory" "git-auto-fetch" "git" "sudo" ];
extraConfig = "";
};