Add vm setup

This commit is contained in:
2025-06-27 13:52:18 +00:00
parent d1c7cd9d79
commit a8c56008cf
5 changed files with 97 additions and 26 deletions
+2
View File
@@ -78,5 +78,7 @@
];
};
git.useRsa = true;
system.stateVersion = "22.11";
}
+56
View File
@@ -0,0 +1,56 @@
# 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 = [ "xhci_pci" "virtio_pci" "usbhid" "usb_storage" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "none";
fsType = "tmpfs";
options = ["size=8G" "mode=755"];
};
fileSystems."/tmp" = {
device = "none";
fsType = "tmpfs";
options = ["size=32G" "mode=755"];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-label/virtual";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
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.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s1.useDHCP = lib.mkDefault true;
environment.systemPackages = with pkgs; [ kdePackages.konsole ];
services.spice-vdagentd.enable = true;
services.spice-autorandr.enable = true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
system.stateVersion = "25.05";
}
+9 -3
View File
@@ -1,10 +1,16 @@
{
programs.git = {
{config, lib, ...}: {
options.git = {
useRsa = lib.mkEnableOption "Use rsa instead of ed25519";
};
config.programs.git = {
enable = true;
ignores = [".envrc"];
signing = {
signByDefault = true;
key = "~/.ssh/id_rsa.pub";
key =
if config.git.useRsa
then "~/.ssh/id_rsa.pub"
else "~/.ssh/id_ed25519.pub";
};
# maintenance = {
# enable = false;
+11 -6
View File
@@ -1,9 +1,14 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
wineWowPackages.stable
wineWowPackages.waylandFull
winetricks
];
{
pkgs,
lib,
...
}: {
environment.systemPackages = with pkgs;
lib.optionals pkgs.stdenv.isx86_64 [
wineWowPackages.stable
wineWowPackages.waylandFull
winetricks
];
hardware.steam-hardware.enable = true;
services.flatpak.enable = true;
+19 -17
View File
@@ -1,5 +1,6 @@
{
config,
lib,
pkgs,
zen-browser,
...
@@ -16,23 +17,24 @@ in {
./gtk.nix
];
home.packages = with pkgs; [
google-chrome
firefox
zen-browser.packages.${pkgs.system}.default
vesktop
mpv
xdg-utils
zathura
libreoffice
qbittorrent
youtube-music
wl-clipboard
wlr-randr
alsa-utils
playerctl
postman
];
home.packages = with pkgs;
[
firefox
zen-browser.packages.${pkgs.system}.default
vesktop
mpv
xdg-utils
zathura
libreoffice
qbittorrent
youtube-music
wl-clipboard
wlr-randr
alsa-utils
playerctl
postman
]
++ lib.optionals pkgs.stdenv.isx86_64 [google-chrome];
home.sessionVariables = rec {
# TODO: add an `uwsm app run --` or something here (for example clicking on a link on discord opens the browser on discord's slice instead of the browser's slice.