summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--flake.lock43
-rw-r--r--flake.nix4
-rw-r--r--hosts/jonbox/default.nix16
-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
11 files changed, 240 insertions, 13 deletions
diff --git a/flake.lock b/flake.lock
index fc94683..21ebb6b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -20,13 +20,31 @@
"type": "github"
}
},
+ "nix-index-database": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ },
+ "locked": {
+ "lastModified": 1706411424,
+ "narHash": "sha256-BzziJYucEZvdCE985vjPoo3ztWcmUiSQ1wJ2CoT6jCc=",
+ "owner": "Mic92",
+ "repo": "nix-index-database",
+ "rev": "c782f2a4f6fc94311ab5ef31df2f1149a1856181",
+ "type": "github"
+ },
+ "original": {
+ "owner": "Mic92",
+ "repo": "nix-index-database",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
- "lastModified": 1703961334,
- "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
+ "lastModified": 1706191920,
+ "narHash": "sha256-eLihrZAPZX0R6RyM5fYAWeKVNuQPYjAkCUBr+JNvtdE=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
+ "rev": "ae5c332cbb5827f6b1f02572496b141021de335f",
"type": "github"
},
"original": {
@@ -52,10 +70,27 @@
"type": "github"
}
},
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1703961334,
+ "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"root": {
"inputs": {
"home-manager": "home-manager",
- "nixpkgs": "nixpkgs",
+ "nix-index-database": "nix-index-database",
+ "nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable"
}
}
diff --git a/flake.nix b/flake.nix
index 69987c2..7919110 100644
--- a/flake.nix
+++ b/flake.nix
@@ -9,11 +9,14 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
+
+ nix-index-database.url = "github:Mic92/nix-index-database";
};
outputs = inputs @ {
self,
nixpkgs,
+ nix-index-database,
...
}: let
system = "x86_64-linux";
@@ -43,6 +46,7 @@
inherit system;
specialArgs = {inherit lib inputs system;};
modules = [
+ nix-index-database.nixosModules.nix-index
{
nixpkgs.pkgs = pkgs;
modules.device.name = lib.mkDefault (builtins.baseNameOf path);
diff --git a/hosts/jonbox/default.nix b/hosts/jonbox/default.nix
index 0f525ca..3cd8d16 100644
--- a/hosts/jonbox/default.nix
+++ b/hosts/jonbox/default.nix
@@ -63,15 +63,31 @@
enable = true;
steam.enable = true;
};
+ editors = {
+ neovim.enable = true;
+ vscode.enable = true;
+ };
mpd.enable = true;
flatpak.enable = true;
newsboat.enable = true;
+ virt-manager.enable = true;
};
};
};
+ services.printing.enable = true;
+ services.avahi = {
+ enable = true;
+ nssmdns = true;
+ openFirewall = true;
+ };
+
home.manager.wayland.windowManager.hyprland.extraConfig = ''
monitor=DP-2,1920x1080,0x0,1
monitor=HDMI-A-2,1920x1080,1920x0,1
'';
+
+ programs.nix-ld.enable = true;
+ programs.nix-index.enableZshIntegration = false;
+ programs.nix-index.enableBashIntegration = false;
}
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
+ ];
+ };
+}