├── .forgejo └── workflows │ └── discord.yml ├── .gitattributes ├── .gitignore ├── LICENSE.md ├── README.md ├── _outputs.nix ├── apps ├── README.md ├── buildApp.nix ├── config │ ├── .envrc │ ├── eslint.config.ts │ ├── index.ts │ ├── package-lock.json │ ├── package.json │ ├── tsconfig.base.json │ └── tsconfig.json ├── default.nix ├── extract-subs │ ├── .envrc │ ├── default.nix │ ├── eslint.config.ts │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── app.ts │ │ ├── ffprobe.ts │ │ └── lang-codes.ts │ └── tsconfig.json ├── gen-docs │ ├── default.nix │ ├── getAttrsMeta.nix │ ├── getConfigMeta.nix │ ├── getPackageMeta.nix │ ├── getScopesMeta.nix │ ├── script.sh │ └── templates │ │ ├── apps.md │ │ ├── configurations.md │ │ ├── devShells.md │ │ ├── homeManagerModules.md │ │ ├── modules.md │ │ ├── overlays.md │ │ ├── packages.md │ │ └── scopedPackages.md ├── list2series │ ├── .envrc │ ├── .gitignore │ ├── default.nix │ ├── eslint.config.ts │ ├── lists.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── app.ts │ │ └── types.ts │ └── tsconfig.json ├── mc-mods │ ├── .envrc │ ├── default.nix │ ├── eslint.config.ts │ ├── package-lock.json │ ├── package.json │ ├── src │ │ └── app.ts │ └── tsconfig.json ├── packages.nix ├── pin-inputs │ ├── .envrc │ ├── default.nix │ ├── eslint.config.ts │ ├── package-lock.json │ ├── package.json │ ├── src │ │ └── app.ts │ └── tsconfig.json └── update-sources │ ├── .envrc │ ├── default.nix │ ├── eslint.config.ts │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app.ts │ ├── caddy.ts │ ├── docker.ts │ ├── firefox.ts │ ├── flake.ts │ ├── lib.ts │ ├── netdaemon.ts │ ├── nix-update.ts │ ├── node-modules.ts │ └── vuetorrent.ts │ └── tsconfig.json ├── configurations ├── README.md ├── android │ ├── default.nix │ └── nix-on-droid.nix ├── bbsteamie │ ├── default.nix │ ├── hardware-configuration.nix │ └── modules │ │ ├── default.nix │ │ └── desktop │ │ ├── default.nix │ │ ├── install_palia_map.md │ │ ├── session-switching.nix │ │ └── steam.nix ├── binto │ ├── default.nix │ ├── hardware-configuration.nix │ └── modules │ │ ├── default.nix │ │ ├── gpu-replay │ │ └── default.nix │ │ └── nix-gaming │ │ └── default.nix ├── cluster │ ├── default.nix │ ├── hardware-configuration.nix │ └── modules │ │ ├── blocky │ │ └── default.nix │ │ ├── caddy │ │ ├── default.nix │ │ └── plugins.nix │ │ ├── default.nix │ │ ├── headscale │ │ └── default.nix │ │ ├── nfs-client │ │ └── default.nix │ │ ├── pcsd │ │ └── default.nix │ │ ├── searxng │ │ ├── default.nix │ │ └── logo.png │ │ └── unbound │ │ └── default.nix ├── homie │ ├── default.nix │ ├── hardware-configuration.nix │ └── modules │ │ ├── androidtv │ │ └── default.nix │ │ ├── default.nix │ │ ├── home-assistant │ │ ├── assist.nix │ │ ├── bluetooth.nix │ │ ├── default.nix │ │ ├── docs │ │ │ ├── functions.nix │ │ │ └── prompt │ │ ├── firmware.nix │ │ ├── frontend.nix │ │ ├── netdaemon │ │ │ ├── .editorconfig │ │ │ ├── .envrc │ │ │ ├── .gitignore │ │ │ ├── .version │ │ │ ├── HomeAssistantGenerated │ │ │ ├── apps │ │ │ │ ├── Frontend │ │ │ │ │ └── BathroomLight │ │ │ │ │ │ └── BathroomLight.cs │ │ │ │ ├── Spotify │ │ │ │ │ ├── PauseUnpause │ │ │ │ │ │ └── PauseUnpause.cs │ │ │ │ │ ├── PlayAlbum │ │ │ │ │ │ └── PlayAlbum.cs │ │ │ │ │ ├── PlayArtist │ │ │ │ │ │ └── PlayArtist.cs │ │ │ │ │ ├── PlayPlaylist │ │ │ │ │ │ └── PlayPlaylist.cs │ │ │ │ │ ├── PlaySong │ │ │ │ │ │ └── PlaySong.cs │ │ │ │ │ └── Types │ │ │ │ │ │ ├── GetArtistAlbumsResponse.cs │ │ │ │ │ │ ├── Main.cs │ │ │ │ │ │ ├── PlaylistResponse.cs │ │ │ │ │ │ ├── SearchAlbumsResponse.cs │ │ │ │ │ │ ├── SearchArtistsResponse.cs │ │ │ │ │ │ └── SearchTracksResponse.cs │ │ │ │ └── Timer │ │ │ │ │ └── Setup │ │ │ │ │ └── Setup.cs │ │ │ ├── appsettings.json │ │ │ ├── default.nix │ │ │ ├── deps.json │ │ │ ├── images │ │ │ │ └── netdaemon.nix │ │ │ ├── netdaemon.csproj │ │ │ ├── package.nix │ │ │ ├── program.cs │ │ │ └── update.nix │ │ ├── spotify │ │ │ ├── default.nix │ │ │ └── sentences.nix │ │ ├── timer │ │ │ ├── default.nix │ │ │ └── sentences.nix │ │ └── zigbee.nix │ │ └── music │ │ └── default.nix ├── live-image │ └── default.nix ├── nos │ ├── default.nix │ ├── hardware-configuration.nix │ └── modules │ │ ├── comics │ │ ├── default.nix │ │ ├── jdownloader2 │ │ │ ├── default.nix │ │ │ └── images │ │ │ │ └── jdownloader2.nix │ │ ├── kapowarr │ │ │ ├── default.nix │ │ │ └── module.nix │ │ └── komga │ │ │ └── default.nix │ │ ├── default.nix │ │ ├── docker │ │ ├── default.nix │ │ ├── forgejo │ │ │ ├── compose.nix │ │ │ └── images │ │ │ │ ├── act_runner.nix │ │ │ │ ├── forgejo.nix │ │ │ │ └── postgres.nix │ │ ├── freshrss │ │ │ ├── compose.nix │ │ │ └── images │ │ │ │ ├── freshrss.nix │ │ │ │ ├── postgres.nix │ │ │ │ └── rss-bridge.nix │ │ ├── gameyfin │ │ │ ├── compose.nix │ │ │ └── images │ │ │ │ └── gameyfin.nix │ │ ├── hauk │ │ │ ├── compose.nix │ │ │ ├── config.php │ │ │ └── images │ │ │ │ └── hauk.nix │ │ ├── immich │ │ │ ├── .gitignore │ │ │ ├── compose.nix │ │ │ ├── env │ │ │ └── images │ │ │ │ ├── machine-learning.nix │ │ │ │ ├── postgres.nix │ │ │ │ ├── redis.nix │ │ │ │ └── server.nix │ │ ├── media │ │ │ ├── bazarr │ │ │ │ ├── compose.nix │ │ │ │ └── images │ │ │ │ │ └── bazarr.nix │ │ │ ├── jellystat │ │ │ │ ├── compose.nix │ │ │ │ └── images │ │ │ │ │ ├── jellystat.nix │ │ │ │ │ └── postgres.nix │ │ │ ├── joal │ │ │ │ ├── compose.nix │ │ │ │ └── images │ │ │ │ │ └── joal.nix │ │ │ ├── prowlarr │ │ │ │ ├── compose.nix │ │ │ │ └── images │ │ │ │ │ ├── flaresolverr.nix │ │ │ │ │ └── prowlarr.nix │ │ │ ├── radarr │ │ │ │ ├── compose.nix │ │ │ │ └── images │ │ │ │ │ └── radarr.nix │ │ │ ├── seerr │ │ │ │ ├── compose.nix │ │ │ │ └── images │ │ │ │ │ └── jellyseerr.nix │ │ │ └── sonarr │ │ │ │ ├── compose.nix │ │ │ │ └── images │ │ │ │ └── sonarr.nix │ │ ├── music │ │ │ └── jbots │ │ │ │ ├── compose.nix │ │ │ │ └── images │ │ │ │ └── jmusicbot.nix │ │ ├── nextcloud │ │ │ ├── compose.nix │ │ │ ├── images │ │ │ │ ├── nextcloud.nix │ │ │ │ ├── nginx.nix │ │ │ │ ├── onlyoffice.nix │ │ │ │ ├── postgres.nix │ │ │ │ └── redis.nix │ │ │ └── nginx.conf │ │ ├── resume │ │ │ ├── compose.nix │ │ │ └── images │ │ │ │ ├── postgres.nix │ │ │ │ ├── resume-client.nix │ │ │ │ └── resume-server.nix │ │ ├── vaultwarden │ │ │ ├── compose.nix │ │ │ └── images │ │ │ │ └── vaultwarden.nix │ │ └── wg-easy │ │ │ ├── compose.nix │ │ │ └── images │ │ │ └── wg-easy.nix │ │ ├── homepage │ │ └── default.nix │ │ ├── jellyfin │ │ ├── default.nix │ │ ├── images │ │ │ └── jfa-go.nix │ │ └── jfa-go.nix │ │ ├── llm │ │ └── default.nix │ │ ├── mergerfs │ │ └── default.nix │ │ ├── qbittorrent │ │ ├── default.nix │ │ ├── qbittorrent.nix │ │ ├── vuetorrent.nix │ │ └── wireguard.nix │ │ ├── snapraid │ │ └── default.nix │ │ └── subtitles │ │ ├── convert.nix │ │ ├── default.nix │ │ └── syncing.nix ├── servivi │ ├── default.nix │ ├── hardware-configuration.nix │ └── modules │ │ ├── 7-days-to-die │ │ └── default.nix │ │ ├── binary-cache │ │ └── default.nix │ │ ├── default.nix │ │ ├── minecraft │ │ └── default.nix │ │ ├── nfs │ │ └── default.nix │ │ └── pr-tracker │ │ └── default.nix └── wim │ ├── default.nix │ ├── hardware-configuration.nix │ └── modules │ ├── default.nix │ └── security │ └── default.nix ├── devShells ├── README.md ├── default.nix ├── flake │ └── default.nix ├── neovim-shells │ └── default.nix ├── netdaemon │ └── default.nix ├── node │ └── default.nix └── subtitle-dev │ └── default.nix ├── flake.lock ├── flake.nix ├── homeManagerModules ├── README.md ├── default.nix ├── firefox │ ├── custom-css │ │ ├── default.nix │ │ └── style.scss │ ├── default.nix │ └── non-declarative-conf │ │ └── ffz-settings (2025-3-22).json ├── neovim │ ├── .editorconfig │ ├── .luarc.json │ ├── config │ │ └── mini.lua │ ├── default.nix │ ├── git │ │ └── default.nix │ ├── langs │ │ ├── bash │ │ │ └── default.nix │ │ ├── c-lang │ │ │ ├── default.nix │ │ │ └── shell.nix │ │ ├── config │ │ │ └── cmp.lua │ │ ├── csharp │ │ │ ├── default.nix │ │ │ └── shell.nix │ │ ├── default.nix │ │ ├── golang │ │ │ ├── default.nix │ │ │ └── shell.nix │ │ ├── hyprlang │ │ │ └── default.nix │ │ ├── java │ │ │ └── default.nix │ │ ├── json │ │ │ ├── default.nix │ │ │ └── shell.nix │ │ ├── kotlin │ │ │ ├── default.nix │ │ │ └── shell.nix │ │ ├── lua │ │ │ ├── default.nix │ │ │ └── shell.nix │ │ ├── markdown │ │ │ ├── default.nix │ │ │ └── shell.nix │ │ ├── nix-lang │ │ │ └── default.nix │ │ ├── python │ │ │ ├── default.nix │ │ │ └── shell.nix │ │ ├── qml │ │ │ ├── default.nix │ │ │ └── shell.nix │ │ ├── rust │ │ │ ├── default.nix │ │ │ └── shell.nix │ │ └── web │ │ │ ├── default.nix │ │ │ └── shell.nix │ └── theme │ │ ├── config │ │ ├── heirline.lua │ │ └── neotree.lua │ │ ├── default.nix │ │ └── treesitter.nix └── shell │ ├── config │ ├── bashrc │ ├── colorgrid.sh │ └── dracula │ │ ├── fzf.sh │ │ └── less.sh │ ├── default.nix │ ├── git │ └── default.nix │ ├── misc │ └── default.nix │ ├── nix-tools │ └── default.nix │ ├── prompt-schemes.nix │ ├── starship │ └── default.nix │ └── trash │ └── default.nix ├── inputs ├── README.md ├── default.nix └── lib.nix ├── justfile ├── lib ├── README.md ├── attrs │ └── default.nix ├── default.nix ├── flake │ └── default.nix ├── hypr │ └── default.nix ├── pkgs │ ├── default.nix │ └── mk-types │ │ ├── .envrc │ │ ├── default.nix │ │ ├── package-lock.json │ │ └── package.json └── strings │ └── default.nix ├── modules ├── README.md ├── ags │ ├── config │ │ ├── .envrc │ │ ├── .gitignore │ │ ├── app.ts │ │ ├── configurations │ │ │ ├── binto.ts │ │ │ ├── greeter.ts │ │ │ └── wim.ts │ │ ├── default.nix │ │ ├── env.d.ts │ │ ├── eslint.config.ts │ │ ├── lib │ │ │ ├── cairo.ts │ │ │ ├── hypr.ts │ │ │ ├── index.ts │ │ │ ├── notify.ts │ │ │ └── windows.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── services │ │ │ ├── brightness.ts │ │ │ ├── gpu-screen-recorder.ts │ │ │ ├── monitor-clicks.ts │ │ │ └── tablet.ts │ │ ├── style │ │ │ ├── colors.scss │ │ │ ├── common.scss │ │ │ ├── greeter.scss │ │ │ └── main.scss │ │ ├── tsconfig.json │ │ └── widgets │ │ │ ├── applauncher │ │ │ ├── _index.scss │ │ │ ├── app-item.tsx │ │ │ ├── index.tsx │ │ │ └── launch.ts │ │ │ ├── audio │ │ │ ├── _index.scss │ │ │ ├── binto.tsx │ │ │ ├── main.tsx │ │ │ ├── profiles.tsx │ │ │ ├── streams.tsx │ │ │ └── wim.tsx │ │ │ ├── bar │ │ │ ├── _index.scss │ │ │ ├── binto.tsx │ │ │ ├── fullscreen.tsx │ │ │ ├── items │ │ │ │ ├── audio.tsx │ │ │ │ ├── battery.tsx │ │ │ │ ├── bluetooth.tsx │ │ │ │ ├── brightness.tsx │ │ │ │ ├── clock.tsx │ │ │ │ ├── current-client.tsx │ │ │ │ ├── current-icon.tsx │ │ │ │ ├── heart.tsx │ │ │ │ ├── keyboard-layout.tsx │ │ │ │ ├── network.tsx │ │ │ │ ├── notif-button.tsx │ │ │ │ ├── tray.tsx │ │ │ │ └── workspaces.tsx │ │ │ └── wim.tsx │ │ │ ├── bg-layer │ │ │ └── index.tsx │ │ │ ├── bluetooth │ │ │ ├── _index.scss │ │ │ ├── device.tsx │ │ │ ├── main.tsx │ │ │ └── wim.tsx │ │ │ ├── brightness-slider │ │ │ └── main.tsx │ │ │ ├── clipboard │ │ │ ├── _index.scss │ │ │ ├── clip-item.tsx │ │ │ ├── cliphist.sh │ │ │ └── index.tsx │ │ │ ├── corners │ │ │ ├── index.tsx │ │ │ └── screen-corners.tsx │ │ │ ├── date │ │ │ ├── _index.scss │ │ │ ├── binto.tsx │ │ │ ├── main.tsx │ │ │ └── wim.tsx │ │ │ ├── greeter │ │ │ └── index.tsx │ │ │ ├── icon-browser │ │ │ ├── _index.scss │ │ │ └── index.tsx │ │ │ ├── media-player │ │ │ ├── _index.scss │ │ │ ├── gesture.ts │ │ │ ├── mpris.ts │ │ │ └── player.ts │ │ │ ├── misc │ │ │ ├── _index.scss │ │ │ ├── persist.ts │ │ │ ├── popup-window.tsx │ │ │ ├── separator.tsx │ │ │ ├── smooth-progress.tsx │ │ │ ├── sorted-list.tsx │ │ │ └── subclasses.tsx │ │ │ ├── network │ │ │ ├── _index.scss │ │ │ ├── access-point.tsx │ │ │ ├── main.tsx │ │ │ └── wim.tsx │ │ │ ├── notifs │ │ │ ├── _index.scss │ │ │ ├── binto.tsx │ │ │ ├── center.tsx │ │ │ ├── gesture.tsx │ │ │ ├── notification.tsx │ │ │ ├── popups.tsx │ │ │ └── wim.tsx │ │ │ ├── on-screen-display │ │ │ ├── _index.scss │ │ │ └── index.tsx │ │ │ ├── on-screen-keyboard │ │ │ ├── _index.scss │ │ │ ├── arcs.tsx │ │ │ ├── gesture.ts │ │ │ ├── index.tsx │ │ │ ├── keyboard-layouts.ts │ │ │ ├── keyboard.tsx │ │ │ ├── keys.tsx │ │ │ └── osk-window.tsx │ │ │ ├── powermenu │ │ │ ├── _index.scss │ │ │ └── index.tsx │ │ │ └── screenshot │ │ │ ├── _index.scss │ │ │ ├── capture.sh │ │ │ └── index.tsx │ ├── default.nix │ ├── gtk4 │ │ ├── .envrc │ │ ├── .gitignore │ │ ├── app.ts │ │ ├── configurations │ │ │ └── lock.ts │ │ ├── env.d.ts │ │ ├── eslint.config.ts │ │ ├── lib │ │ │ ├── cairo.ts │ │ │ ├── hypr.ts │ │ │ ├── index.ts │ │ │ ├── notify.ts │ │ │ └── windows.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── style.scss │ │ ├── tsconfig.json │ │ └── widgets │ │ │ ├── astalify │ │ │ ├── astalify.ts │ │ │ ├── bindings.ts │ │ │ ├── construct.ts │ │ │ ├── controller.ts │ │ │ ├── generics.ts │ │ │ └── index.ts │ │ │ ├── bar.ts │ │ │ ├── lockscreen │ │ │ ├── _index.scss │ │ │ └── index.ts │ │ │ ├── misc │ │ │ ├── popup-window.ts │ │ │ └── separator.ts │ │ │ └── subclasses │ │ │ ├── box.ts │ │ │ ├── button.ts │ │ │ ├── calendar.ts │ │ │ ├── centerbox.ts │ │ │ ├── entry.ts │ │ │ ├── image.ts │ │ │ ├── index.ts │ │ │ ├── label.ts │ │ │ ├── levelbar.ts │ │ │ ├── menubutton.ts │ │ │ ├── overlay.ts │ │ │ ├── popover.ts │ │ │ ├── revealer.ts │ │ │ ├── slider.ts │ │ │ ├── stack.ts │ │ │ ├── switch.ts │ │ │ └── window.ts │ ├── hyprland.nix │ ├── icons.nix │ └── packages.nix ├── base │ ├── common-nix │ │ └── default.nix │ ├── default-droid.nix │ ├── default.nix │ ├── locale │ │ └── default.nix │ ├── locate │ │ └── default.nix │ ├── packages │ │ └── default.nix │ └── substituters │ │ └── default.nix ├── borgbackup │ ├── default.nix │ └── module.nix ├── caddy-plus │ ├── default.nix │ ├── sub-dir-options.nix │ ├── sub-domain-options.nix │ └── vhost-options.nix ├── default.nix ├── desktop │ ├── default.nix │ ├── environment │ │ ├── config │ │ │ ├── dolphinrc │ │ │ ├── kdeglobals │ │ │ ├── kiorc │ │ │ └── mimeapps.list │ │ ├── default.nix │ │ ├── home │ │ │ ├── dev.nix │ │ │ ├── foot.nix │ │ │ ├── hyprexpo.nix │ │ │ ├── hyprgrass.nix │ │ │ ├── inputs.nix │ │ │ ├── mpv.nix │ │ │ └── obs.nix │ │ └── modules │ │ │ ├── audio.nix │ │ │ ├── dconf.nix │ │ │ ├── dolphin.nix │ │ │ ├── packages.nix │ │ │ ├── printer.nix │ │ │ ├── ratbag-mice.nix │ │ │ └── security.nix │ ├── manager │ │ ├── ags │ │ │ └── default.nix │ │ ├── default.nix │ │ └── hyprland │ │ │ ├── default.nix │ │ │ └── setupMonitors.nix │ └── theme │ │ ├── cursors │ │ └── default.nix │ │ ├── default.nix │ │ ├── gtk │ │ ├── default.nix │ │ └── gradience.nix │ │ ├── hyprpaper │ │ └── default.nix │ │ ├── qt │ │ └── default.nix │ │ └── xresources │ │ └── default.nix ├── docker │ ├── .template │ │ ├── compose.nix │ │ └── images │ │ │ └── image.nix │ ├── default.nix │ └── updateImage.nix ├── esphome-plus │ └── default.nix ├── ha-plus │ └── default.nix ├── kmscon │ └── default.nix ├── meta │ └── default.nix ├── nvidia │ └── default.nix ├── plymouth │ └── default.nix ├── quickshell │ ├── config │ │ ├── .envrc │ │ ├── .qmlformat.ini │ │ ├── .qmllint.ini │ │ ├── Components │ │ │ └── RoundCorner │ │ │ │ └── RoundCorner.qml │ │ ├── Config │ │ │ └── Theme │ │ │ │ └── Theme.qml │ │ ├── Services │ │ │ └── DateTime │ │ │ │ └── DateTime.qml │ │ ├── Widgets │ │ │ ├── Bar │ │ │ │ └── Bar.qml │ │ │ └── ScreenCorners │ │ │ │ └── ScreenCorners.qml │ │ └── shell.qml │ └── default.nix ├── server │ ├── default.nix │ ├── sshd │ │ └── default.nix │ └── tailscale │ │ └── default.nix ├── tmux │ └── default.nix └── wyoming-plus │ ├── default.nix │ └── pkgs │ └── default.nix ├── nixFastChecks ├── apps │ └── default.nix ├── default.nix ├── devShells │ └── default.nix ├── devices │ └── default.nix └── packages │ └── default.nix ├── overlays ├── README.md ├── default.nix ├── forced │ └── default.nix ├── misc-fixes │ └── default.nix ├── nix-version │ └── default.nix └── xdg-desktop-portal-kde │ ├── 6-1-3.patch │ ├── 6-2.patch │ └── default.nix ├── packages ├── README.md ├── coloryou │ ├── LICENSE │ ├── coloryou.py │ ├── default.nix │ ├── pyproject.toml │ └── requirements.txt ├── default.nix ├── gpu-screen-recorder │ ├── default.nix │ ├── generic.nix │ ├── gpu-screen-recorder.nix │ ├── gsr-dbus-server.nix │ └── gsr-kms-server.nix ├── homepage │ ├── default.nix │ └── icons.nix ├── jdownloader-cli │ └── default.nix ├── jmusicbot │ └── default.nix ├── komf │ ├── default.nix │ └── deps.json ├── libratbag │ └── default.nix ├── librespot-auth │ └── default.nix ├── nbted │ └── default.nix ├── pam-fprint-grosshack │ └── default.nix ├── piper │ └── default.nix ├── pokemon-colorscripts │ └── default.nix ├── proton-ge-9-27 │ └── default.nix ├── proton-ge-latest │ └── default.nix ├── protonhax │ └── default.nix ├── repl │ ├── default.nix │ └── repl.nix ├── some-sass-language-server │ ├── default.nix │ ├── package-lock.json │ ├── package.json │ └── update.nix ├── subscleaner │ └── default.nix ├── trash-d │ └── default.nix └── urllib3 │ └── default.nix ├── results └── .gitkeep └── scopedPackages ├── README.md ├── default.nix ├── dracula ├── bat │ └── default.nix ├── default.nix ├── git │ └── default.nix ├── gtk │ └── default.nix ├── plymouth │ └── default.nix ├── sioyek │ └── default.nix └── wallpaper │ └── default.nix ├── firefox-addons ├── addons.json ├── default.nix └── generated-firefox-addons.nix ├── hass-components ├── default.nix ├── extended-ollama-conversation │ └── default.nix ├── material-symbols │ └── default.nix ├── netdaemon │ └── default.nix ├── spotifyplus │ ├── default.nix │ ├── overrides.nix │ ├── smartinspect.nix │ └── spotifywebapi.nix ├── tuya-local │ ├── default.nix │ └── overrides.nix └── yamaha-soundbar │ └── default.nix ├── lovelace-components ├── big-slider-card │ └── default.nix ├── custom-sidebar │ ├── default.nix │ └── update.sh ├── default.nix ├── material-rounded-theme │ └── default.nix └── material-you-utilities │ └── default.nix └── mpv-scripts ├── default.nix ├── kdialog-open-files └── default.nix ├── modernz └── default.nix ├── persist-properties └── default.nix ├── pointer-event └── default.nix ├── touch-gestures └── default.nix └── undo-redo └── default.nix /.forgejo/workflows/discord.yml: -------------------------------------------------------------------------------- 1 | name: Discord 2 | 3 | on: 4 | - workflow_dispatch 5 | - push 6 | 7 | jobs: 8 | discord_commits: 9 | runs-on: ubuntu-latest 10 | name: discord commits 11 | if: contains(github.event.head_commit.message, '(servers)') 12 | 13 | steps: 14 | - name: Discommit 15 | uses: https://github.com/matt1432/discommit@v0.0.2 16 | with: 17 | discord_webhook: ${{ secrets.DISCORD_WEBHOOK }} 18 | api_url: 'https://git.nelim.org/api/v1/repos/$OWNER/$REPO/git/commits/$REF' 19 | title: 'New commit containing changes to server configs:' 20 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | flake.lock -diff 2 | flake.nix -diff 3 | **/non-declarative-conf -diff 4 | **/package-lock.json -diff 5 | **/HomeAssistantGenerated -diff 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Python 2 | *.egg-info 3 | 4 | # NPM 5 | *node_modules 6 | *build/ 7 | 8 | # Direnv 9 | *.direnv/ 10 | 11 | # Generated by nix 12 | result* 13 | !results/ 14 | .nixd.json 15 | 16 | ## AGS 17 | **/vars.ts 18 | **/config.js 19 | *icons 20 | **/types 21 | 22 | # Other 23 | *.temp 24 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT No Attribution 2 | 3 | Copyright 2024 Mathis H. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this 6 | software and associated documentation files (the "Software"), to deal in the Software 7 | without restriction, including without limitation the rights to use, copy, modify, 8 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 12 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 13 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 14 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 15 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 16 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | -------------------------------------------------------------------------------- /apps/README.md: -------------------------------------------------------------------------------- 1 | # Apps 2 | 3 | This directory contains every derivations for apps exposed by this flake. 4 | 5 | ## List of my apps found in `self.apps` 6 | 7 | | Name | Description | 8 | | ---- | ----------- | 9 | | `extract-subs` | Extract all `srt` subtitle files from a `mkv` video with the appropriate name. | 10 | | `gen-docs` | Generates the READMEs in this repository from nix attributes. | 11 | | `list2series` | Converts a Komga read list into a comics series for reading with mihon. | 12 | | `mc-mods` | Checks if a list of mods have a version available for a specific Minecraft version and a specific loader. | 13 | | `pin-inputs` | Takes a list of inputs to pin to their current rev in `flake.lock`. | 14 | | `update-sources` | Updates all derivation sources in this repository and generates a commit message for the changes made. | 15 | -------------------------------------------------------------------------------- /apps/config/.envrc: -------------------------------------------------------------------------------- 1 | use flake $FLAKE#node 2 | npm ci 3 | -------------------------------------------------------------------------------- /apps/config/index.ts: -------------------------------------------------------------------------------- 1 | import eslintConf from './eslint.config'; 2 | 3 | export default eslintConf; 4 | -------------------------------------------------------------------------------- /apps/config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-conf", 3 | "version": "0.0.0", 4 | "type": "module", 5 | "exports": "./index.ts", 6 | "dependencies": { 7 | "@eslint/js": "9.28.0", 8 | "@stylistic/eslint-plugin": "4.4.0", 9 | "eslint": "9.28.0", 10 | "eslint-plugin-jsdoc": "50.7.1", 11 | "jiti": "2.4.2", 12 | "pkg-types": "2.1.0", 13 | "typescript": "5.8.3", 14 | "typescript-eslint": "8.33.1" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /apps/config/tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "compilerOptions": { 4 | "target": "ESNext", 5 | "lib": [ 6 | "ESNext" 7 | ], 8 | "module": "preserve", 9 | "moduleResolution": "bundler", 10 | "baseUrl": ".", 11 | "noEmit": true, 12 | "newLine": "LF", 13 | "esModuleInterop": true, 14 | "allowSyntheticDefaultImports": true, 15 | "forceConsistentCasingInFileNames": true, 16 | "isolatedModules": true, 17 | "skipLibCheck": true, 18 | "strict": true, 19 | "noImplicitAny": false 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "./tsconfig.base.json", 4 | "includes": [ 5 | "*.ts", 6 | "**/*.ts", 7 | "*.js", 8 | "**/*.js" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/default.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: let 2 | inherit (pkgs.lib) getExe mapAttrs; 3 | 4 | mkApp = pkg: { 5 | program = getExe pkg; 6 | type = "app"; 7 | }; 8 | in 9 | mapAttrs (n: v: mkApp v) pkgs.appsPackages 10 | -------------------------------------------------------------------------------- /apps/extract-subs/.envrc: -------------------------------------------------------------------------------- 1 | use flake $FLAKE#subtitles-dev 2 | (cd ../config; npm ci) 3 | npm ci 4 | -------------------------------------------------------------------------------- /apps/extract-subs/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | buildApp, 3 | ffmpeg-full, 4 | ... 5 | }: 6 | buildApp { 7 | src = ./.; 8 | npmDepsHash = "sha256-eU6zgcenSbJHCxiFiNyM894Gzt3U8DRd/wpSAziqE6k="; 9 | 10 | runtimeInputs = [ 11 | ffmpeg-full 12 | ]; 13 | 14 | meta.description = '' 15 | Extract all `srt` subtitle files from a `mkv` video with the appropriate name. 16 | ''; 17 | } 18 | -------------------------------------------------------------------------------- /apps/extract-subs/eslint.config.ts: -------------------------------------------------------------------------------- 1 | import eslintConf from 'eslint-conf'; 2 | 3 | export default eslintConf; 4 | -------------------------------------------------------------------------------- /apps/extract-subs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extract-subs", 3 | "version": "0.0.0", 4 | "bin": "out/bin/app.cjs", 5 | "type": "module", 6 | "scripts": { 7 | "build": "node_ver=$(node -v); esbuild src/app.ts --bundle --platform=node --target=\"node${node_ver:1:2}\" --outfile=out/bin/app.cjs" 8 | }, 9 | "dependencies": { 10 | "@types/fluent-ffmpeg": "2.1.27", 11 | "fluent-ffmpeg": "2.1.3", 12 | "@types/node": "22.15.29", 13 | "esbuild": "0.25.5", 14 | "eslint": "9.28.0", 15 | "jiti": "2.4.2", 16 | "typescript": "5.8.3" 17 | }, 18 | "devDependencies": { 19 | "eslint-conf": "file:../config" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/extract-subs/src/ffprobe.ts: -------------------------------------------------------------------------------- 1 | import Ffmpeg from 'fluent-ffmpeg'; 2 | 3 | 4 | export default (videoPath: string) => new Promise((resolve) => { 5 | Ffmpeg.ffprobe(videoPath, (_e, data) => { 6 | resolve(data); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /apps/extract-subs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "../config/tsconfig.base.json", 4 | "includes": [ 5 | "*.ts", 6 | "**/*.ts", 7 | "*.js", 8 | "**/*.js" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/gen-docs/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | writeShellApplication, 3 | jq, 4 | pandoc, 5 | ... 6 | }: 7 | writeShellApplication { 8 | name = "gen-docs"; 9 | runtimeInputs = [jq pandoc]; 10 | text = builtins.readFile ./script.sh; 11 | 12 | meta.description = '' 13 | Generates the READMEs in this repository from nix attributes. 14 | ''; 15 | } 16 | -------------------------------------------------------------------------------- /apps/gen-docs/getAttrsMeta.nix: -------------------------------------------------------------------------------- 1 | attr: selfPath: let 2 | inherit (builtins) mapAttrs replaceStrings; 3 | 4 | modules = import "${selfPath}/${attr}" {description = true;}; 5 | 6 | trimNewlines = s: replaceStrings ["\n"] [" "] s; 7 | in { 8 | attrs = 9 | mapAttrs (_: v: { 10 | desc = trimNewlines v; 11 | }) 12 | modules; 13 | } 14 | -------------------------------------------------------------------------------- /apps/gen-docs/getConfigMeta.nix: -------------------------------------------------------------------------------- 1 | configs: let 2 | inherit (builtins) mapAttrs replaceStrings; 3 | 4 | trimNewlines = s: replaceStrings ["\n"] [" "] s; 5 | in { 6 | attrs = 7 | mapAttrs (_: v: { 8 | roleDesc = trimNewlines (v.config.meta.roleDescription or ""); 9 | hwDesc = trimNewlines (v.config.meta.hardwareDescription or ""); 10 | }) 11 | configs; 12 | } 13 | -------------------------------------------------------------------------------- /apps/gen-docs/getPackageMeta.nix: -------------------------------------------------------------------------------- 1 | x: let 2 | inherit (builtins) currentSystem mapAttrs removeAttrs replaceStrings; 3 | 4 | trimNewlines = s: replaceStrings ["\n"] [" "] s; 5 | packages = removeAttrs x.${currentSystem} ["default"]; 6 | in { 7 | attrs = 8 | mapAttrs (_: v: { 9 | desc = trimNewlines (v.meta.description or ""); 10 | homepage = v.meta.homepage or ""; 11 | }) 12 | packages; 13 | } 14 | -------------------------------------------------------------------------------- /apps/gen-docs/getScopesMeta.nix: -------------------------------------------------------------------------------- 1 | attr: selfPath: let 2 | inherit (builtins) currentSystem getFlake mapAttrs removeAttrs replaceStrings; 3 | 4 | self = getFlake selfPath; 5 | scopes = ((import "${selfPath}/${attr}" {description = true;}) {} {}).scopedPackages; 6 | 7 | trimNewlines = s: replaceStrings ["\n"] [" "] s; 8 | in { 9 | attrs = 10 | mapAttrs (n: v: { 11 | desc = trimNewlines v; 12 | packages = let 13 | scopePkgs = removeAttrs self.${attr}.${currentSystem}.${n} [ 14 | "buildFirefoxXpiAddon" 15 | "callPackage" 16 | "newScope" 17 | "override" 18 | "overrideDerivation" 19 | "overrideScope" 20 | "packages" 21 | "recurseForDerivations" 22 | ]; 23 | in 24 | mapAttrs (_: pkg: { 25 | desc = trimNewlines (pkg.meta.description or ""); 26 | homepage = pkg.meta.homepage or ""; 27 | }) 28 | scopePkgs; 29 | }) 30 | scopes; 31 | } 32 | -------------------------------------------------------------------------------- /apps/gen-docs/templates/apps.md: -------------------------------------------------------------------------------- 1 | # Apps 2 | 3 | This directory contains every derivations for apps exposed by this flake. 4 | 5 | ## List of my apps found in `self.apps` 6 | 7 | | Name | Description | 8 | | ---- | ----------- | 9 | $for(attrs/pairs)$ 10 | | `$it.key$` | $it.value.desc/nowrap$ | 11 | $endfor$ 12 | -------------------------------------------------------------------------------- /apps/gen-docs/templates/configurations.md: -------------------------------------------------------------------------------- 1 | # NixosConfigurations 2 | 3 | This directory contains every device's main configuration file, their `hardware-configuration.nix` and some custom modules 4 | unique to them. 5 | 6 | ## List of my devices 7 | 8 | | Name | Model / Specs | Description | 9 | | --------- | ------------- | ------------------------------------------------------------------------------------------------ | 10 | | `android` | OnePlus 9 Pro | [Nix-On-Droid](https://github.com/nix-community/nix-on-droid) configuration for my OnePlus 9 Pro | 11 | $for(attrs/pairs)$ 12 | | `$it.key$` | $it.value.hwDesc/nowrap$ | $it.value.roleDesc/nowrap$ | 13 | $endfor$ 14 | -------------------------------------------------------------------------------- /apps/gen-docs/templates/devShells.md: -------------------------------------------------------------------------------- 1 | # DevShells 2 | 3 | This directory contains every derivations for devShells exposed by this flake. 4 | 5 | ## List of my devShells found in `self.devShells` 6 | 7 | | Name | Description | 8 | | ---- | ----------- | 9 | $for(attrs/pairs)$ 10 | | `$it.key$` | $it.value.desc/nowrap$ | 11 | $endfor$ 12 | -------------------------------------------------------------------------------- /apps/gen-docs/templates/homeManagerModules.md: -------------------------------------------------------------------------------- 1 | # HomeManagerModules 2 | 3 | This directory contains every home-manager modules exposed by this flake. 4 | 5 | ## List of my home-manager modules found in `self.homeManagerModules` 6 | 7 | | Name | Description | 8 | | ---- | ----------- | 9 | $for(attrs/pairs)$ 10 | | `$it.key$` | $it.value.desc/nowrap$ | 11 | $endfor$ 12 | -------------------------------------------------------------------------------- /apps/gen-docs/templates/modules.md: -------------------------------------------------------------------------------- 1 | # NixosModules 2 | 3 | This directory contains every modules for NixOS exposed by this flake. 4 | 5 | ## List of my modules found in `self.nixosModules` 6 | 7 | | Name | Description | 8 | | ---- | ----------- | 9 | $for(attrs/pairs)$ 10 | | `$it.key$` | $it.value.desc/nowrap$ | 11 | $endfor$ 12 | -------------------------------------------------------------------------------- /apps/gen-docs/templates/overlays.md: -------------------------------------------------------------------------------- 1 | # Overlays 2 | 3 | This directory contains every overlay exposed by this flake. 4 | 5 | ## List of my overlays found in `self.overlays` 6 | 7 | | Name | Description | 8 | | ---- | ----------- | 9 | $for(attrs/pairs)$ 10 | | `$it.key$` | $it.value.desc/nowrap$ | 11 | $endfor$ 12 | -------------------------------------------------------------------------------- /apps/gen-docs/templates/packages.md: -------------------------------------------------------------------------------- 1 | # Packages 2 | 3 | This directory contains every derivations for packages exposed by this flake. 4 | 5 | ## List of my packages found in `self.packages` 6 | 7 | | Name | Description | Homepage | 8 | | ---- | ----------- | -------- | 9 | $for(attrs/pairs)$ 10 | | `$it.key$` | $it.value.desc/nowrap$ | $it.value.homepage/nowrap$ | 11 | $endfor$ 12 | -------------------------------------------------------------------------------- /apps/gen-docs/templates/scopedPackages.md: -------------------------------------------------------------------------------- 1 | # ScopedPackages 2 | 3 | This directory contains every package scopes exposed by this flake. 4 | 5 | ## List of my package scopes found in `self.scopedPackages` 6 | 7 | $for(attrs/pairs)$ 8 | ### $it.key$ 9 | 10 | $it.value.desc/nowrap$ 11 | 12 | | Name | Description | Homepage | 13 | | ---- | ----------- | -------- | 14 | $for(it.value.packages/pairs)$ 15 | | `$it.key$` | $it.value.desc/nowrap$ | $it.value.homepage/nowrap$ | 16 | $endfor$ 17 | 18 | $endfor$ 19 | -------------------------------------------------------------------------------- /apps/list2series/.envrc: -------------------------------------------------------------------------------- 1 | use flake $FLAKE#node 2 | (cd ../config; npm ci) 3 | npm ci 4 | -------------------------------------------------------------------------------- /apps/list2series/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | -------------------------------------------------------------------------------- /apps/list2series/default.nix: -------------------------------------------------------------------------------- 1 | {buildApp, ...}: 2 | buildApp { 3 | src = ./.; 4 | npmDepsHash = "sha256-4+JdRDVvr28sw4vsYnhtOY6S8+uKw6NMTb6lpY5T0g4="; 5 | 6 | runtimeInputs = []; 7 | 8 | meta.description = '' 9 | Converts a Komga read list into a comics series for reading with mihon. 10 | ''; 11 | } 12 | -------------------------------------------------------------------------------- /apps/list2series/eslint.config.ts: -------------------------------------------------------------------------------- 1 | import eslintConf from 'eslint-conf'; 2 | 3 | export default eslintConf; 4 | -------------------------------------------------------------------------------- /apps/list2series/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "list2series", 3 | "version": "0.0.0", 4 | "bin": "out/bin/app.cjs", 5 | "type": "module", 6 | "scripts": { 7 | "build": "node_ver=$(node -v); esbuild src/app.ts --bundle --platform=node --target=\"node${node_ver:1:2}\" --outfile=out/bin/app.cjs" 8 | }, 9 | "dependencies": { 10 | "@types/node": "22.15.29", 11 | "axios": "1.9.0", 12 | "esbuild": "0.25.5", 13 | "eslint": "9.28.0", 14 | "jiti": "2.4.2", 15 | "pkg-types": "2.1.0", 16 | "typescript": "5.8.3" 17 | }, 18 | "devDependencies": { 19 | "eslint-conf": "file:../config" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/list2series/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "../config/tsconfig.base.json", 4 | "includes": [ 5 | "*.ts", 6 | "**/*.ts", 7 | "*.js", 8 | "**/*.js" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/mc-mods/.envrc: -------------------------------------------------------------------------------- 1 | use flake $FLAKE#node 2 | (cd ../config; npm ci) 3 | npm ci 4 | -------------------------------------------------------------------------------- /apps/mc-mods/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | buildApp, 3 | nodejs_latest, 4 | ... 5 | }: 6 | buildApp { 7 | src = ./.; 8 | npmDepsHash = "sha256-ataURmJVvNIcJ+NSu2CCsVGbtuVn6gQa9ZN38LLF5V4="; 9 | 10 | runtimeInputs = [ 11 | nodejs_latest 12 | ]; 13 | 14 | meta.description = '' 15 | Checks if a list of mods have a version available for a specific Minecraft 16 | version and a specific loader. 17 | ''; 18 | } 19 | -------------------------------------------------------------------------------- /apps/mc-mods/eslint.config.ts: -------------------------------------------------------------------------------- 1 | import eslintConf from 'eslint-conf'; 2 | 3 | export default eslintConf; 4 | -------------------------------------------------------------------------------- /apps/mc-mods/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mc-mods", 3 | "version": "0.0.0", 4 | "bin": "out/bin/app.cjs", 5 | "type": "module", 6 | "scripts": { 7 | "build": "node_ver=$(node -v); esbuild src/app.ts --bundle --platform=node --target=\"node${node_ver:1:2}\" --outfile=out/bin/app.cjs" 8 | }, 9 | "dependencies": { 10 | "@types/node": "22.15.29", 11 | "esbuild": "0.25.5", 12 | "eslint": "9.28.0", 13 | "jiti": "2.4.2", 14 | "pkg-types": "2.1.0", 15 | "typescript": "5.8.3" 16 | }, 17 | "devDependencies": { 18 | "eslint-conf": "file:../config" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/mc-mods/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "../config/tsconfig.base.json", 4 | "includes": [ 5 | "*.ts", 6 | "**/*.ts", 7 | "*.js", 8 | "**/*.js" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/packages.nix: -------------------------------------------------------------------------------- 1 | {inputs, ...}: (final: prev: { 2 | appsPackages = let 3 | inherit (final.lib) listToAttrs nameValuePair; 4 | 5 | buildApp = attrs: (final.callPackage ./buildApp.nix ({} // inputs // attrs)); 6 | callPackage = file: final.callPackage file ({inherit buildApp;} // inputs); 7 | in 8 | listToAttrs (map (x: nameValuePair x (callPackage ./${x})) [ 9 | "extract-subs" 10 | "gen-docs" 11 | "list2series" 12 | "mc-mods" 13 | "pin-inputs" 14 | "update-sources" 15 | ]); 16 | }) 17 | -------------------------------------------------------------------------------- /apps/pin-inputs/.envrc: -------------------------------------------------------------------------------- 1 | use flake $FLAKE#node 2 | (cd ../config; npm ci) 3 | npm ci 4 | -------------------------------------------------------------------------------- /apps/pin-inputs/default.nix: -------------------------------------------------------------------------------- 1 | {buildApp, ...}: 2 | buildApp { 3 | src = ./.; 4 | npmDepsHash = "sha256-Z9xyq3T66PXg982SAMBtAZdfBo6e3gZ30N8AcgUZ64k="; 5 | 6 | runtimeInputs = []; 7 | 8 | meta.description = '' 9 | Takes a list of inputs to pin to their current rev in `flake.lock`. 10 | ''; 11 | } 12 | -------------------------------------------------------------------------------- /apps/pin-inputs/eslint.config.ts: -------------------------------------------------------------------------------- 1 | import eslintConf from 'eslint-conf'; 2 | 3 | export default eslintConf; 4 | -------------------------------------------------------------------------------- /apps/pin-inputs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pin-inputs", 3 | "version": "0.0.0", 4 | "bin": "out/bin/app.cjs", 5 | "type": "module", 6 | "scripts": { 7 | "build": "node_ver=$(node -v); esbuild src/app.ts --bundle --platform=node --target=\"node${node_ver:1:2}\" --outfile=out/bin/app.cjs" 8 | }, 9 | "dependencies": { 10 | "@types/node": "22.15.29", 11 | "esbuild": "0.25.5", 12 | "eslint": "9.28.0", 13 | "jiti": "2.4.2", 14 | "pkg-types": "2.1.0", 15 | "typescript": "5.8.3" 16 | }, 17 | "devDependencies": { 18 | "eslint-conf": "file:../config" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/pin-inputs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "../config/tsconfig.base.json", 4 | "includes": [ 5 | "*.ts", 6 | "**/*.ts", 7 | "*.js", 8 | "**/*.js" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/update-sources/.envrc: -------------------------------------------------------------------------------- 1 | use flake $FLAKE#node 2 | (cd ../config; npm ci) 3 | npm ci 4 | -------------------------------------------------------------------------------- /apps/update-sources/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | buildApp, 3 | callPackage, 4 | curl, 5 | findutils, 6 | go, 7 | jq, 8 | just, 9 | nix-update, 10 | nodejs_latest, 11 | prefetch-npm-deps, 12 | ... 13 | }: 14 | buildApp { 15 | src = ./.; 16 | npmDepsHash = "sha256-aV6o54XWtkkYFEecA7A6kWnJRCrSJelk36DYyNvXdWI="; 17 | 18 | runtimeInputs = [ 19 | curl 20 | findutils 21 | go 22 | jq 23 | just 24 | nix-update 25 | nodejs_latest 26 | prefetch-npm-deps 27 | # We want to use the one from my config with authfile 28 | # (callPackage ../../modules/docker/updateImage.nix {}) 29 | (callPackage ../../configurations/homie/modules/home-assistant/netdaemon/update.nix {}) 30 | ]; 31 | 32 | meta.description = '' 33 | Updates all derivation sources in this repository and 34 | generates a commit message for the changes made. 35 | ''; 36 | } 37 | -------------------------------------------------------------------------------- /apps/update-sources/eslint.config.ts: -------------------------------------------------------------------------------- 1 | import eslintConf from 'eslint-conf'; 2 | 3 | export default eslintConf; 4 | -------------------------------------------------------------------------------- /apps/update-sources/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "update-sources", 3 | "version": "0.0.0", 4 | "bin": "out/bin/app.cjs", 5 | "type": "module", 6 | "scripts": { 7 | "build": "node_ver=$(node -v); esbuild src/app.ts --bundle --platform=node --target=\"node${node_ver:1:2}\" --outfile=out/bin/app.cjs" 8 | }, 9 | "dependencies": { 10 | "@types/node": "22.15.29", 11 | "esbuild": "0.25.5", 12 | "eslint": "9.28.0", 13 | "jiti": "2.4.2", 14 | "pkg-types": "2.1.0", 15 | "typescript": "5.8.3" 16 | }, 17 | "devDependencies": { 18 | "eslint-conf": "file:../config" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/update-sources/src/netdaemon.ts: -------------------------------------------------------------------------------- 1 | import { readFileSync, writeFileSync } from 'node:fs'; 2 | import { spawnSync } from 'node:child_process'; 3 | import { styleText } from 'node:util'; 4 | 5 | 6 | /* Constants */ 7 | const FLAKE = process.env.FLAKE; 8 | 9 | export default (): string | null => { 10 | console.log(styleText(['magenta'], '\nUpdating NetDaemon:\n')); 11 | 12 | const FOLDER = `${FLAKE}/configurations/homie/modules/home-assistant/netdaemon`; 13 | 14 | const OLD_VERSION = readFileSync(`${FOLDER}/.version`).toString().replace('\n', ''); 15 | 16 | const VERSION = JSON.parse(spawnSync([ 17 | 'curl', '-s', 'https://api.github.com/repos/net-daemon/netdaemon/releases/latest', 18 | ].join(' '), [], { shell: true }).stdout.toString()).tag_name.replace('v', ''); 19 | 20 | if (OLD_VERSION !== VERSION) { 21 | writeFileSync(`${FOLDER}/.version`, `${VERSION}\n`); 22 | 23 | spawnSync('bumpNetdaemonDeps', [], { 24 | cwd: FOLDER, 25 | stdio: 'inherit', 26 | }); 27 | 28 | return `NetDaemon: ${OLD_VERSION} -> ${VERSION}\n`; 29 | } 30 | 31 | return null; 32 | }; 33 | -------------------------------------------------------------------------------- /apps/update-sources/src/nix-update.ts: -------------------------------------------------------------------------------- 1 | import { spawnSync } from 'node:child_process'; 2 | import { styleText } from 'node:util'; 3 | 4 | 5 | /* Constants */ 6 | const FLAKE = process.env.FLAKE; 7 | 8 | const getAttrVersion = (attr: string): string => spawnSync( 9 | ['nix', 'eval', '--raw', `${FLAKE}#${attr}.version`].join(' '), [], { shell: true }, 10 | ).stdout.toString(); 11 | 12 | export default ( 13 | attr: string, 14 | scope?: string, 15 | scopeAttr?: string, 16 | ): string | null => { 17 | const realAttr = scope ? `${attr}.x86_64-linux.${scope}.${scopeAttr}` : attr; 18 | const cleanAttr = scope ? `${attr}.${scope}.${scopeAttr}` : attr; 19 | 20 | console.log(styleText(['magenta'], `\nUpdating ${cleanAttr}:\n`)); 21 | 22 | const OLD_VERSION = getAttrVersion(realAttr); 23 | 24 | spawnSync('nix-update', ['--flake', realAttr, '-u'], { cwd: FLAKE, stdio: 'inherit' }); 25 | 26 | const NEW_VERSION = getAttrVersion(realAttr); 27 | 28 | return OLD_VERSION !== NEW_VERSION ? 29 | `${cleanAttr}: ${OLD_VERSION} -> ${NEW_VERSION}` : 30 | null; 31 | }; 32 | -------------------------------------------------------------------------------- /apps/update-sources/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "../config/tsconfig.base.json", 4 | "includes": [ 5 | "*.ts", 6 | "**/*.ts", 7 | "*.js", 8 | "**/*.js" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /configurations/bbsteamie/modules/default.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | imports = [ 3 | ./desktop 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /configurations/bbsteamie/modules/desktop/default.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: let 2 | defaultSession = "plasma"; 3 | in { 4 | imports = [ 5 | (import ./session-switching.nix defaultSession) 6 | (import ./steam.nix defaultSession) 7 | ]; 8 | 9 | services.desktopManager.plasma6.enable = true; 10 | 11 | programs = { 12 | kdeconnect.enable = true; 13 | xwayland.enable = true; 14 | }; 15 | 16 | # Flatpak support for Discover 17 | services.flatpak.enable = true; 18 | services.packagekit.enable = true; 19 | 20 | # Wayland env vars 21 | environment.variables = { 22 | NIXOS_OZONE_WL = "1"; 23 | ELECTRON_OZONE_PLATFORM_HINT = "auto"; 24 | }; 25 | 26 | environment.systemPackages = builtins.attrValues { 27 | inherit 28 | (pkgs) 29 | firefox 30 | wl-clipboard 31 | xclip 32 | ; 33 | 34 | inherit 35 | (pkgs.kdePackages) 36 | discover 37 | krfb 38 | ; 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /configurations/binto/modules/default.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | imports = [ 3 | ./gpu-replay 4 | ./nix-gaming 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /configurations/binto/modules/nix-gaming/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | nix-gaming, 3 | pkgs, 4 | purePkgs ? pkgs, 5 | ... 6 | }: { 7 | imports = [ 8 | nix-gaming.nixosModules.platformOptimizations 9 | ]; 10 | 11 | programs = { 12 | steam = { 13 | enable = true; 14 | protontricks.enable = true; 15 | remotePlay.openFirewall = true; 16 | 17 | extraCompatPackages = [ 18 | pkgs.selfPackages.proton-ge-9-27 19 | pkgs.selfPackages.proton-ge-latest 20 | ]; 21 | 22 | platformOptimizations.enable = true; 23 | }; 24 | }; 25 | 26 | environment.systemPackages = [ 27 | (purePkgs.lutris.override { 28 | extraLibraries = pkgs: [ 29 | # List library dependencies here 30 | ]; 31 | extraPkgs = pkgs: [ 32 | # List extra packages available to lutris here 33 | ]; 34 | }) 35 | 36 | pkgs.r2modman 37 | pkgs.ryujinx 38 | ]; 39 | } 40 | -------------------------------------------------------------------------------- /configurations/cluster/modules/blocky/default.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | services = { 3 | blocky = { 4 | enable = true; 5 | 6 | settings = { 7 | upstream = { 8 | default = [ 9 | "127.0.0.1:5335" 10 | "127.0.0.1:5335" 11 | ]; 12 | }; 13 | 14 | blocking = { 15 | blackLists = { 16 | ads = [ 17 | "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" 18 | ]; 19 | }; 20 | }; 21 | }; 22 | }; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /configurations/cluster/modules/caddy/plugins.nix: -------------------------------------------------------------------------------- 1 | { 2 | plugins = { 3 | certmagic = { 4 | url = "github.com/caddyserver/certmagic"; 5 | version = "v0.23.1-0.20250416233037-0d908a37e8f8"; 6 | type = "git"; 7 | }; 8 | 9 | cloudflare = { 10 | url = "github.com/caddy-dns/cloudflare"; 11 | version = "v0.2.2-0.20250419192618-6207298f499a"; 12 | type = "git"; 13 | }; 14 | }; 15 | 16 | hash = "sha256-tTdemqPVKW5tWofYZLarf1oihDy4FLO4uIXTIcGRmVM="; 17 | } 18 | -------------------------------------------------------------------------------- /configurations/cluster/modules/default.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | imports = [ 3 | ./blocky 4 | ./caddy 5 | ./headscale 6 | ./nfs-client 7 | ./pcsd 8 | ./searxng 9 | ./unbound 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /configurations/cluster/modules/nfs-client/default.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: { 2 | # NFS client setup 3 | services.rpcbind.enable = true; 4 | boot.supportedFilesystems = ["nfs"]; 5 | environment.systemPackages = builtins.attrValues { 6 | inherit (pkgs) nfs-utils; 7 | }; 8 | 9 | systemd.mounts = let 10 | host = "10.0.0.249"; 11 | in [ 12 | { 13 | type = "nfs"; 14 | mountConfig = { 15 | Options = "noatime"; 16 | }; 17 | what = "${host}:/caddy"; 18 | where = "/var/lib/caddy"; 19 | requiredBy = ["caddy.service"]; 20 | } 21 | 22 | { 23 | type = "nfs"; 24 | mountConfig = { 25 | Options = "noatime"; 26 | }; 27 | what = "${host}:/headscale"; 28 | where = "/var/lib/headscale"; 29 | requiredBy = ["headscale.service"]; 30 | } 31 | ]; 32 | } 33 | -------------------------------------------------------------------------------- /configurations/cluster/modules/searxng/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matt1432/nixos-configs/5bc3cdef2baab082990113b60651c496e4858fe0/configurations/cluster/modules/searxng/logo.png -------------------------------------------------------------------------------- /configurations/homie/modules/default.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | imports = [ 3 | ./home-assistant 4 | ./music 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /configurations/homie/modules/home-assistant/docs/functions.nix: -------------------------------------------------------------------------------- 1 | # I use nix2yaml from ../default.nix to convert this to YAML and place it in the functions of extended_ollama_conversation 2 | [ 3 | { 4 | spec = { 5 | name = "get_attributes"; 6 | description = "Get attributes of any home assistant entity"; 7 | parameters = { 8 | type = "object"; 9 | 10 | properties = { 11 | entity_id = { 12 | type = "string"; 13 | description = "entity_id"; 14 | }; 15 | }; 16 | 17 | required = ["entity_id"]; 18 | }; 19 | }; 20 | 21 | function = { 22 | type = "template"; 23 | value_template = "{{ states[entity_id] }}"; 24 | }; 25 | } 26 | ] 27 | -------------------------------------------------------------------------------- /configurations/homie/modules/home-assistant/netdaemon/.envrc: -------------------------------------------------------------------------------- 1 | use flake "$FLAKE#netdaemon" 2 | cp -rf ./HomeAssistantGenerated ./HomeAssistantGenerated.cs 3 | -------------------------------------------------------------------------------- /configurations/homie/modules/home-assistant/netdaemon/.gitignore: -------------------------------------------------------------------------------- 1 | obj 2 | bin 3 | NetDaemonCodegen 4 | HomeAssistantGenerated.cs 5 | -------------------------------------------------------------------------------- /configurations/homie/modules/home-assistant/netdaemon/.version: -------------------------------------------------------------------------------- 1 | 25.18.1 2 | -------------------------------------------------------------------------------- /configurations/homie/modules/home-assistant/netdaemon/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "Microsoft": "Warning" 6 | }, 7 | "ConsoleThemeType": "Ansi" 8 | }, 9 | "HomeAssistant": { 10 | "Host": "homie.nelim.org", 11 | "Port": 443, 12 | "Ssl": true 13 | }, 14 | "NetDaemon": { 15 | "ApplicationConfigurationFolder": "./apps" 16 | }, 17 | "CodeGeneration": { 18 | "Namespace": "HomeAssistantGenerated", 19 | "OutputFile": "HomeAssistantGenerated.cs", 20 | "UseAttributeBaseClasses" : "false" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /configurations/homie/modules/home-assistant/netdaemon/images/netdaemon.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "netdaemon/netdaemon5"; 4 | imageDigest = "sha256:28335e5f72a9a0c9801e9e46c90157a2a143771b59124bf9d2cc3789e4908986"; 5 | hash = "sha256-OrSdEWD8fHDkme2TPPmqd/6FyWOMmf4flRNEghJfZnc="; 6 | finalImageName = imageName; 7 | finalImageTag = "25.18.1"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/homie/modules/home-assistant/netdaemon/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | buildDotnetModule, 4 | dotnetCorePackages, 5 | }: let 6 | inherit (lib) any hasInfix hasSuffix removeSuffix; 7 | 8 | srcDirs = ["apps"]; 9 | srcPatterns = [".cs" ".csproj" ".json" ".version" "HomeAssistantGenerated"]; 10 | 11 | pname = "netdaemon-config"; 12 | in 13 | buildDotnetModule { 14 | inherit pname; 15 | version = removeSuffix "\n" (builtins.readFile ./.version); 16 | 17 | src = builtins.path { 18 | name = "netdaemon-src"; 19 | path = ./.; 20 | filter = file: type: 21 | (type == "directory" && any (s: hasInfix s file) srcDirs) 22 | || any (s: hasSuffix s file) srcPatterns; 23 | }; 24 | 25 | preBuild = '' 26 | mv HomeAssistantGenerated HomeAssistantGenerated.cs 27 | ''; 28 | 29 | projectFile = "netdaemon.csproj"; 30 | nugetDeps = ./deps.json; 31 | 32 | dotnet-sdk = dotnetCorePackages.sdk_9_0; 33 | dotnet-runtime = dotnetCorePackages.runtime_9_0; 34 | executables = []; 35 | 36 | postFixup = '' 37 | cp -r $out/lib/${pname} $netdaemonConfig 38 | ''; 39 | 40 | outputs = ["out" "netdaemonConfig"]; 41 | } 42 | -------------------------------------------------------------------------------- /configurations/homie/modules/home-assistant/netdaemon/program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reactive.Linq; 3 | using System.Reflection; 4 | 5 | using HomeAssistantGenerated; 6 | 7 | using Microsoft.Extensions.Hosting; 8 | 9 | using NetDaemon.AppModel; 10 | using NetDaemon.Extensions.Logging; 11 | using NetDaemon.Extensions.Scheduler; 12 | using NetDaemon.Extensions.Tts; 13 | using NetDaemon.Runtime; 14 | 15 | 16 | try 17 | { 18 | await Host.CreateDefaultBuilder(args) 19 | .UseNetDaemonDefaultLogging() 20 | .UseNetDaemonRuntime() 21 | .UseNetDaemonTextToSpeech() 22 | .ConfigureServices(static (_, services) => 23 | services 24 | .AddAppsFromAssembly(Assembly.GetExecutingAssembly()) 25 | .AddNetDaemonStateManager() 26 | .AddNetDaemonScheduler() 27 | .AddHomeAssistantGenerated() 28 | ) 29 | .Build() 30 | .RunAsync() 31 | .ConfigureAwait(false); 32 | } 33 | catch (Exception e) 34 | { 35 | Console.WriteLine($"Failed to start host... {e}"); 36 | throw; 37 | } 38 | -------------------------------------------------------------------------------- /configurations/nos/modules/comics/default.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | imports = [ 3 | ./jdownloader2 4 | ./kapowarr 5 | ./komga 6 | ]; 7 | } 8 | -------------------------------------------------------------------------------- /configurations/nos/modules/comics/jdownloader2/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | mainUser, 4 | pkgs, 5 | ... 6 | }: { 7 | virtualisation.docker.compose."jdownloader2".services."jdownloader2" = { 8 | image = pkgs.callPackage ./images/jdownloader2.nix pkgs; 9 | restart = "always"; 10 | 11 | environment = { 12 | USER_ID = toString config.users.users.${mainUser}.uid; 13 | GROUP_ID = toString config.users.users.${mainUser}.uid; 14 | KEEP_APP_RUNNING = 1; 15 | DARK_MODE = 1; 16 | TZ = "America/New_York"; 17 | }; 18 | 19 | ports = [ 20 | "5800:5800" 21 | ]; 22 | 23 | volumes = [ 24 | "/var/lib/jdownloader2:/config:rw" 25 | "/data/downloads/comics:/output:rw" 26 | ]; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /configurations/nos/modules/comics/jdownloader2/images/jdownloader2.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "docker.io/jlesage/jdownloader-2"; 4 | imageDigest = "sha256:a597e25a5be386cac5519f2fc705eadb786727f9f0f2c7440fb5585efa41973f"; 5 | hash = "sha256-kZRMR1cv5jad+BQkxgvuKIcVod42neszkU9/RPh7BNY="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/comics/kapowarr/default.nix: -------------------------------------------------------------------------------- 1 | {mainUser, ...}: { 2 | imports = [./module.nix]; 3 | 4 | services.kapowarr = { 5 | enable = true; 6 | port = 5676; 7 | urlBase = "/kapowarr"; 8 | 9 | user = mainUser; 10 | group = "users"; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /configurations/nos/modules/default.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | imports = [ 3 | ./comics 4 | ./docker 5 | ./homepage 6 | ./jellyfin 7 | ./llm 8 | ./mergerfs 9 | ./qbittorrent 10 | ./snapraid 11 | ./subtitles 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/forgejo/images/act_runner.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "vegardit/gitea-act-runner"; 4 | imageDigest = "sha256:ea3a776cd3d173a86afdaeedb90ea10fae3595d59f29e0f96a63d51a60213ad8"; 5 | hash = "sha256-f3AorhMnA0GZiNq0UK3hIs+hyvh/LHrW3MyQugnvHFw="; 6 | finalImageName = imageName; 7 | finalImageTag = "dind-latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/forgejo/images/forgejo.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "codeberg.org/forgejo/forgejo"; 4 | imageDigest = "sha256:53d3a4ec77f79fcf8f71b959fdf9fc59235a1dc8e064f5acd24edb0cc8b70325"; 5 | hash = "sha256-1ueS/UOEy0N7dYZf7b+GEY+2q6yugv3omzY2cDjpzMo="; 6 | finalImageName = imageName; 7 | finalImageTag = "11"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/forgejo/images/postgres.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "postgres"; 4 | imageDigest = "sha256:bbcaba1d74865ee6d6318b5e297d0df73d1f6b6d995cd892b60a2cf1440b716a"; 5 | hash = "sha256-DwLLgvKHCX571uTxgCDrUG9cpyVX/tcKHKBBHNa0Tl8="; 6 | finalImageName = imageName; 7 | finalImageTag = "14"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/freshrss/images/freshrss.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "freshrss/freshrss"; 4 | imageDigest = "sha256:f9733e2cdf754d82e25826324fb4cbf3d736d82e2d36bf8e379dd4f0eeee0932"; 5 | hash = "sha256-92YmrFgq3ATFa4GTHHTSR//SKccoYo/g4tfA7ZgZOWE="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/freshrss/images/postgres.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "postgres"; 4 | imageDigest = "sha256:bbcaba1d74865ee6d6318b5e297d0df73d1f6b6d995cd892b60a2cf1440b716a"; 5 | hash = "sha256-DwLLgvKHCX571uTxgCDrUG9cpyVX/tcKHKBBHNa0Tl8="; 6 | finalImageName = imageName; 7 | finalImageTag = "14"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/freshrss/images/rss-bridge.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "rssbridge/rss-bridge"; 4 | imageDigest = "sha256:cca783a163635ac0e948af321da7692b071565f1f2c0fd5eca40976fa2a7bd9d"; 5 | hash = "sha256-+5qhhoxa6qy0HmfUEdlG0ZIlQy+AsvyYY3xk40yH6tw="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/gameyfin/compose.nix: -------------------------------------------------------------------------------- 1 | { 2 | mainUID, 3 | mainGID, 4 | ... 5 | }: { 6 | config, 7 | pkgs, 8 | ... 9 | }: let 10 | inherit (config.sops) secrets; 11 | in { 12 | virtualisation.docker.compose."gameyfin" = { 13 | networks.proxy_net = {external = true;}; 14 | 15 | services."gameyfin" = { 16 | image = pkgs.callPackage ./images/gameyfin.nix pkgs; 17 | restart = "always"; 18 | user = "${mainUID}:${mainGID}"; 19 | 20 | env_file = [secrets.gameyfin.path]; 21 | environment.GAMEYFIN_USER = "mathis"; 22 | 23 | volumes = [ 24 | "/data/games:/opt/gameyfin-library" 25 | ]; 26 | 27 | expose = ["8080"]; 28 | ports = ["8074:8080"]; 29 | networks = ["proxy_net"]; 30 | }; 31 | }; 32 | 33 | # For accurate stack trace 34 | _file = ./compose.nix; 35 | } 36 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/gameyfin/images/gameyfin.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "grimsi/gameyfin"; 4 | imageDigest = "sha256:f7994b4d4da378d909c173115d71cfeb704980184e42db432bd309d51d92725e"; 5 | sha256 = "07a10aw1x2qbfpcva30l0b33lhxshrsacxr1ia0lbbsch655iymq"; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/hauk/compose.nix: -------------------------------------------------------------------------------- 1 | {...}: {pkgs, ...}: { 2 | virtualisation.docker.compose."hauk" = { 3 | networks.proxy_net = {external = true;}; 4 | 5 | services."hauk" = { 6 | image = pkgs.callPackage ./images/hauk.nix pkgs; 7 | restart = "always"; 8 | ports = ["3003:80"]; 9 | networks = ["proxy_net"]; 10 | 11 | volumes = ["${./config.php}:/etc/hauk/config.php:ro"]; 12 | }; 13 | }; 14 | 15 | # For accurate stack trace 16 | _file = ./compose.nix; 17 | } 18 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/hauk/images/hauk.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "bilde2910/hauk"; 4 | imageDigest = "sha256:c7614b8340c25d91f32bfd00ebb92f81c05a4506410849e83d9102ba6304400e"; 5 | sha256 = "0dx7g8hrm4gz5bwd2v12l0hvyvbwrf9yiyqsn1pvw62ii8j721zp"; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/immich/.gitignore: -------------------------------------------------------------------------------- 1 | # upload script with secrets 2 | upload.sh 3 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/immich/env: -------------------------------------------------------------------------------- 1 | PUBLIC_LOGIN_PAGE_MESSAGE= 2 | 3 | IMMICH_WEB_URL=http://immich_web:3000 4 | IMMICH_SERVER_URL=http://immich_server:3001 5 | IMMICH_MACHINE_LEARNING_URL=http://immich_machine_learning:3003 6 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/immich/images/machine-learning.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "ghcr.io/immich-app/immich-machine-learning"; 4 | imageDigest = "sha256:e157e0fa0d4363b0b6bab1923adab5951bbcdb71cd9016470bc6810dae21d115"; 5 | hash = "sha256-Pvz4YVx4b4A6M8VAD3YSqP6J3gkMkI8RZleoewSSV5k="; 6 | finalImageName = imageName; 7 | finalImageTag = "release"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/immich/images/postgres.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "ghcr.io/immich-app/postgres"; 4 | imageDigest = "sha256:b8a840254e8e2db8720db3700a104623da372056347e80b598f00dd4da8df568"; 5 | hash = "sha256-3AFzVH/zX+Ge3Q+Y7rZ9P5B7ZlNlAqy8pHsd2h26Bqo="; 6 | finalImageName = imageName; 7 | finalImageTag = "14-vectorchord0.3.0-pgvectors0.2.0"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/immich/images/redis.nix: -------------------------------------------------------------------------------- 1 | # Locked 2 | pkgs: 3 | pkgs.dockerTools.pullImage { 4 | imageName = "redis"; 5 | imageDigest = "sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3"; 6 | sha256 = "1d14llwfzjfpzyz7x1a46fzrrg3i6k7z89jqql3sfisb7i4kgp2j"; 7 | finalImageName = "redis"; 8 | finalImageTag = "6.2-alpine"; 9 | } 10 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/immich/images/server.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "ghcr.io/immich-app/immich-server"; 4 | imageDigest = "sha256:073fc04c7e3d18ace466c20763809cf17aa55765ed610f12971b392a6a80b50c"; 5 | hash = "sha256-a7gjJS0PYEn376PnUavSzKkvmlvykCItdrjP5F2Jcks="; 6 | finalImageName = imageName; 7 | finalImageTag = "release"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/bazarr/compose.nix: -------------------------------------------------------------------------------- 1 | { 2 | configPath, 3 | mainUID, 4 | mainGID, 5 | TZ, 6 | ... 7 | }: {pkgs, ...}: let 8 | rwPath = configPath + "/media/bazarr"; 9 | in { 10 | virtualisation.docker.compose."bazarr" = { 11 | networks.proxy_net = {external = true;}; 12 | 13 | services."bazarr" = { 14 | image = pkgs.callPackage ./images/bazarr.nix pkgs; 15 | restart = "always"; 16 | 17 | environment = { 18 | PUID = mainUID; 19 | PGID = mainGID; 20 | inherit TZ; 21 | }; 22 | 23 | ports = [ 24 | "6767:6767" 25 | ]; 26 | 27 | volumes = [ 28 | "${rwPath}/data:/config" 29 | "/data:/data" 30 | ]; 31 | 32 | cpus = 0.5; 33 | networks = ["proxy_net"]; 34 | }; 35 | }; 36 | 37 | # For accurate stack trace 38 | _file = ./compose.nix; 39 | } 40 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/bazarr/images/bazarr.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "ghcr.io/linuxserver/bazarr"; 4 | imageDigest = "sha256:81d76b6c13a7a9481440402f0fa0ff1dc6027d003447da28eb1ed150e1846af7"; 5 | hash = "sha256-s3/OC/a6uUBZsXFJlTojwdvhdnatUHWVsmXPiAoh2qc="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/jellystat/images/jellystat.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "cyfershepard/jellystat"; 4 | imageDigest = "sha256:683358900cff8d299fa93add731b2976d7c9bc49f9593f40f5351498fd488767"; 5 | hash = "sha256-7IQbvKZuTgaOuFnoKAF9AD24C9ZMhn09Hsycrkt+vXY="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/jellystat/images/postgres.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "postgres"; 4 | imageDigest = "sha256:78a275d4c891f7b3a33d3f1a78eda9f1d744954d9e20122bfdc97cdda25cddaf"; 5 | hash = "sha256-0cShBpvsoDyE5NmkPX5svlYTYVWVy0rrjwKLn0qYovY="; 6 | finalImageName = imageName; 7 | finalImageTag = "15.2"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/joal/compose.nix: -------------------------------------------------------------------------------- 1 | {configPath, ...}: {pkgs, ...}: let 2 | rwPath = configPath + "/media/joal"; 3 | in { 4 | virtualisation.docker.compose."joal" = { 5 | networks.proxy_net = {external = true;}; 6 | 7 | services."joal" = { 8 | image = pkgs.callPackage ./images/joal.nix pkgs; 9 | restart = "always"; 10 | 11 | volumes = ["${rwPath}/data:/data"]; 12 | ports = ["5656:5656"]; 13 | 14 | command = [ 15 | "--joal-conf=/data" 16 | "--spring.main.web-environment=true" 17 | "--server.port=5656" 18 | "--joal.ui.path.prefix=joal" 19 | "--joal.ui.secret-token=12345" 20 | ]; 21 | networks = ["proxy_net"]; 22 | }; 23 | }; 24 | 25 | # For accurate stack trace 26 | _file = ./compose.nix; 27 | } 28 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/joal/images/joal.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "anthonyraymond/joal"; 4 | imageDigest = "sha256:832718170bd2d3da97de1216a6fd2f3caf2d5d56065336320780dadaf4952c1e"; 5 | sha256 = "03wqqhpsjcdgr4q3n9vqyxb59324mxnwn8jn6kj2kb6zq8bz3qrj"; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/prowlarr/images/flaresolverr.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "alexfozor/flaresolverr"; 4 | imageDigest = "sha256:3e5e1335c31365b5b0d9a737097c6a719de0ba49fed7db65cd828d75ae1bbecb"; 5 | hash = "sha256-8FuBXLmqM/B/uuH/PJuKQIWhHnozSJ2RR0VI7m+rVDw="; 6 | finalImageName = imageName; 7 | finalImageTag = "pr-1300-experimental"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/prowlarr/images/prowlarr.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "ghcr.io/linuxserver/prowlarr"; 4 | imageDigest = "sha256:1a6cdd0cc2350f8527dab39bc8467c9a2553bbbcf75a2c66f882fc53d73d5deb"; 5 | hash = "sha256-syezQeHY+36bAmB2UVVBl8qlnZC7l6/ia6bDpFCHZRs="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/radarr/compose.nix: -------------------------------------------------------------------------------- 1 | { 2 | configPath, 3 | mainUID, 4 | mainGID, 5 | TZ, 6 | ... 7 | }: {pkgs, ...}: let 8 | rwPath = configPath + "/media/radarr"; 9 | in { 10 | virtualisation.docker.compose."radarr" = { 11 | networks.proxy_net = {external = true;}; 12 | 13 | services."radarr" = { 14 | image = pkgs.callPackage ./images/radarr.nix pkgs; 15 | restart = "always"; 16 | 17 | ports = ["7878:7878"]; 18 | 19 | environment = { 20 | PUID = mainUID; 21 | PGID = mainGID; 22 | inherit TZ; 23 | }; 24 | 25 | volumes = [ 26 | "${rwPath}/data:/config" 27 | "/data:/data" 28 | ]; 29 | 30 | cpus = 0.5; 31 | networks = ["proxy_net"]; 32 | }; 33 | }; 34 | 35 | # For accurate stack trace 36 | _file = ./compose.nix; 37 | } 38 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/radarr/images/radarr.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "ghcr.io/linuxserver/radarr"; 4 | imageDigest = "sha256:36e43720c130ec2d3ed80726d2134af3c6644729f4750abc830fdda7fa71d1e1"; 5 | hash = "sha256-jKUrc1XdkSPzAp661+8c/6z7vYWJC+//HtDVWuAxf1A="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/seerr/compose.nix: -------------------------------------------------------------------------------- 1 | { 2 | configPath, 3 | TZ, 4 | ... 5 | }: {pkgs, ...}: let 6 | rwPath = configPath + "/media/seerr"; 7 | in { 8 | virtualisation.docker.compose."seerr" = { 9 | networks.proxy_net = {external = true;}; 10 | 11 | services."seerr" = { 12 | image = pkgs.callPackage ./images/jellyseerr.nix pkgs; 13 | restart = "always"; 14 | 15 | environment = { 16 | LOG_LEVEL = "debug"; 17 | inherit TZ; 18 | }; 19 | 20 | volumes = [ 21 | "${rwPath}/data:/app/config" 22 | ]; 23 | 24 | networks = ["proxy_net"]; 25 | ports = ["5055:5055"]; 26 | }; 27 | }; 28 | 29 | # For accurate stack trace 30 | _file = ./compose.nix; 31 | } 32 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/seerr/images/jellyseerr.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "docker.io/fallenbagel/jellyseerr"; 4 | imageDigest = "sha256:2a611369ad1d0d501c2d051fc89b6246ff081fb4a30879fdc75642cf6a37b1a6"; 5 | hash = "sha256-9bl7VECU2oI/tHLuyOWUoTDz7KrrBX5s5AXZ7p0OB+w="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/sonarr/compose.nix: -------------------------------------------------------------------------------- 1 | { 2 | configPath, 3 | mainUID, 4 | mainGID, 5 | TZ, 6 | ... 7 | }: {pkgs, ...}: let 8 | rwPath = configPath + "/media/sonarr"; 9 | in { 10 | virtualisation.docker.compose."sonarr" = { 11 | networks.proxy_net = {external = true;}; 12 | 13 | services."sonarr" = { 14 | image = pkgs.callPackage ./images/sonarr.nix pkgs; 15 | restart = "always"; 16 | 17 | ports = ["8989:8989"]; 18 | 19 | environment = { 20 | PUID = mainUID; 21 | PGID = mainGID; 22 | inherit TZ; 23 | }; 24 | 25 | volumes = [ 26 | "${rwPath}/data:/config" 27 | "/data:/data" 28 | ]; 29 | 30 | cpus = 0.5; 31 | networks = ["proxy_net"]; 32 | }; 33 | }; 34 | 35 | # For accurate stack trace 36 | _file = ./compose.nix; 37 | } 38 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/media/sonarr/images/sonarr.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "ghcr.io/linuxserver/sonarr"; 4 | imageDigest = "sha256:cdf5eb3cfa207d46b066bfbb41b03576c67a1f6ecc8aba19146d0f7349ec79dc"; 5 | hash = "sha256-PtMnisCS1Tim/yqL+ZvAeuSCA0VUFkdhKJVqWCccOa8="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/music/jbots/compose.nix: -------------------------------------------------------------------------------- 1 | {configPath, ...}: {pkgs, ...}: let 2 | inherit (pkgs.selfPackages) jmusicbot; 3 | 4 | rwPath = configPath + "/music/jbots"; 5 | image = pkgs.callPackage ./images/jmusicbot.nix {inherit pkgs jmusicbot;}; 6 | in { 7 | virtualisation.docker.compose."jbots" = { 8 | networks.proxy_net = {external = true;}; 9 | 10 | services = { 11 | "musicbot_be" = { 12 | container_name = "be"; 13 | restart = "always"; 14 | inherit image; 15 | 16 | volumes = [ 17 | "${rwPath}/be:/jmb/config:rw" 18 | ]; 19 | networks = ["proxy_net"]; 20 | }; 21 | 22 | "musicbot_br" = { 23 | container_name = "br"; 24 | restart = "always"; 25 | inherit image; 26 | 27 | volumes = [ 28 | "${rwPath}/br:/jmb/config:rw" 29 | ]; 30 | networks = ["proxy_net"]; 31 | }; 32 | }; 33 | }; 34 | 35 | # For accurate stack trace 36 | _file = ./compose.nix; 37 | } 38 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/music/jbots/images/jmusicbot.nix: -------------------------------------------------------------------------------- 1 | # Locked 2 | { 3 | pkgs, 4 | jmusicbot, 5 | }: 6 | pkgs.dockerTools.buildLayeredImage { 7 | name = "jmusicbot-docker"; 8 | tag = jmusicbot.version; 9 | config = { 10 | created = "now"; 11 | Cmd = ["${jmusicbot}/bin/JMusicBot"]; 12 | WorkingDir = "/jmb/config"; 13 | Volumes."/jmb/config" = {}; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/nextcloud/images/nextcloud.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "nextcloud"; 4 | imageDigest = "sha256:1c04814ce2dbcf6123bd0dca2b52c356011ea61594d21768fe07659d0e97be5a"; 5 | hash = "sha256-DoYjlXvqf7b1Vox8Vbk+WINg727ewDdY1XV34qjuf4w="; 6 | finalImageName = imageName; 7 | finalImageTag = "fpm"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/nextcloud/images/nginx.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "nginx"; 4 | imageDigest = "sha256:fb39280b7b9eba5727c884a3c7810002e69e8f961cc373b89c92f14961d903a0"; 5 | hash = "sha256-FJ4s5hRkWmued25VmXn4pSdO8X1o/R7aY85RFwoZbiQ="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/nextcloud/images/onlyoffice.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "onlyoffice/documentserver"; 4 | imageDigest = "sha256:0daa2d1d414d49286bfa9495fc0c936e7e73edaf8944a61102a7a6353a952297"; 5 | hash = "sha256-HO2z4wjDWYTUWaOtrbPC0+XsxMMU/fBDykava6KVLiY="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/nextcloud/images/postgres.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "postgres"; 4 | imageDigest = "sha256:20e49432a20e1a63bb985977c32ec8f110bc609b93de35ad4f19c5486abcefaa"; 5 | sha256 = "0jxkjj726jb1hal4j1vyhnrmbpyrkvawq5nf3dpiad8h3zamvk66"; 6 | finalImageName = imageName; 7 | finalImageTag = "14.2-alpine"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/nextcloud/images/redis.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "redis"; 4 | imageDigest = "sha256:558d0845026fe0bf091a00c0ad647ffacf9df385d780d433ca70661f7276f834"; 5 | sha256 = "0bbbzjl2fc2wvwj45j4z8kff2fj82qjk5nsgi79bqzm72x428mjb"; 6 | finalImageName = imageName; 7 | finalImageTag = "7.0.0-alpine"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/resume/images/postgres.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "postgres"; 4 | imageDigest = "sha256:b86604df02ea670dcc56c4a769f283f71647e2d29c90d9edd069524ee6dcc3aa"; 5 | hash = "sha256-eKWzAWSC+uHdLcYTupE003XtHXO67JFI8RnHAu1PbzQ="; 6 | finalImageName = imageName; 7 | finalImageTag = "15-alpine"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/resume/images/resume-client.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "amruthpillai/reactive-resume"; 4 | imageDigest = "sha256:9cbe8efde6f489da05367b5b2d0f0097b397f76fa1dcefd0352f174e50221826"; 5 | sha256 = "1ybsnr91518m7v2g9drp2pdibml4rsfa5mqnrjckwq1ai9mlg1rj"; 6 | finalImageName = imageName; 7 | finalImageTag = "client-latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/resume/images/resume-server.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "amruthpillai/reactive-resume"; 4 | imageDigest = "sha256:f14519b5d72fab07a948ce0ac6ac8e09321f1b05865e9d951851467e8be0542f"; 5 | sha256 = "0znbhnixy22i80h2qjylsf8v0mg07scfirh2q5w8njf7sa52w0d6"; 6 | finalImageName = imageName; 7 | finalImageTag = "server-latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/vaultwarden/compose.nix: -------------------------------------------------------------------------------- 1 | {configPath, ...}: {pkgs, ...}: let 2 | rwPath = configPath + "/vaultwarden"; 3 | in { 4 | virtualisation.docker.compose."vaultwarden" = { 5 | networks.proxy_net = {external = true;}; 6 | 7 | services = { 8 | "public-vault" = { 9 | image = pkgs.callPackage ./images/vaultwarden.nix pkgs; 10 | restart = "always"; 11 | 12 | ports = ["8781:80"]; 13 | volumes = ["${rwPath}/public-data:/data"]; 14 | environment.WEBSOCKET_ENABLED = "true"; 15 | networks = ["proxy_net"]; 16 | }; 17 | 18 | "private-vault" = { 19 | image = pkgs.callPackage ./images/vaultwarden.nix pkgs; 20 | restart = "always"; 21 | 22 | ports = ["8780:80"]; 23 | volumes = ["${rwPath}/private-data:/data"]; 24 | environment.WEBSOCKET_ENABLED = "true"; 25 | networks = ["proxy_net"]; 26 | }; 27 | }; 28 | }; 29 | 30 | # For accurate stack trace 31 | _file = ./compose.nix; 32 | } 33 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/vaultwarden/images/vaultwarden.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "quay.io/vaultwarden/server"; 4 | imageDigest = "sha256:48267ea14d8649b2e553a5fe290c40b5dd94d54e9a24b26ae7134a75a659695f"; 5 | hash = "sha256-t3grj/7iUu7kFjjM05bE86CDj4/8OdN7GEEo15ocoRQ="; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/wg-easy/compose.nix: -------------------------------------------------------------------------------- 1 | {configPath, ...}: {pkgs, ...}: let 2 | rwPath = configPath + "/wg-easy"; 3 | in { 4 | virtualisation.docker.compose."wg-easy" = { 5 | networks.proxy_net = {external = true;}; 6 | 7 | services."wg-easy" = { 8 | image = pkgs.callPackage ./images/wg-easy.nix pkgs; 9 | restart = "always"; 10 | privileged = true; 11 | 12 | cap_add = [ 13 | "NET_ADMIN" 14 | "SYS_MODULE" 15 | ]; 16 | 17 | sysctls = [ 18 | "net.ipv4.ip_forward=1" 19 | "net.ipv4.conf.all.src_valid_mark=1" 20 | ]; 21 | 22 | environment = { 23 | WG_HOST = "nelim.org"; 24 | WG_PORT = "51820"; 25 | WG_DEFAULT_ADDRESS = "10.6.0.x"; 26 | WG_DEFAULT_DNS = "1.0.0.1"; 27 | }; 28 | 29 | volumes = [ 30 | "${rwPath}/data:/etc/wireguard" 31 | ]; 32 | 33 | ports = [ 34 | "53:51820/udp" 35 | "51822:51820/udp" 36 | "51821:51821/tcp" 37 | ]; 38 | 39 | networks = ["proxy_net"]; 40 | }; 41 | }; 42 | 43 | # For accurate stack trace 44 | _file = ./compose.nix; 45 | } 46 | -------------------------------------------------------------------------------- /configurations/nos/modules/docker/wg-easy/images/wg-easy.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "ghcr.io/wg-easy/wg-easy"; 4 | imageDigest = "sha256:66352ccb4b5095992550aa567df5118a5152b6ed31be34b0a8e118a3c3a35bf5"; 5 | sha256 = "0m41f39a68rmhv0k7fbxib7g42zpn06sgrv1iwzc6n946ad440al"; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/jellyfin/images/jfa-go.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "hrfee/jfa-go"; 4 | imageDigest = "sha256:309034846723832a2dd8d2384a31b51239011af571353a1ffc2daaa8c381a943"; 5 | hash = "sha256-hNEulEEJBWc+X9t10ypVf6QliM1TCEraGA6568EMwts="; 6 | finalImageName = imageName; 7 | finalImageTag = "unstable"; 8 | } 9 | -------------------------------------------------------------------------------- /configurations/nos/modules/jellyfin/jfa-go.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | ... 5 | }: let 6 | jellyService = config.systemd.services.jellyfin.serviceConfig; 7 | in { 8 | virtualisation.docker.compose."jfa-go" = { 9 | systemdDependencies = ["jellyfin.service"]; 10 | 11 | networks.proxy_net = {external = true;}; 12 | 13 | services."jfa-go" = { 14 | image = pkgs.callPackage ./images/jfa-go.nix pkgs; 15 | restart = "always"; 16 | 17 | ports = ["8056:8056"]; 18 | networks = ["proxy_net"]; 19 | 20 | volumes = [ 21 | "${jellyService.WorkingDirectory}/jfa-go:/data" 22 | "/etc/localtime:/etc/localtime:ro" 23 | ]; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /configurations/nos/modules/llm/default.nix: -------------------------------------------------------------------------------- 1 | {self, ...}: let 2 | tailscaleIP = "100.64.0.4"; 3 | in { 4 | imports = [self.nixosModules.wyoming-plus]; 5 | 6 | # In case tailscale is down 7 | boot.kernel.sysctl."net.ipv4.ip_nonlocal_bind" = 1; 8 | 9 | services = { 10 | # Speech-to-Text 11 | wyoming.faster-whisper.servers."en" = { 12 | enable = true; 13 | uri = "tcp://${tailscaleIP}:10300"; 14 | 15 | # see https://github.com/rhasspy/wyoming-faster-whisper/releases/tag/v2.0.0 16 | model = "medium"; 17 | language = "en"; 18 | device = "cuda"; 19 | }; 20 | 21 | # Text-to-Intent 22 | ollama = { 23 | enable = true; 24 | acceleration = "cuda"; 25 | 26 | host = tailscaleIP; 27 | port = 11434; 28 | 29 | loadModels = ["mistral-nemo"]; 30 | environmentVariables.OLLAMA_DEBUG = "1"; 31 | }; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /configurations/nos/modules/qbittorrent/default.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | imports = [ 3 | ./qbittorrent.nix 4 | ./wireguard.nix 5 | ]; 6 | 7 | users.groups."matt" = { 8 | gid = 1000; 9 | members = ["matt"]; 10 | }; 11 | 12 | services.qbittorrent = { 13 | enable = true; 14 | user = "matt"; 15 | group = "matt"; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /configurations/nos/modules/qbittorrent/vuetorrent.nix: -------------------------------------------------------------------------------- 1 | # This file was autogenerated. DO NOT EDIT! 2 | { 3 | version = "2.25.0"; 4 | url = "https://github.com/VueTorrent/VueTorrent/releases/download/v2.25.0/vuetorrent.zip"; 5 | hash = "sha256-Ixi6LVK+dgJLM7kSNfdSSb1wUpSuCqUmk2sCzkOrdFE="; 6 | } 7 | -------------------------------------------------------------------------------- /configurations/nos/modules/subtitles/convert.nix: -------------------------------------------------------------------------------- 1 | { 2 | writeShellApplication, 3 | ffmpeg-full, 4 | ... 5 | }: 6 | writeShellApplication { 7 | name = "convert-mkv"; 8 | 9 | runtimeInputs = [ffmpeg-full]; 10 | 11 | text = '' 12 | extension="$1" 13 | file="$2" 14 | 15 | new_file="''${file%."$extension"}.mkv" 16 | 17 | ffmpeg -i "$file" -c copy "$new_file" && 18 | rm "$file" 19 | ''; 20 | } 21 | -------------------------------------------------------------------------------- /configurations/nos/modules/subtitles/syncing.nix: -------------------------------------------------------------------------------- 1 | { 2 | bazarr-bulk, 3 | config, 4 | lib, 5 | system, 6 | writeShellApplication, 7 | ... 8 | }: let 9 | inherit (lib) getExe; 10 | 11 | bbPkg = bazarr-bulk.packages.${system}.default; 12 | in 13 | writeShellApplication { 14 | name = "bb"; 15 | text = '' 16 | exec ${getExe bbPkg} --config ${config.sops.secrets.bazarr-bulk.path} "$@" 17 | ''; 18 | } 19 | -------------------------------------------------------------------------------- /configurations/servivi/modules/default.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | imports = [ 3 | ./7-days-to-die 4 | ./binary-cache 5 | ./minecraft 6 | ./nfs 7 | ./pr-tracker 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /configurations/servivi/modules/nfs/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib) concatMapStringsSep concatStringsSep; 3 | in { 4 | services.nfs.server = { 5 | enable = true; 6 | createMountPoints = true; 7 | 8 | exports = let 9 | mkExport = dir: opts: ips: "/export${dir} ${ 10 | concatMapStringsSep " " 11 | (ip: ip + "(${concatStringsSep "," opts})") 12 | ips 13 | }"; 14 | 15 | mkRootExport = opts: ips: 16 | mkExport "" (opts ++ ["crossmnt" "fsid=0"]) ips; 17 | 18 | allowedIps = ["10.0.0.244" "100.64.0.8" "10.0.0.159" "100.64.0.9"]; 19 | options = ["rw" "no_root_squash" "no_subtree_check"]; 20 | in '' 21 | ${mkRootExport options allowedIps} 22 | ${mkExport "/caddy" options allowedIps} 23 | ${mkExport "/headscale" options allowedIps} 24 | ''; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /configurations/servivi/modules/pr-tracker/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pr-tracker, 4 | ... 5 | }: { 6 | imports = [pr-tracker.nixosModules.default]; 7 | 8 | services.pr-tracker = { 9 | enable = true; 10 | 11 | userAgent = "matt\'s pr-tracker"; 12 | githubApiTokenFile = config.sops.secrets.pr-tracker.path; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /configurations/wim/modules/default.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | imports = [ 3 | ./security 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /devShells/README.md: -------------------------------------------------------------------------------- 1 | # DevShells 2 | 3 | This directory contains every derivations for devShells exposed by this flake. 4 | 5 | ## List of my devShells found in `self.devShells` 6 | 7 | | Name | Description | 8 | | ---- | ----------- | 9 | | `c-lang` | c-lang shell to be loaded by my Neovim config dynamically. | 10 | | `csharp` | csharp shell to be loaded by my Neovim config dynamically. | 11 | | `flake` | Shell providing some utility scripts concerning the main flake. | 12 | | `json` | json shell to be loaded by my Neovim config dynamically. | 13 | | `lua` | lua shell to be loaded by my Neovim config dynamically. | 14 | | `markdown` | markdown shell to be loaded by my Neovim config dynamically. | 15 | | `netdaemon` | Shell that makes sure we have the right dotnet-sdk version for NetDaemon development. | 16 | | `node` | Shell that provides `bumpNpmDeps`, node and typescript. | 17 | | `qml` | qml shell to be loaded by my Neovim config dynamically. | 18 | | `rust` | rust shell to be loaded by my Neovim config dynamically. | 19 | | `subtitles-dev` | Shell that provides the dependencies for my subtitle management scripts. | 20 | | `web` | web shell to be loaded by my Neovim config dynamically. | 21 | -------------------------------------------------------------------------------- /devShells/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | self, 4 | ... 5 | }: let 6 | inherit (pkgs.lib) attrValues; 7 | 8 | neovimShells = import ./neovim-shells {inherit pkgs self;}; 9 | 10 | bumpNpmDeps = pkgs.writeShellApplication { 11 | name = "bumpNpmDeps"; 12 | runtimeInputs = attrValues { 13 | inherit 14 | (pkgs) 15 | prefetch-npm-deps 16 | nodejs_latest 17 | ; 18 | }; 19 | text = '' 20 | # this command might fail but still updates the main lockfile 21 | npm update --package-lock-only || true 22 | 23 | hash="$(prefetch-npm-deps ./package-lock.json)" 24 | echo "$hash" 25 | 26 | if [[ -f ./default.nix ]]; then 27 | sed -i "s#npmDepsHash = .*#npmDepsHash = \"$hash\";#" ./default.nix 28 | fi 29 | ''; 30 | }; 31 | in 32 | { 33 | flake = pkgs.callPackage ./flake {}; 34 | default = self.devShells.${pkgs.system}.flake; 35 | 36 | netdaemon = pkgs.callPackage ./netdaemon {}; 37 | 38 | node = pkgs.callPackage ./node {inherit bumpNpmDeps;}; 39 | 40 | subtitles-dev = pkgs.callPackage ./subtitle-dev {inherit bumpNpmDeps;}; 41 | } 42 | // neovimShells 43 | -------------------------------------------------------------------------------- /devShells/flake/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | writeShellApplication, 4 | # deps 5 | findutils, 6 | gnused, 7 | nix-output-monitor, 8 | ... 9 | }: 10 | mkShell { 11 | packages = [ 12 | (writeShellApplication { 13 | name = "mkIso"; 14 | 15 | runtimeInputs = [ 16 | nix-output-monitor 17 | ]; 18 | 19 | text = '' 20 | isoConfig="nixosConfigurations.live-image.config.system.build.isoImage" 21 | nom build "$FLAKE#$isoConfig" 22 | ''; 23 | }) 24 | 25 | (writeShellApplication { 26 | name = "fixUidChange"; 27 | 28 | runtimeInputs = [ 29 | findutils 30 | gnused 31 | ]; 32 | 33 | text = '' 34 | GROUP="$1" 35 | OLD_GID="$2" 36 | NEW_GID="$3" 37 | 38 | # Remove generated group entry 39 | sudo sed -i -e "/^$GROUP:/d" /etc/group 40 | 41 | # Change GID on existing files 42 | sudo find / -gid "$OLD_GID" -exec chgrp "$NEW_GID" {} + 43 | ''; 44 | }) 45 | ]; 46 | 47 | meta.description = '' 48 | Shell providing some utility scripts concerning the main flake. 49 | ''; 50 | } 51 | -------------------------------------------------------------------------------- /devShells/neovim-shells/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | self, 4 | ... 5 | }: let 6 | inherit (pkgs.lib) listToAttrs nameValuePair; 7 | mkLangsShells = langs: 8 | listToAttrs (map ( 9 | l: 10 | nameValuePair 11 | l 12 | ((pkgs.callPackage 13 | "${self}/homeManagerModules/neovim/langs/${l}/shell.nix" 14 | ({} // pkgs.selfPackages)) 15 | .overrideAttrs (o: { 16 | meta.description = "${l} shell to be loaded by my Neovim config dynamically."; 17 | })) 18 | ) 19 | langs); 20 | in 21 | mkLangsShells [ 22 | "c-lang" 23 | "csharp" 24 | "json" 25 | "kotlin" 26 | "lua" 27 | "markdown" 28 | "golang" 29 | "python" 30 | "qml" 31 | "rust" 32 | "web" 33 | ] 34 | -------------------------------------------------------------------------------- /devShells/netdaemon/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | dotnetCorePackages, 4 | ... 5 | }: 6 | mkShell { 7 | packages = [ 8 | dotnetCorePackages.sdk_9_0 9 | ]; 10 | 11 | meta.description = '' 12 | Shell that makes sure we have the right dotnet-sdk version for NetDaemon development. 13 | ''; 14 | } 15 | -------------------------------------------------------------------------------- /devShells/node/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | bumpNpmDeps, 4 | nodejs_latest, 5 | typescript, 6 | ... 7 | }: 8 | mkShell { 9 | packages = [ 10 | bumpNpmDeps 11 | nodejs_latest 12 | typescript 13 | ]; 14 | 15 | meta.description = '' 16 | Shell that provides `bumpNpmDeps`, node and typescript. 17 | ''; 18 | } 19 | -------------------------------------------------------------------------------- /devShells/subtitle-dev/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | bumpNpmDeps, 4 | ffmpeg-full, 5 | nodejs_latest, 6 | nodePackages, 7 | typescript, 8 | ... 9 | }: 10 | mkShell { 11 | packages = [ 12 | nodejs_latest 13 | typescript 14 | ffmpeg-full 15 | nodePackages.ts-node 16 | 17 | bumpNpmDeps 18 | ]; 19 | 20 | meta.description = '' 21 | Shell that provides the dependencies for my subtitle management scripts. 22 | ''; 23 | } 24 | -------------------------------------------------------------------------------- /homeManagerModules/README.md: -------------------------------------------------------------------------------- 1 | # HomeManagerModules 2 | 3 | This directory contains every home-manager modules exposed by this flake. 4 | 5 | ## List of my home-manager modules found in `self.homeManagerModules` 6 | 7 | | Name | Description | 8 | | ---- | ----------- | 9 | | `firefox` | Uses the home-manager firefox module to declare my custom configuration which includes my list of extensions, my adapted [firefox-gx](https://github.com/Godiesc/firefox-gx) theme and other settings. | 10 | | `neovim` | Uses the home-manager neovim module to declare my custom configuration and expands it with toggles for certain LSPs. This configuration loads corresponding devShells of the current language from `self.devShells` dynamically to support various LSPs. | 11 | | `shell` | Extends the bash home-manager options to set some bash options, aliases themes that follow Dracula Theme and settings for CLI programs, such as starship, trash-d, nix-comma, nix-direnv, git, etc. | 12 | -------------------------------------------------------------------------------- /homeManagerModules/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | self ? {}, 3 | description ? false, 4 | }: let 5 | module = mod: desc: 6 | if description 7 | then desc 8 | else mod; 9 | in { 10 | firefox = 11 | module 12 | (import ./firefox self) 13 | '' 14 | Uses the home-manager firefox module to declare my custom configuration 15 | which includes my list of extensions, my adapted [firefox-gx](https://github.com/Godiesc/firefox-gx) 16 | theme and other settings. 17 | ''; 18 | 19 | neovim = 20 | module 21 | (import ./neovim self) 22 | '' 23 | Uses the home-manager neovim module to declare my custom configuration 24 | and expands it with toggles for certain LSPs. This configuration loads 25 | corresponding devShells of the current language from `self.devShells` 26 | dynamically to support various LSPs. 27 | ''; 28 | 29 | shell = 30 | module 31 | (import ./shell self) 32 | '' 33 | Extends the bash home-manager options to set some bash options, aliases 34 | themes that follow Dracula Theme and settings for CLI programs, such as 35 | starship, trash-d, nix-comma, nix-direnv, git, etc. 36 | ''; 37 | } 38 | -------------------------------------------------------------------------------- /homeManagerModules/firefox/custom-css/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | stdenv, 3 | dart-sass, 4 | ... 5 | }: 6 | stdenv.mkDerivation { 7 | pname = "custom-css"; 8 | version = "0.0.0"; 9 | 10 | src = ./.; 11 | 12 | nativeBuildInputs = [dart-sass]; 13 | 14 | buildPhase = '' 15 | sass ./style.scss ./style.css 16 | ''; 17 | 18 | installPhase = '' 19 | cp -rf ./style.css $out 20 | ''; 21 | } 22 | -------------------------------------------------------------------------------- /homeManagerModules/firefox/custom-css/style.scss: -------------------------------------------------------------------------------- 1 | // Hide unused menu rows 2 | #appMenu-mainView .browser-toolbar>* #alltabs-button, 3 | #appMenu-fxa-status2, 4 | #appMenu-fxa-separator { 5 | display: none !important; 6 | } 7 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/.luarc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matt1432/nixos-configs/5bc3cdef2baab082990113b60651c496e4858fe0/homeManagerModules/neovim/.luarc.json -------------------------------------------------------------------------------- /homeManagerModules/neovim/git/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (lib) mkIf; 8 | 9 | cfg = config.programs.neovim; 10 | in { 11 | config = mkIf cfg.enable { 12 | programs.neovim.plugins = [ 13 | pkgs.vimPlugins.fugitive 14 | 15 | { 16 | # FIXME: wait for it to reach nixpkgs 17 | plugin = pkgs.vimPlugins.gitsigns-nvim.overrideAttrs rec { 18 | version = "1.0.2"; 19 | src = pkgs.fetchFromGitHub { 20 | owner = "lewis6991"; 21 | repo = "gitsigns.nvim"; 22 | tag = "v${version}"; 23 | hash = "sha256-qWusbKY+3d1dkW5oLYDyfSLdt1qFlJdDeXgFWqQ4hUI="; 24 | }; 25 | }; 26 | type = "lua"; 27 | config = 28 | # lua 29 | '' 30 | -- 31 | local gitsigns = require("gitsigns"); 32 | 33 | vim.keymap.set("v", "gs", function() 34 | gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }); 35 | end); 36 | 37 | gitsigns.setup(); 38 | ''; 39 | } 40 | ]; 41 | }; 42 | 43 | # For accurate stack trace 44 | _file = ./default.nix; 45 | } 46 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/c-lang/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | gcc, 4 | clang-tools, 5 | cmake-language-server, 6 | ... 7 | }: 8 | mkShell { 9 | packages = [ 10 | gcc 11 | clang-tools 12 | cmake-language-server 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/csharp/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | dotnetCorePackages, 4 | roslyn-ls, 5 | ... 6 | }: 7 | mkShell { 8 | packages = [ 9 | dotnetCorePackages.sdk_9_0 10 | roslyn-ls 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/golang/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | go, 4 | gopls, 5 | ... 6 | }: 7 | mkShell { 8 | packages = [ 9 | go 10 | gopls 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/hyprlang/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib) mkIf; 7 | 8 | cfg = config.programs.neovim; 9 | in { 10 | config = mkIf cfg.enable { 11 | programs = { 12 | neovim = { 13 | extraLuaConfig = 14 | # lua 15 | '' 16 | -- 17 | vim.filetype.add({ 18 | pattern = { [ '.*/hypr/.*%.conf' ] = 'hyprlang' }, 19 | }); 20 | 21 | vim.api.nvim_create_autocmd({ 'FileType', 'BufEnter' }, { 22 | pattern = 'hyprlang', 23 | command = 'setlocal ts=4 sw=4 sts=0 expandtab', 24 | }); 25 | ''; 26 | }; 27 | }; 28 | }; 29 | 30 | # For accurate stack trace 31 | _file = ./default.nix; 32 | } 33 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/json/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | vscode-langservers-extracted, 4 | yaml-language-server, 5 | ... 6 | }: 7 | mkShell { 8 | packages = [ 9 | vscode-langservers-extracted 10 | yaml-language-server 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/kotlin/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | gradle, 4 | kotlin-language-server, 5 | ... 6 | }: 7 | mkShell { 8 | packages = [ 9 | gradle 10 | kotlin-language-server 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/lua/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | lua-language-server, 4 | ... 5 | }: 6 | mkShell { 7 | packages = [ 8 | lua-language-server 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/markdown/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | pandoc, 4 | texlab, 5 | texliveFull, 6 | rubber, 7 | ... 8 | }: 9 | mkShell { 10 | packages = [ 11 | pandoc 12 | texlab 13 | texliveFull 14 | rubber 15 | ]; 16 | } 17 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/python/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | basedpyright, 4 | ruff, 5 | ... 6 | }: 7 | mkShell { 8 | packages = [ 9 | basedpyright 10 | ruff 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/qml/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | mkShell, 4 | kdePackages, 5 | quickshell, 6 | ... 7 | }: 8 | mkShell { 9 | packages = [ 10 | kdePackages.qtdeclarative 11 | ]; 12 | 13 | shellHook = '' 14 | export QML2_IMPORT_PATH="$QML2_IMPORT_PATH:${lib.makeSearchPath "lib/qt-6/qml" [ 15 | quickshell 16 | kdePackages.qtdeclarative 17 | ]}" 18 | ''; 19 | } 20 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/rust/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | cargo, 4 | rustc, 5 | rust-analyzer, 6 | rustfmt, 7 | ... 8 | }: 9 | mkShell { 10 | packages = [ 11 | cargo 12 | rustc 13 | rust-analyzer 14 | rustfmt 15 | ]; 16 | } 17 | -------------------------------------------------------------------------------- /homeManagerModules/neovim/langs/web/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | mkShell, 3 | neovim-node-client, 4 | nodejs_latest, 5 | vscode-langservers-extracted, 6 | nodePackages, 7 | some-sass-language-server, 8 | ... 9 | }: 10 | mkShell { 11 | packages = [ 12 | neovim-node-client 13 | nodejs_latest 14 | vscode-langservers-extracted 15 | 16 | nodePackages.npm 17 | 18 | some-sass-language-server 19 | ]; 20 | } 21 | -------------------------------------------------------------------------------- /homeManagerModules/shell/config/bashrc: -------------------------------------------------------------------------------- 1 | # Check git status of nix configs 2 | fetchNix() {( 3 | cd "$FLAKE" || exit 1 4 | git fetch --all --quiet 5 | GIT=$(git -c color.status=always status | 6 | grep -v -e "On branch" \ 7 | -e "up to date" \ 8 | -e 'use "git' \ 9 | -e "nothing to commit") 10 | 11 | CHECK=$(echo "$GIT" | sed '/^$/d') 12 | 13 | if [ "$CHECK" != "" ]; then 14 | echo "$GIT" 15 | echo 16 | fi 17 | )} 18 | 19 | # Check for internet 20 | if wget -q --spider https://git.nelim.org; then 21 | fetchNix 22 | else 23 | echo "Offline" 24 | fi 25 | 26 | # Pokemon Sprite 27 | pokemon-colorscripts -r 1-5 28 | -------------------------------------------------------------------------------- /homeManagerModules/shell/config/colorgrid.sh: -------------------------------------------------------------------------------- 1 | function colorgrid() { 2 | iter=16 3 | while [ $iter -lt 52 ] 4 | do 5 | second=$[$iter+36] 6 | third=$[$second+36] 7 | four=$[$third+36] 8 | five=$[$four+36] 9 | six=$[$five+36] 10 | seven=$[$six+36] 11 | if [ $seven -gt 250 ];then seven=$[$seven-251]; fi 12 | 13 | echo -en "\033[38;5;$(echo $iter)m█ " 14 | printf "%03d" $iter 15 | echo -en " \033[38;5;$(echo $second)m█ " 16 | printf "%03d" $second 17 | echo -en " \033[38;5;$(echo $third)m█ " 18 | printf "%03d" $third 19 | echo -en " \033[38;5;$(echo $four)m█ " 20 | printf "%03d" $four 21 | echo -en " \033[38;5;$(echo $five)m█ " 22 | printf "%03d" $five 23 | echo -en " \033[38;5;$(echo $six)m█ " 24 | printf "%03d" $six 25 | echo -en " \033[38;5;$(echo $seven)m█ " 26 | printf "%03d" $seven 27 | 28 | iter=$[$iter+1] 29 | printf '\r\n' 30 | done 31 | } 32 | -------------------------------------------------------------------------------- /homeManagerModules/shell/config/dracula/fzf.sh: -------------------------------------------------------------------------------- 1 | # Modified from https://github.com/dracula/fzf 2 | 3 | export FZF_DEFAULT_OPTS='--color=fg:#f8f8f2,hl:#bd93f9 --color=fg+:#f8f8f2,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4' 4 | -------------------------------------------------------------------------------- /homeManagerModules/shell/config/dracula/less.sh: -------------------------------------------------------------------------------- 1 | # Modified from https://github.com/dracula/man-pages 2 | 3 | #man-page colors 4 | export LESS_TERMCAP_mb=$'\e[1;31m' # begin bold 5 | export LESS_TERMCAP_md=$'\e[1;34m' # begin blink 6 | export LESS_TERMCAP_so=$'\e[01;45;37m' # begin reverse video 7 | export LESS_TERMCAP_us=$'\e[01;36m' # begin underline 8 | export LESS_TERMCAP_me=$'\e[0m' # reset bold/blink 9 | export LESS_TERMCAP_se=$'\e[0m' # reset reverse video 10 | export LESS_TERMCAP_ue=$'\e[0m' # reset underline 11 | -------------------------------------------------------------------------------- /homeManagerModules/shell/nix-tools/default.nix: -------------------------------------------------------------------------------- 1 | self: { 2 | config, 3 | lib, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (lib) mkIf; 8 | inherit (self.inputs) nix-index-db; 9 | 10 | cfg = config.programs.bash; 11 | in { 12 | imports = [nix-index-db.hmModules.nix-index]; 13 | 14 | config.programs = mkIf cfg.enable { 15 | direnv = { 16 | enable = true; 17 | enableBashIntegration = true; 18 | 19 | nix-direnv = { 20 | enable = true; 21 | package = pkgs.nix-direnv; 22 | }; 23 | }; 24 | 25 | nix-index-database.comma.enable = true; 26 | 27 | nix-index = { 28 | enable = true; 29 | enableBashIntegration = true; 30 | }; 31 | }; 32 | 33 | # For accurate stack trace 34 | _file = ./default.nix; 35 | } 36 | -------------------------------------------------------------------------------- /homeManagerModules/shell/trash/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (lib) elem mkIf; 8 | 9 | cfg = config.programs.bash; 10 | trashPkg = pkgs.selfPackages.trash-d; 11 | isCorrectPlatform = elem pkgs.system (trashPkg.meta.platforms or [pkgs.system]); 12 | in { 13 | config = mkIf (cfg.enable && isCorrectPlatform) { 14 | home.packages = [trashPkg]; 15 | 16 | programs.bash.shellAliases.rm = "trash"; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /inputs/README.md: -------------------------------------------------------------------------------- 1 | # Inputs 2 | 3 | To allow use of the full nix language for my inputs, I use [genflake](https://github.com/jorsn/flakegen). 4 | Therefore, the flake I edit is located at `$FLAKE/_outputs.nix`. 5 | 6 | I also prefer using a more descriptive format for my inputs like so: 7 | 8 | ```nix 9 | nixpkgs = { 10 | type = "github"; 11 | owner = "NixOS"; 12 | repo = "nixpkgs"; 13 | 14 | # Branch name 15 | ref = "nixos-unstable"; 16 | 17 | # Pin this input to a specific commit 18 | rev = "842d9d80cfd4560648c785f8a4e6f3b096790e19"; 19 | }; 20 | ``` 21 | 22 | to make it more clear what is what in the flake URI 23 | -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | default: 2 | @just --list 3 | 4 | docs: 5 | nix run "$FLAKE"#gen-docs 6 | 7 | genflake: 8 | #!/usr/bin/env bash 9 | # Get changes from inputs/default.nix 10 | nix run "$FLAKE"#genflake "$FLAKE"/flake.nix && 11 | # Evaluate `follows` from new flake.lock 12 | nix run "$FLAKE"#genflake "$FLAKE"/flake.nix && 13 | # Make sure everything is right 14 | nix run "$FLAKE"#genflake "$FLAKE"/flake.nix 15 | 16 | alejandra -q "$FLAKE"/flake.nix 17 | 18 | [positional-arguments] 19 | l2s action list: 20 | nix run "$FLAKE"#list2series -- "$@" 21 | 22 | [positional-arguments] 23 | mc-mods version action='check': 24 | nix run "$FLAKE"#mc-mods -- "$@" 25 | 26 | [positional-arguments] 27 | pin args: 28 | nix run "$FLAKE"#pin-inputs -- "$@" 29 | 30 | [positional-arguments] 31 | up args: 32 | nix run "$FLAKE"#update-sources -- "$@" 33 | -------------------------------------------------------------------------------- /lib/README.md: -------------------------------------------------------------------------------- 1 | # Lib 2 | 3 | This directory contains Nix functions separated by what type or program they are associated with. 4 | 5 | | Attribute Set | Description | 6 | | ------------- | ------------------------------------------------------------------------------------------------ | 7 | | `attrs` | [Misc functions dealing with attribute sets](./attrs) | 8 | | `flake` | [Helper functions for top level flake outputs](./flake) | 9 | | `hypr` | [Helper functions to configure hyprland in a cleaner way](./hypr) | 10 | | `pkgs` | [Misc functions dealing with packages](./pkgs) | 11 | | `strings` | [Misc functions dealing with strings](./strings) | 12 | -------------------------------------------------------------------------------- /lib/attrs/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | foldl, 3 | hasAttr, 4 | isAttrs, 5 | isList, 6 | mergeAttrsWithFunc, 7 | unique, 8 | ... 9 | }: { 10 | inherit (import ../../inputs/lib.nix) recursiveUpdateList; 11 | 12 | throws = x: !(builtins.tryEval x).success; 13 | hasVersion = x: isAttrs x && hasAttr "version" x; 14 | mergeAttrsList = list: 15 | foldl (mergeAttrsWithFunc (a: b: 16 | if isList a && isList b 17 | then unique (a ++ b) 18 | else b)) {} 19 | list; 20 | } 21 | -------------------------------------------------------------------------------- /lib/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | perSystem, 3 | inputs, 4 | }: let 5 | attrs = import ./attrs inputs.nixpkgs.lib; 6 | flake = import ./flake inputs; 7 | hypr = import ./hypr inputs.nixpkgs.lib; 8 | strings = import ./strings inputs.nixpkgs.lib; 9 | 10 | lib = attrs // flake // hypr // strings; 11 | in 12 | # Expose main attrs 13 | lib 14 | # Expose all funcs 15 | // {inherit attrs flake hypr strings;} 16 | # Expose funcs that require pkgs 17 | // perSystem ( 18 | pkgs: 19 | (import ./pkgs { 20 | inherit pkgs; 21 | inherit (inputs) self; 22 | }) 23 | // lib 24 | ) 25 | -------------------------------------------------------------------------------- /lib/pkgs/mk-types/.envrc: -------------------------------------------------------------------------------- 1 | use flake $FLAKE#node 2 | -------------------------------------------------------------------------------- /lib/pkgs/mk-types/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pname, 4 | withGirNames, 5 | buildNpmPackage, 6 | ts-for-gir-src, 7 | ... 8 | }: let 9 | inherit (lib) concatMapStringsSep; 10 | 11 | buildPhase = '' 12 | npx @ts-for-gir/cli generate \ 13 | ${concatMapStringsSep "\n" (p: " ${p.girName} \\") withGirNames} 14 | ${concatMapStringsSep "\n" (p: " -g ${p.package.dev or p.package}/share/gir-1.0 \\") withGirNames} 15 | -g ${ts-for-gir-src}/girs \ 16 | --ignoreVersionConflicts \ 17 | -o ./types 18 | ''; 19 | in 20 | buildNpmPackage { 21 | pname = "${pname}-types"; 22 | version = "0.0.0"; 23 | 24 | npmDepsHash = "sha256-i79w2zQb6vCUvKuzUqcW8B17OmW07zq0d5ALx2uW9tI="; 25 | 26 | src = ./.; 27 | dontNpmBuild = true; 28 | 29 | buildPhase = '' 30 | echo -e '\n${buildPhase}\n' 31 | ${buildPhase} 32 | ''; 33 | 34 | installPhase = '' 35 | cp -r ./types $out 36 | ''; 37 | } 38 | -------------------------------------------------------------------------------- /lib/pkgs/mk-types/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@ts-for-gir/cli": "4.0.0-beta.23" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /lib/strings/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | concatStrings, 3 | stringToCharacters, 4 | substring, 5 | tail, 6 | toUpper, 7 | ... 8 | }: { 9 | mkVersion = src: "0.0.0+" + src.shortRev; 10 | capitalise = str: (toUpper (substring 0 1 str) + (concatStrings (tail (stringToCharacters str)))); 11 | } 12 | -------------------------------------------------------------------------------- /modules/ags/config/.envrc: -------------------------------------------------------------------------------- 1 | use flake "$FLAKE#node" 2 | -------------------------------------------------------------------------------- /modules/ags/config/.gitignore: -------------------------------------------------------------------------------- 1 | @girs 2 | node_modules 3 | -------------------------------------------------------------------------------- /modules/ags/config/app.ts: -------------------------------------------------------------------------------- 1 | // TODO: see if I can bundle each config separately with nix 2 | 3 | import { programArgs } from 'system'; 4 | 5 | import binto from './configurations/binto'; 6 | import wim from './configurations/wim'; 7 | 8 | import greeter from './configurations/greeter'; 9 | 10 | 11 | switch (programArgs[0]) { 12 | case 'binto': binto(); break; 13 | 14 | case 'wim': wim(); break; 15 | 16 | case 'greeter': greeter(); break; 17 | } 18 | -------------------------------------------------------------------------------- /modules/ags/config/configurations/greeter.ts: -------------------------------------------------------------------------------- 1 | import { subprocess } from 'astal'; 2 | import { App } from 'astal/gtk3'; 3 | 4 | import Greeter from '../widgets/greeter'; 5 | 6 | import style from '../style/greeter.scss'; 7 | 8 | 9 | export default () => { 10 | App.start({ 11 | css: style, 12 | instanceName: 'greeter', 13 | 14 | main: () => { 15 | Greeter(subprocess('hyprpaper')); 16 | }, 17 | }); 18 | }; 19 | -------------------------------------------------------------------------------- /modules/ags/config/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | npmDepsHash = "sha256-KC/Sk9Q1ORB8UkNMOHWbbp470FCSfFDtUxuRy9Hye/c="; 3 | } 4 | -------------------------------------------------------------------------------- /modules/ags/config/env.d.ts: -------------------------------------------------------------------------------- 1 | declare const SRC: string; 2 | 3 | declare module 'inline:*' { 4 | const content: string; 5 | 6 | export default content; 7 | } 8 | 9 | declare module '*.scss' { 10 | const content: string; 11 | 12 | export default content; 13 | } 14 | 15 | declare module '*.blp' { 16 | const content: string; 17 | 18 | export default content; 19 | } 20 | 21 | declare module '*.css' { 22 | const content: string; 23 | 24 | export default content; 25 | } 26 | -------------------------------------------------------------------------------- /modules/ags/config/lib/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cairo'; 2 | export * from './hypr'; 3 | export * from './notify'; 4 | export * from './windows'; 5 | -------------------------------------------------------------------------------- /modules/ags/config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ags", 3 | "version": "0.0.0", 4 | "main": "app.ts", 5 | "dependencies": { 6 | "astal": "https://gitpkg.vercel.app/Aylur/astal/lang/gjs/src?7f2292f0792ffc9b127d4788b3dd3f104b5374b2", 7 | "@eslint/js": "9.28.0", 8 | "@stylistic/eslint-plugin": "4.4.0", 9 | "eslint": "9.28.0", 10 | "eslint-plugin-jsdoc": "50.7.1", 11 | "fzf": "0.5.2", 12 | "jiti": "2.4.2", 13 | "typescript-eslint": "8.33.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/ags/config/style/common.scss: -------------------------------------------------------------------------------- 1 | @use 'colors'; 2 | 3 | window, 4 | viewport, 5 | stack { 6 | all: unset; 7 | } 8 | 9 | progressbar { 10 | border-radius: 999px; 11 | background: transparent; 12 | border: none; 13 | 14 | trough { 15 | background: #363847; 16 | min-height: inherit; 17 | border-radius: inherit; 18 | border: none; 19 | } 20 | 21 | progress { 22 | background: #79659f; 23 | min-height: inherit; 24 | border-radius: inherit; 25 | border: none; 26 | } 27 | 28 | &:disabled { 29 | opacity: 0.5; 30 | } 31 | } 32 | 33 | scale { 34 | contents { 35 | trough { 36 | min-height: 10px; 37 | } 38 | } 39 | } 40 | 41 | circularprogress { 42 | background: #363847; 43 | min-height: 35px; 44 | min-width: 35px; 45 | font-size: 4px; 46 | color: #79659f; 47 | 48 | &.disabled { 49 | opacity: 0.5; 50 | } 51 | } 52 | 53 | .widget { 54 | margin: 10px; 55 | padding: 5px; 56 | border-radius: 7px; 57 | background-color: colors.$window_bg_color; 58 | box-shadow: 8px 8px colors.$accent_color; 59 | } 60 | -------------------------------------------------------------------------------- /modules/ags/config/style/greeter.scss: -------------------------------------------------------------------------------- 1 | @use 'colors'; 2 | 3 | window { 4 | all: unset; 5 | background-color: transparent; 6 | } 7 | 8 | 9 | .base { 10 | background-color: colors.$window_bg_color; 11 | border: 1.3px solid colors.$accent_bg_color; 12 | border-radius: 12px; 13 | padding: 5px; 14 | } 15 | 16 | dropdown popover.menu { 17 | padding-top: 0; 18 | } 19 | -------------------------------------------------------------------------------- /modules/ags/config/style/main.scss: -------------------------------------------------------------------------------- 1 | @use 'common'; 2 | 3 | @use '../widgets/applauncher'; 4 | @use '../widgets/audio'; 5 | @use '../widgets/bar'; 6 | @use '../widgets/bluetooth'; 7 | @use '../widgets/clipboard'; 8 | @use '../widgets/date'; 9 | @use '../widgets/icon-browser'; 10 | @use '../widgets/media-player'; 11 | @use '../widgets/misc'; 12 | @use '../widgets/network'; 13 | @use '../widgets/notifs'; 14 | @use '../widgets/on-screen-display'; 15 | @use '../widgets/on-screen-keyboard'; 16 | @use '../widgets/powermenu'; 17 | @use '../widgets/screenshot'; 18 | -------------------------------------------------------------------------------- /modules/ags/config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "compilerOptions": { 4 | "experimentalDecorators": true, 5 | "jsx": "react-jsx", 6 | "jsxImportSource": "astal/gtk3", 7 | "lib": [ 8 | "ES2022" 9 | ], 10 | "module": "ES2022", 11 | "moduleResolution": "Bundler", 12 | "noEmit": true, 13 | "skipLibCheck": true, 14 | "strict": true, 15 | "target": "ES2022" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/applauncher/_index.scss: -------------------------------------------------------------------------------- 1 | .applauncher { 2 | .app { 3 | margin: 20px; 4 | font-size: 16px; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/applauncher/launch.ts: -------------------------------------------------------------------------------- 1 | import { execAsync } from 'astal'; 2 | 3 | import AstalApps from 'gi://AstalApps'; 4 | 5 | 6 | const bash = async(strings: TemplateStringsArray | string, ...values: unknown[]) => { 7 | const cmd = typeof strings === 'string' ? 8 | strings : 9 | strings.flatMap((str, i) => `${str}${values[i] ?? ''}`) 10 | .join(''); 11 | 12 | return execAsync(['bash', '-c', cmd]).catch((err) => { 13 | console.error(cmd, err); 14 | 15 | return ''; 16 | }); 17 | }; 18 | 19 | export const launchApp = (app: AstalApps.Application) => { 20 | const exe = app.executable 21 | .split(/\s+/) 22 | .filter((str) => !str.startsWith('%') && !str.startsWith('@')) 23 | .join(' '); 24 | 25 | bash(`${exe} &`); 26 | 27 | app.set_frequency(app.get_frequency() + 1); 28 | }; 29 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/audio/_index.scss: -------------------------------------------------------------------------------- 1 | @use 'sass:color'; 2 | @use '../../style/colors'; 3 | 4 | .widget.audio { 5 | .header { 6 | .header-btn { 7 | font-size: 30px; 8 | margin: 5px; 9 | transition: background 400ms; 10 | 11 | &.active { 12 | background: colors.$window_bg_color; 13 | } 14 | } 15 | } 16 | 17 | scrollable { 18 | margin: 5px; 19 | min-height: 400px; 20 | 21 | box { 22 | .item-btn { 23 | margin: 3px; 24 | } 25 | } 26 | } 27 | 28 | .stream { 29 | margin: 5px; 30 | padding: 10px; 31 | border-radius: 8px; 32 | background-color: color.adjust(colors.$window_bg_color, $lightness: -3%); 33 | 34 | .body { 35 | .toggle { 36 | padding: 5px; 37 | 38 | icon { 39 | font-size: 26px; 40 | } 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/audio/binto.tsx: -------------------------------------------------------------------------------- 1 | import { Astal } from 'astal/gtk3'; 2 | 3 | import PopupWindow from '../misc/popup-window'; 4 | import { get_gdkmonitor_from_desc } from '../../lib'; 5 | 6 | import AudioWidget from './main'; 7 | 8 | 9 | export default () => ( 10 | 16 | 17 | 18 | ); 19 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/audio/wim.tsx: -------------------------------------------------------------------------------- 1 | import { Astal } from 'astal/gtk3'; 2 | 3 | import PopupWindow from '../misc/popup-window'; 4 | 5 | import AudioWidget from './main'; 6 | 7 | 8 | export default () => ( 9 | 13 | 14 | 15 | ); 16 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/bar/items/heart.tsx: -------------------------------------------------------------------------------- 1 | import { Variable } from 'astal'; 2 | 3 | import Persist from '../../misc/persist'; 4 | 5 | const HeartState = Variable(''); 6 | 7 | Persist({ 8 | name: 'heart', 9 | variable: HeartState, 10 | condition: '', 11 | whenFalse: '󰣐', 12 | }); 13 | 14 | 15 | export default () => ( 16 | 29 | ); 30 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/bg-layer/index.tsx: -------------------------------------------------------------------------------- 1 | import { Astal, Gdk } from 'astal/gtk3'; 2 | 3 | 4 | export default ( 5 | monitor = Gdk.Display.get_default()?.get_monitor(0) as Gdk.Monitor, 6 | gradient = true, 7 | ) => { 8 | return ( 9 | 34 | ); 35 | }; 36 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/bluetooth/_index.scss: -------------------------------------------------------------------------------- 1 | @use 'sass:color'; 2 | @use '../../style/colors'; 3 | 4 | .bluetooth.widget { 5 | margin-top: 0; 6 | 7 | * { 8 | font-size: 20px; 9 | } 10 | 11 | row { 12 | all: unset; 13 | } 14 | 15 | .toggle-button { 16 | padding: 4px; 17 | min-width: 30px; 18 | min-height: 30px; 19 | 20 | transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out; 21 | 22 | box-shadow: 2px 1px 2px colors.$accent-color; 23 | margin: 4px 4px 4px 4px; 24 | background-color: colors.$window_bg_color; 25 | 26 | &.active { 27 | box-shadow: 0 0 0 white; 28 | margin: 6px 4px 2px 4px; 29 | background-color: color.adjust(colors.$window_bg_color, $lightness: -3%); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/bluetooth/wim.tsx: -------------------------------------------------------------------------------- 1 | import { Astal } from 'astal/gtk3'; 2 | 3 | import PopupWindow from '../misc/popup-window'; 4 | 5 | import BluetoothWidget from './main'; 6 | 7 | 8 | export default () => ( 9 | 13 | 14 | 15 | ); 16 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/brightness-slider/main.tsx: -------------------------------------------------------------------------------- 1 | import { bind } from 'astal'; 2 | import { Astal, Gtk } from 'astal/gtk3'; 3 | 4 | import Brightness from '../../services/brightness'; 5 | 6 | import PopupWindow from '../misc/popup-window'; 7 | 8 | 9 | export default () => { 10 | const brightness = Brightness.get_default(); 11 | 12 | return ( 13 | 17 | 18 | v * 100)} 28 | onDragged={(self) => { 29 | brightness.screen = Number((self.value / 100).toFixed(2)); 30 | }} 31 | /> 32 | 33 | 34 | ); 35 | }; 36 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/clipboard/_index.scss: -------------------------------------------------------------------------------- 1 | .clipboard .list row box { 2 | margin: 20px; 3 | font-size: 16px; 4 | } 5 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/clipboard/cliphist.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # https://github.com/koeqaife/hyprland-material-you/blob/d23cf9d524522c8c215664c2c3334c2b51609cae/ags/scripts/cliphist.sh 3 | 4 | get() { 5 | cliphist list | iconv -f "$(locale charmap)" -t UTF-8 -c 6 | } 7 | 8 | copy_by_id() { 9 | id=$1 10 | cliphist decode "$id" | wl-copy 11 | } 12 | 13 | clear() { 14 | cliphist wipe 15 | } 16 | 17 | save_cache_file() { 18 | id=$1 19 | 20 | output_file="/tmp/ags/cliphist/$id.png" 21 | 22 | if [[ ! -f "$output_file" ]]; then 23 | mkdir -p "/tmp/ags/cliphist/" 24 | cliphist decode "$id" >"$output_file" 25 | fi 26 | 27 | echo "$output_file" 28 | } 29 | 30 | clear_tmp() { 31 | rm "/tmp/ags/cliphist/*" 32 | } 33 | 34 | if [[ "$1" == "--get" ]]; then 35 | get 36 | elif [[ "$1" == "--copy-by-id" ]]; then 37 | { copy_by_id "$2"; } 38 | elif [[ "$1" == "--save-by-id" ]]; then 39 | { save_cache_file "$2"; } 40 | elif [[ "$1" == "--clear-cache" ]]; then 41 | clear_tmp 42 | elif [[ "$1" == "--clear" ]]; then 43 | clear 44 | fi 45 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/date/binto.tsx: -------------------------------------------------------------------------------- 1 | import { Astal } from 'astal/gtk3'; 2 | 3 | import PopupWindow from '../misc/popup-window'; 4 | import { get_gdkmonitor_from_desc } from '../../lib'; 5 | 6 | import DateWidget from './main'; 7 | 8 | 9 | export default () => ( 10 | 16 | 17 | 18 | ); 19 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/date/wim.tsx: -------------------------------------------------------------------------------- 1 | import { Astal } from 'astal/gtk3'; 2 | 3 | import PopupWindow from '../misc/popup-window'; 4 | 5 | import DateWidget from './main'; 6 | 7 | 8 | export default () => ( 9 | 13 | 14 | 15 | ); 16 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/icon-browser/_index.scss: -------------------------------------------------------------------------------- 1 | .icon-browser .list row box { 2 | margin: 20px; 3 | font-size: 16px; 4 | } 5 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/misc/_index.scss: -------------------------------------------------------------------------------- 1 | @use '../../style/colors'; 2 | 3 | .sorted-list { 4 | .search { 5 | icon { 6 | font-size: 20px; 7 | min-width: 40px; 8 | min-height: 40px 9 | } 10 | 11 | // entry {} 12 | } 13 | 14 | .list { 15 | row { 16 | border-radius: 10px; 17 | 18 | &:hover, &:selected { 19 | icon { 20 | -gtk-icon-shadow: 2px 2px colors.$accent_color; 21 | } 22 | } 23 | } 24 | 25 | .placeholder { 26 | font-size: 20px; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/misc/separator.tsx: -------------------------------------------------------------------------------- 1 | import { Widget } from 'astal/gtk3'; 2 | 3 | 4 | export default ({ 5 | size, 6 | vertical = false, 7 | css = '', 8 | ...rest 9 | }: { size: number } & Widget.BoxProps) => ( 10 | 14 | ); 15 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/network/_index.scss: -------------------------------------------------------------------------------- 1 | @use 'sass:color'; 2 | @use '../../style/colors'; 3 | 4 | .network.widget { 5 | margin-top: 0; 6 | 7 | * { 8 | font-size: 20px; 9 | } 10 | 11 | row { 12 | all: unset; 13 | } 14 | 15 | .toggle-button { 16 | padding: 4px; 17 | min-width: 30px; 18 | min-height: 30px; 19 | 20 | transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out; 21 | 22 | box-shadow: 2px 1px 2px colors.$accent-color; 23 | margin: 4px 4px 4px 4px; 24 | background-color: colors.$window_bg_color; 25 | 26 | &.active { 27 | box-shadow: 0 0 0 white; 28 | margin: 6px 4px 2px 4px; 29 | background-color: color.adjust(colors.$window_bg_color, $lightness: -3%); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/network/wim.tsx: -------------------------------------------------------------------------------- 1 | import { Astal } from 'astal/gtk3'; 2 | 3 | import PopupWindow from '../misc/popup-window'; 4 | 5 | import NetworkWidget from './main'; 6 | 7 | 8 | export default () => ( 9 | 13 | 14 | 15 | ); 16 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/notifs/binto.tsx: -------------------------------------------------------------------------------- 1 | import { Astal } from 'astal/gtk3'; 2 | 3 | import PopupWindow from '../misc/popup-window'; 4 | import { get_gdkmonitor_from_desc } from '../../lib'; 5 | 6 | import Popups from './popups'; 7 | import Center from './center'; 8 | 9 | 10 | export const NotifPopups = () => ( 11 | 18 | 19 | 20 | ); 21 | 22 | export const NotifCenter = () => ( 23 | 29 |
30 | 31 | ); 32 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/notifs/wim.tsx: -------------------------------------------------------------------------------- 1 | import { Astal } from 'astal/gtk3'; 2 | 3 | import PopupWindow from '../misc/popup-window'; 4 | 5 | import Popups from './popups'; 6 | import Center from './center'; 7 | 8 | 9 | export const NotifPopups = () => ( 10 | 16 | 17 | 18 | ); 19 | 20 | export const NotifCenter = () => ( 21 | 25 |
26 | 27 | ); 28 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/on-screen-display/_index.scss: -------------------------------------------------------------------------------- 1 | .osd { 2 | .osd-item { 3 | padding: 12px 20px; 4 | 5 | label { 6 | min-width: 170px; 7 | } 8 | 9 | progressbar { 10 | min-height: 6px; 11 | min-width: 170px; 12 | } 13 | 14 | icon { 15 | font-size: 2rem; 16 | color: white; 17 | margin-left: -0.4rem; 18 | margin-right: 0.8rem; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/on-screen-keyboard/index.tsx: -------------------------------------------------------------------------------- 1 | import { execAsync } from 'astal'; 2 | import { Astal } from 'astal/gtk3'; 3 | 4 | import OskWindow from './osk-window'; 5 | import Gesture from './gesture'; 6 | import Keyboard from './keyboard'; 7 | 8 | 9 | export default () => { 10 | execAsync('ydotoold').catch(() => { /**/ }); 11 | 12 | return Gesture(( 13 | 24 | 25 | 26 | ) as OskWindow); 27 | }; 28 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/on-screen-keyboard/osk-window.tsx: -------------------------------------------------------------------------------- 1 | import { App, Widget } from 'astal/gtk3'; 2 | import { register } from 'astal/gobject'; 3 | 4 | 5 | @register() 6 | export default class OskWindow extends Widget.Window { 7 | public startY: number | null = null; 8 | 9 | declare public killGestureSigs: () => void; 10 | declare public setSlideUp: () => void; 11 | declare public setSlideDown: () => void; 12 | 13 | get_child(): Widget.Box { 14 | return super.get_child() as Widget.Box; 15 | } 16 | 17 | get_grandchildren(): (Widget.Box | Widget.CenterBox)[] { 18 | return this.get_child().get_children() as (Widget.Box | Widget.CenterBox)[]; 19 | } 20 | 21 | constructor({ ...rest }: Widget.WindowProps) { 22 | super({ application: App, ...rest }); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/powermenu/_index.scss: -------------------------------------------------------------------------------- 1 | @use 'sass:color'; 2 | @use '../../style/colors'; 3 | 4 | .powermenu { 5 | padding: 10px; 6 | 7 | icon { 8 | font-size: 70px; 9 | min-width: 130px; 10 | min-height: 130px; 11 | } 12 | 13 | label { 14 | font-size: 50px; 15 | } 16 | 17 | button { 18 | margin: 5px 10px; 19 | transition: all ease .2s; 20 | 21 | &:hover, 22 | &:active { 23 | background-color: color.adjust(colors.$window_bg_color, $lightness: 3%); 24 | } 25 | } 26 | 27 | .shutdown { 28 | color: colors.$red_1; 29 | } 30 | .reboot { 31 | color: colors.$purple_1; 32 | } 33 | .logout { 34 | color: colors.$yellow_1; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/screenshot/_index.scss: -------------------------------------------------------------------------------- 1 | @use '../../style/colors'; 2 | 3 | .screenshot { 4 | font-size: 30px; 5 | 6 | .header { 7 | .header-btn { 8 | margin: 5px; 9 | transition: background 400ms; 10 | 11 | &.active { 12 | background: colors.$window_bg_color; 13 | } 14 | } 15 | } 16 | 17 | scrollable { 18 | margin: 5px; 19 | min-height: 400px; 20 | 21 | box { 22 | .item-btn { 23 | margin: 3px; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /modules/ags/config/widgets/screenshot/capture.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ "$1" == "region" ]]; then 4 | if [[ "$2" == "true" ]]; then 5 | wayfreeze & PID=$! 6 | sleep .1 7 | fi 8 | 9 | selection="$(slurp)" 10 | 11 | if [[ "$2" == "true" ]]; then 12 | kill "$PID" 13 | fi 14 | 15 | exec grim -g "$selection" - | satty -f - || true 16 | else 17 | exec grim "$@" - | satty -f - || true 18 | fi 19 | -------------------------------------------------------------------------------- /modules/ags/gtk4/.envrc: -------------------------------------------------------------------------------- 1 | use flake "$FLAKE#node" 2 | -------------------------------------------------------------------------------- /modules/ags/gtk4/.gitignore: -------------------------------------------------------------------------------- 1 | @girs 2 | node_modules 3 | -------------------------------------------------------------------------------- /modules/ags/gtk4/app.ts: -------------------------------------------------------------------------------- 1 | import { programArgs } from 'system'; 2 | 3 | import lock from './configurations/lock'; 4 | 5 | 6 | switch (programArgs[0]) { 7 | case 'lock': lock(); break; 8 | } 9 | -------------------------------------------------------------------------------- /modules/ags/gtk4/configurations/lock.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'astal/gtk4'; 2 | 3 | import Lockscreen from '../widgets/lockscreen'; 4 | 5 | import style from '../style.scss'; 6 | 7 | 8 | export default () => { 9 | App.start({ 10 | css: style, 11 | instanceName: 'lock', 12 | 13 | requestHandler(js, res) { 14 | App.eval(js).then(res).catch(res); 15 | }, 16 | 17 | main: () => { 18 | Lockscreen(); 19 | }, 20 | }); 21 | }; 22 | -------------------------------------------------------------------------------- /modules/ags/gtk4/env.d.ts: -------------------------------------------------------------------------------- 1 | declare const SRC: string; 2 | 3 | declare module 'inline:*' { 4 | const content: string; 5 | 6 | export default content; 7 | } 8 | 9 | declare module '*.scss' { 10 | const content: string; 11 | 12 | export default content; 13 | } 14 | 15 | declare module '*.blp' { 16 | const content: string; 17 | 18 | export default content; 19 | } 20 | 21 | declare module '*.css' { 22 | const content: string; 23 | 24 | export default content; 25 | } 26 | -------------------------------------------------------------------------------- /modules/ags/gtk4/lib/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cairo'; 2 | export * from './hypr'; 3 | export * from './notify'; 4 | export * from './windows'; 5 | -------------------------------------------------------------------------------- /modules/ags/gtk4/package-lock.json: -------------------------------------------------------------------------------- 1 | ../config/package-lock.json -------------------------------------------------------------------------------- /modules/ags/gtk4/package.json: -------------------------------------------------------------------------------- 1 | ../config/package.json -------------------------------------------------------------------------------- /modules/ags/gtk4/style.scss: -------------------------------------------------------------------------------- 1 | @use './widgets/lockscreen'; 2 | 3 | // https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss 4 | $fg-color: #{"@theme_fg_color"}; 5 | $bg-color: #{"@theme_bg_color"}; 6 | 7 | window.Bar { 8 | background: transparent; 9 | color: $fg-color; 10 | font-weight: bold; 11 | 12 | >centerbox { 13 | background: $bg-color; 14 | border-radius: 10px; 15 | margin: 8px; 16 | } 17 | 18 | button { 19 | border-radius: 8px; 20 | margin: 2px; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/ags/gtk4/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "compilerOptions": { 4 | "experimentalDecorators": true, 5 | "lib": [ 6 | "ES2022" 7 | ], 8 | "module": "ES2022", 9 | "moduleResolution": "Bundler", 10 | "noEmit": true, 11 | "skipLibCheck": true, 12 | "strict": true, 13 | "target": "ES2022" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/astalify/bindings.ts: -------------------------------------------------------------------------------- 1 | import { Variable } from 'astal'; 2 | import { Binding } from 'astal/binding'; 3 | 4 | 5 | export const mergeBindings = ( 6 | array: (Value | Binding | Binding)[], 7 | ): Value[] | Binding => { 8 | const getValues = (args: Value[]) => { 9 | let i = 0; 10 | 11 | return array.map((value) => value instanceof Binding ? 12 | args[i++] : 13 | value); 14 | }; 15 | 16 | const bindings = array.filter((i) => i instanceof Binding); 17 | 18 | if (bindings.length === 0) { 19 | return array as Value[]; 20 | } 21 | 22 | if (bindings.length === 1) { 23 | return (bindings[0] as Binding).as(getValues); 24 | } 25 | 26 | return Variable.derive(bindings, getValues)(); 27 | }; 28 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/astalify/index.ts: -------------------------------------------------------------------------------- 1 | import astalify from './astalify'; 2 | 3 | export default astalify; 4 | 5 | export { 6 | type AstalifyProps, 7 | type BindableProps, 8 | type ConstructProps, 9 | childType, 10 | } from './generics'; 11 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/lockscreen/_index.scss: -------------------------------------------------------------------------------- 1 | window, 2 | viewport { 3 | all: unset; 4 | } 5 | 6 | .lock-clock { 7 | font-size: 80pt; 8 | font-family: 'Ubuntu Mono'; 9 | } 10 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/misc/separator.ts: -------------------------------------------------------------------------------- 1 | import { Box, BoxProps } from '../subclasses'; 2 | 3 | 4 | export default ({ 5 | size, 6 | vertical = false, 7 | css = '', 8 | ...rest 9 | }: { size: number } & BoxProps) => Box({ 10 | css: `* { ${vertical ? 'min-height' : 'min-width'}: ${size}px; ${css} }`, 11 | ...rest, 12 | } as BoxProps); 13 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/box.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Astal, Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | export type BoxProps = ConstructProps< 8 | BoxClass, 9 | Astal.Box.ConstructorProps & AstalifyProps 10 | >; 11 | 12 | @register({ GTypeName: 'Box' }) 13 | export class BoxClass extends astalify(Astal.Box) { 14 | constructor({ cssName = 'box', ...props }: BoxProps = {}) { 15 | super({ cssName, ...props }); 16 | } 17 | 18 | getChildren(self: BoxClass) { 19 | return self.get_children(); 20 | } 21 | 22 | setChildren(self: BoxClass, children: Gtk.Widget[]) { 23 | return self.set_children(children); 24 | } 25 | } 26 | 27 | export const Box = (props?: BoxProps) => new BoxClass(props); 28 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/button.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | type ButtonSignals = Record<`on${string}`, unknown[]> & { 8 | onClicked: [] 9 | }; 10 | export type ButtonProps = ConstructProps< 11 | ButtonClass, 12 | Gtk.Button.ConstructorProps & AstalifyProps, 13 | ButtonSignals 14 | >; 15 | 16 | @register({ GTypeName: 'Button' }) 17 | export class ButtonClass extends astalify(Gtk.Button) { 18 | constructor({ cssName = 'button', ...props }: ButtonProps = {}) { 19 | super({ cssName, ...props }); 20 | } 21 | } 22 | 23 | export const Button = (props?: ButtonProps) => new ButtonClass(props); 24 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/calendar.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | type CalendarSignals = Record<`on${string}`, unknown[]> & { 8 | onDaySelected: [] 9 | onNextMonth: [] 10 | onNextYear: [] 11 | onPrevMonth: [] 12 | onPrevYear: [] 13 | 14 | }; 15 | export type CalendarProps = ConstructProps< 16 | CalendarClass, 17 | Gtk.Calendar.ConstructorProps & AstalifyProps, 18 | CalendarSignals 19 | >; 20 | 21 | @register({ GTypeName: 'Calendar' }) 22 | export class CalendarClass extends astalify(Gtk.Calendar) { 23 | constructor({ cssName = 'calendar', ...props }: CalendarProps = {}) { 24 | super({ cssName, ...props }); 25 | } 26 | } 27 | 28 | export const Calendar = (props?: CalendarProps) => new CalendarClass(props); 29 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/entry.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | type EntrySignals = Record<`on${string}`, unknown[]> & { 8 | onActivate: [] 9 | onNotifyText: [] 10 | }; 11 | export type EntryProps = ConstructProps< 12 | EntryClass, 13 | Gtk.Entry.ConstructorProps & AstalifyProps, 14 | EntrySignals 15 | >; 16 | 17 | @register({ GTypeName: 'Entry' }) 18 | export class EntryClass extends astalify(Gtk.Entry) { 19 | constructor({ cssName = 'entry', ...props }: EntryProps = {}) { 20 | super({ cssName, ...props }); 21 | } 22 | 23 | getChildren() { return []; } 24 | } 25 | 26 | export const Entry = (props?: EntryProps) => new EntryClass(props); 27 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/image.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | export type ImageProps = ConstructProps< 8 | ImageClass, 9 | Gtk.Image.ConstructorProps & AstalifyProps 10 | >; 11 | 12 | @register({ GTypeName: 'Image' }) 13 | export class ImageClass extends astalify(Gtk.Image) { 14 | constructor({ cssName = 'image', ...props }: ImageProps = {}) { 15 | super({ cssName, ...props }); 16 | } 17 | 18 | getChildren() { return []; } 19 | } 20 | 21 | export const Image = (props?: ImageProps) => new ImageClass(props); 22 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/index.ts: -------------------------------------------------------------------------------- 1 | export * from './box'; 2 | export * from './button'; 3 | export * from './calendar'; 4 | export * from './centerbox'; 5 | export * from './entry'; 6 | export * from './image'; 7 | export * from './label'; 8 | export * from './levelbar'; 9 | export * from './menubutton'; 10 | export * from './overlay'; 11 | export * from './popover'; 12 | export * from './revealer'; 13 | export * from './slider'; 14 | export * from './stack'; 15 | export * from './switch'; 16 | export * from './window'; 17 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/label.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | export type LabelProps = ConstructProps< 8 | LabelClass, 9 | Gtk.Label.ConstructorProps & AstalifyProps 10 | >; 11 | 12 | @register({ GTypeName: 'Label' }) 13 | export class LabelClass extends astalify(Gtk.Label) { 14 | constructor({ cssName = 'label', ...props }: LabelProps = {}) { 15 | super({ cssName, ...props }); 16 | } 17 | 18 | getChildren() { return []; } 19 | } 20 | 21 | export const Label = (props?: LabelProps) => new LabelClass(props); 22 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/levelbar.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | export type LevelBarProps = ConstructProps< 8 | LevelBarClass, 9 | Gtk.LevelBar.ConstructorProps & AstalifyProps 10 | >; 11 | 12 | @register({ GTypeName: 'LevelBar' }) 13 | export class LevelBarClass extends astalify(Gtk.LevelBar) { 14 | constructor({ cssName = 'levelbar', ...props }: LevelBarProps = {}) { 15 | super({ cssName, ...props }); 16 | } 17 | 18 | getChildren() { return []; } 19 | } 20 | 21 | export const LevelBar = (props?: LevelBarProps) => new LevelBarClass(props); 22 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/menubutton.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | export type MenuButtonProps = ConstructProps< 8 | MenuButtonClass, 9 | Gtk.MenuButton.ConstructorProps & AstalifyProps 10 | >; 11 | 12 | @register({ GTypeName: 'MenuButton' }) 13 | export class MenuButtonClass extends astalify(Gtk.MenuButton) { 14 | constructor({ cssName = 'menubutton', ...props }: MenuButtonProps = {}) { 15 | super({ cssName, ...props }); 16 | } 17 | 18 | getChildren(self: MenuButtonClass) { 19 | return [self.popover, self.child]; 20 | } 21 | 22 | setChildren(self: MenuButtonClass, children: Gtk.Widget[]) { 23 | for (const child of children) { 24 | if (child instanceof Gtk.Popover) { 25 | self.set_popover(child); 26 | } 27 | else { 28 | self.set_child(child); 29 | } 30 | } 31 | } 32 | } 33 | 34 | export const MenuButton = (props?: MenuButtonProps) => new MenuButtonClass(props); 35 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/popover.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | export type PopoverProps = ConstructProps< 8 | PopoverClass, 9 | Gtk.Popover.ConstructorProps & AstalifyProps 10 | >; 11 | 12 | @register({ GTypeName: 'Popover' }) 13 | export class PopoverClass extends astalify(Gtk.Popover) { 14 | constructor({ cssName = 'popover', ...props }: PopoverProps = {}) { 15 | super({ cssName, ...props }); 16 | } 17 | } 18 | 19 | export const Popover = (props?: PopoverProps) => new PopoverClass(props); 20 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/revealer.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | export type RevealerProps = ConstructProps< 8 | RevealerClass, 9 | Gtk.Revealer.ConstructorProps & AstalifyProps 10 | >; 11 | 12 | @register({ GTypeName: 'Revealer' }) 13 | export class RevealerClass extends astalify(Gtk.Revealer) { 14 | constructor({ cssName = 'revealer', ...props }: RevealerProps = {}) { 15 | super({ cssName, ...props }); 16 | } 17 | } 18 | 19 | export const Revealer = (props?: RevealerProps) => new RevealerClass(props); 20 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/slider.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Astal } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | type SliderSignals = Record<`on${string}`, unknown[]> & { 8 | onClicked: [] 9 | }; 10 | export type SliderProps = ConstructProps< 11 | SliderClass, 12 | Astal.Slider.ConstructorProps & AstalifyProps, 13 | SliderSignals 14 | >; 15 | 16 | @register({ GTypeName: 'Slider' }) 17 | export class SliderClass extends astalify(Astal.Slider) { 18 | constructor({ cssName = 'slider', ...props }: SliderProps = {}) { 19 | super({ cssName, ...props }); 20 | } 21 | 22 | getChildren() { return []; } 23 | } 24 | 25 | export const Slider = (props?: SliderProps) => new SliderClass(props); 26 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/stack.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | export type StackProps = ConstructProps< 8 | StackClass, 9 | Gtk.Stack.ConstructorProps & AstalifyProps 10 | >; 11 | 12 | @register({ GTypeName: 'Stack' }) 13 | export class StackClass extends astalify(Gtk.Stack) { 14 | constructor({ cssName = 'stack', ...props }: StackProps = {}) { 15 | super({ cssName, ...props }); 16 | } 17 | 18 | setChildren(self: StackClass, children: Gtk.Widget[]) { 19 | for (const child of children) { 20 | if (child.name !== '' && child.name !== null) { 21 | self.add_named(child, child.name); 22 | } 23 | else { 24 | self.add_child(child); 25 | } 26 | } 27 | } 28 | } 29 | 30 | export const Stack = (props?: StackProps) => new StackClass(props); 31 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/switch.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Gtk } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | export type SwitchProps = ConstructProps< 8 | SwitchClass, 9 | Gtk.Switch.ConstructorProps & AstalifyProps 10 | >; 11 | 12 | @register({ GTypeName: 'Switch' }) 13 | export class SwitchClass extends astalify(Gtk.Switch) { 14 | constructor({ cssName = 'switch', ...props }: SwitchProps = {}) { 15 | super({ cssName, ...props }); 16 | } 17 | 18 | getChildren() { return []; } 19 | } 20 | 21 | export const Switch = (props?: SwitchProps) => new SwitchClass(props); 22 | -------------------------------------------------------------------------------- /modules/ags/gtk4/widgets/subclasses/window.ts: -------------------------------------------------------------------------------- 1 | import { register } from 'astal'; 2 | import { Astal } from 'astal/gtk4'; 3 | 4 | import astalify, { type AstalifyProps, type ConstructProps } from '../astalify'; 5 | 6 | 7 | export type WindowProps = ConstructProps< 8 | WindowClass, 9 | Astal.Window.ConstructorProps & AstalifyProps 10 | >; 11 | 12 | @register({ GTypeName: 'Window' }) 13 | export class WindowClass extends astalify(Astal.Window) { 14 | constructor({ cssName = 'window', ...props }: WindowProps = {}) { 15 | super({ cssName, ...props }); 16 | } 17 | } 18 | 19 | export const Window = (props?: WindowProps) => new WindowClass(props); 20 | -------------------------------------------------------------------------------- /modules/ags/icons.nix: -------------------------------------------------------------------------------- 1 | { 2 | agsConfigDir, 3 | pkgs, 4 | ... 5 | }: { 6 | "${agsConfigDir}/icons/down-large-symbolic.svg".source = pkgs.fetchurl { 7 | url = "https://www.svgrepo.com/download/158537/down-chevron.svg"; 8 | hash = "sha256-mOfNjgZh0rt6XosKA2kpLY22lJldSS1XCphgrnvZH1s="; 9 | }; 10 | 11 | "${agsConfigDir}/icons/nixos-logo-symbolic.svg".text = 12 | # xml 13 | '' 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | ''; 28 | } 29 | -------------------------------------------------------------------------------- /modules/base/common-nix/default.nix: -------------------------------------------------------------------------------- 1 | self: { 2 | config, 3 | lib, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (self.inputs) nixd nixpkgs; 8 | inherit (self.lib) hasVersion throws; 9 | 10 | inherit (lib) attrValues filter findFirst hasAttr mkIf optionalString; 11 | 12 | inherit (config.sops.secrets) access-token; 13 | 14 | cfg = config.roles.base; 15 | 16 | nixdInput = 17 | findFirst 18 | (x: x.pname == "nix") {} 19 | nixd.packages.x86_64-linux.nixd.buildInputs; 20 | 21 | nixVersions = filter (x: ! throws x && hasVersion x) (attrValues pkgs.nixVersions); 22 | in { 23 | config = mkIf cfg.enable { 24 | nix = { 25 | package = findFirst (x: x.version == nixdInput.version) {} nixVersions; 26 | 27 | # Minimize dowloads of indirect nixpkgs flakes 28 | registry.nixpkgs.flake = nixpkgs; 29 | nixPath = ["nixpkgs=${nixpkgs}"]; 30 | 31 | extraOptions = 32 | optionalString (hasAttr "sops" config) 33 | "!include ${access-token.path}"; 34 | }; 35 | 36 | # Global hm settings 37 | home-manager.useGlobalPkgs = true; 38 | home-manager.useUserPackages = true; 39 | }; 40 | 41 | # For accurate stack trace 42 | _file = ./default.nix; 43 | } 44 | -------------------------------------------------------------------------------- /modules/base/default-droid.nix: -------------------------------------------------------------------------------- 1 | self: {lib, ...}: let 2 | inherit (lib) mkOption types; 3 | in { 4 | imports = [ 5 | (import ./common-nix self) 6 | (import ./packages self) 7 | ]; 8 | 9 | options.roles.base = { 10 | enable = mkOption { 11 | type = types.bool; 12 | default = true; 13 | }; 14 | 15 | user = mkOption { 16 | type = types.str; 17 | }; 18 | }; 19 | 20 | # For accurate stack trace 21 | _file = ./default.nix; 22 | } 23 | -------------------------------------------------------------------------------- /modules/borgbackup/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib) mkIf; 7 | 8 | cfg = config.services.borgbackup; 9 | in { 10 | imports = [./module.nix]; 11 | 12 | config = mkIf (cfg.configs != {}) { 13 | services.borgbackup = { 14 | existingRepos = [ 15 | { 16 | name = "docker"; 17 | host = "nos"; 18 | authorizedKeys = [ 19 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPijoxuSwH9IrS4poewzHHwe64UoX4QY7Qix5VhEdqKR root@servivi" 20 | ]; 21 | } 22 | 23 | { 24 | name = "mc"; 25 | host = "servivi"; 26 | authorizedKeys = [ 27 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPijoxuSwH9IrS4poewzHHwe64UoX4QY7Qix5VhEdqKR root@servivi" 28 | ]; 29 | } 30 | 31 | { 32 | name = "seven-days"; 33 | host = "nos"; 34 | authorizedKeys = [ 35 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPijoxuSwH9IrS4poewzHHwe64UoX4QY7Qix5VhEdqKR root@servivi" 36 | ]; 37 | } 38 | ]; 39 | }; 40 | }; 41 | 42 | # For accurate stack trace 43 | _file = ./default.nix; 44 | } 45 | -------------------------------------------------------------------------------- /modules/desktop/environment/config/dolphinrc: -------------------------------------------------------------------------------- 1 | MenuBar=Disabled 2 | 3 | [$Version] 4 | update_info=dolphin_detailsmodesettings.upd:rename-leading-padding 5 | 6 | [General] 7 | ShowFullPath=true 8 | Version=202 9 | ViewPropsTimestamp=2023,5,12,19,59,9.33 10 | 11 | [Icons] 12 | Theme=Flat-Remix-Violet-Dark 13 | 14 | [KFileDialog Settings] 15 | Places Icons Auto-resize=false 16 | Places Icons Static Size=22 17 | 18 | [KPropertiesDialog] 19 | 1920x1200 screen: Height=567 20 | 1920x1200 screen: Width=604 21 | 1920x1200 screen: Window-Maximized=true 22 | 3 screens: Window-Maximized=true 23 | 24 | [MainWindow] 25 | MenuBar=Disabled 26 | 27 | [PreviewSettings] 28 | Plugins=comicbookthumbnail,ebookthumbnail,imagethumbnail,jpegthumbnail,windowsexethumbnail,windowsimagethumbnail,svgthumbnail,textthumbnail 29 | 30 | [ViewPropertiesDialog] 31 | 1920x1200 screen: Window-Maximized=true 32 | 33 | [UiSettings] 34 | ColorScheme=* 35 | -------------------------------------------------------------------------------- /modules/desktop/environment/config/kdeglobals: -------------------------------------------------------------------------------- 1 | [General] 2 | TerminalApplication=foot 3 | 4 | [KFileDialog Settings] 5 | Allow Expansion=false 6 | Automatically select filename extension=true 7 | Breadcrumb Navigation=false 8 | Decoration position=2 9 | LocationCombo Completionmode=5 10 | PathCombo Completionmode=5 11 | Show Bookmarks=false 12 | Show Full Path=false 13 | Show Inline Previews=true 14 | Show Preview=false 15 | Show Speedbar=true 16 | Show hidden files=true 17 | Sort by=Name 18 | Sort directories first=true 19 | Sort hidden files last=false 20 | Sort reversed=false 21 | Speedbar Width=189 22 | View Style=DetailTree 23 | 24 | [PreviewSettings] 25 | MaximumRemoteSize=0 26 | -------------------------------------------------------------------------------- /modules/desktop/environment/config/kiorc: -------------------------------------------------------------------------------- 1 | [Confirmations] 2 | ConfirmDelete=true 3 | ConfirmEmptyTrash=true 4 | ConfirmTrash=false 5 | 6 | [Executable scripts] 7 | behaviourOnLaunch=alwaysAsk 8 | -------------------------------------------------------------------------------- /modules/desktop/environment/config/mimeapps.list: -------------------------------------------------------------------------------- 1 | [Added Associations] 2 | application/pdf=firefox-devedition.desktop;wine-extension-pdf.desktop;okularApplication_pdf.desktop;com.github.xournalpp.xournalpp.desktop;draw.desktop;sioyek.desktop; 3 | application/zip=org.kde.ark.desktop;org.prismlauncher.PrismLauncher.desktop; 4 | image/jpeg=org.photoqt.PhotoQt.desktop;wine-extension-jpe.desktop;satty.desktop;okularApplication_kimgio.desktop;wine-extension-jfif.desktop; 5 | image/png=swayimg.desktop;okularApplication_kimgio.desktop;firefox.desktop;satty.desktop; 6 | text/plain=nvim.desktop;writer.desktop;okularApplication_txt.desktop;wine-extension-txt.desktop; 7 | text/x-java=nvim.desktop; 8 | 9 | [Default Applications] 10 | application/pdf=firefox-devedition.desktop; 11 | application/zip=org.kde.ark.desktop; 12 | image/jpeg=swayimg.desktop; 13 | image/png=swayimg.desktop; 14 | text/plain=nvim.desktop; 15 | text/x-java=nvim.desktop; 16 | x-scheme-handler/discord-712465656758665259=discord-712465656758665259.desktop 17 | x-scheme-handler/ror2mm=r2modman.desktop 18 | 19 | [Removed Associations] 20 | application/pdf=firefox-3.desktop;firefox-2.desktop; 21 | -------------------------------------------------------------------------------- /modules/desktop/environment/home/obs.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | osConfig, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (lib) attrValues mkIf; 8 | 9 | cfg = osConfig.roles.desktop; 10 | in { 11 | config = mkIf cfg.enable { 12 | programs = { 13 | obs-studio = { 14 | enable = true; 15 | plugins = attrValues { 16 | inherit 17 | (pkgs.obs-studio-plugins) 18 | droidcam-obs 19 | wlrobs 20 | ; 21 | }; 22 | }; 23 | }; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /modules/desktop/environment/modules/audio.nix: -------------------------------------------------------------------------------- 1 | self: { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (self.inputs) nix-gaming; 7 | 8 | inherit (lib) mkIf; 9 | 10 | cfg = config.roles.desktop; 11 | in { 12 | imports = [nix-gaming.nixosModules.pipewireLowLatency]; 13 | 14 | config = mkIf cfg.enable { 15 | services = { 16 | pulseaudio.enable = false; 17 | 18 | pipewire = { 19 | enable = true; 20 | alsa.enable = true; 21 | jack.enable = true; 22 | pulse.enable = true; 23 | lowLatency.enable = true; 24 | 25 | extraConfig.pipewire-pulse.combine-sink = { 26 | "pulse.cmd" = [ 27 | { 28 | cmd = "load-module"; 29 | args = "module-combine-sink"; 30 | } 31 | ]; 32 | }; 33 | }; 34 | }; 35 | }; 36 | 37 | # For accurate stack trace 38 | _file = ./audio.nix; 39 | } 40 | -------------------------------------------------------------------------------- /modules/desktop/environment/modules/dconf.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib) mkIf; 7 | 8 | cfg = config.roles.desktop; 9 | in { 10 | config = mkIf cfg.enable { 11 | programs.dconf.enable = true; 12 | 13 | home-manager.users.${cfg.user} = { 14 | dconf.settings = { 15 | "org/virt-manager/virt-manager/connections" = { 16 | autoconnect = ["qemu:///system"]; 17 | uris = ["qemu:///system"]; 18 | }; 19 | 20 | "apps/seahorse/listing" = { 21 | keyrings-selected = ["gnupg://"]; 22 | }; 23 | 24 | "org/gtk/settings/file-chooser" = { 25 | show-hidden = true; 26 | }; 27 | 28 | "org/gnome/desktop/interface" = { 29 | color-scheme = "prefer-dark"; 30 | }; 31 | }; 32 | }; 33 | }; 34 | 35 | # For accurate stack trace 36 | _file = ./dconf.nix; 37 | } 38 | -------------------------------------------------------------------------------- /modules/desktop/environment/modules/printer.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (lib) attrValues mkIf; 8 | 9 | cfg = config.roles.desktop; 10 | in { 11 | config = mkIf cfg.enable { 12 | services = { 13 | # Enable CUPS to print documents. 14 | printing = { 15 | enable = true; 16 | 17 | drivers = attrValues { 18 | inherit 19 | (pkgs) 20 | hplip 21 | samsung-unified-linux-driver 22 | ; 23 | }; 24 | }; 25 | }; 26 | }; 27 | 28 | # For accurate stack trace 29 | _file = ./printer.nix; 30 | } 31 | -------------------------------------------------------------------------------- /modules/desktop/environment/modules/ratbag-mice.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (pkgs.selfPackages) libratbag piper; 8 | inherit (lib) mkIf; 9 | 10 | cfg = config.roles.desktop; 11 | in { 12 | config = mkIf cfg.enable { 13 | services.ratbagd = { 14 | enable = true; 15 | 16 | package = libratbag; 17 | }; 18 | 19 | environment.systemPackages = [ 20 | piper 21 | ]; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /modules/desktop/manager/default.nix: -------------------------------------------------------------------------------- 1 | self: { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib) getExe mkIf; 7 | 8 | cfg = config.roles.desktop; 9 | 10 | hyprland = 11 | config 12 | .home-manager 13 | .users 14 | .${cfg.user} 15 | .wayland 16 | .windowManager 17 | .hyprland 18 | .finalPackage; 19 | in { 20 | imports = [ 21 | (import ./ags self) 22 | (import ./hyprland self) 23 | ]; 24 | 25 | config = mkIf (cfg.enable && cfg.displayManager.enable) { 26 | services = { 27 | displayManager.sessionPackages = [hyprland]; 28 | 29 | greetd = { 30 | enable = true; 31 | settings = { 32 | default_session = { 33 | command = getExe hyprland; 34 | user = "greeter"; 35 | }; 36 | 37 | initial_session = { 38 | command = getExe hyprland; 39 | user = cfg.user; 40 | }; 41 | }; 42 | }; 43 | }; 44 | 45 | # unlock GPG keyring on login 46 | services.gnome.gnome-keyring.enable = true; 47 | security.pam.services.greetd.enableGnomeKeyring = true; 48 | }; 49 | 50 | # For accurate stack trace 51 | _file = ./default.nix; 52 | } 53 | -------------------------------------------------------------------------------- /modules/desktop/theme/cursors/default.nix: -------------------------------------------------------------------------------- 1 | self: { 2 | lib, 3 | osConfig, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (pkgs.scopedPackages) dracula; 8 | 9 | inherit (lib) mkIf; 10 | 11 | cfg = osConfig.roles.desktop; 12 | in { 13 | config = mkIf cfg.enable { 14 | home.pointerCursor = { 15 | name = "Dracula-cursors"; 16 | package = dracula.gtk; 17 | size = 24; 18 | 19 | gtk.enable = true; 20 | hyprcursor.enable = true; 21 | }; 22 | 23 | # Fixes Gtk4 apps complaining about mismatched cursor size 24 | wayland.windowManager.hyprland.settings = { 25 | exec-once = [ 26 | "gsettings set org.gnome.desktop.interface cursor-size 30" 27 | ]; 28 | }; 29 | }; 30 | 31 | # For accurate stack trace 32 | _file = ./default.nix; 33 | } 34 | -------------------------------------------------------------------------------- /modules/desktop/theme/default.nix: -------------------------------------------------------------------------------- 1 | self: { 2 | lib, 3 | osConfig, 4 | ... 5 | }: let 6 | inherit (lib) mkIf; 7 | 8 | cfg = osConfig.roles.desktop; 9 | in { 10 | imports = [ 11 | ./gtk 12 | ./hyprpaper 13 | ./xresources 14 | 15 | (import ./cursors self) 16 | (import ./qt self) 17 | ]; 18 | 19 | config = mkIf cfg.enable { 20 | wayland.windowManager.hyprland = { 21 | settings = { 22 | windowrule = [ 23 | "size 1231 950, title:^(Open Folder)$" 24 | "float , title:^(Open Folder)$" 25 | 26 | "size 1231 950, title:^(Open File)$" 27 | "float , title:^(Open File)$" 28 | ]; 29 | 30 | layerrule = [ 31 | "noanim, selection" 32 | ]; 33 | }; 34 | }; 35 | }; 36 | 37 | # For accurate stack trace 38 | _file = ./default.nix; 39 | } 40 | -------------------------------------------------------------------------------- /modules/desktop/theme/hyprpaper/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | osConfig, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (lib) mkIf; 8 | 9 | cfg = osConfig.roles.desktop; 10 | wallpaper = toString pkgs.scopedPackages.dracula.wallpaper; 11 | in { 12 | config = mkIf cfg.enable { 13 | home.packages = [pkgs.hyprpaper]; 14 | 15 | xdg.configFile."hypr/hyprpaper.conf" = { 16 | text = lib.hm.generators.toHyprconf { 17 | attrs = { 18 | ipc = "on"; 19 | splash = false; 20 | 21 | preload = [wallpaper]; 22 | 23 | wallpaper = [ 24 | ",${wallpaper}" 25 | ]; 26 | }; 27 | }; 28 | }; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /modules/desktop/theme/xresources/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | osConfig, 4 | ... 5 | }: let 6 | inherit (lib) mkIf; 7 | 8 | cfg = osConfig.roles.desktop; 9 | in { 10 | config = mkIf cfg.enable { 11 | xresources.extraConfig = '' 12 | ! Dracula Xresources palette 13 | *.foreground: #F8F8F2 14 | *.background: #282A36 15 | *.color0: #000000 16 | *.color8: #4D4D4D 17 | *.color1: #FF5555 18 | *.color9: #FF6E67 19 | *.color2: #50FA7B 20 | *.color10: #5AF78E 21 | *.color3: #F1FA8C 22 | *.color11: #F4F99D 23 | *.color4: #BD93F9 24 | *.color12: #CAA9FA 25 | *.color5: #FF79C6 26 | *.color13: #FF92D0 27 | *.color6: #8BE9FD 28 | *.color14: #9AEDFE 29 | *.color7: #BFBFBF 30 | *.color15: #E6E6E6 31 | ''; 32 | }; 33 | 34 | # For accurate stack trace 35 | _file = ./default.nix; 36 | } 37 | -------------------------------------------------------------------------------- /modules/docker/.template/compose.nix: -------------------------------------------------------------------------------- 1 | rwDataDir: {config, ...}: let 2 | inherit (config.sops) secrets; 3 | 4 | rwPath = rwDataDir + "/projectName"; 5 | in { 6 | virtualisation.docker.compose."projectName" = { 7 | services = {}; 8 | }; 9 | 10 | # For accurate stack trace 11 | _file = ./default.nix; 12 | } 13 | -------------------------------------------------------------------------------- /modules/docker/.template/images/image.nix: -------------------------------------------------------------------------------- 1 | pkgs: 2 | pkgs.dockerTools.pullImage rec { 3 | imageName = "some/image/name"; 4 | imageDigest = ""; 5 | sha256 = ""; 6 | finalImageName = imageName; 7 | finalImageTag = "latest"; 8 | } 9 | -------------------------------------------------------------------------------- /modules/kmscon/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib) concatStringsSep elemAt mkIf mkOption types; 7 | 8 | cfg = config.services.kmscon; 9 | in { 10 | options.services.kmscon = { 11 | fontName = mkOption { 12 | type = types.str; 13 | default = elemAt config.fonts.fontconfig.defaultFonts.monospace 0; 14 | }; 15 | 16 | fontSize = mkOption { 17 | type = types.numbers.nonnegative; 18 | default = 12.5; 19 | }; 20 | 21 | fontDpi = mkOption { 22 | type = types.numbers.nonnegative; 23 | default = 130; 24 | }; 25 | }; 26 | 27 | config = mkIf cfg.enable { 28 | services.kmscon = { 29 | useXkbConfig = true; 30 | hwRender = false; 31 | 32 | extraOptions = concatStringsSep " " [ 33 | "--font-size ${toString cfg.fontSize}" 34 | "--font-dpi ${toString cfg.fontDpi}" 35 | "--font-name '${cfg.fontName}'" 36 | ]; 37 | }; 38 | }; 39 | 40 | # For accurate stack trace 41 | _file = ./default.nix; 42 | } 43 | -------------------------------------------------------------------------------- /modules/meta/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib) mkOption types; 3 | in { 4 | options.meta = { 5 | roleDescription = mkOption { 6 | type = types.str; 7 | default = ""; 8 | }; 9 | 10 | hardwareDescription = mkOption { 11 | type = types.str; 12 | default = ""; 13 | }; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /modules/plymouth/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib) mkIf; 7 | 8 | cfg = config.boot.plymouth; 9 | in { 10 | config = mkIf cfg.enable { 11 | boot = { 12 | initrd = { 13 | verbose = false; 14 | systemd.enable = true; 15 | }; 16 | 17 | consoleLogLevel = 0; 18 | 19 | kernelParams = [ 20 | "quiet" 21 | "splash" 22 | "boot.shell_on_fail" 23 | "i915.fastboot=1" 24 | "loglevel=3" 25 | "rd.systemd.show_status=false" 26 | "rd.udev.log_level=3" 27 | "udev.log_priority=3" 28 | ]; 29 | 30 | loader.timeout = 0; 31 | }; 32 | }; 33 | 34 | # For accurate stack trace 35 | _file = ./default.nix; 36 | } 37 | -------------------------------------------------------------------------------- /modules/quickshell/config/.envrc: -------------------------------------------------------------------------------- 1 | use flake "$FLAKE#qml" 2 | -------------------------------------------------------------------------------- /modules/quickshell/config/.qmlformat.ini: -------------------------------------------------------------------------------- 1 | [General] 2 | FunctionsSpacing=true 3 | IndentWidth=4 4 | MaxColumnWidth=-1 5 | NewlineType=native 6 | NormalizeOrder=true 7 | ObjectsSpacing=true 8 | UseTabs=false 9 | -------------------------------------------------------------------------------- /modules/quickshell/config/shell.qml: -------------------------------------------------------------------------------- 1 | import Quickshell 2 | import QtQuick 3 | 4 | import "./Widgets/Bar" 5 | import "./Widgets/ScreenCorners" 6 | 7 | ShellRoot { 8 | Bar { 9 | } 10 | 11 | ScreenCorners { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /modules/quickshell/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | pkgs, 5 | ... 6 | }: let 7 | inherit (lib) hasPrefix mkIf removePrefix; 8 | 9 | # Configs 10 | cfgDesktop = config.roles.desktop; 11 | flakeDir = config.environment.variables.FLAKE; 12 | 13 | qsConfigDir = "${removePrefix "/home/${cfgDesktop.user}/" flakeDir}/modules/quickshell/config"; 14 | in { 15 | config = mkIf cfgDesktop.quickshell.enable { 16 | assertions = [ 17 | { 18 | assertion = hasPrefix "/home/${cfgDesktop.user}/" flakeDir; 19 | message = '' 20 | Your $FLAKE environment variable needs to point to a directory in 21 | the main users' home to use my quickshell module. 22 | ''; 23 | } 24 | ]; 25 | 26 | # Machine config 27 | environment.systemPackages = [ 28 | (pkgs.writeShellApplication { 29 | name = "quickshell"; 30 | runtimeInputs = [pkgs.quickshell]; 31 | text = '' 32 | if [ "$#" == 0 ]; then 33 | exec qs --path ~/${qsConfigDir} 34 | else 35 | exec qs "$@" 36 | fi 37 | ''; 38 | }) 39 | ]; 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /modules/server/default.nix: -------------------------------------------------------------------------------- 1 | {lib, ...}: let 2 | inherit (lib) mkOption types; 3 | in { 4 | imports = [ 5 | ./sshd 6 | ./tailscale 7 | ]; 8 | 9 | options.roles.server = { 10 | enable = mkOption { 11 | type = types.bool; 12 | default = false; 13 | }; 14 | 15 | user = mkOption { 16 | type = types.str; 17 | description = '' 18 | The name of the machine's main user. 19 | ''; 20 | }; 21 | 22 | sshd.enable = mkOption { 23 | type = types.bool; 24 | default = false; 25 | }; 26 | 27 | tailscale.enable = mkOption { 28 | type = types.bool; 29 | default = false; 30 | }; 31 | }; 32 | 33 | # For accurate stack trace 34 | _file = ./default.nix; 35 | } 36 | -------------------------------------------------------------------------------- /modules/server/sshd/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: let 6 | inherit (lib) mkForce mkIf; 7 | 8 | cfg = config.roles.server; 9 | in { 10 | config = mkIf (cfg.enable && cfg.sshd.enable) { 11 | services = { 12 | openssh = { 13 | enable = true; 14 | settings = { 15 | PasswordAuthentication = false; 16 | PermitRootLogin = mkForce "no"; 17 | }; 18 | }; 19 | }; 20 | 21 | users.users.${cfg.user} = { 22 | openssh.authorizedKeys.keys = [ 23 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPE39uk52+NIDLdHeoSHIEsOUUFRzj06AGn09z4TUOYm matt@OP9" 24 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICr2+CpqXNMLsjgbrYyIwTKhlVSiIYol1ghBPzLmUpKl matt@binto" 25 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJGbLu+Gb7PiyNgNXMHemaQLnKixebx1/4cdJGna9OQp matt@wim" 26 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1bYbOemBJHjm5onaRE52YvGiTAr+bS0l4tCjXSXud9 matt@servivi" 27 | ]; 28 | }; 29 | }; 30 | 31 | # For accurate stack trace 32 | _file = ./default.nix; 33 | } 34 | -------------------------------------------------------------------------------- /modules/wyoming-plus/pkgs/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | fetchFromGitHub, 4 | onnxruntime, 5 | python3Packages, 6 | wyoming-openwakeword, 7 | ... 8 | }: let 9 | inherit (lib) makeLibraryPath; 10 | in 11 | wyoming-openwakeword.overridePythonAttrs (o: { 12 | version = o.version + "-vad"; 13 | 14 | # https://github.com/rhasspy/wyoming-openwakeword/pull/17 15 | src = fetchFromGitHub { 16 | owner = "rhasspy"; 17 | repo = "wyoming-openwakeword"; 18 | rev = "8e679a592f5862d67a7b688d3f711b468e4b1f93"; 19 | hash = "sha256-sP0i2ghcTpuuZbVTsAFw527y2oaJIH9OolQtKjkYC2E="; 20 | }; 21 | 22 | buildInputs = 23 | (o.buildInputs or []) 24 | ++ [onnxruntime]; 25 | 26 | propagatedBuildInputs = 27 | (o.propagatedBuildInputs or []) 28 | ++ [python3Packages.onnxruntime]; 29 | 30 | # Native onnxruntime lib used by Python module onnxruntime can't find its other libs without this 31 | makeWrapperArgs = [ 32 | ''--prefix LD_LIBRARY_PATH : "${makeLibraryPath [onnxruntime]}"'' 33 | ]; 34 | 35 | postFixup = '' 36 | cp -ar ./wyoming_openwakeword/models/silero_vad.onnx $out/lib/python*/site-packages/wyoming_openwakeword/models 37 | ''; 38 | }) 39 | -------------------------------------------------------------------------------- /nixFastChecks/apps/default.nix: -------------------------------------------------------------------------------- 1 | pkgs: let 2 | inherit (pkgs.lib) mapAttrs' nameValuePair; 3 | in 4 | mapAttrs' 5 | (name: app: 6 | nameValuePair "app_${name}" app) 7 | pkgs.appsPackages 8 | -------------------------------------------------------------------------------- /nixFastChecks/default.nix: -------------------------------------------------------------------------------- 1 | # Inspired by : 2 | # https://github.com/Mic92/dotfiles/blob/c2f538934d67417941f83d8bb65b8263c43d32ca/flake.nix#L168 3 | { 4 | perSystem, 5 | self, 6 | ... 7 | }: let 8 | inherit (self.lib.attrs) recursiveUpdateList; 9 | 10 | apps = perSystem (import ./apps); 11 | devices = perSystem (pkgs: import ./devices {inherit pkgs self;}); 12 | devShells = perSystem (pkgs: import ./devShells {inherit pkgs self;}); 13 | packages = perSystem (import ./packages); 14 | in { 15 | inherit apps devices devShells packages; 16 | 17 | all = recursiveUpdateList [apps devices devShells packages]; 18 | } 19 | -------------------------------------------------------------------------------- /nixFastChecks/devShells/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | self, 4 | }: let 5 | inherit (pkgs.lib) mapAttrs' nameValuePair; 6 | in 7 | mapAttrs' 8 | (name: shell: 9 | nameValuePair "devShell_${name}" shell) 10 | self.devShells.${pkgs.system} 11 | -------------------------------------------------------------------------------- /nixFastChecks/devices/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | self, 4 | }: let 5 | inherit (pkgs.lib) filterAttrs mapAttrs' nameValuePair; 6 | 7 | devices = 8 | filterAttrs 9 | (n: config: config.pkgs.system == pkgs.system) 10 | self.nixosConfigurations; 11 | in 12 | mapAttrs' 13 | (name: config: 14 | nameValuePair "device_${name}" config.config.system.build.toplevel) 15 | devices 16 | -------------------------------------------------------------------------------- /nixFastChecks/packages/default.nix: -------------------------------------------------------------------------------- 1 | pkgs: let 2 | inherit (pkgs.lib) elem filterAttrs hasAttr mapAttrs' nameValuePair; 3 | 4 | packages = 5 | filterAttrs ( 6 | _: v: 7 | !(hasAttr "platforms" v.meta) 8 | || elem pkgs.system v.meta.platforms 9 | ) 10 | pkgs.selfPackages; 11 | in 12 | mapAttrs' 13 | (name: pkg: 14 | nameValuePair "pkg_${name}" pkg) 15 | packages 16 | -------------------------------------------------------------------------------- /overlays/README.md: -------------------------------------------------------------------------------- 1 | # Overlays 2 | 3 | This directory contains every overlay exposed by this flake. 4 | 5 | ## List of my overlays found in `self.overlays` 6 | 7 | | Name | Description | 8 | | ---- | ----------- | 9 | | `appsPackages` | This overlay puts every derivations for apps exposed by this flake under pkgs.appsPackages. | 10 | | `forced` | Overrides packages from third party flakes that don't offer overlays. | 11 | | `misc-fixes` | Fixes build failures, missing meta attributes, evaluation failures, etc. of the current `nixpkgs` revision of this flake. | 12 | | `nix-version` | Overrides the nix package for everything so I don't need multiple versions. | 13 | | `scopedPackages` | This overlay puts every package scopes exposed by this flake under pkgs.scopedPackages. | 14 | | `selfPackages` | This overlay puts every derivations for packages exposed by this flake under pkgs.selfPackages. | 15 | | `xdg-desktop-portal-kde` | Fixes this issue: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/issues/15 | 16 | -------------------------------------------------------------------------------- /overlays/forced/default.nix: -------------------------------------------------------------------------------- 1 | self: final: prev: let 2 | inherit (self.inputs) quickshell; 3 | 4 | overrideAll = self.lib.overrideAll final; 5 | in { 6 | quickshell = overrideAll quickshell.packages.${final.system}.default { 7 | gitRev = quickshell.rev; 8 | 9 | buildStdenv = final.clangStdenv; 10 | 11 | debug = false; 12 | withI3 = false; 13 | withX11 = false; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /overlays/misc-fixes/default.nix: -------------------------------------------------------------------------------- 1 | final: prev: { 2 | # FIXME: wait for next version of nix-update to reach nixpkgs (after 1.11.0) 3 | # https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/ni/nix-update/package.nix 4 | nix-update = prev.nix-update.overrideAttrs (o: let 5 | inherit (builtins) fromTOML readFile substring; 6 | 7 | rev = "3d5866d1a8bc2f8197222e4814a8406298c36428"; 8 | 9 | src = prev.fetchFromGitHub { 10 | owner = "Mic92"; 11 | repo = "nix-update"; 12 | inherit rev; 13 | hash = "sha256-y3LY2tWDQUDjraAOjQ60tgegAws1gpb+I5u06XmQnoA="; 14 | }; 15 | 16 | pyproject = fromTOML (readFile "${src}/pyproject.toml"); 17 | in { 18 | version = "${pyproject.project.version}+${substring 0 7 rev}"; 19 | inherit src; 20 | }); 21 | 22 | # normal electron has a lot of cache misses for me 23 | electron = final.electron-bin; 24 | } 25 | -------------------------------------------------------------------------------- /overlays/xdg-desktop-portal-kde/default.nix: -------------------------------------------------------------------------------- 1 | (final: prev: { 2 | kdePackages = prev.kdePackages.overrideScope (kfinal: kprev: { 3 | xdg-desktop-portal-kde = kprev.xdg-desktop-portal-kde.overrideAttrs (o: { 4 | patches = let 5 | rdpPatch = 6 | if o.version == "6.1.3" 7 | then ./6-1-3.patch 8 | else if builtins.compareVersions o.version "6.3.0" == -1 9 | then ./6-2.patch 10 | else throw "This patch is not working or needed anymore. Please see https://develop.kde.org/docs/administration/portal-permissions/"; 11 | in 12 | (o.patches or []) 13 | ++ [ 14 | # https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/issues/15#note_906047 15 | rdpPatch 16 | ]; 17 | }); 18 | }); 19 | }) 20 | -------------------------------------------------------------------------------- /packages/coloryou/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | # deps 5 | python3Packages, 6 | ... 7 | }: let 8 | inherit (builtins) fromTOML readFile; 9 | 10 | inherit (fromTOML (readFile ./pyproject.toml)) project; 11 | in 12 | python3Packages.buildPythonApplication rec { 13 | pname = project.name; 14 | inherit (project) version; 15 | format = "pyproject"; 16 | 17 | src = ./.; 18 | 19 | build-system = with python3Packages; [hatchling]; 20 | dependencies = with python3Packages; [material-color-utilities]; 21 | 22 | meta = { 23 | mainProgram = pname; 24 | license = lib.licenses.mit; 25 | homepage = "https://git.nelim.org/matt1432/nixos-configs/src/branch/master/packages/coloryou"; 26 | inherit (project) description; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /packages/coloryou/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "coloryou" 3 | description="Get Material You colors from an image." 4 | version = "0.1.0" 5 | 6 | dependencies = [ 7 | "material_color_utilities_python", 8 | ] 9 | 10 | [build-system] 11 | requires = ["hatchling"] 12 | build-backend = "hatchling.build" 13 | 14 | [project.scripts] 15 | coloryou = "coloryou:main" 16 | -------------------------------------------------------------------------------- /packages/coloryou/requirements.txt: -------------------------------------------------------------------------------- 1 | material-color-utilities 2 | utils 3 | -------------------------------------------------------------------------------- /packages/gpu-screen-recorder/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | callPackage, 3 | gpu-screen-recorder-src, 4 | ... 5 | }: let 6 | gpu-screen-recorder = callPackage ./gpu-screen-recorder.nix { 7 | inherit gpu-screen-recorder-src; 8 | }; 9 | 10 | gsr-kms-server = callPackage ./gsr-kms-server.nix { 11 | inherit gpu-screen-recorder-src; 12 | }; 13 | 14 | gsr-dbus-server = callPackage ./gsr-dbus-server.nix { 15 | inherit gpu-screen-recorder-src; 16 | }; 17 | in 18 | gpu-screen-recorder.overrideAttrs (o: { 19 | passthru = 20 | o.passthru or {} 21 | // { 22 | inherit gsr-kms-server gsr-dbus-server; 23 | }; 24 | }) 25 | -------------------------------------------------------------------------------- /packages/gpu-screen-recorder/gpu-screen-recorder.nix: -------------------------------------------------------------------------------- 1 | { 2 | callPackage, 3 | gpu-screen-recorder-src, 4 | ... 5 | }: 6 | callPackage ./generic.nix { 7 | pname = "gpu-screen-recorder"; 8 | inherit gpu-screen-recorder-src; 9 | 10 | description = '' 11 | Screen recorder that has minimal impact on system performance by recording 12 | a window using the GPU only. 13 | ''; 14 | } 15 | -------------------------------------------------------------------------------- /packages/gpu-screen-recorder/gsr-dbus-server.nix: -------------------------------------------------------------------------------- 1 | { 2 | callPackage, 3 | gpu-screen-recorder-src, 4 | ... 5 | }: 6 | callPackage ./generic.nix { 7 | pname = "gsr-dbus-server"; 8 | inherit gpu-screen-recorder-src; 9 | 10 | description = '' 11 | Small program to move dbus code to a separate process to allow gpu-screen-recorder to 12 | use cap_sys_nice for better recording performance on AMD. 13 | ''; 14 | } 15 | -------------------------------------------------------------------------------- /packages/gpu-screen-recorder/gsr-kms-server.nix: -------------------------------------------------------------------------------- 1 | { 2 | callPackage, 3 | gpu-screen-recorder-src, 4 | ... 5 | }: 6 | callPackage ./generic.nix { 7 | pname = "gsr-kms-server"; 8 | inherit gpu-screen-recorder-src; 9 | 10 | description = '' 11 | Small program giving safe KMS access to gpu-screen-recorder when recording a monitor. 12 | This is the only part of gpu-screen-recorder that could require root permissions. 13 | ''; 14 | } 15 | -------------------------------------------------------------------------------- /packages/homepage/icons.nix: -------------------------------------------------------------------------------- 1 | {fetchFromGitHub, ...}: let 2 | dashboardIcons = fetchFromGitHub { 3 | owner = "walkxcode"; 4 | repo = "dashboard-icons"; 5 | rev = "be82e22c418f5980ee2a13064d50f1483df39c8c"; # Until 2024-07-21 6 | hash = "sha256-z69DKzKhCVNnNHjRM3dX/DD+WJOL9wm1Im1nImhBc9Y="; 7 | }; 8 | in '' 9 | mkdir -p $out/share/homepage/public/icons 10 | cp ${dashboardIcons}/png/* $out/share/homepage/public/icons 11 | cp ${dashboardIcons}/svg/* $out/share/homepage/public/icons 12 | cp ${dashboardIcons}/LICENSE $out/share/homepage/public/icons/ 13 | '' 14 | -------------------------------------------------------------------------------- /packages/libratbag/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | libratbag-src, 5 | # deps 6 | libratbag, 7 | ... 8 | }: let 9 | inherit (lib) elemAt match readFile splitString; 10 | 11 | releaseVer = elemAt (match "^([^']*).*" (elemAt (splitString "version : '" (readFile "${libratbag-src}/meson.build")) 1)) 0; 12 | in 13 | libratbag.overrideAttrs { 14 | pname = "libratbag"; 15 | version = "${releaseVer}+${libratbag-src.shortRev}"; 16 | src = libratbag-src; 17 | } 18 | -------------------------------------------------------------------------------- /packages/librespot-auth/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | fetchFromGitHub, 5 | makeWrapper, 6 | rustPlatform, 7 | # deps 8 | openssl, 9 | pkg-config, 10 | ... 11 | }: 12 | rustPlatform.buildRustPackage rec { 13 | pname = "librespot-auth"; 14 | version = "0.1.1"; 15 | 16 | # deprecated https://github.com/dspearson/librespot-auth 17 | src = fetchFromGitHub { 18 | owner = "dspearson"; 19 | repo = pname; 20 | rev = "v${version}"; 21 | sha256 = "sha256-IbbArRSKpnljhZSgL0b3EjVzKWN7bk6t0Bv7TkYr8FI="; 22 | }; 23 | 24 | cargoLock = { 25 | lockFile = "${src}/Cargo.lock"; 26 | outputHashes = { 27 | "librespot-core-0.5.0-dev" = "sha256-7HrA1hWEy5lliwgJ9amJy+Kd8lB50b3q2niaFWWwcYE="; 28 | }; 29 | }; 30 | 31 | nativeBuildInputs = [ 32 | pkg-config 33 | makeWrapper 34 | ]; 35 | 36 | buildInputs = [ 37 | openssl 38 | ]; 39 | 40 | meta = { 41 | mainProgram = pname; 42 | license = with lib.licenses; [isc]; 43 | homepage = "https://github.com/dspearson/librespot-auth"; 44 | description = '' 45 | A simple program for populating a credentials.json via Spotify's 46 | zeroconf authentication. 47 | ''; 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /packages/nbted/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | rustPlatform, 5 | fetchFromGitHub, 6 | ... 7 | }: let 8 | pname = "nbted"; 9 | version = "1.5.0"; 10 | 11 | src = fetchFromGitHub { 12 | owner = "C4K3"; 13 | repo = pname; 14 | tag = version; 15 | hash = "sha256-5gCxTFjI3WDC9+F9i4I2g17+wHWnQHjC4Hurj5CMhB4="; 16 | }; 17 | in 18 | rustPlatform.buildRustPackage { 19 | inherit pname src version; 20 | 21 | cargoLock.lockFile = "${src}/Cargo.lock"; 22 | 23 | env.OUT_DIR = "$out"; 24 | 25 | patchPhase = '' 26 | export OUT_DIR=$(mktemp -d) 27 | 28 | rm ./build.rs 29 | echo '"${version}"' > $OUT_DIR/git-revision.txt 30 | substituteInPlace ./Cargo.toml --replace-fail "build = \"build.rs\"" "" 31 | ''; 32 | 33 | meta = { 34 | mainProgram = pname; 35 | license = lib.licenses.cc0; 36 | homepage = "https://github.com/C4K3/nbted"; 37 | description = '' 38 | Command-line NBT editor written in Rust. It does precisely one thing: convert NBT files to 39 | a pretty text format, and reverse the pretty text format back into NBT. 40 | ''; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /packages/piper/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | piper-src, 5 | # deps 6 | piper, 7 | ... 8 | }: let 9 | inherit (lib) elemAt match readFile splitString; 10 | 11 | releaseVer = elemAt (match "^([^']*).*" (elemAt (splitString "version: '" (readFile "${piper-src}/meson.build")) 1)) 0; 12 | in 13 | piper.overridePythonAttrs { 14 | pname = "piper"; 15 | version = "${releaseVer}+${piper-src.shortRev}"; 16 | 17 | src = piper-src; 18 | 19 | mesonFlags = [ 20 | "-Druntime-dependency-checks=false" 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /packages/pokemon-colorscripts/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | mkVersion, 4 | stdenv, 5 | pokemon-colorscripts-src, 6 | # deps 7 | python3Packages, 8 | ... 9 | }: 10 | stdenv.mkDerivation { 11 | pname = "pokemon-colorscripts"; 12 | version = mkVersion pokemon-colorscripts-src; 13 | 14 | src = pokemon-colorscripts-src; 15 | 16 | propagatedBuildInputs = with python3Packages; [ 17 | python 18 | ]; 19 | 20 | installPhase = '' 21 | mkdir -p $out/pokemon-colorscripts $out/bin 22 | 23 | cp -rf colorscripts $out/pokemon-colorscripts 24 | cp pokemon.json $out/pokemon-colorscripts 25 | 26 | cp pokemon-colorscripts.py $out/pokemon-colorscripts 27 | 28 | ln -s $out/pokemon-colorscripts/pokemon-colorscripts.py $out/bin/pokemon-colorscripts 29 | ''; 30 | 31 | meta = { 32 | homepage = "https://gitlab.com/phoneybadger/pokemon-colorscripts"; 33 | description = '' 34 | A script to print out images of pokemon to the terminal. 35 | ''; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /packages/proton-ge-9-27/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | fetchzip, 4 | # deps 5 | proton-ge-bin, 6 | ... 7 | }: 8 | proton-ge-bin.overrideAttrs (o: rec { 9 | version = "9.27"; 10 | 11 | src = fetchzip { 12 | url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${version}/${version}.tar.gz"; 13 | hash = "sha256-70au1dx9co3X+X7xkBCDGf1BxEouuw3zN+7eDyT7i5c="; 14 | }; 15 | 16 | preFixup = null; 17 | }) 18 | -------------------------------------------------------------------------------- /packages/protonhax/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | stdenv, 5 | fetchFromGitHub, 6 | ... 7 | }: let 8 | pname = "protonhax"; 9 | version = "1.0.5"; 10 | in 11 | stdenv.mkDerivation { 12 | inherit pname version; 13 | 14 | src = fetchFromGitHub { 15 | owner = "jcnils"; 16 | repo = pname; 17 | rev = version; 18 | hash = "sha256-5G4MCWuaF/adSc9kpW/4oDWFFRpviTKMXYAuT2sFf9w="; 19 | }; 20 | 21 | installPhase = '' 22 | install -Dt $out/bin -m755 protonhax 23 | ''; 24 | 25 | meta = { 26 | license = with lib.licenses; [bsd3]; 27 | homepage = "https://github.com/jcnils/protonhax"; 28 | description = '' 29 | Tool to help running other programs (i.e. Cheat Engine) inside Steam's proton. 30 | ''; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /packages/repl/repl.nix: -------------------------------------------------------------------------------- 1 | { 2 | flakePath, 3 | hostnamePath ? "/etc/hostname", 4 | }: let 5 | inherit (builtins) currentSystem getFlake head match pathExists readFile removeAttrs; 6 | 7 | hostname = 8 | if pathExists hostnamePath 9 | then head (match "([a-zA-Z0-9\\-]+)\n" (readFile hostnamePath)) 10 | else ""; 11 | 12 | self = 13 | if pathExists flakePath 14 | then 15 | removeAttrs (getFlake (toString flakePath)) [ 16 | # If you use flakegen, these take a lot of space 17 | "nextFlake" 18 | "nextFlakeSource" 19 | ] 20 | else {}; 21 | 22 | pkgs = self.inputs.nixpkgs.legacyPackages.${currentSystem} or {}; 23 | lib = 24 | if pkgs != {} 25 | then pkgs.lib 26 | else {}; 27 | in 28 | {inherit lib pkgs self;} 29 | // self.nixosConfigurations.${hostname} 30 | or self.nixOnDroidConfigurations.default 31 | or {} 32 | -------------------------------------------------------------------------------- /packages/some-sass-language-server/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "some-sass-language-server", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "some-sass-language-server": "2.2.0" 9 | } 10 | }, 11 | "node_modules/some-sass-language-server": { 12 | "version": "2.2.0", 13 | "resolved": "https://registry.npmjs.org/some-sass-language-server/-/some-sass-language-server-2.2.0.tgz", 14 | "integrity": "sha512-liUG9OMbmPBM48IvyitBCsJ6A+kMAnkwxZbPlhBWxL+N6QBi5J2AhW67N5v6BKjjLbfB/OERzazAJSCXevfqVQ==", 15 | "license": "MIT", 16 | "bin": { 17 | "some-sass-language-server": "bin/some-sass-language-server" 18 | }, 19 | "engines": { 20 | "node": ">=20" 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/some-sass-language-server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "some-sass-language-server": "2.2.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/some-sass-language-server/update.nix: -------------------------------------------------------------------------------- 1 | #bash 2 | '' 3 | cd "$FLAKE/packages/some-sass-language-server" || return 4 | 5 | latest=$(npm outdated --json | jq -r '.["some-sass-language-server"]["latest"]' || true) 6 | 7 | if [[ "$latest" != "null" ]]; then 8 | sed -i "s#\"some-sass-language-server\": \"[^\"]*\"#\"some-sass-language-server\": \"$latest\"#" ./package.json 9 | 10 | npm update 11 | 12 | npm_hash="$(prefetch-npm-deps ./package-lock.json)" 13 | 14 | sed -i "s#npmDepsHash = .*#npmDepsHash = \"$npm_hash\";#" ./default.nix 15 | fi 16 | '' 17 | -------------------------------------------------------------------------------- /packages/subscleaner/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | subscleaner-src, 5 | # deps 6 | hatch, 7 | python3Packages, 8 | ... 9 | }: let 10 | inherit (builtins) fromTOML readFile; 11 | 12 | pyproject = fromTOML (readFile "${subscleaner-src}/pyproject.toml"); 13 | 14 | pname = pyproject.project.name; 15 | version = "${pyproject.project.version}+${subscleaner-src.shortRev}"; 16 | in 17 | python3Packages.buildPythonApplication { 18 | inherit pname version; 19 | format = "pyproject"; 20 | 21 | src = subscleaner-src; 22 | 23 | build-system = [hatch]; 24 | 25 | dependencies = with python3Packages; [ 26 | pysrt 27 | chardet 28 | appdirs 29 | ]; 30 | 31 | meta = { 32 | mainProgram = "subscleaner"; 33 | license = lib.licenses.gpl3Only; 34 | homepage = "https://gitlab.com/rogs/subscleaner"; 35 | description = '' 36 | Subscleaner is a Python script that removes advertisements from subtitle files. 37 | It's designed to help you enjoy your favorite shows and movies without the 38 | distraction of unwanted ads in the subtitles. 39 | ''; 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /results/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matt1432/nixos-configs/5bc3cdef2baab082990113b60651c496e4858fe0/results/.gitkeep -------------------------------------------------------------------------------- /scopedPackages/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs ? {}, 3 | mkVersion ? {}, 4 | description ? false, 5 | }: (final: prev: let 6 | inherit (final.lib) recurseIntoAttrs; 7 | 8 | mkScope = file: desc: 9 | if description 10 | then desc 11 | else 12 | recurseIntoAttrs 13 | (final.callPackage file ({inherit mkVersion;} // inputs)); 14 | in { 15 | scopedPackages = { 16 | dracula = mkScope ./dracula '' 17 | Custom derivations that each represent an app's Dracula Theme. 18 | ''; 19 | 20 | firefoxAddons = mkScope ./firefox-addons '' 21 | Every extensions I use in my firefox module. 22 | ''; 23 | 24 | hass-components = mkScope ./hass-components '' 25 | Components I use for Home-Assistant that aren't in nixpkgs. 26 | ''; 27 | 28 | lovelace-components = mkScope ./lovelace-components '' 29 | Lovelace components I use for Home-Assistant that aren't in nixpkgs. 30 | ''; 31 | 32 | mpvScripts = mkScope ./mpv-scripts '' 33 | MPV scripts I use that aren't in nixpkgs. 34 | ''; 35 | }; 36 | }) 37 | -------------------------------------------------------------------------------- /scopedPackages/dracula/bat/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | stdenv, 5 | mkVersion, 6 | bat-theme-src, 7 | ... 8 | }: 9 | stdenv.mkDerivation { 10 | pname = "dracula-bat"; 11 | version = mkVersion bat-theme-src; 12 | 13 | src = bat-theme-src; 14 | 15 | installPhase = '' 16 | cat ./Dracula.tmTheme > $out 17 | ''; 18 | 19 | meta = { 20 | license = lib.licenses.mit; 21 | homepage = "https://github.com/matt1432/bat"; 22 | description = '' 23 | Dark theme for bat based on the Dracula Sublime theme. 24 | ''; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /scopedPackages/dracula/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | ... 5 | } @ inputs: 6 | lib.makeScope pkgs.newScope (drac: { 7 | bat = drac.callPackage ./bat { 8 | inherit (inputs) bat-theme-src mkVersion; 9 | }; 10 | 11 | git = drac.callPackage ./git { 12 | inherit (inputs) git-theme-src mkVersion; 13 | }; 14 | 15 | gtk = import ./gtk {inherit (inputs) gtk-theme-src pkgs;}; 16 | 17 | plymouth = drac.callPackage ./plymouth { 18 | inherit (inputs) dracula-plymouth-src mkVersion; 19 | }; 20 | 21 | sioyek = drac.callPackage ./sioyek { 22 | inherit (inputs) sioyek-theme-src mkVersion; 23 | }; 24 | 25 | wallpaper = drac.callPackage ./wallpaper {}; 26 | }) 27 | -------------------------------------------------------------------------------- /scopedPackages/dracula/git/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | stdenv, 5 | mkVersion, 6 | git-theme-src, 7 | ... 8 | }: 9 | stdenv.mkDerivation { 10 | pname = "dracula-git"; 11 | version = mkVersion git-theme-src; 12 | 13 | src = git-theme-src; 14 | 15 | installPhase = '' 16 | chmod 777 ./config/gitconfig 17 | 18 | # Remove every line above 'Dracula Dark Theme' 19 | line=$(grep -n 'Dracula Dark Theme' ./config/gitconfig | cut -d: -f1) 20 | sed -i "1,$((line-1))d" ./config/gitconfig 21 | 22 | cat ./config/gitconfig > $out 23 | ''; 24 | 25 | meta = { 26 | license = lib.licenses.mit; 27 | homepage = "https://github.com/dracula/git"; 28 | description = '' 29 | Dark theme for Git. 30 | ''; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /scopedPackages/dracula/gtk/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | gtk-theme-src, 4 | ... 5 | }: 6 | pkgs.dracula-theme.overrideAttrs (o: { 7 | version = o.version + "+" + gtk-theme-src.shortRev; 8 | src = gtk-theme-src; 9 | 10 | # Generate hyprcursor theme 11 | buildInputs = 12 | (o.buildInputs or []) 13 | ++ (builtins.attrValues { 14 | inherit 15 | (pkgs) 16 | hyprcursor 17 | xcur2png 18 | ; 19 | }); 20 | 21 | preInstall = '' 22 | ${o.preInstall or ""} 23 | 24 | mkdir -p $out/share/icons/Dracula-cursors 25 | 26 | cd ./kde/cursors 27 | 28 | hyprcursor-util --extract ./Dracula-cursors 29 | 30 | # this creates a symlink to 'theme_Extracted Theme' for some reason 31 | hyprcursor-util --create ./extracted_Dracula-cursors 32 | mv 'theme_Extracted Theme' ./extracted 33 | 34 | cat < ./extracted/manifest.hl 35 | name = Dracula-cursors 36 | description = Automatically extracted with hyprcursor-util 37 | version = 0.1 38 | cursors_directory = hyprcursors 39 | EOF 40 | 41 | mv ./extracted/* $out/share/icons/Dracula-cursors/ 42 | cd ../.. 43 | ''; 44 | }) 45 | -------------------------------------------------------------------------------- /scopedPackages/dracula/plymouth/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | stdenv, 5 | mkVersion, 6 | dracula-plymouth-src, 7 | ... 8 | }: 9 | stdenv.mkDerivation { 10 | pname = "dracula-plymouth"; 11 | version = mkVersion dracula-plymouth-src; 12 | 13 | src = dracula-plymouth-src; 14 | 15 | installPhase = '' 16 | chmod 777 ./dracula 17 | 18 | sed -i "s@\/usr\/@$out\/@" ./dracula/dracula.plymouth 19 | 20 | mkdir -p $out/share/plymouth/themes 21 | cp -a ./dracula $out/share/plymouth/themes/ 22 | ''; 23 | 24 | meta = { 25 | license = lib.licenses.mit; 26 | homepage = "https://github.com/matt1432/dracula-plymouth"; 27 | description = '' 28 | Dark theme for Plymouth. Forked by me to add a password prompt and 29 | black background for more seemless boot sequence. 30 | ''; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /scopedPackages/dracula/sioyek/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | stdenv, 5 | mkVersion, 6 | sioyek-theme-src, 7 | ... 8 | }: 9 | stdenv.mkDerivation { 10 | pname = "dracula-sioyek"; 11 | version = mkVersion sioyek-theme-src; 12 | 13 | src = sioyek-theme-src; 14 | 15 | installPhase = '' 16 | cat ./dracula.config > $out 17 | ''; 18 | 19 | meta = { 20 | license = lib.licenses.mit; 21 | homepage = "https://github.com/dracula/sioyek"; 22 | description = '' 23 | Dark theme for Sioyek. 24 | ''; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /scopedPackages/dracula/wallpaper/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | stdenv, 5 | fetchurl, 6 | ... 7 | }: 8 | stdenv.mkDerivation { 9 | name = "dracula-wallpaper.png"; 10 | 11 | src = fetchurl { 12 | url = "https://raw.githubusercontent.com/aynp/dracula-wallpapers/main/Art/4k/Waves%201.png"; 13 | hash = "sha256-f9FwSOSvqTeDj4bOjYUQ6TM+/carCD9o5dhg/MnP/lk="; 14 | }; 15 | 16 | phases = ["installPhase"]; 17 | 18 | installPhase = '' 19 | cp -a $src $out 20 | ''; 21 | 22 | meta = { 23 | license = lib.licenses.cc-by-sa-40; 24 | homepage = "https://github.com/aynp/dracula-wallpapers"; 25 | description = '' 26 | Wallpaper based on the Dracula Theme. 27 | ''; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /scopedPackages/firefox-addons/addons.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "slug": "auto-refresh-page" 4 | }, 5 | { 6 | "pname": "bitwarden", 7 | "slug": "bitwarden-password-manager" 8 | }, 9 | { 10 | "slug": "darkreader" 11 | }, 12 | { 13 | "slug": "floccus" 14 | }, 15 | { 16 | "slug": "google-container" 17 | }, 18 | { 19 | "slug": "istilldontcareaboutcookies" 20 | }, 21 | { 22 | "slug": "image-search-options", 23 | "license": { 24 | "tag": "predefined", 25 | "shortName": "mpl11" 26 | } 27 | }, 28 | { 29 | "slug": "return-youtube-dislikes" 30 | }, 31 | { 32 | "pname": "sound-volume", 33 | "slug": "600-sound-volume" 34 | }, 35 | { 36 | "slug": "sponsorblock" 37 | }, 38 | { 39 | "pname": "stylus", 40 | "slug": "styl-us" 41 | }, 42 | { 43 | "slug": "tampermonkey" 44 | }, 45 | { 46 | "slug": "ublock-origin" 47 | }, 48 | { 49 | "slug": "undoclosetabbutton" 50 | } 51 | ] 52 | -------------------------------------------------------------------------------- /scopedPackages/firefox-addons/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchurl, 3 | lib, 4 | pkgs, 5 | stdenv, 6 | ... 7 | } @ args: let 8 | buildFirefoxXpiAddon = lib.makeOverridable ({ 9 | stdenv ? args.stdenv, 10 | fetchurl ? args.fetchurl, 11 | pname, 12 | version, 13 | addonId, 14 | url, 15 | sha256, 16 | meta, 17 | ... 18 | }: 19 | stdenv.mkDerivation { 20 | name = "${pname}-${version}"; 21 | 22 | inherit meta; 23 | 24 | src = fetchurl {inherit url sha256;}; 25 | 26 | preferLocalBuild = true; 27 | allowSubstitutes = true; 28 | 29 | buildCommand = 30 | # bash 31 | '' 32 | dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" 33 | mkdir -p "$dst" 34 | install -v -m644 "$src" "$dst/${addonId}.xpi" 35 | ''; 36 | }); 37 | 38 | packages = import ./generated-firefox-addons.nix { 39 | inherit buildFirefoxXpiAddon fetchurl lib stdenv; 40 | }; 41 | in 42 | lib.makeScope pkgs.newScope (_: packages // {inherit buildFirefoxXpiAddon;}) 43 | -------------------------------------------------------------------------------- /scopedPackages/hass-components/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | self, 5 | ... 6 | } @ inputs: 7 | lib.makeScope pkgs.newScope (hass: let 8 | inherit (self.lib) mergeAttrsList; 9 | 10 | python3Packages = pkgs.python313Packages.override { 11 | overrides = final: prev: (mergeAttrsList (map (fn: fn python3Packages final prev) [ 12 | (import ./spotifyplus/overrides.nix ({inherit pkgs;} // inputs)) 13 | (import ./tuya-local/overrides.nix {inherit pkgs;}) 14 | ])); 15 | }; 16 | 17 | buildHassComponent = file: extraArgs: 18 | python3Packages.callPackage file (inputs // extraArgs // {}); 19 | in { 20 | extended-ollama-conversation = buildHassComponent ./extended-ollama-conversation {}; 21 | 22 | material-symbols = buildHassComponent ./material-symbols {}; 23 | 24 | netdaemon = buildHassComponent ./netdaemon {}; 25 | 26 | spotifyplus = buildHassComponent ./spotifyplus {}; 27 | 28 | tuya-local = buildHassComponent ./tuya-local {}; 29 | 30 | yamaha-soundbar = buildHassComponent ./yamaha-soundbar {}; 31 | }) 32 | -------------------------------------------------------------------------------- /scopedPackages/hass-components/extended-ollama-conversation/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | buildHomeAssistantComponent, 4 | extended-ollama-conversation-src, 5 | # deps 6 | ollama, 7 | openai, 8 | ... 9 | }: let 10 | inherit (builtins) fromJSON readFile; 11 | manifest = fromJSON (readFile "${extended-ollama-conversation-src}/custom_components/extended_ollama_conversation/manifest.json"); 12 | in 13 | buildHomeAssistantComponent { 14 | owner = "TheNimaj"; 15 | 16 | inherit (manifest) domain version; 17 | src = extended-ollama-conversation-src; 18 | 19 | dependencies = [ 20 | ollama 21 | openai 22 | ]; 23 | 24 | ignoreVersionRequirement = ["ollama"]; 25 | 26 | meta = { 27 | homepage = "https://github.com/TheNimaj/extended_ollama_conversation"; 28 | description = '' 29 | Home Assistant custom component of conversation agent. It uses Ollama to control your devices. 30 | ''; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /scopedPackages/hass-components/material-symbols/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | buildHomeAssistantComponent, 5 | material-symbols-src, 6 | ... 7 | }: let 8 | inherit (builtins) fromJSON readFile; 9 | manifest = fromJSON (readFile "${material-symbols-src}/custom_components/material_symbols/manifest.json"); 10 | in 11 | buildHomeAssistantComponent { 12 | owner = "beecho01"; 13 | 14 | inherit (manifest) domain version; 15 | src = material-symbols-src; 16 | 17 | meta = { 18 | license = lib.licenses.cc-by-nc-sa-40; 19 | homepage = "https://github.com/beecho01/material-symbols"; 20 | description = '' 21 | Material Symbols for Home Assistant is a collection of 13,803 Google Material Symbols 22 | for use within Home Assistant. It uses the icon-set produced and maintained by iconify. 23 | ''; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /scopedPackages/hass-components/netdaemon/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | buildHomeAssistantComponent, 5 | netdaemon-src, 6 | # deps 7 | awesomeversion, 8 | ... 9 | }: let 10 | inherit (builtins) fromJSON readFile; 11 | manifest = fromJSON (readFile "${netdaemon-src}/custom_components/netdaemon/manifest.json"); 12 | in 13 | buildHomeAssistantComponent { 14 | owner = "net-daemon"; 15 | 16 | inherit (manifest) domain version; 17 | src = netdaemon-src; 18 | 19 | dependencies = [ 20 | awesomeversion 21 | ]; 22 | 23 | meta = { 24 | license = lib.licenses.mit; 25 | homepage = "https://github.com/net-daemon/netdaemon"; 26 | description = '' 27 | An application daemon for Home Assistant written in .NET. 28 | ''; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /scopedPackages/hass-components/spotifyplus/overrides.nix: -------------------------------------------------------------------------------- 1 | { 2 | smartinspect-src, 3 | spotifywebapi-src, 4 | pkgs, 5 | ... 6 | }: python3Packages: final: prev: rec { 7 | smartinspect = python3Packages.callPackage ./smartinspect.nix { 8 | inherit smartinspect-src; 9 | }; 10 | spotifywebapi = python3Packages.callPackage ./spotifywebapi.nix { 11 | inherit smartinspect spotifywebapi-src; 12 | }; 13 | urllib3 = pkgs.selfPackages.urllib3.override { 14 | inherit python3Packages; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /scopedPackages/hass-components/spotifyplus/smartinspect.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | buildPythonPackage, 5 | smartinspect-src, 6 | # deps 7 | pycryptodome, 8 | watchdog, 9 | ... 10 | }: let 11 | inherit (builtins) elemAt head readFile split; 12 | tag = head (split "\"" (elemAt (split "VERSION:str = \"" (readFile "${smartinspect-src}/smartinspectpython/siconst.py")) 2)); 13 | in 14 | buildPythonPackage { 15 | pname = "smartinspectPython"; 16 | version = "${tag}+${smartinspect-src.shortRev}"; 17 | 18 | src = smartinspect-src; 19 | 20 | dependencies = [ 21 | pycryptodome 22 | watchdog 23 | ]; 24 | 25 | pythonImportsCheck = [ 26 | "smartinspectpython" 27 | ]; 28 | 29 | meta = { 30 | license = lib.licenses.bsd2; 31 | homepage = "https://github.com/thlucas1/SmartInspectPython"; 32 | description = '' 33 | Provides Python code execution tracing and diagnostics support via the 34 | SmartInspect Console Viewer. 35 | ''; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /scopedPackages/hass-components/tuya-local/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | buildHomeAssistantComponent, 5 | tuya-local-src, 6 | # deps 7 | tinytuya, 8 | tuya-device-sharing-sdk, 9 | ... 10 | }: let 11 | inherit (builtins) fromJSON readFile; 12 | manifest = fromJSON (readFile "${tuya-local-src}/custom_components/tuya_local/manifest.json"); 13 | in 14 | buildHomeAssistantComponent { 15 | owner = "make-all"; 16 | 17 | inherit (manifest) domain version; 18 | src = tuya-local-src; 19 | 20 | dependencies = [ 21 | tinytuya 22 | tuya-device-sharing-sdk 23 | ]; 24 | 25 | meta = { 26 | license = lib.licenses.mit; 27 | homepage = "https://github.com/make-all/tuya-local"; 28 | description = '' 29 | Local support for Tuya devices in Home Assistant. 30 | ''; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /scopedPackages/hass-components/tuya-local/overrides.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: python3Packages: final: prev: { 2 | tinytuya = prev.tinytuya.overridePythonAttrs (o: rec { 3 | version = "1.17.1"; 4 | src = pkgs.fetchFromGitHub { 5 | owner = "jasonacox"; 6 | repo = "tinytuya"; 7 | rev = "v${version}"; 8 | hash = "sha256-ivtd61r68kUP/OOIkdTjVI5FiD7QsYe6eSr2WiVF7OI="; 9 | }; 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /scopedPackages/hass-components/yamaha-soundbar/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | buildHomeAssistantComponent, 4 | yamaha-soundbar-src, 5 | # deps 6 | async-upnp-client, 7 | chardet, 8 | validators, 9 | ... 10 | }: let 11 | inherit (builtins) fromJSON readFile; 12 | manifest = fromJSON (readFile "${yamaha-soundbar-src}/custom_components/yamaha_soundbar/manifest.json"); 13 | in 14 | buildHomeAssistantComponent { 15 | owner = "osk2"; 16 | 17 | inherit (manifest) domain version; 18 | src = yamaha-soundbar-src; 19 | 20 | dependencies = [ 21 | async-upnp-client 22 | chardet 23 | validators 24 | ]; 25 | 26 | meta = { 27 | homepage = "https://github.com/osk2/yamaha-soundbar"; 28 | description = '' 29 | Yamaha soundbar integration for Home Assistant. 30 | ''; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /scopedPackages/lovelace-components/big-slider-card/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | stdenv, 5 | fetchurl, 6 | ... 7 | }: let 8 | pname = "big-slider-card"; 9 | version = "1.1.5"; 10 | in 11 | stdenv.mkDerivation { 12 | inherit pname version; 13 | 14 | src = fetchurl { 15 | url = "https://github.com/nicufarmache/lovelace-big-slider-card/releases/download/${version}/${pname}.js"; 16 | hash = "sha256-uNlgsiubLXG1VzhNCSeKo/5TmQF1fzFHjTYfutEXn1M="; 17 | }; 18 | 19 | phases = ["installPhase"]; 20 | 21 | installPhase = '' 22 | mkdir $out 23 | cp $src $out/${pname}.js 24 | ''; 25 | 26 | meta = { 27 | license = lib.licenses.mit; 28 | homepage = "https://github.com/nicufarmache/lovelace-big-slider-card"; 29 | description = '' 30 | A card with a big slider for light entities in Home Assistant. 31 | ''; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /scopedPackages/lovelace-components/custom-sidebar/update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | file="$FLAKE/scopedPackages/lovelace-components/custom-sidebar/default.nix" 4 | old_hash="$(sed -n 's/.*hash = "\(.*\)";/\1/p' "$file")" 5 | 6 | sed -i "s/hash = .*/hash = \"\";/" "$file" 7 | npm_hash="$(nix build "$FLAKE#scopedPackages.x86_64-linux.lovelace-components.custom-sidebar" |& sed -n 's/.*got: *//p')" 8 | 9 | if [[ "$npm_hash" != "$old_hash" ]]; then 10 | sed -i "s#hash = .*#hash = \"$npm_hash\";#" "$file" 11 | else 12 | sed -i "s#hash = .*#hash = \"$old_hash\";#" "$file" 13 | fi 14 | -------------------------------------------------------------------------------- /scopedPackages/lovelace-components/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | ... 5 | } @ inputs: 6 | lib.makeScope pkgs.newScope (lovelace: let 7 | callPackage = file: lovelace.callPackage file ({} // inputs); 8 | in { 9 | big-slider-card = callPackage ./big-slider-card; 10 | custom-sidebar = callPackage ./custom-sidebar; 11 | material-rounded-theme = callPackage ./material-rounded-theme; 12 | material-you-utilities = callPackage ./material-you-utilities; 13 | }) 14 | -------------------------------------------------------------------------------- /scopedPackages/lovelace-components/material-rounded-theme/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | stdenv, 5 | fetchFromGitHub, 6 | ... 7 | }: let 8 | pname = "material-rounded-theme"; 9 | version = "4.0.6"; 10 | in 11 | stdenv.mkDerivation { 12 | inherit pname version; 13 | 14 | src = fetchFromGitHub { 15 | owner = "Nerwyn"; 16 | repo = pname; 17 | rev = version; 18 | hash = "sha256-KWr2luWOqBg3LXwB7F38DEPSu+FhBxkHPYRTMkU01gA="; 19 | }; 20 | 21 | installPhase = '' 22 | mkdir -p $out/share 23 | cp ./src/material_you.yaml $out/share 24 | ''; 25 | 26 | meta = { 27 | license = lib.licenses.asl20; 28 | homepage = "https://github.com/Nerwyn/material-rounded-theme"; 29 | description = '' 30 | Material Design 3 Colors and Components in Home Assistant. 31 | ''; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /scopedPackages/lovelace-components/material-you-utilities/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | buildNpmPackage, 4 | fetchFromGitHub, 5 | ... 6 | }: let 7 | pname = "material-you-utilities"; 8 | version = "1.0.4"; 9 | in 10 | buildNpmPackage { 11 | inherit pname version; 12 | 13 | src = fetchFromGitHub { 14 | owner = "Nerwyn"; 15 | repo = "ha-${pname}"; 16 | rev = version; 17 | hash = "sha256-iyGy6dpHZMtU2ap+smZUlLYnFKs6s8SaGAC9Y3jdoiA="; 18 | }; 19 | 20 | postPatch = '' 21 | substituteInPlace ./webpack.config.js --replace-fail \ 22 | "git branch --show-current" "echo main" 23 | ''; 24 | 25 | installPhase = '' 26 | mkdir $out 27 | cp ./dist/material-you-utilities.min.js $out/material-you-utilities.js 28 | ''; 29 | 30 | npmDepsHash = "sha256-5cc610/BhX19k2iREYVoE3c43yDmRJsE0Nvrq/gAVjY="; 31 | 32 | meta = { 33 | license = lib.licenses.asl20; 34 | homepage = "https://github.com/Nerwyn/ha-material-you-utilities"; 35 | description = '' 36 | Material You color theme generation and Home Assistant component modification. 37 | ''; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /scopedPackages/mpv-scripts/default.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...} @ inputs: 2 | pkgs.lib.makeScope pkgs.newScope (mpv: let 3 | buildLua = 4 | mpv.callPackage 5 | "${pkgs.path}/pkgs/applications/video/mpv/scripts/buildLua.nix" {}; 6 | 7 | buildLuaScript = file: 8 | mpv.callPackage file (inputs // {inherit buildLua;}); 9 | in { 10 | modernz = buildLuaScript ./modernz; 11 | pointer-event = buildLuaScript ./pointer-event; 12 | touch-gestures = buildLuaScript ./touch-gestures; 13 | kdialog-open-files = buildLuaScript ./kdialog-open-files; 14 | persist-properties = buildLuaScript ./persist-properties; 15 | undo-redo = buildLuaScript ./undo-redo; 16 | }) 17 | -------------------------------------------------------------------------------- /scopedPackages/mpv-scripts/kdialog-open-files/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | buildLua, 5 | fetchurl, 6 | ... 7 | }: 8 | buildLua rec { 9 | pname = "zenity-open-files"; 10 | version = "0.0.0"; 11 | 12 | unpackPhase = ":"; 13 | src = fetchurl { 14 | url = "https://gist.githubusercontent.com/ntasos/d1d846abd7d25e4e83a78d22ee067a22/raw/b23b20e830bba024836f8b09412000658edee95c/kdialog-open-files.lua"; 15 | hash = "sha256-qJ/Myx0mdaRsWWd+4Mk1/SUSSI/uqQdg/vLZo2pkEwA="; 16 | }; 17 | scriptPath = "${src}"; 18 | 19 | meta = { 20 | license = lib.licenses.unlicense; 21 | homepage = "https://gist.github.com/ntasos/d1d846abd7d25e4e83a78d22ee067a22"; 22 | description = '' 23 | Use KDE KDialog to add files to playlist, subtitles to playing video or open URLs. 24 | Based on 'mpv-open-file-dialog' . 25 | ''; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /scopedPackages/mpv-scripts/modernz/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | buildLua, 5 | mkVersion, 6 | makeFontsConf, 7 | modernz-src, 8 | ... 9 | }: 10 | buildLua (finalAttrs: { 11 | pname = "modernz"; 12 | version = mkVersion modernz-src; 13 | 14 | src = modernz-src; 15 | 16 | # Make font available to script 17 | postInstall = '' 18 | mkdir -p $out/share/fonts 19 | cp -r ./fluent-system-icons.ttf $out/share/fonts 20 | ''; 21 | 22 | passthru.extraWrapperArgs = [ 23 | "--set" 24 | "FONTCONFIG_FILE" 25 | (toString (makeFontsConf { 26 | fontDirectories = ["${finalAttrs.finalPackage}/share/fonts"]; 27 | })) 28 | ]; 29 | 30 | meta = { 31 | license = lib.licenses.lgpl21; 32 | homepage = "https://github.com/Samillion/ModernZ"; 33 | description = '' 34 | A sleek and modern OSC for mpv designed to enhance functionality 35 | by adding more features, all while preserving the core standards 36 | of mpv's OSC. 37 | ''; 38 | }; 39 | }) 40 | -------------------------------------------------------------------------------- /scopedPackages/mpv-scripts/persist-properties/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | buildLua, 5 | mkVersion, 6 | mpv-persist-properties-src, 7 | ... 8 | }: 9 | buildLua { 10 | pname = "persist-properties"; 11 | version = mkVersion mpv-persist-properties-src; 12 | 13 | src = mpv-persist-properties-src; 14 | 15 | meta = { 16 | license = lib.licenses.mit; 17 | homepage = "https://github.com/d87/mpv-persist-properties"; 18 | description = '' 19 | Keeps selected property values (like volume) between player sessions. 20 | ''; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /scopedPackages/mpv-scripts/pointer-event/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | buildLua, 5 | mkVersion, 6 | mpv-pointer-event-src, 7 | ... 8 | }: 9 | buildLua { 10 | pname = "pointer-event"; 11 | version = mkVersion mpv-pointer-event-src; 12 | 13 | src = mpv-pointer-event-src; 14 | 15 | meta = { 16 | license = lib.licenses.gpl2; 17 | homepage = "https://github.com/christoph-heinrich/mpv-pointer-event"; 18 | description = '' 19 | Mouse/Touch input event detection for mpv. 20 | ''; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /scopedPackages/mpv-scripts/touch-gestures/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | buildLua, 5 | mkVersion, 6 | mpv-touch-gestures-src, 7 | ... 8 | }: 9 | buildLua { 10 | pname = "touch-gestures"; 11 | version = mkVersion mpv-touch-gestures-src; 12 | 13 | src = mpv-touch-gestures-src; 14 | 15 | meta = { 16 | license = lib.licenses.gpl2; 17 | homepage = "https://github.com/christoph-heinrich/mpv-touch-gestures"; 18 | description = '' 19 | Touch gestures for mpv. 20 | ''; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /scopedPackages/mpv-scripts/undo-redo/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | # nix build inputs 3 | lib, 4 | buildLua, 5 | mkVersion, 6 | eisa-scripts-src, 7 | ... 8 | }: 9 | buildLua rec { 10 | pname = "undo-redo"; 11 | version = mkVersion eisa-scripts-src; 12 | 13 | src = eisa-scripts-src; 14 | scriptPath = "${src}/scripts/UndoRedo.lua"; 15 | 16 | meta = { 17 | license = lib.licenses.bsd2; 18 | homepage = "https://github.com/Eisa01/mpv-scripts?tab=readme-ov-file#undoredo"; 19 | description = '' 20 | Accidentally seeked? No worries, simply undo.. 21 | Undo is not enough to fix your accidental seek? Well now you can redo as well.. 22 | ''; 23 | }; 24 | } 25 | --------------------------------------------------------------------------------