Format
This commit is contained in:
parent
c47db92a88
commit
09bc19268d
29 changed files with 151 additions and 210 deletions
|
|
@ -12,6 +12,20 @@ with lib; {
|
|||
The domain for all devices.
|
||||
'';
|
||||
};
|
||||
fullName = mkOption {
|
||||
type = types.str;
|
||||
default = "Sicheng Pan";
|
||||
description = ''
|
||||
The full name of the default user.
|
||||
'';
|
||||
};
|
||||
gpgKeyId = mkOption {
|
||||
type = types.str;
|
||||
default = "0xCE969670FB4B4A56";
|
||||
description = ''
|
||||
The GPG key ID for signing.
|
||||
'';
|
||||
};
|
||||
homeDir = mkOption {
|
||||
type = types.str;
|
||||
default = "/home/${config.constants.userName}";
|
||||
|
|
@ -19,6 +33,20 @@ with lib; {
|
|||
The home directory for the default user.
|
||||
'';
|
||||
};
|
||||
homeServer = mkOption {
|
||||
type = types.str;
|
||||
default = "nebula";
|
||||
description = ''
|
||||
The hostname of the home server.
|
||||
'';
|
||||
};
|
||||
locale = mkOption {
|
||||
type = types.str;
|
||||
default = "zh_CN.UTF-8";
|
||||
description = ''
|
||||
The default locale for all devices.
|
||||
'';
|
||||
};
|
||||
localhost = mkOption {
|
||||
type = types.str;
|
||||
default = "127.0.0.1";
|
||||
|
|
@ -40,6 +68,7 @@ with lib; {
|
|||
prowlarr = 30784;
|
||||
radarr = 37196;
|
||||
sonarr = 32438;
|
||||
tailscale = 62662;
|
||||
vault = 25487;
|
||||
};
|
||||
description = ''
|
||||
|
|
@ -79,6 +108,13 @@ with lib; {
|
|||
The secrets file for device.
|
||||
'';
|
||||
};
|
||||
timeZone = mkOption {
|
||||
type = types.str;
|
||||
default = "America/Los_Angeles";
|
||||
description = ''
|
||||
The default timezone for all devices.
|
||||
'';
|
||||
};
|
||||
syncthingDevices = mkOption {
|
||||
type = types.attrsOf (types.attrsOf types.str);
|
||||
default = {
|
||||
|
|
@ -97,11 +133,37 @@ with lib; {
|
|||
The username across all devices.
|
||||
'';
|
||||
};
|
||||
zfsPoolOptions = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = {
|
||||
ashift = "12";
|
||||
autotrim = "on";
|
||||
listsnapshots = "on";
|
||||
};
|
||||
description = ''
|
||||
The default options for ZFS pools.
|
||||
'';
|
||||
};
|
||||
zfsRootFsOptions = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = {
|
||||
acltype = "posix";
|
||||
atime = "off";
|
||||
compression = "zstd";
|
||||
dnodesize = "auto";
|
||||
mountpoint = "none";
|
||||
normalization = "formD";
|
||||
xattr = "sa";
|
||||
};
|
||||
description = ''
|
||||
The default root filesystem options for ZFS pools.
|
||||
'';
|
||||
};
|
||||
wildcard = mkOption {
|
||||
type = types.str;
|
||||
default = "0.0.0.0";
|
||||
description = ''
|
||||
The localhost address.
|
||||
The wildcard address for binding to all interfaces.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
home-manager.nixosModules.default
|
||||
sops-nix.nixosModules.default
|
||||
./constants.nix
|
||||
./network.nix
|
||||
./nix.nix
|
||||
./secrets.nix
|
||||
./users.nix
|
||||
./nix.nix
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [inputs.plasma-manager.homeModules.plasma-manager];
|
||||
|
|
|
|||
8
common/network.nix
Normal file
8
common/network.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{config, ...}: {
|
||||
networking.nftables.enable = true;
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
port = config.constants.port.tailscale;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
{config, ...}: {
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
|
||||
nix = {
|
||||
gc = {
|
||||
automatic = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
|
@ -212,7 +213,7 @@ in {
|
|||
};
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "zh_CN.UTF-8";
|
||||
defaultLocale = locale;
|
||||
supportedLocales = ["all"];
|
||||
};
|
||||
|
||||
|
|
@ -239,7 +240,7 @@ in {
|
|||
};
|
||||
};
|
||||
resolved.enable = true;
|
||||
syncthing = {
|
||||
syncthing = lib.mkIf config.services.syncthing.enable {
|
||||
configDir = "${homeDir}/.config/syncthing";
|
||||
dataDir = "${homeDir}/.local/share/syncthing";
|
||||
openDefaultPorts = true;
|
||||
|
|
@ -252,12 +253,12 @@ in {
|
|||
|
||||
sops.secrets.${usrPwdFile}.neededForUsers = true;
|
||||
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
time.timeZone = timeZone;
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users.${userName} = {
|
||||
description = "Sicheng Pan";
|
||||
description = fullName;
|
||||
extraGroups = [
|
||||
"audio"
|
||||
"dialout"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue