summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/core/bootloader.nix1
-rw-r--r--os/core/greet.nix9
-rw-r--r--os/core/security.nix34
-rw-r--r--os/core/ssh.nix12
-rw-r--r--os/core/storage.nix1
-rw-r--r--os/core/users.nix2
-rw-r--r--os/srv/compat.nix13
-rw-r--r--os/srv/files.nix29
-rw-r--r--os/srv/gaming.nix38
-rw-r--r--os/srv/kdeconnect.nix13
-rw-r--r--os/srv/nix-helper.nix25
-rw-r--r--os/wm/niri.nix2
12 files changed, 108 insertions, 71 deletions
diff --git a/os/core/bootloader.nix b/os/core/bootloader.nix
index 7f3a85e..dfd9101 100644
--- a/os/core/bootloader.nix
+++ b/os/core/bootloader.nix
@@ -12,7 +12,6 @@ in
type = lib.types.enum [
"systemd-boot"
"grub"
- "none"
];
default = "systemd-boot";
description = "Which bootloader to use";
diff --git a/os/core/greet.nix b/os/core/greet.nix
index 953b017..cf814af 100644
--- a/os/core/greet.nix
+++ b/os/core/greet.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.os.core.greet;
in
@@ -24,6 +29,6 @@ in
};
security.pam.services.greetd.enableGnomeKeyring = true;
- environment.systemPackages = with pkgs; [ tuigreet ];
+ # environment.systemPackages = with pkgs; [ tuigreet ];
};
}
diff --git a/os/core/security.nix b/os/core/security.nix
index e8c541c..bc2c41c 100644
--- a/os/core/security.nix
+++ b/os/core/security.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.os.core.security;
in
@@ -8,22 +13,25 @@ in
services.gnome.gnome-keyring.enable = true;
security = {
- pam.services.swaylock = {};
+ pam.services = {
+ swaylock = { };
+ login.enableGnomeKeyring = true;
+ };
polkit.enable = true;
rtkit.enable = true;
};
- systemd.user.services.polkit-gnome-authentication-agent-1 = {
- description = "gnome-polkit-authentication-agent-1";
- wantedBy = [ "graphical-session.target" ];
- serviceConfig = {
- Type = "simple";
- ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
- Restart = "on-failure";
- RestartSec = 1;
- TimeoutStopSec = 10;
- };
- };
+ # systemd.user.services.polkit-gnome-authentication-agent-1 = {
+ # description = "gnome-polkit-authentication-agent-1";
+ # wantedBy = [ "graphical-session.target" ];
+ # serviceConfig = {
+ # Type = "simple";
+ # ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
+ # Restart = "on-failure";
+ # RestartSec = 1;
+ # TimeoutStopSec = 10;
+ # };
+ # };
environment.systemPackages = with pkgs; [
veracrypt
diff --git a/os/core/ssh.nix b/os/core/ssh.nix
index 2fb35f8..4069d31 100644
--- a/os/core/ssh.nix
+++ b/os/core/ssh.nix
@@ -1,4 +1,10 @@
-{ config, lib, pkgs, username, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ username,
+ ...
+}:
let
cfg = config.os.core.ssh;
in
@@ -10,9 +16,7 @@ in
openFirewall = true;
};
- services.openssh = {
- enable = true;
- };
+ services.openssh.enable = true;
programs.gnupg.agent = {
enable = true;
diff --git a/os/core/storage.nix b/os/core/storage.nix
index 59f0093..8527bac 100644
--- a/os/core/storage.nix
+++ b/os/core/storage.nix
@@ -8,7 +8,6 @@ in
};
config = lib.mkIf cfg.enable {
nix.settings.auto-optimise-store = true;
- programs.nh.enable = true;
services.fstrim.enable = true;
services.btrfs.autoScrub = {
enable = true;
diff --git a/os/core/users.nix b/os/core/users.nix
index 03eff8a..86c015c 100644
--- a/os/core/users.nix
+++ b/os/core/users.nix
@@ -23,7 +23,7 @@ in
extraGroups = lib.mkMerge [
[ "wheel" ]
- (lib.mkIf (config.os.core.drivers.amd.enable or false) [
+ (lib.mkIf (config.os.core.drivers.graphics.enable or false) [
"video"
"render"
])
diff --git a/os/srv/compat.nix b/os/srv/compat.nix
index f174e02..721fab1 100644
--- a/os/srv/compat.nix
+++ b/os/srv/compat.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.os.srv.compat;
in
@@ -13,12 +18,6 @@ in
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
ELECTRON_ENABLE_WAYLAND = "1";
- WINE_RT_PRIO = "1";
};
-
- environment.systemPackages = with pkgs; [
- winetricks
- wineWowPackages.waylandFull
- ];
};
}
diff --git a/os/srv/files.nix b/os/srv/files.nix
index b4130b0..875a825 100644
--- a/os/srv/files.nix
+++ b/os/srv/files.nix
@@ -9,16 +9,11 @@ let
in
{
options.os.srv.files = {
- thunar.enable = lib.mkEnableOption "enables the thunar file manager";
+ enable = lib.mkEnableOption "enables general file management stuff";
krusader.enable = lib.mkEnableOption "enables krusader for easier file moving using ssh";
- utils.enable = lib.mkEnableOption "enables compression and trash utilities";
};
config = lib.mkMerge [
{
- os.srv.files.utils.enable = lib.mkDefault cfg.thunar.enable;
- }
-
- (lib.mkIf cfg.thunar.enable {
programs.thunar = {
enable = true;
plugins = with pkgs; [
@@ -28,10 +23,15 @@ in
};
services = {
tumbler.enable = true;
- gnome.gnome-keyring.enable = true;
+ gvfs.enable = true;
};
- environment.systemPackages = with pkgs; [ file-roller ];
- })
+ environment.systemPackages = with pkgs; [
+ file-roller
+ gdu
+ pxz
+ pigz
+ ];
+ }
(lib.mkIf cfg.krusader.enable {
environment.systemPackages = with pkgs; [
@@ -39,16 +39,5 @@ in
kdePackages.kio-extras
];
})
-
- (lib.mkIf cfg.utils.enable {
- services.gvfs.enable = true;
-
- environment.systemPackages = with pkgs; [
- trashy
- gdu
- pxz
- pigz
- ];
- })
];
}
diff --git a/os/srv/gaming.nix b/os/srv/gaming.nix
index f0ff771..912a252 100644
--- a/os/srv/gaming.nix
+++ b/os/srv/gaming.nix
@@ -10,12 +10,22 @@ let
in
{
options.os.srv.gaming = {
- enable = lib.mkEnableOption "enables gaming utilities";
+ enable = lib.mkEnableOption "enables general gaming support";
+
+ tools.enable = lib.mkEnableOption "enables performance tools" // {
+ default = cfg.enable;
+ };
+ launchers.enable = lib.mkEnableOption "enables 3rd party launchers" // {
+ default = cfg.enable;
+ };
+ games.enable = lib.mkEnableOption "enables specific native games";
steam.enable = lib.mkEnableOption "enables steam utilities";
vr.enable = lib.mkEnableOption "enables vr support";
};
+
config = lib.mkMerge [
- (lib.mkIf cfg.enable {
+ # --- PERFORMANCE & TOOLING ---
+ (lib.mkIf cfg.tools.enable {
programs.gamescope = {
enable = true;
capSysNice = true;
@@ -26,23 +36,34 @@ in
enableRenice = true;
};
+ home-manager.users.${username}.hm.soft.mangohud.enable = true;
+
environment.systemPackages = with pkgs; [
- openttd-jgrpp
ludusavi
protonplus
- openmw
+ ];
+ })
+
+ # --- EXTERNAL LAUNCHERS ---
+ (lib.mkIf cfg.launchers.enable {
+ environment.systemPackages = with pkgs; [
heroic
(prismlauncher.override {
- additionalLibs = with pkgs; [
- ocl-icd
- ];
+ additionalLibs = with pkgs; [ ocl-icd ];
jdks = with pkgs; [ javaPackages.compiler.temurin-bin.jdk-25 ];
})
];
+ })
- home-manager.users.${username}.hm.soft.mangohud.enable = true;
+ # --- SPECIFIC GAMES ---
+ (lib.mkIf cfg.games.enable {
+ environment.systemPackages = with pkgs; [
+ openttd-jgrpp
+ openmw
+ ];
})
+ # --- STEAM ---
(lib.mkIf cfg.steam.enable {
programs.steam = {
enable = true;
@@ -58,6 +79,7 @@ in
};
})
+ # --- VR SUPPORT ---
(lib.mkIf cfg.vr.enable {
programs.alvr = {
enable = true;
diff --git a/os/srv/kdeconnect.nix b/os/srv/kdeconnect.nix
index 049a1c6..01a0e4d 100644
--- a/os/srv/kdeconnect.nix
+++ b/os/srv/kdeconnect.nix
@@ -4,16 +4,15 @@
username,
pkgs,
...
-}: let
+}:
+let
cfg = config.os.srv.kdeconnect;
-in {
+in
+{
options.os.srv.kdeconnect.enable = lib.mkEnableOption "enables kde connect";
config = lib.mkIf cfg.enable {
- environment.systemPackages = [pkgs.kdePackages.dolphin];
+ environment.systemPackages = [ pkgs.kdePackages.dolphin ];
programs.kdeconnect.enable = true;
- home-manager.users.${username}.services.kdeconnect = {
- enable = true;
- # indicator = true;
- };
+ home-manager.users.${username}.services.kdeconnect.enable = true;
};
}
diff --git a/os/srv/nix-helper.nix b/os/srv/nix-helper.nix
index 63b3182..0bb819a 100644
--- a/os/srv/nix-helper.nix
+++ b/os/srv/nix-helper.nix
@@ -1,4 +1,10 @@
-{ config, lib, pkgs, username, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ username,
+ ...
+}:
let
cfg = config.os.srv.nix-helper;
in
@@ -6,18 +12,25 @@ in
options.os.srv.nix-helper.enable = lib.mkEnableOption "enables nix-helper";
config = lib.mkIf cfg.enable {
nix.settings = {
- trusted-users = [ "root" "${username}" ];
- experimental-features = [ "nix-command" "flakes" ];
+ trusted-users = [
+ "root"
+ "${username}"
+ ];
+ experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
};
programs.nh = {
enable = true;
flake = "/etc/nixos";
+ clean.extraArgs = "--keep 5";
};
- environment.sessionVariables = {
- NH_OS_FLAKE = "/etc/nixos";
- };
+ # environment.sessionVariables = {
+ # NH_OS_FLAKE = "/etc/nixos";
+ # };
environment.systemPackages = with pkgs; [
nix-output-monitor
diff --git a/os/wm/niri.nix b/os/wm/niri.nix
index 587f543..58d27af 100644
--- a/os/wm/niri.nix
+++ b/os/wm/niri.nix
@@ -19,7 +19,7 @@ in
programs.niri = {
enable = true;
- # package = pkgs.niri-unstable;
+ package = pkgs.niri-unstable;
};
os.srv.compat.enable = true;