vm shenanigans

This commit is contained in:
Kopatz
2024-07-05 16:33:20 +02:00
parent ad716578f5
commit f26bc8bbca
5 changed files with 21 additions and 23 deletions

View File

@@ -4,10 +4,15 @@ let cfg = config.custom.nix.settings;
in { in {
options.custom.nix.settings = { options.custom.nix.settings = {
enable = mkEnableOption "Enables various nix settings"; enable = mkEnableOption "Enables various nix settings";
optimise = mkOption {
type = with types; bool;
default = true;
description = "Optimise nix store";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
nix.optimise.automatic = true; nix.optimise.automatic = cfg.optimise;
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.registry.nixpkgs.flake = pkgsVersion; nix.registry.nixpkgs.flake = pkgsVersion;
nix.gc = { nix.gc = {

View File

@@ -13,7 +13,7 @@
]; ];
custom = { custom = {
#tmpfs.enable = true; tmpfs.enable = true;
wireshark.enable = true; wireshark.enable = true;
virt-manager.enable = true; virt-manager.enable = true;
nftables.enable = true; nftables.enable = true;

View File

@@ -1,6 +1,10 @@
{ pkgs, config, lib, modulesPath, ... }: { { pkgs, config, lib, modulesPath, ... }: {
imports = [ ./vm-common.nix (modulesPath + "/profiles/qemu-guest.nix") ]; imports = [
#./vm-common.nix
(modulesPath + "/profiles/qemu-guest.nix")
#(modulesPath + "/profiles/minimal.nix")
];
age.identityPaths = [ /home/kopatz/.ssh/id_rsa ]; age.identityPaths = [ /home/kopatz/.ssh/id_rsa ];
mainUser.layout = "de"; mainUser.layout = "de";
mainUser.variant = "us"; mainUser.variant = "us";
@@ -10,21 +14,18 @@
layout = "de"; layout = "de";
variant = "us"; variant = "us";
}; };
cli-tools.enable = true;
nix = { nix = {
index.enable = true;
ld.enable = true;
settings.enable = true; settings.enable = true;
settings.optimise = false;
}; };
graphical = { graphical = {
#i3.enable = true; #i3.enable = true;
hyprland.enable = true; #hyprland.enable = true;
#lightdm.enable = true; #lightdm.enable = true;
#sddm.enable = true; #sddm.enable = true;
#cosmic.enable = true; #cosmic.enable = true;
}; };
}; };
networking.networkmanager.enable = true;
virtualisation.vmVariant = { virtualisation.vmVariant = {
#virtualisation.qemu.options = [ #virtualisation.qemu.options = [
# "-device virtio-vga-gl" # "-device virtio-vga-gl"
@@ -35,7 +36,4 @@
#virtualisation.qemu.options = [ "-vga qxl" ]; #virtualisation.qemu.options = [ "-vga qxl" ];
#[ "-vga none" "-device virtio-gpu-gl-pci" "-display default,gl=on" ]; #[ "-vga none" "-device virtio-gpu-gl-pci" "-display default,gl=on" ];
}; };
environment.systemPackages = with pkgs; [ firefox ];
} }

View File

@@ -1,11 +1,6 @@
{ pkgs, lib, ... }: { { pkgs, lib, ... }: {
services.xserver = { services.xserver = {
enable = true; enable = true;
displayManager = {
autoLogin.enable = false;
autoLogin.user = "vm";
};
resolutions = lib.mkOverride 9 ([ ] ++ [{ resolutions = lib.mkOverride 9 ([ ] ++ [{
x = 1680; x = 1680;
y = 1050; y = 1050;

View File

@@ -2,13 +2,13 @@
home = { stateVersion = "23.05"; }; home = { stateVersion = "23.05"; };
imports = [ imports = [
../../home-manager/nvim.nix #../../home-manager/nvim.nix
../../home-manager/zsh #../../home-manager/zsh
../../home-manager/rofi.nix #../../home-manager/rofi.nix
../../home-manager/kitty.nix #../../home-manager/kitty.nix
../../home-manager/i3.nix #../../home-manager/i3.nix
inputs.nixvim.homeManagerModules.nixvim #inputs.nixvim.homeManagerModules.nixvim
inputs.nix-colors.homeManagerModule #inputs.nix-colors.homeManagerModule
]; ];
} }