This commit is contained in:
mjallen18
2025-09-02 21:22:10 -05:00
parent 0691806032
commit 57a079a86f
11 changed files with 23 additions and 23 deletions

View File

@@ -18,7 +18,7 @@ in
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00'';
mask = ''\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'';
openBinary = true;
interpreter = "${pkgs.box64}/bin/box64";
interpreter = "${lib.getExe pkgs.box64}";
preserveArgvZero = true;
matchCredentials = true;
fixBinary = false;

View File

@@ -1,4 +1,4 @@
{ lib, pkgs, ... }:
{ lib, pkgs, namespace, ... }:
with lib;
let
inherit (lib.${namespace}) mkOpt;

View File

@@ -37,11 +37,11 @@ let
ln -sf "$IMG_PATH" /run/wallpaper.jpg
# Try to download new wallpaper
if ${pkgs.curl}/bin/curl -s --connect-timeout 5 --max-time 10 "https://www.bing.com" > /dev/null; then
URL=$(${pkgs.curl}/bin/curl -s "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1" | \
${pkgs.jq}/bin/jq -r '.images[0].url')
if ${lib.getExe pkgs.curl} -s --connect-timeout 5 --max-time 10 "https://www.bing.com" > /dev/null; then
URL=$(${lib.getExe pkgs.curl} -s "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1" | \
${lib.getExe pkgs.jq} -r '.images[0].url')
FULL_URL="https://www.bing.com$URL"
if ${pkgs.curl}/bin/curl -s -o "$IMG_PATH.tmp" "$FULL_URL"; then
if ${lib.getExe pkgs.curl} -s -o "$IMG_PATH.tmp" "$FULL_URL"; then
mv "$IMG_PATH.tmp" "$IMG_PATH"
echo "Downloaded $FULL_URL to $IMG_PATH successfully"
else
@@ -73,10 +73,10 @@ let
ln -sf "$IMG_PATH" /run/wallpaper.jpg
# Try to download new wallpaper
if ${pkgs.curl}/bin/curl -s --connect-timeout 5 --max-time 10 "https://api.nasa.gov" > /dev/null; then
if ${lib.getExe pkgs.curl} -s --connect-timeout 5 --max-time 10 "https://api.nasa.gov" > /dev/null; then
APOD_URL="https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY"
IMAGE_URL=$(${pkgs.curl}/bin/curl -s "$APOD_URL" | ${pkgs.jq}/bin/jq -r '.hdurl // .url')
if ${pkgs.curl}/bin/curl -s -o "$IMG_PATH.tmp" "$IMAGE_URL"; then
IMAGE_URL=$(${lib.getExe pkgs.curl} -s "$APOD_URL" | ${lib.getExe pkgs.jq} -r '.hdurl // .url')
if ${lib.getExe pkgs.curl} -s -o "$IMG_PATH.tmp" "$IMAGE_URL"; then
mv "$IMG_PATH.tmp" "$IMG_PATH"
echo "Downloaded $IMAGE_URL to $IMG_PATH successfully"
else
@@ -149,7 +149,7 @@ in
];
script = ''
${wallpaper-command}
${pkgs.hyprland}/bin/hyprctl hyprpaper reload ,${cfg.wallpaper}
${lib.getExe' pkgs.hyprland "hyprctl"} hyprpaper reload ,${cfg.wallpaper}
'';
serviceConfig = {
Type = "oneshot";

View File

@@ -44,7 +44,7 @@ in
after = [ "dev-ttyAMA0.device" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.bluez}/bin/btattach -B /dev/ttyAMA0 -P bcm -S 3000000";
ExecStart = "${lib.getExe' pkgs.bluez "btattach"} -B /dev/ttyAMA0 -P bcm -S 3000000";
};
};

View File

@@ -16,15 +16,15 @@
{
commands = [
{
command = "${pkgs.systemd}/bin/systemctl suspend";
command = "${lib.getExe' pkgs.systemd "systemctl"} suspend";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.systemd}/bin/reboot";
command = "${lib.getExe' pkgs.systemd "reboot"}";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.systemd}/bin/poweroff";
command = "${lib.getExe' pkgs.systemd "poweroff"}";
options = [ "NOPASSWD" ];
}
];

View File

@@ -73,7 +73,7 @@ in
actual = {
environment.ACTUAL_CONFIG_PATH = lib.mkForce "${dataDir}/config.json";
serviceConfig = {
ExecStart = lib.mkForce "${pkgs.actual-server}/bin/actual-server --config ${dataDir}/config.json";
ExecStart = lib.mkForce "${lib.getExe pkgs.actual-server} --config ${dataDir}/config.json";
WorkingDirectory = lib.mkForce dataDir;
StateDirectory = lib.mkForce dataDir;
StateDirectoryMode = lib.mkForce 700;

View File

@@ -4,7 +4,7 @@
# Enable AppImage
binfmt.registrations.appimage = {
wrapInterpreterInShell = lib.mkDefault false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
interpreter = "${lib.getExe pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = "\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\xff\\xff\\xff";

View File

@@ -41,7 +41,7 @@ in
GNUPGHOME = "%h/.gnupg";
PASSWORD_STORE_DIR = "%h/.password-store";
};
script = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
script = "${lib.getExe pkgs.protonmail-bridge} --noninteractive";
path = with pkgs; [
gnome-keyring
gnupg

View File

@@ -21,7 +21,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
};
unpackPhase = ''
${pkgs.unzip}/bin/unzip -q $src
${lib.getExe pkgs.unzip} -q $src
'';
meta = with lib; {

View File

@@ -1,7 +1,7 @@
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
{
# as well as the libraries available from your flake's inputs.
# lib,
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# # You also have access to your flake's inputs.
@@ -60,7 +60,7 @@
environment.variables = {
GDK_SCALE = "1";
EDITOR = "${pkgs.vscodium}/bin/codium --wait";
VISUAL = "${pkgs.vscodium}/bin/codium --wait";
EDITOR = "${lib.getExe' pkgs.vscodium "codium"} --wait";
VISUAL = "${lib.getExe' pkgs.vscodium "codium"} --wait";
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:
let
kernel = pkgs.linuxPackages_cachyos;
in
@@ -13,7 +13,7 @@ in
enable = false;
configurationLimit = 5;
extraInstallCommands = ''
${pkgs.uutils-coreutils}/bin/uutils-echo "timeout 0
${lib.getExe' pkgs.uutils-coreutils "uutils-echo"} "timeout 0
console-mode 1
default nixos-*" > /boot/loader/loader.conf
'';