From 5440c73f19ae9bfac70c79da83241c158ceb7d4a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 8 Nov 2024 15:58:13 +0100 Subject: ... --- _sources/generated.json | 14 +++++++++ _sources/generated.nix | 8 +++++ accounts/gkleen@sif/default.nix | 34 +++++++++++++++++----- accounts/gkleen@sif/libvirt/default.nix | 34 +++++++++++++++++++--- accounts/gkleen@sif/libvirt/pool-default.xml | 18 ------------ accounts/gkleen@sif/libvirt/vol-lmmirzm-vmrz01.xml | 17 ----------- nvfetcher.toml | 5 ++++ overlays/spice-record.nix | 12 ++++++++ 8 files changed, 95 insertions(+), 47 deletions(-) delete mode 100644 accounts/gkleen@sif/libvirt/pool-default.xml delete mode 100644 accounts/gkleen@sif/libvirt/vol-lmmirzm-vmrz01.xml create mode 100644 overlays/spice-record.nix diff --git a/_sources/generated.json b/_sources/generated.json index d27b0387..db7ecb25 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -345,6 +345,20 @@ }, "version": "2.4.0" }, + "spice-record": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "spice-record", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-7d/0fepOvdswuBGJCCMULB2kXOFBLP78yqX4NmByCF8=", + "type": "tarball", + "url": "https://github.com/JonathonReinhart/spice-record/archive/refs/tags/v0.2.1.tar.gz" + }, + "version": "0.2.1" + }, "tomorrow-night-paradise-theme": { "cargoLocks": null, "date": "2012-06-04", diff --git a/_sources/generated.nix b/_sources/generated.nix index edd35298..99eb7367 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -210,6 +210,14 @@ sha256 = "sha256-X0dWvx/v/wGEgPE6Cu5MN5ocnJeUi0iutrz72L+55aU="; }; }; + spice-record = { + pname = "spice-record"; + version = "0.2.1"; + src = fetchTarball { + url = "https://github.com/JonathonReinhart/spice-record/archive/refs/tags/v0.2.1.tar.gz"; + sha256 = "sha256-7d/0fepOvdswuBGJCCMULB2kXOFBLP78yqX4NmByCF8="; + }; + }; tomorrow-night-paradise-theme = { pname = "tomorrow-night-paradise-theme"; version = "70225a5bf90d495e13a9260bfdc268632ece0801"; diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 5bdd1651..189fabfa 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -698,16 +698,16 @@ in { packages = with pkgs; [ fira fira-code powerline-fonts nerdfonts pwvucontrol wrappedKeepassxc wl-clipboard-rs mumble pulseaudio-ctl - pamixer libnotify screen-message wrappedYTMDesktop qt5ct - playerctl evince thunderbird zoom-us steam steam-run - wireshark virt-manager rclone cached-nix-shell worktime - fira-code-symbols libreoffice xournalpp google-chrome - nixos-shell virt-viewer freerdp gnome-icon-theme - paper-icon-theme sshpassSecret weechat element-desktop - matrix-synapse-tools.synadm + pamixer libnotify screen-message wrappedYTMDesktop + libsForQt5.qt5ct playerctl evince thunderbird zoom-us steam + steam-run wireshark virt-manager rclone cached-nix-shell + worktime fira-code-symbols libreoffice xournalpp + google-chrome nixos-shell virt-viewer freerdp + gnome-icon-theme paper-icon-theme sshpassSecret weechat + element-desktop matrix-synapse-tools.synadm flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs sieve-connect gimp inkscape udiskie glab nitrokey-app - pynitrokey gtklock wlrctl remmina openscad + pynitrokey gtklock wlrctl remmina openscad spice-record ]; file = { @@ -886,6 +886,24 @@ in { StartupWMClass = "Element"; }; }; + rainbow = { + name = "Rainbow"; + exec = toString (pkgs.writeShellScript "rainbow" '' + exec -- \ + ${config.systemd.package}/bin/systemd-run --wait --user --slice-inherit \ + --property 'CPUAccounting=yes' --property 'CPUQuotaPeriodSec=50ms' \ + --property 'Environment=DSCP=46' \ + -- ${pkgs.dscp}/bin/dscp ${pkgs.google-chrome}/bin/google-chrome-stable \ + --force-device-scale-factor=1.5 \ + --class=Rainbow \ + --kiosk "https://web.openrainbow.com" \ + --user-data-dir=''${HOME}/.config/google-chrome-rainbow + ''); + icon = pkgs.fetchurl { + url = "https://web.openrainbow.com/rb/2.139.17/assets/skins/rainbow/images/homepage/logo__rainbow.svg"; + hash = "sha256-5fmo8rDqVDpzkGaPjk4Y+SsSZpAsY7VUQSFW6WdHwuU="; + }; + }; }; fonts = { diff --git a/accounts/gkleen@sif/libvirt/default.nix b/accounts/gkleen@sif/libvirt/default.nix index 54d971c4..076a0d86 100644 --- a/accounts/gkleen@sif/libvirt/default.nix +++ b/accounts/gkleen@sif/libvirt/default.nix @@ -15,11 +15,13 @@ with flakeInputs.nixVirt.lib; memory = { count = 16; unit = "GiB"; }; storage_vol = "/home/gkleen/.local/share/libvirt/images/lmmirzm-vmrz01.qcow2"; nvram_path = "/home/gkleen/.local/share/libvirt/lmmirzm-vmrz01.nvram"; - virtio_net = true; virtio_drive = true; virtio_video = false; - install_virtio = true; + install_virtio = false; }) { + qemu-commandline.env = [ + { name = "SPICE_DEBUG_ALLOW_MC"; value = "1"; } + ]; vcpu.count = 4; os.bootmenu.enable = true; devices.graphics = { @@ -27,18 +29,42 @@ with flakeInputs.nixVirt.lib; # gl.enable = true; }; devices.interface = { + model.type = "virtio"; type = "bridge"; mac.address = "52:54:00:b9:f3:ed"; source.bridge = "gre-0971"; }; + devices.channel = [ + { + type = "unix"; + target = { type = "virtio"; name = "org.qemu.guest_agent.0"; }; + } + ]; + devices.tpm.model = "tpm-tis"; }); } ]; pools = [ - { definition = ./pool-default.xml; + { definition = pool.writeXML { + type = "dir"; + name = "default"; + uuid = "ad899c92-02e3-45f9-bf49-195467aba2e2"; + target = { + path = "/home/gkleen/.local/share/libvirt/images"; + }; + }; active = true; volumes = [ - { definition = ./vol-lmmirzm-vmrz01.xml; + { definition = volume.writeXML { + type = "file"; + name = "lmmirzm-vmrz01.qcow2"; + capacity = { count = 40; unit = "GB"; }; + target = { + path = "/home/gkleen/.local/share/libvirt/images/lmmirzm-vmrz01.qcow2"; + format.type = "qcow2"; + features.lazy_refcounts = {}; + }; + }; } ]; } diff --git a/accounts/gkleen@sif/libvirt/pool-default.xml b/accounts/gkleen@sif/libvirt/pool-default.xml deleted file mode 100644 index 7303830b..00000000 --- a/accounts/gkleen@sif/libvirt/pool-default.xml +++ /dev/null @@ -1,18 +0,0 @@ - - default - ad899c92-02e3-45f9-bf49-195467aba2e2 - 1492738072064 - 215387853312 - 1277350218752 - - - - /home/gkleen/.local/share/libvirt/images - - 0711 - 1000 - 100 - - - - diff --git a/accounts/gkleen@sif/libvirt/vol-lmmirzm-vmrz01.xml b/accounts/gkleen@sif/libvirt/vol-lmmirzm-vmrz01.xml deleted file mode 100644 index e160ae4d..00000000 --- a/accounts/gkleen@sif/libvirt/vol-lmmirzm-vmrz01.xml +++ /dev/null @@ -1,17 +0,0 @@ - - lmmirzm-vmrz01.qcow2 - 40 - - /home/gkleen/.local/share/libvirt/images/lmmirzm-vmrz01.qcow2 - - - 0600 - 1000 - 100 - - - - - - - diff --git a/nvfetcher.toml b/nvfetcher.toml index dcf5bd64..046290df 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -98,3 +98,8 @@ fetch.git = "https://github.com/jimeh/tomorrow-night-paradise-theme.el" src.github_tag = "Mange/emoji-data" fetch.github = "Mange/emoji-data" git.fetchSubmodules = true + +[spice-record] +src.github = "JonathonReinhart/spice-record" +src.prefix = "v" +fetch.tarball = "https://github.com/JonathonReinhart/spice-record/archive/refs/tags/v$ver.tar.gz" diff --git a/overlays/spice-record.nix b/overlays/spice-record.nix new file mode 100644 index 00000000..06a114da --- /dev/null +++ b/overlays/spice-record.nix @@ -0,0 +1,12 @@ +{ final, prev, sources, ... }: { + spice-record = prev.python3Packages.buildPythonPackage rec { + inherit (sources.spice-record) src version pname; + propagatedBuildInputs = with prev.python3Packages; [ libvirt pygobject3 ]; + buildInputs = with prev; [ spice-gtk gst_all_1.gst-plugins-base ]; + nativeBuildInputs = with prev; [ gobject-introspection wrapGAppsHook3 makeWrapper ]; + postInstall = '' + wrapProgram $out/bin/spice-record \ + --prefix PATH : ${prev.lib.makeBinPath (with prev; [ ffmpeg-full ])} + ''; + }; +} -- cgit v1.2.3