format with nixpkgs-fmt

This commit is contained in:
zimbatm 2021-01-03 00:07:49 +01:00
parent 2ca351fdac
commit be65264a3f
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
20 changed files with 203 additions and 213 deletions

View file

@ -1,7 +1,5 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
postBuildHook = pkgs.writeScript "post-build-hook.sh" '' postBuildHook = pkgs.writeScript "post-build-hook.sh" ''
#!${pkgs.runtimeShell} #!${pkgs.runtimeShell}
export PATH=$PATH:${pkgs.nix}/bin export PATH=$PATH:${pkgs.nix}/bin
@ -16,7 +14,8 @@ let
sources = import ../nix/sources.nix; sources = import ../nix/sources.nix;
in { in
{
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (self: super: {

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
userImports = userImports =
let let

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }:
let let
gitlabModule = builtins.fetchTarball { gitlabModule = builtins.fetchTarball {
url = "https://gitlab.com/arianvp/nixos-gitlab-runner/-/archive/9126927c701aa399bd1734e7e5230c3a0010c1b7/nixos-gitlab-runner-9126927c701aa399bd1734e7e5230c3a0010c1b7.tar.gz"; url = "https://gitlab.com/arianvp/nixos-gitlab-runner/-/archive/9126927c701aa399bd1734e7e5230c3a0010c1b7/nixos-gitlab-runner-9126927c701aa399bd1734e7e5230c3a0010c1b7.tar.gz";

View file

@ -1,7 +1,6 @@
{ lib, pkgs, config, ... }: { lib, pkgs, config, ... }:
with lib; with lib;
let let
cfg = config; cfg = config;
@ -20,7 +19,8 @@ let
''; '';
}; };
in { in
{
options.services.hydra = { options.services.hydra = {
adminPasswordFile = mkOption { adminPasswordFile = mkOption {
type = types.str; type = types.str;
@ -124,7 +124,8 @@ in {
systems = [ "x86_64-linux" "builtin" ]; systems = [ "x86_64-linux" "builtin" ];
maxJobs = 8; maxJobs = 8;
supportedFeatures = [ "nixos-test" "big-parallel" "kvm" ]; supportedFeatures = [ "nixos-test" "big-parallel" "kvm" ];
}]; }
];
}; };
# Create a admin user and configure a declarative project # Create a admin user and configure a declarative project
@ -151,7 +152,8 @@ in {
export URL=http://localhost:${toString hydraPort} export URL=http://localhost:${toString hydraPort}
'' + '' +
(concatStringsSep "\n" (mapAttrsToList (n: v: '' (concatStringsSep "\n" (mapAttrsToList
(n: v: ''
export DECL_PROJECT_NAME="${n}" export DECL_PROJECT_NAME="${n}"
export DECL_DISPLAY_NAME="${v.displayName}" export DECL_DISPLAY_NAME="${v.displayName}"
export DECL_VALUE="${v.inputValue}" export DECL_VALUE="${v.inputValue}"
@ -160,8 +162,8 @@ in {
export DECL_DESCRIPTION="${v.description}" export DECL_DESCRIPTION="${v.description}"
export DECL_HOMEPAGE="${v.homepage}" export DECL_HOMEPAGE="${v.homepage}"
${createDeclarativeProjectScript}/bin/create-declarative-project ${createDeclarativeProjectScript}/bin/create-declarative-project
'') cfg.services.hydra.declarativeProjects)); '')
cfg.services.hydra.declarativeProjects));
}; };
}; };
} }

View file

@ -1,5 +1,4 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let let
userLib = import ../users/lib.nix { inherit lib; }; userLib = import ../users/lib.nix { inherit lib; };

View file

@ -1,5 +1,4 @@
with builtins; with builtins;
let let
secrets = import ./secrets.nix; secrets = import ./secrets.nix;

View file

@ -26,4 +26,3 @@ in
nix-community-infra = nix-community-infra super; nix-community-infra = nix-community-infra super;
}) })
] ]

View file

@ -1,7 +1,5 @@
# This file has been generated by Niv. # This file has been generated by Niv.
let let
# #
# The fetchers. fetch_<type> fetches specs of type <type>. # The fetchers. fetch_<type> fetches specs of type <type>.
# #
@ -144,14 +142,17 @@ let
# Create the final "sources" from the config # Create the final "sources" from the config
mkSources = config: mkSources = config:
mapAttrs ( mapAttrs
(
name: spec: name: spec:
if builtins.hasAttr "outPath" spec if builtins.hasAttr "outPath" spec
then abort then
abort
"The values in sources.json should not have an 'outPath' attribute" "The values in sources.json should not have an 'outPath' attribute"
else else
spec // { outPath = replace name (fetch config.pkgs name spec); } spec // { outPath = replace name (fetch config.pkgs name spec); }
) config.sources; )
config.sources;
# The "config" used by the fetchers # The "config" used by the fetchers
mkConfig = mkConfig =

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
userLib = import ./lib.nix { inherit lib; }; userLib = import ./lib.nix { inherit lib; };
keys = [ keys = [

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
userLib = import ./lib.nix { inherit lib; }; userLib = import ./lib.nix { inherit lib; };
keys = [ keys = [

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
userLib = import ./lib.nix { inherit lib; }; userLib = import ./lib.nix { inherit lib; };
keys = [ keys = [

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
userLib = import ./lib.nix { inherit lib; }; userLib = import ./lib.nix { inherit lib; };
keys = [ keys = [

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
userLib = import ./lib.nix { inherit lib; }; userLib = import ./lib.nix { inherit lib; };
keys = [ keys = [

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
userLib = import ./lib.nix { inherit lib; }; userLib = import ./lib.nix { inherit lib; };
keys = [ keys = [

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
userLib = import ./lib.nix { inherit lib; }; userLib = import ./lib.nix { inherit lib; };
keys = [ keys = [