started splitting up graphical programs because some of them don't really work well on ubuntu

This commit is contained in:
John Lancaster
2025-07-06 21:39:41 -05:00
parent ddf5bcaeee
commit ce738ae612
7 changed files with 24 additions and 20 deletions

View File

@@ -76,8 +76,11 @@ nhmu
enableShell = true; enableShell = true;
_1password = true; _1password = true;
docker = true; docker = true;
graphical = true; # graphical = true;
graphical = {
steam = true; steam = true;
vscode = true;
};
extraImports = [ extraImports = [
./home-manager/john.nix ./home-manager/john.nix
./home-manager/gnome.nix ./home-manager/gnome.nix

View File

@@ -38,7 +38,6 @@
_1password = config._1password; _1password = config._1password;
docker = config.docker; docker = config.docker;
graphical = config.graphical; graphical = config.graphical;
steam = config.steam;
} }
] ++ config.extraImports; ] ++ config.extraImports;

View File

@@ -62,15 +62,8 @@
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts? # # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
] ++ lib.optionals config.graphical [ ]
discord ++ lib.optionals config.graphical.discord [ discord ];
spotify
sublime4
joplin-desktop
] ++ lib.optionals config._1password [
_1password-cli
gh # GitHub CLI with 1Password integration
];
# Home Manager can also manage your environment variables through # Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a # 'home.sessionVariables'. These will be explicitly sourced when using a

View File

@@ -1,6 +1,6 @@
{ config, pkgs, lib, nixgl, ... }: { config, pkgs, lib, nixgl, ... }:
{ {
home.sessionVariables = lib.mkIf (config.enableShell && config.graphical) { home.sessionVariables = lib.mkIf (config.enableShell && config.graphical.ghostty) {
TERMINAL = "ghostty"; TERMINAL = "ghostty";
}; };
@@ -9,7 +9,7 @@
nixGL.defaultWrapper = "mesa"; nixGL.defaultWrapper = "mesa";
nixGL.installScripts = [ "mesa" ]; nixGL.installScripts = [ "mesa" ];
programs.ghostty = lib.mkIf (config.enableShell && config.graphical) { programs.ghostty = lib.mkIf (config.enableShell && config.graphical.ghostty) {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
package = config.lib.nixGL.wrap pkgs.ghostty; package = config.lib.nixGL.wrap pkgs.ghostty;
@@ -52,7 +52,7 @@
}; };
# https://github.com/ghostty-org/ghostty/discussions/3763#discussioncomment-11699970 # https://github.com/ghostty-org/ghostty/discussions/3763#discussioncomment-11699970
xdg.desktopEntries."com.mitchellh.ghostty" = lib.mkIf (config.enableShell && config.graphical) { xdg.desktopEntries."com.mitchellh.ghostty" = lib.mkIf (config.enableShell && config.graphical.ghostty) {
name = "Ghostty"; name = "Ghostty";
type = "Application"; type = "Application";
comment = "A terminal emulator"; comment = "A terminal emulator";

View File

@@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
programs.vscode = lib.mkIf config.graphical { programs.vscode = lib.mkIf config.graphical.vscode {
enable = true; enable = true;
package = pkgs.vscode; package = pkgs.vscode;
profiles.default.extensions = with pkgs.vscode-extensions; [ profiles.default.extensions = with pkgs.vscode-extensions; [

View File

@@ -60,15 +60,24 @@
description = "Whether to enable docker stuff"; description = "Whether to enable docker stuff";
}; };
options.graphical = lib.mkOption { options.graphical.discord = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = "Whether this system has a graphical environment";
}; };
options.steam = lib.mkOption { options.graphical.ghostty = lib.mkOption {
type = lib.types.bool;
default = false;
};
options.graphical.steam = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = "Whether this system has Steam installed"; description = "Whether this system has Steam installed";
}; };
options.graphical.vscode = lib.mkOption {
type = lib.types.bool;
default = false;
};
} }

View File

@@ -1,6 +1,6 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
programs.steam = lib.mkIf config.steam { programs.steam = lib.mkIf config.graphical.steam {
enable = true; enable = true;
gamescopeSession.enable = true; gamescopeSession.enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play