mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: add hm-specialisation
This commit is contained in:
parent
1ce57ea380
commit
39f2058b7a
5 changed files with 38 additions and 0 deletions
|
|
@ -1512,6 +1512,7 @@ This is the central station for self-defined packages. These are all referenced
|
||||||
{
|
{
|
||||||
pass-fuzzel = callPackage ./pass-fuzzel { };
|
pass-fuzzel = callPackage ./pass-fuzzel { };
|
||||||
cura5 = callPackage ./cura5 { };
|
cura5 = callPackage ./cura5 { };
|
||||||
|
hm-specialisation = callPackage ./hm-specialisation { };
|
||||||
cdw = callPackage ./cdw { };
|
cdw = callPackage ./cdw { };
|
||||||
cdb = callPackage ./cdb { };
|
cdb = callPackage ./cdb { };
|
||||||
bak = callPackage ./bak { };
|
bak = callPackage ./bak { };
|
||||||
|
|
@ -1640,6 +1641,27 @@ The version of =cura= used to be quite outdated in nixpkgs. I am fetching a newe
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
**** hm-specialisation
|
||||||
|
|
||||||
|
This script allows for quick git home-manager specialisation switching.
|
||||||
|
|
||||||
|
|
||||||
|
#+begin_src nix :tangle pkgs/hm-specialisation/default.nix
|
||||||
|
{ 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
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
**** cdw
|
**** cdw
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: h:73b14c7a-5444-4fed-b7ac-d65542cdeda3
|
:CUSTOM_ID: h:73b14c7a-5444-4fed-b7ac-d65542cdeda3
|
||||||
|
|
@ -6317,6 +6339,7 @@ This holds packages that I can use as provided, or with small modifications (as
|
||||||
nh
|
nh
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
hyprpicker # color picker
|
hyprpicker # color picker
|
||||||
|
findutils
|
||||||
|
|
||||||
# nix
|
# nix
|
||||||
alejandra
|
alejandra
|
||||||
|
|
@ -6473,6 +6496,7 @@ This is just a separate container for derivations defined in [[#h:64a5cc16-6b16-
|
||||||
update-checker
|
update-checker
|
||||||
github-notifications
|
github-notifications
|
||||||
screenshare
|
screenshare
|
||||||
|
hm-specialisation
|
||||||
|
|
||||||
(pkgs.writeScriptBin "project" ''
|
(pkgs.writeScriptBin "project" ''
|
||||||
#! ${pkgs.bash}/bin/bash
|
#! ${pkgs.bash}/bin/bash
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ in
|
||||||
{
|
{
|
||||||
pass-fuzzel = callPackage ./pass-fuzzel { };
|
pass-fuzzel = callPackage ./pass-fuzzel { };
|
||||||
cura5 = callPackage ./cura5 { };
|
cura5 = callPackage ./cura5 { };
|
||||||
|
hm-specialisation = callPackage ./hm-specialisation { };
|
||||||
cdw = callPackage ./cdw { };
|
cdw = callPackage ./cdw { };
|
||||||
cdb = callPackage ./cdb { };
|
cdb = callPackage ./cdb { };
|
||||||
bak = callPackage ./bak { };
|
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
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
update-checker
|
update-checker
|
||||||
github-notifications
|
github-notifications
|
||||||
screenshare
|
screenshare
|
||||||
|
hm-specialisation
|
||||||
|
|
||||||
(pkgs.writeScriptBin "project" ''
|
(pkgs.writeScriptBin "project" ''
|
||||||
#! ${pkgs.bash}/bin/bash
|
#! ${pkgs.bash}/bin/bash
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
nh
|
nh
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
hyprpicker # color picker
|
hyprpicker # color picker
|
||||||
|
findutils
|
||||||
|
|
||||||
# nix
|
# nix
|
||||||
alejandra
|
alejandra
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue