105 lines
3.6 KiB
Nix
105 lines
3.6 KiB
Nix
|
{ config, pkgs, ... }: {
|
|||
|
imports = [
|
|||
|
./hardware-configuration.nix
|
|||
|
./networking.nix # generated at runtime by nixos-infect
|
|||
|
|
|||
|
];
|
|||
|
|
|||
|
boot.tmp.cleanOnBoot = true;
|
|||
|
environment.systemPackages = with pkgs; [
|
|||
|
fish
|
|||
|
git
|
|||
|
neovim
|
|||
|
tmux
|
|||
|
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|||
|
wget
|
|||
|
];
|
|||
|
i18n.defaultLocale = "en_US.UTF-8";
|
|||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|||
|
|
|||
|
programs.neovim.enable = true;
|
|||
|
programs.neovim.defaultEditor = true;
|
|||
|
|
|||
|
services.cloud-init = {
|
|||
|
enable = true;
|
|||
|
network.enable = false;
|
|||
|
};
|
|||
|
zramSwap.enable = true;
|
|||
|
|
|||
|
|
|||
|
security.acme = {
|
|||
|
acceptTerms = true;
|
|||
|
certs."new.anythingforafriend.com" = {
|
|||
|
dnsProvider = "porkbun";
|
|||
|
domain = "sovr.cloud";
|
|||
|
environmentFile = "/opt/keys/porkbun";
|
|||
|
group = "nginx";
|
|||
|
};
|
|||
|
defaults.email = "eli@gleipnir.technology";
|
|||
|
};
|
|||
|
# Configure network proxy if necessary
|
|||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
|||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|||
|
|
|||
|
services.nginx.defaultListenAddresses = [ "0.0.0.0" "2604:a880:4:1d0::8824:2000" ];
|
|||
|
services.openssh = {
|
|||
|
enable = true;
|
|||
|
# require public key authentication for better security
|
|||
|
settings.PasswordAuthentication = false;
|
|||
|
settings.KbdInteractiveAuthentication = false;
|
|||
|
settings.PermitRootLogin = "no";
|
|||
|
};
|
|||
|
systemd.network = {
|
|||
|
enable = true;
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
# Set your time zone.
|
|||
|
time.timeZone = "America/Phoenix";
|
|||
|
|
|||
|
users.groups.deploy = {};
|
|||
|
users.users.deploy = {
|
|||
|
extraGroups = [ "deploy" ];
|
|||
|
isNormalUser = true;
|
|||
|
};
|
|||
|
users.users.eliribble = {
|
|||
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|||
|
initialHashedPassword = "$y$j9T$XYOMZR8RZEiTnpaF8lsxv1$H7YbWDpzbnYXTLN0ZMhvtKOlSMy64P7C/RdLBaeaNf/";
|
|||
|
isNormalUser = true;
|
|||
|
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBvhtF6nRWlA6PVs71Eek7p0p2PxTd3P6ZEGFV2t75MB eliribble@nixos"];
|
|||
|
};
|
|||
|
users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBvhtF6nRWlA6PVs71Eek7p0p2PxTd3P6ZEGFV2t75MB eliribble@nixos'' ];
|
|||
|
|
|||
|
|
|||
|
# Open ports in the firewall.
|
|||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|||
|
# Or disable the firewall altogether.
|
|||
|
networking.firewall.enable = false;
|
|||
|
|
|||
|
# Copy the NixOS configuration file and link it from the resulting system
|
|||
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|||
|
# accidentally delete configuration.nix.
|
|||
|
# system.copySystemConfiguration = true;
|
|||
|
|
|||
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
|||
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|||
|
#
|
|||
|
# Most users should NEVER change this value after the initial install, for any reason,
|
|||
|
# even if you've upgraded your system to a new NixOS release.
|
|||
|
#
|
|||
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|||
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
|||
|
# to actually do that.
|
|||
|
#
|
|||
|
# This value being lower than the current NixOS release does NOT mean your system is
|
|||
|
# out of date, out of support, or vulnerable.
|
|||
|
#
|
|||
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|||
|
# and migrated your data accordingly.
|
|||
|
#
|
|||
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|||
|
system.stateVersion = "23.11";
|
|||
|
|
|||
|
}
|