nixos/server: cleanup

This commit is contained in:
Guanran Wang 2024-08-23 16:10:31 +08:00
parent 45fedb189e
commit 8a0667ee2a
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
6 changed files with 11 additions and 15 deletions

View file

@ -152,6 +152,7 @@
defaults.imports = [
./nixos/profiles/core
./nixos/profiles/server
];
"tyo0" = {

View file

@ -6,7 +6,6 @@
}: {
imports = [
# OS
../../nixos/profiles/server
../../nixos/profiles/opt-in/mihomo
# Hardware
@ -25,7 +24,6 @@
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
networking.hostName = "blacksteel";
time.timeZone = "Asia/Shanghai";
system.stateVersion = "24.05";
######## Secrets

View file

@ -6,7 +6,6 @@
}: {
imports = [
"${modulesPath}/virtualisation/amazon-image.nix"
../../nixos/profiles/server
./anti-feature.nix
./services/forgejo.nix
@ -20,7 +19,6 @@
./services/vaultwarden.nix
];
time.timeZone = "Asia/Tokyo";
boot.loader.grub.device = lib.mkForce "/dev/nvme0n1";
system.stateVersion = "24.05";

View file

@ -50,7 +50,7 @@
];
users.mutableUsers = false;
users.users = rec {
users.users = {
"guanranwang" = {
isNormalUser = true;
description = "Guanran Wang";
@ -64,10 +64,6 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMmd/uqiBahzKcKMJ+gT3dkUIdrWQgudspsDchDlx1E/ guanran928@outlook.com"
];
};
"root" = {
openssh.authorizedKeys.keys = guanranwang.openssh.authorizedKeys.keys;
};
};
boot.initrd.systemd.enable = true;

View file

@ -26,7 +26,7 @@
"no-url-literals"
];
flake-registry = "";
trusted-users = ["root" "@wheel"];
trusted-users = ["@wheel"];
allow-import-from-derivation = false;
auto-allocate-uids = true;
auto-optimise-store = true;

View file

@ -1,12 +1,15 @@
{pkgs, ...}: {
{
pkgs,
config,
...
}: {
environment.systemPackages = with pkgs; [
alacritty.terminfo
kitty.terminfo
foot.terminfo
tmux.terminfo
wezterm.terminfo
];
# TODO: colmena
services.openssh.settings.PermitRootLogin = "prohibit-password";
users.users."root".openssh.authorizedKeys.keys = config.users.users.guanranwang.openssh.authorizedKeys.keys;
time.timeZone = "UTC";
}