add (new config): add server default config.
This commit is contained in:
parent
bfce36ce73
commit
0db2e9ff17
5 changed files with 77 additions and 0 deletions
25
users/server/data/default.nix
Normal file
25
users/server/data/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
hostName,
|
||||||
|
userName,
|
||||||
|
systemArch,
|
||||||
|
deviceName,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
homeDir = "/home/${userName}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
user = {
|
||||||
|
name = userName;
|
||||||
|
email = "...";
|
||||||
|
};
|
||||||
|
|
||||||
|
paths = {
|
||||||
|
inherit homeDir;
|
||||||
|
};
|
||||||
|
|
||||||
|
device = {
|
||||||
|
name = deviceName;
|
||||||
|
hostName = hostName;
|
||||||
|
systemArch = systemArch;
|
||||||
|
};
|
||||||
|
}
|
||||||
19
users/server/home/default.nix
Normal file
19
users/server/home/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ userData, customFunctions, ... }:
|
||||||
|
let
|
||||||
|
userName = userData.user.name;
|
||||||
|
homeDirectory = userData.paths.homeDir;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = customFunctions.scan {
|
||||||
|
path = ./.;
|
||||||
|
exclude = [
|
||||||
|
./default.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
home = {
|
||||||
|
inherit homeDirectory;
|
||||||
|
username = userName;
|
||||||
|
stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
}
|
||||||
27
users/server/host/default.nix
Normal file
27
users/server/host/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ userData, customFunctions, ... }:
|
||||||
|
let
|
||||||
|
name = userData.user.name;
|
||||||
|
home = userData.paths.homeDir;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = customFunctions.scan {
|
||||||
|
path = ./.;
|
||||||
|
exclude = [ ./default.nix ];
|
||||||
|
};
|
||||||
|
|
||||||
|
host = {
|
||||||
|
version = "25.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.${name} = {
|
||||||
|
inherit name home;
|
||||||
|
isNormalUser = true;
|
||||||
|
description = name;
|
||||||
|
createHome = true;
|
||||||
|
homeMode = "700";
|
||||||
|
extraGroups = [
|
||||||
|
# "networkmanager"
|
||||||
|
# "wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
5
users/server/packages/default.nix
Normal file
5
users/server/packages/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{ lib }:
|
||||||
|
{
|
||||||
|
allowUnfree = false;
|
||||||
|
allowBroken = false;
|
||||||
|
}
|
||||||
1
users/server/scripts/default.nix
Normal file
1
users/server/scripts/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
pkgs: { }
|
||||||
Reference in a new issue