Compare commits
No commits in common. "19bddffde3c50ed62cca9685b616568ce920c907" and "be5fb3bc2425902ec5e36f635e6e3d9b6ea6ef30" have entirely different histories.
19bddffde3
...
be5fb3bc24
4 changed files with 5 additions and 96 deletions
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -377,11 +377,11 @@
|
||||||
"secrets": {
|
"secrets": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713910881,
|
"lastModified": 1713863887,
|
||||||
"narHash": "sha256-MZ1+GmZL3V3Kqe4YrxPA2W8vrF/c+f7sYOpf+jw6ESc=",
|
"narHash": "sha256-TwlNZjJloyZ0/5KCPeSWrnyDfEFokayovRPQY7xqq1g=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "918b61f3ee194d7e67fa1d3200b64fe7741dd24a",
|
"rev": "b8c66d7b0ca9fc21bc5332801b0203033cc3a772",
|
||||||
"revCount": 15,
|
"revCount": 13,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://forgejo@git.everest.sable-pancake.ts.net:4222/Toast/nix-secrets"
|
"url": "ssh://forgejo@git.everest.sable-pancake.ts.net:4222/Toast/nix-secrets"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,5 @@
|
||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./remote-builder.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
flakeSelf,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
hostSecrets = "${flakeSelf.inputs.secrets}/" + config.networking.hostName + "/";
|
|
||||||
hostKeyPath = "/etc/ssh/winmax2_host_key";
|
|
||||||
in {
|
|
||||||
age.secrets = {
|
|
||||||
winmax2-host-key = {
|
|
||||||
file = hostSecrets + "host-private-key.age";
|
|
||||||
path = hostKeyPath;
|
|
||||||
mode = "0400";
|
|
||||||
};
|
|
||||||
"winmax2-host-key.pub" = {
|
|
||||||
file = hostSecrets + "host-public-key.age";
|
|
||||||
path = hostKeyPath + ".pub";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users = {
|
|
||||||
groups.nixrbld = {};
|
|
||||||
users.nixrbld = {
|
|
||||||
isSystemUser = true;
|
|
||||||
useDefaultShell = true;
|
|
||||||
group = "nixrbld";
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF8v+04ZwqHZRG8P8nxdQt+fGJfzlxHXF0F6jzENb+U6 Remote builder access key"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.settings.trusted-users = ["nixrbld"];
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
startWhenNeeded = true;
|
|
||||||
# I only want it to be accesible though tailscale
|
|
||||||
openFirewall = false;
|
|
||||||
allowSFTP = false;
|
|
||||||
settings = {
|
|
||||||
UseDns = true;
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
AllowUsers = ["nixrbld"];
|
|
||||||
};
|
|
||||||
hostKeys = [
|
|
||||||
{
|
|
||||||
path = hostKeyPath;
|
|
||||||
type = "ed25519";
|
|
||||||
comment = "Everest host key";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
networking.firewall.interfaces.tailscale0.allowedTCPPorts = [22];
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +1,9 @@
|
||||||
{
|
{systemPkgs, ...}: {
|
||||||
systemPkgs,
|
|
||||||
config,
|
|
||||||
flakeSelf,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
age.secrets = {
|
|
||||||
remoteBuilderKey.file = "${flakeSelf.inputs.secrets}/WinMax2/nixrbld-private-key.age";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.ssh = {
|
|
||||||
knownHosts.winmax2.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPE+ksvEq/I2LMLOztVXpLE9yuI6EkRh4EtXdlYkhl6C WinMax2 host key";
|
|
||||||
extraConfig = ''
|
|
||||||
Host nixrbld
|
|
||||||
HostName winmax2
|
|
||||||
IdentitiesOnly yes
|
|
||||||
IdentityFile ${config.age.secrets.remoteBuilderKey.path}
|
|
||||||
User nixrbld
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
};
|
};
|
||||||
distributedBuilds = true;
|
|
||||||
buildMachines = [
|
|
||||||
{
|
|
||||||
hostName = "nixrbld";
|
|
||||||
system = "x86_64-linux";
|
|
||||||
protocol = "ssh-ng";
|
|
||||||
maxJobs = 4;
|
|
||||||
supportedFeatures = [
|
|
||||||
"big-parallel"
|
|
||||||
"kvm"
|
|
||||||
"nixos-test"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
optimise = {
|
optimise = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = ["weekly"];
|
dates = ["weekly"];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue