mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 12:15:38 +00:00
fix: bad references for server linux
This commit is contained in:
parent
d021baa1bb
commit
b4ddb149cc
@ -11,6 +11,7 @@ nixpkgs.lib.nixosSystem {
|
||||
../../modules
|
||||
../../nixos
|
||||
globals
|
||||
wsl.nixosModules.wsl
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
physical = true;
|
||||
@ -27,6 +28,7 @@ nixpkgs.lib.nixosSystem {
|
||||
wallpaper = "${wallpapers}/gruvbox/road.jpg";
|
||||
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
|
||||
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
|
||||
wsl.enable = false;
|
||||
|
||||
media.enable = true;
|
||||
firefox.enable = true;
|
||||
@ -35,6 +37,7 @@ nixpkgs.lib.nixosSystem {
|
||||
discord.enable = true;
|
||||
nautilus.enable = true;
|
||||
obsidian.enable = true;
|
||||
mail.enable = true;
|
||||
mail.aerc.enable = true;
|
||||
mail.himalaya.enable = true;
|
||||
gaming.enable = true;
|
||||
|
@ -27,6 +27,7 @@ darwin.lib.darwinSystem {
|
||||
nixpkgs.overlays = [ firefox-darwin.overlay ] ++ overlays;
|
||||
# Set registry to flake packages, used for nix X commands
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
mail.enable = true;
|
||||
mail.aerc.enable = true;
|
||||
mail.himalaya.enable = true;
|
||||
kitty.enable = true;
|
||||
|
@ -15,12 +15,14 @@ nixpkgs.lib.nixosSystem {
|
||||
../../modules
|
||||
../../nixos
|
||||
(removeAttrs globals [ "mail.server" ])
|
||||
wsl.nixosModules.wsl
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
server = true;
|
||||
gui.enable = false;
|
||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||
nixpkgs.overlays = overlays;
|
||||
wsl.enable = false;
|
||||
|
||||
# FQDNs for various services
|
||||
networking.hostName = "oracle";
|
||||
|
@ -7,11 +7,11 @@ nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { };
|
||||
modules = [
|
||||
../../modules
|
||||
../../nixos
|
||||
globals
|
||||
wsl.nixosModules.wsl
|
||||
home-manager.nixosModules.home-manager
|
||||
../../modules
|
||||
../../nixos
|
||||
{
|
||||
networking.hostName = "wsl";
|
||||
# Set registry to flake packages, used for nix X commands
|
||||
@ -33,6 +33,7 @@ nixpkgs.lib.nixosSystem {
|
||||
false; # Including Windows PATH will slow down Neovim command mode
|
||||
};
|
||||
|
||||
mail.enable = true;
|
||||
mail.aerc.enable = true;
|
||||
mail.himalaya.enable = true;
|
||||
dotfiles.enable = true;
|
||||
|
@ -3,6 +3,7 @@
|
||||
imports = [ ./himalaya.nix ./aerc.nix ];
|
||||
|
||||
options = {
|
||||
mail.enable = lib.mkEnableOption "Mail service.";
|
||||
mail.user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "User name for the email address.";
|
||||
@ -14,7 +15,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.mail.user != null && config.mail.server != null) {
|
||||
config = lib.mkIf config.mail.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
programs.mbsync = { enable = true; };
|
||||
|
5
nixos/applications/default.nix
Normal file
5
nixos/applications/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ ... }: {
|
||||
|
||||
imports = [ ./calibre.nix ];
|
||||
|
||||
}
|
@ -21,7 +21,7 @@
|
||||
package = pkgs."${config.gtk.theme.package}";
|
||||
};
|
||||
|
||||
in lib.mkIf (pkgs.stdenv.isLinux && config.gui.enable) {
|
||||
in lib.mkIf config.gui.enable {
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
|
@ -1,8 +1,5 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
# Timezone required for Redshift schedule
|
||||
imports = [ ../nixos/timezone.nix ];
|
||||
|
||||
config =
|
||||
lib.mkIf (config.gui.enable && config.physical && pkgs.stdenv.isLinux) {
|
||||
|
||||
|
@ -44,14 +44,14 @@
|
||||
systemd.services.litestream = {
|
||||
after = [ "backup-secret.service" ];
|
||||
requires = [ "backup-secret.service" ];
|
||||
environment.AWS_ACCESS_KEY_ID = config.backupS3.accessKeyId;
|
||||
environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
|
||||
};
|
||||
|
||||
# # Backup library to object storage
|
||||
# services.restic.backups.calibre = {
|
||||
# user = "calibre-web";
|
||||
# repository =
|
||||
# "s3://${config.backupS3.endpoint}/${config.backupS3.bucket}/calibre";
|
||||
# "s3://${config.backup.s3.endpoint}/${config.backup.s3.bucket}/calibre";
|
||||
# paths = [
|
||||
# "/var/books"
|
||||
# "/var/lib/calibre-web/app.db"
|
||||
@ -59,7 +59,7 @@
|
||||
# ];
|
||||
# initialize = true;
|
||||
# timerConfig = { OnCalendar = "00:05:00"; };
|
||||
# environmentFile = backupS3File;
|
||||
# environmentFile = backup.s3File;
|
||||
# };
|
||||
|
||||
};
|
||||
|
@ -53,7 +53,7 @@
|
||||
let libraryPath = "/var/lib/calibre-web"; # Default location
|
||||
in {
|
||||
description = "Backup Calibre data";
|
||||
environment.AWS_ACCESS_KEY_ID = config.backupS3.accessKeyId;
|
||||
environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "calibre-web";
|
||||
@ -63,8 +63,8 @@
|
||||
script = ''
|
||||
${pkgs.awscli2}/bin/aws s3 sync \
|
||||
${libraryPath}/ \
|
||||
s3://${config.backupS3.bucket}/calibre/ \
|
||||
--endpoint-url=https://${config.backupS3.endpoint}
|
||||
s3://${config.backup.s3.bucket}/calibre/ \
|
||||
--endpoint-url=https://${config.backup.s3.endpoint}
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -75,7 +75,7 @@ in {
|
||||
path = "${giteaPath}/data/gitea.db";
|
||||
replicas = [{
|
||||
url =
|
||||
"s3://${config.backupS3.bucket}.${config.backupS3.endpoint}/gitea";
|
||||
"s3://${config.backup.s3.bucket}.${config.backup.s3.endpoint}/gitea";
|
||||
}];
|
||||
}];
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
options = {
|
||||
n8nServer = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Hostname for n8n automation";
|
||||
default = null;
|
||||
};
|
||||
|
@ -69,7 +69,7 @@
|
||||
path = "${config.services.nextcloud.datadir}/data/nextcloud.db";
|
||||
replicas = [{
|
||||
url =
|
||||
"s3://${config.backupS3.bucket}.${config.backupS3.endpoint}/nextcloud";
|
||||
"s3://${config.backup.s3.bucket}.${config.backup.s3.endpoint}/nextcloud";
|
||||
}];
|
||||
}];
|
||||
};
|
||||
|
@ -77,7 +77,7 @@ in {
|
||||
path = "${vaultwardenPath}/db.sqlite3";
|
||||
replicas = [{
|
||||
url =
|
||||
"s3://${config.backupS3.bucket}.${config.backupS3.endpoint}/vaultwarden";
|
||||
"s3://${config.backup.s3.bucket}.${config.backup.s3.endpoint}/vaultwarden";
|
||||
}];
|
||||
}];
|
||||
};
|
||||
@ -101,7 +101,7 @@ in {
|
||||
# Backup other Vaultwarden data to object storage
|
||||
systemd.services.vaultwarden-backup = {
|
||||
description = "Backup Vaultwarden files";
|
||||
environment.AWS_ACCESS_KEY_ID = config.backupS3.accessKeyId;
|
||||
environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "vaultwarden";
|
||||
@ -111,8 +111,8 @@ in {
|
||||
script = ''
|
||||
${pkgs.awscli2}/bin/aws s3 sync \
|
||||
${vaultwardenPath}/ \
|
||||
s3://${config.backupS3.bucket}/vaultwarden/ \
|
||||
--endpoint-url=https://${config.backupS3.endpoint} \
|
||||
s3://${config.backup.s3.bucket}/vaultwarden/ \
|
||||
--endpoint-url=https://${config.backup.s3.endpoint} \
|
||||
--exclude "*db.sqlite3*" \
|
||||
--exclude ".db.sqlite3*"
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user