2023-04-16 05:18:23 +00:00
|
|
|
{ config, libs, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
# Workaround https://github.com/NixOS/nixpkgs/issues/126755#issuecomment-869149243
|
|
|
|
(final: super: {
|
|
|
|
makeModulesClosure = x:
|
|
|
|
super.makeModulesClosure (x // { allowMissing = true; });
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-04-23 03:06:57 +00:00
|
|
|
imports = [
|
|
|
|
../sops.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
git
|
|
|
|
];
|
|
|
|
|
|
|
|
# Use mirror for binary cache
|
|
|
|
nix.settings.substituters = [
|
|
|
|
"https://mirrors.ustc.edu.cn/nix-channels/store"
|
|
|
|
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
|
|
|
|
];
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
|
|
sops = {
|
|
|
|
secrets.password = {
|
|
|
|
sopsFile = ./secrets.yaml;
|
|
|
|
};
|
|
|
|
};
|
2023-04-16 05:18:23 +00:00
|
|
|
|
|
|
|
system.stateVersion = "22.11";
|
|
|
|
|
|
|
|
networking = {
|
2023-04-23 03:06:57 +00:00
|
|
|
hostName = "raspite";
|
2023-04-16 05:18:23 +00:00
|
|
|
useDHCP = false;
|
|
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
};
|
|
|
|
|
2023-05-27 01:39:16 +00:00
|
|
|
networking.proxy = {
|
|
|
|
default = "http://127.0.0.1:7890/";
|
|
|
|
noProxy = "127.0.0.1,localhost,internal.domain,.coho-tet.ts.net";
|
|
|
|
};
|
|
|
|
|
2023-04-16 05:18:23 +00:00
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
|
|
|
|
|
2023-04-23 03:06:57 +00:00
|
|
|
users.users.xin = {
|
2023-04-16 05:18:23 +00:00
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" "networkmanager" ];
|
|
|
|
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIInPn+7cMbH7zCEPJArU/Ot6oq8NHo8a2rYaCfTp7zgd xin@nixos" ];
|
2023-04-23 03:06:57 +00:00
|
|
|
# passwordFile = config.sops.secrets.password.path;
|
|
|
|
hashedPassword = "$y$j9T$KEOMZBlXtudOYWq/elAdI.$Vd3X8rjEplbuRBeZPp.8/gpL3zthpBNjhBR47wFc8D4";
|
2023-04-16 05:18:23 +00:00
|
|
|
};
|
|
|
|
|
2023-11-15 07:50:26 +00:00
|
|
|
}
|