Compare commits

..

2 Commits

Author SHA1 Message Date
018f85d1d3
update tooling 2024-06-13 22:56:30 +02:00
995c410cd7
improve ranger tooling 2024-05-31 17:33:40 +02:00
17 changed files with 133 additions and 94 deletions

View File

@ -26,6 +26,10 @@ in
wootility wootility
]; ];
services.udev.packages = with pkgs; [
yubikey-personalization
];
hardware.i2c.enable = true; hardware.i2c.enable = true;
services.libinput.enable = true; services.libinput.enable = true;
hardware.opentabletdriver.enable = true; hardware.opentabletdriver.enable = true;
@ -64,6 +68,7 @@ in
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
]; ];
initrd.systemd.enable = true;
loader.systemd-boot.enable = true; loader.systemd-boot.enable = true;
# extraModulePackages = [ config.boot.kernelPackages.ddcci-driver ]; # extraModulePackages = [ config.boot.kernelPackages.ddcci-driver ];
kernelModules = [ kernelModules = [

View File

@ -25,6 +25,7 @@ in
./git.nix ./git.nix
./c.nix ./c.nix
./java.nix ./java.nix
./ranger.nix
]; ];
config = mkIf (enable && tooling.enable) { config = mkIf (enable && tooling.enable) {
@ -51,7 +52,6 @@ in
fbcat fbcat
gomuks gomuks
ranger
imagemagick imagemagick
nmap nmap
@ -70,6 +70,8 @@ in
":q" = "exit"; ":q" = "exit";
"ls" = "eza"; "ls" = "eza";
"lix" = "nix"; "lix" = "nix";
"l" = "eza -hla";
"vi" = "hx";
"bat" = "bat --theme=Dracula"; "bat" = "bat --theme=Dracula";
}; };
@ -79,6 +81,8 @@ in
#keyMode = "vi"; #keyMode = "vi";
}; };
programs.fzf.fuzzyCompletion = true;
environment.sessionVariables = { environment.sessionVariables = {
MANPAGER = "sh -c 'col -bx | ${getExe pkgs.bat} -l man -p'"; MANPAGER = "sh -c 'col -bx | ${getExe pkgs.bat} -l man -p'";
MANROFFOPT = "-c"; MANROFFOPT = "-c";
@ -91,11 +95,11 @@ in
boot.tmp.cleanOnBoot = true; boot.tmp.cleanOnBoot = true;
zramSwap.enable = true; zramSwap.enable = true;
programs.ssh = { #programs.ssh = {
startAgent = true; # # startAgent = true;
enableAskPassword = graphical; # enableAskPassword = graphical;
askPassword = mkIf graphical (getExe pkgs.lxqt.lxqt-openssh-askpass); # askPassword = mkIf graphical (getExe pkgs.lxqt.lxqt-openssh-askpass);
}; #};
programs.thefuck.enable = true; programs.thefuck.enable = true;
programs.starship = { programs.starship = {
@ -108,6 +112,7 @@ in
command = "basename $SHELL"; command = "basename $SHELL";
when = "test -v SHELL"; when = "test -v SHELL";
format = " in [$output]($style)"; format = " in [$output]($style)";
# ignore_timeout = true;
}; };
# env_var.SHELL = {variable = "SHELL"; default = ""; }; # env_var.SHELL = {variable = "SHELL"; default = ""; };
}; };

View File

@ -56,10 +56,13 @@ in
{ {
config = mkIf (enable && tooling.enable) { config = mkIf (enable && tooling.enable) {
environment.systemPackages = [ helix-wrapped ]; environment.systemPackages = [ helix-wrapped ];
environment.sessionVariables.EDITOR = getExe helix; environment.sessionVariables.EDITOR = getExe helix-wrapped;
programs.helix.config = { programs.helix.config = {
theme = "catppuccin_mocha"; editor.cursor-shape.insert = "bar";
theme = "base16_transparent";
# editor.commands.git = ":sh git";
# keys.normal.Delete = "delete_selection";
}; };
}; };

View File

@ -13,6 +13,7 @@
nix-search-cli nix-search-cli
niv niv
vulnix vulnix
nix-init
]; ];
environment.sessionVariables = lib.mkIf pkgs.config.allowUnfree { NIXPKGS_ALLOW_UNFREE = "1"; }; environment.sessionVariables = lib.mkIf pkgs.config.allowUnfree { NIXPKGS_ALLOW_UNFREE = "1"; };
@ -41,5 +42,5 @@
}; };
# nix.package = pkgs.nixVersions.latest; # nix.package = pkgs.nixVersions.latest;
nix.optimise.automatic = true; # nix.optimise.automatic = true;
} }

