mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 00:57:22 +01:00
feat: add hm-specialisation
This commit is contained in:
parent
1ce57ea380
commit
39f2058b7a
5 changed files with 38 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ in
|
|||
{
|
||||
pass-fuzzel = callPackage ./pass-fuzzel { };
|
||||
cura5 = callPackage ./cura5 { };
|
||||
hm-specialisation = callPackage ./hm-specialisation { };
|
||||
cdw = callPackage ./cdw { };
|
||||
cdb = callPackage ./cdb { };
|
||||
bak = callPackage ./bak { };
|
||||
|
|
|
|||
11
pkgs/hm-specialisation/default.nix
Normal file
11
pkgs/hm-specialisation/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ writeShellApplication, fzf, findutils, home-manager }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "hm-specialisation";
|
||||
runtimeInputs = [ fzf findutils home-manager ];
|
||||
text = ''
|
||||
genpath=$(home-manager generations | head -1 | awk '{print $7}')
|
||||
dirs=$(find "$genpath/specialisation" -type l 2>/dev/null; [ -d "$genpath" ] && echo "$genpath")
|
||||
"$(echo "$dirs" | fzf --prompt="Choose home-manager specialisation to activate")"/activate
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue