mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-04-20 03:34:07 +02:00
formt with nix fmt
This commit is contained in:
parent
2eb114c0b4
commit
2b6a2736f2
5 changed files with 27 additions and 14 deletions
|
@ -11,7 +11,9 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.jopejoe1.sops = {
|
options.jopejoe1.sops = {
|
||||||
enable = (lib.mkEnableOption "Enable sops") // { default = true;};
|
enable = (lib.mkEnableOption "Enable sops") // {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
|
@ -42,8 +42,14 @@
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [ 21 80 ];
|
allowedTCPPorts = [
|
||||||
allowedUDPPorts = [ 21 80 ];
|
21
|
||||||
|
80
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
21
|
||||||
|
80
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.network.networks."10-uplink".networkConfig.Address = "2a01:4f8:a0:31e5::/64";
|
systemd.network.networks."10-uplink".networkConfig.Address = "2a01:4f8:a0:31e5::/64";
|
||||||
|
|
|
@ -58,7 +58,8 @@
|
||||||
"cache.missing.ninja" = {
|
"cache.missing.ninja" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
|
locations."/".proxyPass =
|
||||||
|
"http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
|
||||||
};
|
};
|
||||||
"nix.missing.ninja" = {
|
"nix.missing.ninja" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
@ -98,23 +99,29 @@
|
||||||
urlPrefix = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/blob/master/";
|
urlPrefix = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/blob/master/";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
optionsJSON = (import "${self.inputs.nixpkgs}/nixos/release.nix" { }).options + /share/doc/nixos/options.json;
|
optionsJSON =
|
||||||
|
(import "${self.inputs.nixpkgs}/nixos/release.nix" { }).options + /share/doc/nixos/options.json;
|
||||||
name = "NixOS";
|
name = "NixOS";
|
||||||
urlPrefix = "https://github.com/NixOS/nixpkgs/tree/master/";
|
urlPrefix = "https://github.com/NixOS/nixpkgs/tree/master/";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
optionsJSON = self.inputs.home-manager.packages.${pkgs.stdenv.system}.docs-html.passthru.home-manager-options.nixos + /share/doc/nixos/options.json;
|
optionsJSON =
|
||||||
|
self.inputs.home-manager.packages.${pkgs.stdenv.system}.docs-html.passthru.home-manager-options.nixos
|
||||||
|
+ /share/doc/nixos/options.json;
|
||||||
name = "Home Manager NixOS";
|
name = "Home Manager NixOS";
|
||||||
urlPrefix = "https://github.com/nix-community/home-manager/tree/master/";
|
urlPrefix = "https://github.com/nix-community/home-manager/tree/master/";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
optionsJSON = self.inputs.home-manager.packages.${pkgs.stdenv.system}.docs-json + /share/doc/home-manager/options.json;
|
optionsJSON =
|
||||||
|
self.inputs.home-manager.packages.${pkgs.stdenv.system}.docs-json
|
||||||
|
+ /share/doc/home-manager/options.json;
|
||||||
optionsPrefix = "home-manager.users.<name>";
|
optionsPrefix = "home-manager.users.<name>";
|
||||||
name = "Home Manager";
|
name = "Home Manager";
|
||||||
urlPrefix = "https://github.com/nix-community/home-manager/tree/master/";
|
urlPrefix = "https://github.com/nix-community/home-manager/tree/master/";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
optionsJSON = self.inputs.nixvim.packages.${pkgs.stdenv.system}.options-json + /share/doc/nixos/options.json;
|
optionsJSON =
|
||||||
|
self.inputs.nixvim.packages.${pkgs.stdenv.system}.options-json + /share/doc/nixos/options.json;
|
||||||
optionsPrefix = "programs.nixvim";
|
optionsPrefix = "programs.nixvim";
|
||||||
name = "NixVim";
|
name = "NixVim";
|
||||||
urlPrefix = "https://github.com/nix-community/nixvim/tree/main/";
|
urlPrefix = "https://github.com/nix-community/nixvim/tree/main/";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{...}:
|
{ ... }:
|
||||||
{
|
{
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
|
|
|
@ -121,11 +121,9 @@
|
||||||
if ! test -e "${hostStateDir}/secret-keys.php"; then
|
if ! test -e "${hostStateDir}/secret-keys.php"; then
|
||||||
umask 0177
|
umask 0177
|
||||||
echo "<?php" >> "${hostStateDir}/secret-keys.php"
|
echo "<?php" >> "${hostStateDir}/secret-keys.php"
|
||||||
${
|
${lib.concatMapStringsSep "\n" (var: ''
|
||||||
lib.concatMapStringsSep "\n" (var: ''
|
|
||||||
echo "define('${var}', '`tr -dc a-zA-Z0-9 </dev/urandom | head -c 64`');" >> "${hostStateDir}/secret-keys.php"
|
echo "define('${var}', '`tr -dc a-zA-Z0-9 </dev/urandom | head -c 64`');" >> "${hostStateDir}/secret-keys.php"
|
||||||
'') secretsVars
|
'') secretsVars}
|
||||||
}
|
|
||||||
echo "?>" >> "${hostStateDir}/secret-keys.php"
|
echo "?>" >> "${hostStateDir}/secret-keys.php"
|
||||||
chmod 440 "${hostStateDir}/secret-keys.php"
|
chmod 440 "${hostStateDir}/secret-keys.php"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue