nixos-config/hosts/vulpecula/configuration.nix
2024-10-03 12:40:37 +02:00

103 lines
2.1 KiB
Nix

# {
# pkgs,
# lib,
# inputs,
# ...
# }: let
# sshKeys = import ../../crypto/ssh-keys.nix;
# in {
# imports = [
# ./hardware-configuration.nix
# ../../common/base.nix
# ];
# networking = {
# hostName = "vulpecula";
# firewall = {
# allowedTCPPorts = [
# # 2342
# # 8080 # ?
# # 9000
# # 9002
# ];
# };
# };
# # nix.settings.trusted-users = ["root" "@wheel"]; # TODO
# users.users.tasia = {
# isNormalUser = true;
# description = "Tasia";
# extraGroups = ["networkmanager" "wheel"];
# initialPassword = "correcthorsebatterystaple";
# openssh.authorizedKeys.keys = [
# sshKeys.tasia.yaseen
# ];
# };
# environment.systemPackages = with pkgs; [
# ];
# # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
# system.stateVersion = "24.05";
# }
{ config, lib, ... }: let
sshKeys = import ../../crypto/ssh-keys.nix;
in {
imports = [
./hardware-configuration.nix
../../common/base.nix
];
networking = {
hostName = "vulpecula";
firewall = {
allowedTCPPorts = [
# 8080 # ?
80
443
22
# 8008 # ssb
# 12345 # tildefriends
# 13378 # audiobookshelf
];
allowedUDPPorts = [
# 8080 # ?
];
};
};
boot = {
loader.systemd-boot.enable = lib.mkForce false;
# efi.canTouchEfiVariables = true;
initrd = {
enable = lib.mkForce true;
systemd.enable = lib.mkForce false;
};
};
boot.loader.grub.device = "/dev/sda";
users.users.tasia = {
isNormalUser = true;
description = "Tasia";
extraGroups = ["networkmanager" "wheel" "dialout"];
initialPassword = "correcthorsebatterystaple";
openssh.authorizedKeys.keys = [
sshKeys.tasia.yaseen
];
};
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
networking.domain = "";
services.openssh.enable = true;
# users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLyDLtqUhEQwIsPx0XgQ9OJb2+XxL+2ra4goNJEgwf0 tasia@yaseen'' ];
system.stateVersion = "24.05";
}