Split up config files to multiple and added imports. Fixed default values for systemConfigs

This commit is contained in:
2025-04-15 12:48:27 +02:00
parent 9611b8bb8d
commit 16c4a8f46b
23 changed files with 149 additions and 163 deletions

6
shared/modules/boot.nix Normal file
View File

@ -0,0 +1,6 @@
{
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
}

View File

@ -1,17 +1,28 @@
{
imports = [
./boot.nix
./development
./electron.nix
./fonts.nix
./gaming
./gnome
./hardware
./kdeconnect.nix
./locale.nix
./mail.nix
./media.nix
./networking.nix
./nixos.nix
./nix-helper.nix
./office.nix
./hyprland
./sddm.nix
./security.nix
./shell.nix
./social.nix
./users.nix
./qt.nix
./xdg.nix
./xserver.nix
];
}

View File

@ -0,0 +1,8 @@
{ lib, systemConfig, ... }:
{
environment.sessionVariables = lib.mkIf systemConfig.wayland.enable {
# Tells Electron apps to use Wayland
NIXOS_OZONE_WL = "1";
};
}

View File

@ -0,0 +1,3 @@
{
programs.kdeconnect.enable = true;
}

7
shared/modules/mail.nix Normal file
View File

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
unstable.protonmail-desktop
];
}

11
shared/modules/media.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, inputs, ... }:
{
environment.systemPackages = with pkgs; [
stremio
gimp
vlc
vdhcoapp
inputs.grayjay.packages.${system}.grayjay
];
}

View File

@ -1,6 +1,10 @@
{ systemConfig, ... }:
{ pkgs, systemConfig, ... }:
{
environment.systemPackages = with pkgs; [
wget
];
networking = {
networkmanager.enable = true;
hostName = systemConfig.hostName;

25
shared/modules/nixos.nix Normal file
View File

@ -0,0 +1,25 @@
{
pkgs,
outputs,
systemConfig,
...
}:
{
environment.systemPackages = with pkgs; [
nix-prefetch-github # Cmd to get rev and hash from GitHub
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs = {
# Allow unfree packages
config.allowUnfree = true;
overlays = [ outputs.overlays.unstable-packages ];
};
system.stateVersion = systemConfig.version;
}

View File

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
onlyoffice-desktopeditors
];
}

View File

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
discord
];
}

15
shared/modules/users.nix Normal file
View File

@ -0,0 +1,15 @@
{ systemConfig, ... }:
let
username = systemConfig.user.name;
in
{
# Define a user without a password, TODO pass in user.password
users.users.${username} = {
isNormalUser = true;
description = username;
extraGroups = [
"networkmanager"
"wheel"
];
};
}

9
shared/modules/xdg.nix Normal file
View File

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
];
}

View File

@ -0,0 +1,3 @@
{
services.xserver.enable = true;
}