From 56527b97cc834718fcb48a0da79e2a9ae6645bbe Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Thu, 8 Aug 2024 04:29:47 +0200 Subject: [PATCH 1/3] lock: update nixpkgs --- lock.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lock.nix b/lock.nix index 2963614..fc5e288 100644 --- a/lock.nix +++ b/lock.nix @@ -4,7 +4,7 @@ sha256 = "1rq8mrlmbzpcbv9ys0x88alw30ks70jlmvnfr2j8v830yy5wvw7h"; }; nixpkgs = { - revision = "05405724efa137a0b899cce5ab4dde463b4fd30b"; - sha256 = "06490pn22x9xl4chfx12iwdgx7nlbn14v8x05rnv2y1nancljisl"; + revision = "883180e6550c1723395a3a342f830bfc5c371f6b"; + sha256 = "01axrf25mahbxmp6vgfgx09dflbyaavr5liynkp6rpm4lkacr27f"; }; } From 6f5829e6abb8c3730c368d912652658fd72a953a Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Thu, 8 Aug 2024 04:34:03 +0200 Subject: [PATCH 2/3] hosts/vm: update configuration and create base vm --- hosts/{vm.nix => vm-base.nix} | 28 +++++++++++++++------------- hosts/vm-gnome.nix | 9 +++++++++ 2 files changed, 24 insertions(+), 13 deletions(-) rename hosts/{vm.nix => vm-base.nix} (51%) create mode 100644 hosts/vm-gnome.nix diff --git a/hosts/vm.nix b/hosts/vm-base.nix similarity index 51% rename from hosts/vm.nix rename to hosts/vm-base.nix index 0b99d01..1f3b796 100644 --- a/hosts/vm.nix +++ b/hosts/vm-base.nix @@ -1,19 +1,21 @@ -{ ... }: +{ lib, modulesPath, ... }: { imports = [ - ../nix-os/core.nix - ../nix-os/docker.nix - ../nix-os/desktopManagers/gnome.nix - ../nix-os/displayManagers/gdm.nix - #../nix-os/desktop/kde-plasma.nix - ../nix-os/shell.nix - ../nix-os/virtualization.nix - ../nix-os/polkit/disable-shutdown.nix - ../nix-os/locale.nix - ../nix-os/adb.nix + "${modulesPath}/virtualisation/qemu-vm.nix" ../nix-os/account.nix - ../nix-os/xdg-default-apps.nix + ../nix-os/core.nix + ../nix-os/locale.nix + ../nix-os/polkit/disable-shutdown.nix + ../nix-os/shell.nix ../nix-os/udev.nix + ../nix-os/xdg-default-apps.nix ]; -} \ No newline at end of file + + config = { + services.syncthing.enable = lib.mkForce false; + virtualisation = { + memorySize = 4096; + }; + }; +} diff --git a/hosts/vm-gnome.nix b/hosts/vm-gnome.nix new file mode 100644 index 0000000..2b54493 --- /dev/null +++ b/hosts/vm-gnome.nix @@ -0,0 +1,9 @@ +{ lib, ... }: + +{ + imports = [ + ./vm-base.nix + ../nix-os/desktopManagers/gnome.nix + ../nix-os/displayManagers/gdm.nix + ]; +} From 375a3f379ea90d770f643b7cd8b7e1705a0f14a7 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Thu, 8 Aug 2024 05:06:10 +0200 Subject: [PATCH 3/3] nixos: remove unnecessary if..then..else.. statements --- nix-os/account.nix | 5 ++--- nix-os/dconf-common.nix | 8 ++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/nix-os/account.nix b/nix-os/account.nix index b1693ad..e7bb85c 100644 --- a/nix-os/account.nix +++ b/nix-os/account.nix @@ -1,4 +1,4 @@ -{ config, pkgs, unstablePkgs, ... }: +{ config, lib, pkgs, unstablePkgs, ... }: { imports = [ @@ -11,8 +11,7 @@ extraGroups = [ "users" "wheel" - (if config.programs.adb.enable then "adbusers" else null) - ]; + ] ++ lib.optional config.programs.adb.enable "adbusers"; linger = true; initialPassword = "nixos"; packages = with pkgs; [ diff --git a/nix-os/dconf-common.nix b/nix-os/dconf-common.nix index 2993f98..967d28f 100644 --- a/nix-os/dconf-common.nix +++ b/nix-os/dconf-common.nix @@ -65,15 +65,11 @@ "color-picker@tuberry" ]; favorite-apps = [ - (if builtins.elem pkgs.kitty config.environment.systemPackages then - "kitty.desktop" - else none) + "kitty.desktop" "vivaldi-stable.desktop" "code.desktop" "org.gnome.Nautilus.desktop" - (if config.programs.steam.enable then - "steam.desktop" - else none) + "steam.desktop" "pavucontrol.desktop" ]; };