30
common/tooling/ranger.nix Normal file
View File

@ -0,0 +1,30 @@
{
pkgs,
config,
inputs,
lib,
...
}:
let
inherit (config.grimmShared) enable tooling;
inherit (lib) mkIf mapAttrs' concatLines attrNames;
plugins = {
ranger_udisk_menu = inputs.ranger_udisk_menu;
};
in
{
config = mkIf (enable && tooling.enable) {
services.gvfs = {
enable = true;
package = pkgs.gvfs;
};
environment.systemPackages = [ pkgs.ranger ];
environment.etc = (mapAttrs' (n: v: {
name = "ranger/plugins/${n}";
value.source = v;
}) plugins) // {
"ranger/commands.py".text = concatLines (map (n: "from plugins.${n} import *") (attrNames plugins));
};
};
}

View File

@ -22,8 +22,9 @@ in
security.rtkit.enable = true; security.rtkit.enable = true;
security.pam.yubico = { security.pam.yubico = {
# enable = true; enable = true;
debug = true; id = [ "26681512" ];
# debug = true;
mode = "challenge-response"; mode = "challenge-response";
control = "sufficient"; control = "sufficient";
}; };
@ -46,6 +47,10 @@ in
vulnix vulnix
doas-sudo-shim # muscle memory doas-sudo-shim # muscle memory
agenix agenix
yubikey-manager
yubico-pam
yubikey-personalization
]) ])
++ optionals (tooling.enable && tooling.pass) [ ++ optionals (tooling.enable && tooling.pass) [
pkgs.pass pkgs.pass
@ -60,6 +65,7 @@ in
}; };
pinentryPackage = mkForce (if graphical then pkgs.pinentry-qt else pkgs.pinentry-tty); pinentryPackage = mkForce (if graphical then pkgs.pinentry-qt else pkgs.pinentry-tty);
enable = true; enable = true;
enableSSHSupport = true;
}; };
}; };

View File

@ -40,6 +40,7 @@ in
deskwhich deskwhich
zathura zathura
gnome-console
alacritty alacritty
imhex imhex
libreoffice-qt libreoffice-qt

View File

