From f26bc8bbca4ceed851c0cd0df35ef1c60716c6c5 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Fri, 5 Jul 2024 16:33:20 +0200 Subject: [PATCH] vm shenanigans --- modules/nix/settings.nix | 7 ++++++- systems/pc/configuration.nix | 2 +- systems/vm/configuration.nix | 16 +++++++--------- systems/vm/vm-common.nix | 5 ----- users/vm/home.nix | 14 +++++++------- 5 files changed, 21 insertions(+), 23 deletions(-) diff --git a/modules/nix/settings.nix b/modules/nix/settings.nix index 0c60717..1d72ee3 100644 --- a/modules/nix/settings.nix +++ b/modules/nix/settings.nix @@ -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 = { diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 193b245..84157a8 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -13,7 +13,7 @@ ]; custom = { - #tmpfs.enable = true; + tmpfs.enable = true; wireshark.enable = true; virt-manager.enable = true; nftables.enable = true; diff --git a/systems/vm/configuration.nix b/systems/vm/configuration.nix index 3f70e43..d38d6c1 100644 --- a/systems/vm/configuration.nix +++ b/systems/vm/configuration.nix @@ -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 ]; - } diff --git a/systems/vm/vm-common.nix b/systems/vm/vm-common.nix index f87d6c2..ec0ad66 100644 --- a/systems/vm/vm-common.nix +++ b/systems/vm/vm-common.nix @@ -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; diff --git a/users/vm/home.nix b/users/vm/home.nix index 61faa02..d5578de 100644 --- a/users/vm/home.nix +++ b/users/vm/home.nix @@ -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 ]; }