mirror of
https://github.com/nmasur/dotfiles
synced 2025-02-21 20:22:02 +00:00
fix warnings for flame
This commit is contained in:
parent
1d4ad5b0af
commit
7007567207
27
flake.nix
27
flake.nix
@ -228,24 +228,27 @@
|
|||||||
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
||||||
hostnames = {
|
hostnames = {
|
||||||
audiobooks = "read.${baseName}";
|
audiobooks = "read.${baseName}";
|
||||||
|
books = "books.${baseName}";
|
||||||
budget = "money.${baseName}";
|
budget = "money.${baseName}";
|
||||||
|
content = "cloud.${baseName}";
|
||||||
|
download = "download.${baseName}";
|
||||||
files = "files.${baseName}";
|
files = "files.${baseName}";
|
||||||
git = "git.${baseName}";
|
git = "git.${baseName}";
|
||||||
|
imap = "imap.purelymail.com";
|
||||||
influxdb = "influxdb.${baseName}";
|
influxdb = "influxdb.${baseName}";
|
||||||
irc = "irc.${baseName}";
|
irc = "irc.${baseName}";
|
||||||
|
mail = "noahmasur.com";
|
||||||
metrics = "metrics.${baseName}";
|
metrics = "metrics.${baseName}";
|
||||||
minecraft = "minecraft.${baseName}";
|
minecraft = "minecraft.${baseName}";
|
||||||
n8n = "n8n.${baseName}";
|
n8n = "n8n.${baseName}";
|
||||||
notifications = "ntfy.${baseName}";
|
notifications = "ntfy.${baseName}";
|
||||||
prometheus = "prom.${baseName}";
|
|
||||||
paperless = "paper.${baseName}";
|
paperless = "paper.${baseName}";
|
||||||
photos = "photos.${baseName}";
|
photos = "photos.${baseName}";
|
||||||
|
prometheus = "prom.${baseName}";
|
||||||
secrets = "vault.${baseName}";
|
secrets = "vault.${baseName}";
|
||||||
stream = "stream.${baseName}";
|
smtp = "smtp.purelymail.com";
|
||||||
content = "cloud.${baseName}";
|
|
||||||
books = "books.${baseName}";
|
|
||||||
download = "download.${baseName}";
|
|
||||||
status = "status.${baseName}";
|
status = "status.${baseName}";
|
||||||
|
stream = "stream.${baseName}";
|
||||||
transmission = "transmission.${baseName}";
|
transmission = "transmission.${baseName}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -273,7 +276,13 @@
|
|||||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
|
||||||
# { system -> pkgs }
|
# { system -> pkgs }
|
||||||
pkgsBySystem = forAllSystems (system: import nixpkgs { inherit system overlays; });
|
pkgsBySystem = forAllSystems (
|
||||||
|
system:
|
||||||
|
import nixpkgs {
|
||||||
|
inherit system overlays;
|
||||||
|
config.permittedInsecurePackages = [ "litestream-0.3.13" ];
|
||||||
|
}
|
||||||
|
);
|
||||||
# stablePkgsBySystem = forAllSystems (system: import nixpkgs { inherit system overlays; });
|
# stablePkgsBySystem = forAllSystems (system: import nixpkgs { inherit system overlays; });
|
||||||
|
|
||||||
buildHome =
|
buildHome =
|
||||||
@ -295,9 +304,9 @@
|
|||||||
inputs.wsl.nixosModules.wsl
|
inputs.wsl.nixosModules.wsl
|
||||||
./platforms/nixos
|
./platforms/nixos
|
||||||
];
|
];
|
||||||
# specialArgs = {
|
specialArgs = {
|
||||||
# wallpapers = inputs.wallpapers;
|
hostnames = globals.hostnames;
|
||||||
# };
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
buildDarwin =
|
buildDarwin =
|
||||||
|
@ -11,23 +11,23 @@ rec {
|
|||||||
nmasur.settings = {
|
nmasur.settings = {
|
||||||
username = "noah";
|
username = "noah";
|
||||||
fullName = "Noah Masur";
|
fullName = "Noah Masur";
|
||||||
hostnames =
|
# hostnames =
|
||||||
let
|
# let
|
||||||
baseName = "masu.rs";
|
# baseName = "masu.rs";
|
||||||
in
|
# in
|
||||||
{
|
# {
|
||||||
budget = "money.${baseName}";
|
# budget = "money.${baseName}";
|
||||||
git = "git.${baseName}";
|
# git = "git.${baseName}";
|
||||||
influxdb = "influxdb.${baseName}";
|
# influxdb = "influxdb.${baseName}";
|
||||||
irc = "irc.${baseName}";
|
# irc = "irc.${baseName}";
|
||||||
metrics = "metrics.${baseName}";
|
# metrics = "metrics.${baseName}";
|
||||||
minecraft = "minecraft.${baseName}";
|
# minecraft = "minecraft.${baseName}";
|
||||||
n8n = "n8n.${baseName}";
|
# n8n = "n8n.${baseName}";
|
||||||
notifications = "ntfy.${baseName}";
|
# notifications = "ntfy.${baseName}";
|
||||||
prometheus = "prom.${baseName}";
|
# prometheus = "prom.${baseName}";
|
||||||
secrets = "vault.${baseName}";
|
# secrets = "vault.${baseName}";
|
||||||
status = "status.${baseName}";
|
# status = "status.${baseName}";
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
nmasur.profiles = {
|
nmasur.profiles = {
|
||||||
|
@ -7,21 +7,21 @@ rec {
|
|||||||
nmasur.settings = {
|
nmasur.settings = {
|
||||||
username = "noah";
|
username = "noah";
|
||||||
fullName = "Noah Masur";
|
fullName = "Noah Masur";
|
||||||
hostnames =
|
# hostnames =
|
||||||
let
|
# let
|
||||||
baseName = "masu.rs";
|
# baseName = "masu.rs";
|
||||||
in
|
# in
|
||||||
{
|
# {
|
||||||
audiobooks = "read.${baseName}";
|
# audiobooks = "read.${baseName}";
|
||||||
books = "books.${baseName}";
|
# books = "books.${baseName}";
|
||||||
content = "cloud.${baseName}";
|
# content = "cloud.${baseName}";
|
||||||
download = "download.${baseName}";
|
# download = "download.${baseName}";
|
||||||
files = "files.${baseName}";
|
# files = "files.${baseName}";
|
||||||
paperless = "paper.${baseName}";
|
# paperless = "paper.${baseName}";
|
||||||
photos = "photos.${baseName}";
|
# photos = "photos.${baseName}";
|
||||||
prometheus = "prom.${baseName}";
|
# prometheus = "prom.${baseName}";
|
||||||
stream = "stream.${baseName}";
|
# stream = "stream.${baseName}";
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
nmasur.profiles = {
|
nmasur.profiles = {
|
||||||
|
@ -8,13 +8,13 @@ rec {
|
|||||||
nmasur.settings = {
|
nmasur.settings = {
|
||||||
username = "noah";
|
username = "noah";
|
||||||
fullName = "Noah Masur";
|
fullName = "Noah Masur";
|
||||||
hostnames =
|
# hostnames =
|
||||||
let
|
# let
|
||||||
baseName = "masu.rs";
|
# baseName = "masu.rs";
|
||||||
in
|
# in
|
||||||
{
|
# {
|
||||||
prometheus = "prom.${baseName}";
|
# prometheus = "prom.${baseName}";
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
nmasur.profiles = {
|
nmasur.profiles = {
|
||||||
|
@ -10,7 +10,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
options.nmasur.preset.programs.notes = {
|
options.nmasur.presets.programs.notes = {
|
||||||
enable = lib.mkEnableOption "Manage notes repository";
|
enable = lib.mkEnableOption "Manage notes repository";
|
||||||
repo = lib.mkOption {
|
repo = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
@ -13,14 +13,19 @@ in
|
|||||||
|
|
||||||
options.nmasur.presets.programs.ripgrep = {
|
options.nmasur.presets.programs.ripgrep = {
|
||||||
enable = lib.mkEnableOption "Ripgrep search tool";
|
enable = lib.mkEnableOption "Ripgrep search tool";
|
||||||
ignorePatterns = ''
|
ignorePatterns = lib.mkOption {
|
||||||
!.env*
|
type = lib.types.lines;
|
||||||
!.github/
|
description = "Patterns to ignore with ripgrep";
|
||||||
!.gitignore
|
default = ''
|
||||||
!*.tfvars
|
!.env*
|
||||||
.terraform/
|
!.github/
|
||||||
.target/
|
!.gitignore
|
||||||
/Library/'';
|
!*.tfvars
|
||||||
|
.terraform/
|
||||||
|
.target/
|
||||||
|
/Library/
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
colors = lib.mkOption {
|
colors = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
description = "Base16 color scheme.";
|
description = "Base16 color scheme.";
|
||||||
default = (import ../colorscheme/gruvbox).dark;
|
default = (import ../../colorscheme/gruvbox).dark;
|
||||||
};
|
};
|
||||||
mode = lib.mkOption {
|
mode = lib.mkOption {
|
||||||
type = lib.types.enum [
|
type = lib.types.enum [
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
hostnames,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -16,10 +17,12 @@ in
|
|||||||
host = lib.mkOption {
|
host = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Hostname for SMTP server";
|
description = "Hostname for SMTP server";
|
||||||
|
default = hostnames.smtp;
|
||||||
};
|
};
|
||||||
domain = lib.mkOption {
|
domain = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Domain name for SMTP email";
|
description = "Domain name for SMTP email";
|
||||||
|
default = hostnames.mail;
|
||||||
};
|
};
|
||||||
user = lib.mkOption {
|
user = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
@ -41,7 +41,7 @@ in
|
|||||||
user = "${toString (builtins.toString config.users.users.actualbudget.uid)}";
|
user = "${toString (builtins.toString config.users.users.actualbudget.uid)}";
|
||||||
pull = "missing";
|
pull = "missing";
|
||||||
privileged = false;
|
privileged = false;
|
||||||
ports = [ "127.0.0.1:${builtins.toString config.services.actualbudget.port}:5006" ];
|
ports = [ "127.0.0.1:${builtins.toString cfg.port}:5006" ];
|
||||||
networks = [ ];
|
networks = [ ];
|
||||||
log-driver = "journald";
|
log-driver = "journald";
|
||||||
labels = {
|
labels = {
|
||||||
@ -65,7 +65,7 @@ in
|
|||||||
handle = [
|
handle = [
|
||||||
{
|
{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [ { dial = "localhost:${builtins.toString config.services.actualbudget.port}"; } ];
|
upstreams = [ { dial = "localhost:${builtins.toString cfg.port}"; } ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ in
|
|||||||
|
|
||||||
# Allow Grafana to connect to email service
|
# Allow Grafana to connect to email service
|
||||||
secrets.mailpass-grafana = {
|
secrets.mailpass-grafana = {
|
||||||
source = ../../../private/mailpass-grafana.age;
|
source = ../../../../../../private/mailpass-grafana.age;
|
||||||
dest = "${config.secretsDirectory}/mailpass-grafana";
|
dest = "${config.secretsDirectory}/mailpass-grafana";
|
||||||
owner = "grafana";
|
owner = "grafana";
|
||||||
group = "grafana";
|
group = "grafana";
|
||||||
|
@ -33,7 +33,7 @@ in
|
|||||||
|
|
||||||
# Create credentials file for InfluxDB admin
|
# Create credentials file for InfluxDB admin
|
||||||
secrets.influxdb2Password = lib.mkIf config.services.influxdb2.enable {
|
secrets.influxdb2Password = lib.mkIf config.services.influxdb2.enable {
|
||||||
source = ../../../private/influxdb2-password.age;
|
source = ../../../../../../private/influxdb2-password.age;
|
||||||
dest = "${config.secretsDirectory}/influxdb2-password";
|
dest = "${config.secretsDirectory}/influxdb2-password";
|
||||||
owner = "influxdb2";
|
owner = "influxdb2";
|
||||||
group = "influxdb2";
|
group = "influxdb2";
|
||||||
@ -44,7 +44,7 @@ in
|
|||||||
before = [ "influxdb2.service" ];
|
before = [ "influxdb2.service" ];
|
||||||
};
|
};
|
||||||
secrets.influxdb2Token = lib.mkIf config.services.influxdb2.enable {
|
secrets.influxdb2Token = lib.mkIf config.services.influxdb2.enable {
|
||||||
source = ../../../private/influxdb2-token.age;
|
source = ../../../../../../private/influxdb2-token.age;
|
||||||
dest = "${config.secretsDirectory}/influxdb2-token";
|
dest = "${config.secretsDirectory}/influxdb2-token";
|
||||||
owner = "influxdb2";
|
owner = "influxdb2";
|
||||||
group = "influxdb2";
|
group = "influxdb2";
|
||||||
|
@ -55,7 +55,7 @@ in
|
|||||||
systemctl status $SERVICE_ID >> $TEMPFILE
|
systemctl status $SERVICE_ID >> $TEMPFILE
|
||||||
set -e
|
set -e
|
||||||
${lib.getExe pkgs.msmtp} \
|
${lib.getExe pkgs.msmtp} \
|
||||||
--file=${config.home-manager.users.${username}.xdg.configDir}/msmtp/config \
|
--file=${config.home-manager.users.${username}.xdg.configHome}/msmtp/config \
|
||||||
--account=system \
|
--account=system \
|
||||||
${address} < $TEMPFILE
|
${address} < $TEMPFILE
|
||||||
'';
|
'';
|
||||||
|
@ -51,7 +51,7 @@ in
|
|||||||
services.cloudflare-dyndns.domains = [ hostnames.paperless ];
|
services.cloudflare-dyndns.domains = [ hostnames.paperless ];
|
||||||
|
|
||||||
secrets.paperless = {
|
secrets.paperless = {
|
||||||
source = ../../../private/prometheus.age;
|
source = ../../../../../../private/prometheus.age;
|
||||||
dest = "${config.secretsDirectory}/paperless";
|
dest = "${config.secretsDirectory}/paperless";
|
||||||
owner = "paperless";
|
owner = "paperless";
|
||||||
group = "paperless";
|
group = "paperless";
|
||||||
|
@ -38,7 +38,7 @@ in
|
|||||||
|
|
||||||
# Create credentials file for remote Prometheus push
|
# Create credentials file for remote Prometheus push
|
||||||
secrets.prometheus = {
|
secrets.prometheus = {
|
||||||
source = ../../../private/prometheus.age;
|
source = ../../../../../../private/prometheus.age;
|
||||||
dest = "${config.secretsDirectory}/prometheus";
|
dest = "${config.secretsDirectory}/prometheus";
|
||||||
owner = "prometheus";
|
owner = "prometheus";
|
||||||
group = "prometheus";
|
group = "prometheus";
|
||||||
|
@ -43,7 +43,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";
|
||||||
@ -94,7 +94,9 @@ in
|
|||||||
{
|
{
|
||||||
path = "${vaultwardenPath}/db.sqlite3";
|
path = "${vaultwardenPath}/db.sqlite3";
|
||||||
replicas = [
|
replicas = [
|
||||||
{ url = "s3://${config.backup.s3.bucket}.${config.backup.s3.endpoint}/vaultwarden"; }
|
{
|
||||||
|
url = "s3://${config.nmasur.presets.services.litestream.s3.bucket}.${config.nmasur.presets.services.litestream.s3.endpoint}/vaultwarden";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -119,7 +121,7 @@ in
|
|||||||
# Backup other Vaultwarden data to object storage
|
# Backup other Vaultwarden data to object storage
|
||||||
systemd.services.vaultwarden-backup = lib.mkIf config.nmasur.presets.services.litestream.enable {
|
systemd.services.vaultwarden-backup = lib.mkIf config.nmasur.presets.services.litestream.enable {
|
||||||
description = "Backup Vaultwarden files";
|
description = "Backup Vaultwarden files";
|
||||||
environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
|
environment.AWS_ACCESS_KEY_ID = config.nmasur.presets.services.litestream.s3.accessKeyId;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
User = "vaultwarden";
|
User = "vaultwarden";
|
||||||
@ -129,8 +131,8 @@ in
|
|||||||
script = ''
|
script = ''
|
||||||
${pkgs.awscli2}/bin/aws s3 sync \
|
${pkgs.awscli2}/bin/aws s3 sync \
|
||||||
${vaultwardenPath}/ \
|
${vaultwardenPath}/ \
|
||||||
s3://${config.backup.s3.bucket}/vaultwarden/ \
|
s3://${config.nmasur.presets.services.litestream.s3.bucket}/vaultwarden/ \
|
||||||
--endpoint-url=https://${config.backup.s3.endpoint} \
|
--endpoint-url=https://${config.nmasur.presets.services.litestream.s3.endpoint} \
|
||||||
--exclude "*db.sqlite3*" \
|
--exclude "*db.sqlite3*" \
|
||||||
--exclude ".db.sqlite3*"
|
--exclude ".db.sqlite3*"
|
||||||
'';
|
'';
|
||||||
|
@ -71,7 +71,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
secrets.vmauth = lib.mkIf config.services.victoriametrics.enable {
|
secrets.vmauth = lib.mkIf config.services.victoriametrics.enable {
|
||||||
source = ../../../private/prometheus.age;
|
source = ../../../../../../private/prometheus.age;
|
||||||
dest = "${config.secretsDirectory}/vmauth";
|
dest = "${config.secretsDirectory}/vmauth";
|
||||||
prefix = "PASSWORD=";
|
prefix = "PASSWORD=";
|
||||||
};
|
};
|
||||||
|
@ -47,7 +47,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
secrets.vmagent = {
|
secrets.vmagent = {
|
||||||
source = ../../../private/prometheus.age;
|
source = ../../../../../../private/prometheus.age;
|
||||||
dest = "${config.secretsDirectory}/vmagent";
|
dest = "${config.secretsDirectory}/vmagent";
|
||||||
};
|
};
|
||||||
systemd.services.vmagent-secret = lib.mkIf config.services.vmagent.enable {
|
systemd.services.vmagent-secret = lib.mkIf config.services.vmagent.enable {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, ... }:
|
{ lib, hostnames, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options.nmasur.settings = {
|
options.nmasur.settings = {
|
||||||
@ -13,7 +13,7 @@
|
|||||||
hostnames = lib.mkOption {
|
hostnames = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.str;
|
type = lib.types.attrsOf lib.types.str;
|
||||||
description = "Map of service names to FQDNs";
|
description = "Map of service names to FQDNs";
|
||||||
default = { };
|
default = hostnames;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user