From aca37da408613dfe7d8fced491b87b2b0bda8da9 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 22 Jun 2023 12:46:20 -0400 Subject: [PATCH] containers(obsidian): Migrate to setup.nix --- containers/obsidian.nix | 54 ++++++++++------------------------------- 1 file changed, 13 insertions(+), 41 deletions(-) diff --git a/containers/obsidian.nix b/containers/obsidian.nix index 8eea5e25..a26857ca 100644 --- a/containers/obsidian.nix +++ b/containers/obsidian.nix @@ -1,4 +1,6 @@ -{ lib, ... }: { +{ home-manager, stylix, lib, ... }: + +{ containers.obsidian = { privateNetwork = true; ephemeral = true; @@ -22,48 +24,18 @@ }; config = { pkgs, ... }: { - users = { - mutableUsers = false; - allowNoPasswordLogin = true; - - users.user = { - isNormalUser = true; - home = "/home/user"; - }; - }; - - environment = { - variables = { - TERM = "xterm-kitty"; - }; - - defaultPackages = [ ]; - }; - - environment.systemPackages = with pkgs; [ - kitty - obsidian + imports = [ + home-manager.nixosModules.home-manager + stylix.nixosModules.stylix + ../setup.nix ]; - environment.sessionVariables = { - WAYLAND_DISPLAY = "wayland-1"; - QT_QPA_PLATFORM = "wayland"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - SDL_VIDEODRIVER = "wayland"; - CLUTTER_BACKEND = "wayland"; - MOZ_ENABLE_WAYLAND = "1"; - XDG_RUNTIME_DIR = "/run/user/1000"; - DISPLAY = ":0"; - }; - - services.xserver.enable = true; - - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "obsidian" - ]; - - system.stateVersion = "22.11"; + environment.systemPackages = with pkgs; [ + obsidian + ]; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "obsidian" + ]; }; }; }