2024-07-28 02:11:57 +02:00
|
|
|
|
{
|
|
|
|
|
inputs,
|
|
|
|
|
configLib,
|
|
|
|
|
...
|
|
|
|
|
}:
|
2024-07-29 19:34:24 +02:00
|
|
|
|
# Hetzner cloud multipurpouse server
|
2024-07-28 02:11:57 +02:00
|
|
|
|
inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
specialArgs = {inherit inputs configLib;};
|
|
|
|
|
# > Our main nixos configuration file <
|
|
|
|
|
modules = [
|
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
|
|
|
|
inputs.disko.nixosModules.disko
|
|
|
|
|
./disk-config.nix
|
2024-09-30 16:06:17 +02:00
|
|
|
|
./restic.nix
|
2024-07-28 02:11:57 +02:00
|
|
|
|
../../roles/nixos/vm.nix
|
|
|
|
|
../../configs/nixos/common.nix
|
|
|
|
|
../../configs/nixos/tailscale.nix
|
|
|
|
|
../../configs/nixos/sshd.nix
|
2024-08-07 22:24:17 +02:00
|
|
|
|
../../configs/nixos/secrets.nix
|
2024-07-28 02:11:57 +02:00
|
|
|
|
../../configs/nixos/radicale.nix
|
2024-07-30 05:07:02 +02:00
|
|
|
|
../../configs/nixos/forgejo.nix
|
2024-07-28 02:11:57 +02:00
|
|
|
|
({
|
|
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
configLib,
|
2024-08-07 22:24:17 +02:00
|
|
|
|
lib,
|
2024-07-28 02:11:57 +02:00
|
|
|
|
...
|
|
|
|
|
}: {
|
|
|
|
|
host = {
|
|
|
|
|
user = "gabe";
|
|
|
|
|
fullName = "Gabe Venberg";
|
|
|
|
|
gui.enable = false;
|
|
|
|
|
isVm = true;
|
|
|
|
|
};
|
2024-07-29 19:34:24 +02:00
|
|
|
|
networking.hostName = "cirrus"; # Define your hostname.
|
2024-07-28 02:11:57 +02:00
|
|
|
|
networking.hostId = "908b80b6";
|
|
|
|
|
networking.useNetworkd = true;
|
|
|
|
|
systemd.network = {
|
|
|
|
|
enable = true;
|
|
|
|
|
networks."enp1s0" = {
|
|
|
|
|
networkConfig.DHCP = "ipv4";
|
|
|
|
|
gateway = ["fe80::1"];
|
|
|
|
|
address = ["2a01:4f8:1c1b:6c7c::1/64"];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-08-07 22:24:17 +02:00
|
|
|
|
sops = lib.mkIf (inputs ? nix-secrets) {
|
|
|
|
|
secrets = {
|
|
|
|
|
radicale-users = {
|
|
|
|
|
sopsFile = "${inputs.nix-secrets}/radicale-users";
|
|
|
|
|
format = "binary";
|
|
|
|
|
owner = "radicale";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-07-28 02:11:57 +02:00
|
|
|
|
home-manager.users.${config.host.user} = {
|
|
|
|
|
inputs,
|
|
|
|
|
osConfig,
|
|
|
|
|
lib,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
|
|
|
|
host = osConfig.host;
|
|
|
|
|
user = {
|
|
|
|
|
git = {
|
|
|
|
|
profile = {
|
|
|
|
|
name = config.host.fullName;
|
|
|
|
|
email = "gabevenberg@gmail.com";
|
|
|
|
|
};
|
|
|
|
|
workProfile.enable = false;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
imports = [
|
|
|
|
|
../../roles/home-manager/minimal-terminal.nix
|
|
|
|
|
../../configs/home-manager/common.nix
|
|
|
|
|
inputs.nixvim.homeManagerModules.nixvim
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
|
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
|
# networking.firewall.enable = false;
|
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "24.05"; # Did you read the comment?
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
}
|