forked from fediversity/fediversity
Compare commits
5 commits
23bb4e8f51
...
9ddc71acc3
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ddc71acc3 | |||
| 6da73f104f | |||
| 86ee3a987b | |||
| a721e80c73 | |||
| 3ee3458888 |
1 changed files with 4 additions and 64 deletions
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
sources ? import ../../../npins,
|
||||
...
|
||||
|
|
@ -11,10 +10,8 @@
|
|||
{
|
||||
imports = [
|
||||
../common/sharedOptions.nix
|
||||
# tests need this, however outside tests this (and esp its import nixos-test-base) must not be used
|
||||
../common/targetNode.nix
|
||||
"${sources.nixpkgs}/nixos/modules/profiles/minimal.nix"
|
||||
# "${nixpkgs}/nixos/modules/profiles/perlless.nix" # failed under disko
|
||||
"${sources.nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
|
||||
# systemd-repart
|
||||
# ../../../infra/common/nixos/repart.nix
|
||||
|
|
@ -23,84 +20,27 @@
|
|||
../../../infra/common/proxmox-qemu-vm.nix
|
||||
];
|
||||
|
||||
# # non-disko
|
||||
# boot.loader.grub.enable = false;
|
||||
# boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# boot.loader.efi.efiSysMountPoint = "/boot";
|
||||
# boot.loader.systemd-boot.edk2-uefi-shell.enable = true;
|
||||
# boot.loader.efi.canTouchEfiVariables = true;
|
||||
# # proxmox.qemuConf.bios == "ovmf";
|
||||
|
||||
# boot.growPartition = true;
|
||||
# boot.loader.timeout = 1;
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
services.qemuGuest.enable = true;
|
||||
systemd.services.qemu-guest-agent = {
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
};
|
||||
services.openssh.enable = true;
|
||||
networking = {
|
||||
firewall.enable = false;
|
||||
useDHCP = false;
|
||||
usePredictableInterfaceNames = false;
|
||||
useNetworkd = true;
|
||||
nameservers = [
|
||||
"95.215.185.6"
|
||||
"95.215.185.7"
|
||||
"2a00:51c0::5fd7:b906"
|
||||
"2a00:51c0::5fd7:b907"
|
||||
];
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
nix.settings.trusted-users = [ "@wheel" ];
|
||||
|
||||
services.cloud-init = {
|
||||
enable = true;
|
||||
network.enable = true;
|
||||
};
|
||||
|
||||
users.mutableUsers = false;
|
||||
users.users =
|
||||
{
|
||||
root = {
|
||||
# password = "password"; # cannot log in
|
||||
# hashedPassword = "$y$j9T$QoArNaV2VrjPhQ6BMG1AA.$uq8jw0.g.dJwIfepqipxzeUD1ochgUs8A5QmVe4qbJ6"; # cannot log in
|
||||
hashedPasswordFile = builtins.toString (
|
||||
pkgs.writeText "root-password" "$y$j9T$9g0NqdBsKvQ3ETOPPB0hW.$cIiG648jgA/eVqiCPJJZtI5JYiL6oODZtKI6.lCmJA/"
|
||||
);
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDHTIqF4CAylSxKPiSo5JOPuocn0y2z38wOSsQ1MUaZ2"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZsldWMEsajYysjYsEpNvMOjO4D8L21pTrfQS1T+Hfy"
|
||||
];
|
||||
};
|
||||
# can log in
|
||||
kiara = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
password = "password";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDHTIqF4CAylSxKPiSo5JOPuocn0y2z38wOSsQ1MUaZ2"
|
||||
];
|
||||
};
|
||||
# cannot log in
|
||||
operator = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
password = "password";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDHTIqF4CAylSxKPiSo5JOPuocn0y2z38wOSsQ1MUaZ2"
|
||||
];
|
||||
};
|
||||
root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZsldWMEsajYysjYsEpNvMOjO4D8L21pTrfQS1T+Hfy"
|
||||
];
|
||||
}
|
||||
// environment.config.resources."operator-environment".login-shell.apply {
|
||||
resources = lib.filterAttrs (_name: value: value ? login-shell) (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue