Try out compose2nix

This commit is contained in:
Gene Liverman 2024-04-11 17:27:15 -04:00
parent 0aeec8ebe7
commit cb6b77b813
3 changed files with 31 additions and 3 deletions

21
flake.lock generated
View file

@ -17,6 +17,26 @@
"type": "github" "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": { "crane": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -436,6 +456,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"compose2nix": "compose2nix",
"disko": "disko", "disko": "disko",
"flox-flake": "flox-flake", "flox-flake": "flox-flake",
"genebean-omp-themes": "genebean-omp-themes", "genebean-omp-themes": "genebean-omp-themes",

View file

@ -42,6 +42,12 @@
# inputs.nixpkgs.follows ="nixpkgs"; # inputs.nixpkgs.follows ="nixpkgs";
}; };
compose2nix = {
url = "github:aksiksi/compose2nix";
inputs.nixpkgs.follows ="nixpkgs";
};
# My oh-my-posh theme # My oh-my-posh theme
genebean-omp-themes = { genebean-omp-themes = {
url = "github:genebean/my-oh-my-posh-themes"; url = "github:genebean/my-oh-my-posh-themes";
@ -49,7 +55,7 @@
}; };
}; # end inputs }; # 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 # creates a macOS system config
darwinHostConfig = system: hostname: username: nix-darwin.lib.darwinSystem { darwinHostConfig = system: hostname: username: nix-darwin.lib.darwinSystem {
@ -89,7 +95,7 @@
# creates a nixos system config # creates a nixos system config
nixosHostConfig = system: hostname: username: nixpkgs.lib.nixosSystem { 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 { pkgs = import nixpkgs {
inherit system; inherit system;
config = { config = {

View file

@ -1,4 +1,4 @@
{ config, pkgs, username, ... }: { { compose2nix, config, pkgs, username, ... }: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./containers/audiobookshelf.nix ./containers/audiobookshelf.nix
@ -22,6 +22,7 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
compose2nix.packages.${pkgs.system}.default
intel-gpu-tools intel-gpu-tools
jellyfin jellyfin
jellyfin-ffmpeg jellyfin-ffmpeg