Remilia: more updates
services: remove redundant nginx confs and some very minor changes
This commit is contained in:
228
flake.nix
228
flake.nix
@@ -17,125 +17,127 @@
|
|||||||
rust.url = github:oxalica/rust-overlay;
|
rust.url = github:oxalica/rust-overlay;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{self, nixpkgs, stable, master, old, ... }:
|
outputs = inputs@{ self, nixpkgs, stable, master, old, ... }:
|
||||||
inputs.utils.lib.eachDefaultSystem (system:
|
inputs.utils.lib.eachDefaultSystem
|
||||||
let
|
(system:
|
||||||
mkPkgs = channel: system: import channel {
|
let
|
||||||
inherit system;
|
mkPkgs = channel: system: import channel {
|
||||||
config.allowUnfree = true;
|
inherit system;
|
||||||
};
|
config.allowUnfree = true;
|
||||||
channels = final: prev: {
|
};
|
||||||
stable = mkPkgs stable prev.system;
|
channels = final: prev: {
|
||||||
unstable = mkPkgs nixpkgs prev.system;
|
stable = mkPkgs stable prev.system;
|
||||||
master = mkPkgs master prev.system;
|
unstable = mkPkgs nixpkgs prev.system;
|
||||||
old = mkPkgs old prev.system;
|
master = mkPkgs master prev.system;
|
||||||
};
|
old = mkPkgs old prev.system;
|
||||||
overlays = [
|
};
|
||||||
(import ./overlays/overridesandshit.nix)
|
overlays = [
|
||||||
(import ./overlays/packages.nix)
|
(import ./overlays/overridesandshit.nix)
|
||||||
];
|
(import ./overlays/packages.nix)
|
||||||
in
|
|
||||||
{
|
|
||||||
legacyPackages = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
overlays = overlays ++ [
|
|
||||||
inputs.nur.overlay
|
|
||||||
inputs.nvim.overlay
|
|
||||||
inputs.rust.overlay
|
|
||||||
inputs.emacs.overlay
|
|
||||||
channels
|
|
||||||
( _: _: {
|
|
||||||
nbfc-linux=inputs.nbfc.defaultPackage.${system};
|
|
||||||
games = inputs.nix-gaming.packages.${system};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
config.allowUnfree = true;
|
|
||||||
config.allowBroken = true;
|
|
||||||
};
|
|
||||||
}) //
|
|
||||||
(
|
|
||||||
let
|
|
||||||
personalModules = [
|
|
||||||
./modules/nvidia-offload.nix
|
|
||||||
./modules/sound.nix
|
|
||||||
./modules/xorg.nix
|
|
||||||
./modules/emacs
|
|
||||||
];
|
|
||||||
commonModules = [
|
|
||||||
./modules/nvim
|
|
||||||
./modules/vault-agent.nix
|
|
||||||
];
|
|
||||||
serverModules = [
|
|
||||||
./modules/min-pkgs.nix
|
|
||||||
./modules/min-stuff.nix
|
|
||||||
];
|
|
||||||
builder = [ ./modules/builder.nix ];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
hm-configs = {
|
|
||||||
natto = inputs.home-manager.lib.homeManagerConfiguration {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
configuration = { lib, ... }: {
|
|
||||||
imports = [
|
|
||||||
./home/natto.nix
|
|
||||||
];
|
];
|
||||||
nixpkgs = {
|
in
|
||||||
overlays = self.legacyPackages.x86_64-linux.overlays;
|
{
|
||||||
|
legacyPackages = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = overlays ++ [
|
||||||
|
inputs.nur.overlay
|
||||||
|
inputs.nvim.overlay
|
||||||
|
inputs.rust.overlay
|
||||||
|
inputs.emacs.overlay
|
||||||
|
channels
|
||||||
|
(_: _: {
|
||||||
|
nbfc-linux = inputs.nbfc.defaultPackage.${system};
|
||||||
|
games = inputs.nix-gaming.packages.${system};
|
||||||
|
})
|
||||||
|
];
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
config.allowBroken = true;
|
config.allowBroken = true;
|
||||||
config.permittedInsecurePackages = [
|
};
|
||||||
"electron-9.4.4"
|
}) //
|
||||||
];
|
(
|
||||||
|
let
|
||||||
|
personalModules = [
|
||||||
|
./modules/nvidia-offload.nix
|
||||||
|
./modules/sound.nix
|
||||||
|
./modules/xorg.nix
|
||||||
|
./modules/emacs
|
||||||
|
];
|
||||||
|
commonModules = [
|
||||||
|
./modules/nvim
|
||||||
|
./modules/vault-agent.nix
|
||||||
|
];
|
||||||
|
serverModules = [
|
||||||
|
./modules/min-pkgs.nix
|
||||||
|
./modules/min-stuff.nix
|
||||||
|
];
|
||||||
|
builders = [ ./modules/x86builder.nix ];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
hm-configs = {
|
||||||
|
natto = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
configuration = { lib, ... }: {
|
||||||
|
imports = [
|
||||||
|
./home/natto.nix
|
||||||
|
];
|
||||||
|
nixpkgs = {
|
||||||
|
overlays = self.legacyPackages.x86_64-linux.overlays;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
config.allowBroken = true;
|
||||||
|
config.permittedInsecurePackages = [
|
||||||
|
"electron-9.4.4"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
homeDirectory = "/home/natto";
|
||||||
|
username = "natto";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
homeDirectory = "/home/natto";
|
|
||||||
username = "natto";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
#Home laptop
|
#Home laptop
|
||||||
Satori = nixpkgs.lib.nixosSystem {
|
Satori = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/satori
|
./hosts/satori
|
||||||
inputs.agenix.nixosModules.age
|
inputs.agenix.nixosModules.age
|
||||||
{
|
{
|
||||||
nixpkgs.pkgs = self.legacyPackages.x86_64-linux;
|
nixpkgs.pkgs = self.legacyPackages.x86_64-linux;
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
++ personalModules
|
++ personalModules
|
||||||
++ commonModules;
|
++ commonModules;
|
||||||
};
|
};
|
||||||
|
|
||||||
#Home server (RPi4)
|
#Home server (RPi4)
|
||||||
Marisa = nixpkgs.lib.nixosSystem {
|
Marisa = nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/marisa
|
./hosts/marisa
|
||||||
#inputs.mailserver.nixosModules.mailserver
|
#inputs.mailserver.nixosModules.mailserver
|
||||||
{
|
{
|
||||||
nixpkgs.pkgs = self.legacyPackages.aarch64-linux;
|
nixpkgs.pkgs = self.legacyPackages.aarch64-linux;
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
++ commonModules
|
++ commonModules
|
||||||
++ serverModules;
|
++ serverModules;
|
||||||
};
|
};
|
||||||
|
|
||||||
#Oracle Cloud VM
|
#Oracle Cloud VM
|
||||||
Remilia = nixpkgs.lib.nixosSystem {
|
Remilia = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/remilia
|
./hosts/remilia
|
||||||
inputs.mailserver.nixosModules.mailserver
|
inputs.mailserver.nixosModules.mailserver
|
||||||
{
|
{
|
||||||
nixpkgs.pkgs = self.legacyPackages.x86_64-linux;
|
nixpkgs.pkgs = self.legacyPackages.x86_64-linux;
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
++ commonModules
|
++ commonModules
|
||||||
++ serverModules
|
++ serverModules
|
||||||
++ builder;
|
++ builders;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@@ -16,86 +16,62 @@
|
|||||||
package = (pkgs.nginx.overrideAttrs (oa: {
|
package = (pkgs.nginx.overrideAttrs (oa: {
|
||||||
configureFlags = oa.configureFlags ++ [ "--with-mail" "--with-mail_ssl_module" ];
|
configureFlags = oa.configureFlags ++ [ "--with-mail" "--with-mail_ssl_module" ];
|
||||||
}));
|
}));
|
||||||
virtualHosts = {
|
virtualHosts =
|
||||||
"weirdnatto.in" = {
|
let
|
||||||
addSSL = true;
|
genericHttpRProxy = { addr, ssl ? true, conf ? "" }: {
|
||||||
enableACME = true;
|
addSSL = true;
|
||||||
locations."/".proxyPass = "http://10.55.0.2:80";
|
enableACME = ssl;
|
||||||
serverAliases = [ "www.weirdnatto.in" ];
|
locations."/" = {
|
||||||
};
|
proxyPass = toString addr;
|
||||||
"git.weirdnatto.in" = {
|
extraConfig = ''
|
||||||
addSSL = true;
|
proxy_set_header Host $host;
|
||||||
enableACME = true;
|
'' + conf;
|
||||||
locations."/" = {
|
};
|
||||||
proxyPass = "http://10.55.0.2:5000";
|
};
|
||||||
extraConfig = ''
|
in
|
||||||
client_max_body_size 64M;
|
builtins.listToAttrs [
|
||||||
proxy_set_header Host $host;
|
{
|
||||||
'';
|
name = "vault.weirdnatto.in";
|
||||||
|
value = genericHttpRProxy { addr = "https://10.55.0.2:8800"; };
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "consul.weirdnatto.in";
|
||||||
|
value = genericHttpRProxy { addr = "https://10.55.0.2:8500"; };
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "ci.weirdnatto.in";
|
||||||
|
value = genericHttpRProxy { addr = "https://10.55.0.2:6666"; };
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "radio.weirdnatto.in";
|
||||||
|
value = genericHttpRProxy { addr = "https://10.55.0.3:8000"; };
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "git.weirdnatto.in";
|
||||||
|
value = genericHttpRProxy {
|
||||||
|
addr = "https://10.55.0.3:5000";
|
||||||
|
conf = "client_max_body_size 64M;";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "nomad.weirdnatto.in";
|
||||||
|
value = genericHttpRProxy {
|
||||||
|
addr = "https://10.55.0.3:4646";
|
||||||
|
conf = ''
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_read_timeout 310s;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
] //
|
||||||
|
{
|
||||||
|
"weirdnatto.in" = {
|
||||||
|
addSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/".proxyPass = "http://10.55.0.2:80";
|
||||||
|
serverAliases = [ "www.weirdnatto.in" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"vault.weirdnatto.in" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "https://10.55.0.2:8800";
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"consul.weirdnatto.in" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://10.55.0.2:8500";
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"nomad.weirdnatto.in" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://10.55.0.2:4646";
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_buffering off;
|
|
||||||
proxy_read_timeout 310s;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"radio.weirdnatto.in" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://10.55.0.3:8000";
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"ci.weirdnatto.in" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://10.55.0.2:6666";
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/*streamConfig = ''
|
|
||||||
upstream gitea {
|
|
||||||
server 10.55.0.2:222;
|
|
||||||
}
|
|
||||||
server {
|
|
||||||
listen 22001;
|
|
||||||
proxy_pass gitea;
|
|
||||||
}
|
|
||||||
'';*/
|
|
||||||
};
|
};
|
||||||
vault-agent = {
|
vault-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -154,3 +130,4 @@
|
|||||||
};
|
};
|
||||||
security.pki.certificateFiles = [ ../../cert.pem ];
|
security.pki.certificateFiles = [ ../../cert.pem ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
git
|
git
|
||||||
htop
|
htop
|
||||||
vim
|
vim
|
||||||
wireguard
|
wireguard-tools
|
||||||
vault
|
vault
|
||||||
tree-sitter
|
tree-sitter
|
||||||
rnix-lsp
|
rnix-lsp
|
||||||
@@ -31,12 +31,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixUnstable;
|
package = pkgs.nixUnstable;
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
'';
|
'';
|
||||||
trustedUsers = [ "root" ];
|
settings.trusted-users = [ "root" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user