diff --git a/home/system/packages/derivations/ubports-installer/default.nix b/home/system/packages/derivations/ubports-installer/default.nix new file mode 100644 index 0000000..361d90e --- /dev/null +++ b/home/system/packages/derivations/ubports-installer/default.nix @@ -0,0 +1,55 @@ +{ + lib, + appimageTools, + fetchurl, + makeDesktopItem, +}: let + pname = "ubports-installer"; + + icon = ./ubports-mascot.jpg; + + desktopItems = [ + (makeDesktopItem { + name = pname; + inherit icon; + desktopName = "Ubuntu Touch Installer"; + genericName = "GUI for installing Ubuntu Touch"; + exec = "@out@/bin/ubports-installer"; + comment = "GUI for installing Ubuntu Touch"; + categories = ["System"]; + startupNotify = false; + keywords = ["system" "os" "network" "ubuntu" "touch" "mobile"]; + }) + ]; +in + appimageTools.wrapType2 rec { + inherit pname; + version = "0.10.0"; + + src = fetchurl { + url = "https://github.com/ubports/ubports-installer/releases/download/${version}/ubports-installer_${version}_linux_x86_64.AppImage"; + hash = "sha256-oUQ4AaRiUMeklyI4xzH+krXyedqpLiA9obo5uO8JJak="; + }; + + extraInstallCommands = + '' + mv $out/bin/${pname}-${version} $out/bin/${pname} + '' + + lib.concatMapStringsSep "\n " + (e: '' + install -Dm444 -t $out/share/applications ${e}/share/applications/*.desktop + '') + desktopItems + + '' + install -Dm444 ${icon} $out/share/icons/apps/${pname}.jpg; + + for f in $out/share/applications/*.desktop; do + substituteInPlace $f --subst-var out + done + ''; + + meta = with lib; { + description = "Ubuntu Touch installer"; + license = licenses.free; + }; + } diff --git a/home/system/packages/derivations/ubports-installer/ubports-mascot.png b/home/system/packages/derivations/ubports-installer/ubports-mascot.png new file mode 100644 index 0000000..ee506cf Binary files /dev/null and b/home/system/packages/derivations/ubports-installer/ubports-mascot.png differ diff --git a/hosts/common/system/udev.nix b/hosts/common/system/udev.nix new file mode 100644 index 0000000..6840b4b --- /dev/null +++ b/hosts/common/system/udev.nix @@ -0,0 +1,5 @@ +{...}: { + services.udev.extraRules = '' + KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660" + ''; +} diff --git a/hosts/earth/services/libvirtd.nix b/hosts/earth/services/libvirtd.nix new file mode 100644 index 0000000..f485cd0 --- /dev/null +++ b/hosts/earth/services/libvirtd.nix @@ -0,0 +1,3 @@ +{...}: { + virtualisation.libvirtd.enable = true; +} diff --git a/hosts/earth/services/podman.nix b/hosts/earth/services/podman.nix new file mode 100644 index 0000000..e31c3ac --- /dev/null +++ b/hosts/earth/services/podman.nix @@ -0,0 +1,6 @@ +{...}: { + virtualisation.podman = { + enable = true; + dockerCompat = true; + }; +}