Skip to content

Commit

Permalink
fix: isgraphical option
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Aug 12, 2024
1 parent 02ff41c commit 4b656a9
Showing 1 changed file with 26 additions and 29 deletions.
55 changes: 26 additions & 29 deletions machines/lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,38 +54,35 @@ rec {
${target}."${host}" = builder {
inherit system;
modules = [
(
{ config, ... }:
{
options = {
dotfiles = {
username = mkOption {
type = types.str;
default = username;
description = "The username of the user";
};
desktop = mkOption {
type = types.nullOr (
types.enum [
"cosmic"
"gnome"
"hyprland"
"sway"
]
);
default = if (pkgs.stdenv.isLinux && config.dotfiles.isGraphical) then "sway" else null;
description = "The desktop environment to use";
};
{
options = {
dotfiles = {
username = mkOption {
type = types.str;
default = username;
description = "The username of the user";
};
isGraphical = mkOption {
type = types.bool;
default = isGraphical;
description = "Whether the system is a graphical target";
desktop = mkOption {
type = types.nullOr (
types.enum [
"cosmic"
"gnome"
"hyprland"
"sway"
]
);
default = if (pkgs.stdenv.isLinux && isGraphical) then "sway" else null;
description = "The desktop environment to use";
};
};
config.networking.hostName = host;
}
)
isGraphical = mkOption {
type = types.bool;
default = isGraphical;
description = "Whether the system is a graphical target";
};
};
config.networking.hostName = host;
}
./common/shared
./common/${hostPlatform}
./${host}
Expand Down

0 comments on commit 4b656a9

Please sign in to comment.