mirror of
https://codeberg.org/27/inception-of-things.git
synced 2025-08-11 20:12:53 +02:00
63
vm/configuration.nix
Normal file
63
vm/configuration.nix
Normal file
@ -0,0 +1,63 @@
|
||||
{ config, pkgs, modulesPath, hostname, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/minimal.nix")
|
||||
];
|
||||
|
||||
networking.hostName = hostname;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Since `fileSystems` is ignored by nixos-generators, we need to be creative
|
||||
systemd.services.mount-iot = {
|
||||
description = "Mount the IOT shared folder";
|
||||
|
||||
# fstab entry:
|
||||
# host0 /wherever 9p trans=virtio,version=9p2000.L 0 0
|
||||
script = ''
|
||||
mkdir -p /iot
|
||||
/run/wrappers/bin/mount -t 9p -o trans=virtio,version=9p2000.L host0 /iot
|
||||
'';
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root = {
|
||||
password = "toor";
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "root";
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh = {
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
enable = true;
|
||||
enableBashCompletion = true;
|
||||
shellAliases = (import ./aliases.nix);
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
vagrant
|
||||
git
|
||||
zip
|
||||
neovim
|
||||
eza
|
||||
bat
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
Reference in New Issue
Block a user