Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed May 30, 2024
1 parent cf536b8 commit 938d3c0
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 65 deletions.
2 changes: 1 addition & 1 deletion home/rice/niri/binds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
...
}: let
inherit (lib) getExe;
in{
in {
programs.niri.settings.binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c";
run = x: spawn "run-as-service" (builtins.toString (getExe x));
Expand Down
7 changes: 5 additions & 2 deletions home/rice/niri/config.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{theme, pkgs, ...}:
{
theme,
pkgs,
...
}:
with theme.colors; {
imports = [./binds.nix];
programs.niri.settings = {
Expand Down Expand Up @@ -123,5 +127,4 @@ with theme.colors; {
hotkey-overlay.skip-at-startup = true;
screenshot-path = "~/pics/ss/ss%Y-%m-%d %H-%M-%S.png";
};

}
123 changes: 61 additions & 62 deletions system/server/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,76 @@
inputs,
config,
...
}:
let
}: let
inherit (config.age) secrets;
in
# TODO
{
imports = [
./mail.nix
inputs.lyricsapi.nixosModules.default
inputs.bitcoinstatus.nixosModules.default
];
services.nginx = {
enable = true;
# package = pkgs.nginx.override {openssl = pkgs.libressl;};
package = pkgs.angieQuic.override {openssl = pkgs.libressl;};
in
# TODO
{
imports = [
./mail.nix
inputs.lyricsapi.nixosModules.default
inputs.bitcoinstatus.nixosModules.default
];
services.nginx = {
enable = true;
# package = pkgs.nginx.override {openssl = pkgs.libressl;};
package = pkgs.angieQuic.override {openssl = pkgs.libressl;};

recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
recommendedZstdSettings = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
recommendedZstdSettings = true;

# lets be more picky on our ciphers and protocols
sslCiphers = "EECDH+aRSA+AESGCM:EDH+aRSA:EECDH+aRSA:+AES256:+AES128:+SHA1:!CAMELLIA:!SEED:!3DES:!DES:!RC4:!eNULL";
sslProtocols = "TLSv1.3 TLSv1.2";
# lets be more picky on our ciphers and protocols
sslCiphers = "EECDH+aRSA+AESGCM:EDH+aRSA:EECDH+aRSA:+AES256:+AES128:+SHA1:!CAMELLIA:!SEED:!3DES:!DES:!RC4:!eNULL";
sslProtocols = "TLSv1.3 TLSv1.2";

commonHttpConfig = ''
#real_ip_header CF-Connecting-IP;
add_header 'Referrer-Policy' 'origin-when-cross-origin';
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
'';
commonHttpConfig = ''
#real_ip_header CF-Connecting-IP;
add_header 'Referrer-Policy' 'origin-when-cross-origin';
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
'';

virtualHosts = {
"sioodmy.dev" = {
root = inputs.website.packages.${pkgs.system}.website;
enableACME = true;
locations."/" = {
tryFiles = "$uri/index.html $uri.html $uri/ $uri =404";
extraConfig = ''
rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
rewrite ^/(.*)/$ /$1 permanent;
virtualHosts = {
"sioodmy.dev" = {
root = inputs.website.packages.${pkgs.system}.website;
enableACME = true;
locations."/" = {
tryFiles = "$uri/index.html $uri.html $uri/ $uri =404";
extraConfig = ''
rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
rewrite ^/(.*)/$ /$1 permanent;
error_page 404 /404.html;
'';
};
error_page 404 /404.html;
'';
};

forceSSL = true;
};
"lyrics.sioodmy.dev" = {
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
forceSSL = true;
};
"lyrics.sioodmy.dev" = {
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
};
quic = true;
forceSSL = true;
enableACME = true;
};
quic = true;
forceSSL = true;
enableACME = true;
};
};
};
services.lyricsapi.enable = true;
services.bitcoinstatus = {
enable = true;
tokenFile = secrets.discordtoken.path;
};
services.lyricsapi.enable = true;
services.bitcoinstatus = {
enable = true;
tokenFile = secrets.discordtoken.path;
};

security.acme = {
acceptTerms = true;
defaults.email = "hello@sioodmy.dev";
};
security.acme = {
acceptTerms = true;
defaults.email = "hello@sioodmy.dev";
};

networking.firewall = {
allowedTCPPorts = [80 443];
};
}
networking.firewall = {
allowedTCPPorts = [80 443];
};
}

0 comments on commit 938d3c0

Please sign in to comment.