Compare commits

..

No commits in common. "db321b49448867823a172a827820a2b16223eaac" and "ff1495b2f98b01e4c537b227f74955c27f6a8e1d" have entirely different histories.

9 changed files with 85 additions and 107 deletions

View File

@ -46,17 +46,13 @@
]
},
"locked": {
"lastModified": 1660175414,
"narHash": "sha256-x/Biv9kkFq4qHaxi9hU0Nl7E/3IlEVBJnxIge/ltgvA=",
"ref": "refs/heads/master",
"rev": "dc1b24e7521b1329f8f5ac93703e18649716cc70",
"revCount": 58,
"type": "git",
"url": "https://git.gaze.systems/dusk/website.git"
"narHash": "sha256-ekldeSxRI7awA74X1VWnjgrk4BWbth31LlNKszFRM8U=",
"type": "tarball",
"url": "https://git.gaze.systems/dusk/website/archive/master.zip"
},
"original": {
"type": "git",
"url": "https://git.gaze.systems/dusk/website.git"
"type": "tarball",
"url": "https://git.gaze.systems/dusk/website/archive/master.zip"
}
},
"crane": {
@ -765,17 +761,13 @@
]
},
"locked": {
"lastModified": 1659251276,
"narHash": "sha256-rHhaPtyH1hBcZxd6nXxyg59wL6ilqJqsfuHh8Ebd+rA=",
"ref": "refs/heads/master",
"rev": "d30b07841100278a1d7901001ecec038c5448be2",
"revCount": 50,
"type": "git",
"url": "https://git.gaze.systems/dusk/html.nix.git"
"narHash": "sha256-3PHw4aioOmhAPAL7PGbf/At0E+1rrENtRbLVkjLctxA=",
"type": "tarball",
"url": "https://git.gaze.systems/dusk/html.nix/archive/master.zip"
},
"original": {
"type": "git",
"url": "https://git.gaze.systems/dusk/html.nix.git"
"type": "tarball",
"url": "https://git.gaze.systems/dusk/html.nix/archive/master.zip"
}
},
"hyprland": {

View File

@ -19,7 +19,7 @@
hyprland.url = "github:hyprwm/Hyprland";
hyprland.inputs.nixpkgs.follows = "nixpkgs";
fufexan.url = "github:fufexan/dotfiles";
blog.url = "git+https://git.gaze.systems/dusk/website.git";
blog.url = "https://git.gaze.systems/dusk/website/archive/master.zip";
blog.inputs.nixpkgs.follows = "nixpkgs";
bernbot.url = "github:yusdacra/bernbot";
bernbot.inputs.nixpkgs.follows = "nixpkgs";

View File

@ -108,8 +108,6 @@ in {
};
services.xserver.videoDrivers = ["nvidia" "amdgpu"];
hardware = {
bluetooth.enable = true;
xpadneo.enable = true;
nvidia.prime = {
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
@ -171,7 +169,6 @@ in {
autoMount = true;
};
flatpak.enable = false;
hardware.xow.enable = true;
};
virtualisation = {

View File

@ -1,14 +0,0 @@
{
pkgs,
inputs,
...
}: {
services.nginx.virtualHosts."gaze.systems" = {
enableACME = true;
forceSSL = true;
root = "${inputs.blog.packages.${pkgs.system}.website}";
locations."/".extraConfig = ''
add_header cache-control max-age=1800;
'';
};
}

View File

@ -4,34 +4,89 @@
config,
lib,
...
}: {
imports = let
files =
lib.filterAttrs
(name: type: type == "regular" && name != "default.nix")
(builtins.readDir (toString ./.));
filesToImport =
builtins.map
(
name:
builtins.path {
inherit name;
path = "${toString ./.}/${name}";
}
)
(builtins.attrNames files);
in
filesToImport;
}: let
personal = import "${inputs.self}/personal.nix";
email = personal.emails.short;
in {
imports = [
./hardware-configuration.nix
./bernbot.nix
];
boot.cleanTmpDir = true;
zramSwap.enable = true;
# ssh config
services.fail2ban.enable = true;
services.openssh = {
enable = true;
passwordAuthentication = false;
};
users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile "${inputs.self}/secrets/ssh-key.pub")
];
# nginx
services.nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
virtualHosts."gaze.systems" = {
enableACME = true;
forceSSL = true;
root = "${inputs.blog.packages.${pkgs.system}.website}";
locations."/".extraConfig = ''
add_header cache-control max-age=1800;
'';
};
virtualHosts."git.gaze.systems" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://localhost:3001";
};
};
security.acme = {
acceptTerms = true;
certs = {
"gaze.systems".email = email;
"git.gaze.systems".email = email;
};
};
# gitea
services.gitea = {
enable = true;
cookieSecure = true;
disableRegistration = true;
domain = "git.gaze.systems";
rootUrl = "https://git.gaze.systems/";
httpPort = 3001;
};
# firewall stuffs
networking.firewall = {
enable = true;
allowedTCPPorts = [22 80 443];
allowedTCPPorts = lib.flatten [
[22 80 443]
(
lib.optional
config.services.gitea.enable
config.services.gitea.httpPort
)
];
allowedUDPPortRanges = [];
};
# nixinate for deployment
_module.args.nixinate = {
host = "gaze.systems";
sshUser = "root";
buildOn = "local"; # valid args are "local" or "remote"
substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s"
hermetic = true;
};
system.stateVersion = "22.05";
}

View File

@ -1,20 +0,0 @@
{config, ...}: {
services.gitea = {
enable = true;
cookieSecure = true;
disableRegistration = true;
domain = "git.gaze.systems";
rootUrl = "https://git.gaze.systems/";
httpPort = 3001;
};
services.nginx.virtualHosts."git.gaze.systems" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://localhost:3001";
};
networking.firewall.allowedTCPPorts = [
config.services.gitea.httpPort
];
}

View File

@ -1,13 +0,0 @@
{inputs, ...}: {
services.nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
};
security.acme = {
acceptTerms = true;
defaults.email = (import "${inputs.self}/personal.nix").emails.primary;
};
}

View File

@ -1,9 +0,0 @@
{...}: {
_module.args.nixinate = {
host = "gaze.systems";
sshUser = "root";
buildOn = "local"; # valid args are "local" or "remote"
substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s"
hermetic = true;
};
}

View File

@ -1,10 +0,0 @@
{inputs, ...}: {
services.fail2ban.enable = true;
services.openssh = {
enable = true;
passwordAuthentication = false;
};
users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile "${inputs.self}/secrets/ssh-key.pub")
];
}