Compare commits
7 Commits
weekly-202
...
weekly-202
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79ce705a5e | ||
| b55dfe5aad | |||
| fab4bd0876 | |||
| d449570a0c | |||
| 0beab15f24 | |||
| ba8d491cf7 | |||
| bb08c52790 |
@@ -2,14 +2,46 @@
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) fd fzf;
|
||||
inherit (inputs.jawz-scripts.packages.x86_64-linux) pokemon-colorscripts;
|
||||
shellType = osConfig.my.shell.type;
|
||||
commonInit = ''
|
||||
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
|
||||
export command_timeout=60
|
||||
'';
|
||||
commonAliases = {
|
||||
cp = "cp -i";
|
||||
mv = "mv -i";
|
||||
mkdir = "mkdir -p";
|
||||
mkcd = "(){ mkdir -p \"$1\" && cd \"$1\" }";
|
||||
copy = "xclip -selection clipboard";
|
||||
cdp = "pwd | copy";
|
||||
cfp = "(){ readlink -f \"$1\" | copy }";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
".3" = "cd ../../..";
|
||||
".4" = "cd ../../../..";
|
||||
".5" = "cd ../../../../..";
|
||||
c = "cat";
|
||||
sc = "systemctl --user";
|
||||
jc = "journalctl --user -xefu";
|
||||
open-gallery = ''
|
||||
cd /srv/pool/scrapping/JawZ/gallery-dl &&
|
||||
xdg-open "$(${fd}/bin/fd . ./ Husbands wikifeet -tdirectory -d 1 | ${fzf}/bin/fzf -i)"'';
|
||||
};
|
||||
in
|
||||
{
|
||||
home.stateVersion = "23.05";
|
||||
programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableBashIntegration = shellType == "bash";
|
||||
enableZshIntegration = shellType == "zsh";
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
git = {
|
||||
@@ -17,45 +49,30 @@
|
||||
userName = "Danilo Reyes";
|
||||
userEmail = "CaptainJawZ@protonmail.com";
|
||||
};
|
||||
bash =
|
||||
let
|
||||
inherit (pkgs) fd fzf;
|
||||
inherit (inputs.jawz-scripts.packages.x86_64-linux) pokemon-colorscripts;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
historyFile = "\${XDG_STATE_HOME}/bash/history";
|
||||
historyControl = [
|
||||
"erasedups"
|
||||
"ignorespace"
|
||||
"ignoredups"
|
||||
];
|
||||
shellAliases = {
|
||||
cp = "cp -i";
|
||||
mv = "mv -i";
|
||||
mkdir = "mkdir -p";
|
||||
mkcd = "(){ mkdir -p \"$1\" && cd \"$1\" }";
|
||||
copy = "xclip -selection clipboard";
|
||||
cdp = "pwd | copy";
|
||||
cfp = "(){ readlink -f \"$1\" | copy }";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
".3" = "cd ../../..";
|
||||
".4" = "cd ../../../..";
|
||||
".5" = "cd ../../../../..";
|
||||
c = "cat";
|
||||
sc = "systemctl --user";
|
||||
jc = "journalctl --user -xefu";
|
||||
open-gallery = ''
|
||||
cd /srv/pool/scrapping/JawZ/gallery-dl &&
|
||||
xdg-open "$(${fd}/bin/fd . ./ Husbands wikifeet -tdirectory -d 1 | ${fzf}/bin/fzf -i)"'';
|
||||
};
|
||||
enableVteIntegration = true;
|
||||
initExtra = ''
|
||||
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
|
||||
export command_timeout=60
|
||||
'';
|
||||
bash = lib.mkIf (shellType == "bash") {
|
||||
enable = true;
|
||||
historyFile = "\${XDG_STATE_HOME}/bash/history";
|
||||
shellAliases = commonAliases;
|
||||
enableVteIntegration = true;
|
||||
initExtra = commonInit;
|
||||
historyControl = [
|
||||
"erasedups"
|
||||
"ignorespace"
|
||||
"ignoredups"
|
||||
];
|
||||
};
|
||||
zsh = lib.mkIf (shellType == "zsh") {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
shellAliases = commonAliases;
|
||||
initContent = commonInit;
|
||||
history = {
|
||||
path = "\${XDG_STATE_HOME}/zsh/history";
|
||||
expireDuplicatesFirst = true;
|
||||
ignoreSpace = true;
|
||||
ignoreAllDups = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg = {
|
||||
enable = true;
|
||||
|
||||
@@ -11,6 +11,7 @@ let
|
||||
};
|
||||
scheme = schemesFile.schemes.cheems;
|
||||
cfg = config.my.stylix;
|
||||
gnomeEnabled = config.services.xserver.desktopManager.gnome.enable;
|
||||
in
|
||||
{
|
||||
options.my.stylix.enable = lib.mkEnableOption "system-wide theming with Stylix";
|
||||
@@ -23,7 +24,7 @@ in
|
||||
}
|
||||
// lib.optionalAttrs (scheme ? base16Scheme) { inherit (scheme) base16Scheme; };
|
||||
home-manager.users.jawz = {
|
||||
gtk = lib.mkIf (!cfg.enable) {
|
||||
gtk = lib.mkIf (!cfg.enable && gnomeEnabled) {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Papirus-Light";
|
||||
@@ -33,7 +34,7 @@ in
|
||||
};
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
inherit (cfg) enable;
|
||||
autoEnable = cfg.enable;
|
||||
iconTheme = {
|
||||
inherit (cfg) enable;
|
||||
|
||||
@@ -22,7 +22,7 @@ in
|
||||
enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
# pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
users.users.jawz.packages = builtins.attrValues {
|
||||
@@ -37,7 +37,7 @@ in
|
||||
mako # Notification daemon
|
||||
libnotify # dependency of mako
|
||||
swaylock-effects # Screen locker
|
||||
nautilus # File manager
|
||||
# nautilus # File manager
|
||||
;
|
||||
};
|
||||
home-manager.users.jawz = {
|
||||
|
||||
79
flake.lock
generated
79
flake.lock
generated
@@ -125,11 +125,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759135438,
|
||||
"narHash": "sha256-2GLoM04OmwN7lVxUZI5y4zw/nFbxkVFkJmkOv4kzsdU=",
|
||||
"lastModified": 1759221805,
|
||||
"narHash": "sha256-gKne7A7DWffiqdfUPdX4TK1/a4FU942LM7e6E8ORsTY=",
|
||||
"owner": "marienz",
|
||||
"repo": "nix-doom-emacs-unstraightened",
|
||||
"rev": "7b6f3ca8d26af16e435a9d7d6a27fde60df72312",
|
||||
"rev": "5697968fa38469d12012706d9322211de10309c9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -141,11 +141,11 @@
|
||||
"doomemacs": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1758860516,
|
||||
"narHash": "sha256-ulQq9+RHIQELZVQuXsLQInqeAhOCDqRltUDRVBjQ1c0=",
|
||||
"lastModified": 1759180402,
|
||||
"narHash": "sha256-Y67ooUjDMWjPk+/IjMRnhe+OPn19Q0wF73prtExwyiI=",
|
||||
"owner": "doomemacs",
|
||||
"repo": "doomemacs",
|
||||
"rev": "1d1d17e9c910146731cb7b19d5bcbf6c4b283a74",
|
||||
"rev": "5e7e93beb9f2b5a81768aaf4950203ceea21c4f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -164,11 +164,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759111708,
|
||||
"narHash": "sha256-vFFue5sy7YRPhQQGW9kiCj+tAY3Gfm05svmDLFt5FIw=",
|
||||
"lastModified": 1759221279,
|
||||
"narHash": "sha256-7EAByrl70kQ2gV0opDiNhySsk9KcJiRpnnL+BEaNOhc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "c8f778ca07cc9d8182599be4e794db6c8e03682e",
|
||||
"rev": "6bbda1ce5dc002b22c95323b01d40518e843a00d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -304,6 +304,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fonts": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1759200391,
|
||||
"narHash": "sha256-S5LwvPL7sKgwKUhCyTpcuWUxCq57RFh7wbZ6rIc5AgU=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "edea9d2aaf2f4e0481fbbb8e26f68a9f39248e3f",
|
||||
"revCount": 2,
|
||||
"type": "git",
|
||||
"url": "https://git.servidos.lat/jawz/fonts.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.servidos.lat/jawz/fonts.git"
|
||||
}
|
||||
},
|
||||
"fromYaml": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -456,11 +472,11 @@
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759094452,
|
||||
"narHash": "sha256-j7IOTFnQRDjX4PzYb2p6CPviAc8cDrcorzGpM8J89uM=",
|
||||
"lastModified": 1759169434,
|
||||
"narHash": "sha256-1u6kq88ICeE9IiJPditYa248ZoEqo00kz6iUR+jLvBQ=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "f854b5bffbdd13cfe7edad0ee157d6947ff99619",
|
||||
"rev": "38c1e72c9d81fcdad8f173e06102a5da18836230",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -649,11 +665,11 @@
|
||||
"sudoku-solver": "sudoku-solver"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758693316,
|
||||
"narHash": "sha256-cy8CdWOyDJdIe2gVPP3mtRIYXwv8m08HhLet8eSyrHM=",
|
||||
"lastModified": 1759213850,
|
||||
"narHash": "sha256-KnFUzXjSOtSG9U4U4OJonCTZaMWqJjXvHL1PQW994A4=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "64a81ca78d03816ddcbbdc8a7b6186c975c6653a",
|
||||
"revCount": 104,
|
||||
"rev": "38959dc37b09d1cb037df02086e4d07b9ef30b80",
|
||||
"revCount": 105,
|
||||
"type": "git",
|
||||
"url": "https://git.servidos.lat/jawz/scripts.git"
|
||||
},
|
||||
@@ -770,11 +786,11 @@
|
||||
},
|
||||
"nixpkgs-small": {
|
||||
"locked": {
|
||||
"lastModified": 1759008180,
|
||||
"narHash": "sha256-hVpxYhilbBxQj0D6u6hUb6OXhNl85xIdhUE23AmqBdA=",
|
||||
"lastModified": 1759250113,
|
||||
"narHash": "sha256-apF3ww4pPkxHI5c424Z6VYdImge1iZSP6TOH45lIqxU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9a51fe84a7214f70a17e5d7ce085385baa24ee29",
|
||||
"rev": "f579c51fd27e9f66c8236b26a47ed78b315f785d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -786,11 +802,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1758690382,
|
||||
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
|
||||
"lastModified": 1759036355,
|
||||
"narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
|
||||
"rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -802,11 +818,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1758791193,
|
||||
"narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=",
|
||||
"lastModified": 1759143472,
|
||||
"narHash": "sha256-TvODmeR2W7yX/JmOCmP+lAFNkTT7hAxYcF3Kz8SZV3w=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01",
|
||||
"rev": "5ed4e25ab58fd4c028b59d5611e14ea64de51d23",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -845,11 +861,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759136191,
|
||||
"narHash": "sha256-1FhgEzYRwLWUWjm/csTr+OmzRVGgvlUDySqhFOyhPGM=",
|
||||
"lastModified": 1759260470,
|
||||
"narHash": "sha256-7KFWm6l+qJl+b1XAx9D8isjCb2kluJEGzquZxmJPEL4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "c7f19a28eaa25be9451bd48508eabf2b386fb72d",
|
||||
"rev": "2b8508603232941676978619d6d4b34fc9e0b486",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -910,6 +926,7 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"doom-emacs": "doom-emacs",
|
||||
"fonts": "fonts",
|
||||
"home-manager": "home-manager",
|
||||
"hyprland": "hyprland",
|
||||
"jawz-scripts": "jawz-scripts",
|
||||
@@ -933,11 +950,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759030640,
|
||||
"narHash": "sha256-53VP3BqMXJqD1He1WADTFyUnpta3mie56H7nC59tSic=",
|
||||
"lastModified": 1759188042,
|
||||
"narHash": "sha256-f9QC2KKiNReZDG2yyKAtDZh0rSK2Xp1wkPzKbHeQVRU=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "9ac51832c70f2ff34fcc97b05fa74b4a78317f9e",
|
||||
"rev": "9fcfabe085281dd793589bdc770a2e577a3caa5d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
url = "git+https://git.servidos.lat/jawz/wallpapers.git";
|
||||
flake = false;
|
||||
};
|
||||
fonts = {
|
||||
url = "git+https://git.servidos.lat/jawz/fonts.git";
|
||||
flake = false;
|
||||
};
|
||||
nur = {
|
||||
url = "github:nix-community/nur";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
shellType = config.my.shell.type;
|
||||
krita-thumbnailer = pkgs.writeTextFile {
|
||||
name = "krita-thumbnailer";
|
||||
destination = "/share/thumbnailers/kra.thumbnailer";
|
||||
@@ -18,7 +21,6 @@ in
|
||||
./hardware-configuration.nix
|
||||
../../config/base.nix
|
||||
../../config/stylix.nix
|
||||
../../environments/gnome.nix
|
||||
];
|
||||
my = import ./toggles.nix // {
|
||||
nix.cores = 8;
|
||||
@@ -38,12 +40,23 @@ in
|
||||
ghostty = {
|
||||
enable = true;
|
||||
package = pkgs.ghostty;
|
||||
enableBashIntegration = true;
|
||||
enableBashIntegration = shellType == "bash";
|
||||
enableZshIntegration = shellType == "zsh";
|
||||
installBatSyntax = true;
|
||||
installVimSyntax = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
specialisation = {
|
||||
gnome.configuration = {
|
||||
imports = [ ../../environments/gnome.nix ];
|
||||
services.flatpak.enable = true;
|
||||
};
|
||||
hyprland.configuration = {
|
||||
imports = [ ../../environments/hyprland.nix ];
|
||||
services.flatpak.enable = true;
|
||||
};
|
||||
};
|
||||
networking = {
|
||||
hostName = "workstation";
|
||||
firewall =
|
||||
@@ -130,7 +143,7 @@ in
|
||||
../../secrets/ssh/root-private-ca.pem
|
||||
];
|
||||
services = {
|
||||
flatpak.enable = true;
|
||||
flatpak.enable = lib.mkDefault false;
|
||||
open-webui.enable = true;
|
||||
scx = {
|
||||
enable = true;
|
||||
|
||||
@@ -24,25 +24,18 @@ in
|
||||
cpuModelId = "00A50F00";
|
||||
};
|
||||
};
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
settings.General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Experimental = true;
|
||||
};
|
||||
};
|
||||
opentabletdriver = {
|
||||
enable = true;
|
||||
daemon.enable = true;
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
settings.General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Experimental = true;
|
||||
};
|
||||
};
|
||||
boot = {
|
||||
plymouth.enable = true;
|
||||
consoleLogLevel = 0;
|
||||
loader.timeout = 0;
|
||||
loader.timeout = 5;
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
@@ -84,17 +77,11 @@ in
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
luks.devices =
|
||||
let
|
||||
decryptLuks = uuid: {
|
||||
device = getUUID uuid;
|
||||
keyFile = "/keyfile";
|
||||
preLVM = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
nvme = decryptLuks "e9618e85-a631-4374-b2a4-22c376d6e41b";
|
||||
};
|
||||
luks.devices.nvme = {
|
||||
device = getUUID "e9618e85-a631-4374-b2a4-22c376d6e41b";
|
||||
keyFile = "/keyfile";
|
||||
preLVM = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
fileSystems =
|
||||
|
||||
@@ -2,13 +2,30 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
customFonts = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "custom-fonts";
|
||||
src = inputs.fonts;
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/fonts
|
||||
find $src -type f \( \
|
||||
-name "*.ttf" -o \
|
||||
-name "*.otf" -o \
|
||||
-name "*.woff" -o \
|
||||
-name "*.woff2" \
|
||||
\) -exec cp {} $out/share/fonts/ \;
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.apps.fonts.enable = lib.mkEnableOption "additional fonts and typography";
|
||||
config = lib.mkIf config.my.apps.fonts.enable {
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "corefonts" ];
|
||||
fonts.packages = builtins.attrValues {
|
||||
inherit customFonts;
|
||||
inherit (pkgs)
|
||||
symbola
|
||||
comic-neue
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"doom/templates/programming.org".source = ../../dotfiles/doom/templates/programming.org;
|
||||
};
|
||||
services.lorri.enable = true;
|
||||
programs.bash.shellAliases = {
|
||||
programs.${config.my.shell.type}.shellAliases = {
|
||||
edit = "emacsclient -t";
|
||||
e = "edit";
|
||||
};
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
shellType = config.my.shell.type;
|
||||
packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
nixfmt-rfc-style # formatting
|
||||
@@ -31,5 +32,12 @@ in
|
||||
};
|
||||
config = lib.mkIf config.my.dev.nix.enable {
|
||||
users.users.jawz = { inherit packages; };
|
||||
home-manager.users.jawz.programs.${shellType}.shellAliases = {
|
||||
nixformat = ''
|
||||
nix run unstable#deadnix -- -e && \
|
||||
nix run unstable#nixfmt-tree && \
|
||||
nix run unstable#statix fix
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,21 +16,33 @@
|
||||
inherit (inputs.jawz-scripts.packages.x86_64-linux) download;
|
||||
in
|
||||
{
|
||||
home-manager.users.jawz = {
|
||||
programs.bash = {
|
||||
shellAliases = {
|
||||
dl = "${download}/bin/download -u jawz -i";
|
||||
comic = ''dl "$(cat "$LC" | fzf --multi --exact -i)"'';
|
||||
gallery = ''dl "$(cat "$LW" | fzf --multi --exact -i)"'';
|
||||
};
|
||||
initExtra = ''
|
||||
list_root=$XDG_CONFIG_HOME/jawz/lists/jawz
|
||||
export LW=$list_root/watch.txt
|
||||
export LI=$list_root/instant.txt
|
||||
export LC=$list_root/comic.txt
|
||||
'';
|
||||
home-manager.users.jawz.programs.${config.my.shell.type} = {
|
||||
shellAliases = {
|
||||
dl = "${download}/bin/download -u jawz -i";
|
||||
comic = ''dl "$(cat "$LC" | fzf --multi --exact -i)"'';
|
||||
gallery = ''dl "$(cat "$LW" | fzf --multi --exact -i)"'';
|
||||
};
|
||||
};
|
||||
}
|
||||
// (
|
||||
if config.my.shell.type == "bash" then
|
||||
{
|
||||
initExtra = ''
|
||||
list_root=$XDG_CONFIG_HOME/jawz/lists/jawz
|
||||
export LW=$list_root/watch.txt
|
||||
export LI=$list_root/instant.txt
|
||||
export LC=$list_root/comic.txt
|
||||
'';
|
||||
}
|
||||
else
|
||||
{
|
||||
initContent = ''
|
||||
list_root=$XDG_CONFIG_HOME/jawz/lists/jawz
|
||||
export LW=$list_root/watch.txt
|
||||
export LI=$list_root/instant.txt
|
||||
export LC=$list_root/comic.txt
|
||||
'';
|
||||
}
|
||||
);
|
||||
systemd.user = {
|
||||
services =
|
||||
let
|
||||
|
||||
20
modules/shell/config.nix
Normal file
20
modules/shell/config.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.my.shell.type = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"bash"
|
||||
"zsh"
|
||||
];
|
||||
default = "bash";
|
||||
description = "The shell to use system-wide (bash or zsh)";
|
||||
};
|
||||
config = {
|
||||
users.users.jawz.shell = pkgs.${config.my.shell.type};
|
||||
programs.zsh.enable = config.my.shell.type == "zsh";
|
||||
};
|
||||
}
|
||||
@@ -5,6 +5,9 @@
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
shellType = config.my.shell.type;
|
||||
in
|
||||
{
|
||||
options.my.shell.tools.enable = lib.mkEnableOption "shell tools and utilities";
|
||||
config = lib.mkIf config.my.shell.tools.enable {
|
||||
@@ -16,15 +19,10 @@
|
||||
};
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableBashIntegration = shellType == "bash";
|
||||
enableZshIntegration = shellType == "zsh";
|
||||
};
|
||||
bash = {
|
||||
initExtra = ''
|
||||
if command -v fzf-share >/dev/null; then
|
||||
source "$(fzf-share)/key-bindings.bash"
|
||||
source "$(fzf-share)/completion.bash"
|
||||
fi
|
||||
'';
|
||||
${shellType} = {
|
||||
shellAliases = {
|
||||
cd = "z";
|
||||
hh = "hstr";
|
||||
@@ -37,7 +35,27 @@
|
||||
tr '[:upper:]' '[:lower:]' | sort |
|
||||
uniq --count | sort -rn'';
|
||||
};
|
||||
};
|
||||
}
|
||||
// (
|
||||
if shellType == "bash" then
|
||||
{
|
||||
initExtra = ''
|
||||
if command -v fzf-share >/dev/null; then
|
||||
source "$(fzf-share)/key-bindings.bash"
|
||||
source "$(fzf-share)/completion.bash"
|
||||
fi
|
||||
'';
|
||||
}
|
||||
else
|
||||
{
|
||||
initContent = ''
|
||||
if command -v fzf-share >/dev/null; then
|
||||
source "$(fzf-share)/key-bindings.bash"
|
||||
source "$(fzf-share)/completion.bash"
|
||||
fi
|
||||
'';
|
||||
}
|
||||
);
|
||||
bat = {
|
||||
enable = true;
|
||||
config.pager = "less -FR";
|
||||
|
||||
Reference in New Issue
Block a user