mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 01:33:55 -05:00
nix: use lib.getExe for executables
This commit is contained in:
parent
5634e4e8a3
commit
7ebe3a1da2
|
@ -10,7 +10,7 @@
|
|||
lib.mkEnableOption "Enable greetd.";
|
||||
alyraffauf.desktop.greetd.session = lib.mkOption {
|
||||
description = "Default command to execute on login.";
|
||||
default = config.programs.hyprland.package + "/bin/Hyprland";
|
||||
default = lib.getExe config.programs.hyprland.package;
|
||||
type = lib.types.str;
|
||||
};
|
||||
alyraffauf.desktop.greetd.autologin.enable = lib.mkOption {
|
||||
|
@ -33,7 +33,7 @@
|
|||
if config.alyraffauf.desktop.greetd.autologin.enable
|
||||
then {
|
||||
default_session = {
|
||||
command = lib.mkDefault "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}";
|
||||
command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}";
|
||||
};
|
||||
initial_session = {
|
||||
command = config.alyraffauf.desktop.greetd.session;
|
||||
|
@ -42,7 +42,7 @@
|
|||
}
|
||||
else {
|
||||
default_session = {
|
||||
command = lib.mkDefault "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}";
|
||||
command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -10,16 +10,16 @@
|
|||
GIT=https://''${FLAKE//:/\.com\/}.git
|
||||
|
||||
if [ "$1" == "sync" ]; then
|
||||
sudo ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --flake $FLAKE#$HOST
|
||||
sudo ${lib.getExe pkgs.nixos-rebuild} switch --flake $FLAKE#$HOST
|
||||
exit 0;
|
||||
elif [ "$1" == "boot" ]; then
|
||||
bin/sudo ${pkgs.nixos-rebuild}/bin/nixos-rebuild boot --flake $FLAKE#$HOST
|
||||
sudo ${lib.getExe pkgs.nixos-rebuild} boot --flake $FLAKE#$HOST
|
||||
exit 0;
|
||||
elif [ "$1" == "gc" ]; then
|
||||
sudo ${pkgs.nix}/bin/nix-collect-garbage -d
|
||||
sudo ${lib.getExe' pkgs.nix "nix-collect-garbage"} -d
|
||||
exit 0;
|
||||
elif [ "$1" == "clone" ]; then
|
||||
${pkgs.git}/bin/git clone $GIT
|
||||
${lib.getExe pkgs.git} clone $GIT
|
||||
cd nixcfg
|
||||
exit 0;
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue