summaryrefslogtreecommitdiffstats
path: root/modules/desktop/apps
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-04-29 17:05:09 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-04-29 17:05:09 -0400
commit69857d405fcc45194b4a4c4bb1f9946c05e50631 (patch)
tree461c6adc10b88c5e86ea38b70078bbf1500b5984 /modules/desktop/apps
parent7b79203f54853733d4fae88943829d0e24e6e49f (diff)
downloadnix-config-69857d405fcc45194b4a4c4bb1f9946c05e50631.tar.gz
nix-config-69857d405fcc45194b4a4c4bb1f9946c05e50631.tar.bz2
nix-config-69857d405fcc45194b4a4c4bb1f9946c05e50631.zip
add security nix, more programs for desktop
Diffstat (limited to 'modules/desktop/apps')
-rw-r--r--modules/desktop/apps/editors/vscode.nix29
-rw-r--r--modules/desktop/apps/games/lutris.nix23
-rw-r--r--modules/desktop/apps/games/prism.nix23
-rw-r--r--modules/desktop/apps/games/vintagestory.nix19
-rw-r--r--modules/desktop/apps/virt.nix45
5 files changed, 139 insertions, 0 deletions
diff --git a/modules/desktop/apps/editors/vscode.nix b/modules/desktop/apps/editors/vscode.nix
new file mode 100644
index 0000000..f2db004
--- /dev/null
+++ b/modules/desktop/apps/editors/vscode.nix
@@ -0,0 +1,29 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ codeConf = config.modules.desktop.apps.editors.vscode;
+ configDir = config.nixosConfig.configDir;
+in {
+ options.modules.desktop.apps.editors.vscode = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (codeConf.enable) {
+ home.manager.programs.vscode = {
+ enable = true;
+ package = pkgs.vscode;
+ extensions = with pkgs.vscode-extensions; [
+ catppuccin.catppuccin-vsc
+ catppuccin.catppuccin-vsc-icons
+ ms-dotnettools.csharp
+ ];
+ };
+ };
+}
diff --git a/modules/desktop/apps/games/lutris.nix b/modules/desktop/apps/games/lutris.nix
new file mode 100644
index 0000000..c1c5d31
--- /dev/null
+++ b/modules/desktop/apps/games/lutris.nix
@@ -0,0 +1,23 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ lutrisConf = config.modules.desktop.apps.games.lutris;
+ configDir = config.nixosConfig.configDir;
+in {
+ options.modules.desktop.apps.games.lutris = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (lutrisConf.enable) {
+ environment.systemPackages = [
+ pkgs.lutris
+ ];
+ };
+}
diff --git a/modules/desktop/apps/games/prism.nix b/modules/desktop/apps/games/prism.nix
new file mode 100644
index 0000000..4eb0a5f
--- /dev/null
+++ b/modules/desktop/apps/games/prism.nix
@@ -0,0 +1,23 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ prismConf = config.modules.desktop.apps.games;
+ configDir = config.nixosConfig.configDir;
+in {
+ options.modules.desktop.apps.games.prism = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (prismConf.enable) {
+ environment.systemPackages = [
+ pkgs.prismlauncher
+ ];
+ };
+}
diff --git a/modules/desktop/apps/games/vintagestory.nix b/modules/desktop/apps/games/vintagestory.nix
new file mode 100644
index 0000000..db3d49e
--- /dev/null
+++ b/modules/desktop/apps/games/vintagestory.nix
@@ -0,0 +1,19 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ gamesConf = config.modules.desktop.apps.games;
+ configDir = config.nixosConfig.configDir;
+in {
+ config = lib.mkIf (gamesConf.enable) {
+ environment.systemPackages = [
+ pkgs.dotnet-sdk_7
+ ];
+ environment.sessionVariables = {
+ DOTNET_ROOT = "${pkgs.dotnet-sdk_7}";
+ };
+ };
+}
diff --git a/modules/desktop/apps/virt.nix b/modules/desktop/apps/virt.nix
new file mode 100644
index 0000000..5851a0b
--- /dev/null
+++ b/modules/desktop/apps/virt.nix
@@ -0,0 +1,45 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ virtConfig = config.modules.desktop.apps.virt-manager;
+in
+{
+ options.modules.desktop.apps.virt-manager = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (virtConfig.enable) {
+ virtualisation.libvirtd = {
+ enable = true;
+ qemu = {
+ package = pkgs.qemu_kvm;
+ runAsRoot = true;
+ swtpm.enable = true;
+ ovmf = {
+ enable = true;
+ packages = [(pkgs.OVMF.override {
+ secureBoot = true;
+ tpmSupport = true;
+ }).fd];
+ };
+ };
+ };
+ programs.virt-manager.enable = true;
+
+ home.manager.dconf.settings = {
+ "org/virt-manager/virt-manager/connections" = {
+ autoconnect = ["qemu:///system"];
+ uris = ["qemu:///system"];
+ };
+ };
+
+ user.extraGroups = ["libvirtd"];
+ };
+}