Added working example
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/cc3cc0f4-b589-454b-9d73-2707f25952c0";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
# hosts/nixovm/nixovm.nix
|
||||
{ inputs, config, ... }:
|
||||
|
||||
{
|
||||
flake.nixosConfigurations."nixovm" = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
|
||||
modules =
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.stylix.nixosModules.stylix
|
||||
] ++
|
||||
(builtins.attrValues config.flake.nixosModules) ++
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
|
||||
({ ... }: {
|
||||
networking.hostName = "nixovm";
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
swapDevices = [ {
|
||||
device = "/var/lib/swapfile";
|
||||
size = 4096; # 4 GB
|
||||
} ];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
|
||||
# Enable various user-defined modules
|
||||
mySystem = {
|
||||
# Turn on the core system
|
||||
system.core.enable = true;
|
||||
|
||||
# Enable Apps
|
||||
apps.foot.enable = true;
|
||||
apps.yazi.enable = true;
|
||||
|
||||
# Define Environment
|
||||
desktop.hyprland.enable = true;
|
||||
desktop.noctalia.enable = true;
|
||||
desktop.stylix.enable = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/ba16b576-efa5-41d6-a61b-30cec1f7d946";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/6503-E57A";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/f2bbfa41-0b04-4466-8af7-a68821be0d79"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
{ inputs, config, ... }:
|
||||
|
||||
{
|
||||
flake.nixosConfigurations."omenixos" = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
|
||||
modules =
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.stylix.nixosModules.stylix
|
||||
] ++
|
||||
(builtins.attrValues config.flake.nixosModules) ++
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
|
||||
({ ... }: {
|
||||
networking.hostName = "omenixos";
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
useOSProber = true;
|
||||
};
|
||||
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
initrd.systemd.tpm2.enable = false;
|
||||
kernelParams = [
|
||||
"systemd.mask=dev-tpm0.device"
|
||||
"systemd.mask=dev-tpmrm0.device"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.tpm2.enable = false;
|
||||
|
||||
|
||||
# --- 2TB SHARED DRIVE MOUNT ---
|
||||
fileSystems."/mnt/shared" = {
|
||||
device = "/dev/disk/by-uuid/72925CFC925CC66F";
|
||||
fsType = "ntfs3";
|
||||
options = [ "rw" "uid=1000" "gid=100" "dmask=0022" "fmask=0133" ];
|
||||
};
|
||||
|
||||
# Enable various user-defined modules
|
||||
mySystem = {
|
||||
# Turn on the core system
|
||||
system.core.enable = true;
|
||||
|
||||
# Hardware-specific modules
|
||||
hardware.nvidia.enable = true;
|
||||
|
||||
# Enable Apps
|
||||
apps = {
|
||||
foot.enable = true;
|
||||
yazi.enable = true;
|
||||
neovim.enable = true;
|
||||
fastfetch.enable = true;
|
||||
git.enable = true;
|
||||
};
|
||||
|
||||
# Define Environment
|
||||
desktop = {
|
||||
hyprland.enable = true;
|
||||
noctalia.enable = true;
|
||||
stylix.enable = true;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user