Skip to content

Commit e7697b0

Browse files
committed
fix: switch testvm to graphical
1 parent 89cdb97 commit e7697b0

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

modules/home/programs/gui/niri.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@
99
let
1010
inherit (lib.modules) mkIf;
1111
inherit (self.lib.programs) mkProgram;
12-
inherit (self.lib.validators) hasProfile;
12+
inherit (self.lib.validators) isWayland hasProfile;
1313

1414
cfg = config.nixfiles.programs.gui.niri;
1515
in
1616
{
1717
options.nixfiles.programs.gui = {
1818
niri = mkProgram pkgs "niri" {
19-
enable.default = config.nixfiles.programs.gui.enable && (hasProfile osConfig [ "laptop" ]);
19+
enable.default =
20+
config.nixfiles.programs.gui.enable
21+
&& (hasProfile osConfig [ "laptop" ])
22+
&& (hasProfile osConfig [ "graphical" ])
23+
&& (isWayland osConfig);
2024
};
2125
};
2226

modules/nixos/profiles/graphical/desktopManagers/niri.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ in
1313
config =
1414
mkIf ((hasProfile config [ "graphical" ]) && (hasProfile config [ "laptop" ]) && (isWayland config))
1515
{
16-
programs = {
17-
niri.enable = true;
18-
niri.package = pkgs.niri-unstable;
16+
programs.niri = {
17+
enable = true;
18+
package = pkgs.niri-unstable;
1919
};
2020
};
2121
}

systems/x86_64-nixos/testvm/default.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
nixfiles = {
1515
device.profiles = [
1616
"vm"
17-
# "desktop"
18-
"headless"
17+
"desktop"
18+
# FIXME: non graphical appears broken because of niri & stylix?
19+
# "headless"
1920
];
2021
virtualisation.incus.enable = true;
2122
storage = {

0 commit comments

Comments
 (0)