From cb6b77b813044f1ea49aed8b9ee6014104329f2f Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Thu, 11 Apr 2024 17:27:15 -0400 Subject: [PATCH] Try out compose2nix --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 10 ++++++++-- modules/hosts/nixos/nixnuc/default.nix | 3 ++- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 41c81de..f0dd458 100644 --- a/flake.lock +++ b/flake.lock @@ -17,6 +17,26 @@ "type": "github" } }, + "compose2nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712407744, + "narHash": "sha256-I6u5PHFilTnDbBxXpk2TSv5al2SXZwos2TNHmKrq068=", + "owner": "aksiksi", + "repo": "compose2nix", + "rev": "79a1dbd3fd1f19d54a80b0d8ed0268e1e1afe187", + "type": "github" + }, + "original": { + "owner": "aksiksi", + "repo": "compose2nix", + "type": "github" + } + }, "crane": { "inputs": { "nixpkgs": [ @@ -436,6 +456,7 @@ }, "root": { "inputs": { + "compose2nix": "compose2nix", "disko": "disko", "flox-flake": "flox-flake", "genebean-omp-themes": "genebean-omp-themes", diff --git a/flake.nix b/flake.nix index ac86e3e..e88f35d 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,12 @@ # inputs.nixpkgs.follows ="nixpkgs"; }; + compose2nix = { + url = "github:aksiksi/compose2nix"; + inputs.nixpkgs.follows ="nixpkgs"; + }; + + # My oh-my-posh theme genebean-omp-themes = { url = "github:genebean/my-oh-my-posh-themes"; @@ -49,7 +55,7 @@ }; }; # end inputs - outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, nix-darwin, home-manager, nix-homebrew, nix-flatpak, disko, sops-nix, flox-flake, genebean-omp-themes, ... }: let + outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, nix-darwin, home-manager, nix-homebrew, nix-flatpak, disko, sops-nix, compose2nix, flox-flake, genebean-omp-themes, ... }: let # creates a macOS system config darwinHostConfig = system: hostname: username: nix-darwin.lib.darwinSystem { @@ -89,7 +95,7 @@ # creates a nixos system config nixosHostConfig = system: hostname: username: nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs username hostname flox-flake; + specialArgs = { inherit inputs username hostname compose2nix flox-flake; pkgs = import nixpkgs { inherit system; config = { diff --git a/modules/hosts/nixos/nixnuc/default.nix b/modules/hosts/nixos/nixnuc/default.nix index 39df3ee..0a5ebec 100644 --- a/modules/hosts/nixos/nixnuc/default.nix +++ b/modules/hosts/nixos/nixnuc/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, username, ... }: { +{ compose2nix, config, pkgs, username, ... }: { imports = [ ./hardware-configuration.nix ./containers/audiobookshelf.nix @@ -22,6 +22,7 @@ }; environment.systemPackages = with pkgs; [ + compose2nix.packages.${pkgs.system}.default intel-gpu-tools jellyfin jellyfin-ffmpeg