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 {
options.custom.nix.settings = {
enable = mkEnableOption "Enables various nix settings";
optimise = mkOption {
type = with types; bool;
default = true;
description = "Optimise nix store";
};
};
config = mkIf cfg.enable {
nix.optimise.automatic = true;
nix.optimise.automatic = cfg.optimise;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.registry.nixpkgs.flake = pkgsVersion;
nix.gc = {

View File

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

View File

@@ -1,6 +1,10 @@
{ 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 ];
mainUser.layout = "de";
mainUser.variant = "us";
@@ -10,21 +14,18 @@
layout = "de";
variant = "us";
};
cli-tools.enable = true;
nix = {
index.enable = true;
ld.enable = true;
settings.enable = true;
settings.optimise = false;
};
graphical = {
#i3.enable = true;
hyprland.enable = true;
#hyprland.enable = true;
#lightdm.enable = true;
#sddm.enable = true;
#cosmic.enable = true;
};
};
networking.networkmanager.enable = true;
virtualisation.vmVariant = {
#virtualisation.qemu.options = [
# "-device virtio-vga-gl"
@@ -35,7 +36,4 @@
#virtualisation.qemu.options = [ "-vga qxl" ];
#[ "-vga none" "-device virtio-gpu-gl-pci" "-display default,gl=on" ];
};
environment.systemPackages = with pkgs; [ firefox ];
}

View File

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

View File

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