Commit 23b96a3eb43d

Vincent Demeester <vincent@sbr.pm>
2019-01-27 16:30:50
fish: remove dynamic function nix run aliases…
… now using [nr](https://github.com/vdemeester/nr) Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 164702a
modules/profiles/assets/fish/a_nix_run.fish
@@ -1,24 +0,0 @@
-function _nix_run_package
-    set -l s $argv[1]
-    set -l package (string split ":" $s)
-    switch (count $package)
-	case 1
-	    _nix_run $s $s $argv[2] $argv[3]
-	case 2
-	    _nix_run $package[1] $package[2] $argv[2] $argv[3]
-    end
-end
-
-function _nix_run
-    set -l c $argv[1]
-    set -l p $argv[2]
-    set -l channel $argv[3]
-    set -l channelsfile $argv[4]
-    function $c --inherit-variable c --inherit-variable p --inherit-variable channel --inherit-variable channelsfile
-	set -l cmd nix run
-	if test -n "$channelsfile"
-	    set cmd $cmd -f $channelsfile
-	end
-	eval $cmd $channel.$p -c $c $argv
-    end
-end
modules/profiles/assets/fish/git.fish
@@ -1,12 +0,0 @@
-function _def_git_nix_run_aliases
-    set -l packages git-annex:gitAndTools.git-annex grv:gitAndTools.grv
-    set -l unstable git-appraise:gitAndTools.git-appraise
-    for s in $packages
-	_nix_run_package $s nixpkgs
-    end
-    for s in $unstable
-	_nix_run_package $s unstable ~/.config/nixpkgs/channels.nix
-    end
-end
-
-_def_git_nix_run_aliases
modules/profiles/assets/fish/go.fish
@@ -1,11 +1,2 @@
 set -gx GOPATH $HOME
 set -gx GOPROXY http://go.cache.home:3000
-
-function _def_go_nix_run_aliases
-    set -l unstable pprof
-    for s in $unstable
-        _nix_run_package $s unstable ~/.config/nixpkgs/channels.nix
-    end
-end
-
-_def_go_nix_run_aliases
modules/profiles/assets/fish/nix-aliases.fish
@@ -1,12 +0,0 @@
-function _def_nix_run_aliases
-    set -l stable mr sshfs ncdu wakeonlan:python36Packages.wakeonlan lspci:pciutils lsusb:usbutils beet:beets gotop virt-manager:virtmanager pandoc nix-prefetch-git:nix-prefetch-scripts nix-prefetch-hg:nix-prefetch-scripts
-    set -l unstable op:_1password update-desktop-database:desktop-file-utils lgogdownloader
-    for s in $stable
-	_nix_run_package $s nixpkgs
-    end
-    for s in $unstable
-	_nix_run_package $s unstable ~/.config/nixpkgs/channels.nix
-    end
-end
-
-_def_nix_run_aliases
modules/profiles/fish.nix
@@ -31,8 +31,6 @@ in
       end
       '';
     };
-    xdg.configFile."fish/conf.d/a_nix_run.fish".source = ./assets/fish/a_nix_run.fish;
-    xdg.configFile."fish/conf.d/nix-aliases.fish".source = ./assets/fish/nix-aliases.fish;
     xdg.configFile."fish/conf.d/sudope.fish".source = ./assets/fish/sudope.fish;
     xdg.configFile."fish/functions/sudope.fish".source = ./assets/fish/sudope.function.fish;
     xdg.configFile."fish/functions/fish_prompt.fish".source = ./assets/fish/fish_prompt.fish;
modules/profiles/git.nix
@@ -164,7 +164,6 @@ in
       };
     }
     (mkIf config.profiles.fish.enable{
-      xdg.configFile."fish/conf.d/git.fish".source = ./assets/fish/git.fish;
       programs.fish.shellAbbrs = {
         gs = "git status";
         gb = "git b";