rewrite
This commit is contained in:
@@ -9,39 +9,26 @@
|
||||
{
|
||||
|
||||
deployment = {
|
||||
targetHost = "192.168.1.69"; # also supports an IP address
|
||||
targetHost = "192.168.1.69";
|
||||
targetPort = 22;
|
||||
targetUser = "phoenix";
|
||||
buildOnTarget = true;
|
||||
keys.phoenix.keyFile = "/home/nixos/.ssh/id_ed25519.pub";
|
||||
tags = [
|
||||
"homelab"
|
||||
"homelab"
|
||||
];
|
||||
};
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/common.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"
|
||||
];
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
home = "/home/phoenix";
|
||||
packages = with pkgs; [
|
||||
vim
|
||||
@@ -55,60 +42,13 @@
|
||||
};
|
||||
|
||||
users.users.deploy = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
];
|
||||
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";
|
||||
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user