Files
roowho2/nix/vm.nix
h7x4 8156fdea51
All checks were successful
Build and test / check (push) Successful in 1m24s
Build and test / build (push) Successful in 1m26s
Build and test / test (push) Successful in 2m0s
Build and test / docs (push) Successful in 3m54s
nix/vm: init, nix/default: fix building
2026-01-05 19:18:45 +09:00

48 lines
1019 B
Nix

{ self, nixpkgs, ... }:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [
self.overlays.roowho2
];
};
modules = [
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
"${nixpkgs}/nixos/tests/common/user-account.nix"
self.nixosModules.default
({ config, pkgs, ... }: {
system.stateVersion = config.system.nixos.release;
virtualisation.graphics = false;
services.getty.autologinUser = "alice";
users.motd = ''
=================================
Welcome to the roowho2 vm!
Try running any of:
rwho
Password for alice is 'foobar'
To exit, press Ctrl+A, then X
=================================
'';
services.roowho2 = {
enable = true;
};
programs.vim = {
enable = true;
defaultEditor = true;
};
environment.systemPackages = with pkgs; [ jq roowho2 ];
})
];
}