dotfiles/nixos/systems/zfs-installation.nix

52 lines
1,002 B
Nix
Raw Normal View History

# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
#
# SPDX-License-Identifier: LGPL-3.0-or-later
{
system = "x86_64-linux";
name = "heater";
module = {
roots,
inputs,
pkgs,
secret,
lib,
config,
...
}:
with lib; {
nix.registry =
flip mapAttrs inputs
(
n: flake: {inherit flake;}
);
services.ssh.enable = true;
users.users.main = {
isNormalUser = true;
extraGroups = [ "sudo" ];
password = "toor";
};
boot.initrd.systemd.enable = true;
boot.initrd.supportedFilesystems = [ "zfs" ];
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.enableUnstable = true;
networking = {
hostName = "zfs-test";
useDHCP = false;
firewall.enable = true;
hostId = "a9b2c221";
firewall = {
allowedTCPPorts = [22 25565];
};
};
# System
system.stateVersion = "22.05";
};
}