Simplify system and home options
This commit is contained in:
parent
ac22bc1849
commit
72ec65064d
|
@ -16,6 +16,7 @@
|
|||
};
|
||||
|
||||
system = {
|
||||
desktop.enable = true;
|
||||
lanzaboote.enable = true;
|
||||
wireguard.client.enable = true;
|
||||
libvirtd.enable = true;
|
||||
|
|
|
@ -62,18 +62,14 @@
|
|||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
|
||||
# Impermanence
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/persist/.snapshots" = { };
|
||||
|
||||
"${config.sysusers.main}" = {
|
||||
mountpoint = "/persist/home/${config.sysusers.main}";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/${config.sysusers.main}/.snapshots" = { };
|
||||
# Impermanence
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/persist/.snapshots" = { };
|
||||
"/persist/home/${config.sysusers.main}" = { };
|
||||
"/persist/home/${config.sysusers.main}/.snapshots" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -90,8 +86,5 @@
|
|||
};
|
||||
|
||||
# Needed for impermanence
|
||||
fileSystems = {
|
||||
"/persist".neededForBoot = true;
|
||||
"/persist/home/${config.sysusers.main}".neededForBoot = true;
|
||||
};
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
home-manager.users."${config.sysusers.main}" = {
|
||||
home.stateVersion = lib.mkForce "24.11";
|
||||
home = {
|
||||
desktop.enable = true;
|
||||
stateVersion = lib.mkForce "24.11";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
};
|
||||
|
||||
system = {
|
||||
desktop.enable = false;
|
||||
server.enable = true;
|
||||
fileserver.enable = true;
|
||||
socialserver.enable = true;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
environment.persistence."/persist".enable = lib.mkForce false;
|
||||
|
||||
system = {
|
||||
desktop.enable = false;
|
||||
mailserver.enable = true;
|
||||
wireless.enable = false;
|
||||
wireguard.client.enable = true;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
};
|
||||
|
||||
system = {
|
||||
desktop.enable = true;
|
||||
lanzaboote.enable = true;
|
||||
wireguard.client.enable = true;
|
||||
stateVersion = "24.05";
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
};
|
||||
|
||||
system = {
|
||||
desktop.enable = true;
|
||||
lanzaboote.enable = true;
|
||||
wireless.enable = false;
|
||||
video.nvidia.enable = true;
|
||||
|
|
|
@ -68,12 +68,8 @@
|
|||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/persist/.snapshots" = { };
|
||||
|
||||
"/${config.sysusers.main}" = {
|
||||
mountpoint = "/persist/home/${config.sysusers.main}";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/${config.sysusers.main}/.snapshots" = { };
|
||||
"/persist/home/${config.sysusers.main}" = { };
|
||||
"/persist/home/${config.sysusers.main}/.snapshots" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
home-manager.users."${config.sysusers.main}" = {
|
||||
home.stateVersion = lib.mkForce "24.05";
|
||||
home = {
|
||||
desktop.enable = true;
|
||||
stateVersion = lib.mkForce "24.05";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ nur, ... }:
|
||||
{ nur, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./files
|
||||
./options
|
||||
./programs
|
||||
./services
|
||||
./settings
|
||||
|
@ -14,6 +13,12 @@
|
|||
nur.modules.homeManager.default
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
home.stateVersion = "24.11";
|
||||
options.home = {
|
||||
desktop.enable = lib.mkEnableOption "Enable desktop programs and services.";
|
||||
};
|
||||
|
||||
config = {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
home.stateVersion = "24.11";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{ lib, ... }:
|
||||
with lib; {
|
||||
options.home.desktop.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
}
|
|
@ -1,13 +1,17 @@
|
|||
{ ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./accounts
|
||||
./devices
|
||||
./options
|
||||
./programs
|
||||
./secrets
|
||||
./services
|
||||
./settings
|
||||
../extras
|
||||
];
|
||||
|
||||
options.system = {
|
||||
desktop.enable = lib.mkEnableOption "Enable desktop apps and services";
|
||||
server.enable = lib.mkEnableOption "Enable server apps and services";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{ lib, ... }:
|
||||
with lib; {
|
||||
options.system = {
|
||||
desktop.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
server.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
}
|
16
modules/system/services/server/ddclient/default.nix
Normal file
16
modules/system/services/server/ddclient/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config = lib.mkIf config.system.server.enable {
|
||||
services.ddclient = {
|
||||
enable = true;
|
||||
protocol = "cloudflare";
|
||||
zone = "${config.domains.p2}";
|
||||
usev6 = "";
|
||||
username = "token";
|
||||
passwordFile = "${pkgs.writeText "cloudflareapikey" config.secrets.flareApiKey}";
|
||||
};
|
||||
environment.persistence."/persist".directories = [
|
||||
"/var/lib/private/ddclient"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./ddclient
|
||||
./fileserver
|
||||
./forgejo
|
||||
./icecast
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.system.fileserver.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
options.system.fileserver.enable = lib.mkEnableOption "Enable file serving services";
|
||||
|
||||
imports = [
|
||||
./jellyfin
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.system.mailserver.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
options.system.mailserver.enable = lib.mkEnableOption "Enable Simple NixOS Mailserver";
|
||||
|
||||
imports = [
|
||||
./simplenix
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.system.socialserver.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
options.system.socialserver.enable = lib.mkEnableOption "Enable social media like services";
|
||||
|
||||
imports = [
|
||||
./mastodon
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.ddclient = {
|
||||
enable = config.system.server.enable;
|
||||
protocol = "cloudflare";
|
||||
zone = "${config.domains.p2}";
|
||||
usev6 = "";
|
||||
username = "token";
|
||||
passwordFile = "${pkgs.writeText "cloudflareapikey" config.secrets.flareApiKey}";
|
||||
};
|
||||
environment.persistence."/persist".directories = lib.mkIf config.services.ddclient.enable [
|
||||
"/var/lib/private/ddclient"
|
||||
];
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.system.webserver.enable = lib.mkEnableOption "Enable nginx related services";
|
||||
|
||||
imports = [
|
||||
./acme
|
||||
./ddclient
|
||||
./nginx
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue