Feature/rfc 0166 fmt (#113)

* change formatter to nixfmt-rfc-style

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>

* Add rfc-style fmt'ing

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>

---------

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
2024-03-03 18:06:28 -05:00
committed by GitHub
parent e732499201
commit 1a8a2fa394
19 changed files with 492 additions and 264 deletions

View File

@ -1,7 +1,14 @@
{ config, lib, libS, ... }:
{
config,
lib,
libS,
...
}:
let cfg = config.boot;
in {
let
cfg = config.boot;
in
{
options = {
boot = {
default = libS.mkOpinionatedOption "enable the boot builder";
@ -28,7 +35,10 @@ in {
supportedFilesystems = [ cfg.filesystem ];
tmp.useTmpfs = true;
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
kernelParams = [ "nordrand" ] ++ lib.optional (cfg.cpuType == "amd") "kvm-amd" ++ lib.optional cfg.fullDiskEncryption "ip=<ip-addr>::<ip-gateway>:<netmask>";
kernelParams =
[ "nordrand" ]
++ lib.optional (cfg.cpuType == "amd") "kvm-amd"
++ lib.optional cfg.fullDiskEncryption "ip=<ip-addr>::<ip-gateway>:<netmask>";
initrd = {
kernelModules = lib.mkIf cfg.amdGPU [ "amdgpu" ];
network = lib.mkIf cfg.fullDiskEncryption {

View File

@ -1,7 +1,14 @@
{ config, lib, libS, ... }:
{
config,
lib,
libS,
...
}:
let cfg = config.services.fail2ban;
in {
let
cfg = config.services.fail2ban;
in
{
options.services.fail2ban.recommendedDefaults = libS.mkOpinionatedOption "use fail2ban with recommended defaults";
config.services.fail2ban = lib.mkIf cfg.recommendedDefaults {

View File

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let cfg = config.services.autopull;
in {
let
cfg = config.services.autopull;
in
{
options = {
services.autopull = {
enable = lib.mkEnableOption "autopull";
@ -38,12 +45,17 @@ in {
};
config = lib.mkIf (cfg.enable && !(builtins.isNull cfg.path)) {
environment.systemPackages = [ pkgs.openssh pkgs.git ];
environment.systemPackages = [
pkgs.openssh
pkgs.git
];
systemd.services."autopull@${cfg.name}" = {
after = [ "multi-user.target" ];
requires = [ "multi-user.target" ];
description = "Pull the latest data for ${cfg.name}";
environment = lib.mkIf (cfg.ssh-key != "") { GIT_SSH_COMMAND="${pkgs.openssh}/bin/ssh -i ${cfg.ssh-key} -o IdentitiesOnly=yes";};
environment = lib.mkIf (cfg.ssh-key != "") {
GIT_SSH_COMMAND = "${pkgs.openssh}/bin/ssh -i ${cfg.ssh-key} -o IdentitiesOnly=yes";
};
serviceConfig = {
Type = "oneshot";
User = "root";

View File

@ -1,15 +1,19 @@
{ config, lib, ... }:
let cfg = config.services.hydra;
in {
let
cfg = config.services.hydra;
in
{
config = {
services.hydra.extraConfig = lib.mkDefault (lib.concatLines [
cfg.extraConfig
''
<git-input>
timeout = 3600
</git-input>
''
]);
services.hydra.extraConfig = lib.mkDefault (
lib.concatLines [
cfg.extraConfig
''
<git-input>
timeout = 3600
</git-input>
''
]
);
};
}

View File

@ -1,5 +1,6 @@
# BIASED
{ config, lib, ... }: {
{ config, lib, ... }:
{
config = {
services = {
openssh = lib.mkIf config.services.gitea.enable {