2024-04-18 20:39:32 +01:00
|
|
|
{
|
|
|
|
outputs = { self, nixpkgs }: {
|
|
|
|
# miscellaneous stuff that's important
|
|
|
|
nixosModules.base = {lib, ...}: {
|
|
|
|
boot.swraid.enable = lib.mkForce false;
|
|
|
|
networking.hostName = "chopper";
|
|
|
|
networking.firewall.enable = true;
|
|
|
|
system.stateVersion = "24.05";
|
2024-05-04 12:51:43 +01:00
|
|
|
sdImage.firmwarePartitionOffset = 32;
|
2024-05-04 13:37:58 +01:00
|
|
|
nix.settings = {
|
|
|
|
extra-experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
};
|
2024-04-18 20:39:32 +01:00
|
|
|
};
|
|
|
|
# Configuration of individual users
|
|
|
|
nixosModules.users = {...}: {
|
|
|
|
users.users.taneb = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIV9ymP4tpq11a8wfUvn8eEEwAPvZZSPZTbASLh7YxOw nvd1234@gmail.com"
|
|
|
|
];
|
2024-05-04 12:51:51 +01:00
|
|
|
hashedPassword = "$y$j9T$9pxQ4Zj7OirGMmgclhUb0/$YCfaYmIaaHRrkqiqdNbQSlJ7puX8bGrMCLavq6Pe1e3";
|
2024-04-18 20:39:32 +01:00
|
|
|
};
|
|
|
|
users.mutableUsers = false;
|
|
|
|
};
|
|
|
|
# Configuration of SSH server
|
|
|
|
nixosModules.ssh = {...}: {
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
settings.PasswordAuthentication = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
nixosConfigurations.chopper = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "aarch64-linux";
|
|
|
|
modules = [
|
|
|
|
(nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix")
|
|
|
|
self.nixosModules.base
|
|
|
|
self.nixosModules.users
|
|
|
|
self.nixosModules.ssh
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|