refactor2

This commit is contained in:
Lilith 2025-03-12 15:43:41 +01:00
parent 701c9d71f0
commit 7fa104b722
Signed by: lilith
GPG key ID: 8712A0F317C37175
30 changed files with 240 additions and 111 deletions

14
system/core/default.nix Normal file
View file

@ -0,0 +1,14 @@
{...}: {
imports = [
./audio.nix
./bluetooth.nix
./boot.nix
./btrfs.nix
./env.nix
./fonts.nix
./networking.nix
./nix.nix
./packages.nix
./persistence.nix
];
}

View file

@ -1,29 +1,7 @@
{...}: {
imports = [
./boot.nix
./packages.nix
./env.nix
./btrfs.nix
./users.nix
./networking.nix
./persistence.nix
./nix.nix
./audio.nix
./ssh.nix
./syncthing.nix
./wayland.nix
./steam.nix
./nfs.nix
./fonts.nix
./bluetooth.nix
./zsh.nix
./sops.nix
./stylix.nix
./core
./optional
];
system.stateVersion = "24.11";
# system.stateVersion = "24.11";
}

View file

@ -1,13 +0,0 @@
{ ... }: {
fileSystems."/mnt/nas" = {
device = "nixserver:/share";
fsType = "nfs";
options = [
"nfsvers=4.2"
"noauto"
"x-systemd.automount"
"x-systemd.idle-timeout=600"
"_netdev"
];
};
}

View file

@ -0,0 +1,7 @@
{...}: {
imports = [
./nfs.nix
./desktop.nix
./steam.nix
];
}

View file

@ -0,0 +1,28 @@
{ config, lib, ...}: {
options.desktop.enable = lib.mkEnableOption "Enable Wayland compositor with hyprland login";
config = lib.mkIf config.desktop.enable {
hardware.graphics.enable = true;
security.polkit.enable = true;
security.pam.services.hyprlock = {};
services.dbus.enable = true;
programs.hyprland.enable = true;
services.greetd = {
enable = true;
settings = {
default_session = {
user = "lilith";
command = "Hyprland";
};
initial_session = {
user = "lilith";
command = "Hyprland";
};
};
};
};
}

23
system/optional/nfs.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, lib, ... }: {
options.nfs.client.enable = lib.mkEnableOption "Enable Nas (via NFS) as a client";
options.nfs.server.enable = lib.mkEnableOption "Enable Nas (via NFS) as the server";
config = lib.mkIf config.nfs.client.enable {
fileSystems."/mnt/nas" = {
device = "nixserver:/share";
fsType = "nfs";
options = [
"nfsvers=4.2"
"noauto"
"x-systemd.automount"
"x-systemd.idle-timeout=600"
"_netdev"
];
};
};
config = lib.mkIf config.nfs.server.enable {
};
}

27
system/optional/steam.nix Normal file
View file

@ -0,0 +1,27 @@
{ config, lib, ...}: {
options.gaming.enable = lib.mkEnableOption "Enable steam and related software";
config = lib.mkIf config.gaming.enable {
programs = {
gamescope = {
enable = true;
capSysNice = true;
};
steam = {
enable = true;
gamescopeSession.enable = true;
};
gamemode.enable = true;
};
environment = {
systemPackages = with pkgs; [
mangohud
protonup
];
};
};
}

View file

@ -0,0 +1,39 @@
{stylix, pkgs, config, lib, ...}: {
options.stylix.enable = lib.mkEnableOption "Enable Stylix";
config = lib.mkIf config.stylix.enable {
imports = [stylix.nixosModules.stylix];
stylix = {
enable = true;
image = ../wallpapers/default.png;
polarity = "dark";
opacity = {
terminal = 0.8;
popups = 0.8;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font";
};
emoji = {
package = pkgs.twemoji-color-font;
name = "Twemoji";
};
sizes = { applications = 14; desktop = 12; popups = 12; terminal = 14; };
};
cursor = {
package = pkgs.rose-pine-cursor;
name = "Rosé Pine";
};
};
};
}

View file

@ -1,5 +0,0 @@
{...}: {
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
}

View file

@ -1,34 +0,0 @@
{stylix, pkgs, ...}: {
imports = [stylix.nixosModules.stylix];
stylix = {
enable = true;
image = ../wallpapers/default.png;
polarity = "dark";
opacity = {
terminal = 0.8;
popups = 0.8;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font";
};
emoji = {
package = pkgs.twemoji-color-font;
name = "Twemoji";
};
sizes = { applications = 14; desktop = 12; popups = 12; terminal = 14; };
};
cursor = {
package = pkgs.rose-pine-cursor;
name = "Rosé Pine";
};
};
}