getexe
This commit is contained in:
@@ -18,7 +18,7 @@ in
|
|||||||
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00'';
|
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'';
|
mask = ''\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'';
|
||||||
openBinary = true;
|
openBinary = true;
|
||||||
interpreter = "${pkgs.box64}/bin/box64";
|
interpreter = "${lib.getExe pkgs.box64}";
|
||||||
preserveArgvZero = true;
|
preserveArgvZero = true;
|
||||||
matchCredentials = true;
|
matchCredentials = true;
|
||||||
fixBinary = false;
|
fixBinary = false;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, namespace, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
inherit (lib.${namespace}) mkOpt;
|
inherit (lib.${namespace}) mkOpt;
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ let
|
|||||||
ln -sf "$IMG_PATH" /run/wallpaper.jpg
|
ln -sf "$IMG_PATH" /run/wallpaper.jpg
|
||||||
|
|
||||||
# Try to download new wallpaper
|
# Try to download new wallpaper
|
||||||
if ${pkgs.curl}/bin/curl -s --connect-timeout 5 --max-time 10 "https://www.bing.com" > /dev/null; then
|
if ${lib.getExe pkgs.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" | \
|
URL=$(${lib.getExe pkgs.curl} -s "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1" | \
|
||||||
${pkgs.jq}/bin/jq -r '.images[0].url')
|
${lib.getExe pkgs.jq} -r '.images[0].url')
|
||||||
FULL_URL="https://www.bing.com$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"
|
mv "$IMG_PATH.tmp" "$IMG_PATH"
|
||||||
echo "Downloaded $FULL_URL to $IMG_PATH successfully"
|
echo "Downloaded $FULL_URL to $IMG_PATH successfully"
|
||||||
else
|
else
|
||||||
@@ -73,10 +73,10 @@ let
|
|||||||
ln -sf "$IMG_PATH" /run/wallpaper.jpg
|
ln -sf "$IMG_PATH" /run/wallpaper.jpg
|
||||||
|
|
||||||
# Try to download new wallpaper
|
# 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"
|
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')
|
IMAGE_URL=$(${lib.getExe pkgs.curl} -s "$APOD_URL" | ${lib.getExe pkgs.jq} -r '.hdurl // .url')
|
||||||
if ${pkgs.curl}/bin/curl -s -o "$IMG_PATH.tmp" "$IMAGE_URL"; then
|
if ${lib.getExe pkgs.curl} -s -o "$IMG_PATH.tmp" "$IMAGE_URL"; then
|
||||||
mv "$IMG_PATH.tmp" "$IMG_PATH"
|
mv "$IMG_PATH.tmp" "$IMG_PATH"
|
||||||
echo "Downloaded $IMAGE_URL to $IMG_PATH successfully"
|
echo "Downloaded $IMAGE_URL to $IMG_PATH successfully"
|
||||||
else
|
else
|
||||||
@@ -149,7 +149,7 @@ in
|
|||||||
];
|
];
|
||||||
script = ''
|
script = ''
|
||||||
${wallpaper-command}
|
${wallpaper-command}
|
||||||
${pkgs.hyprland}/bin/hyprctl hyprpaper reload ,${cfg.wallpaper}
|
${lib.getExe' pkgs.hyprland "hyprctl"} hyprpaper reload ,${cfg.wallpaper}
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ in
|
|||||||
after = [ "dev-ttyAMA0.device" ];
|
after = [ "dev-ttyAMA0.device" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -16,15 +16,15 @@
|
|||||||
{
|
{
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
command = "${pkgs.systemd}/bin/systemctl suspend";
|
command = "${lib.getExe' pkgs.systemd "systemctl"} suspend";
|
||||||
options = [ "NOPASSWD" ];
|
options = [ "NOPASSWD" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "${pkgs.systemd}/bin/reboot";
|
command = "${lib.getExe' pkgs.systemd "reboot"}";
|
||||||
options = [ "NOPASSWD" ];
|
options = [ "NOPASSWD" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "${pkgs.systemd}/bin/poweroff";
|
command = "${lib.getExe' pkgs.systemd "poweroff"}";
|
||||||
options = [ "NOPASSWD" ];
|
options = [ "NOPASSWD" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ in
|
|||||||
actual = {
|
actual = {
|
||||||
environment.ACTUAL_CONFIG_PATH = lib.mkForce "${dataDir}/config.json";
|
environment.ACTUAL_CONFIG_PATH = lib.mkForce "${dataDir}/config.json";
|
||||||
serviceConfig = {
|
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;
|
WorkingDirectory = lib.mkForce dataDir;
|
||||||
StateDirectory = lib.mkForce dataDir;
|
StateDirectory = lib.mkForce dataDir;
|
||||||
StateDirectoryMode = lib.mkForce 700;
|
StateDirectoryMode = lib.mkForce 700;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Enable AppImage
|
# Enable AppImage
|
||||||
binfmt.registrations.appimage = {
|
binfmt.registrations.appimage = {
|
||||||
wrapInterpreterInShell = lib.mkDefault false;
|
wrapInterpreterInShell = lib.mkDefault false;
|
||||||
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
interpreter = "${lib.getExe pkgs.appimage-run}/bin/appimage-run";
|
||||||
recognitionType = "magic";
|
recognitionType = "magic";
|
||||||
offset = 0;
|
offset = 0;
|
||||||
mask = "\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\xff\\xff\\xff";
|
mask = "\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\xff\\xff\\xff";
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ in
|
|||||||
GNUPGHOME = "%h/.gnupg";
|
GNUPGHOME = "%h/.gnupg";
|
||||||
PASSWORD_STORE_DIR = "%h/.password-store";
|
PASSWORD_STORE_DIR = "%h/.password-store";
|
||||||
};
|
};
|
||||||
script = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
|
script = "${lib.getExe pkgs.protonmail-bridge} --noninteractive";
|
||||||
path = with pkgs; [
|
path = with pkgs; [
|
||||||
gnome-keyring
|
gnome-keyring
|
||||||
gnupg
|
gnupg
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
|
|||||||
};
|
};
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
${pkgs.unzip}/bin/unzip -q $src
|
${lib.getExe pkgs.unzip} -q $src
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
# 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.
|
# 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.
|
# An instance of `pkgs` with your overlays and packages applied is also available.
|
||||||
pkgs,
|
pkgs,
|
||||||
# # You also have access to your flake's inputs.
|
# # You also have access to your flake's inputs.
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
GDK_SCALE = "1";
|
GDK_SCALE = "1";
|
||||||
EDITOR = "${pkgs.vscodium}/bin/codium --wait";
|
EDITOR = "${lib.getExe' pkgs.vscodium "codium"} --wait";
|
||||||
VISUAL = "${pkgs.vscodium}/bin/codium --wait";
|
VISUAL = "${lib.getExe' pkgs.vscodium "codium"} --wait";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
kernel = pkgs.linuxPackages_cachyos;
|
kernel = pkgs.linuxPackages_cachyos;
|
||||||
in
|
in
|
||||||
@@ -13,7 +13,7 @@ in
|
|||||||
enable = false;
|
enable = false;
|
||||||
configurationLimit = 5;
|
configurationLimit = 5;
|
||||||
extraInstallCommands = ''
|
extraInstallCommands = ''
|
||||||
${pkgs.uutils-coreutils}/bin/uutils-echo "timeout 0
|
${lib.getExe' pkgs.uutils-coreutils "uutils-echo"} "timeout 0
|
||||||
console-mode 1
|
console-mode 1
|
||||||
default nixos-*" > /boot/loader/loader.conf
|
default nixos-*" > /boot/loader/loader.conf
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user