Nix fmt rfc style (more or less)

This commit is contained in:
Filippo Berto 2024-08-13 12:22:23 +02:00
parent e7496c447a
commit 515f098644
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
146 changed files with 2607 additions and 906 deletions

View file

@ -1,10 +1,24 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home = {
language.base = "it_IT.UTF-8";
packages = builtins.attrValues {
inherit (pkgs)
fd file htop mmv-go neofetch nixos-option pv ripgrep unrar unzip wget
xclip yq zip;
fd
file
htop
mmv-go
neofetch
nixos-option
pv
ripgrep
unrar
unzip
wget
xclip
yq
zip
;
};
};

View file

@ -27,11 +27,13 @@ in
programs.alacritty = {
enable = true;
settings = {
key_bindings = [{
key = "Return";
mods = "Control|Shift";
action = "SpawnNewInstance";
}];
key_bindings = [
{
key = "Return";
mods = "Control|Shift";
action = "SpawnNewInstance";
}
];
# env.TERM = "xterm-256color";
env = {
TERM = "alacritty";

View file

@ -5,8 +5,7 @@
let
dell-laptop = {
dpi = 96;
fingerprint =
"00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5";
fingerprint = "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5";
mode = "1920x1080";
};
schermo_lab_dp = {
@ -22,7 +21,9 @@
in
{
odin-nvidia = {
fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; };
fingerprint = {
"eDP-1-1" = dell-laptop.fingerprint;
};
config = {
"eDP-1-1" = {
inherit (dell-laptop) mode dpi;
@ -32,7 +33,9 @@
};
odin-intel = {
fingerprint = { "eDP1" = dell-laptop.fingerprint; };
fingerprint = {
"eDP1" = dell-laptop.fingerprint;
};
config = {
"eDP1" = {
inherit (dell-laptop) mode dpi;
@ -111,10 +114,8 @@
thor-default = {
fingerprint = {
"DP-2" =
"00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da";
"HDMI-0" =
"00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa";
"DP-2" = "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da";
"HDMI-0" = "00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa";
};
config = {
"DP-2" = {

View file

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

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = builtins.attrValues {
inherit (pkgs) calibre;
inherit (pkgs.unstable_pkgs) mangal;

View file

@ -1,6 +1,14 @@
{ pkgs, config, lib, ... }: {
home.packages = [ pkgs.bitwarden ] ++
lib.optionals config.programs.rofi.enable (builtins.attrValues {
# inherit (pkgs.unstable_pkgs) rbw rofi-rbw pinentry-gtk2;
});
{ pkgs
, config
, lib
, ...
}:
{
home.packages =
[ pkgs.bitwarden ]
++ lib.optionals config.programs.rofi.enable (
builtins.attrValues {
# inherit (pkgs.unstable_pkgs) rbw rofi-rbw pinentry-gtk2;
}
);
}

View file

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

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = [ (pkgs.blender.override { cudaSupport = true; }) ];
}

View file

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

View file

@ -1,7 +1,18 @@
{ pkgs, lib, ... }:
let
xsetroot = "${pkgs.xorg.xsetroot}/bin/xsetroot";
monitorPages = [ "" "" "" "" "" "" "" "" "" "" ];
monitorPages = [
""
""
""
""
""
""
""
""
""
""
];
monitorPagesString = lib.strings.concatStringsSep " " monitorPages;
monitorSetupScript = pkgs.writeShellScript "monitorSetupScript" ''
for monitor in $(bspc query -M --names); do
@ -50,9 +61,15 @@ in
};
# monitors = builtins.foldl' (acc: monitor: acc // { ${monitor} = monitorPages; }) { } monitors;
rules = {
"*" = { follow = true; };
"Zathura" = { state = "tiled"; };
"Yad" = { state = "floating"; };
"*" = {
follow = true;
};
"Zathura" = {
state = "tiled";
};
"Yad" = {
state = "floating";
};
};
startupPrograms = [
"${monitorSetupScript}" # Setup monitors

View file

@ -1,10 +1,15 @@
{ pkgs, config, lib, ... }: {
{ pkgs
, config
, lib
, ...
}:
{
home.packages =
lib.optionals config.programs.helix.enable
(builtins.attrValues {
inherit (pkgs) clang-tools cmake-language-server;
}) ++
lib.optionals config.programs.kakoune.enable (builtins.attrValues {
inherit (pkgs) clang-tools cmake-language-server;
});
(
builtins.attrValues { inherit (pkgs) clang-tools cmake-language-server; }
)
++ lib.optionals config.programs.kakoune.enable (
builtins.attrValues { inherit (pkgs) clang-tools cmake-language-server; }
);
}

View file

@ -1,10 +1,21 @@
{ config, pkgs, lib, ... }: {
home.packages = lib.optionals config.programs.helix.enable
(builtins.attrValues {
inherit (pkgs) yaml-language-server taplo-cli;
inherit (pkgs.nodePackages) vscode-langservers-extracted;
}) ++ lib.optionals config.programs.kakoune.enable (builtins.attrValues {
inherit (pkgs) yaml-language-server;
inherit (pkgs.nodePackages) vscode-langservers-extracted;
});
{ config
, pkgs
, lib
, ...
}:
{
home.packages =
lib.optionals config.programs.helix.enable
(
builtins.attrValues {
inherit (pkgs) yaml-language-server taplo-cli;
inherit (pkgs.nodePackages) vscode-langservers-extracted;
}
)
++ lib.optionals config.programs.kakoune.enable (
builtins.attrValues {
inherit (pkgs) yaml-language-server;
inherit (pkgs.nodePackages) vscode-langservers-extracted;
}
);
}

View file

@ -1,3 +1,4 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = builtins.attrValues { inherit (pkgs.unstable_pkgs.jetbrains) datagrip jdk; };
}

View file

@ -1,6 +1,14 @@
{ pkgs, config, lib, ... }: {
home.packages = (builtins.attrValues { inherit (pkgs) docker-compose; })
++ lib.optionals config.programs.helix.enable (builtins.attrValues { inherit (pkgs.nodePackages) dockerfile-language-server-nodejs; });
{ pkgs
, config
, lib
, ...
}:
{
home.packages =
(builtins.attrValues { inherit (pkgs) docker-compose; })
++ lib.optionals config.programs.helix.enable (
builtins.attrValues { inherit (pkgs.nodePackages) dockerfile-language-server-nodejs; }
);
home.shellAliases = {
"dkcd" = "docker-compose down";
"dkc" = "docker-compose";
@ -8,4 +16,3 @@
"dk" = "docker";
};
}

View file

@ -1,10 +1,15 @@
{ pkgs, lib, config, ... }: {
{ pkgs
, lib
, config
, ...
}:
{
programs.go = {
enable = true;
goPath = ".go";
};
home.packages =
(lib.optionals config.programs.helix.enable [ pkgs.gopls ]) ++
(lib.optionals config.programs.kakoune.enable [ pkgs.gopls ]);
(lib.optionals config.programs.helix.enable [ pkgs.gopls ])
++ (lib.optionals config.programs.kakoune.enable [ pkgs.gopls ]);
}

View file

@ -1,10 +1,16 @@
{ pkgs, lib, config, ... }: {
home.packages = lib.optionals config.programs.helix.enable
(builtins.attrValues {
inherit (pkgs.nodePackages) typescript-language-server;
}) ++ lib.optionals config.programs.kakoune.enable (builtins.attrValues {
inherit (pkgs.nodePackages) typescript-language-server;
});
{ pkgs
, lib
, config
, ...
}:
{
home.packages =
lib.optionals config.programs.helix.enable
(
builtins.attrValues { inherit (pkgs.nodePackages) typescript-language-server; }
)
++ lib.optionals config.programs.kakoune.enable (
builtins.attrValues { inherit (pkgs.nodePackages) typescript-language-server; }
);
programs.neovim.withNodeJs = true;
}

View file

@ -1,6 +1,9 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home = {
shellAliases = { "k" = "kubectl"; };
shellAliases = {
"k" = "kubectl";
};
packages = [
(pkgs.wrapHelm pkgs.kubernetes-helm {
plugins = builtins.attrValues {

View file

@ -1,10 +1,26 @@
{ pkgs, config, lib, ... }: {
home.packages = [ pkgs.bibtool pkgs.texlive.combined.scheme-full ]
{ pkgs
, config
, lib
, ...
}:
{
home.packages =
[
pkgs.bibtool
pkgs.texlive.combined.scheme-full
]
++ lib.optionals config.programs.helix.enable [ pkgs.texlab ]
++ lib.optionals config.programs.kakoune.enable (builtins.attrValues {
inherit (pkgs) texlab aspell;
inherit (pkgs.aspellDicts) en en-computers en-science it;
});
++ lib.optionals config.programs.kakoune.enable (
builtins.attrValues {
inherit (pkgs) texlab aspell;
inherit (pkgs.aspellDicts)
en
en-computers
en-science
it
;
}
);
home.file.".latexmkrc".text = ''
$pdf_previewer = 'zathura %O %S';

View file

@ -1,10 +1,12 @@
{ pkgs, lib, config, ... }: {
{ pkgs
, lib
, config
, ...
}:
{
home.packages = [
pkgs.pandoc
# pkgs.pandoc-drawio-filter
# pkgs.pandoc-imagine
]
++ lib.optionals config.programs.helix.enable [
pkgs.marksman
];
] ++ lib.optionals config.programs.helix.enable [ pkgs.marksman ];
}

View file

@ -1,6 +1,19 @@
{ pkgs, config, lib, ... }: {
{ pkgs
, config
, lib
, ...
}:
{
home.packages =
(builtins.attrValues { inherit (pkgs) nixpkgs-fmt nixfmt-classic nix-prefetch-scripts nixpkgs-review nix-tree; })
(builtins.attrValues {
inherit (pkgs)
nixpkgs-fmt
nixfmt-classic
nix-prefetch-scripts
nixpkgs-review
nix-tree
;
})
++ lib.optionals config.programs.helix.enable [ pkgs.nil ]
++ lib.optionals config.programs.kakoune.enable [ pkgs.rnix-lsp ];
programs.neovim.plugins = [ pkgs.vimPlugins.vim-nix ];

View file

@ -1,22 +1,26 @@
{ pkgs, lib, config, ... }:
{ pkgs
, lib
, config
, ...
}:
let
py = pkgs.python3;
pyPkgs = py.pkgs;
in
{
home.packages = [ py pyPkgs.black ] ++
lib.optionals config.programs.helix.enable ((builtins.attrValues {
inherit (pyPkgs)
python-lsp-server
pyls-flake8
pyls-isort;
}) ++ pyPkgs.python-lsp-server.optional-dependencies.all) ++
lib.optionals config.programs.kakoune.enable ((builtins.attrValues {
inherit (pyPkgs)
python-lsp-server
pyls-flake8
pyls-isort;
}) ++ pyPkgs.python-lsp-server.optional-dependencies.all);
home.packages =
[
py
pyPkgs.black
]
++ lib.optionals config.programs.helix.enable (
(builtins.attrValues { inherit (pyPkgs) python-lsp-server pyls-flake8 pyls-isort; })
++ pyPkgs.python-lsp-server.optional-dependencies.all
)
++ lib.optionals config.programs.kakoune.enable (
(builtins.attrValues { inherit (pyPkgs) python-lsp-server pyls-flake8 pyls-isort; })
++ pyPkgs.python-lsp-server.optional-dependencies.all
);
programs.neovim.withPython3 = true;
}

View file

@ -1,21 +1,52 @@
{ pkgs, lib, config, ... }:
let tomlGenerate = (pkgs.formats.toml { }).generate; in
{ pkgs
, lib
, config
, ...
}:
let
tomlGenerate = (pkgs.formats.toml { }).generate;
in
{
home.packages = (builtins.attrValues {
inherit (pkgs)
bacon cargo cargo-audit cargo-criterion cargo-deadlinks cargo-expand
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 rustc rustfmt;
# cargo-about
# cargo-auditable
# cargo-deny
# cargo-deps
# cargo-feature
})
++ lib.optionals config.programs.helix.enable (builtins.attrValues { inherit (pkgs) lldb rust-analyzer; })
++ lib.optionals config.programs.kakoune.enable (builtins.attrValues { inherit (pkgs) rust-analyzer; });
home.packages =
(builtins.attrValues {
inherit (pkgs)
bacon
cargo
cargo-audit
cargo-criterion
cargo-deadlinks
cargo-expand
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
rustc
rustfmt
;
# cargo-about
# cargo-auditable
# cargo-deny
# cargo-deps
# cargo-feature
})
++ lib.optionals config.programs.helix.enable (
builtins.attrValues { inherit (pkgs) lldb rust-analyzer; }
)
++ lib.optionals config.programs.kakoune.enable (
builtins.attrValues { inherit (pkgs) rust-analyzer; }
);
home.file.".cargo/config.toml".source = tomlGenerate "cargo-config" {
build.rustc-wrapper = "${pkgs.sccache}/bin/sccache";

View file

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

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = [ pkgs.easyeffects ];
services.easyeffects.enable = true;
}

View file

@ -5,4 +5,3 @@
enableZshIntegration = true;
};
}

View file

@ -1,9 +1,17 @@
{ pkgs, ... }: {
fonts.fontconfig = { enable = true; };
{ pkgs, ... }:
{
fonts.fontconfig = {
enable = true;
};
home.packages = builtins.attrValues {
inherit (pkgs)
dejavu_fonts noto-fonts noto-fonts-extra noto-fonts-cjk-sans font-awesome
dejavu_fonts
noto-fonts
noto-fonts-extra
noto-fonts-cjk-sans
font-awesome
corefonts# Microsoft fonts
vistafonts;
vistafonts
;
};
}

View file

@ -48,10 +48,8 @@ let
"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";
@ -140,5 +138,12 @@ in
bash.shellAliases = shellAliases;
zsh.shellAliases = shellAliases;
};
home.packages = builtins.attrValues { inherit (pkgs) gh git-secret glab meld; };
home.packages = builtins.attrValues {
inherit (pkgs)
gh
git-secret
glab
meld
;
};
}

View file

@ -4,8 +4,14 @@
rules = [
{
name = "Nvidia2screens";
outputs_connected = [ "HDMI-0" "eDP-1-1" ];
configure_column = [ "HDMI-0" "eDP-1-1" ];
outputs_connected = [
"HDMI-0"
"eDP-1-1"
];
configure_column = [
"HDMI-0"
"eDP-1-1"
];
primary = "HDMI-0";
}
{

View file

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

View file

@ -1,7 +1,9 @@
{ 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

@ -1,7 +1,13 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home = {
sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; };
shellAliases = { x = "hx"; };
sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
};
shellAliases = {
x = "hx";
};
packages = builtins.attrValues {
inherit (pkgs) nil; # Nix language server
# inherit desktopItem;
@ -10,10 +16,12 @@
programs.helix = {
enable = true;
package = pkgs.unstable_pkgs.helix;
languages.language = [{
name = "nix";
auto-format = true;
}];
languages.language = [
{
name = "nix";
auto-format = true;
}
];
languages.language-server = {
nil.config.nil = {
formatting.command = [ "nixpkgs-fmt" ];
@ -82,24 +90,56 @@
{
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" ]; };
"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" ]; };
"ui.cursor.match" = {
fg = yellow;
modifiers = [ "underlined" ];
};
"string" = green;
"variable.other.member" = red;
"constant.character.escape" = cyan;
@ -112,8 +152,12 @@
"diff.plus" = green;
"diff.delta" = yellow;
"diff.minus" = red;
"diagnostic" = { modifiers = [ "underlined" ]; };
"ui.gutter" = { bg = black; };
"diagnostic" = {
modifiers = [ "underlined" ];
};
"ui.gutter" = {
bg = black;
};
"info" = blue;
"hint" = dark-gray;
"debug" = dark-gray;

View file

@ -1,4 +1,9 @@
{ pkgs, lib, nixosConfig, ... }: {
{ pkgs
, lib
, nixosConfig
, ...
}:
{
systemd.user.services."bluetooth-keyboard" = {
Unit = {
Description = "Disable the laptop keyboard when the bluetooth keyboard is connected";
@ -9,7 +14,14 @@
Service = {
Type = "simple";
ExecStart = pkgs.writeShellScript "bluetooth-keyboard.sh" ''
PATH=$PATH:${lib.makeBinPath [pkgs.coreutils pkgs.gnugrep pkgs.libnotify nixosConfig.programs.hyprland.package]}
PATH=$PATH:${
lib.makeBinPath [
pkgs.coreutils
pkgs.gnugrep
pkgs.libnotify
nixosConfig.programs.hyprland.package
]
}
BLUETOOTH_DEVICE="keychron-k1-max-keyboard"
LAPTOP_DEVICE="at-translated-set-2-keyboard"
STATUS_FILE="$XDG_RUNTIME_DIR/bluetooth_keyboard.status"
@ -49,4 +61,3 @@
};
};
}

View file

@ -1,4 +1,5 @@
{ nixosConfig, pkgs, ... }: {
{ nixosConfig, pkgs, ... }:
{
imports = [
./kitty.nix
@ -12,7 +13,29 @@
./hyprland-bluetooth-keyboard.nix
];
home.packages = builtins.attrValues { inherit (pkgs) blueman brillo gamescope grimblast networkmanagerapplet wireplumber playerctl swaylock swww walker way-lockscreen waybar wl-clipboard wl-clipedit wlogout wofi wofi-emoji wtype xdg-desktop-portal-gtk; };
home.packages = builtins.attrValues {
inherit (pkgs)
blueman
brillo
gamescope
grimblast
networkmanagerapplet
wireplumber
playerctl
swaylock
swww
walker
way-lockscreen
waybar
wl-clipboard
wl-clipedit
wlogout
wofi
wofi-emoji
wtype
xdg-desktop-portal-gtk
;
};
# wayland.windowManager.hyprland = { };
@ -43,23 +66,26 @@
monitor=Unknown-1,disable
${
if nixosConfig.networking.hostName == "thor" then
''
monitor=DP-2,preferred,1080x420,auto
monitor=HDMI-A-1,preferred,0x0,auto,transform,3
''
''
monitor=DP-2,preferred,1080x420,auto
monitor=HDMI-A-1,preferred,0x0,auto,transform,3
''
else if nixosConfig.networking.hostName == "odin" then
''
monitor=eDP-1,preferred,320x1440,1
monitor=DP-1,preferred,0x0,1
''
else ""
''
monitor=eDP-1,preferred,320x1440,1
monitor=DP-1,preferred,0x0,1
''
else
""
}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
exec-once = ${if nixosConfig.networking.hostName == "thor" then "xrandr --output DP-2 --primary" else "true"} & swww init & nm-applet & blueman-applet & systemctl --user start hyprland-login.target
exec-once = ${
if nixosConfig.networking.hostName == "thor" then "xrandr --output DP-2 --primary" else "true"
} & swww init & nm-applet & blueman-applet & systemctl --user start hyprland-login.target
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
@ -69,7 +95,7 @@
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = ${if nixosConfig.networking.hostName == "thor" then "us,it,us" else "it,us,us" }
kb_layout = ${if nixosConfig.networking.hostName == "thor" then "us,it,us" else "it,us,us"}
kb_variant = ,,colemak
kb_model =
kb_options = grp:menu_toggle,compose:rctrl

View file

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

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = [
(pkgs.jellyfin-media-player.overrideAttrs (old: {
postInstall = ''

View file

@ -1,5 +1,7 @@
{ pkgs, ... }:
let tomlGenerate = (pkgs.formats.toml { }).generate; in
let
tomlGenerate = (pkgs.formats.toml { }).generate;
in
{
# TODO: switch to module on next release
@ -16,7 +18,11 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in
display = {
mode = "default";
collapse_preview = true;
column_ratio = [ 1 3 4 ];
column_ratio = [
1
3
4
];
show_borders = true;
show_hidden = false;
show_icons = true;
@ -44,37 +50,102 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in
class = {
audio_default = [
{ command = "mpv"; args = [ "--" ]; }
{ command = "mediainfo"; confirm_exit = true; }
{
command = "mpv";
args = [ "--" ];
}
{
command = "mediainfo";
confirm_exit = true;
}
];
image_default = [
{ command = "geeqie"; fork = true; silent = true; }
{ command = "qimgv"; args = [ "--" ]; fork = true; silent = true; }
{ command = "krita"; args = [ "--" ]; fork = true; silent = true; }
{ command = "exiftool"; confirm_exit = true; }
{ command = "swappy"; args = [ "-f" ]; fork = true; }
{
command = "geeqie";
fork = true;
silent = true;
}
{
command = "qimgv";
args = [ "--" ];
fork = true;
silent = true;
}
{
command = "krita";
args = [ "--" ];
fork = true;
silent = true;
}
{
command = "exiftool";
confirm_exit = true;
}
{
command = "swappy";
args = [ "-f" ];
fork = true;
}
];
video_default = [
{ command = "mpv"; args = [ "--" ]; fork = true; silent = true; }
{ command = "mediainfo"; confirm_exit = true; }
{ command = "mpv"; args = [ "--mute" "on" "--" ]; fork = true; silent = true; }
{
command = "mpv";
args = [ "--" ];
fork = true;
silent = true;
}
{
command = "mediainfo";
confirm_exit = true;
}
{
command = "mpv";
args = [
"--mute"
"on"
"--"
];
fork = true;
silent = true;
}
];
text_default = [
{ command = "hx"; }
{ command = "micro"; }
{ command = "gedit"; fork = true; silent = true; }
{ command = "bat"; args = [ "--paging=always" ]; }
{
command = "gedit";
fork = true;
silent = true;
}
{
command = "bat";
args = [ "--paging=always" ];
}
];
reader_default = [
{ command = "evince"; fork = true; silent = true; }
{ command = "zathura"; fork = true; silent = true; }
{
command = "evince";
fork = true;
silent = true;
}
{
command = "zathura";
fork = true;
silent = true;
}
];
libreoffice_default = [{ command = "libreoffice"; fork = true; silent = true; }];
libreoffice_default = [
{
command = "libreoffice";
fork = true;
silent = true;
}
];
};
extension = {
@ -92,12 +163,28 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in
webp."inherit" = "image_default";
svg.app_list = [
{ command = "inkview"; fork = true; silent = true; }
{ command = "inkscape"; fork = true; silent = true; }
{
command = "inkview";
fork = true;
silent = true;
}
{
command = "inkscape";
fork = true;
silent = true;
}
];
tiff.app_list = [
{ command = "qimgv"; fork = true; silent = true; }
{ command = "krita"; fork = true; silent = true; }
{
command = "qimgv";
fork = true;
silent = true;
}
{
command = "krita";
fork = true;
silent = true;
}
];
## audio formats
@ -165,46 +252,122 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in
# archive formats
"7z".app_list = [
{ command = "7z"; args = [ "x" ]; confirm_exit = true; }
{ command = "file-roller"; fork = true; silent = true; }
{
command = "7z";
args = [ "x" ];
confirm_exit = true;
}
{
command = "file-roller";
fork = true;
silent = true;
}
];
bz2.app_list = [
{ command = "tar"; args = [ "-xvjf" ]; confirm_exit = true; }
{ command = "file-roller"; fork = true; silent = true; }
{
command = "tar";
args = [ "-xvjf" ];
confirm_exit = true;
}
{
command = "file-roller";
fork = true;
silent = true;
}
];
gz.app_list = [
{ command = "tar"; args = [ "-xvzf" ]; confirm_exit = true; }
{ command = "file-roller"; fork = true; silent = true; }
{
command = "tar";
args = [ "-xvzf" ];
confirm_exit = true;
}
{
command = "file-roller";
fork = true;
silent = true;
}
];
tar.app_list = [
{ command = "tar"; args = [ "-xvf" ]; confirm_exit = true; }
{ command = "file-roller"; fork = true; silent = true; }
{
command = "tar";
args = [ "-xvf" ];
confirm_exit = true;
}
{
command = "file-roller";
fork = true;
silent = true;
}
];
tgz.app_list = [
{ command = "tar"; args = [ "-xvzf" ]; confirm_exit = true; }
{ command = "file-roller"; fork = true; silent = true; }
{
command = "tar";
args = [ "-xvzf" ];
confirm_exit = true;
}
{
command = "file-roller";
fork = true;
silent = true;
}
];
rar.app_list = [
{ command = "unrar"; args = [ "x" ]; confirm_exit = true; }
{ command = "file-roller"; fork = true; silent = true; }
{
command = "unrar";
args = [ "x" ];
confirm_exit = true;
}
{
command = "file-roller";
fork = true;
silent = true;
}
];
xz.app_list = [
{ command = "tar"; args = [ "-xvJf" ]; confirm_exit = true; }
{ command = "file-roller"; fork = true; silent = true; }
{
command = "tar";
args = [ "-xvJf" ];
confirm_exit = true;
}
{
command = "file-roller";
fork = true;
silent = true;
}
];
zip.app_list = [
{ command = "unzip"; confirm_exit = true; }
{ command = "file-roller"; fork = true; silent = true; }
{
command = "unzip";
confirm_exit = true;
}
{
command = "file-roller";
fork = true;
silent = true;
}
];
# misc formats
aup.app_list = [{ command = "audacity"; fork = true; silent = true; }];
aup.app_list = [
{
command = "audacity";
fork = true;
silent = true;
}
];
m3u.app_list = [
{ command = "micro"; }
{ command = "mpv"; }
{ command = "gedit"; fork = true; silent = true; }
{ command = "bat"; confirm_exit = true; }
{
command = "gedit";
fork = true;
silent = true;
}
{
command = "bat";
confirm_exit = true;
}
];
odt."inherit" = "libreoffice_default";
@ -221,13 +384,32 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in
pdf."inherit" = "reader_default";
kra.app_list = [{ command = "krita"; fork = true; silent = true; }];
kdenlive.app_list = [{ command = "kdenlive"; fork = true; silent = true; }];
kra.app_list = [
{
command = "krita";
fork = true;
silent = true;
}
];
kdenlive.app_list = [
{
command = "kdenlive";
fork = true;
silent = true;
}
];
tex.app_list = [
{ command = "micro"; }
{ command = "gedit"; fork = true; silent = true; }
{ command = "bat"; confirm_exit = true; }
{
command = "gedit";
fork = true;
silent = true;
}
{
command = "bat";
confirm_exit = true;
}
{ command = "pdflatex"; }
];
@ -246,10 +428,22 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in
"joshuto/bookmarks.toml".source = tomlGenerate "joshuto-bookmarks.toml" {
bookmark = [
{ path = "/"; key = "r"; }
{ path = "~/"; key = "h"; }
{ path = "~/Scaricati"; key = "d"; }
{ path = "~/Syncthing"; key = "s"; }
{
path = "/";
key = "r";
}
{
path = "~/";
key = "h";
}
{
path = "~/Scaricati";
key = "d";
}
{
path = "~/Syncthing";
key = "s";
}
];
};
};

View file

@ -1,13 +1,17 @@
{ 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 +1,5 @@
{ programs.jq = { enable = true; }; }
{
programs.jq = {
enable = true;
};
}

View file

@ -1,7 +1,7 @@
{ pkgs, ... }:
let
themeBuilder = palette:
with palette; ''
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
@ -64,8 +64,12 @@ let
in
{
programs = {
bash.shellAliases = { k = "kak"; };
zsh.shellAliases = { k = "kak"; };
bash.shellAliases = {
k = "kak";
};
zsh.shellAliases = {
k = "kak";
};
kakoune = {
enable = true;
config = {
@ -270,8 +274,9 @@ in
home.packages = packages;
# 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,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
config.systemd.user.services.keepassxc = {
Unit = {
Description = "KeePassXC password manager";
@ -6,8 +7,12 @@
Partof = [ "graphical-session.target" ];
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = { ExecStart = "${pkgs.keepassxc}/bin/keepassxc"; };
Service = {
ExecStart = "${pkgs.keepassxc}/bin/keepassxc";
};
};
}

View file

@ -2,7 +2,10 @@
programs.keychain = {
enable = true;
keys = [ "id_ed25519" ];
agents = [ "gpg" "ssh" ];
agents = [
"gpg"
"ssh"
];
enableBashIntegration = true;
enableZshIntegration = true;
enableXsessionIntegration = true;

View file

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

View file

@ -2,8 +2,25 @@
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
{
@ -16,8 +33,7 @@ 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

@ -68,55 +68,64 @@ in
source = previewer;
# keybinding = "i";
};
keybindings = { "<c-f>" = "$EDITOR $(fzf)"; };
keybindings = {
"<c-f>" = "$EDITOR $(fzf)";
};
commands = {
mkdir = ''''${{
printf "Directory name: "
read ans
mkdir $ans
}}'';
mkfile = ''''${{
printf "File name: "
read ans
$VISUAL $ans
}}'';
mkdir = ''
''${{
printf "Directory name: "
read ans
mkdir $ans
}}'';
mkfile = ''
''${{
printf "File name: "
read ans
$VISUAL $ans
}}'';
trash = ''''${{
files=$(printf "$fx" | tr '\n' ';')
while [ "$files" ]; do
file=''${files%%;*}
trash = ''
''${{
files=$(printf "$fx" | tr '\n' ';')
while [ "$files" ]; do
file=''${files%%;*}
${pkgs.trash-cli}/bin/trash-put "$(basename "$file")"
if [ "$files" = "$file" ]; then
files=""
else
files="''${files#*;}"
fi
done
}}'';
restore_trash = ''''${{
trash-restore
}}'';
${pkgs.trash-cli}/bin/trash-put "$(basename "$file")"
if [ "$files" = "$file" ]; then
files=""
else
files="''${files#*;}"
fi
done
}}'';
restore_trash = ''
''${{
trash-restore
}}'';
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
}}'';
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

View file

@ -10,7 +10,9 @@ 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,7 @@
{ pkgs, ... }: {
home.packages = [ pkgs.lutris pkgs.winePackages.full ];
{ pkgs, ... }:
{
home.packages = [
pkgs.lutris
pkgs.winePackages.full
];
}

View file

@ -1,6 +1,8 @@
{ pkgs, ... }:
let strPalette = pkgs.lib.nix-rice.palette.toRgbShortHex pkgs.rice.colorPalette;
in {
let
strPalette = pkgs.lib.nix-rice.palette.toRgbShortHex pkgs.rice.colorPalette;
in
{
programs.mangohud = {
enable = true;
# enableSessionWide = true;

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = builtins.attrValues { inherit (pkgs.cinnamon) nemo; };
}

View file

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

View file

@ -1,9 +1,14 @@
{ nixosConfig, pkgs, config, ... }:
{ nixosConfig
, pkgs
, config
, ...
}:
let
inherit (nixosConfig.networking) hostName;
in
{
home.packages = [ pkgs.ntfy-sh ];
xdg.configFile."ntfy/client.yml".source = config.lib.file.mkOutOfStoreSymlink nixosConfig.age.secrets."ntfy-${hostName}".path;
xdg.configFile."ntfy/client.yml".source =
config.lib.file.mkOutOfStoreSymlink
nixosConfig.age.secrets."ntfy-${hostName}".path;
}

View file

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

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = builtins.attrValues {
inherit (pkgs) hunspell libreoffice-fresh;
inherit (pkgs.hunspellDicts) en_GB-large en_US-large it_IT;

View file

@ -1,13 +1,17 @@
{ pkgs, ... }:
let onedriveCmd = "${pkgs.onedrive}/bin/onedrive --monitor";
in {
let
onedriveCmd = "${pkgs.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,14 +1,19 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.password-store = {
package = pkgs.pass.withExtensions (ext: (builtins.attrValues {
inherit (ext)
# pass-audit
pass-checkup
pass-import
pass-otp
pass-tomb
pass-update;
}));
package = pkgs.pass.withExtensions (
ext:
(builtins.attrValues {
inherit (ext)
# pass-audit
pass-checkup
pass-import
pass-otp
pass-tomb
pass-update
;
})
);
enable = true;
};
}

View file

@ -1,4 +1,9 @@
{ nixosConfig, config, pkgs, lib, ... }:
{ nixosConfig
, config
, pkgs
, lib
, ...
}:
let
inherit (pkgs.rice) colorPalette opacity;
inherit (pkgs.lib) nix-rice;
@ -48,7 +53,13 @@ let
wait
'';
powermenu = pkgs.writeShellScript "powermenu" ''
PATH=$PATH:"${lib.makeBinPath [ pkgs.rofi pkgs.rofi-power-menu pkgs.zsh ]}"
PATH=$PATH:"${
lib.makeBinPath [
pkgs.rofi
pkgs.rofi-power-menu
pkgs.zsh
]
}"
zsh -c 'rofi -show menu -modi "menu:rofi-power-menu --choices=shutdown/reboot/hibernate/logout"'
'';
colors = nix-rice.palette.toARGBHex rec {
@ -99,9 +110,7 @@ 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"
@ -116,7 +125,14 @@ let
wm-restack = "bspwm";
};
ramp = [ "" "" "" "" "" "" ];
ramp = [
""
""
""
""
""
""
];
in
{
home.packages = builtins.attrValues {
@ -139,13 +155,14 @@ in
'';
settings = {
"settings" = { screenchange-reload = false; };
"settings" = {
screenchange-reload = false;
};
"bar/primary" = lib.recursiveUpdate commonBar {
modules-left = "bspwm";
# modules-center =
modules-right =
"player pulseaudio temperature cpu memory battery keyboard-switch notifications powermenu date";
modules-right = "player pulseaudio temperature cpu memory battery keyboard-switch notifications powermenu date";
tray = {
position = "right";
padding = 1;
@ -155,8 +172,7 @@ in
"bar/secondary" = lib.recursiveUpdate commonBar {
modules-left = "bspwm";
# modules-center =
modules-right =
"player pulseaudio temperature cpu memory battery keyboard-switch notifications powermenu date";
modules-right = "player pulseaudio temperature cpu memory battery keyboard-switch notifications powermenu date";
};
"module/battery" = {
@ -167,14 +183,30 @@ in
full.at = 98;
animation = {
charging = { text = [ "" "" "" "" "" ]; framerate = "750"; };
discharging = { text = [ "" "" "" "" "" ]; framerate = "750"; };
charging = {
text = [
""
""
""
""
""
];
framerate = "750";
};
discharging = {
text = [
""
""
""
""
""
];
framerate = "750";
};
};
format = {
charging = lib.recursiveUpdate colors.selected {
text = "<animation-charging> <label-charging>";
};
charging = lib.recursiveUpdate colors.selected { text = "<animation-charging> <label-charging>"; };
discharging = lib.recursiveUpdate colors.active {
text = "<animation-discharging> <label-discharging>";
};
@ -204,7 +236,9 @@ in
{
focused = lib.recursiveUpdate common colors.selected;
occupied = lib.recursiveUpdate common colors.active;
urgent = lib.recursiveUpdate (lib.recursiveUpdate common colors.active) { background = colors.alert; };
urgent = lib.recursiveUpdate (lib.recursiveUpdate common colors.active) {
background = colors.alert;
};
empty = lib.recursiveUpdate common colors.normal;
};
};
@ -220,10 +254,16 @@ in
"module/date" = {
type = "internal/date";
format = colors.normal;
date = { alt = "%Y-%m-%d"; text = "%a %d/%m/%y"; };
date = {
alt = "%Y-%m-%d";
text = "%a %d/%m/%y";
};
interval = "1";
label = "%date% %time%";
time = { alt = "%H:%M:%S"; text = "%H:%M"; };
time = {
alt = "%H:%M:%S";
text = "%H:%M";
};
};
"module/memory" = {
@ -237,9 +277,15 @@ in
"module/pulseaudio" = {
interval = 2;
bar.volume = {
empty = { text = ""; };
fill = { text = ""; };
indicator = { text = "|"; };
empty = {
text = "";
};
fill = {
text = "";
};
indicator = {
text = "|";
};
width = "10";
foreground = [
colors.green
@ -252,18 +298,19 @@ in
colors.red
];
};
click.right =
"${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
click.right = "${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
format = {
padding = 1;
muted = colors.active;
volume = lib.recursiveUpdate colors.normal {
text = "<ramp-volume> <label-volume>";
};
volume = lib.recursiveUpdate colors.normal { text = "<ramp-volume> <label-volume>"; };
};
label.muted.text = "󰝟 muted";
label.volume.text = "%percentage%%";
ramp.volume = [ "󰕿" "󰖀" "󰕾" ];
ramp.volume = [
"󰕿"
"󰖀"
"󰕾"
];
type = "internal/pulseaudio";
};
@ -279,7 +326,13 @@ in
text = "%temperature-c%";
warn = "%temperature-c%";
};
ramp.text = [ "" "" "" "" "" ];
ramp.text = [
""
""
""
""
""
];
thermal.zone = if nixosConfig.networking.hostName == "odin" then 8 else 0;
type = "internal/temperature";
warn.temperature = "90";

View file

@ -1,12 +1,10 @@
{ pkgs, ... }:
let
systemLibFolder = "/run/current-system/sw/lib/";
userLibFolder =
"$HOME/.local/state/nix/profiles/home-manager/home-path/lib";
userLibFolder = "$HOME/.local/state/nix/profiles/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";
@ -16,12 +14,35 @@ in
{
home.packages = builtins.attrValues {
inherit (pkgs)
ardour breeze-icons carla mixxx rnnoise
ardour
breeze-icons
carla
mixxx
rnnoise
#mamba
# zrythm
# Plugins
aeolus artyFX autotalent boops calf cardinal fluidsynth geonkick giada lsp-plugins samplv1 sfizz surge surge-XT talentedhack vocproc x42-plugins zita-at1 zyn-fusion zynaddsubfx
aeolus
artyFX
autotalent
boops
calf
cardinal
fluidsynth
geonkick
giada
lsp-plugins
samplv1
sfizz
surge
surge-XT
talentedhack
vocproc
x42-plugins
zita-at1
zyn-fusion
zynaddsubfx
# helm
# noise-repellent
# speech-denoiser

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = builtins.attrValues {
inherit (pkgs) python3;
inherit (pkgs.unstable_pkgs.jetbrains) pycharm-professional jdk;

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = builtins.attrValues {
inherit (pkgs)
# mendeley # Reference manager

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = builtins.attrValues {
inherit (pkgs)
@ -15,7 +16,9 @@
location = "center";
font = "${pkgs.rice.font.monospace.name} ${toString pkgs.rice.font.monospace.size}";
plugins = [ pkgs.rofi-calc ];
extraConfig = { modi = "drun,run,ssh,window,calc"; };
extraConfig = {
modi = "drun,run,ssh,window,calc";
};
terminal = "alacritty";
theme = "onedark";
};

View file

@ -1,8 +1,12 @@
{ 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,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = builtins.attrValues {
inherit (pkgs)
nmap# RECOGNITION
@ -8,7 +9,9 @@
# altair
# burpsuite
bintools ghidra-bin radare2# REVERSING
bintools
ghidra-bin
radare2# REVERSING
# cutter
# INFRASTRUCTURE

View file

@ -1,4 +1,5 @@
{ nixosConfig, ... }: {
{ nixosConfig, ... }:
{
services.spotifyd = {
enable = true;
settings.global = {

View file

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

View file

@ -9,7 +9,10 @@
hostname.format = "[$hostname]($style) "; # Disable ssh symbol
# line_break.disabled = true; # Prompt in one line
nix_shell.symbol = " "; # better soacing
python.python_binary = [ "python3" "python2" ];
python.python_binary = [
"python3"
"python2"
];
status = {
disabled = false; # enable module
format = "[$symbol $status]($style) "; # nicer status format

View file

@ -1,11 +1,18 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = builtins.attrValues { inherit (pkgs) brillo; };
services.swayidle = {
enable = true;
events = [
{ event = "before-sleep"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; }
{ event = "lock"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; }
{
event = "before-sleep";
command = "${pkgs.way-lockscreen}/bin/way-lockscreen";
}
{
event = "lock";
command = "${pkgs.way-lockscreen}/bin/way-lockscreen";
}
];
timeouts = [
{

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
systemd.user.services.swaynotificationcenter = {
Unit = {
After = [ "graphical-session-pre.target" ];

View file

@ -1,4 +1,5 @@
{ pkgs, lib, ... }: {
{ pkgs, lib, ... }:
{
imports = [
# ./alacritty.nix
./kitty.nix
@ -11,7 +12,11 @@
home.packages = builtins.attrValues {
inherit (pkgs)
bc# required by bsp-layout
bsp-layout clipedit lockscreen terminator;
bsp-layout
clipedit
lockscreen
terminator
;
};
services.sxhkd =
let
@ -49,7 +54,12 @@
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" ''
PATH=$PATH:"${lib.makeBinPath [ pkgs.coreutils pkgs.pamixer ]}"
PATH=$PATH:"${
lib.makeBinPath [
pkgs.coreutils
pkgs.pamixer
]
}"
sink=`pamixer --get-default-sink | tail -n 1| sed -E 's/.+"(.+)"$/\1/'`
muted=`pamixer --get-mute`
volume=`pamixer --get-volume`
@ -64,7 +74,12 @@
${notify} -r 2 -h "int:value:$level" "Luminosità $level"
'';
powermenu = pkgs.writeShellScript "powermenu" ''
PATH=$PATH:"${lib.makeBinPath [ pkgs.rofi pkgs.rofi-power-menu ]}"
PATH=$PATH:"${
lib.makeBinPath [
pkgs.rofi
pkgs.rofi-power-menu
]
}"
rofi -show menu -modi "menu:rofi-power-menu --choices=shutdown/reboot/hibernate/logout"
'';
in

View file

@ -4,4 +4,3 @@
extraOptions = [ "--gui-address=http://0.0.0.0:8385" ];
};
}

View file

@ -6,7 +6,8 @@ let
};
opacity = toString pkgs.rice.opacity;
font = pkgs.rice.font.monospace;
colorString = normal: bright:
colorString =
normal: bright:
builtins.concatStringsSep ":" [
normal.black
normal.red

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = builtins.attrValues {
inherit (pkgs.xfce)
thunar
@ -6,6 +7,7 @@
thunar-media-tags-plugin
thunar-volman
tumbler
xfconf;
xfconf
;
};
}

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.tmux = {
enable = true;
clock24 = true;

View file

@ -1,6 +1,8 @@
{ pkgs, ... }:
let update_time = "10m";
in {
let
update_time = "10m";
in
{
home.packages = [ pkgs.update-background ];
systemd.user.services."update-background" = {
@ -10,7 +12,9 @@ in {
PartOf = [ "graphical-session.target" ];
RequiresMountsFor = [ "/home/bertof/Immagini" ];
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
IOSchedulingClass = "idle";
@ -19,8 +23,14 @@ in {
};
systemd.user.timers."update-background" = {
Unit = { Description = "Set random desktop background using feh"; };
Timer = { OnUnitActiveSec = update_time; };
Install = { WantedBy = [ "timers.target" ]; };
Unit = {
Description = "Set random desktop background using feh";
};
Timer = {
OnUnitActiveSec = update_time;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
}

View file

@ -1,5 +1,8 @@
{ pkgs, ... }:
let vp = pkgs.vimPlugins; in {
let
vp = pkgs.vimPlugins;
in
{
home.packages = [ pkgs.nodePackages.prettier ];
programs.neovim = {
enable = true;
@ -34,8 +37,6 @@ let vp = pkgs.vimPlugins; in {
# '';
# }
vp.telescope-fzf-native-nvim
{
plugin = vp.telescope-nvim;
@ -361,8 +362,6 @@ let vp = pkgs.vimPlugins; in {
}
];
# settings = { ignorecase = true; };
# coc.enable = true;
# extraConfig = ''

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = [
pkgs.remmina
pkgs.virt-manager

View file

@ -1,3 +1,7 @@
{ pkgs, ... }: {
home.packages = [ pkgs.vivaldi pkgs.vivaldi-ffmpeg-codecs ];
{ pkgs, ... }:
{
home.packages = [
pkgs.vivaldi
pkgs.vivaldi-ffmpeg-codecs
];
}

View file

@ -68,11 +68,17 @@ in
"numlock" = true;
"capslock" = true;
"format" = "{name} {icon}";
"format-icons" = { "locked" = ""; "unlocked" = ""; };
"format-icons" = {
"locked" = "";
"unlocked" = "";
};
};
"idle_inhibitor" = {
"format" = "{status} {icon}";
"format-icons" = { "activated" = ""; "deactivated" = ""; };
"format-icons" = {
"activated" = "";
"deactivated" = "";
};
};
tray.spacing = 10;
clock = {
@ -104,7 +110,17 @@ in
"backlight" = {
# "device"= "acpi_video1";
"format" = "{percent}% {icon}";
"format-icons" = [ "" "" "" "" "" "" "" "" "" ];
"format-icons" = [
""
""
""
""
""
""
""
""
""
];
};
"battery" = {
"states" = {
@ -118,7 +134,13 @@ in
"format-alt" = "{time} {icon}";
# "format-good"= ""; # An empty format will hide the module
# "format-full"= "";
"format-icons" = [ "" "" "" "" "" ];
"format-icons" = [
""
""
""
""
""
];
};
# "battery#bat2" = { "bat" = "BAT2"; };
"network" = {
@ -145,7 +167,11 @@ in
"phone" = "";
"portable" = "";
"car" = "";
"default" = [ "" "" "" ];
"default" = [
""
""
""
];
};
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";

View file

@ -12,9 +12,16 @@ let
, icon ? lib.toLower name
, comment ? null
, categories ? [ "Network" ]
,
}:
pkgs.makeDesktopItem {
inherit name icon desktopName comment categories;
inherit
name
icon
desktopName
comment
categories
;
exec = cmd link;
};
links = [
@ -36,7 +43,10 @@ let
{
link = "https://play.google.com/books";
desktopName = "Google Play Books";
categories = [ "Office" "Viewer" ];
categories = [
"Office"
"Viewer"
];
}
# {
# link = "https://teams.microsoft.com";
@ -91,4 +101,6 @@ let
];
in
{ home.packages = map webAppBuilder links; }
{
home.packages = map webAppBuilder links;
}

View file

@ -23,7 +23,9 @@ in
PartOf = [ "graphical-session.target" ];
RequiresMountsFor = [ "/home/bertof/Immagini" ];
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
IOSchedulingClass = "idle";
@ -32,9 +34,14 @@ in
};
systemd.user.timers."wl-update-background" = {
Unit = { Description = "Set random desktop background using swww"; };
Timer = { OnUnitActiveSec = update_time; };
Install = { WantedBy = [ "timers.target" ]; };
Unit = {
Description = "Set random desktop background using swww";
};
Timer = {
OnUnitActiveSec = update_time;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
}

View file

@ -1,6 +1,8 @@
{ pkgs, ... }:
let
strPalette = pkgs.lib.nix-rice.palette.toRgbHex { inherit (pkgs.rice.colorPalette) normal bright primary; };
strPalette = pkgs.lib.nix-rice.palette.toRgbHex {
inherit (pkgs.rice.colorPalette) normal bright primary;
};
in
{
home.file.".Xresources" = {
@ -27,7 +29,7 @@ in
*.color13: ${strPalette.bright.magenta}
*.color14: ${strPalette.bright.cyan}
*.color15: ${strPalette.bright.white}
xterm*faceName: ${pkgs.rice.font.monospace.name}
xterm*faceSize: ${toString pkgs.rice.font.monospace.size}
'';

View file

@ -1,6 +1,13 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home = {
packages = [ pkgs.ffmpegthumbnailer pkgs.exiftool pkgs.mediainfo pkgs.unar pkgs.mpv ];
packages = [
pkgs.ffmpegthumbnailer
pkgs.exiftool
pkgs.mediainfo
pkgs.unar
pkgs.mpv
];
shellAliases.y = "yazi";
};
@ -18,47 +25,128 @@
opener = {
folder = [
{ run = ''nautilus "$@"''; display_name = "Nautilus"; }
{ run = ''xdg-open "$@"''; display_name = "Open folder"; }
{
run = ''nautilus "$@"'';
display_name = "Nautilus";
}
{
run = ''xdg-open "$@"'';
display_name = "Open folder";
}
{ run = ''$VISUAL "$@"''; }
];
archive = [
{ run = ''file-roller "$1"''; display_name = "Open with File Roller"; }
{ run = ''unar "$1"''; display_name = "Extract here"; }
{ run = ''xdg-open "$@"''; display_name = "Open with default"; }
{
run = ''file-roller "$1"'';
display_name = "Open with File Roller";
}
{
run = ''unar "$1"'';
display_name = "Extract here";
}
{
run = ''xdg-open "$@"'';
display_name = "Open with default";
}
{ run = ''$VISUAL "$@"''; }
];
text = [
{ run = ''$VISUAL "$@"''; }
{ run = ''nvim "$@"''; block = true; display_name = "Open with NeoVIM"; }
{ run = ''hx "$@"''; block = true; display_name = "Open with Helix"; }
{ run = ''bat --pagin=always "$@"''; block = true; display_name = "Open with bat"; }
{
run = ''nvim "$@"'';
block = true;
display_name = "Open with NeoVIM";
}
{
run = ''hx "$@"'';
block = true;
display_name = "Open with Helix";
}
{
run = ''bat --pagin=always "$@"'';
block = true;
display_name = "Open with bat";
}
];
image = [
{ run = ''xdg-open "$@"''; display_name = "Open"; }
{ run = ''eog "$@"''; display_name = "Open with EOG"; }
{ run = '''exiftool "$1"; echo "Press enter to exit"; read''; block = true; display_name = "Show EXIF"; }
{
run = ''xdg-open "$@"'';
display_name = "Open";
}
{
run = ''eog "$@"'';
display_name = "Open with EOG";
}
{
run = '''exiftool "$1"; echo "Press enter to exit"; read'';
block = true;
display_name = "Show EXIF";
}
];
video = [
{ run = ''mpv "$@"''; display_name = "Open with MPV"; }
{ run = ''umpv "$@"''; display_name = "Open with uMPV"; }
{ run = ''totem "$@"''; display_name = "Open with Totem"; }
{ run = ''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; display_name = "Show media info"; }
{ run = ''xdg-open "$@"''; display_name = "Open with default"; }
{
run = ''mpv "$@"'';
display_name = "Open with MPV";
}
{
run = ''umpv "$@"'';
display_name = "Open with uMPV";
}
{
run = ''totem "$@"'';
display_name = "Open with Totem";
}
{
run = ''mediainfo "$1"; echo "Press enter to exit"; read'';
block = true;
display_name = "Show media info";
}
{
run = ''xdg-open "$@"'';
display_name = "Open with default";
}
{ run = ''$VISUAL "$@"''; }
];
audio = [
{ run = ''mpv "$@"''; display_name = "Open with MPV"; }
{ run = ''umpv "$@"''; display_name = "Open with uMPV"; }
{ run = '''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; display_name = "Show media info"; }
{ run = ''xdg-open "$@"''; display_name = "Open with default"; }
{
run = ''mpv "$@"'';
display_name = "Open with MPV";
}
{
run = ''umpv "$@"'';
display_name = "Open with uMPV";
}
{
run = '''mediainfo "$1"; echo "Press enter to exit"; read'';
block = true;
display_name = "Show media info";
}
{
run = ''xdg-open "$@"'';
display_name = "Open with default";
}
{ run = ''$VISUAL "$@"''; }
];
fallback = [
{ run = ''xdg-open "$@"''; display_name = "Open"; }
{ run = ''bat --pagin=always "$@"''; block = true; display_name = "Open with bat"; }
{ run = ''$VISUAL "$@"''; block = true; display_name = "Open with editor"; }
{ run = ''$EDITOR "$@"''; block = true; display_name = "Open with editor"; }
{
run = ''xdg-open "$@"'';
display_name = "Open";
}
{
run = ''bat --pagin=always "$@"'';
block = true;
display_name = "Open with bat";
}
{
run = ''$VISUAL "$@"'';
block = true;
display_name = "Open with editor";
}
{
run = ''$EDITOR "$@"'';
block = true;
display_name = "Open with editor";
}
];
};
};

View file

@ -5,7 +5,9 @@ in
{
programs.zathura = {
enable = true;
mappings = { "<C-i>" = "recolor"; };
mappings = {
"<C-i>" = "recolor";
};
options = {
# completion-bg = strPalette.bright.black;
# default-bg = strPalette.normal.black;
@ -55,7 +57,7 @@ in
recolor-lightcolor = strPalette.primary.background;
recolor-darkcolor = strPalette.bright.white;
# recolor = true;
recolor-keephue = true; # keep original color
recolor-keephue = true; # keep original color
};
};

View file

@ -3,7 +3,10 @@ let
strPalette = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.colorPalette;
in
{
programs.zellij = { enable = true; package = pkgs.unstable_pkgs.zellij; };
programs.zellij = {
enable = true;
package = pkgs.unstable_pkgs.zellij;
};
home.shellAliases = {
"ze" = "zellij";

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: {
home.packages =
builtins.attrValues { inherit (pkgs) nix-zsh-completions zsh-completions; };
{ pkgs, ... }:
{
home.packages = builtins.attrValues { inherit (pkgs) nix-zsh-completions zsh-completions; };
programs.zsh = {
enable = true;
@ -17,8 +17,14 @@
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 = "";
};