2024-12-27 04:49:17 -08:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page, on
|
|
|
|
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
|
|
|
|
2025-01-02 06:20:14 -08:00
|
|
|
|
{ config, pkgs, inputs, ... }:
|
2024-12-27 04:49:17 -08:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
2025-01-02 06:35:32 -08:00
|
|
|
|
inputs.sovr.nixosModules.default
|
2024-12-27 04:49:17 -08:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Use the GRUB 2 boot loader.
|
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
|
boot.loader.grub.efiSupport = false;
|
|
|
|
|
# boot.loader.grub.efiInstallAsRemovable = true;
|
|
|
|
|
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
|
|
|
# Define on which hard drive you want to install Grub.
|
|
|
|
|
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
fish
|
2024-12-28 20:37:57 -08:00
|
|
|
|
git
|
2025-01-02 06:19:55 -08:00
|
|
|
|
neovim
|
2024-12-27 04:49:17 -08:00
|
|
|
|
tmux
|
|
|
|
|
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
|
|
|
wget
|
2025-01-02 06:35:32 -08:00
|
|
|
|
inputs.sovr.packages."${pkgs.system}".sovr-server
|
2024-12-27 04:49:17 -08:00
|
|
|
|
];
|
|
|
|
|
|
2024-12-28 20:37:57 -08:00
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
2024-12-27 04:49:17 -08:00
|
|
|
|
networking = {
|
|
|
|
|
hostName = "sovr";
|
|
|
|
|
useNetworkd = true;
|
|
|
|
|
};
|
|
|
|
|
|
2024-12-28 20:37:57 -08:00
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
2024-12-27 04:49:17 -08:00
|
|
|
|
|
|
|
|
|
programs.neovim.enable = true;
|
|
|
|
|
programs.neovim.defaultEditor = true;
|
|
|
|
|
|
2025-01-03 08:02:07 -08:00
|
|
|
|
security.acme = {
|
|
|
|
|
acceptTerms = true;
|
|
|
|
|
certs."_.sovr.cloud" = {
|
|
|
|
|
dnsProvider = "porkbun";
|
|
|
|
|
domain = "*.sovr.cloud";
|
|
|
|
|
environmentFile = "/opt/keys/porkbun";
|
|
|
|
|
group = "nginx";
|
|
|
|
|
};
|
2025-01-05 18:05:10 -08:00
|
|
|
|
certs."sovr.cloud" = {
|
2025-01-03 08:02:07 -08:00
|
|
|
|
dnsProvider = "porkbun";
|
|
|
|
|
domain = "sovr.cloud";
|
|
|
|
|
environmentFile = "/opt/keys/porkbun";
|
|
|
|
|
group = "nginx";
|
2025-01-05 18:05:10 -08:00
|
|
|
|
};
|
2025-01-03 08:02:07 -08:00
|
|
|
|
defaults.email = "eli@theribbles.org";
|
|
|
|
|
};
|
2024-12-27 04:49:17 -08:00
|
|
|
|
# Configure network proxy if necessary
|
|
|
|
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
|
|
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
|
|
|
|
|
|
|
|
services.cloud-init = {
|
|
|
|
|
enable = true;
|
|
|
|
|
network.enable = true;
|
|
|
|
|
};
|
|
|
|
|
services.openssh.enable = true;
|
2025-01-02 09:17:16 -08:00
|
|
|
|
services.sovr-server = {
|
|
|
|
|
enable = true;
|
|
|
|
|
sessionSecret = "secret";
|
|
|
|
|
};
|
2024-12-27 04:49:17 -08:00
|
|
|
|
|
|
|
|
|
systemd.network.enable = true;
|
|
|
|
|
|
2025-01-02 06:20:42 -08:00
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "America/Phoenix";
|
|
|
|
|
|
2025-01-02 09:16:32 -08:00
|
|
|
|
users.groups.deploy = {};
|
|
|
|
|
users.users.deploy = {
|
|
|
|
|
extraGroups = [ "deploy" ];
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
};
|
2024-12-27 04:49:17 -08:00
|
|
|
|
users.users.eliribble = {
|
2025-01-02 09:17:39 -08:00
|
|
|
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
2024-12-27 04:49:17 -08:00
|
|
|
|
initialHashedPassword = "$y$j9T$XYOMZR8RZEiTnpaF8lsxv1$H7YbWDpzbnYXTLN0ZMhvtKOlSMy64P7C/RdLBaeaNf/";
|
|
|
|
|
isNormalUser = true;
|
2025-01-02 09:17:39 -08:00
|
|
|
|
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBvhtF6nRWlA6PVs71Eek7p0p2PxTd3P6ZEGFV2t75MB eliribble@nixos"];
|
2024-12-27 04:49:17 -08:00
|
|
|
|
};
|
|
|
|
|
users.users.root.initialHashedPassword = "$y$j9T$Ti26ax34797JfBHz.qOF20$Ft.w/amrklqfOxs1Q44udCON6qo8Yj51CqLSksOYAQ2";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
# Or disable the firewall altogether.
|
2025-01-03 08:02:48 -08:00
|
|
|
|
networking.firewall.enable = false;
|
2024-12-27 04:49:17 -08:00
|
|
|
|
|
|
|
|
|
# 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 = "24.11"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|