2022-09-23 19:08:07 -07:00
|
|
|
# This is your system's configuration file.
|
|
|
|
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
|
|
|
|
|
|
|
{ inputs, lib, config, pkgs, ... }: {
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
# If you want to use modules from other flakes (such as nixos-hardware), use something like:
|
|
|
|
# inputs.hardware.nixosModules.common-cpu-amd
|
|
|
|
# inputs.hardware.nixosModules.common-ssd
|
|
|
|
|
|
|
|
# It's strongly recommended you take a look at
|
|
|
|
# https://github.com/nixos/nixos-hardware
|
|
|
|
# and import modules relevant to your hardware.
|
|
|
|
|
|
|
|
# Import your generated (nixos-generate-config) hardware configuration
|
|
|
|
./hardware-configuration.nix
|
2022-09-28 05:01:07 -07:00
|
|
|
./vault-warden.nix
|
|
|
|
./book-stack.nix
|
2022-09-28 05:03:02 -07:00
|
|
|
# ./bonfire.nix
|
2022-09-23 19:08:07 -07:00
|
|
|
|
|
|
|
# You can also split up your configuration and import pieces of it here.
|
|
|
|
];
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
# This will add each flake input as a registry
|
|
|
|
# To make nix3 commands consistent with your flake
|
|
|
|
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
|
|
|
|
|
|
|
|
# This will additionally add your inputs to the system's legacy channels
|
|
|
|
# Making legacy nix commands consistent as well, awesome!
|
|
|
|
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
|
|
|
};
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
settings = {
|
|
|
|
# Enable flakes and new 'nix' command
|
|
|
|
experimental-features = "nix-command flakes";
|
|
|
|
# Deduplicate and optimize nix store
|
|
|
|
auto-optimise-store = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Remove if you wish to disable unfree packages for your system
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
2022-09-23 19:18:54 -07:00
|
|
|
networking.hostName = "sincerity";
|
2022-09-23 19:08:07 -07:00
|
|
|
|
|
|
|
users.users = {
|
2022-09-23 19:18:54 -07:00
|
|
|
infra = {
|
2022-09-23 19:08:07 -07:00
|
|
|
isNormalUser = true;
|
|
|
|
openssh.authorizedKeys.keys = [
|
2022-09-23 19:18:54 -07:00
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve"
|
2022-09-23 19:08:07 -07:00
|
|
|
];
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# This setups a SSH server. Very important if you're setting up a headless system.
|
|
|
|
# Feel free to remove if you don't need it.
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
# Forbid root login through SSH.
|
|
|
|
permitRootLogin = "no";
|
|
|
|
# Use keys only. Remove if you want to SSH using password (not recommended)
|
|
|
|
passwordAuthentication = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
|
|
system.stateVersion = "22.05";
|
|
|
|
}
|