From ca3ee1d059ca003a8e03df0e3344636096b5ad55 Mon Sep 17 00:00:00 2001 From: Armel van Ravels Date: Tue, 27 Jan 2026 22:00:20 +0100 Subject: [PATCH] Add frodo VM --- outputs.nix | 7 ++ systems/frodo/default.nix | 118 +++++++++++++++++++++++ systems/frodo/hardware-configuration.nix | 24 +++++ 3 files changed, 149 insertions(+) create mode 100644 systems/frodo/default.nix create mode 100644 systems/frodo/hardware-configuration.nix diff --git a/outputs.nix b/outputs.nix index d80eefd..5d704a1 100644 --- a/outputs.nix +++ b/outputs.nix @@ -9,5 +9,12 @@ ./systems/gandalf ]; }; + "frodo" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + home-manager.nixosModules.home-manager + ./systems/frodo + ]; + }; }; } diff --git a/systems/frodo/default.nix b/systems/frodo/default.nix new file mode 100644 index 0000000..cbc51ee --- /dev/null +++ b/systems/frodo/default.nix @@ -0,0 +1,118 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/vda"; + boot.loader.grub.useOSProber = true; + + networking.hostName = "frodo"; # Define your hostname. + networking.networkmanager.enable = true; + + time.timeZone = "Europe/Amsterdam"; + + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "nl_NL.UTF-8"; + LC_IDENTIFICATION = "nl_NL.UTF-8"; + LC_MEASUREMENT = "nl_NL.UTF-8"; + LC_MONETARY = "nl_NL.UTF-8"; + LC_NAME = "nl_NL.UTF-8"; + LC_NUMERIC = "nl_NL.UTF-8"; + LC_PAPER = "nl_NL.UTF-8"; + LC_TELEPHONE = "nl_NL.UTF-8"; + LC_TIME = "nl_NL.UTF-8"; + }; + + users.defaultUserShell = pkgs.zsh; + + security.rtkit.enable = true; + users.users.avravels = { + isNormalUser = true; + description = "Armel van Ravels"; + extraGroups = [ "networkmanager" "wheel" "libvirtd" ]; + packages = with pkgs; [ + home-manager + discord + spotify + protonvpn-gui + ]; + shell = pkgs.zsh; + }; + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + gnumake + git + ]; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + services = { + openssh.enable = true; + + displayManager.gdm.enable = true; + desktopManager.gnome.enable = true; + + xserver = { + enable = true; + + xkb = { + layout = "us"; + variant = ""; + }; + }; + + printing.enable = true; + + pulseaudio.enable = false; + + pipewire = { + enable = true; + + alsa = { + enable = true; + support32Bit = true; + }; + + pulse.enable = true; + }; + }; + + hardware = { + graphics.enable = true; + }; + + programs = { + hyprland = { + enable = true; + xwayland.enable = true; + }; + + zsh.enable = true; + + gamescope = { + enable = false; + capSysNice = true; + }; + + steam = { + enable = true; + remotePlay.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + }; + }; + + system.stateVersion = "25.11"; # Did you read the comment? + +} diff --git a/systems/frodo/hardware-configuration.nix b/systems/frodo/hardware-configuration.nix new file mode 100644 index 0000000..a39ea33 --- /dev/null +++ b/systems/frodo/hardware-configuration.nix @@ -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/abc73402-b278-4995-a3bf-4bd28646285a"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} -- 2.49.1