feat: add base hosting-01
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
a9bb23b384
commit
aa6694e9ff
3 changed files with 80 additions and 0 deletions
|
|
@ -60,6 +60,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# servers
|
# servers
|
||||||
|
hosting-01 = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
modules = [
|
||||||
|
./hosts/hosting-01
|
||||||
|
];
|
||||||
|
};
|
||||||
mail-01 = nixpkgs.lib.nixosSystem {
|
mail-01 = nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
specialArgs = { inherit inputs outputs; };
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
|
|
||||||
21
hosts/hosting-01/default.nix
Normal file
21
hosts/hosting-01/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./disk-config.nix
|
||||||
|
{
|
||||||
|
_module.args.disks = [ "/dev/sda" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
../common/servers
|
||||||
|
];
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
networking.hostName = "hosting-01";
|
||||||
|
networking.nameservers = [ "8.8.8.8" ];
|
||||||
|
|
||||||
|
security.acme.defaults.email = "landervandenbulcke@gmail.com";
|
||||||
|
security.acme.acceptTerms = true;
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
52
hosts/hosting-01/disk-config.nix
Normal file
52
hosts/hosting-01/disk-config.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
disks ? [ "/dev/sda" ],
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = lib.genAttrs disks (disk: {
|
||||||
|
device = disk;
|
||||||
|
type = "disk";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
name = "boot";
|
||||||
|
size = "256M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
main = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ]; # override existing partition
|
||||||
|
subvolumes = {
|
||||||
|
"/" = {
|
||||||
|
mountOptions = [ "compress=zstd" ];
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
"/home" = {
|
||||||
|
mountOptions = [ "compress=zstd" ];
|
||||||
|
mountpoint = "/home";
|
||||||
|
};
|
||||||
|
"/nix" = {
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue