* krops: merge krebs-nixpkgs into krebs-source
This commit is contained in:
parent
a69175a719
commit
95f6255f58
@ -1,14 +1,12 @@
|
|||||||
{ name }: let
|
{ name }: let
|
||||||
inherit (import ../krebs/krops.nix { inherit name; })
|
inherit (import ../krebs/krops.nix { inherit name; })
|
||||||
krebs-nixpkgs
|
|
||||||
krebs-source
|
krebs-source
|
||||||
lib
|
lib
|
||||||
pkgs
|
pkgs
|
||||||
;
|
;
|
||||||
|
|
||||||
source = { test }: lib.evalSource [
|
source = { test }: lib.evalSource [
|
||||||
(krebs-nixpkgs { test = test; })
|
(krebs-source { test = test; })
|
||||||
krebs-source
|
|
||||||
{
|
{
|
||||||
nixos-config.symlink = "stockholm/jeschli/1systems/${name}/config.nix";
|
nixos-config.symlink = "stockholm/jeschli/1systems/${name}/config.nix";
|
||||||
secrets = if test then {
|
secrets = if test then {
|
||||||
|
@ -7,8 +7,9 @@
|
|||||||
# TODO document why pkgs should be used like this
|
# TODO document why pkgs should be used like this
|
||||||
pkgs = import "${krops}/pkgs" {};
|
pkgs = import "${krops}/pkgs" {};
|
||||||
|
|
||||||
krebs-nixpkgs = { test ? false }: if test then {
|
krebs-source = { test ? false }: rec {
|
||||||
nixpkgs.file = {
|
nixpkgs = if test then {
|
||||||
|
file = {
|
||||||
path = toString (pkgs.fetchFromGitHub {
|
path = toString (pkgs.fetchFromGitHub {
|
||||||
owner = "nixos";
|
owner = "nixos";
|
||||||
repo = "nixpkgs";
|
repo = "nixpkgs";
|
||||||
@ -18,17 +19,15 @@
|
|||||||
useChecksum = true;
|
useChecksum = true;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
nixpkgs.git = {
|
git = {
|
||||||
ref = (lib.importJSON ./nixpkgs.json).rev;
|
ref = (lib.importJSON ./nixpkgs.json).rev;
|
||||||
url = https://github.com/NixOS/nixpkgs;
|
url = https://github.com/NixOS/nixpkgs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
krebs-source = {
|
|
||||||
stockholm.file = toString ../.;
|
stockholm.file = toString ../.;
|
||||||
stockholm-version.pipe = toString (pkgs.writeDash "${name}-version" ''
|
stockholm-version.pipe = toString (pkgs.writeDash "${name}-version" ''
|
||||||
set -efu
|
set -efu
|
||||||
cd ${lib.escapeShellArg krebs-source.stockholm.file}
|
cd ${lib.escapeShellArg stockholm.file}
|
||||||
V=$(${pkgs.coreutils}/bin/date +%y.%m)
|
V=$(${pkgs.coreutils}/bin/date +%y.%m)
|
||||||
if test -d .git; then
|
if test -d .git; then
|
||||||
V=$V.git.$(${pkgs.git}/bin/git describe --always --dirty)
|
V=$V.git.$(${pkgs.git}/bin/git describe --always --dirty)
|
||||||
@ -41,8 +40,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
source ={ test }: lib.evalSource [
|
source ={ test }: lib.evalSource [
|
||||||
(krebs-nixpkgs { test = test; })
|
(krebs-source { test = test; })
|
||||||
krebs-source
|
|
||||||
{
|
{
|
||||||
nixos-config.symlink = "stockholm/krebs/1systems/${name}/config.nix";
|
nixos-config.symlink = "stockholm/krebs/1systems/${name}/config.nix";
|
||||||
secrets = if test then {
|
secrets = if test then {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{ name }: let
|
{ name }: let
|
||||||
inherit (import ../krebs/krops.nix { inherit name; })
|
inherit (import ../krebs/krops.nix { inherit name; })
|
||||||
krebs-nixpkgs
|
|
||||||
krebs-source
|
krebs-source
|
||||||
lib
|
lib
|
||||||
pkgs
|
pkgs
|
||||||
@ -13,8 +12,7 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
source = { test }: lib.evalSource [
|
source = { test }: lib.evalSource [
|
||||||
(krebs-nixpkgs { test = test; })
|
(krebs-source { test = test; })
|
||||||
krebs-source
|
|
||||||
{
|
{
|
||||||
nixos-config.symlink = "stockholm/lass/1systems/${name}/physical.nix";
|
nixos-config.symlink = "stockholm/lass/1systems/${name}/physical.nix";
|
||||||
secrets = if test then {
|
secrets = if test then {
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
{ name }: rec {
|
{ name }: rec {
|
||||||
|
|
||||||
inherit (import ../krebs/krops.nix { inherit name; })
|
inherit (import ../krebs/krops.nix { inherit name; })
|
||||||
krebs-nixpkgs
|
|
||||||
krebs-source
|
krebs-source
|
||||||
lib
|
lib
|
||||||
pkgs
|
pkgs
|
||||||
;
|
;
|
||||||
|
|
||||||
source = lib.evalSource [
|
source = lib.evalSource [
|
||||||
(krebs-nixpkgs { test = true; })
|
(krebs-source { test = true; })
|
||||||
krebs-source
|
|
||||||
{
|
{
|
||||||
nixos-config.symlink = "stockholm/tv/1systems/${name}/config.nix";
|
nixos-config.symlink = "stockholm/tv/1systems/${name}/config.nix";
|
||||||
secrets.file = toString ./dummy_secrets;
|
secrets.file = toString ./dummy_secrets;
|
||||||
|
Loading…
Reference in New Issue
Block a user