feat(hosts): Added new OVHCloud
basic host config
This commit is contained in:
parent
b8e03ddcdb
commit
bc9f3f9951
4 changed files with 98 additions and 0 deletions
|
@ -47,6 +47,14 @@
|
|||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
|
||||
OVHCloud = nixpkgs.lib.nixosSystem {
|
||||
extraArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./hosts/OVHCloud
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
|
|
25
hosts/OVHCloud/default.nix
Normal file
25
hosts/OVHCloud/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Nix
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [22];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
helix
|
||||
git
|
||||
];
|
||||
}
|
54
hosts/OVHCloud/disko-config.nix
Normal file
54
hosts/OVHCloud/disko-config.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{lib, ...}: {
|
||||
disko.devices = {
|
||||
disk.disk1 = {
|
||||
device = lib.mkDefault "/dev/sda";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
esp = {
|
||||
name = "ESP";
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
11
hosts/OVHCloud/hardware-configuration.nix
Normal file
11
hosts/OVHCloud/hardware-configuration.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{modulesPath, ...}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
./disko-config.nix
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue