This commit is contained in:
Mars 2024-09-29 00:41:05 -04:00
parent 47f44bb546
commit 0b96cec4cb
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
10 changed files with 263 additions and 230 deletions

View file

@ -22,6 +22,7 @@
in {
agenix = mkInput "ryantm/agenix";
catppuccin = mkInput "catppuccin/nix";
cider = mkCustomUrl "flake:cider";
chaotic = mkInput "chaotic-cx/nyx/nyxpkgs-unstable";
emacs = mkCustomUrl "git+https://git.pupbrained.xyz/pupbrained/nixmacs.git";
hyprland = mkWithSubmodules "https://github.com/hyprwm/Hyprland";

View file

@ -108,10 +108,29 @@
"type": "github"
}
},
"cider": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"utils": "utils"
},
"locked": {
"lastModified": 1727581469,
"narHash": "sha256-y11dFQ/uPE1ActDZTVQqyDbkX9p1aT/9U7BW9NwLMLg=",
"ref": "refs/heads/main",
"rev": "26d7731f61e775205d159ac71369a761e61e9650",
"revCount": 3,
"type": "git",
"url": "file:///home/marshall/cider-flake"
},
"original": {
"id": "cider",
"type": "indirect"
}
},
"codeium": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_9"
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1727497393,
@ -219,7 +238,7 @@
"inputs": {
"emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_5",
"treefmt-nix": "treefmt-nix"
},
"locked": {
@ -239,7 +258,7 @@
"emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
@ -432,7 +451,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1710146030,
@ -488,7 +507,7 @@
},
"flake-utils_10": {
"inputs": {
"systems": "systems_11"
"systems": "systems_12"
},
"locked": {
"lastModified": 1726560853,
@ -506,7 +525,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1710146030,
@ -539,7 +558,7 @@
},
"flake-utils_4": {
"inputs": {
"systems": "systems_6"
"systems": "systems_7"
},
"locked": {
"lastModified": 1701680307,
@ -557,7 +576,7 @@
},
"flake-utils_5": {
"inputs": {
"systems": "systems_7"
"systems": "systems_8"
},
"locked": {
"lastModified": 1726560853,
@ -575,7 +594,7 @@
},
"flake-utils_6": {
"inputs": {
"systems": "systems_8"
"systems": "systems_9"
},
"locked": {
"lastModified": 1726560853,
@ -608,7 +627,7 @@
},
"flake-utils_8": {
"inputs": {
"systems": "systems_9"
"systems": "systems_10"
},
"locked": {
"lastModified": 1694529238,
@ -626,7 +645,7 @@
},
"flake-utils_9": {
"inputs": {
"systems": "systems_10"
"systems": "systems_11"
},
"locked": {
"lastModified": 1726560853,
@ -644,7 +663,7 @@
},
"flakegen": {
"inputs": {
"systems": "systems_4"
"systems": "systems_5"
},
"locked": {
"lastModified": 1707120544,
@ -695,7 +714,7 @@
},
"git-ignore-nix": {
"inputs": {
"nixpkgs": "nixpkgs_14"
"nixpkgs": "nixpkgs_15"
},
"locked": {
"lastModified": 1709087332,
@ -714,7 +733,7 @@
},
"git-ignore-nix_2": {
"inputs": {
"nixpkgs": "nixpkgs_16"
"nixpkgs": "nixpkgs_17"
},
"locked": {
"lastModified": 1709087332,
@ -875,8 +894,8 @@
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_6",
"systems": "systems_5",
"nixpkgs": "nixpkgs_7",
"systems": "systems_6",
"xdph": "xdph"
},
"locked": {
@ -1180,11 +1199,11 @@
]
},
"locked": {
"lastModified": 1726975622,
"narHash": "sha256-bPDZosnom0+02ywmMZAvmj7zvsQ6mVv/5kmvSgbTkaY=",
"lastModified": 1727580512,
"narHash": "sha256-gEWoJ+027OwsNs6f1GkDPrCxBFr5Vky7vWKjHRJi60s=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "c7515c2fdaf2e1f3f49856cef6cec95bb2138417",
"rev": "a2ab1588541ae442bd3a682f8f6bbcbca2672f10",
"type": "github"
},
"original": {
@ -1198,7 +1217,7 @@
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"libgit2": "libgit2",
"nixpkgs": "nixpkgs_7",
"nixpkgs": "nixpkgs_8",
"nixpkgs-regression": "nixpkgs-regression",
"pre-commit-hooks": "pre-commit-hooks"
},
@ -1296,6 +1315,22 @@
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1702346276,
"narHash": "sha256-eAQgwIWApFQ40ipeOjVSoK4TEHVd6nbSd9fApiHIw5A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cf28ee258fd5f9a52de6b9865cdb93a1f96d09b7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_11": {
"locked": {
"lastModified": 1727571603,
"narHash": "sha256-E/oHqQDtdeGNJk5k7QhyBNhe/ujxG8oF8aMP+iWyVuY=",
@ -1310,7 +1345,7 @@
"type": "github"
}
},
"nixpkgs_11": {
"nixpkgs_12": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
@ -1326,22 +1361,6 @@
"type": "github"
}
},
"nixpkgs_12": {
"locked": {
"lastModified": 1726871744,
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_13": {
"locked": {
"lastModified": 1726871744,
@ -1359,6 +1378,22 @@
}
},
"nixpkgs_14": {
"locked": {
"lastModified": 1726871744,
"narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_15": {
"locked": {
"lastModified": 1666603677,
"narHash": "sha256-apAEIj+z1iwMaMJ4tB21r/VTetfGDLDzuhXRHJknIAU=",
@ -1372,19 +1407,19 @@
"type": "indirect"
}
},
"nixpkgs_15": {
"locked": {
"lastModified": 0,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"path": "/nix/store/fpivx4sjcp2vk4rp9nhliln5cwcp3kc6-source",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_16": {
"locked": {
"lastModified": 0,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"path": "/nix/store/fpivx4sjcp2vk4rp9nhliln5cwcp3kc6-source",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_17": {
"locked": {
"lastModified": 1666603677,
"narHash": "sha256-apAEIj+z1iwMaMJ4tB21r/VTetfGDLDzuhXRHJknIAU=",
@ -1398,7 +1433,7 @@
"type": "indirect"
}
},
"nixpkgs_17": {
"nixpkgs_18": {
"locked": {
"lastModified": 0,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
@ -1410,7 +1445,7 @@
"type": "indirect"
}
},
"nixpkgs_18": {
"nixpkgs_19": {
"locked": {
"lastModified": 1725634671,
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
@ -1444,16 +1479,15 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1723175592,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
"lastModified": 1727578844,
"narHash": "sha256-jSOjzPHgYlHF6znZEztlchrgCrHIyky2qvOBIjtqZ40=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
"rev": "3a6faa876e1e28b60e196a761850ff4dde5c8371",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -1475,6 +1509,22 @@
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1723175592,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1720957393,
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
@ -1490,7 +1540,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_7": {
"locked": {
"lastModified": 1727122398,
"narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=",
@ -1506,7 +1556,7 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_8": {
"locked": {
"lastModified": 1709083642,
"narHash": "sha256-7kkJQd4rZ+vFrzWu8sTRtta5D1kBG0LSRYAfhtmMlSo=",
@ -1522,7 +1572,7 @@
"type": "github"
}
},
"nixpkgs_8": {
"nixpkgs_9": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
@ -1538,36 +1588,20 @@
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1702346276,
"narHash": "sha256-eAQgwIWApFQ40ipeOjVSoK4TEHVd6nbSd9fApiHIw5A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cf28ee258fd5f9a52de6b9865cdb93a1f96d09b7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"codeium": "codeium",
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_10",
"nixpkgs": "nixpkgs_11",
"nixvim": "nixvim_2",
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
"lastModified": 1727572524,
"narHash": "sha256-k77DTaj7KZpmtnIq8fn3ERT4B9RPTi8SbwQwcYsRrQM=",
"lastModified": 1727576675,
"narHash": "sha256-XJgdI3xnYjgBKZK8qefS7X6x+9rUMdTEa2jrapbaBig=",
"owner": "pupbrained",
"repo": "nvim-config",
"rev": "071ff4950f4abde59215cd8017ac7ac90178a662",
"rev": "ebaf7cc8b70c4bc241d47cc1a4ecf0a72c81b2d0",
"type": "github"
},
"original": {
@ -1584,7 +1618,7 @@
"git-hooks": "git-hooks",
"home-manager": "home-manager_4",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_11",
"nixpkgs": "nixpkgs_12",
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix_2"
},
@ -1662,6 +1696,7 @@
"agenix": "agenix",
"catppuccin": "catppuccin",
"chaotic": "chaotic",
"cider": "cider",
"cosmic": "cosmic",
"darwin": "darwin_2",
"emacs": "emacs",
@ -1673,7 +1708,7 @@
"nix-colors": "nix-colors",
"nix-index-database": "nix-index-database",
"nix-super": "nix-super",
"nixpkgs": "nixpkgs_8",
"nixpkgs": "nixpkgs_9",
"nixvim": "nixvim",
"snowfall-flake": "snowfall-flake",
"snowfall-lib": "snowfall-lib_2",
@ -1834,6 +1869,21 @@
"type": "github"
}
},
"systems_12": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
@ -1880,21 +1930,6 @@
}
},
"systems_5": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -1909,6 +1944,21 @@
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_7": {
"locked": {
"lastModified": 1681028828,
@ -1956,7 +2006,7 @@
},
"treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1723454642,
@ -1996,7 +2046,7 @@
},
"treefmt-nix_3": {
"inputs": {
"nixpkgs": "nixpkgs_12"
"nixpkgs": "nixpkgs_13"
},
"locked": {
"lastModified": 1727431250,
@ -2014,7 +2064,7 @@
},
"treefmt-nix_4": {
"inputs": {
"nixpkgs": "nixpkgs_13"
"nixpkgs": "nixpkgs_14"
},
"locked": {
"lastModified": 1727431250,
@ -2046,6 +2096,24 @@
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": "hyprland-protocols_2",
@ -2088,7 +2156,7 @@
"inputs": {
"flake-utils": "flake-utils_10",
"git-ignore-nix": "git-ignore-nix_2",
"nixpkgs": "nixpkgs_17",
"nixpkgs": "nixpkgs_18",
"unstable": "unstable"
},
"locked": {
@ -2109,7 +2177,7 @@
"inputs": {
"flake-utils": "flake-utils_9",
"git-ignore-nix": "git-ignore-nix",
"nixpkgs": "nixpkgs_15",
"nixpkgs": "nixpkgs_16",
"xmonad": "xmonad"
},
"locked": {
@ -2128,7 +2196,7 @@
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_18"
"nixpkgs": "nixpkgs_19"
},
"locked": {
"lastModified": 1727248177,

View file

@ -4,6 +4,7 @@
agenix.url = "github:ryantm/agenix";
catppuccin.url = "github:catppuccin/nix";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
cider.url = "flake:cider";
cosmic = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:lilyinstarlight/nixos-cosmic";

View file

@ -3,7 +3,84 @@
pkgs,
inputs,
...
}: {
}: let
equibop = with pkgs; (vesktop.overrideAttrs (final: prev: rec {
pname = "Equibop";
version = "2.0.9";
src = fetchFromGitHub {
owner = "Equicord";
repo = "equibop";
rev = "v${version}";
hash = "sha256-imRqr6Gd29t/zFcH73JRJIMozEhig1lHXLyefgB74yM=";
};
pnpmDeps = pnpm_9.fetchDeps {
inherit
(final)
pname
version
src
;
inherit (prev) patches;
hash = "sha256-YaZA1Oz9lJcEm9Ihx37Iooc7l6Zsy65kYAK2KWffh/c=";
};
installPhase =
''
runHook preInstall
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
mkdir -p $out/opt/Equibop
cp -r dist/*unpacked/resources $out/opt/Equibop/
for file in build/icon_*x32.png; do
file_suffix=''${file//build\/icon_}
install -Dm0644 $file $out/share/icons/hicolor/''${file_suffix//x32.png}/apps/equibop.png
done
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/{Applications,bin}
mv dist/mac*/Equibop.App $out/Applications
''
+ ''
runHook postInstall
'';
postFixup =
lib.optionalString stdenv.hostPlatform.isLinux ''
makeWrapper ${electron}/bin/electron $out/bin/equibop \
--add-flags $out/opt/Equibop/resources/app.asar \
--add-flags \"--enable-speech-dispatcher\" \
--add-flags \"--enable-blink-features=MiddleClickAutoscroll\" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime}}"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
makeWrapper $out/Applications/equicord.app/Contents/MacOS/Equibop $out/bin/equibop
'';
desktopItems = lib.optional stdenv.hostPlatform.isLinux (makeDesktopItem {
name = "equibop";
desktopName = "Equibop";
exec = "equibop %U";
icon = "equibop";
startupWMClass = "Equibop";
genericName = "Internet Messenger";
keywords = [
"discord"
"vencord"
"electron"
"chat"
"equicord"
];
categories = [
"Network"
"InstantMessaging"
"Chat"
];
});
}));
in {
imports = with inputs; [
catppuccin.homeManagerModules.catppuccin
chaotic.homeManagerModules.default
@ -29,6 +106,7 @@
beeper
duf
eternal-terminal
equibop
glow
grc
jamesdsp
@ -44,7 +122,6 @@
slack
telegram-desktop
xdotool
zed-editor
(xwinwrap.overrideAttrs {
src = fetchFromGitHub {
owner = "camonater62";
@ -62,16 +139,8 @@
mv xwinwrap $out/bin
'';
})
vesktop
youki
(pkgs.buildFHSUserEnv {
name = "zed";
targetPkgs = pkgs:
with pkgs; [
zed-editor
];
runScript = "zed";
})
]
++ (with jetbrains; [
clion
@ -80,12 +149,10 @@
idea-ultimate
])
++ (with inputs; [
cider.packages.${pkgs.system}.default
nixvim.packages.${pkgs.system}.default
zen-browser.packages.${pkgs.system}.specific
])
++ (with inputs.chaotic.packages.${pkgs.system}; [
distrobox_git
firefox_nightly
chaotic.packages.${pkgs.system}.distrobox_git
]);
stateVersion = "24.05";

View file

@ -11,7 +11,7 @@ with pkgs; {
];
wayland.windowManager.hyprland = {
enable = true;
enable = false;
systemd.variables = ["--all"];
settings = let

View file

@ -1,7 +1,7 @@
{...}: {
services = {
cliphist.enable = true;
udiskie.enable = true;
udiskie.enable = false;
swaync = {
enable = true;

View file

@ -8,7 +8,7 @@
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
in {
programs.waybar = {
enable = true;
enable = false;
package = pkgs.waybar;
settings = [
{

View file

@ -9,6 +9,7 @@ with pkgs; {
aliases.pushall = "!git remote | xargs -L1 git push";
delta.enable = true;
signing.signByDefault = true;
lfs.enable = true;
extraConfig = {
init.defaultBranch = "main";

View file

@ -1,110 +0,0 @@
{pkgs, ...}:
with pkgs; {
boot.binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
systemd.user.services.appimage-menu-updater = let
appimage-menu-update = writeShellScript "appimage-menu-updater.sh" ''
shopt -s nullglob
remove_old_files () {
for path in "$HOME"/.local/share/applications/appimage-menu-updater*; do
rm "$path"
done
for path in "$HOME"/.local/share/icons/hicolor/appimage-menu-updater*; do
rm "$path"
done
}
update_each () {
path="$1"
file="$2"
echo "found $file"
desktop_source=$(${p7zip.outPath}/bin/7z l -ba -slt "$path" | grep '\.desktop$' | head -n1 | sed --expression 's/Path = //')
desktop_target="$HOME/.local/share/applications/appimage-menu-updater-$file.desktop"
${p7zip.outPath}/bin/7z e "$path" "$desktop_source" -y -so > "$desktop_target"
sed -i "s@Exec=.*@Exec=${appimage-run.outPath}/bin/appimage-run $path@" "$desktop_target"
update_icon "$path" "$desktop_target"
}
update_icon () {
path="$1"
desktop_target="$2"
echo "updating icon"
icon_link_proto_source=$(grep Icon= "$desktop_target" | head -n1 | sed 's/Icon=//')
icon_link_source=$(${p7zip.outPath}/bin/7z l -ba -slt "$path" | grep -e "Path = $icon_link_proto_source.\(png\|svg\)" | head -n1 | sed 's/Path = //')
if [[ "$icon_link_source" ]]; then
tempdir=$(mktemp -d)
${p7zip.outPath}/bin/7z x "$path" "$icon_link_source" -o"$tempdir" >/dev/null
icon_temp_maybe_link=$(find "$tempdir"/* | head -n1)
if [[ -L "$icon_temp_maybe_link" ]]; then
icon_source=$(readlink "$icon_temp_maybe_link")
if [[ "$icon_source" ]]; then
${p7zip.outPath}/bin/7z x "$path" "$icon_source" -y -o"$tempdir"
if [[ -f "$tempdir/$icon_source" ]]; then
icon_temp_source=$tempdir/$icon_source
else
echo 'icon link target does not exists'
fi
else
echo 'icon link is invalid'
fi
else
icon_temp_source=$icon_temp_maybe_link
fi
if [[ "$icon_temp_source" ]]; then
icon_target="$HOME/.local/share/icons/hicolor/appimage-menu-updater-"$(basename "$icon_temp_source")
mv "$icon_temp_source" "$icon_target"
sed -i "s@Icon=.*@Icon=$icon_target@" "$desktop_target"
fi
rm -Rf "$tempdir"
else
echo 'icon file not found'
fi
}
update () {
echo 'updating...'
remove_old_files
for path in "$HOME"/Applications/*.AppImage; do
update_each "$path" $(basename "$path")
done
}
mkdir -p "$HOME/Applications"
update
while ${inotify-tools.outPath}/bin/inotifywait -e modify,delete,moved_to,moved_from "$HOME"/Applications; do
update
done
'';
in {
enable = true;
description = "AppImage Menu Updater";
unitConfig = {
Type = "simple";
};
serviceConfig = {
ExecStart = "/bin/sh -c 'HOME=%h ${appimage-menu-update}'";
};
wantedBy = ["default.target"];
};
}

View file

@ -251,8 +251,13 @@
gnupg.agent.enable = true;
virt-manager.enable = true;
hyprland = {
appimage = {
enable = true;
binfmt = true;
};
hyprland = {
enable = false;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};