summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-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
-rw-r--r--modules/desktop/hyprland.nix19
-rw-r--r--modules/hardware/gpu.nix4
-rw-r--r--modules/security.nix28
8 files changed, 181 insertions, 9 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"];
+ };
+}
diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix
index 0440453..5e35608 100644
--- a/modules/desktop/hyprland.nix
+++ b/modules/desktop/hyprland.nix
@@ -109,6 +109,7 @@ in {
config = lib.mkIf (hyprlandConf.enable) (lib.mkMerge [
{
environment.variables.WLR_NO_HARDWARE_CURSORS = "1";
+ environment.sessionVariables.NIXOS_OZONE_WL = "1";
home.packages = [
pkgs.killall
@@ -175,12 +176,16 @@ in {
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
- "GDK_BACKEND,wayland"
- "QT_QPA_PLATFORM,wayland"
+ "GDK_BACKEND=wayland,x11"
+ "QT_QPA_PLATFORM=wayland;xcb"
+ "CLUTTER_BACKEND=wayland"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
- "SDL_VIDEODRIVER,wayland"
+ "SDL_VIDEODRIVER=wayland"
+
+ "disable_hyprland_logo=true"
+ "force_default_wallpaper,0"
];
decoration = decoration;
@@ -206,12 +211,12 @@ in {
}
(lib.mkIf (device.gpu == "nvidia") {
home.manager.wayland.windowManager.hyprland.settings.env = [
- "GBM_BACKEND,nvidia-drm"
- "__GLX_VENDOR_LIBRARY_NAME,nvidia"
- "LIBVA_DRIVER_NAME,nvidia"
+ "GBM_BACKEND=nvidia-drm"
+ "__GLX_VENDOR_LIBRARY_NAME=nvidia"
+ "LIBVA_DRIVER_NAME=nvidia"
"__GL_GSYNC_ALLOWED"
"__GL_VRR_ALLOWED"
- "WLR_DRM_NO_ATOMIC,1"
+ "WLR_DRM_NO_ATOMIC=1"
];
})
(lib.mkIf (config.modules.desktop.greetd.enable) {
diff --git a/modules/hardware/gpu.nix b/modules/hardware/gpu.nix
index d7dfe17..fd696ab 100644
--- a/modules/hardware/gpu.nix
+++ b/modules/hardware/gpu.nix
@@ -45,7 +45,7 @@ in {
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
- package = config.boot.kernelPackages.nvidiaPackages.beta;
+ package = config.boot.kernelPackages.nvidiaPackages.production;
};
boot.initrd.kernelModules = [
"nvidia"
@@ -54,7 +54,7 @@ in {
"nvidia_drm"
];
boot.extraModprobeConfig = ''
- options modeset=1 fbdev=1
+ options nvidia-drm modeset=1
'';
})
]);
diff --git a/modules/security.nix b/modules/security.nix
new file mode 100644
index 0000000..c88fe0c
--- /dev/null
+++ b/modules/security.nix
@@ -0,0 +1,28 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+
+in {
+ config = {
+ security.polkit.enable = true;
+ services.pcscd.enable = true;
+
+ programs.gnupg.agent = {
+ enable = true;
+ enableSSHSupport = true;
+ };
+
+ environment.systemPackages = [
+ pkgs.pinentry-curses
+ ];
+
+ home.packages = [
+ (pkgs.pass.withExtensions (exts: [exts.pass-otp ]))
+ pkgs.pinentry-qt
+ ];
+ };
+}