Add: forbann VM
This commit is contained in:
parent
fd9f5e202c
commit
b3fb1d7fa8
3 changed files with 85 additions and 1 deletions
67
hosts/forbann/configuration.nix
Normal file
67
hosts/forbann/configuration.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ config, pkgs, ...}:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true ;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/vda1" ;
|
||||
fsType = "ext4" ;
|
||||
};
|
||||
|
||||
fileSystems."/srv" = {
|
||||
device = "shared0" ;
|
||||
fsType = "9p" ;
|
||||
options = [ "trans=virtio" "version=9p2000.L" "rw" ];
|
||||
neededForBoot = false ;
|
||||
noCheck = true ;
|
||||
};
|
||||
|
||||
systemd.services.mountShared = {
|
||||
description = "Mount 9p shared folder" ;
|
||||
after = [ "local-fs.target" "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot" ;
|
||||
ExecStart = "${pkgs.util-linux}/bin/mount -t 9p -o trans=virtio,version=9p2000.L shared0 /srv";
|
||||
RemainAfterExit = true ;
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages ;
|
||||
boot.initrd.supportedFilesystems = [ "ext4" ];
|
||||
|
||||
networking = {
|
||||
useDHCP = true;
|
||||
useNetworkd = true ;
|
||||
hostName = "forbann" ;
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true ;
|
||||
networks."10-eth0" = {
|
||||
matchConfig.Name = "eth0";
|
||||
networkConfig = {
|
||||
Address = "192.168.1.10/24";
|
||||
Gateway = "192.168.0.254" ;
|
||||
DNS = "192.168.0.254" ;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.enable = true ;
|
||||
|
||||
services.rtorrent = {
|
||||
enable = true ;
|
||||
dataDir = "/home/vmuser/torrents" ;
|
||||
};
|
||||
|
||||
users.users.vmuser = {
|
||||
isNormalUser = true ;
|
||||
extraGroups = [ "wheel" ];
|
||||
password = "changeme" ;
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05" ;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue