Compare commits

..

No commits in common. "713b835f70c7147c49d761c3275b21e0de984093" and "1510c8c31fe933ee9bb6ace01a6f4afc210a76c5" have entirely different histories.

8 changed files with 64 additions and 62 deletions

View File

@ -162,27 +162,28 @@
# Disk formatting, only used once # Disk formatting, only used once
diskoConfigurations = { root = import ./disks/root.nix; }; diskoConfigurations = { root = import ./disks/root.nix; };
packages = let # Other packages, such as system images or programs
aws = system: packages = forAllSystems (system: {
import ./generators/aws { inherit inputs globals overlays system; };
staff = system: # Package servers into images with a generator
import ./generators/staff { inherit inputs globals overlays system; }; aws = {
neovim = system: "${system}" =
let pkgs = import nixpkgs { inherit system overlays; }; import ./generators/aws { inherit inputs globals system overlays; };
in import ./modules/common/neovim/package { };
inherit pkgs; staff = {
colors = (import ./colorscheme/gruvbox-dark).dark; "${system}" = import ./generators/staff {
inherit inputs globals system overlays;
}; };
in { };
x86_64-linux.aws = aws "x86_64-linux";
x86_64-linux.staff = staff "x86_64-linux";
# Package Neovim config into standalone package # Package Neovim config into standalone package
x86_64-linux.neovim = neovim "x86_64-linux"; neovim = let pkgs = import nixpkgs { inherit system overlays; };
x86_64-darwin.neovim = neovim "x86_64-darwin"; in import ./modules/common/neovim/package {
aarch64-linux.neovim = neovim "aarch64-linux"; inherit pkgs;
aarch64-darwin.neovim = neovim "aarch64-darwin"; colors = (import ./colorscheme/gruvbox-dark).dark;
}; };
});
# Programs that can be run by calling this flake # Programs that can be run by calling this flake
apps = forAllSystems (system: apps = forAllSystems (system:
@ -207,6 +208,8 @@
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ]; buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
}; };
test = pkgs.mkShell { buildInputs = with pkgs; [ age ]; };
# Used for cloud and systems development and administration # Used for cloud and systems development and administration
devops = pkgs.mkShell { devops = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [

View File

@ -1,4 +1,4 @@
{ inputs, system, globals, overlays, ... }: { inputs, globals, ... }:
with inputs; with inputs;
@ -8,7 +8,6 @@ nixos-generators.nixosGenerate {
modules = [ modules = [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
nixpkgs.overlays = overlays;
user = globals.user; user = globals.user;
fullName = globals.fullName; fullName = globals.fullName;
dotfilesRepo = globals.dotfilesRepo; dotfilesRepo = globals.dotfilesRepo;
@ -16,7 +15,7 @@ nixos-generators.nixosGenerate {
gitEmail = globals.gitEmail; gitEmail = globals.gitEmail;
networking.hostName = "sheep"; networking.hostName = "sheep";
gui.enable = false; gui.enable = false;
theme.colors = (import ../../colorscheme/gruvbox).dark; colorscheme = (import ../colorscheme/gruvbox);
passwordHash = null; passwordHash = null;
publicKey = publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
@ -25,7 +24,7 @@ nixos-generators.nixosGenerate {
} }
../../modules/common ../../modules/common
../../modules/nixos ../../modules/nixos
../../modules/nixos/services/sshd.nix ../../modules/common/services/sshd.nix
] ++ [ ] ++ [
# Required to fix diskSize errors during build # Required to fix diskSize errors during build
({ ... }: { amazonImage.sizeMB = 16 * 1024; }) ({ ... }: { amazonImage.sizeMB = 16 * 1024; })

View File

@ -34,7 +34,9 @@ nixos-generators.nixosGenerate {
curl curl
(import ../../modules/common/neovim/package { (import ../../modules/common/neovim/package {
inherit pkgs; inherit pkgs;
colors = (import ../../colorscheme/gruvbox).dark; # colors = import ../../colorscheme/gruvbox.dark.neovimConfig {
# inherit pkgs;
# };
}) })
]; ];
nix.extraOptions = '' nix.extraOptions = ''

View File

@ -28,6 +28,10 @@ nixpkgs.lib.nixosSystem {
# FQDNs for various services # FQDNs for various services
networking.hostName = "flame"; networking.hostName = "flame";
bookServer = "books.masu.rs";
# streamServer = "stream.masu.rs";
nextcloudServer = "cloud.masu.rs";
transmissionServer = "download.masu.rs";
metricsServer = "metrics.masu.rs"; metricsServer = "metrics.masu.rs";
vaultwardenServer = "vault.masu.rs"; vaultwardenServer = "vault.masu.rs";
giteaServer = "git.masu.rs"; giteaServer = "git.masu.rs";
@ -43,40 +47,40 @@ nixpkgs.lib.nixosSystem {
accessKeyId = "0026b0e73b2e2c80000000005"; accessKeyId = "0026b0e73b2e2c80000000005";
}; };
# # Grant access to Jellyfin directories from Nextcloud # Grant access to Jellyfin directories from Nextcloud
# users.users.nextcloud.extraGroups = [ "jellyfin" ]; users.users.nextcloud.extraGroups = [ "jellyfin" ];
# # Wireguard config for Transmission # Wireguard config for Transmission
# wireguard.enable = true; wireguard.enable = true;
# networking.wireguard.interfaces.wg0 = { networking.wireguard.interfaces.wg0 = {
#
# # The local IPs for this machine within the Wireguard network
# # Any inbound traffic bound for these IPs should be kept on localhost
# ips = [ "10.66.13.200/32" "fc00:bbbb:bbbb:bb01::3:dc7/128" ];
#
# peers = [{
#
# # Identity of Wireguard target peer (VPN)
# publicKey = "bOOP5lIjqCdDx5t+mP/kEcSbHS4cZqE0rMlBI178lyY=";
#
# # The public internet address of the target peer
# endpoint = "86.106.143.132:51820";
#
# # Which outgoing IP ranges should be sent through Wireguard
# allowedIPs = [ "0.0.0.0/0" "::0/0" ];
#
# # Send heartbeat signal within the network
# persistentKeepalive = 25;
#
# }];
#
# };
# # VPN port forwarding # The local IPs for this machine within the Wireguard network
# services.transmission.settings.peer-port = 57599; # Any inbound traffic bound for these IPs should be kept on localhost
ips = [ "10.66.13.200/32" "fc00:bbbb:bbbb:bb01::3:dc7/128" ];
# # Grant access to Transmission directories from Jellyfin peers = [{
# users.users.jellyfin.extraGroups = [ "transmission" ];
# Identity of Wireguard target peer (VPN)
publicKey = "bOOP5lIjqCdDx5t+mP/kEcSbHS4cZqE0rMlBI178lyY=";
# The public internet address of the target peer
endpoint = "86.106.143.132:51820";
# Which outgoing IP ranges should be sent through Wireguard
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
# Send heartbeat signal within the network
persistentKeepalive = 25;
}];
};
# VPN port forwarding
services.transmission.settings.peer-port = 57599;
# Grant access to Transmission directories from Jellyfin
users.users.jellyfin.extraGroups = [ "transmission" ];
# Proxy traffic with Cloudflare # Proxy traffic with Cloudflare
cloudflare.enable = true; cloudflare.enable = true;

View File

@ -39,12 +39,10 @@ nixpkgs.lib.nixosSystem {
nixpkgs.overlays = overlays; nixpkgs.overlays = overlays;
neovim.enable = true; neovim.enable = true;
caddy.enable = true; caddy.enable = true;
cloudflare.enable = true;
streamServer = "stream.masu.rs"; streamServer = "stream.masu.rs";
nextcloudServer = "cloud.masu.rs"; nextcloudServer = "cloud.masu.rs";
bookServer = "books.masu.rs"; bookServer = "books.masu.rs";
arrServer = "download.masu.rs"; arrServer = "download.masu.rs";
transmissionServer = "download.masu.rs";
samba.enable = true; samba.enable = true;
backup.s3 = { backup.s3 = {

View File

@ -11,10 +11,6 @@
config = lib.mkIf (config.streamServer != null) { config = lib.mkIf (config.streamServer != null) {
services.jellyfin.enable = true; services.jellyfin.enable = true;
users.users.jellyfin = {
isSystemUser = true;
group = "jellyfin";
};
caddy.routes = [{ caddy.routes = [{
match = [{ host = [ config.streamServer ]; }]; match = [{ host = [ config.streamServer ]; }];

View File

@ -14,7 +14,7 @@
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud26; # Required to specify package = pkgs.nextcloud25; # Required to specify
datadir = "/data/nextcloud"; datadir = "/data/nextcloud";
https = true; https = true;
hostName = "localhost"; hostName = "localhost";

View File

@ -38,7 +38,7 @@ in {
}; };
secrets.vaultwarden = { secrets.vaultwarden = {
source = ../../../private/vaultwarden.age; source = ../../private/vaultwarden.age;
dest = "${config.secretsDirectory}/vaultwarden"; dest = "${config.secretsDirectory}/vaultwarden";
owner = "vaultwarden"; owner = "vaultwarden";
group = "vaultwarden"; group = "vaultwarden";