Split up code to support server configuration
This commit is contained in:
1 parent
6364d8afa0
commit
fa2413f272
15 files changed
+524
-256
No files matched your search
@@ -27,42 +27,13 @@ in
|
||||
pciutils
|
||||
zip
|
||||
unzip
|
||||
|
||||
# TODO: MOVE
|
||||
quickemu # TODO: Reenable once building this is fixed
|
||||
pdftk
|
||||
|
||||
# TODO: Move to USB module
|
||||
# usbutils
|
||||
# udiskie
|
||||
# udisks
|
||||
brightnessctl
|
||||
];
|
||||
|
||||
security.krb5 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
libdefaults = {
|
||||
rdns = false;
|
||||
};
|
||||
realms = {
|
||||
"GEWISWG.GEWIS.NL" = {
|
||||
kdc = [
|
||||
"https://gewisvdesktop.gewis.nl/KdcProxy"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
modules = {
|
||||
# Enable base modules
|
||||
clean-tmp.enable = true;
|
||||
fontconfig.enable = true;
|
||||
neovim.enable = true;
|
||||
systemd-boot.enable = true;
|
||||
nixgreety.enable = true;
|
||||
pipewire.enable = true;
|
||||
};
|
||||
|
||||
# TODO: Remove everything below, it is here out of convenience and should be elsewhere
|
||||
@@ -75,34 +46,9 @@ in
|
||||
enable = true;
|
||||
};
|
||||
networking.firewall.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
services.libinput.enable = true;
|
||||
services.upower.enable = true; # For battery percentage in gnome
|
||||
modules.unfree.enable = true;
|
||||
modules.unfree.allowedPackages = [
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
];
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
# networking.useDHCP = true;
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
{
|
||||
from = 10000;
|
||||
to = 11000;
|
||||
}
|
||||
];
|
||||
networking.firewall.allowedUDPPortRanges = [
|
||||
{
|
||||
from = 10000;
|
||||
to = 11000;
|
||||
}
|
||||
];
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# TODO: Move to USB module
|
||||
# services.gvfs.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
|
||||
console.packages = [
|
||||
pkgs.dina-psfu
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.base.desktop;
|
||||
in
|
||||
{
|
||||
options.modules.base.desktop = {
|
||||
enable = mkEnableOption "desktop";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# TODO: MOVE
|
||||
quickemu # TODO: Reenable once building this is fixed
|
||||
pdftk
|
||||
|
||||
# TODO: Move to USB module
|
||||
# usbutils
|
||||
# udiskie
|
||||
# udisks
|
||||
brightnessctl
|
||||
];
|
||||
|
||||
# Move to Realm module
|
||||
security.krb5 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
libdefaults = {
|
||||
rdns = false;
|
||||
};
|
||||
realms = {
|
||||
"GEWISWG.GEWIS.NL" = {
|
||||
kdc = [
|
||||
"https://gewisvdesktop.gewis.nl/KdcProxy"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
modules = {
|
||||
# Enable base modules
|
||||
base.enable = true;
|
||||
fontconfig.enable = true;
|
||||
nixgreety.enable = true;
|
||||
pipewire.enable = true;
|
||||
graphics.enable = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
services.libinput.enable = true;
|
||||
services.upower.enable = true; # For battery percentage in gnome
|
||||
modules.unfree.allowedPackages = [
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
];
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
{
|
||||
from = 10000;
|
||||
to = 11000;
|
||||
}
|
||||
];
|
||||
networking.firewall.allowedUDPPortRanges = [
|
||||
{
|
||||
from = 10000;
|
||||
to = 11000;
|
||||
}
|
||||
];
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# TODO: Move to USB module
|
||||
# services.gvfs.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -10,6 +10,7 @@ with lib;
|
||||
imports = [
|
||||
# Import modules
|
||||
./base/default.nix
|
||||
./base/desktop.nix
|
||||
./bluetooth/default.nix
|
||||
./boot/clean-tmp.nix
|
||||
./boot/silent-boot.nix
|
||||
@@ -28,6 +29,7 @@ with lib;
|
||||
./power-saving/default.nix
|
||||
./printing/default.nix
|
||||
./sound/pipewire.nix
|
||||
./ssh/default.nix
|
||||
./users/default.nix
|
||||
./unfree/default.nix
|
||||
./vpn/tailscale.nix
|
||||
|
||||
@@ -5,8 +5,15 @@
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.fontconfig;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
options.modules.graphics = {
|
||||
enable = mkEnableOption "graphics";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
# TODO: Modularize further, especially modesetting should be its own module.
|
||||
# Set up graphics
|
||||
hardware.graphics.enable32Bit = true;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.ssh;
|
||||
in
|
||||
{
|
||||
options.modules.ssh = {
|
||||
enable = mkEnableOption "ssh";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.openssh.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user