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,28 +13,18 @@
}; };
}; };
outputs = outputs = { self, nixpkgs, disko, home-manager }: {
{ nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
self, system = "x86_64-linux";
nixpkgs, modules = [
disko, disko.nixosModules.disko
home-manager, ./hosts/vm/configuration.nix
}: home-manager.nixosModules.home-manager {
{ home-manager.useGlobalPkgs = true;
nixosConfigurations = { home-manager.useUserPackages = true;
vm = nixpkgs.lib.nixosSystem { home-manager.users.h = ./hosts/vm/home.nix;
system = "x86_64-linux"; }
modules = [ ];
disko.nixosModules.disko
./hosts/vm/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.h = ./hosts/vm/home.nix;
}
];
};
};
}; };
};
} }

View File

@ -3,23 +3,24 @@
{ {
system.stateVersion = "25.05"; system.stateVersion = "25.05";
imports = [ imports =
./hard.nix [
./disk.nix ./hard.nix
../../modules/bootloader.nix ./disk.nix
../../modules/networking.nix ../../modules/bootloader.nix
../../modules/users.nix ../../modules/networking.nix
../../modules/audio.nix ../../modules/users.nix
../../modules/printing.nix ../../modules/audio.nix
../../modules/localization.nix ../../modules/printing.nix
../../modules/x.nix ../../modules/localization.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 ];

View File

@ -1,5 +1,5 @@
{ ... }: { ... }:
{ {
services.printing.enable = true; services.printing.enable = true;
} }

View File

@ -2,10 +2,10 @@
{ {
services.xserver.windowManager.xmonad = { services.xserver.windowManager.xmonad = {
enable = true; enable = true;
enableContribAndExtras = true; enableContribAndExtras = true;
config = builtins.readFile ../dots/.xmonad/xmonad.hs; config = builtins.readFile ../dots/.xmonad/xmonad.hs;
}; };
services.xserver = { services.xserver = {
enable = true; enable = true;