Compare commits
1 commit
3903149393
...
7f3aaed6ed
Author | SHA1 | Date | |
---|---|---|---|
7f3aaed6ed |
3 changed files with 65 additions and 60 deletions
40
example-vm/default.nix
Normal file
40
example-vm/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
import = [ ./vm_config.nix ];
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
users.users.jdoe = {
|
||||
password = "example";
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"video"
|
||||
"networkmanager"
|
||||
];
|
||||
};
|
||||
home-manager.users.jdoe = {
|
||||
home = {
|
||||
username = "jdoe";
|
||||
homeDirectory = "/home/jdoe";
|
||||
};
|
||||
jhome = {
|
||||
enable = true;
|
||||
gui.enable = true;
|
||||
dev = {
|
||||
enable = true;
|
||||
rust.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# password is 'test' see module documentation for more options
|
||||
services.jupyter.password = "'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'";
|
||||
jconfig = {
|
||||
enable = true;
|
||||
dev = {
|
||||
enable = true;
|
||||
jupyter.enable = true;
|
||||
};
|
||||
gui.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,7 +1,13 @@
|
|||
## Default QEMU guest config
|
||||
{
|
||||
services.qemuGuest.enable = true;
|
||||
services = {
|
||||
qemuGuest.enable = true;
|
||||
openssh.enable = true;
|
||||
};
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
|
@ -15,17 +21,14 @@
|
|||
# "virtio_vga"
|
||||
"virtio_gpu"
|
||||
];
|
||||
};
|
||||
fileSystems."/".device = "/dev/disk/by-label/nixos";
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
}
|
|
@ -11,46 +11,8 @@ in
|
|||
inherit pkgs;
|
||||
modules = [
|
||||
inputs.self.nixosModules.default
|
||||
../machines/vm
|
||||
# import vm module
|
||||
{
|
||||
time.timeZone = "Europe/Berlin";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
users.users.jdoe = {
|
||||
password = "example";
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"video"
|
||||
"networkmanager"
|
||||
];
|
||||
};
|
||||
home-manager.users.jdoe = {
|
||||
home = {
|
||||
username = "jdoe";
|
||||
homeDirectory = "/home/jdoe";
|
||||
};
|
||||
jhome = {
|
||||
enable = true;
|
||||
gui.enable = true;
|
||||
dev = {
|
||||
enable = true;
|
||||
rust.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
# password is 'test' see module documentation for more options
|
||||
services.jupyter.password = "'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'";
|
||||
jconfig = {
|
||||
enable = true;
|
||||
dev = {
|
||||
enable = true;
|
||||
jupyter.enable = true;
|
||||
};
|
||||
gui.enable = true;
|
||||
};
|
||||
}
|
||||
../example-vm # import vm configuration
|
||||
{ nix.registry.nixpkgs.flake = inputs.nixpkgs; }
|
||||
];
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue