Generate containers file for rofi
This commit is contained in:
@ -1,6 +0,0 @@
|
||||
jellyfin
|
||||
sonarr
|
||||
radarr
|
||||
hydra
|
||||
sabnzbd
|
||||
homeassistant
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
# User chooses service, running services are marked in green
|
||||
set SERVICES (cat ~/NixFlake/config/rofi/menus/containers.txt) # TODO: This file should probably be generated by nix?
|
||||
set SERVICES (cat /etc/rofi-containers)
|
||||
set PROMPT ""
|
||||
for SERVICE in $SERVICES
|
||||
set SERVICE_RUNNING "$(systemctl list-units podman-$SERVICE.service | grep podman-$SERVICE.service)"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
# User chooses VPN server, running servers are marked in green
|
||||
set SERVERS (cat /etc/rofi-vpns) # TODO: This file should probably be generated by nix?
|
||||
set SERVERS (cat /etc/rofi-vpns)
|
||||
set PROMPT ""
|
||||
for SERVER in $SERVERS
|
||||
set SERVER_RUNNING "$(systemctl list-units $SERVER.service | grep $SERVER.service)"
|
||||
|
@ -1,3 +1,5 @@
|
||||
# TODO: Need some kind of menu generator API that is integrated with hyprland hotkeys
|
||||
# VPN and Container modules should use this rofi module to enable their menus then
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
|
@ -14,7 +14,7 @@ with mylib.modules; let
|
||||
in {
|
||||
options.modules.containers = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = mkIf cfg.enable rec {
|
||||
virtualisation.oci-containers.containers = {
|
||||
# Home Automation
|
||||
homeassistant = mkIf cfg.homeassistant.enable (mkOciContainer {
|
||||
@ -96,5 +96,12 @@ in {
|
||||
netdns = "10.2.0.1";
|
||||
});
|
||||
};
|
||||
|
||||
environment.etc."rofi-containers".text = let
|
||||
containers-list = attrNames virtualisation.oci-containers.containers;
|
||||
containers-filtered = filter (c: cfg.${c}.enable) containers-list;
|
||||
containers = concatStringsSep "\n" containers-filtered;
|
||||
in
|
||||
containers;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user