wip vm
This commit is contained in:
parent
0d804c2adb
commit
855bffb200
10
flake.nix
10
flake.nix
@ -36,6 +36,16 @@
|
||||
myData = import ./data.nix;
|
||||
in
|
||||
{
|
||||
nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/vm/configuration.nix
|
||||
./modules
|
||||
];
|
||||
|
||||
specialArgs = {inherit myData;} // inputs;
|
||||
};
|
||||
|
||||
nixosConfigurations.hel1-a = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
|
49
hosts/vm/configuration.nix
Normal file
49
hosts/vm/configuration.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
myData,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
mj = {
|
||||
stateVersion = "23.05";
|
||||
timeZone = "UTC";
|
||||
};
|
||||
|
||||
users.users.vm.isSystemUser = true;
|
||||
users.users.vm.initialPassword = "test";
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
tmux
|
||||
htop
|
||||
];
|
||||
};
|
||||
|
||||
services = {
|
||||
nsd = {
|
||||
enable = true;
|
||||
zones = {
|
||||
"jakstys.lt.".data = myData.jakstysLTZone;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "vm";
|
||||
domain = "jakstys.lt";
|
||||
firewall = {
|
||||
allowedTCPPorts = [53];
|
||||
allowedUDPPorts = [53];
|
||||
logRefusedConnections = false;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
trusted-users = vm
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user