refactoring for isServer and isWorkstation: part 5 (final?)
This commit is contained in:
parent
a52ca12286
commit
037d68a9d4
44 changed files with 120 additions and 115 deletions
|
|
@ -1,30 +1,22 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
networking.hostName = "alexandria";
|
||||
|
||||
imports = [
|
||||
./modules
|
||||
./alexandria
|
||||
./modules/alexandria
|
||||
./modules/boot.nix
|
||||
./modules/console.nix
|
||||
./modules/desktop.nix
|
||||
./modules/locale.nix
|
||||
./modules/networking.nix
|
||||
./modules/nix.nix
|
||||
./modules/programs.nix
|
||||
./modules/security.nix
|
||||
./modules/services.nix
|
||||
./modules/users.nix
|
||||
./modules/virtualisation.nix
|
||||
];
|
||||
|
||||
nix.nixPath = [ "nixos-config=${./alexandria.nix}" ];
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 8192;
|
||||
}
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostName = "alexandria";
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
8010
|
||||
9666
|
||||
];
|
||||
allowedUDPPorts = [ 24454 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
services = {
|
||||
paperless = {
|
||||
enable = true;
|
||||
dataDir = "/data/paperless/data";
|
||||
mediaDir = "/data/paperless/media";
|
||||
passwordFile = config.age.secrets.paperless.path;
|
||||
port = lib.toInt "${config.ports.paperless}";
|
||||
consumptionDirIsPublic = true;
|
||||
settings = {
|
||||
PAPERLESS_OCR_LANGUAGE = "eng+por+deu";
|
||||
};
|
||||
};
|
||||
|
||||
nginx.virtualHosts."docs.baduhai.dev" = {
|
||||
useACMEHost = "baduhai.dev";
|
||||
forceSSL = true;
|
||||
kTLS = true;
|
||||
locations."/".proxyPass = "http://127.0.0.1:${config.ports.paperless}";
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.paperless = {
|
||||
file = ../../../secrets/paperless.age;
|
||||
owner = "paperless";
|
||||
group = "hosted";
|
||||
};
|
||||
}
|
||||
17
hosts/io.nix
17
hosts/io.nix
|
|
@ -4,8 +4,21 @@
|
|||
networking.hostName = "io";
|
||||
|
||||
imports = [
|
||||
./modules
|
||||
./io
|
||||
./modules/io
|
||||
./modules/boot.nix
|
||||
./modules/console.nix
|
||||
./modules/desktop.nix
|
||||
./modules/flatpak.nix
|
||||
./modules/impermanence.nix
|
||||
./modules/locale.nix
|
||||
./modules/networking.nix
|
||||
./modules/nix.nix
|
||||
./modules/programs.nix
|
||||
./modules/security.nix
|
||||
./modules/services.nix
|
||||
./modules/stylix.nix
|
||||
./modules/users.nix
|
||||
./modules/virtualisation.nix
|
||||
];
|
||||
|
||||
nix.nixPath = [ "nixos-config=${./io.nix}" ];
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ in
|
|||
./minecraft.nix
|
||||
./nextcloud.nix
|
||||
./nginx.nix
|
||||
./paperless.nix
|
||||
./searx.nix
|
||||
./services.nix
|
||||
./users.nix
|
||||
|
|
@ -23,15 +23,23 @@
|
|||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/31289617-1d84-4432-a833-680b52e88525";
|
||||
fsType = "ext4";
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/31289617-1d84-4432-a833-680b52e88525";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/4130-BE54";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/4130-BE54";
|
||||
fsType = "vfat";
|
||||
};
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 8192;
|
||||
}
|
||||
];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
15
hosts/modules/alexandria/networking.nix
Normal file
15
hosts/modules/alexandria/networking.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
8010
|
||||
9666
|
||||
];
|
||||
allowedUDPPorts = [ 24454 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -5,14 +5,15 @@
|
|||
./boot.nix
|
||||
./console.nix
|
||||
./desktop.nix
|
||||
./impermanence.nix
|
||||
# ./flatpak.nix
|
||||
# ./impermanence.nix
|
||||
./locale.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./programs.nix
|
||||
./security.nix
|
||||
./services.nix
|
||||
./stylix.nix
|
||||
# ./stylix.nix
|
||||
./users.nix
|
||||
./virtualisation.nix
|
||||
];
|
||||
|
|
|
|||
35
hosts/modules/flatpak.nix
Normal file
35
hosts/modules/flatpak.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
hostType,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
# Common configuration
|
||||
{
|
||||
}
|
||||
|
||||
# Server specific configuration
|
||||
(lib.mkIf hostType.isServer {
|
||||
})
|
||||
|
||||
# Workstation specific configuration
|
||||
(lib.mkIf hostType.isWorkstation {
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
packages = [
|
||||
"com.github.k4zmu2a.spacecadetpinball"
|
||||
"com.github.tchx84.Flatseal"
|
||||
"com.steamgriddb.SGDBoop"
|
||||
"app.zen_browser.zen"
|
||||
"io.github.Foldex.AdwSteamGtk"
|
||||
"io.itch.itch"
|
||||
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
|
||||
];
|
||||
uninstallUnmanaged = true;
|
||||
update.auto.enable = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
{ hostType, lib, ... }:
|
||||
{
|
||||
hostType,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./boot
|
||||
./boot.nix
|
||||
./ephermal.nix
|
||||
./hardware-configuration.nix
|
||||
./programs.nix
|
||||
|
|
@ -129,21 +129,6 @@
|
|||
]
|
||||
++ kdepkgs;
|
||||
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
packages = [
|
||||
"com.github.k4zmu2a.spacecadetpinball"
|
||||
"com.github.tchx84.Flatseal"
|
||||
"com.steamgriddb.SGDBoop"
|
||||
"app.zen_browser.zen"
|
||||
"io.github.Foldex.AdwSteamGtk"
|
||||
"io.itch.itch"
|
||||
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
|
||||
];
|
||||
uninstallUnmanaged = true;
|
||||
update.auto.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
adb.enable = true;
|
||||
steam.enable = true;
|
||||
|
|
@ -152,7 +137,6 @@
|
|||
kdeconnect.enable = true;
|
||||
partition-manager.enable = true;
|
||||
gamemode.enable = true;
|
||||
nix-index-database.comma.enable = true;
|
||||
appimage = {
|
||||
enable = true;
|
||||
binfmt = true;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,21 @@
|
|||
networking.hostName = "rotterdam";
|
||||
|
||||
imports = [
|
||||
./rotterdam
|
||||
./modules
|
||||
./modules/rotterdam
|
||||
./modules/boot.nix
|
||||
./modules/console.nix
|
||||
./modules/desktop.nix
|
||||
./modules/flatpak.nix
|
||||
./modules/impermanence.nix
|
||||
./modules/locale.nix
|
||||
./modules/networking.nix
|
||||
./modules/nix.nix
|
||||
./modules/programs.nix
|
||||
./modules/security.nix
|
||||
./modules/services.nix
|
||||
./modules/stylix.nix
|
||||
./modules/users.nix
|
||||
./modules/virtualisation.nix
|
||||
];
|
||||
|
||||
nix.nixPath = [ "nixos-config=${./rotterdam.nix}" ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue