config/systems/template/configuration.nix

44 lines
932 B
Nix
Raw Normal View History

2025-02-04 02:15:57 +01:00
{
2025-02-04 02:42:40 +01:00
inputs,
2025-02-04 02:15:57 +01:00
...
}:
{
2025-02-04 02:18:58 +01:00
nixpkgs.hostPlatform = "x86_64-linux";
2025-02-04 02:15:57 +01:00
imports = [
./../base/configuration.nix
inputs.sops-nix.nixosModules.sops
2025-02-04 02:42:40 +01:00
inputs.impermanence.nixosModules.impermanence
2025-02-04 02:15:57 +01:00
];
networking.hostName = "nixos-template";
networking.dhcpcd.enable = false;
2025-02-04 02:38:07 +01:00
networking.useNetworkd = true;
2025-02-04 02:15:57 +01:00
services.cloud-init = {
enable = true;
network.enable = true;
btrfs.enable = true;
2025-02-04 02:15:57 +01:00
config = ''
system_info:
distro: nixos
network:
renderers: [ 'networkd' ]
2025-02-04 03:13:44 +01:00
cloud_init_modules:
- migrator
- seed_random
- growpart
cloud_config_modules:
- runcmd
2025-02-04 03:13:44 +01:00
cloud_final_modules: []
2025-02-04 03:34:49 +01:00
datasource_list:
- NoCloud
growpart:
devices: ['/dev/sda2']
2025-02-04 04:17:27 +01:00
# Resize the filesystem along with the partition
runcmd:
- btrfs filesystem resize max /nix
2025-02-04 02:15:57 +01:00
'';
};
system.stateVersion = "24.05";
2025-02-04 02:15:57 +01:00
}