packages: add basic devshell setup
This commit is contained in:
parent
54a8e04944
commit
4c802ca902
4 changed files with 58 additions and 44 deletions
14
flake.nix
14
flake.nix
|
@ -69,6 +69,11 @@
|
|||
mkDeployments = hosts: overrides: lib.genAttrs hosts
|
||||
(host: mkDeploy host // (overrides.${host} or {}) );
|
||||
|
||||
depot = forSystems (system: import ./packages {
|
||||
inherit inputs;
|
||||
pkgs = nixpkgsFor system;
|
||||
});
|
||||
|
||||
in {
|
||||
nixosModules = aspect.modules;
|
||||
|
||||
|
@ -76,15 +81,14 @@
|
|||
|
||||
deploy.nodes = mkDeployments nixosHosts {};
|
||||
|
||||
packages = forSystems (system: import ./packages {
|
||||
inherit inputs;
|
||||
pkgs = nixpkgsFor system;
|
||||
});
|
||||
|
||||
apps = forSystems (system: {
|
||||
dream2nix = inputs.dream2nix.defaultApp.${system};
|
||||
});
|
||||
|
||||
packages = forSystems (system: depot.${system}.packages);
|
||||
|
||||
devShells = forSystems (system: depot.${system}.devShells);
|
||||
|
||||
hydraJobs = {
|
||||
systems = lib.mapAttrs (_: x: x.config.system.build.toplevel) self.nixosConfigurations;
|
||||
inherit (self) packages;
|
||||
|
|
|
@ -2,8 +2,12 @@
|
|||
let
|
||||
patched-derivations = import ./patched-derivations.nix (pkgs // { flakePackages = all; });
|
||||
patched-inputs = import ./patched-inputs.nix args;
|
||||
packages = import ./packages.nix args;
|
||||
projects = import ./projects.nix args;
|
||||
all = patched-derivations
|
||||
// patched-inputs
|
||||
// packages;
|
||||
in all
|
||||
// projects.packages;
|
||||
in {
|
||||
packages = all;
|
||||
|
||||
inherit (projects) devShells;
|
||||
}
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
let
|
||||
inherit (pkgs) system;
|
||||
dream2nix = inputs.dream2nix.lib2.init {
|
||||
systems = [ system ];
|
||||
config = {
|
||||
projectRoot = ./.;
|
||||
overridesDirs = [ ./dream2nix-overrides ];
|
||||
};
|
||||
};
|
||||
poetry2nix = pkgs.poetry2nix.overrideScope' (final: prev: {
|
||||
defaultPoetryOverrides = prev.defaultPoetryOverrides.extend (import ./poetry2nix-overrides);
|
||||
});
|
||||
in
|
||||
{
|
||||
ghost = (let version = "4.39.0"; in dream2nix.makeFlakeOutputs {
|
||||
source = pkgs.fetchzip {
|
||||
url = "https://github.com/TryGhost/Ghost/releases/download/v${version}/Ghost-${version}.zip";
|
||||
sha256 = "sha256-9XZCe1nd+jeinJHEAbZfLWAiEZK4QqdRxgE2byBkuAc=";
|
||||
stripRoot = false;
|
||||
};
|
||||
}).packages.${system}.ghost;
|
||||
|
||||
hyprspace = pkgs.callPackage ./networking/hyprspace { iproute2mac = null; };
|
||||
|
||||
minio-console = pkgs.callPackage ./servers/minio-console { };
|
||||
|
||||
privatevoid-smart-card-ca-bundle = pkgs.callPackage ./data/privatevoid-smart-card-certificate-authority-bundle.nix { };
|
||||
|
||||
reflex-cache = poetry2nix.mkPoetryApplication {
|
||||
projectDir = ./servers/reflex-cache;
|
||||
meta.mainProgram = "reflex";
|
||||
};
|
||||
|
||||
sips = pkgs.callPackage ./servers/sips { };
|
||||
}
|
42
packages/projects.nix
Normal file
42
packages/projects.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
let
|
||||
inherit (pkgs) system;
|
||||
dream2nix = inputs.dream2nix.lib2.init {
|
||||
systems = [ system ];
|
||||
config = {
|
||||
projectRoot = ./.;
|
||||
overridesDirs = [ ./dream2nix-overrides ];
|
||||
};
|
||||
};
|
||||
poetry2nix = pkgs.poetry2nix.overrideScope' (final: prev: {
|
||||
defaultPoetryOverrides = prev.defaultPoetryOverrides.extend (import ./poetry2nix-overrides);
|
||||
});
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
ghost = (let version = "4.39.0"; in dream2nix.makeFlakeOutputs {
|
||||
source = pkgs.fetchzip {
|
||||
url = "https://github.com/TryGhost/Ghost/releases/download/v${version}/Ghost-${version}.zip";
|
||||
sha256 = "sha256-9XZCe1nd+jeinJHEAbZfLWAiEZK4QqdRxgE2byBkuAc=";
|
||||
stripRoot = false;
|
||||
};
|
||||
}).packages.${system}.ghost;
|
||||
|
||||
hyprspace = pkgs.callPackage ./networking/hyprspace { iproute2mac = null; };
|
||||
|
||||
minio-console = pkgs.callPackage ./servers/minio-console { };
|
||||
|
||||
privatevoid-smart-card-ca-bundle = pkgs.callPackage ./data/privatevoid-smart-card-certificate-authority-bundle.nix { };
|
||||
|
||||
reflex-cache = poetry2nix.mkPoetryApplication {
|
||||
projectDir = ./servers/reflex-cache;
|
||||
meta.mainProgram = "reflex";
|
||||
};
|
||||
|
||||
sips = pkgs.callPackage ./servers/sips { };
|
||||
};
|
||||
|
||||
devShells = {
|
||||
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue