Skip to content

Commit

Permalink
nix vm: add plasma and cinnamon vms
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollie committed Jan 7, 2025
1 parent e5bc557 commit f0bdb3f
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 1 deletion.
8 changes: 8 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@
}
);
in {
"wayland-cinnamon-${system}" = makeVM ./nix/vm/wayland-cinnamon.nix;
"wayland-gnome-${system}" = makeVM ./nix/vm/wayland-gnome.nix;
"wayland-plasma6-${system}" = makeVM ./nix/vm/wayland-plasma6.nix;
"x11-cinnamon-${system}" = makeVM ./nix/vm/x11-cinnamon.nix;
"x11-gnome-${system}" = makeVM ./nix/vm/x11-gnome.nix;
"x11-plasma6-${system}" = makeVM ./nix/vm/x11-plasma6.nix;
};

apps.${system} = let
Expand All @@ -98,8 +102,12 @@
}
);
in {
wayland-cinnamon = wrapVM "wayland-cinnamon";
wayland-gnome = wrapVM "wayland-gnome";
wayland-plasma6 = wrapVM "wayland-plasma6";
x11-cinnamon = wrapVM "x11-cinnamon";
x11-gnome = wrapVM "x11-gnome";
x11-plasma6 = wrapVM "x11-plasma6";
};
}
# Our supported systems are the same supported systems as the Zig binaries.
Expand Down
14 changes: 14 additions & 0 deletions nix/vm/common-cinnamon.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{...}: {
services.xserver = {
displayManager = {
lightdm = {
enable = true;
};
};
desktopManager = {
cinnamon = {
enable = true;
};
};
};
}
1 change: 0 additions & 1 deletion nix/vm/common-gnome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
...
}: {
services.xserver = {
enable = true;
displayManager = {
gdm = {
enable = true;
Expand Down
17 changes: 17 additions & 0 deletions nix/vm/common-plasma6.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{...}: {
services = {
displayManager = {
sddm = {
enable = true;
wayland = {
enable = true;
};
};
};
desktopManager = {
plasma6 = {
enable = true;
};
};
};
}
22 changes: 22 additions & 0 deletions nix/vm/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,37 @@
environment.systemPackages = [
pkgs.kitty
pkgs.ghostty
pkgs.helix
pkgs.neovim
pkgs.zig_0_13
];

security.polkit = {
enable = true;
};

services.dbus = {
enable = true;
};

services.displayManager = {
autoLogin = {
user = "ghostty";
};
};

services.libinput = {
enable = true;
};

services.qemuGuest = {
enable = true;
};

services.spice-vdagentd = {
enable = true;
};

services.xserver = {
enable = true;
};
Expand Down
7 changes: 7 additions & 0 deletions nix/vm/wayland-cinnamon.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{...}: {
imports = [
./common-cinnamon.nix
];

services.displayManager.defaultSession = "cinnamon-wayland";
}
6 changes: 6 additions & 0 deletions nix/vm/wayland-plasma6.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{...}: {
imports = [
./common-plasma6.nix
];
services.displayManager.defaultSession = "plasma";
}
7 changes: 7 additions & 0 deletions nix/vm/x11-cinnamon.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{...}: {
imports = [
./common-cinnamon.nix
];

services.displayManager.defaultSession = "cinnamon";
}
6 changes: 6 additions & 0 deletions nix/vm/x11-plasma6.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{...}: {
imports = [
./common-plasma6.nix
];
services.displayManager.defaultSession = "plasmax11";
}

0 comments on commit f0bdb3f

Please sign in to comment.