From fe0e613928323f9dc538f1bdea8138456abffc4b Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Tue, 17 Sep 2024 18:14:22 +0200 Subject: create nix configuration --- hosts/template/default.nix | 26 ++++++++++++++++++++++++++ hosts/template/hardware.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 hosts/template/default.nix create mode 100644 hosts/template/hardware.nix (limited to 'hosts/template') diff --git a/hosts/template/default.nix b/hosts/template/default.nix new file mode 100644 index 0000000..0433557 --- /dev/null +++ b/hosts/template/default.nix @@ -0,0 +1,26 @@ +{ ... }: +{ + imports = [ + ./hardware.nix + ../../modules/hyprland/monitor.nix + ]; + + networking.hostName = "template"; + + boot.loader = { + grub = { + enable = true; + device = "/dev/vda"; + }; + }; + + hyprland.monitors = { + default = { + resolution = "preferred"; + position = "auto"; + scale = 1; + }; + }; + + system.stateVersion = "24.05"; +} diff --git a/hosts/template/hardware.nix b/hosts/template/hardware.nix new file mode 100644 index 0000000..0705cb6 --- /dev/null +++ b/hosts/template/hardware.nix @@ -0,0 +1,31 @@ +# 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/ca998991-940e-4566-a005-0047b6a246fa"; + fsType = "btrfs"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} -- cgit v1.2.3-70-g09d2