Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos
This commit is contained in:
commit
070fc5fb81
7 changed files with 89 additions and 56 deletions
|
|
@ -34,42 +34,54 @@ let
|
|||
|
||||
which-nix = pkgs.writeFishApplication {
|
||||
name = "which-nix";
|
||||
runtimeInputs = with pkgs; [ which coreutils-full ];
|
||||
runtimeInputs = with pkgs; [ which coreutils-full procps ];
|
||||
text = /* fish */ ''
|
||||
readlink -f (which $argv)
|
||||
function recurse -a path;
|
||||
if not test -f "$path"
|
||||
return
|
||||
end
|
||||
|
||||
echo $path
|
||||
if test -L $path
|
||||
recurse (readlink $path)
|
||||
end
|
||||
end
|
||||
|
||||
for arg in $argv
|
||||
recurse (which $arg)
|
||||
end
|
||||
'';
|
||||
completions = /* fish */ ''
|
||||
complete -c which-nix -fa '(__fish_complete_command)'
|
||||
'';
|
||||
};
|
||||
|
||||
gi = pkgs.writeFishApplication
|
||||
{
|
||||
name = "gi";
|
||||
runtimeInputs = with pkgs; [ fzf gum curl ];
|
||||
text = /* fish */ ''
|
||||
set url https://www.gitignore.io/api
|
||||
gi = pkgs.writeFishApplication {
|
||||
name = "gi";
|
||||
runtimeInputs = with pkgs; [ fzf gum curl ];
|
||||
text = /* fish */ ''
|
||||
set url https://www.gitignore.io/api
|
||||
|
||||
if test (count $argv) -eq 0
|
||||
set choice ( curl -sL $url/list \
|
||||
| string split "," \
|
||||
| fzf -m \
|
||||
| string join "," )
|
||||
else
|
||||
set choice (string join "," $argv[1..])
|
||||
end
|
||||
if test (count $argv) -eq 0
|
||||
set choice ( curl -sL $url/list \
|
||||
| string split "," \
|
||||
| fzf -m \
|
||||
| string join "," )
|
||||
else
|
||||
set choice (string join "," $argv[1..])
|
||||
end
|
||||
|
||||
if gum confirm "Overwrite current .gitignore?"
|
||||
curl -sL $url/$choice > .gitignore
|
||||
else
|
||||
curl -sL $url/$choice >> .gitignore
|
||||
end
|
||||
'';
|
||||
completions = /* fish */ ''
|
||||
set args (curl -sL https://www.gitignore.io/api/list | string split ",")
|
||||
complete -c gi -fa "$args"
|
||||
'';
|
||||
};
|
||||
if gum confirm "Overwrite current .gitignore?"
|
||||
curl -sL $url/$choice > .gitignore
|
||||
else
|
||||
curl -sL $url/$choice >> .gitignore
|
||||
end
|
||||
'';
|
||||
completions = /* fish */ ''
|
||||
set args (curl -sL https://www.gitignore.io/api/list | string split ",")
|
||||
complete -c gi -fa "$args"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
users.users.moritz = {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,12 @@ with lib;
|
|||
let
|
||||
cfg = config.my.programs.fish;
|
||||
shellConfig = config.my.shell;
|
||||
exportVariables =
|
||||
lib.mapAttrsToList (n: v: ''set -x ${n} "${v}"'') shellConfig.variables;
|
||||
exportedVariables = lib.concatStringsSep "\n" exportVariables;
|
||||
exportedVariables =
|
||||
let
|
||||
exportVariables =
|
||||
lib.mapAttrsToList (n: v: ''set -x ${n} "${v}"'') shellConfig.variables;
|
||||
in
|
||||
lib.concatStringsSep "\n" exportVariables;
|
||||
in
|
||||
{
|
||||
options.my.programs.fish.enable = mkEnableOption "fish";
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ with lib;
|
|||
let
|
||||
cfg = config.my.programs.hyprland;
|
||||
|
||||
hyprland = pkgs.hyprland.override { enableNvidiaPatches = cfg.nvidiaSupport; };
|
||||
hyprland-nvidia = pkgs.hyprland.override { enableNvidiaPatches = true; };
|
||||
hyprland = if cfg.nvidiaSupport then hyprland-nvidia else pkgs.hyprland;
|
||||
in
|
||||
{
|
||||
options.my.programs.hyprland = {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ in
|
|||
gateway = "vpn.uni-leipzig.de";
|
||||
protocol = "anyconnect";
|
||||
user = "mb18cele@uni-leipzig.de";
|
||||
# NOTE file content as follows:
|
||||
# NOTE: file content as follows:
|
||||
# <my_password>
|
||||
# "1-Standard-Uni" or "2-Spezial-Alles"
|
||||
# Explanation:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue