Compare commits

..

2 Commits

Author SHA1 Message Date
Hektor Misplon 97d3e9cf81 Update NixOS readme 2025-10-05 12:58:45 +02:00
Hektor Misplon 33e04b631a Use disko 'single-disk-ext4' template for vm host 2025-10-05 12:58:31 +02:00
7 changed files with 40 additions and 66 deletions

1
.gitignore vendored
View File

@ -3,4 +3,3 @@
result result
result-* result-*
nixos-efi-vars.fd

View File

@ -13,22 +13,13 @@
}; };
}; };
outputs = outputs = { self, nixpkgs, disko, home-manager }: {
{ nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
self,
nixpkgs,
disko,
home-manager,
}:
{
nixosConfigurations = {
vm = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
disko.nixosModules.disko disko.nixosModules.disko
./hosts/vm/configuration.nix ./hosts/vm/configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager {
{
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.h = ./hosts/vm/home.nix; home-manager.users.h = ./hosts/vm/home.nix;
@ -36,5 +27,4 @@
]; ];
}; };
}; };
};
} }

View File

@ -3,7 +3,8 @@
{ {
system.stateVersion = "25.05"; system.stateVersion = "25.05";
imports = [ imports =
[
./hard.nix ./hard.nix
./disk.nix ./disk.nix
../../modules/bootloader.nix ../../modules/bootloader.nix
@ -15,11 +16,11 @@
../../modules/x.nix ../../modules/x.nix
]; ];
nix.settings.experimental-features = [ nix.settings.experimental-features = [ "nix-command" "flakes" ];
"nix-command"
"flakes"
];
# virtualisation.vmVariantWithDisko = {
# virtualisation.fileSystems."/".neededForBoot = true;
# };
disko.devices.disk.main.device = "/dev/vda"; disko.devices.disk.main.device = "/dev/vda";

View File

@ -1,26 +1,14 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ imports =
(modulesPath + "/profiles/qemu-guest.nix") [ (modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
"ahci"
"xhci_pci"
"virtio_pci"
"sr_mod"
"virtio_blk"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];

View File

@ -2,11 +2,7 @@
{ {
networking.hostName = "nixos"; networking.hostName = "nixos";
networking.wireless = { networking.wireless = { iwd = { enable = true; }; };
iwd = {
enable = true;
};
};
networking.firewall = { networking.firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 22 ]; allowedTCPPorts = [ 22 ];