Apply nixfmt
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../config-manager/default.nix
|
||||
./hardware-configuration.nix
|
||||
./modules
|
||||
];
|
||||
imports = [
|
||||
../../config-manager/default.nix
|
||||
./hardware-configuration.nix
|
||||
./modules
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
users.users.alex = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
packages = [];
|
||||
packages = [ ];
|
||||
};
|
||||
|
||||
environment.variables.EDITOR = "vim";
|
||||
|
||||
@@ -1,26 +1,39 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/7a2b1179-6582-4ef1-b094-0f11449373ed";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/7a2b1179-6582-4ef1-b094-0f11449373ed";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/aa0634e1-a1c2-4461-978a-cf1768f38b0c"; }
|
||||
];
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/aa0634e1-a1c2-4461-978a-cf1768f38b0c"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
pkgs.git
|
||||
pkgs.tig
|
||||
pkgs.vim
|
||||
];
|
||||
];
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ inputs, lib, config, ... }:
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
configurationLimit = config.mod.gc.configurationLimit;
|
||||
in
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
conf = config.mod.gitea;
|
||||
gitDomain = "git.${conf.baseDomain}";
|
||||
@@ -26,7 +31,7 @@ in
|
||||
|
||||
webfingerAccounts = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = "The accounts that should be listed";
|
||||
};
|
||||
};
|
||||
@@ -47,7 +52,7 @@ in
|
||||
message = "There is no cert configured for ${conf.baseDomain} used by webfinger";
|
||||
}
|
||||
{
|
||||
assertion = conf.webfingerEnable && conf.webfingerAccounts != [];
|
||||
assertion = conf.webfingerEnable && conf.webfingerAccounts != [ ];
|
||||
message = "Option 'mod.gitea.webfingerAccounts' cannot be empty";
|
||||
}
|
||||
];
|
||||
@@ -81,38 +86,43 @@ in
|
||||
services.nginx = {
|
||||
virtualHosts."${conf.baseDomain}" =
|
||||
let
|
||||
mkWebfinger = account:
|
||||
pkgs.writeTextDir (lib.escapeURL "acct:${account}") (lib.generators.toJSON {} {
|
||||
subject = "acct:${account}";
|
||||
links = [{
|
||||
rel = "http://openid.net/specs/connect/1.0/issuer";
|
||||
href = "https://${gitDomain}";
|
||||
}];
|
||||
});
|
||||
mkWebfinger =
|
||||
account:
|
||||
pkgs.writeTextDir (lib.escapeURL "acct:${account}") (
|
||||
lib.generators.toJSON { } {
|
||||
subject = "acct:${account}";
|
||||
links = [
|
||||
{
|
||||
rel = "http://openid.net/specs/connect/1.0/issuer";
|
||||
href = "https://${gitDomain}";
|
||||
}
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
webfingerRoot = pkgs.symlinkJoin {
|
||||
name = "${gitDomain}-webfinger";
|
||||
paths = builtins.map mkWebfinger conf.webfingerAccounts;
|
||||
};
|
||||
in
|
||||
lib.mkIf conf.webfingerEnable {
|
||||
forceSSL = true;
|
||||
useACMEHost = conf.baseDomain;
|
||||
lib.mkIf conf.webfingerEnable {
|
||||
forceSSL = true;
|
||||
useACMEHost = conf.baseDomain;
|
||||
|
||||
locations."/.well-known/webfinger" = {
|
||||
root = webfingerRoot;
|
||||
locations."/.well-known/webfinger" = {
|
||||
root = webfingerRoot;
|
||||
|
||||
extraConfig = ''
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
default_type "application/jrd+json";
|
||||
types { application/jrd+json json; }
|
||||
if ($arg_resource) {
|
||||
rewrite ^(.*)$ /$arg_resource break;
|
||||
}
|
||||
return 400;
|
||||
'';
|
||||
};
|
||||
extraConfig = ''
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
default_type "application/jrd+json";
|
||||
types { application/jrd+json json; }
|
||||
if ($arg_resource) {
|
||||
rewrite ^(.*)$ /$arg_resource break;
|
||||
}
|
||||
return 400;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."${gitDomain}" = {
|
||||
forceSSL = true;
|
||||
|
||||
@@ -31,7 +31,10 @@ in
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ inputs, lib, config, ... }:
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
enabled = config.mod.pppdotpm-site.enable;
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
enabled = config.mod.ssh.enable;
|
||||
|
||||
@@ -41,10 +46,12 @@ in
|
||||
enable = true;
|
||||
ports = [ 1122 ];
|
||||
|
||||
hostKeys = [{
|
||||
path = "${rootSSHKeyPath}/root.tadpole";
|
||||
type = "ed25519";
|
||||
}];
|
||||
hostKeys = [
|
||||
{
|
||||
path = "${rootSSHKeyPath}/root.tadpole";
|
||||
type = "ed25519";
|
||||
}
|
||||
];
|
||||
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
|
||||
Reference in New Issue
Block a user