Files
nixos-at-home/hosts/blade/default.nix
HotaruBlaze 73f436b560 bump
2026-05-31 09:46:05 +00:00

115 lines
2.7 KiB
Nix

{
name,
nodes,
pkgs,
lib,
inputs,
...
}:
{
deployment = {
targetHost = "192.168.1.69"; # also supports an IP address
targetPort = 22;
targetUser = "phoenix";
buildOnTarget = true;
keys.phoenix.keyFile = "/home/nixos/.ssh/id_ed25519.pub";
tags = [
"homelab"
];
};
imports = [
./hardware-configuration.nix
];
# boot.loader.grub.enable = true;
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
time.timeZone = "America/New_York";
networking.hostName = "blade";
services.xserver.xkb.layout = "uk";
i18n.defaultLocale = "en_US.UTF-8";
nix.settings.trusted-users = [
"root"
"@wheel"
];
users.users.phoenix = {
isNormalUser = true;
extraGroups = [
"wheel"
"networkmanager"
];
home = "/home/phoenix";
packages = with pkgs; [
vim
tree
lego
];
openssh.authorizedKeys.keys = [
"sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBMPNyAyMrqlI3tUI39TqcgYBciIC+aY2UNAunFqylhhzTVA14rluMjFqHf9HKs9SHZ52nLEV58/BxlnMeMtRc+cAAAAEc3NoOg== phoenix@DESKTOP-1A9MAJO"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMoM3FANeYtWLJIiTL+nU0XzZft2psiSgbCmNfQZBXgy nixos@nixos"
];
};
users.users.deploy = {
isNormalUser = true;
extraGroups = [
"wheel"
"networkmanager"
];
home = "/home/deploy";
# packages = with pkgs; [
# vim
# tree
# lego
# ];
openssh.authorizedKeys.keys = [
"sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBMPNyAyMrqlI3tUI39TqcgYBciIC+aY2UNAunFqylhhzTVA14rluMjFqHf9HKs9SHZ52nLEV58/BxlnMeMtRc+cAAAAEc3NoOg== phoenix@DESKTOP-1A9MAJO"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMoM3FANeYtWLJIiTL+nU0XzZft2psiSgbCmNfQZBXgy nixos@nixos"
];
};
# systemd.user.enable = false;
security.sudo.extraRules = [
{
users = [ "phoenix" ];
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ]; # "SETENV" # Adding the following could be a good idea
}
];
}
];
environment.systemPackages = with pkgs; [
inetutils
mtr
sysstat
dig
openssl
];
services.openssh = {
enable = true;
settings.PermitRootLogin = "yes";
};
networking.firewall.allowedTCPPorts = [
22
80
443
];
# networking.firewall.allowedUDPPorts = [ ... ];
networking.firewall.enable = true;
networking.usePredictableInterfaceNames = false;
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
system.stateVersion = "25.11";
}