mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
Format .nix files
This does not include any automation for the release branch, but is based on the configuration of https://github.com/NixOS/nix/pull/12349 pre-commit run -a nixfmt-rfc-style
This commit is contained in:
parent
6cb17fd836
commit
32aed360b8
266 changed files with 7443 additions and 5118 deletions
|
@ -1,4 +1,11 @@
|
|||
{ lib, nixpkgs, system, pkgs, ... }: let
|
||||
{
|
||||
lib,
|
||||
nixpkgs,
|
||||
system,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
clientPrivateKey = pkgs.writeText "id_ed25519" ''
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||
|
@ -9,41 +16,52 @@
|
|||
-----END OPENSSH PRIVATE KEY-----
|
||||
'';
|
||||
|
||||
clientPublicKey =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFt5a8eH8BYZYjoQhzXGVKKHJe1pw1D0p7O2Vb9VTLzB";
|
||||
clientPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFt5a8eH8BYZYjoQhzXGVKKHJe1pw1D0p7O2Vb9VTLzB";
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../testsupport/setup.nix
|
||||
../testsupport/gitea-repo.nix
|
||||
];
|
||||
nodes = {
|
||||
gitea = { pkgs, ... }: {
|
||||
services.gitea.enable = true;
|
||||
services.gitea.settings.service.DISABLE_REGISTRATION = true;
|
||||
services.gitea.settings.log.LEVEL = "Info";
|
||||
services.gitea.settings.database.LOG_SQL = false;
|
||||
services.openssh.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 3000 ];
|
||||
environment.systemPackages = [ pkgs.git pkgs.gitea ];
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = [clientPublicKey];
|
||||
|
||||
# TODO: remove this after updating to nixos-23.11
|
||||
nixpkgs.pkgs = lib.mkForce (import nixpkgs {
|
||||
inherit system;
|
||||
config.permittedInsecurePackages = [
|
||||
"gitea-1.19.4"
|
||||
gitea =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.gitea.enable = true;
|
||||
services.gitea.settings.service.DISABLE_REGISTRATION = true;
|
||||
services.gitea.settings.log.LEVEL = "Info";
|
||||
services.gitea.settings.database.LOG_SQL = false;
|
||||
services.openssh.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 3000 ];
|
||||
environment.systemPackages = [
|
||||
pkgs.git
|
||||
pkgs.gitea
|
||||
];
|
||||
});
|
||||
};
|
||||
client = { pkgs, ... }: {
|
||||
environment.systemPackages = [ pkgs.git ];
|
||||
};
|
||||
};
|
||||
defaults = { pkgs, ... }: {
|
||||
environment.systemPackages = [ pkgs.jq ];
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = [ clientPublicKey ];
|
||||
|
||||
# TODO: remove this after updating to nixos-23.11
|
||||
nixpkgs.pkgs = lib.mkForce (
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
config.permittedInsecurePackages = [
|
||||
"gitea-1.19.4"
|
||||
];
|
||||
}
|
||||
);
|
||||
};
|
||||
client =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ pkgs.git ];
|
||||
};
|
||||
};
|
||||
defaults =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ pkgs.jq ];
|
||||
};
|
||||
|
||||
setupScript = ''
|
||||
import shlex
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue