Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos
commit
070fc5fb81
|
@ -94,7 +94,6 @@
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
inputs.hypr-contrib.overlays.default
|
inputs.hypr-contrib.overlays.default
|
||||||
inputs.hyprland.overlays.default
|
|
||||||
inputs.neovim-nightly-overlay.overlay
|
inputs.neovim-nightly-overlay.overlay
|
||||||
overlay
|
overlay
|
||||||
];
|
];
|
||||||
|
|
|
@ -34,17 +34,29 @@ let
|
||||||
|
|
||||||
which-nix = pkgs.writeFishApplication {
|
which-nix = pkgs.writeFishApplication {
|
||||||
name = "which-nix";
|
name = "which-nix";
|
||||||
runtimeInputs = with pkgs; [ which coreutils-full ];
|
runtimeInputs = with pkgs; [ which coreutils-full procps ];
|
||||||
text = /* fish */ ''
|
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 */ ''
|
completions = /* fish */ ''
|
||||||
complete -c which-nix -fa '(__fish_complete_command)'
|
complete -c which-nix -fa '(__fish_complete_command)'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
gi = pkgs.writeFishApplication
|
gi = pkgs.writeFishApplication {
|
||||||
{
|
|
||||||
name = "gi";
|
name = "gi";
|
||||||
runtimeInputs = with pkgs; [ fzf gum curl ];
|
runtimeInputs = with pkgs; [ fzf gum curl ];
|
||||||
text = /* fish */ ''
|
text = /* fish */ ''
|
||||||
|
|
|
@ -8,9 +8,12 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.my.programs.fish;
|
cfg = config.my.programs.fish;
|
||||||
shellConfig = config.my.shell;
|
shellConfig = config.my.shell;
|
||||||
|
exportedVariables =
|
||||||
|
let
|
||||||
exportVariables =
|
exportVariables =
|
||||||
lib.mapAttrsToList (n: v: ''set -x ${n} "${v}"'') shellConfig.variables;
|
lib.mapAttrsToList (n: v: ''set -x ${n} "${v}"'') shellConfig.variables;
|
||||||
exportedVariables = lib.concatStringsSep "\n" exportVariables;
|
in
|
||||||
|
lib.concatStringsSep "\n" exportVariables;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.programs.fish.enable = mkEnableOption "fish";
|
options.my.programs.fish.enable = mkEnableOption "fish";
|
||||||
|
|
|
@ -9,7 +9,8 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.my.programs.hyprland;
|
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
|
in
|
||||||
{
|
{
|
||||||
options.my.programs.hyprland = {
|
options.my.programs.hyprland = {
|
||||||
|
|
|
@ -17,7 +17,7 @@ in
|
||||||
gateway = "vpn.uni-leipzig.de";
|
gateway = "vpn.uni-leipzig.de";
|
||||||
protocol = "anyconnect";
|
protocol = "anyconnect";
|
||||||
user = "mb18cele@uni-leipzig.de";
|
user = "mb18cele@uni-leipzig.de";
|
||||||
# NOTE file content as follows:
|
# NOTE: file content as follows:
|
||||||
# <my_password>
|
# <my_password>
|
||||||
# "1-Standard-Uni" or "2-Spezial-Alles"
|
# "1-Standard-Uni" or "2-Spezial-Alles"
|
||||||
# Explanation:
|
# Explanation:
|
||||||
|
|
|
@ -2,16 +2,14 @@ _:
|
||||||
|
|
||||||
final: _:
|
final: _:
|
||||||
with final.lib;
|
with final.lib;
|
||||||
{
|
rec {
|
||||||
writeFishApplication =
|
fishFile =
|
||||||
{ name
|
{ name
|
||||||
, text
|
, destination
|
||||||
, completions ? null
|
, content
|
||||||
, runtimeInputs ? [ ]
|
|
||||||
, checkPhase ? null
|
, checkPhase ? null
|
||||||
}:
|
}:
|
||||||
let
|
final.writeTextFile {
|
||||||
fishFile = destination: content: final.writeTextFile {
|
|
||||||
inherit name destination;
|
inherit name destination;
|
||||||
executable = true;
|
executable = true;
|
||||||
allowSubstitutes = true;
|
allowSubstitutes = true;
|
||||||
|
@ -19,8 +17,6 @@ with final.lib;
|
||||||
text = ''
|
text = ''
|
||||||
#!${getExe final.fish}
|
#!${getExe final.fish}
|
||||||
|
|
||||||
${optionalString (runtimeInputs != [ ]) ''export PATH="${makeBinPath runtimeInputs}:$PATH"''}
|
|
||||||
|
|
||||||
${content}
|
${content}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -33,8 +29,29 @@ with final.lib;
|
||||||
else checkPhase;
|
else checkPhase;
|
||||||
};
|
};
|
||||||
|
|
||||||
script = fishFile "/bin/${name}" text;
|
writeFishApplication =
|
||||||
completions_file = fishFile "/share/fish/vendor_completions.d/${name}.fish" completions;
|
{ 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 ];
|
||||||
|
};
|
||||||
in
|
in
|
||||||
final.symlinkJoin {
|
final.symlinkJoin {
|
||||||
inherit name;
|
inherit name;
|
||||||
|
|
|
@ -11,6 +11,7 @@ final: prev:
|
||||||
version = lib.my.mkVersionInput inputs.rofi-wayland;
|
version = lib.my.mkVersionInput inputs.rofi-wayland;
|
||||||
});
|
});
|
||||||
timers = inputs.timers.packages.${prev.system}.default;
|
timers = inputs.timers.packages.${prev.system}.default;
|
||||||
|
hyprland = inputs.hyprland.packages.${prev.system}.default;
|
||||||
|
|
||||||
fzf1 = final.writeShellApplication {
|
fzf1 = final.writeShellApplication {
|
||||||
name = "fzf1";
|
name = "fzf1";
|
||||||
|
|
Loading…
Reference in New Issue