Compare commits
No commits in common. "37a93b29ee7d210d7843b330f288bf99098b6698" and "d6ad8105680fe53708e1705d61a412c4a40b6b7a" have entirely different histories.
37a93b29ee
...
d6ad810568
|
@ -95,6 +95,7 @@
|
|||
|
||||
overlays = [
|
||||
inputs.hypr-contrib.overlays.default
|
||||
inputs.hyprland.overlays.default
|
||||
inputs.neovim-nightly-overlay.overlay
|
||||
overlay
|
||||
];
|
||||
|
|
|
@ -34,29 +34,17 @@ let
|
|||
|
||||
which-nix = pkgs.writeFishApplication {
|
||||
name = "which-nix";
|
||||
runtimeInputs = with pkgs; [ which coreutils-full procps ];
|
||||
runtimeInputs = with pkgs; [ which coreutils-full ];
|
||||
text = /* fish */ ''
|
||||
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
|
||||
readlink -f (which $argv)
|
||||
'';
|
||||
completions = /* fish */ ''
|
||||
complete -c which-nix -fa '(__fish_complete_command)'
|
||||
'';
|
||||
};
|
||||
|
||||
gi = pkgs.writeFishApplication {
|
||||
gi = pkgs.writeFishApplication
|
||||
{
|
||||
name = "gi";
|
||||
runtimeInputs = with pkgs; [ fzf gum curl ];
|
||||
text = /* fish */ ''
|
||||
|
|
|
@ -8,12 +8,9 @@ with lib;
|
|||
let
|
||||
cfg = config.my.programs.fish;
|
||||
shellConfig = config.my.shell;
|
||||
exportedVariables =
|
||||
let
|
||||
exportVariables =
|
||||
lib.mapAttrsToList (n: v: ''set -x ${n} "${v}"'') shellConfig.variables;
|
||||
in
|
||||
lib.concatStringsSep "\n" exportVariables;
|
||||
exportedVariables = lib.concatStringsSep "\n" exportVariables;
|
||||
in
|
||||
{
|
||||
options.my.programs.fish.enable = mkEnableOption "fish";
|
||||
|
|
|
@ -9,8 +9,7 @@ with lib;
|
|||
let
|
||||
cfg = config.my.programs.hyprland;
|
||||
|
||||
hyprland-nvidia = pkgs.hyprland.override { enableNvidiaPatches = true; };
|
||||
hyprland = if cfg.nvidiaSupport then hyprland-nvidia else pkgs.hyprland;
|
||||
hyprland = pkgs.hyprland.override { enableNvidiaPatches = cfg.nvidiaSupport; };
|
||||
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:
|
||||
|
|
|
@ -2,14 +2,16 @@ _:
|
|||
|
||||
final: _:
|
||||
with final.lib;
|
||||
rec {
|
||||
fishFile =
|
||||
{
|
||||
writeFishApplication =
|
||||
{ name
|
||||
, destination
|
||||
, content
|
||||
, text
|
||||
, completions ? null
|
||||
, runtimeInputs ? [ ]
|
||||
, checkPhase ? null
|
||||
}:
|
||||
final.writeTextFile {
|
||||
let
|
||||
fishFile = destination: content: final.writeTextFile {
|
||||
inherit name destination;
|
||||
executable = true;
|
||||
allowSubstitutes = true;
|
||||
|
@ -17,6 +19,8 @@ rec {
|
|||
text = ''
|
||||
#!${getExe final.fish}
|
||||
|
||||
${optionalString (runtimeInputs != [ ]) ''export PATH="${makeBinPath runtimeInputs}:$PATH"''}
|
||||
|
||||
${content}
|
||||
'';
|
||||
|
||||
|
@ -29,29 +33,8 @@ rec {
|
|||
else checkPhase;
|
||||
};
|
||||
|
||||
writeFishApplication =
|
||||
{ name
|
||||
, text
|
||||
, completions ? null
|
||||
, runtimeInputs ? [ ]
|
||||
, checkPhase ? null
|
||||
}:
|
||||
let
|
||||
runtimeHeader = optionalString (runtimeInputs != [ ])
|
||||
''export PATH="${makeBinPath runtimeInputs}:$PATH"'';
|
||||
|
||||
script = fishFile {
|
||||
inherit checkPhase;
|
||||
name = "${name}_script";
|
||||
destination = "/bin/${name}";
|
||||
content = concatLines [ runtimeHeader text ];
|
||||
};
|
||||
completions_file = fishFile {
|
||||
inherit checkPhase;
|
||||
name = "${name}_completions";
|
||||
destination = "/share/fish/vendor_completions.d/${name}.fish";
|
||||
content = concatLines [ runtimeHeader completions ];
|
||||
};
|
||||
script = fishFile "/bin/${name}" text;
|
||||
completions_file = fishFile "/share/fish/vendor_completions.d/${name}.fish" completions;
|
||||
in
|
||||
final.symlinkJoin {
|
||||
inherit name;
|
||||
|
|
|
@ -11,7 +11,6 @@ final: prev:
|
|||
version = lib.my.mkVersionInput inputs.rofi-wayland;
|
||||
});
|
||||
timers = inputs.timers.packages.${prev.system}.default;
|
||||
hyprland = inputs.hyprland.packages.${prev.system}.default;
|
||||
|
||||
fzf1 = final.writeShellApplication {
|
||||
name = "fzf1";
|
||||
|
|
Loading…
Reference in New Issue