@ -8,14 +8,14 @@ rustPlatform.buildRustPackage {
version = "unstable-2024-04-30"; version = "unstable-2024-04-30";
src = fetchFromGitea { src = fetchFromGitea {
domain = "codeberg.org"; domain = "git.grimmauld.de";
owner = "axtlos"; owner = "grimmauld";
repo = "deskwhich"; repo = "deskwhich";
rev = "cbe8a0cdf4bdbb26faecb028e79ad6c409376051"; rev = "ed412216666a6a22918e57c5dd1fde3855eb0f5f";
hash = "sha256-c0Q0oYIB/1eutV7tkqYXvDMw8A7YsT+5+CmmwbGvcNk="; hash = "sha256-uSXxUehZY1Sp08X3khSQtQc8AT00jJTAsQ+OfTTTkss=";
}; };
cargoHash = "sha256-fBC3UBf9oLswlR6Kgw3nSwjqAtn7VQGzvbUJaYnOid4="; cargoHash = "sha256-x0ARqeMdmnjMF0o2oZlxHnUUj9hEdqg4a+Z/WYax2Co=";
meta = { meta = {
description = "tool to find the path of desktop entries"; description = "tool to find the path of desktop entries";

View File

@ -36,12 +36,12 @@ let
]; ];
# enable ccache for lix if ccache is enabled # enable ccache for lix if ccache is enabled
enable_lix_ccache = true; # enable_lix_ccache = true;
in in
{ {
imports = [ imports = [
"${nivSources.agenix}/modules/age.nix" "${nivSources.agenix}/modules/age.nix"
"${nivSources.nixos-mailserver}/default.nix" # "${nivSources.nixos-mailserver}/default.nix"
"${nivSources.nixos-matrix-modules}/module.nix" "${nivSources.nixos-matrix-modules}/module.nix"
# fixme: ideally we'd not rely on the flake syntax to load the module # fixme: ideally we'd not rely on the flake syntax to load the module
@ -65,8 +65,8 @@ in
documentation.doc.enable = false; documentation.doc.enable = false;
nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ]; # nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
programs.ccache.enable = true; # programs.ccache.enable = true;
environment.systemPackages = environment.systemPackages =
let let
@ -114,24 +114,14 @@ in
unpatched; unpatched;
overlays = [ overlays = [
(import ( (import "${nivSources.lix-module}/overlay.nix" { lix = nivSources.lix-pkg; })
if enable_lix_ccache then
"${
applyPatches {
name = "lix-overlay-ccache";
src = nivSources.lix-module;
patches = [ ./patches/lix-ccache.patch ];
}
}/overlay.nix"
else
"${nivSources.lix-module}/overlay.nix"
) { lix = nivSources.lix-pkg; })
(final: prev: { agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; }) (final: prev: { agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; })
]; ];
}; };
_module.args = { _module.args = {
system = "x86_64-linux"; system = "x86_64-linux";
inputs = nivSources;
}; };
nix.settings.extra-substituters = [ nix.settings.extra-substituters = [

View File

@ -7,7 +7,7 @@ in
# services.dovecot2.sieve.extensions = [ "fileinto" ]; # sives break without this for some reason # services.dovecot2.sieve.extensions = [ "fileinto" ]; # sives break without this for some reason
mailserver = { mailserver = {
enable = true; enable = true;
fqdn = vhosts.mail_host.host; # fqdn = vhosts.mail_host.host;
domains = [ domain ]; domains = [ domain ];
# A list of all login accounts. To create the password hashes, use # A list of all login accounts. To create the password hashes, use

View File

@ -17,10 +17,10 @@
"homepage": "", "homepage": "",
"owner": "nix-community", "owner": "nix-community",
"repo": "authentik-nix", "repo": "authentik-nix",
"rev": "e9ae3992d542972d787adf2b200a7489ca83aa91", "rev": "1942bdac27c337559ca16ddb7fca5c9ffb686e5b",
"sha256": "08ppl68pmz6042cxa3j7fjpz6r6ym3dmp8h40c5q3bx3a77zwm94", "sha256": "15xrzv6i0wkj3qrxpscgnq2kgc6xbjp26lhhlmvjgiv4bqm2q1dv",
"type": "tarball", "type": "tarball",
"url": "https://github.com/nix-community/authentik-nix/archive/e9ae3992d542972d787adf2b200a7489ca83aa91.tar.gz", "url": "https://github.com/nix-community/authentik-nix/archive/1942bdac27c337559ca16ddb7fca5c9ffb686e5b.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}, },
"chaotic": { "chaotic": {
@ -29,10 +29,10 @@
"homepage": "https://nyx.chaotic.cx", "homepage": "https://nyx.chaotic.cx",
"owner": "chaotic-cx", "owner": "chaotic-cx",
"repo": "nyx", "repo": "nyx",
"rev": "a6f43e450d97eece8757e6cb6136f4cd4f141a3b", "rev": "798d56d819cd7d46ba9202afe81040887ac868ef",
"sha256": "1l38vn7hahnl5x0m8kk4x1rqiig1divhja8cs9iqq466h7q1prdv", "sha256": "1b1nish8zhc6mxp07rw874sqsf8212gg4srwyknd7fidn9gsk5jr",
"type": "tarball", "type": "tarball",
"url": "https://github.com/chaotic-cx/nyx/archive/a6f43e450d97eece8757e6cb6136f4cd4f141a3b.tar.gz", "url": "https://github.com/chaotic-cx/nyx/archive/798d56d819cd7d46ba9202afe81040887ac868ef.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}, },
"glibc-eac": { "glibc-eac": {
@ -41,28 +41,28 @@
"homepage": "", "homepage": "",
"owner": "Frogging-Family", "owner": "Frogging-Family",
"repo": "glibc-eac", "repo": "glibc-eac",
"rev": "6a2ddcacfa9a16a2b33e3a70cd73e0f7937b8b94", "rev": "1dc68d1d0c6105035c659f1eb574191d67ab1b7e",
"sha256": "0p1b3a7ynbg63vl0lrqzf6w19grbxi4dmqch07p1fll7xhvl80km", "sha256": "1jsi4g8324kxpx28wh3i65476djryj65v4zs0x9cv8jqamqvnhay",
"type": "tarball", "type": "tarball",
"url": "https://github.com/Frogging-Family/glibc-eac/archive/6a2ddcacfa9a16a2b33e3a70cd73e0f7937b8b94.tar.gz", "url": "https://github.com/Frogging-Family/glibc-eac/archive/1dc68d1d0c6105035c659f1eb574191d67ab1b7e.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}, },
"lix-module": { "lix-module": {
"branch": "main", "branch": "main",
"repo": "https://git.lix.systems/lix-project/nixos-module.git", "repo": "https://git.lix.systems/lix-project/nixos-module.git",
"rev": "38f31ee7c1a60adae58833789dd855c128b056c6", "rev": "4e25f1ab68f2270f9cff59216056c21073db0164",
"type": "git" "type": "git"
}, },
"lix-pkg": { "lix-pkg": {
"branch": "main", "branch": "main",
"repo": "https://git.lix.systems/lix-project/lix.git", "repo": "https://git.lix.systems/lix-project/lix.git",
"rev": "71b32bb87cd48dbbd672c8ca6b041ed36f3bae11", "rev": "8a3d063a494c4b8c767190a5ce3e4075a75f9d07",
"type": "git" "type": "git"
}, },
"nixos-mailserver": { "nixos-mailserver": {
"branch": "master", "branch": "master",
"repo": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git", "repo": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git",
"rev": "41059fc548088e49e3ddb3a2b4faeb5de018e60f", "rev": "29916981e7b3b5782dc5085ad18490113f8ff63b",
"type": "git" "type": "git"
}, },
"nixos-matrix-modules": { "nixos-matrix-modules": {
@ -71,10 +71,10 @@
"homepage": null, "homepage": null,
"owner": "dali99", "owner": "dali99",
"repo": "nixos-matrix-modules", "repo": "nixos-matrix-modules",
"rev": "6c9b67974b839740e2a738958512c7a704481157", "rev": "d7dc42c9bbb155c5e4aa2f0985d0df75ce978456",
"sha256": "0v8z37yhmbdq2y9l3wz6vscg402x4xvms8sajnl0fcmbvka56jmk", "sha256": "10q5is4fkmiqqfrmvvv92qkfv1iizariklbvazx00n9qvi2qlp1h",
"type": "tarball", "type": "tarball",
"url": "https://github.com/dali99/nixos-matrix-modules/archive/6c9b67974b839740e2a738958512c7a704481157.tar.gz", "url": "https://github.com/dali99/nixos-matrix-modules/archive/d7dc42c9bbb155c5e4aa2f0985d0df75ce978456.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}, },
"nixpkgs": { "nixpkgs": {
@ -83,10 +83,16 @@
"homepage": null, "homepage": null,
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bfb7a882678e518398ce9a31a881538679f6f092", "rev": "57d6973abba7ea108bac64ae7629e7431e0199b6",
"sha256": "0zyny8h62hqfix4mrk6nf3qdvmhs49v9pkrnq80q28ji4j2qhd73", "sha256": "1sx6ijjj0cic06khxb13iaihqadwm8drixy9rw32xapdvj6x92pm",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/bfb7a882678e518398ce9a31a881538679f6f092.tar.gz", "url": "https://github.com/NixOS/nixpkgs/archive/57d6973abba7ea108bac64ae7629e7431e0199b6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"ranger_udisk_menu": {
"branch": "master",
"repo": "https://git.grimmauld.de/Grimmauld/ranger_udisk_menu.git",
"rev": "981756147834bb485ebcfa0e41ad60d05ccc4351",
"type": "git"
} }
} }

View File

@ -1,9 +1,14 @@
{ config, lib, ... }:
{ {
programs.ccache.packageNames = [ config,
"agenix" lib,
"mcontrolcenter" inputs,
]; ...
}:
{
#programs.ccache.packageNames = [
# "agenix"
# "mcontrolcenter"
#];
nixpkgs.overlays = nixpkgs.overlays =
map map
@ -17,6 +22,7 @@
prev prev
lib lib
config config
inputs
; ;
}) })
) )
@ -26,11 +32,12 @@
./deskwhich.nix ./deskwhich.nix
./tlpui.nix ./tlpui.nix
./mcontrolcenter.nix ./mcontrolcenter.nix
./ccache-wrapper.nix # ./ccache-wrapper.nix
./searchclip.nix ./searchclip.nix
./confwhich.nix ./confwhich.nix
./rfindup.nix ./rfindup.nix
./glibc-eac.nix ./glibc-eac.nix
./factorio.nix ./factorio.nix
./ranger.nix
]; ];
} }

View File

@ -1,6 +1,5 @@
{ prev, ... }: { prev, inputs, ... }:
let let
nivSources = import ../nix/sources.nix;
glibc_patches = [ "rogue_company_reverts.patch" ]; glibc_patches = [ "rogue_company_reverts.patch" ];
in in
{ {
@ -12,7 +11,7 @@ in
in in
if oldPatches == null then [ ] else oldPatches if oldPatches == null then [ ] else oldPatches
) )
++ (map (p: "${nivSources.glibc-eac}/${p}") glibc_patches); ++ (map (p: "${inputs.glibc-eac}/${p}") glibc_patches);
doCheck = false; doCheck = false;
}); });
} }

11
overlays/ranger.nix Normal file
View File

@ -0,0 +1,11 @@
{ prev, ... }:
{
ranger = prev.ranger.overrideAttrs (oldAttrs: {
propagatedBuildInputs =
(oldAttrs.propagatedBuildInputs or [ ])
++ (with prev; [
udisks
util-linux
]);
});
}

View File

@ -52,7 +52,7 @@
system.stateVersion = "23.05"; system.stateVersion = "23.05";
nix.settings.extra-substituters = [ "https://nixcache.grimmauld.de" ]; # nix.settings.extra-substituters = [ "https://nixcache.grimmauld.de" ];
nix.settings.trusted-public-keys = [ nix.settings.trusted-public-keys = [
"nixcache.grimmauld.de:LFBlakr8RYIuVb9I1S0+L9JGyB2THcfbPa0W6srghqo=" "nixcache.grimmauld.de:LFBlakr8RYIuVb9I1S0+L9JGyB2THcfbPa0W6srghqo="

View File

@ -55,8 +55,8 @@
"$mod+d" = "exec $menu"; "$mod+d" = "exec $menu";
"$mod+Shift+d" = "exec $menu_run"; "$mod+Shift+d" = "exec $menu_run";
"$mod+Shift+s" = ''exec ${getExe grim} -g "$(${getExe slurp} -d)" - | wl-copy''; "$mod+Shift+s" = ''exec ${getExe grim} -g "$(${getExe slurp} -d)" - | wl-copy'';
"$mod+Return" = "exec ${getExe xdg-terminal-exec} xonsh"; "$mod+Shift+Return" = "exec ${getExe xdg-terminal-exec} xonsh";
"$mod+Shift+Return" = "exec ${getExe xdg-terminal-exec}"; "$mod+Return" = "exec ${getExe xdg-terminal-exec}";
"$mod+Shift+q" = "kill"; "$mod+Shift+q" = "kill";
"$mod+Shift+c" = "reload"; "$mod+Shift+c" = "reload";
"$mod+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'"; "$mod+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'";
@ -82,34 +82,7 @@
"$mod+Shift+Down" = "move down"; "$mod+Shift+Down" = "move down";
"$mod+Shift+Up" = "move up"; "$mod+Shift+Up" = "move up";
"$mod+Shift+Right" = "move right"; "$mod+Shift+Right" = "move right";
#
# Workspaces:
#
# Switch to workspace
"$mod+1" = "workspace number 1";
"$mod+2" = "workspace number 2";
"$mod+3" = "workspace number 3";
"$mod+4" = "workspace number 4";
"$mod+5" = "workspace number 5";
"$mod+6" = "workspace number 6";
"$mod+7" = "workspace number 7";
"$mod+8" = "workspace number 8";
"$mod+9" = "workspace number 9";
"$mod+0" = "workspace number 10";
# Move focused container to workspace
"$mod+Shift+1" = "move container to workspace number 1";
"$mod+Shift+2" = "move container to workspace number 2";
"$mod+Shift+3" = "move container to workspace number 3";
"$mod+Shift+4" = "move container to workspace number 4";
"$mod+Shift+5" = "move container to workspace number 5";
"$mod+Shift+6" = "move container to workspace number 6";
"$mod+Shift+7" = "move container to workspace number 7";
"$mod+Shift+8" = "move container to workspace number 8";
"$mod+Shift+9" = "move container to workspace number 9";
"$mod+Shift+0" = "move container to workspace number 10";
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff: # Layout stuff:
# #
# You can "split" the current object of your focus with # You can "split" the current object of your focus with
@ -181,7 +154,10 @@
in in
"exec ${getExe open}"; "exec ${getExe open}";
# XF86Bluetooth = "exec blueman-manager"; # XF86Bluetooth = "exec blueman-manager";
}; } // (let inherit (builtins) toString; in lib.mergeAttrsList (map (n: {
"$mod+${toString n}" = "workspace number ${toString n}";
"$mod+Shift+${toString n}" = "move container to workspace number ${toString n}";
}) (lib.range 0 9)));
autolaunch = with pkgs; [ autolaunch = with pkgs; [
# fixme: absolute paths # fixme: absolute paths
"blueman-applet" "blueman-applet"

View File

@ -38,8 +38,7 @@
packages = lib.optionals config.grimmShared.graphical ( packages = lib.optionals config.grimmShared.graphical (
with pkgs; with pkgs;
[ [
webcord vesktop
discord
obs-studio obs-studio
element-desktop element-desktop
ghidra ghidra