feat: preset nixosModule

This commit is contained in:
2025-02-02 11:27:46 +00:00
parent 6f3af5f205
commit da22473a23
2 changed files with 47 additions and 2 deletions

View File

@@ -102,7 +102,53 @@
nixosModules.${system} = {
"hetzner.hardware" = {
"preset.default" = { pkgs, ... }: {
users.defaultUserShell = pkgs.zsh;
virtualisation.vmVariant.virtualisation = {
qemu.options = [
"-nographic"
"-display" "curses"
"-append" "console=ttyS0"
"-serial" "mon:stdio"
"-vga" "qxl"
];
forwardPorts = [
{ from = "host"; host.port = 40500; guest.port = 22; }
];
services.getty.autologinUser = "root";
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
};
};
networking.firewall = {
enable = true;
allowedTCPPorts = [ ];
};
environment = {
defaultPackages = [];
systemPackages = (with pkgs; [
curl
neovim
yq-go
jq
]) ++ (with self.packages.${system}; [
prettify-log
nvim-pager
]);
variables = {
PAGER="${self.packages.${system}.nvim-pager}/bin/pager";
};
};
};
"hetzner.hardware" = { ... }: {
boot.loader.grub.device = "/dev/sda";
boot.initrd.availableKernelModules = [
"ata_piix"

1
fufu
View File

@@ -1 +0,0 @@
{"id":7937906597,"node_id":"LA_kwDONjR0ys8AAAAB2SLXpQ","url":"https://api.github.com/repos/hectic-lab/util.nix/labels/bug","name":"bug","color":"d73a4a","default":true,"description":"bla_bla"}