Switch to nixfmt

This commit is contained in:
Filippo Berto 2023-01-19 19:53:17 +01:00
parent 44794e2c3d
commit 5b974a203b
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED
63 changed files with 990 additions and 946 deletions

View file

@ -21,8 +21,7 @@ let
};
};
};
in
{
in {
# Include fonts packages
home.packages = [ pkgs.rice.font.monospace.package ];
programs.alacritty = {

View file

@ -1,102 +1,100 @@
{
programs.autorandr = {
enable = true;
profiles =
let
dell-laptop = {
dpi = 96;
fingerprint =
"00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5";
mode = "1920x1080";
};
in
{
odin-nvidia = {
fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; };
config = {
"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;
};
};
};
odin-intel-laboratorio-dock-dell = {
fingerprint = {
"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";
};
};
};
odin-intel-laboratorio = {
fingerprint = {
"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";
};
};
};
thor-default = {
fingerprint = {
"DP-2" =
"00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da";
"HDMI-0" =
"00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa";
};
config = {
"DP-2" = {
crtc = 0;
mode = "2560x1440";
position = "1080x162";
primary = true;
dpi = 96;
};
"HDMI-0" = {
crtc = 1;
mode = "1920x1080";
position = "0x0";
rotate = "right";
dpi = 96;
};
profiles = let
dell-laptop = {
dpi = 96;
fingerprint =
"00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5";
mode = "1920x1080";
};
in {
odin-nvidia = {
fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; };
config = {
"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;
};
};
};
odin-intel-laboratorio-dock-dell = {
fingerprint = {
"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";
};
};
};
odin-intel-laboratorio = {
fingerprint = {
"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";
};
};
};
thor-default = {
fingerprint = {
"DP-2" =
"00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da";
"HDMI-0" =
"00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa";
};
config = {
"DP-2" = {
crtc = 0;
mode = "2560x1440";
position = "1080x162";
primary = true;
dpi = 96;
};
"HDMI-0" = {
crtc = 1;
mode = "1920x1080";
position = "0x0";
rotate = "right";
dpi = 96;
};
};
};
};
};
}

View file

@ -2,9 +2,7 @@
programs.bash = {
enable = true;
enableVteIntegration = true;
shellAliases = {
".." = "cd ..";
};
shellAliases = { ".." = "cd .."; };
bashrcExtra = ''
source $HOME/.profile

View file

@ -1,3 +1 @@
{ pkgs, ... }: {
home.packages = with pkgs;[ calibre mangal ];
}
{ pkgs, ... }: { home.packages = with pkgs; [ calibre mangal ]; }

View file

@ -1,3 +1 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ blender ];
}
{ pkgs, ... }: { home.packages = with pkgs; [ blender ]; }

View file

@ -13,8 +13,7 @@ let
systemctl --user restart kdeconnect-indicator # Restart polybar
'';
strPalette = palette.toRGBHex pkgs.rice.colorPalette;
in
{
in {
xsession.windowManager.bspwm = {
enable = true;
settings = {

View file

@ -2,8 +2,7 @@
let
strPalette = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.colorPalette;
fmtString = str: "'${str}'";
in
{
in {
home.packages = [ pkgs.cava ];
xdg.configFile."cava/config".text = lib.generators.toINI { } {

View file

@ -1,11 +1,12 @@
{ pkgs, config, lib, ... }: {
home.packages = with pkgs; [
home.packages = with pkgs;
[
] ++ lib.optionals config.programs.helix.enable [
clang-tools # C, CPP
cmake-language-server # CMAKE
] ++ lib.optionals config.programs.kakoune.enable [
clang-tools # C, CPP
cmake-language-server # CMAKE
];
] ++ lib.optionals config.programs.helix.enable [
clang-tools # C, CPP
cmake-language-server # CMAKE
] ++ lib.optionals config.programs.kakoune.enable [
clang-tools # C, CPP
cmake-language-server # CMAKE
];
}

View file

@ -1,10 +1,11 @@
{ config, pkgs, lib, ... }: {
home.packages = with pkgs; lib.optionals config.programs.helix.enable [
nodePackages.vscode-langservers-extracted # CSS, HTML, JSON, SCSS
yaml-language-server # YAML
taplo-cli # TOML
] ++ lib.optionals config.programs.kakoune.enable [
nodePackages.vscode-langservers-extracted # CSS, HTML, JSON, SCSS
yaml-language-server # YAML
];
home.packages = with pkgs;
lib.optionals config.programs.helix.enable [
nodePackages.vscode-langservers-extracted # CSS, HTML, JSON, SCSS
yaml-language-server # YAML
taplo-cli # TOML
] ++ lib.optionals config.programs.kakoune.enable [
nodePackages.vscode-langservers-extracted # CSS, HTML, JSON, SCSS
yaml-language-server # YAML
];
}

View file

@ -1,10 +1,8 @@
{ pkgs, config, lib, ... }: {
home.packages = with pkgs; [
docker-compose
docker-machine
] ++ lib.optionals config.programs.helix.enable [
nodePackages.dockerfile-language-server-nodejs
];
home.packages = with pkgs;
[ docker-compose docker-machine ]
++ lib.optionals config.programs.helix.enable
[ nodePackages.dockerfile-language-server-nodejs ];
home.shellAliases = {
"dkcd" = "docker-compose down";
"dkc" = "docker-compose";

View file

@ -4,9 +4,7 @@
goPath = ".go";
};
home.packages = with pkgs; lib.optionals config.programs.helix.enable [
gopls
] ++ (lib.optionals config.programs.kakoune.enable [
gopls
]);
home.packages = with pkgs;
lib.optionals config.programs.helix.enable [ gopls ]
++ (lib.optionals config.programs.kakoune.enable [ gopls ]);
}

View file

@ -1,10 +1,10 @@
{ pkgs, lib, config, ... }: {
home.packages = with pkgs; [
home.packages = with pkgs;
[
] ++ lib.optionals config.programs.helix.enable [
nodePackages.typescript-language-server
] ++ lib.optionals config.programs.kakoune.enable [
nodePackages.typescript-language-server
];
] ++ lib.optionals config.programs.helix.enable
[ nodePackages.typescript-language-server ]
++ lib.optionals config.programs.kakoune.enable
[ nodePackages.typescript-language-server ];
}

View file

@ -1,7 +1 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
kubectl
kubernetes-helm
lens
];
}
{ pkgs, ... }: { home.packages = with pkgs; [ kubectl kubernetes-helm lens ]; }

View file

@ -1,16 +1,13 @@
{ pkgs, config, lib, ... }: {
home.packages = with pkgs; [
bibtool
tex2nix
texlive.combined.scheme-medium
] ++ lib.optionals config.programs.helix.enable [
texlab
] ++ lib.optionals config.programs.kakoune.enable [
texlab
aspell
aspellDicts.en
aspellDicts.en-computers
aspellDicts.en-science
aspellDicts.it
];
home.packages = with pkgs;
[ bibtool tex2nix texlive.combined.scheme-medium ]
++ lib.optionals config.programs.helix.enable [ texlab ]
++ lib.optionals config.programs.kakoune.enable [
texlab
aspell
aspellDicts.en
aspellDicts.en-computers
aspellDicts.en-science
aspellDicts.it
];
}

View file

@ -1,12 +1,6 @@
{ pkgs, config, lib, ... }: {
home.packages = with pkgs; [
nixpkgs-fmt
nix-prefetch-scripts
nix-review
nix-tree
] ++ lib.optionals config.programs.helix.enable [
nil
] ++ lib.optionals config.programs.kakoune.enable [
rnix-lsp
];
}
home.packages = with pkgs;
[ nixfmt nix-prefetch-scripts nix-review nix-tree ]
++ lib.optionals config.programs.helix.enable [ nil ]
++ lib.optionals config.programs.kakoune.enable [ rnix-lsp ];
}

View file

@ -1,17 +1,16 @@
{ pkgs, lib, config, ... }: {
home.packages = with pkgs; [
black
] ++ lib.optionals config.programs.helix.enable [
python3Packages.python-lsp-server # PYLSP
# python3Packages.pyls-mypy # MYPY # NOT UPDATED
python3Packages.pyls-flake8 # FLAKE8
# python3Packages.pyls-black # BLACK # NOT UPDATED
python3Packages.pyls-isort # ISORT
] ++ lib.optionals config.programs.kakoune.enable [
python3Packages.python-lsp-server # PYLSP
# python3Packages.pyls-mypy # MYPY # NOT UPDATED
python3Packages.pyls-flake8 # FLAKE8
# python3Packages.pyls-black # BLACK # NOT UPDATED
python3Packages.pyls-isort # ISORT
];
home.packages = with pkgs;
[ black ] ++ lib.optionals config.programs.helix.enable [
python3Packages.python-lsp-server # PYLSP
# python3Packages.pyls-mypy # MYPY # NOT UPDATED
python3Packages.pyls-flake8 # FLAKE8
# python3Packages.pyls-black # BLACK # NOT UPDATED
python3Packages.pyls-isort # ISORT
] ++ lib.optionals config.programs.kakoune.enable [
python3Packages.python-lsp-server # PYLSP
# python3Packages.pyls-mypy # MYPY # NOT UPDATED
python3Packages.pyls-flake8 # FLAKE8
# python3Packages.pyls-black # BLACK # NOT UPDATED
python3Packages.pyls-isort # ISORT
];
}

View file

@ -1,37 +1,34 @@
{ pkgs, lib, config, ... }: {
home.packages = with pkgs; [
bacon
cargo
# cargo-about
cargo-audit
# cargo-auditable
cargo-criterion
cargo-deadlinks
# cargo-deny
# cargo-deps
cargo-expand
# cargo-feature
cargo-flamegraph
cargo-fuzz
cargo-hack
cargo-hakari
cargo-inspect
cargo-modules
cargo-outdated
cargo-profiler
cargo-release
cargo-show-asm
cargo-spellcheck
cargo-tarpaulin
cargo-udeps
cargo-watch
cargo-workspaces
clippy
rustfmt
] ++ lib.optionals config.programs.helix.enable [
rust-analyzer
] ++
lib.optionals config.programs.kakoune.enable [
rust-analyzer
];
home.packages = with pkgs;
[
bacon
cargo
# cargo-about
cargo-audit
# cargo-auditable
cargo-criterion
cargo-deadlinks
# cargo-deny
# cargo-deps
cargo-expand
# cargo-feature
cargo-flamegraph
cargo-fuzz
cargo-hack
cargo-hakari
cargo-inspect
cargo-modules
cargo-outdated
cargo-profiler
cargo-release
cargo-show-asm
cargo-spellcheck
cargo-tarpaulin
cargo-udeps
cargo-watch
cargo-workspaces
clippy
rustfmt
] ++ lib.optionals config.programs.helix.enable [ rust-analyzer ]
++ lib.optionals config.programs.kakoune.enable [ rust-analyzer ];
}

View file

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

View file

@ -1,10 +1,8 @@
{ pkgs, ... }:
let
package = with pkgs.dwarf-fortress-packages; dwarf-fortress-full.override {
theme = themes.ironhand;
enableFPS = true;
};
in
{
home.packages = [ package ];
}
package = with pkgs.dwarf-fortress-packages;
dwarf-fortress-full.override {
theme = themes.ironhand;
enableFPS = true;
};
in { home.packages = [ package ]; }

View file

@ -87,8 +87,7 @@ let
"gup" = "git pull --rebase";
"gupv" = "git pull --rebase -v";
};
in
{
in {
programs.git = {
enable = true;
userName = "Filippo Berto";

View file

@ -28,7 +28,4 @@ let
user-themes
# vitals
];
in
{
home.packages = [ pkgs.gnome.gnome-tweaks ] ++ gnomeExtensions;
}
in { home.packages = [ pkgs.gnome.gnome-tweaks ] ++ gnomeExtensions; }

View file

@ -1,7 +1,7 @@
{ pkgs, ... }:
let thumbnailer = "${pkgs.libheif.bin}/bin/heif-thumbnailer"; in
{
let thumbnailer = "${pkgs.libheif.bin}/bin/heif-thumbnailer";
in {
# home.packages = [
# pkgs.libheif.bin
# ];

View file

@ -26,11 +26,13 @@ let
"text/x-c++"
];
};
in
{
in {
programs.bash.shellAliases = { x = "hx"; };
programs.zsh.shellAliases = { x = "hx"; };
home.sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; };
home.sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
};
home.packages = with pkgs; [
nil # Nix language server
desktopItem
@ -50,84 +52,82 @@ in
"C-A-S-r" = ":reload-all";
};
};
themes =
let
transparent = "none";
gray = "#665c54";
dark-gray = "#3c3836";
white = "#fbf1c7";
black = "#282828";
red = "#fb4934";
green = "#b8bb26";
yellow = "#fabd2f";
orange = "#fe8019";
blue = "#83a598";
magenta = "#d3869b";
cyan = "#8ec07c";
in
{
base16 = {
"ui.menu" = transparent;
"ui.menu.selected" = { modifiers = [ "reversed" ]; };
"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.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.cursor" = { modifiers = [ "reversed" ]; };
"variable" = red;
"variable.builtin" = orange;
"constant.numeric" = orange;
"constant" = orange;
"attributes" = yellow;
"type" = yellow;
"ui.cursor.match" = {
fg = yellow;
modifiers = [ "underlined" ];
};
"string" = green;
"variable.other.member" = red;
"constant.character.escape" = cyan;
"function" = blue;
"constructor" = blue;
"special" = blue;
"keyword" = magenta;
"label" = magenta;
"namespace" = blue;
"diff.plus" = green;
"diff.delta" = yellow;
"diff.minus" = red;
"diagnostic" = { modifiers = [ "underlined" ]; };
"ui.gutter" = { bg = black; };
"info" = blue;
"hint" = dark-gray;
"debug" = dark-gray;
"warning" = yellow;
"error" = red;
themes = let
transparent = "none";
gray = "#665c54";
dark-gray = "#3c3836";
white = "#fbf1c7";
black = "#282828";
red = "#fb4934";
green = "#b8bb26";
yellow = "#fabd2f";
orange = "#fe8019";
blue = "#83a598";
magenta = "#d3869b";
cyan = "#8ec07c";
in {
base16 = {
"ui.menu" = transparent;
"ui.menu.selected" = { modifiers = [ "reversed" ]; };
"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.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.cursor" = { modifiers = [ "reversed" ]; };
"variable" = red;
"variable.builtin" = orange;
"constant.numeric" = orange;
"constant" = orange;
"attributes" = yellow;
"type" = yellow;
"ui.cursor.match" = {
fg = yellow;
modifiers = [ "underlined" ];
};
"string" = green;
"variable.other.member" = red;
"constant.character.escape" = cyan;
"function" = blue;
"constructor" = blue;
"special" = blue;
"keyword" = magenta;
"label" = magenta;
"namespace" = blue;
"diff.plus" = green;
"diff.delta" = yellow;
"diff.minus" = red;
"diagnostic" = { modifiers = [ "underlined" ]; };
"ui.gutter" = { bg = black; };
"info" = blue;
"hint" = dark-gray;
"debug" = dark-gray;
"warning" = yellow;
"error" = red;
};
};
};
}

View file

@ -61,8 +61,7 @@ let
})
];
in
{
in {
programs.bash.shellAliases = { k = "kak"; };
programs.zsh.shellAliases = { k = "kak"; };
home.packages = packages;
@ -266,8 +265,8 @@ in
};
# THEME FILE
xdg.configFile."kak/colors/nord.kak".text =
themeBuilder (pkgs.lib.nix-rice.palette.toRgbShortHex pkgs.rice.colorPalette);
xdg.configFile."kak/colors/nord.kak".text = themeBuilder
(pkgs.lib.nix-rice.palette.toRgbShortHex pkgs.rice.colorPalette);
xdg.configFile."kak-lsp/kak-lsp.toml".text = ''
snippet_support = false

View file

@ -1,3 +1,6 @@
{
services.kdeconnect = { enable = true; indicator = true; };
services.kdeconnect = {
enable = true;
indicator = true;
};
}

View file

@ -2,28 +2,10 @@
let
strPalette = pkgs.lib.nix-rice.palette.toRgbHex {
inherit (pkgs.rice.colorPalette)
background
foreground
color0
color1
color2
color3
color4
color5
color6
color7
color8
color9
color10
color11
color12
color13
color14
color15
;
background foreground color0 color1 color2 color3 color4 color5 color6
color7 color8 color9 color10 color11 color12 color13 color14 color15;
};
in
{
in {
programs.kitty = {
enable = true;
settings = {

View file

@ -17,8 +17,7 @@ let
${pkgs.pistol}/bin/pistol "$file"
'';
in
{
in {
programs.lf = {
enable = true;
settings = {

View file

@ -2,8 +2,7 @@
let
libinputGesturesCmd = "${pkgs.libinput-gestures}/bin/libinput-gestures";
xdotool = "${pkgs.xdotool}/bin/xdotool";
in
{
in {
systemd.user.services."libinput-gestures" = {
Unit = {
Description = "Touchpad gestures";

View file

@ -1,13 +1,14 @@
{ pkgs, ... }: {
programs.password-store = {
package = pkgs.pass.withExtensions (ext: with ext; [
pass-audit
pass-checkup
pass-import
pass-otp
pass-tomb
pass-update
]);
package = pkgs.pass.withExtensions (ext:
with ext; [
pass-audit
pass-checkup
pass-import
pass-otp
pass-tomb
pass-update
]);
enable = true;
};
}

View file

@ -26,14 +26,13 @@ let
playerStatus =
"${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata | ${head} -c 50";
confirm_command = { cmd, title ? null, text ? null, image ? null }:
lib.concatStringsSep " "
[
"${pkgs.yad}/bin/yad --question --center --on-top --sticky --timeout=30 --timeout-indicator=bottom"
(if title == null then "" else ''--title "${title}"'')
(if image == null then "" else ''--image "${image}"'')
(if text == null then "" else ''--text "${text}"'')
"&& ${cmd}"
];
lib.concatStringsSep " " [
"${pkgs.yad}/bin/yad --question --center --on-top --sticky --timeout=30 --timeout-indicator=bottom"
(if title == null then "" else ''--title "${title}"'')
(if image == null then "" else ''--image "${image}"'')
(if text == null then "" else ''--text "${text}"'')
"&& ${cmd}"
];
systemctl = "${pkgs.systemd}/bin/systemctl";
loginctl = "${pkgs.systemd}/bin/loginctl";
shutdown = "${pkgs.systemd}/bin/shutdown";
@ -43,8 +42,7 @@ let
'';
colors = with pkgs.lib.nix-rice;
let alpha = 255 * opacity;
in
palette.toARGBHex rec {
in palette.toARGBHex rec {
normal = {
foreground = color.darken 10 colorPalette.foreground;
@ -111,8 +109,7 @@ let
};
ramp = [ "" "" "" "" "" "" ];
in
{
in {
home.packages = with pkgs; [
pkgs.rice.font.monospace.package
# emojione
@ -140,7 +137,8 @@ in
"bar/primary" = recursiveUpdate commonBar {
modules-left = "bspwm";
# modules-center =
modules-right = "player pulseaudio temperature cpu memory battery notifications powermenu date";
modules-right =
"player pulseaudio temperature cpu memory battery notifications powermenu date";
tray = {
position = "right";
padding = 1;
@ -150,7 +148,8 @@ in
"bar/secondary" = recursiveUpdate commonBar {
modules-left = "bspwm";
# modules-center =
modules-right = "player pulseaudio temperature cpu memory battery notifications powermenu date";
modules-right =
"player pulseaudio temperature cpu memory battery notifications powermenu date";
};
"module/battery" = {
@ -193,22 +192,20 @@ in
type = "internal/bspwm";
format = "<label-state>";
label =
let
common = {
padding = 1;
# separator = " ";
text = "%name%";
};
in
{
focused = recursiveUpdate common colors.selected;
occupied = recursiveUpdate common colors.active;
urgent = recursiveUpdate (recursiveUpdate common colors.active) {
background = colors.alert;
};
empty = recursiveUpdate common colors.normal;
label = let
common = {
padding = 1;
# separator = " ";
text = "%name%";
};
in {
focused = recursiveUpdate common colors.selected;
occupied = recursiveUpdate common colors.active;
urgent = recursiveUpdate (recursiveUpdate common colors.active) {
background = colors.alert;
};
empty = recursiveUpdate common colors.normal;
};
};
"module/cpu" = {
@ -303,42 +300,40 @@ in
open = recursiveUpdate colors.normal { text = ""; };
close = recursiveUpdate colors.normal { text = ""; };
};
menu = [
[
{
text = "";
exec = confirm_command {
cmd = logout;
title = "Logout";
text = "Do you want to logout?";
};
}
{
text = "";
exec = confirm_command {
cmd = "${systemctl} reboot";
title = "Reboot";
text = "Do you want to reboot?";
};
}
{
text = "";
exec = confirm_command {
cmd = "${systemctl} hibernate";
title = "Hibernate";
text = "Do you want to hibernate?";
};
}
{
text = "";
exec = confirm_command {
cmd = "${shutdown} now";
title = "Shutdown";
text = "Do you want to shutdown?";
};
}
]
];
menu = [[
{
text = "";
exec = confirm_command {
cmd = logout;
title = "Logout";
text = "Do you want to logout?";
};
}
{
text = "";
exec = confirm_command {
cmd = "${systemctl} reboot";
title = "Reboot";
text = "Do you want to reboot?";
};
}
{
text = "";
exec = confirm_command {
cmd = "${systemctl} hibernate";
title = "Hibernate";
text = "Do you want to hibernate?";
};
}
{
text = "";
exec = confirm_command {
cmd = "${shutdown} now";
title = "Shutdown";
text = "Do you want to shutdown?";
};
}
]];
};
"module/notifications" = {

View file

@ -13,8 +13,7 @@ let
VST_PATH = "$HOME/.vst:${userLibFolder}/vst:${systemLibFolder}/vst";
VST3_PATH = "$HOME/.vst3:${userLibFolder}/vst3:${systemLibFolder}/vst3";
};
in
{
in {
home.packages = with pkgs; [
carla
rnnoise

View file

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

View file

@ -11,82 +11,93 @@
bc # required by bsp-layout
clipedit
];
services.sxhkd =
let
primaryTerminal = "kitty";
secondaryTerminal = "terminator";
fileManager = "thunar";
emojiChooser = "rofimoji --skin-tone light -a copy";
yad = "${pkgs.yad}/bin/yad";
notify = "${pkgs.libnotify}/bin/notify-send";
pamixer = "${pkgs.pamixer}/bin/pamixer";
playerctl = "${pkgs.playerctl}/bin/playerctl";
xbacklight = "${pkgs.xorg.xbacklight}/bin/xbacklight";
resetBspwm = pkgs.writeShellScript "resetBspwm" ''
bspc wm -r
systemctl --user restart polybar # Restart polybar
services.sxhkd = let
primaryTerminal = "kitty";
secondaryTerminal = "terminator";
fileManager = "thunar";
emojiChooser = "rofimoji --skin-tone light -a copy";
yad = "${pkgs.yad}/bin/yad";
notify = "${pkgs.libnotify}/bin/notify-send";
pamixer = "${pkgs.pamixer}/bin/pamixer";
playerctl = "${pkgs.playerctl}/bin/playerctl";
xbacklight = "${pkgs.xorg.xbacklight}/bin/xbacklight";
resetBspwm = pkgs.writeShellScript "resetBspwm" ''
bspc wm -r
systemctl --user restart polybar # Restart polybar
'';
moveAllNodesToPrimary = pkgs.writeShellScript "moveAllNodesToPrimary" ''
comm -23 <(bspc query -N | sort) <(bspc query -m primary -N | sort) | while read n; do bspc node $n -m primary; done
'';
notifyVolume = pkgs.writeShellScript "notifyVolume" ''
volume=`${pamixer} --get-volume`
${notify} -r 1 -h "int:value:$volume" "Volume $volume%"
'';
notifyBrightness = pkgs.writeShellScript "notifyBrightness" ''
level=`printf "%.0f" $(${xbacklight} -get)`
${notify} -r 2 -h "int:value:$level" "Luminosità $level"
'';
in {
enable = true;
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 + m" = "lockscreen";
"super + alt + p" = "autorandr -c";
"super + alt + shift + p" = "arandr";
"super + alt + q" = ''
${yad} --question --center --on-top --sticky --timeout=30 --timeout-indicator=bottom --image=gnome-shutdown --title "Shutdown" --text "Do you want to shutdown?" && bspc quit
'';
moveAllNodesToPrimary = pkgs.writeShellScript "moveAllNodesToPrimary" ''
comm -23 <(bspc query -N | sort) <(bspc query -m primary -N | sort) | while read n; do bspc node $n -m primary; done
"super + alt + o" = "${moveAllNodesToPrimary}";
"super + alt + r" = "${resetBspwm}";
"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" = "${pkgs.update-background}/bin/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 + space" = "bspc node -p cancel";
"super + e" = fileManager;
"super + shift + p" = "clipedit";
"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 + {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 + {_,shift + } c" = "bspc node -f {next,prev}.local";
"super + {_,shift + } @space" = "rofi -show {drun,run}";
"super + shift + ctrl + d" = "rofi -show ssh";
"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
'';
notifyVolume = pkgs.writeShellScript "notifyVolume" ''
volume=`${pamixer} --get-volume`
${notify} -r 1 -h "int:value:$volume" "Volume $volume%"
'';
notifyBrightness = pkgs.writeShellScript "notifyBrightness" ''
level=`printf "%.0f" $(${xbacklight} -get)`
${notify} -r 2 -h "int:value:$level" "Luminosità $level"
'';
in
{
enable = true;
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 + m" = "lockscreen";
"super + alt + p" = "autorandr -c";
"super + alt + shift + p" = "arandr";
"super + alt + q" = ''
${yad} --question --center --on-top --sticky --timeout=30 --timeout-indicator=bottom --image=gnome-shutdown --title "Shutdown" --text "Do you want to shutdown?" && bspc quit
'';
"super + alt + o" = "${moveAllNodesToPrimary}";
"super + alt + r" = "${resetBspwm}";
"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" = "${pkgs.update-background}/bin/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 + space" = "bspc node -p cancel";
"super + e" = fileManager;
"super + shift + p" = "clipedit";
"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 + {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 + {_,shift + } c" = "bspc node -f {next,prev}.local";
"super + {_,shift + } @space" = "rofi -show {drun,run}";
"super + shift + ctrl + d" = "rofi -show ssh";
"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 + } w" = "bspc node -{c,k}";
"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";
"XF86Audio{LowerVolume,Mute,RaiseVolume}" = "${pamixer} {-d 2 -u,-t,-i 2 -u} && ${notifyVolume}";
"XF86Audio{Next,Play,Prev}" = "${playerctl} {next,play-pause,previous}";
"super + alt + {Right,Down,Left}" = "${playerctl} {next,play-pause,previous}";
"XF86MonBrightness{Up,Down}" = " ${xbacklight} -{inc,dec} 10 && ${notifyBrightness}";
};
"super + {_,shift + } Return" =
"{${primaryTerminal} , ${secondaryTerminal}}";
"super + {_,shift + } w" = "bspc node -{c,k}";
"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";
"XF86Audio{LowerVolume,Mute,RaiseVolume}" =
"${pamixer} {-d 2 -u,-t,-i 2 -u} && ${notifyVolume}";
"XF86Audio{Next,Play,Prev}" = "${playerctl} {next,play-pause,previous}";
"super + alt + {Right,Down,Left}" =
"${playerctl} {next,play-pause,previous}";
"XF86MonBrightness{Up,Down}" =
" ${xbacklight} -{inc,dec} 10 && ${notifyBrightness}";
};
};
}

View file

@ -1 +1,6 @@
{ services.syncthing = { enable = true; extraOptions = [ "--gui-address=http://0.0.0.0:8384" ]; }; }
{
services.syncthing = {
enable = true;
extraOptions = [ "--gui-address=http://0.0.0.0:8384" ];
};
}

View file

@ -1,2 +1,7 @@
{ services.syncthing = { enable = true; extraOptions = [ "--gui-address=http://0.0.0.0:8385" ]; }; }
{
services.syncthing = {
enable = true;
extraOptions = [ "--gui-address=http://0.0.0.0:8385" ];
};
}

View file

@ -26,8 +26,7 @@ let
bright.cyan
bright.white
];
in
{
in {
home.packages = with pkgs; [ terminator ];
xdg.configFile."terminator/config".text = with strPalette; ''

View file

@ -3,20 +3,25 @@ with pkgs.lib.nix-rice;
let
strPalette = palette.toRGBHex pkgs.rice.colorPalette;
font = pkgs.rice.font.normal;
in
{
in {
services.twmn = {
enable = true;
text = {
color = strPalette.primary.foreground;
font = { inherit (font) package size; family = font.name; };
font = {
inherit (font) package size;
family = font.name;
};
};
window = {
animation.bounce.enable = false;
color = strPalette.primary.background;
height = 32;
opacity = float.round (pkgs.rice.opacity * 100);
offset = { x = -20; y = 50; };
offset = {
x = -20;
y = 50;
};
};
};
}

View file

@ -63,17 +63,11 @@ let
categories = [ "AudioVideo" ];
}
];
webAppBuilder =
{ desktopName
, name ? builtins.replaceStrings [ " " ] [ "_" ] desktopName
, link
, icon ? lib.toLower name
, comment ? null
, categories ? [ "Network" ]
}:
webAppBuilder = { desktopName
, name ? builtins.replaceStrings [ " " ] [ "_" ] desktopName, link
, icon ? lib.toLower name, comment ? null, categories ? [ "Network" ] }:
pkgs.makeDesktopItem {
inherit name icon desktopName comment categories;
exec = cmd link;
};
in
{ home.packages = map webAppBuilder links; }
in { home.packages = map webAppBuilder links; }

View file

@ -19,8 +19,7 @@ let
shutDownScreens = pkgs.writeShellScript "shutdown_screens" ''
${xsetCmd} dpms force off
'';
in
{
in {
services.xidlehook = {
enable = true;
package = pkgs.writeScriptBin "xidlehook" ''

View file

@ -4,9 +4,7 @@ let strPalette = palette.toRgbHex pkgs.rice.colorPalette;
in {
programs.zathura = {
enable = true;
mappings = {
"<C-i>" = "recolor";
};
mappings = { "<C-i>" = "recolor"; };
options = {
completion-bg = strPalette.bright.black;
# default-bg = strPalette.normal.black;