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 ipcalc # Make IP network calculations
(mkScript { (mkScript {
name = "ocr"; name = "ocr";
file = ../shell/bash/scripts/ocr.sh; file = ../modules/shell/bash/scripts/ocr.sh;
env = [ tesseract ]; env = [ tesseract ];
}) })
]; ];
+6 -3
View File
@@ -7,7 +7,11 @@ nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { }; specialArgs = { };
modules = [ modules = [
./hardware-configuration.nix
../../modules
../../nixos
globals globals
wsl.nixosModules.wsl
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
physical = true; physical = true;
@@ -24,6 +28,7 @@ nixpkgs.lib.nixosSystem {
wallpaper = "${wallpapers}/gruvbox/road.jpg"; wallpaper = "${wallpapers}/gruvbox/road.jpg";
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark"; gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512; passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
wsl.enable = false;
media.enable = true; media.enable = true;
firefox.enable = true; firefox.enable = true;
@@ -32,6 +37,7 @@ nixpkgs.lib.nixosSystem {
discord.enable = true; discord.enable = true;
nautilus.enable = true; nautilus.enable = true;
obsidian.enable = true; obsidian.enable = true;
mail.enable = true;
mail.aerc.enable = true; mail.aerc.enable = true;
mail.himalaya.enable = true; mail.himalaya.enable = true;
gaming.enable = true; gaming.enable = true;
@@ -42,8 +48,5 @@ nixpkgs.lib.nixosSystem {
nixlang.enable = true; nixlang.enable = true;
dotfiles.enable = true; dotfiles.enable = true;
} }
./hardware-configuration.nix
../../modules
]; ];
} }
+3 -1
View File
@@ -8,6 +8,7 @@ darwin.lib.darwinSystem {
specialArgs = { }; specialArgs = { };
modules = [ modules = [
../../modules ../../modules
../../darwin
(globals // { (globals // {
user = "Noah.Masur"; user = "Noah.Masur";
gitName = "Noah-Masur_1701"; gitName = "Noah-Masur_1701";
@@ -26,7 +27,8 @@ darwin.lib.darwinSystem {
nixpkgs.overlays = [ firefox-darwin.overlay ] ++ overlays; nixpkgs.overlays = [ firefox-darwin.overlay ] ++ overlays;
# Set registry to flake packages, used for nix X commands # Set registry to flake packages, used for nix X commands
nix.registry.nixpkgs.flake = nixpkgs; nix.registry.nixpkgs.flake = nixpkgs;
neovim.enable = true;
mail.enable = true;
mail.aerc.enable = true; mail.aerc.enable = true;
mail.himalaya.enable = true; mail.himalaya.enable = true;
kitty.enable = true; kitty.enable = true;
+7
View File
@@ -13,13 +13,17 @@ nixpkgs.lib.nixosSystem {
modules = [ modules = [
./hardware-configuration.nix ./hardware-configuration.nix
../../modules ../../modules
../../nixos
(removeAttrs globals [ "mail.server" ]) (removeAttrs globals [ "mail.server" ])
wsl.nixosModules.wsl
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
server = true; server = true;
gui.enable = false; gui.enable = false;
theme = { colors = (import ../../colorscheme/gruvbox).dark; }; theme = { colors = (import ../../colorscheme/gruvbox).dark; };
nixpkgs.overlays = overlays; nixpkgs.overlays = overlays;
wsl.enable = false;
caddy.enable = true;
# FQDNs for various services # FQDNs for various services
networking.hostName = "oracle"; networking.hostName = "oracle";
@@ -46,6 +50,7 @@ nixpkgs.lib.nixosSystem {
users.users.nextcloud.extraGroups = [ "jellyfin" ]; users.users.nextcloud.extraGroups = [ "jellyfin" ];
# Wireguard config for Transmission # Wireguard config for Transmission
wireguard.enable = true;
networking.wireguard.interfaces.wg0 = { networking.wireguard.interfaces.wg0 = {
# The local IPs for this machine within the Wireguard network # The local IPs for this machine within the Wireguard network
@@ -85,6 +90,8 @@ nixpkgs.lib.nixosSystem {
# Clone dotfiles # Clone dotfiles
dotfiles.enable = true; dotfiles.enable = true;
neovim.enable = true;
} }
]; ];
} }
+3 -1
View File
@@ -7,10 +7,11 @@ nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { }; specialArgs = { };
modules = [ modules = [
../../modules
../../nixos
globals globals
wsl.nixosModules.wsl wsl.nixosModules.wsl
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
../../modules
{ {
networking.hostName = "wsl"; networking.hostName = "wsl";
# Set registry to flake packages, used for nix X commands # 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 false; # Including Windows PATH will slow down Neovim command mode
}; };
mail.enable = true;
mail.aerc.enable = true; mail.aerc.enable = true;
mail.himalaya.enable = true; mail.himalaya.enable = true;
dotfiles.enable = true; dotfiles.enable = true;
-1
View File
@@ -3,7 +3,6 @@
imports = [ imports = [
./1password.nix ./1password.nix
./alacritty.nix ./alacritty.nix
./calibre.nix
./discord.nix ./discord.nix
./firefox.nix ./firefox.nix
./kitty.nix ./kitty.nix
+2 -15
View File
@@ -1,20 +1,7 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
imports = [ imports =
./applications [ ./applications ./mail ./neovim ./programming ./repositories ./shell ];
./darwin
./gaming
./graphical
./hardware
./mail
./neovim
./nixos
./programming
./repositories
./services
./shell
./wsl
];
options = { options = {
user = lib.mkOption { user = lib.mkOption {
+2 -1
View File
@@ -3,6 +3,7 @@
imports = [ ./himalaya.nix ./aerc.nix ]; imports = [ ./himalaya.nix ./aerc.nix ];
options = { options = {
mail.enable = lib.mkEnableOption "Mail service.";
mail.user = lib.mkOption { mail.user = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "User name for the email address."; 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} = { home-manager.users.${config.user} = {
programs.mbsync = { enable = true; }; 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}"; 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. # Enable the X11 windowing system.
services.xserver = { services.xserver = {
File renamed without changes.
File renamed without changes.
@@ -7,6 +7,7 @@
./monitors.nix ./monitors.nix
./mouse.nix ./mouse.nix
./networking.nix ./networking.nix
./server.nix
./sleep.nix ./sleep.nix
./wifi.nix ./wifi.nix
]; ];
File renamed without changes.
@@ -1,8 +1,5 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
# Timezone required for Redshift schedule
imports = [ ../nixos/timezone.nix ];
config = config =
lib.mkIf (config.gui.enable && config.physical && pkgs.stdenv.isLinux) { 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 = { systemd.services.litestream = {
after = [ "backup-secret.service" ]; after = [ "backup-secret.service" ];
requires = [ "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 # # Backup library to object storage
# services.restic.backups.calibre = { # services.restic.backups.calibre = {
# user = "calibre-web"; # user = "calibre-web";
# repository = # repository =
# "s3://${config.backupS3.endpoint}/${config.backupS3.bucket}/calibre"; # "s3://${config.backup.s3.endpoint}/${config.backup.s3.bucket}/calibre";
# paths = [ # paths = [
# "/var/books" # "/var/books"
# "/var/lib/calibre-web/app.db" # "/var/lib/calibre-web/app.db"
@@ -59,7 +59,7 @@
# ]; # ];
# initialize = true; # initialize = true;
# timerConfig = { OnCalendar = "00:05:00"; }; # 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 let libraryPath = "/var/lib/calibre-web"; # Default location
in { in {
description = "Backup Calibre data"; description = "Backup Calibre data";
environment.AWS_ACCESS_KEY_ID = config.backupS3.accessKeyId; environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
User = "calibre-web"; User = "calibre-web";
@@ -63,8 +63,8 @@
script = '' script = ''
${pkgs.awscli2}/bin/aws s3 sync \ ${pkgs.awscli2}/bin/aws s3 sync \
${libraryPath}/ \ ${libraryPath}/ \
s3://${config.backupS3.bucket}/calibre/ \ s3://${config.backup.s3.bucket}/calibre/ \
--endpoint-url=https://${config.backupS3.endpoint} --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"; path = "${giteaPath}/data/gitea.db";
replicas = [{ replicas = [{
url = 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 = { options = {
n8nServer = lib.mkOption { n8nServer = lib.mkOption {
type = lib.types.str; type = lib.types.nullOr lib.types.str;
description = "Hostname for n8n automation"; description = "Hostname for n8n automation";
default = null; default = null;
}; };
File renamed without changes.
@@ -69,7 +69,7 @@
path = "${config.services.nextcloud.datadir}/data/nextcloud.db"; path = "${config.services.nextcloud.datadir}/data/nextcloud.db";
replicas = [{ replicas = [{
url = 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"; path = "${vaultwardenPath}/db.sqlite3";
replicas = [{ replicas = [{
url = 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 # Backup other Vaultwarden data to object storage
systemd.services.vaultwarden-backup = { systemd.services.vaultwarden-backup = {
description = "Backup Vaultwarden files"; description = "Backup Vaultwarden files";
environment.AWS_ACCESS_KEY_ID = config.backupS3.accessKeyId; environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
User = "vaultwarden"; User = "vaultwarden";
@@ -111,8 +111,8 @@ in {
script = '' script = ''
${pkgs.awscli2}/bin/aws s3 sync \ ${pkgs.awscli2}/bin/aws s3 sync \
${vaultwardenPath}/ \ ${vaultwardenPath}/ \
s3://${config.backupS3.bucket}/vaultwarden/ \ s3://${config.backup.s3.bucket}/vaultwarden/ \
--endpoint-url=https://${config.backupS3.endpoint} \ --endpoint-url=https://${config.backup.s3.endpoint} \
--exclude "*db.sqlite3*" \ --exclude "*db.sqlite3*" \
--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.