feat(hosts): Added new OVHCloud basic host config

This commit is contained in:
GaspardCulis 2024-09-23 16:57:09 +02:00
parent b8e03ddcdb
commit bc9f3f9951
4 changed files with 98 additions and 0 deletions

View file

@ -47,6 +47,14 @@
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
]; ];
}; };
OVHCloud = nixpkgs.lib.nixosSystem {
extraArgs = {inherit inputs;};
modules = [
./hosts/OVHCloud
disko.nixosModules.disko
];
};
}; };
homeConfigurations = { homeConfigurations = {

View 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
];
}

View 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"
];
};
};
};
};
};
};
}

View file

@ -0,0 +1,11 @@
{modulesPath, ...}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
./disko-config.nix
];
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
}