nixos-config/machines/massicot/default.nix

93 lines
2.2 KiB
Nix
Raw Normal View History

{ inputs, config, libs, pkgs, ... }:
2023-07-29 15:34:24 +00:00
{
imports = [
inputs.sops-nix.nixosModules.sops
2023-07-29 15:34:24 +00:00
./hardware-configuration.nix
./networking.nix
2023-09-11 12:20:32 +00:00
./services.nix
2023-07-29 15:34:24 +00:00
];
sops = {
defaultSopsFile = ./secrets.yaml;
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = {
storage_box_mount = {
owner = "root";
};
gts_env = {
owner = "gotosocial";
};
2023-12-24 05:58:53 +00:00
hedgedoc_env = {
owner = "hedgedoc";
};
2023-12-20 03:13:20 +00:00
grafana_cloud_api = {
owner = "prometheus";
sopsFile = ../secrets.yaml;
};
};
};
2023-07-29 15:34:24 +00:00
2023-07-29 17:15:35 +00:00
boot.loader.efi.canTouchEfiVariables = true;
2023-07-29 17:53:14 +00:00
boot.loader.efi.efiSysMountPoint = "/boot";
2023-07-29 17:15:35 +00:00
boot.loader.grub = {
enable = true;
efiSupport = true;
2023-07-29 17:53:14 +00:00
};
2023-07-29 17:15:35 +00:00
fileSystems."/mnt/storage" = {
device = "//u380335-sub1.your-storagebox.de/u380335-sub1";
fsType = "cifs";
options = ["credentials=${config.sops.secrets.storage_box_mount.path}"];
};
2023-07-29 15:34:24 +00:00
environment.systemPackages = with pkgs; [
cifs-utils
2023-07-29 15:34:24 +00:00
git
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2023-12-06 16:00:43 +00:00
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
nix.optimise.automatic = true;
nix.settings.auto-optimise-store = true;
2023-07-29 15:34:24 +00:00
system.stateVersion = "22.11";
networking = {
hostName = "massicot";
};
services.openssh = {
enable = true;
2023-09-11 12:20:32 +00:00
settings = {
PasswordAuthentication = false;
};
2023-07-29 15:34:24 +00:00
};
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
users.users.xin = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPBcSvUQnmMFtpftFKIsDqeyUyZHzRg5ewgn3VEcLnss"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIInPn+7cMbH7zCEPJArU/Ot6oq8NHo8a2rYaCfTp7zgd"
2023-09-11 12:20:32 +00:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPeNQ43f/ce4VxVPsAaKPPTp8rokQpmwNIsOX7JBZq4A"
2023-07-29 15:34:24 +00:00
];
2023-07-29 17:15:35 +00:00
hashedPassword = "$y$j9T$JOJn97hZndiDamUmmT.iq.$ue7gNZz/b14ur8GhyutOCvFjsv.3rcsHmk7m.WRk6u7";
2023-07-29 15:34:24 +00:00
};
security.sudo.extraRules = [
{ users = [ "xin" ];
commands = [ { command = "ALL"; options = [ "NOPASSWD" ]; } ];
}
];
2023-07-29 15:34:24 +00:00
2023-09-11 12:20:32 +00:00
}