4 Commits
Author SHA1 Message Date
Noah Masur 0bc8a233d8 enable missing neovim for macbook 2022-12-21 17:48:53 -07:00
Noah Masur 524a5aa347 enable missing configs for oracle 2022-12-22 00:47:25 +00:00
Noah Masur b4ddb149cc fix: bad references for server linux 2022-12-22 00:31:25 +00:00
Noah Masur d021baa1bb split nixos from darwin
required because they don't share all attributes
2022-12-21 17:07:58 -07:00
80 changed files with 57 additions and 40 deletions

No files matched your search

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -34,7 +34,7 @@ in {
ipcalc # Make IP network calculations
(mkScript {
name = "ocr";
file = ../shell/bash/scripts/ocr.sh;
file = ../modules/shell/bash/scripts/ocr.sh;
env = [ tesseract ];
})
];
+6 -3
View File
@@ -7,7 +7,11 @@ nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { };
modules = [
./hardware-configuration.nix
../../modules
../../nixos
globals
wsl.nixosModules.wsl
home-manager.nixosModules.home-manager
{
physical = true;
@@ -24,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;
@@ -32,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;
@@ -42,8 +48,5 @@ nixpkgs.lib.nixosSystem {
nixlang.enable = true;
dotfiles.enable = true;
}
./hardware-configuration.nix
../../modules
];
}
+3 -1
View File
@@ -8,6 +8,7 @@ darwin.lib.darwinSystem {
specialArgs = { };
modules = [
../../modules
../../darwin
(globals // {
user = "Noah.Masur";
gitName = "Noah-Masur_1701";
@@ -26,7 +27,8 @@ darwin.lib.darwinSystem {
nixpkgs.overlays = [ firefox-darwin.overlay ] ++ overlays;
# Set registry to flake packages, used for nix X commands
nix.registry.nixpkgs.flake = nixpkgs;
neovim.enable = true;
mail.enable = true;
mail.aerc.enable = true;
mail.himalaya.enable = true;
kitty.enable = true;
+7
View File
@@ -13,13 +13,17 @@ nixpkgs.lib.nixosSystem {
modules = [
./hardware-configuration.nix
../../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;
caddy.enable = true;
# FQDNs for various services
networking.hostName = "oracle";
@@ -46,6 +50,7 @@ nixpkgs.lib.nixosSystem {
users.users.nextcloud.extraGroups = [ "jellyfin" ];
# Wireguard config for Transmission
wireguard.enable = true;
networking.wireguard.interfaces.wg0 = {
# The local IPs for this machine within the Wireguard network
@@ -85,6 +90,8 @@ nixpkgs.lib.nixosSystem {
# Clone dotfiles
dotfiles.enable = true;
neovim.enable = true;
}
];
}
+3 -1
View File
@@ -7,10 +7,11 @@ nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { };
modules = [
../../modules
../../nixos
globals
wsl.nixosModules.wsl
home-manager.nixosModules.home-manager
../../modules
{
networking.hostName = "wsl";
# Set registry to flake packages, used for nix X commands
@@ -32,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;
-1
View File
@@ -3,7 +3,6 @@
imports = [
./1password.nix
./alacritty.nix
./calibre.nix
./discord.nix
./firefox.nix
./kitty.nix
+2 -15
View File
@@ -1,20 +1,7 @@
{ config, lib, pkgs, ... }: {
imports = [
./applications
./darwin
./gaming
./graphical
./hardware
./mail
./neovim
./nixos
./programming
./repositories
./services
./shell
./wsl
];
imports =
[ ./applications ./mail ./neovim ./programming ./repositories ./shell ];
options = {
user = lib.mkOption {
+2 -1
View File
@@ -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; };
File renamed without changes.
+5
View File
@@ -0,0 +1,5 @@
{ ... }: {
imports = [ ./calibre.nix ];
}
+13
View File
@@ -0,0 +1,13 @@
{ ... }: {
imports = [
./applications
./gaming
./graphical
./hardware
./services
./system
./wsl
];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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 = {
File renamed without changes.
File renamed without changes.
@@ -7,6 +7,7 @@
./monitors.nix
./mouse.nix
./networking.nix
./server.nix
./sleep.nix
./wifi.nix
];
File renamed without changes.
@@ -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) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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;
# };
};
File renamed without changes.
@@ -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}
'';
};
File renamed without changes.
File renamed without changes.
@@ -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";
}];
}];
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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;
};
File renamed without changes.
@@ -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";
}];
}];
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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*"
'';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.