chore: init

This commit is contained in:
Nick 2025-10-01 19:51:55 -05:00
commit 1b2c1ea359
891 changed files with 37053 additions and 0 deletions

1
.envrc Executable file
View file

@ -0,0 +1 @@
use flake

4
.gitignore vendored Executable file
View file

@ -0,0 +1,4 @@
.direnv
.vscode
.pre-commit-config.yaml
result

7
.sops.yaml Executable file
View file

@ -0,0 +1,7 @@
keys:
- &user0 age19dpncsdphdt2tmknjs99eghk527pvdrw0m29qjn2z2gg3et5tdtqycqhl0
creation_rules:
- path_regex: secrets/secrets.yaml$
key_groups:
- age:
- *user0

14
.zed/settings.json Executable file
View file

@ -0,0 +1,14 @@
{
"languages": {
"Nix": {
"enable_language_server": true
}
},
"formatter": {
"external": {
"command": "nixfmt",
"arguments": ["-"],
}
},
"format_on_save": "on"
}

67
README.md Executable file
View file

@ -0,0 +1,67 @@
# My NixOS Dotfiles
This is my current multi-system NixOS configuration.
## File Structure
### `lib/`
This defines two helper functions that make it easier to create configurations in the `flake`:
1. `mkHome`: Creates a Home Manager configuration (for managing user-specific settings and packages)
2. `mkLinuxSystem`: Creates a NixOS system configuration (for managing system-wide settings)
Both functions take some modules (configuration files) as input and set up the necessary environment with some default settings, like allowing unfree packages and passing through important variables (inputs, config, etc.).
### `modules/config/`
This defines a configuration schema or template for managing various aspects of the system:
1. `people`: Creates records for user accounts, their SSH keys, emails, etc.
2. `services`: Creates records for various services with their domains, hostnames, SSL certificates, etc.
3. `machines`: Creates records for different devices with their mount points, IP addresses, and storage configurations
4. `aesthetics`: Creates records for visual appearance settings like fonts, colours, and cursor properties
It's essentially creating a structured way to organize abstracted configuration data that is declared in multiple places throughout the system configuration.
### `modules/home/`
This defines home environment configurations for different users across different machines in a multi-user, multi-device setup. It's using NixOS's home-manager functionality to manage user-specific configurations. Essentially, this is a configuration file that determines which software and configurations each user gets on each machine, allowing for personalized but reproducible user environments across the system.
### `modules/nixos/`
This defines a set of NixOS modules that are used to configure different systems. Each system has its own set of module imports that define what features or services are enabled on that system, as well as some shared modules. The file uses a helper function `directoryImport` (imported from ../helpers.nix) to import all the module definitions from the current directory. This allows for modular system configuration where different machines can easily inherit different sets of features and services. These modules are used in the `flake`.
### `parts/`
This defines the development environment configuration for the project, which includes:
1. `devshells`: Creates a default development shell with several development tools.
2. `pre-commit`: Creates pre-commit hooks that run before git commits.
This setup ensures that anyone working on this project has access to the same development tools and follows the same code formatting and commit message standards.
### `profiles/`
This defines NIxOS user configurations and their respective homes. Each profile is designed to be imported into each system configuration via the `flake`, with different settings and tools based on the user's needs and preferences. It also uses `systemd.tmpfiles` to declare custom home folder structures.
### `secrets/`
This contains encrypted secrets and credentials using `sops-nix`. This is a security-sensitive file that should be handled carefully as it contains encrypted credentials for multiple services and systems.
### `systems/`
This defines the system configurations for different machines. Each machine has similar configuration structure but with specific customizations. The system naming schema follows a celestial convention, with desktops being named after planets, laptops after moons, and servers after dwarf planets. The `fileSystems` configurations include helper functions for easily configuring mounts for internal storage, Synology, and samba drives.
### `templates/`
This defines flake-based development environment templates for projects written in different programming languages, such as Elm and Haskell. This setup also makes use of `devshells` and is designed for developers who want to quickly bootstrap projects with a complete development environment using Nix for reproducibility and dependency management.
### `flake.nix`
This defines the core of the NixOS configuration using helper functions from `lib/`, which is organized as a flake-parts-based structure for better modularity:
1. `inputs`: Declares all external dependencies including, such as core Nix components (`nixpkgs`, `flake-parts`, `systems`) and user environment components (`home-manager`, `sops-nix`).
2. `outputs`: Uses flake-parts to organize system configurations for multiple machines (`mars`, `deimos`, `phobos` and `ceres`) and shared modules (`core`, `mantle`, `crust`) imported across systems.
Each system imports specialized modules and user profiles based on its intended purpose and users, creating a flexible but consistent configuration framework across multiple machines.

2255
flake.lock generated Executable file

File diff suppressed because it is too large Load diff

171
flake.nix Executable file
View file

@ -0,0 +1,171 @@
{
description = "Nick's Big Fat Flakey Sausage";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05";
lix = {
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
flake = false;
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
inputs.lix.follows = "lix";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
systems.url = "github:nix-systems/x86_64-linux";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
ngipkgs.url = "github:ngi-nix/ngipkgs";
ghostty = {
url = "github:ghostty-org/ghostty";
};
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks-nix = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
yazi.url = "github:sxyazi/yazi";
helix = {
url = "github:helix-editor/helix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-portal = {
url = "github:hyprwm/xdg-desktop-portal-hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
waybar = {
url = "github:Alexays/Waybar";
inputs.nixpkgs.follows = "nixpkgs";
};
wpaperd = {
url = "github:danyspin97/wpaperd";
inputs.nixpkgs.follows = "nixpkgs";
};
# zed-editor = {
# url = "github:zed-industries/zed";
# inputs.nixpkgs.follows = "nixpkgs";
# };
zen-browser = {
url = "gitlab:InvraNet/zen-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
# nix-comfyui = {
# url = "gitlab:upRootNutrition/nix-comfyui";
# inputs.nixpkgs.follows = "nixpkgs";
# };
upRootNutrition = {
url = "git+ssh://git@gitlab.com/uprootnutrition/website.git";
};
linkpage = {
url = "git+ssh://git@gitlab.com/uprootnutrition/linkpage.git";
};
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.pre-commit-hooks-nix.flakeModule
./lib
./modules
./parts
];
flake =
{ config, ... }:
{
nixosConfigurations = {
mars = inputs.self.lib.mkLinuxSystem [
./systems/mars
./profiles/user0
./profiles/user1
config.nixosModules.mars
config.nixosModules.core
config.nixosModules.mantle
config.nixosModules.crust
inputs.nixos-cosmic.nixosModules.default
inputs.home-manager.nixosModules.home-manager
inputs.lix-module.nixosModules.default
inputs.niri.nixosModules.niri
inputs.nur.modules.nixos.default
inputs.sops-nix.nixosModules.sops
];
deimos = inputs.self.lib.mkLinuxSystem [
./systems/deimos
./profiles/user0
config.nixosModules.deimos
config.nixosModules.core
config.nixosModules.mantle
config.nixosModules.crust
inputs.home-manager.nixosModules.home-manager
inputs.lix-module.nixosModules.default
inputs.niri.nixosModules.niri
inputs.nur.modules.nixos.default
inputs.sops-nix.nixosModules.sops
];
phobos = inputs.self.lib.mkLinuxSystem [
./systems/phobos
./profiles/user0
config.nixosModules.phobos
config.nixosModules.core
config.nixosModules.mantle
config.nixosModules.crust
inputs.home-manager.nixosModules.home-manager
inputs.lix-module.nixosModules.default
inputs.nur.modules.nixos.default
inputs.sops-nix.nixosModules.sops
];
ceres = inputs.self.lib.mkLinuxSystem [
./systems/ceres
./profiles/user0
config.nixosModules.ceres
config.nixosModules.core
config.nixosModules.mantle
inputs.home-manager.nixosModules.home-manager
inputs.lix-module.nixosModules.default
# inputs.ngipkgs.nixosModules."services.peertube"
# inputs.ngipkgs.nixosModules.default
inputs.sops-nix.nixosModules.sops
];
};
templates = {
haskell = {
path = ./templates/haskell;
description = "Haskell Environment";
};
typst = {
path = ./templates/typst;
description = "Typst Environment";
};
website = {
path = ./templates/website;
description = "Elm/Haskell Environment";
};
};
};
systems = import inputs.systems;
};
}

44
lib/default.nix Executable file
View file

@ -0,0 +1,44 @@
{
config,
inputs,
self,
...
}:
{
flake.lib = {
mkHome =
modules: system:
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs {
inherit
system
;
config.allowUnfree = true;
};
extraSpecialArgs = {
inherit
inputs
;
};
inherit
modules
;
};
mkLinuxSystem =
modules:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
flake = {
inherit
config
inputs
self
;
};
};
inherit
modules
;
};
};
}

310
modules/config/default.nix Executable file
View file

@ -0,0 +1,310 @@
{ lib, ... }:
let
attrList = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
};
boolType = lib.mkOption {
type = lib.types.bool;
};
stringType = lib.mkOption {
type = lib.types.str;
};
intType = lib.mkOption {
type = lib.types.int;
};
listType = lib.mkOption {
type = lib.types.listOf lib.types.str;
};
numOptions = 20;
genOptions =
config: prefix:
builtins.listToAttrs (
map (i: {
name = "${prefix}${toString i}";
value = config;
}) (builtins.genList (i: i) numOptions)
);
mkOptionsFromDir =
path:
builtins.listToAttrs (
map
(name: {
name = builtins.substring 0 (builtins.stringLength name - 4) name;
value = stringType;
})
(
builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
builtins.attrNames (builtins.readDir path)
)
)
);
userSubmodule = lib.types.submodule {
options = {
name = stringType;
label = stringType;
sshKeys = listType;
group = stringType;
aliases = genOptions stringType "name";
email = genOptions stringType "address";
paths = genOptions stringType "path";
};
};
instanceSubmodule = lib.types.submodule {
options = {
subdomain = stringType;
label = stringType;
name = stringType;
short = stringType;
hostname = stringType;
tags = listType;
domains = genOptions stringType "url";
dns = genOptions stringType "provider";
localhost = genOptions stringType "address";
wireguard = genOptions stringType "interface";
remotehost = genOptions stringType "address";
email = genOptions stringType "address";
sops = genOptions stringType "path";
paths = genOptions stringType "path";
ports = genOptions intType "port";
ssl = {
cert = stringType;
key = stringType;
};
};
};
deviceSubmodule = lib.types.submodule {
options =
let
mountConfig = {
mount = stringType;
device = stringType;
options = listType;
};
in
{
boot = mountConfig;
ip = genOptions stringType "address";
label = stringType;
name = stringType;
sync = genOptions stringType "address";
wireguard = genOptions stringType "ip";
}
// genOptions mountConfig "folder"
// genOptions mountConfig "samba"
// genOptions mountConfig "remote"
// genOptions mountConfig "storage";
};
themesSubmodule = lib.types.submodule {
options = {
currentTheme = stringType;
windowManager = {
gaps = intType;
borders = intType;
rounding = intType;
enabled = {
hyprland = boolType;
niri = boolType;
};
};
fonts = {
name = stringType;
sizes = {
applications = intType;
desktop = intType;
popups = intType;
terminal = intType;
};
};
cursor = {
name = stringType;
size = intType;
};
palettes = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule {
options = {
colours = attrList;
font = stringType;
};
}
);
};
};
};
in
{
options = {
services = lib.mkOption {
type = lib.types.submodule {
options = mkOptionsFromDir ./instances/config // {
instances = lib.mkOption {
type = lib.types.attrsOf instanceSubmodule;
};
};
};
};
machines = lib.mkOption {
type = lib.types.submodule {
options =
let
devicesPath = ./devices/config;
printerPath = devicesPath + /printers;
in
mkOptionsFromDir devicesPath
// mkOptionsFromDir printerPath
// {
devices = lib.mkOption {
type = lib.types.attrsOf deviceSubmodule;
};
};
};
};
people = lib.mkOption {
type = lib.types.submodule {
options = mkOptionsFromDir ./users/config // {
users = lib.mkOption {
type = lib.types.attrsOf userSubmodule;
};
};
};
};
aesthetics = lib.mkOption {
type = lib.types.submodule {
options = mkOptionsFromDir ./themes // {
themes = lib.mkOption {
type = themesSubmodule;
};
};
};
};
};
config =
let
moduleFunctions = {
devicesFunctions = {
ownerWriteOthersReadMask = [
"fmask=0022"
"dmask=0022"
];
ownerExclusiveReadWriteMask = [
"fmask=0077"
"dmask=0077"
];
readWritePermissions = [
"rw"
];
sambaPermissions = [
"rw"
"gid=100"
"vers=3.0"
"x-systemd.automount"
"x-systemd.requires=network-online.target"
];
sshfsOptions = [
"allow_other"
"_netdev"
"x-systemd.automount"
"reconnect"
"user"
"ServerAliveInterval=15"
"IdentityFile=/var/run/secrets/ssh/private"
];
fileModeAndDirMode = [
"file_mode=0644"
"dir_mode=0755"
];
userIdForUser0 = [
"uid=1000"
];
userIdForUser1 = [
"uid=1002"
];
dummy = [
];
ceresStorageDriveName = "NAS1";
ceresIP = "192.168.50.140";
deimosIP = "192.168.50.142";
marsIP = "192.168.50.218";
phoneIP = "192.168.50.243";
phobosIP = "192.168.50.180";
synologyIP = "192.168.50.209";
brotherIP = "192.168.50.195";
externalIP = "24.76.173.0";
deviceNames = {
desktop = "mars";
desktopLabel = "Mars";
server = "ceres";
serverLabel = "Ceres";
laptop = "deimos";
laptopLabel = "Deimos";
laptop2 = "phobos";
laptop2Label = "Phobos";
nas = "synology";
nasLabel = "Synology";
phone = "pixel";
phoneLabel = "Pixel";
};
};
instancesFunctions = {
domain0 = "cloudbert.fun";
domain1 = "the-nutrivore.social";
domain2 = "the-nutrivore.com";
domain3 = "uprootnutrition.com";
servicePath = "/mnt/media/NAS1";
sopsPath = "/var/lib/secrets";
sslPath = "/var/lib/acme";
varLib = "/var/lib";
synologyName = "synology";
dummy = "";
};
themesFunctions = {
brogrammer = "brogrammer";
catppuccin-frappe = "catppuccin-frappe";
catppuccin-latte = "catppuccin-latte";
catppuccin-macchiato = "catppuccin-macchiato";
catppuccin-mocha = "catppuccin-mocha";
chalk = "chalk";
deep-oceanic-next = "deep-oceanic-next";
dracula = "dracula";
espresso = "espresso";
flat = "flat";
framer = "framer";
github = "github";
hardcore = "hardcore";
one-black = "one-black";
one-dark = "one-dark";
one-light = "one light";
sparky = "sparky";
};
usersFunctions = {
user0 = "nick";
user0Label = "Nick";
user1 = "streaming";
user1Label = "Streaming";
};
};
inheritFunctions = { inherit moduleFunctions; };
in
{
people = import ./users inheritFunctions;
services = import ./instances inheritFunctions;
machines = import ./devices inheritFunctions;
aesthetics = import ./themes inheritFunctions;
};
}

View file

@ -0,0 +1,49 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.devicesFunctions)
sshfsOptions
fileModeAndDirMode
ceresStorageDriveName
ownerExclusiveReadWriteMask
readWritePermissions
sambaPermissions
userIdForUser0
ceresIP
deviceNames
;
inherit (moduleFunctions.usersFunctions) user0;
inherit (moduleFunctions.devicesFunctions) externalIP;
ceresName = deviceNames.server;
in
{
label = deviceNames.serverLabel;
name = ceresName;
sync = {
address0 = "";
};
ip = {
address0 = ceresIP;
};
boot = {
options = ownerExclusiveReadWriteMask;
};
wireguard = {
ip0 = "10.100.0.1";
};
storage0 = {
mount = "/mnt/media/${ceresStorageDriveName}";
device = "/dev/disk/by-label/${ceresStorageDriveName}";
options = readWritePermissions;
};
samba0 = {
mount = "/mnt/media/${ceresName}";
device = "//${ceresIP}";
options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0;
};
remote0 = {
mount = "/mnt/media/remote";
device = "${user0}@${externalIP}:/mnt/media/${ceresStorageDriveName}";
options = sshfsOptions;
};
}

View file

@ -0,0 +1,24 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.devicesFunctions)
ownerWriteOthersReadMask
deimosIP
deviceNames
;
in
{
label = deviceNames.laptopLabel;
name = deviceNames.laptop;
sync = {
address0 = deimosIP;
};
ip = {
address0 = deimosIP;
};
wireguard = {
ip0 = "10.100.0.3";
};
boot = {
options = ownerWriteOthersReadMask;
};
}

View file

@ -0,0 +1,35 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.devicesFunctions)
ownerWriteOthersReadMask
readWritePermissions
marsIP
deviceNames
;
in
{
label = deviceNames.desktopLabel;
name = deviceNames.desktop;
sync = {
address0 = "";
};
ip = {
address0 = marsIP;
};
boot = {
options = ownerWriteOthersReadMask;
};
wireguard = {
ip0 = "10.100.0.2";
};
storage0 = {
mount = "/mnt/media/games";
device = "/dev/disk/by-label/Games";
options = readWritePermissions;
};
storage1 = {
mount = "/mnt/media/storage";
device = "/dev/disk/by-label/Storage";
options = readWritePermissions;
};
}

View file

@ -0,0 +1,21 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.devicesFunctions)
ownerWriteOthersReadMask
phobosIP
deviceNames
;
in
{
label = deviceNames.laptop2Label;
name = deviceNames.laptop2;
sync = {
address0 = phobosIP;
};
ip = {
address0 = phobosIP;
};
boot = {
options = ownerWriteOthersReadMask;
};
}

View file

@ -0,0 +1,18 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.devicesFunctions)
phoneIP
dummy
deviceNames
;
in
{
name = deviceNames.phone;
label = dummy;
sync = {
address0 = "RMDKNJY-BTX6FYF-G6SR332-WS6HARI-PF74SC6-VPBSGRQ-MKVQZEQ-KSIB6QV"; # User0
};
ip = {
address0 = phoneIP;
};
}

View file

@ -0,0 +1,12 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.devicesFunctions) dummy;
in
{
name = dummy;
label = "Canon-TR7620a";
ip = {
address0 = "";
};
}

View file

@ -0,0 +1,12 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.devicesFunctions) brotherIP dummy;
in
{
name = dummy;
label = "Brother-HL-2170W";
ip = {
address0 = brotherIP;
};
}

View file

@ -0,0 +1,34 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.devicesFunctions)
sambaPermissions
userIdForUser0
userIdForUser1
synologyIP
deviceNames
;
inherit (moduleFunctions.usersFunctions) user0 user0Label user1;
synologyName = deviceNames.nas;
in
{
label = deviceNames.nasLabel;
sync = {
address0 = "MWRGX2V-F5XKE5E-REP6ECT-OOPFBMF-22NHSMW-YFBU6MB-PLFUN63-R3MW2QX"; # User0
};
name = synologyName;
ip = {
address0 = synologyIP;
};
# Nick Home Folder
folder0 = {
mount = "/mnt/media/${synologyName}/${user0}";
device = "//${synologyIP}/homes/${user0Label}";
options = sambaPermissions ++ userIdForUser0;
};
# Streaming Folder
folder1 = {
mount = "/mnt/media/${synologyName}/${user1}";
device = "//${synologyIP}/homes/${user0Label}";
options = sambaPermissions ++ userIdForUser1;
};
}

View file

@ -0,0 +1,45 @@
{ moduleFunctions }:
let
configPath = ./config;
printerPath = configPath + /printers;
deviceswithFunctions = builtins.listToAttrs (
map
(name: {
name = builtins.substring 0 (builtins.stringLength name - 4) name;
value = import (configPath + "/${name}") {
inherit
moduleFunctions
;
};
})
(
builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
builtins.attrNames (builtins.readDir configPath)
)
)
);
devicesPrinters = builtins.listToAttrs (
map
(name: {
name = builtins.substring 0 (builtins.stringLength name - 4) name;
value = import (printerPath + "/${name}") {
inherit
moduleFunctions
;
};
})
(
builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
builtins.attrNames (builtins.readDir printerPath)
)
)
);
devices = deviceswithFunctions // devicesPrinters;
in
{
devices = devices;
}

View file

@ -0,0 +1,20 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
sslPath
sopsPath
;
label = "Acme";
name = "acme";
in
{
label = label;
name = name;
paths = {
path0 = sslPath;
};
sops = {
path0 = "${sopsPath}/${name}";
};
}

View file

@ -0,0 +1,38 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
audiobookshelfLabel = "Audiobookshelf";
audiobookshelfName = "audiobookshelf";
audiobookshelfSubdomain = "books";
audiobookshelfDomain = "${audiobookshelfSubdomain}.${domain0}";
in
{
label = audiobookshelfLabel;
name = audiobookshelfName;
short = "Books";
sops = {
path0 = "${sopsPath}/${audiobookshelfName}";
};
domains = {
url0 = audiobookshelfDomain;
};
subdomain = audiobookshelfSubdomain;
tags = [
];
paths = {
path0 = "${servicePath}/${audiobookshelfLabel}";
};
ports = {
port0 = 8000;
};
ssl = {
cert = "${sslPath}/${audiobookshelfSubdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${audiobookshelfSubdomain}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,20 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
sopsPath
;
caddyLabel = "Caddy";
caddyName = "caddy";
in
{
label = caddyLabel;
name = caddyName;
sops = {
path0 = "${sopsPath}/${caddyName}";
};
ports = {
port0 = 80;
port1 = 443;
};
}

View file

@ -0,0 +1,41 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
label = "ComfyUI";
name = "comfyui";
subdomain = "comfyui";
domain = "${subdomain}.${domain0}";
in
{
label = label;
name = name;
short = label;
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
name
"comfy"
"ui"
];
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 8188;
};
ssl = {
cert = "${sslPath}/${domain0}/fullchain.pem";
key = "${sslPath}/${domain0}/key.pem";
};
}

View file

@ -0,0 +1,44 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
servicePath
sslPath
sopsPath
;
label = "Forgejo";
name = "forgejo";
subdomain = "source";
domain = "${subdomain}.${domain3}";
in
{
label = label;
name = name;
short = label;
email = {
address0 = "noreply@${domain3}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
name
"forge"
"git"
];
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 3033;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain3}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain3}/key.pem";
};
}

View file

@ -0,0 +1,45 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
label = "Glance";
name = "glance";
subdomain = "dashboard";
domain = "${subdomain}.${domain0}";
in
{
label = label;
name = name;
short = label;
email = {
address0 = "noreply@${domain0}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
"glance"
"dashboard"
"weather"
"podcasts"
];
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 3434;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,45 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
label = "Jellyfin";
name = "jellyfin";
domain = "${name}.${domain0}";
in
{
label = label;
name = name;
short = "Jelly";
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
tags = [
"jelly"
"video"
"streaming"
"movies"
"shows"
"music"
];
subdomain = name;
paths = {
path0 = "${servicePath}/${label}";
path1 = "${servicePath}/${label}/cache";
};
ports = {
port0 = 8096; # Jellyfin HTTP
port1 = 5055; # Jellyseer
port2 = 8920; # Jellyfin HTTPS
};
ssl = {
cert = "${sslPath}/${name}.${domain0}/fullchain.pem";
key = "${sslPath}/${name}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,43 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
servicePath
sslPath
sopsPath
;
label = "Mastodon";
name = "mastodon";
subdomain = "social";
domain = "${subdomain}.${domain3}";
in
{
label = label;
name = name;
short = "Mast";
email = {
address0 = "noreply@${domain3}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
name
"mast"
"md"
];
sops = {
path0 = "${sopsPath}/${name}";
};
paths = {
path0 = "${servicePath}/${label}";
path1 = "";
path2 = "";
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain3}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain3}/key.pem";
};
}

View file

@ -0,0 +1,27 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
servicePath
sopsPath
;
label = "Matrix";
name = "matrix";
in
{
label = label;
name = name;
short = label;
sops = {
path0 = "${sopsPath}/${name}";
};
subdomain = name;
tags = [
];
paths = {
path0 = "${servicePath}/${label}";
path1 = "";
path2 = "";
};
}

View file

@ -0,0 +1,30 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
label = "Minecraft";
name = "minecraft";
in
{
label = label;
name = name;
sops = {
path0 = "${sopsPath}/${name}";
};
subdomain = name;
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 43000; # Minecraft (Brix on Nix)
};
ssl = {
cert = "${sslPath}/${name}.${domain0}/fullchain.pem";
key = "${sslPath}/${name}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,44 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
label = "Nextcloud";
name = "nextcloud";
domain = "${name}.${domain0}";
in
{
label = label;
name = name;
short = "Next";
email = {
address0 = "noreply@${name}.${domain0}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = name;
tags = [
name
"next"
"cloud"
"calendar"
];
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 8354; # Nextcloud
};
ssl = {
cert = "${sslPath}/${name}.${domain0}/fullchain.pem";
key = "${sslPath}/${name}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,19 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
sopsPath
;
label = "Nginx";
name = "nginx";
in
{
label = label;
name = name;
sops = {
path0 = "${sopsPath}/${name}";
};
ports = {
port0 = 8080;
};
}

View file

@ -0,0 +1,42 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
label = "Ollama";
name = "ollama";
domain = "${name}.${domain0}";
in
{
label = label;
name = name;
short = label;
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = name;
tags = [
name
"chat"
"ai"
];
paths = {
path0 = "${servicePath}/${label}";
path1 = "/mnt/media/storage/${name}";
};
ports = {
port0 = 8088; # Open-WebUI (Ollama Front End)
port1 = 11434; # Ollama API
};
ssl = {
cert = "${sslPath}/${name}.${domain0}/fullchain.pem";
key = "${sslPath}/${name}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,44 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
label = "OpenCloud";
name = "opencloud";
subdomain = "cloud";
domain = "${subdomain}.${domain0}";
in
{
label = label;
name = name;
short = "Cloud";
email = {
address0 = "noreply@${domain0}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
name
"opencloud"
"cloud"
];
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 9200;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,41 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain1
servicePath
sslPath
sopsPath
;
label = "Owncast";
name = "owncast";
subdomain = "stream";
domain = "${subdomain}.${domain1}";
in
{
label = label;
name = name;
short = "Cast";
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
];
paths = {
path0 = "${servicePath}/${label}";
path1 = "/mnt/media/storage/${name}";
};
ports = {
port0 = 9454;
port1 = 1935;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain1}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain1}/key.pem";
};
}

View file

@ -0,0 +1,46 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
servicePath
sslPath
sopsPath
;
label = "PeerTube";
name = "peertube";
subdomain = "video";
domain = "${subdomain}.${domain3}";
in
{
label = label;
name = name;
short = "Peer";
email = {
address0 = "noreply@${domain3}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
];
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 9000; # HTTP
port1 = 1935;
port2 = 1936;
port3 = 5432;
port4 = 52800;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain3}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain3}/key.pem";
};
}

View file

@ -0,0 +1,31 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
servicePath
sslPath
sopsPath
;
label = "Postfix";
name = "postfix";
domain = "${name}.${domain3}";
in
{
label = label;
name = name;
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = name;
paths = {
path0 = "${servicePath}/${label}";
};
ssl = {
cert = "${sslPath}/${domain3}/fullchain.pem";
key = "${sslPath}/${domain3}/key.pem";
};
}

View file

@ -0,0 +1,23 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
servicePath
sopsPath
;
label = "PostgreSQL";
name = "postgres";
in
{
label = label;
name = name;
sops = {
path0 = "${sopsPath}/${name}";
};
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 5432;
};
}

View file

@ -0,0 +1,32 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
sslPath
sopsPath
;
label = "projectSite";
name = "projectsite";
in
{
label = label;
name = name;
short = "Project";
sops = {
path0 = "${sopsPath}/${name}";
};
tags = [
"project"
];
paths = {
path0 = "/var/lib/projectsite/dist";
};
ports = {
port0 = 1334;
};
ssl = {
cert = sslPath;
key = sslPath;
};
}

View file

@ -0,0 +1,41 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
sslPath
sopsPath
;
label = "Prompter";
name = "prompter";
subdomain = "prompter";
domain = "${subdomain}.${domain0}";
in
{
label = label;
name = name;
short = "upRoot";
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
name
"blog"
];
paths = {
path0 = "/var/lib/${name}/dist";
path1 = "";
path2 = "";
};
ports = {
port0 = 1234;
};
ssl = {
cert = "${sslPath}/${domain0}/fullchain.pem";
key = "${sslPath}/${domain0}/key.pem";
};
}

View file

@ -0,0 +1,21 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
sopsPath
;
label = "Samba";
name = "samba";
in
{
label = label;
name = name;
sops = {
path0 = "${sopsPath}/${name}";
};
paths = {
};
ports = {
port0 = 445; # Samba
};
}

View file

@ -0,0 +1,44 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
label = "SearXNG";
name = "searx";
subdomain = "search";
domain = "${subdomain}.${domain0}";
in
{
label = label;
name = name;
short = "Sear";
email = {
address0 = "noreply@${domain0}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
"search"
"sear"
"searx"
];
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 8888;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,13 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
dummy
;
in
{
hostname = "mail.smtp2go.com";
name = dummy;
ports = {
port0 = 2525;
};
}

View file

@ -0,0 +1,40 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
sslPath
sopsPath
synologyName
;
label = "Syncthing";
name = "syncthing";
domain = "${name}.${domain0}";
in
{
label = label;
name = name;
short = "Sync";
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = name;
tags = [
name
synologyName
"sync"
"thing"
];
ports = {
port0 = 8388; # Syncthing (WebUI)
port1 = 21027; # Syncthing (Discovery)
port2 = 22000; # Syncthing (Transfer)
};
ssl = {
cert = "${sslPath}/${name}.${domain0}/fullchain.pem";
key = "${sslPath}/${name}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,26 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
sopsPath
synologyName
;
label = "Synology";
name = synologyName;
in
{
label = label;
name = name;
short = "Nas";
tags = [
name
"dsm"
"cloud"
];
sops = {
path0 = "${sopsPath}/${name}";
};
ports = {
port0 = 5001; # Synology HTTPS
};
}

View file

@ -0,0 +1,41 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain3
sslPath
sopsPath
;
label = "upRootNutrition";
name = "uprootnutrition";
in
{
label = label;
name = name;
short = "upRoot";
email = {
address0 = "nick@${domain3}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain3;
};
tags = [
name
"blog"
];
paths = {
path0 = "/var/lib/website/dist";
path1 = "";
path2 = "";
};
ports = {
port0 = 1234;
};
ssl = {
cert = "${sslPath}/${domain3}/fullchain.pem";
key = "${sslPath}/${domain3}/key.pem";
};
}

View file

@ -0,0 +1,45 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
label = "Vaultwarden";
name = "vaultwarden";
domain = "${name}.${domain0}";
in
{
label = label;
name = name;
short = "Vault";
email = {
address0 = "noreply@${name}.${domain0}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = name;
tags = [
name
"bitwarden"
"vault"
"bit"
"warden"
];
paths = {
path0 = "${servicePath}/${label}/BackupDir";
};
ports = {
port0 = 8085; # Vaultwarden WebUI
};
ssl = {
cert = "${sslPath}/${name}.${domain0}/fullchain.pem";
key = "${sslPath}/${name}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,42 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
domain1
domain2
domain3
;
label = "Router";
in
{
label = label;
name = "router";
short = label;
domains = {
url0 = domain0;
url1 = domain1;
url2 = domain2;
url3 = domain3;
};
dns = {
provider0 = "namecheap";
provider1 = "cloudflare";
};
tags = [
"router"
"asus"
];
localhost = {
address0 = "127.0.0.1"; # Local
address1 = "0.0.0.0"; # All
address2 = "192.168.50.1"; # Router
address3 = "192.168.50.0"; # Router
address4 = "192.168.1.0"; # Router
};
remotehost = {
address0 = "24.76.173.0";
};
wireguard = {
interface0 = "10.100.0.1";
};
}

View file

@ -0,0 +1,20 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
sopsPath
;
label = "WireGuard";
name = "wireguard";
in
{
label = label;
name = name;
sops = {
path0 = "${sopsPath}/${name}";
};
ports = {
port0 = 53;
port1 = 51821;
};
}

View file

@ -0,0 +1,24 @@
{ moduleFunctions }:
let
configPath = ./config;
instances = builtins.listToAttrs (
map
(name: {
name = builtins.substring 0 (builtins.stringLength name - 4) name;
value = import (configPath + "/${name}") {
inherit
moduleFunctions
;
};
})
(
builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
builtins.attrNames (builtins.readDir configPath)
)
)
);
in
{
instances = instances;
}

View file

@ -0,0 +1,68 @@
{ moduleFunctions }:
let
inherit (moduleFunctions) themesFunctions;
currentTheme0 = themesFunctions.catppuccin-macchiato;
# hostname = config.networking.hostName;
# windowManagerLogic =
# bool1: bool2:
# if hostname == devicesFunctions.deviceNames.desktop then
# bool1
# else if hostname == devicesFunctions.deviceNames.laptop then
# bool2
# else
# bool1;
in
{
themes = {
windowManager = {
gaps = 6;
borders = 3;
rounding = 20;
enabled = {
niri = false;
hyprland = true;
# niri = windowManagerLogic false true;
# hyprland = windowManagerLogic true false;
};
};
currentTheme = currentTheme0;
cursor = {
name = "";
size = 18;
};
fonts = {
name = "MonaspiceRn Nerd Font";
sizes = {
applications = 14;
desktop = 12;
popups = 10;
terminal = 10;
};
};
palettes =
let
palettePath = ./palettes;
catppuccinPath = /catppuccin;
onePath = /one;
in
{
${themesFunctions.brogrammer} = import (palettePath + /brogrammer);
${themesFunctions.catppuccin-frappe} = import (palettePath + catppuccinPath + /frappe);
${themesFunctions.catppuccin-latte} = import (palettePath + catppuccinPath + /latte);
${themesFunctions.catppuccin-macchiato} = import (palettePath + catppuccinPath + /macchiato);
${themesFunctions.catppuccin-mocha} = import (palettePath + catppuccinPath + /mocha);
${themesFunctions.chalk} = import (palettePath + /chalk);
${themesFunctions.deep-oceanic-next} = import (palettePath + /deep-oceanic-next);
${themesFunctions.dracula} = import (palettePath + /dracula);
${themesFunctions.espresso} = import (palettePath + /espresso);
${themesFunctions.flat} = import (palettePath + /flat);
${themesFunctions.framer} = import (palettePath + /framer);
${themesFunctions.github} = import (palettePath + /github);
${themesFunctions.hardcore} = import (palettePath + /hardcore);
${themesFunctions.one-black} = import (palettePath + onePath + /black);
${themesFunctions.one-dark} = import (palettePath + onePath + /dark);
${themesFunctions.one-light} = import (palettePath + onePath + /light);
${themesFunctions.sparky} = import (palettePath + /sparky);
};
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "131313";
base01 = "1f1f1f";
base02 = "2a3141";
base03 = "343d50";
base04 = "d6dae4";
base05 = "c1c8d7";
base06 = "e3e6ed";
base07 = "ffffff";
base08 = "f71118";
base09 = "ecb90f";
base0A = "0f80d5";
base0B = "2cc55d";
base0C = "0f80d5";
base0D = "2a84d2";
base0E = "4e59b7";
base0F = "7b080c";
base10 = "0a0a0a";
base11 = "020202";
base12 = "de342e";
base13 = "f2bd09";
base14 = "1dd260";
base15 = "289af0";
base16 = "509bdc";
base17 = "524fb9";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "303446"; # base
base01 = "292c3c"; # mantle
base02 = "414559"; # surface0
base03 = "51576d"; # surface1
base04 = "626880"; # surface2
base05 = "c6d0f5"; # text
base06 = "f2d5cf"; # rosewater label
base07 = "babbf1"; # lavender
base08 = "e78284"; # red
base09 = "ef9f76"; # peach
base0A = "e5c890"; # yellow
base0B = "a6d189"; # green
base0C = "81c8be"; # teal character
base0D = "8caaee"; # blue function
base0E = "ca9ee6"; # mauve
base0F = "eebebe"; # flamingo
base10 = "292c3c"; # mantle - darker background
base11 = "232634"; # crust - darkest background
base12 = "ea999c"; # maroon - bright red parameter
base13 = "f2d5cf"; # rosewater - bright yellow
base14 = "a6d189"; # green - bright green
base15 = "99d1db"; # sky - bright cyan operator
base16 = "85c1dc"; # sapphire - bright blue constructor
base17 = "f4b8e4"; # pink - bright purple
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "eff1f5"; # base
base01 = "e6e9ef"; # mantle
base02 = "ccd0da"; # surface0
base03 = "bcc0cc"; # surface1
base04 = "acb0be"; # surface2
base05 = "4c4f69"; # text
base06 = "dc8a78"; # rosewater
base07 = "7287fd"; # lavender
base08 = "d20f39"; # red
base09 = "fe640b"; # peach
base0A = "df8e1d"; # yellow
base0B = "40a02b"; # green
base0C = "179299"; # teal
base0D = "1e66f5"; # blue
base0E = "8839ef"; # mauve
base0F = "dd7878"; # flamingo
base10 = "e6e9ef"; # mantle - darker background
base11 = "dce0e8"; # crust - darkest background
base12 = "e64553"; # maroon - bright red
base13 = "dc8a78"; # rosewater - bright yellow
base14 = "40a02b"; # green - bright green
base15 = "04a5e5"; # sky - bright cyan
base16 = "209fb5"; # sapphire - bright blue
base17 = "ea76cb"; # pink - bright purple
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "24273a"; # base
base01 = "1e2030"; # mantle
base02 = "363a4f"; # surface0
base03 = "494d64"; # surface1
base04 = "5b6078"; # surface2
base05 = "cad3f5"; # text
base06 = "f4dbd6"; # rosewater
base07 = "b7bdf8"; # lavender
base08 = "ed8796"; # red
base09 = "f5a97f"; # peach
base0A = "eed49f"; # yellow
base0B = "a6da95"; # green
base0C = "8bd5ca"; # teal
base0D = "8aadf4"; # blue
base0E = "c6a0f6"; # mauve
base0F = "f0c6c6"; # flamingo
base10 = "1e2030"; # mantle - darker background
base11 = "181926"; # crust - darkest background
base12 = "ee99a0"; # maroon - bright red
base13 = "f4dbd6"; # rosewater - bright yellow
base14 = "a6da95"; # green - bright green
base15 = "91d7e3"; # sky - bright cyan
base16 = "7dc4e4"; # sapphire - bright blue
base17 = "f5bde6"; # pink - bright purple
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "1e1e2e"; # base
base01 = "181825"; # mantle
base02 = "313244"; # surface0
base03 = "45475a"; # surface1
base04 = "585b70"; # surface2
base05 = "cdd6f4"; # text
base06 = "f5e0dc"; # rosewater
base07 = "b4befe"; # lavender
base08 = "f38ba8"; # red
base09 = "fab387"; # peach
base0A = "f9e2af"; # yellow
base0B = "a6e3a1"; # green
base0C = "94e2d5"; # teal
base0D = "89b4fa"; # blue
base0E = "cba6f7"; # mauve
base0F = "f2cdcd"; # flamingo
base10 = "181825"; # mantle - darker background
base11 = "11111b"; # crust - darkest background
base12 = "eba0ac"; # maroon - bright red
base13 = "f5e0dc"; # rosewater - bright yellow
base14 = "a6e3a1"; # green - bright green
base15 = "89dceb"; # sky - bright cyan
base16 = "74c7ec"; # sapphire - bright blue
base17 = "f5c2e7"; # pink - bright purple
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "151515";
base01 = "202020";
base02 = "303030";
base03 = "505050";
base04 = "b0b0b0";
base05 = "d0d0d0";
base06 = "e0e0e0";
base07 = "f5f5f5";
base08 = "fa859c";
base09 = "ea9971";
base0A = "ddb26f";
base0B = "a1bb54";
base0C = "10bcad";
base0D = "5ab9ed";
base0E = "db8fea";
base0F = "deaf8f";
base10 = "0b0b0b";
base11 = "060606";
base12 = "fb9fb1";
base13 = "eda987";
base14 = "acc267";
base15 = "12cfc0";
base16 = "6fc2ef";
base17 = "e1a3ee";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "001c1f";
base01 = "002931";
base02 = "003640";
base03 = "004852";
base04 = "0093a3";
base05 = "d4e1e8";
base06 = "e0e9ef";
base07 = "f2f7f9";
base08 = "d3464d";
base09 = "e37552";
base0A = "f3b863";
base0B = "63b784";
base0C = "4fb7ae";
base0D = "568ccf";
base0E = "8b66d6";
base0F = "d0658e";
base10 = "1f2628";
base11 = "2a2f30";
base12 = "ff6670";
base13 = "ffe08a";
base14 = "72e1a6";
base15 = "4de3e3";
base16 = "5caeff";
base17 = "b788ff";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "282a36";
base01 = "363447";
base02 = "44475a";
base03 = "6272a4";
base04 = "9ea8c7";
base05 = "f8f8f2";
base06 = "f0f1f4";
base07 = "ffffff";
base08 = "ff5555";
base09 = "ffb86c";
base0A = "f1fa8c";
base0B = "50fa7b";
base0C = "8be9fd";
base0D = "80bfff";
base0E = "ff79c6";
base0F = "bd93f9";
base10 = "1e2029";
base11 = "16171d";
base12 = "f28c8c";
base13 = "eef5a3";
base14 = "a3f5b8";
base15 = "baedf7";
base16 = "a3ccf5";
base17 = "f5a3d2";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "262626";
base01 = "343434";
base02 = "535353";
base03 = "797979";
base04 = "a0a09f";
base05 = "c7c7c5";
base06 = "eeeeec";
base07 = "ffffff";
base08 = "d25151";
base09 = "ffc66d";
base0A = "8ab7d9";
base0B = "a5c261";
base0C = "bed6ff";
base0D = "6c99bb";
base0E = "d197d9";
base0F = "692828";
base10 = "373737";
base11 = "1b1b1b";
base12 = "f00c0c";
base13 = "e1e38b";
base14 = "c2e075";
base15 = "dcf3ff";
base16 = "8ab7d9";
base17 = "efb5f7";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "082845";
base01 = "1d2845";
base02 = "2e2e45";
base03 = "444e5b";
base04 = "68717b";
base05 = "8c939a";
base06 = "b0b6ba";
base07 = "e7eced";
base08 = "a82320";
base09 = "e58d11";
base0A = "3c7dd2";
base0B = "2d9440";
base0C = "2c9370";
base0D = "3167ac";
base0E = "781aa0";
base0F = "541110";
base10 = "002240";
base11 = "001629";
base12 = "d4312e";
base13 = "e5be0c";
base14 = "32a548";
base15 = "35b387";
base16 = "3c7dd2";
base17 = "8230a7";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "111111";
base01 = "141414";
base02 = "414141";
base03 = "636363";
base04 = "868686";
base05 = "a9a9a9";
base06 = "cccccc";
base07 = "ffffff";
base08 = "ff5555";
base09 = "ffcc33";
base0A = "33bbff";
base0B = "98ec65";
base0C = "88ddff";
base0D = "00aaff";
base0E = "aa88ff";
base0F = "7f2a2a";
base10 = "2b2b2b";
base11 = "151515";
base12 = "ff8888";
base13 = "ffd966";
base14 = "b6f292";
base15 = "bbecff";
base16 = "33bbff";
base17 = "cebbff";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "f4f4f4";
base01 = "3e3e3e";
base02 = "666666";
base03 = "8c8c8c";
base04 = "b2b2b2";
base05 = "d8d8d8";
base06 = "ffffff";
base07 = "ffffff";
base08 = "970b16";
base09 = "f8eec7";
base0A = "2e6cba";
base0B = "07962a";
base0C = "89d1ec";
base0D = "003e8a";
base0E = "e94691";
base0F = "4b050b";
base10 = "444444";
base11 = "222222";
base12 = "de0000";
base13 = "f1d007";
base14 = "87d5a2";
base15 = "1cfafe";
base16 = "2e6cba";
base17 = "ffa29f";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "111111";
base01 = "141414";
base02 = "414141";
base03 = "636363";
base04 = "868686";
base05 = "a9a9a9";
base06 = "cccccc";
base07 = "ffffff";
base08 = "ff5555";
base09 = "ffcc33";
base0A = "33bbff";
base0B = "98ec65";
base0C = "88ddff";
base0D = "00aaff";
base0E = "aa88ff";
base0F = "7f2a2a";
base10 = "0a0a0a";
base11 = "060606";
base12 = "ff8888";
base13 = "ffd966";
base14 = "b6f292";
base15 = "bbecff";
base16 = "33bbff";
base17 = "cebbff";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "000000";
base01 = "000000";
base02 = "4f5666";
base03 = "545862";
base04 = "9196a1";
base05 = "abb2bf";
base06 = "e6e6e6";
base07 = "ffffff";
base08 = "e05561";
base09 = "d18f52";
base0A = "e6b965";
base0B = "8cc265";
base0C = "42b3c2";
base0D = "4aa5f0";
base0E = "c162de";
base0F = "bf4034";
base10 = "000000";
base11 = "000000";
base12 = "ff616e";
base13 = "f0a45d";
base14 = "a5e075";
base15 = "4cd1e0";
base16 = "4dc4ff";
base17 = "de73ff";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "282c34";
base01 = "3f4451";
base02 = "4f5666";
base03 = "545862";
base04 = "9196a1";
base05 = "abb2bf";
base06 = "e6e6e6";
base07 = "ffffff";
base08 = "e05561";
base09 = "d18f52";
base0A = "e6b965";
base0B = "8cc265";
base0C = "42b3c2";
base0D = "4aa5f0";
base0E = "c162de";
base0F = "bf4034";
base10 = "21252b";
base11 = "181a1f";
base12 = "ff616e";
base13 = "f0a45d";
base14 = "a5e075";
base15 = "4cd1e0";
base16 = "4dc4ff";
base17 = "de73ff";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "e7e7e9";
base01 = "dfdfe1";
base02 = "cacace";
base03 = "a0a1a7";
base04 = "696c77";
base05 = "383a42";
base06 = "202227";
base07 = "090a0b";
base08 = "ca1243";
base09 = "c18401";
base0A = "febb2a";
base0B = "50a14f";
base0C = "0184bc";
base0D = "4078f2";
base0E = "a626a4";
base0F = "986801";
base10 = "f0f0f1";
base11 = "fafafa";
base12 = "ec2258";
base13 = "f4a701";
base14 = "6db76c";
base15 = "01a7ef";
base16 = "709af5";
base17 = "d02fcd";
};
}

View file

@ -0,0 +1,29 @@
{
font = "";
colours = {
base00 = "072B31";
base01 = "00313C";
base02 = "003C46";
base03 = "003B49";
base04 = "00778B";
base05 = "F4F5F0";
base06 = "F5F5F1";
base07 = "FFFFFF";
base08 = "FF585D";
base09 = "FF8F1C";
base0A = "FBDD40";
base0B = "78D64B";
base0C = "2DCCD3";
base0D = "4698CB";
base0E = "D59ED7";
base0F = "9B704D";
base10 = "4B4F54";
base11 = "212322";
base12 = "FF7276";
base13 = "F6EB61";
base14 = "8EDD65";
base15 = "00C1D5";
base16 = "69B3E7";
base17 = "F99FC9";
};
}

View file

@ -0,0 +1,22 @@
{ user0 }:
{
name = "Nick";
aliases = {
name0 = "BRBWaffles";
name1 = "brbwaffles";
name2 = "Nutrivore";
name3 = "nutrivore";
name4 = "upRootNutrition";
};
email = {
address0 = "nickjhiebert@proton.me";
address1 = "thenutrivore@proton.me";
address2 = "nick@uprootnutrition.com";
};
paths = {
path0 = "/home/${user0}/Files/Projects"; # Git path
};
sshKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBF9TmImDoYDpsW5VMFbOcuK3aH4TWRtx/xGxT3yUtEN nick@desktop"
];
}

View file

@ -0,0 +1,15 @@
{ user1 }:
{
name = "Streaming";
aliases = {
};
email = {
address0 = "nick@upRootNutrition.com";
};
paths = {
path0 = "/home/${user1}/Files/Projects"; # Git path
};
sshKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBF9TmImDoYDpsW5VMFbOcuK3aH4TWRtx/xGxT3yUtEN nick@desktop"
];
}

View file

@ -0,0 +1,17 @@
{ moduleFunctions }:
let
inherit (moduleFunctions) usersFunctions;
configPath = ./config;
user0 = usersFunctions.user0;
user1 = usersFunctions.user1;
in
{
inherit
user0
user1
;
users = {
"${user0}" = import (configPath + /user0.nix) { inherit user0; };
"${user1}" = import (configPath + /user1.nix) { inherit user1; };
};
}

11
modules/default.nix Executable file
View file

@ -0,0 +1,11 @@
let
importList =
let
content = builtins.readDir ./.;
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
in
map (name: ./. + "/${name}") dirContent;
in
{
imports = importList;
}

23
modules/helpers.nix Executable file
View file

@ -0,0 +1,23 @@
{
directoryImport =
let
collectDirs =
path:
let
content = builtins.readDir path;
subdirs = builtins.filter (name: content.${name} == "directory") (builtins.attrNames content);
buildPath = name: path + "/${name}";
thisDirs = map buildPath subdirs;
subDirs = builtins.concatMap collectDirs thisDirs;
in
[ path ] ++ subDirs;
in
path:
builtins.listToAttrs (
map (dir: {
name = baseNameOf (toString dir);
value = import dir;
}) (collectDirs path)
);
}

View file

@ -0,0 +1,12 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
android-file-transfer
;
};
}
# requires that users be part of the adbusers group

View file

@ -0,0 +1,12 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
android-tools
;
};
}
# requires that users be part of the adbusers group

View file

@ -0,0 +1,11 @@
let
importList =
let
content = builtins.readDir ./.;
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
in
map (name: ./. + "/${name}") dirContent;
in
{
imports = importList;
}

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
simple-mtpfs
;
};
}

11
modules/home/cli/default.nix Executable file
View file

@ -0,0 +1,11 @@
let
importList =
let
content = builtins.readDir ./.;
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
in
map (name: ./. + "/${name}") dirContent;
in
{
imports = importList;
}

View file

@ -0,0 +1,11 @@
let
importList =
let
content = builtins.readDir ./.;
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
in
map (name: ./. + "/${name}") dirContent;
in
{
imports = importList;
}

View file

@ -0,0 +1,11 @@
let
importList =
let
content = builtins.readDir ./.;
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
in
map (name: ./. + "/${name}") dirContent;
in
{
imports = importList;
}

View file

@ -0,0 +1,44 @@
{
language = [
{
auto-format = true;
formatter.command = "nixfmt";
name = "nix";
}
{
auto-format = true;
formatter.command = "cssfmt";
name = "css";
}
{
auto-format = true;
language-servers = [
"elm-language-server"
];
name = "elm";
}
{
auto-format = true;
formatter.command = "haskell";
name = "haskell";
}
{
auto-format = true;
formatter.command = "yamlfmt";
name = "yaml";
}
{
auto-format = true;
formatter.command = "yuck";
name = "yuck";
}
];
language-server = {
elm-language-server = {
config.elmLS = {
disableElmLSDiagnostics = true;
elmReviewDiagnostics = "warning";
};
};
};
}

View file

@ -0,0 +1,64 @@
{
editor = {
mouse = true;
auto-format = true;
soft-wrap.enable = true;
auto-save = true;
line-number = "relative";
cursorline = true;
indent-guides = {
character = "";
skip-levels = 1;
render = true;
};
lsp = {
display-messages = true;
display-inlay-hints = true;
};
};
keys = {
normal = {
C-y = ":sh zellij run -n Yazi -c -f -x 10%% -y 10%% --width 80%% --height 80%% -- yazi-picker open .";
C-v = ":sh zellij run -n Lazygit -c -f -x 10%% -y 10%% --width 80%% --height 80%% -- lazygit-root";
f = ":format";
tab = "indent";
S-tab = "unindent";
ret = [
"add_newline_below"
"move_line_down"
];
S-ret = [
"add_newline_above"
"move_line_up"
];
S-up = [
"extend_to_line_bounds"
"delete_selection"
"move_line_up"
"paste_before"
];
S-down = [
"extend_to_line_bounds"
"delete_selection"
"paste_after"
];
S-g = [
":write-all"
":new"
":insert-output lazygit"
":buffer-close!"
":redraw"
":reload-all"
];
Y = "yank_main_selection_to_primary_clipboard";
R = "replace_selections_with_primary_clipboard";
space = {
q = ":q";
w = ":w";
};
};
};
theme = "catppuccin_macchiato";
}

View file

@ -0,0 +1,19 @@
{
pkgs,
flake,
...
}:
{
programs.helix =
let
configPath = ./config;
settingsPath = import (configPath + /settings.nix);
languagesPath = import (configPath + /languages.nix);
in
{
enable = true;
package = flake.inputs.helix.packages.${pkgs.system}.default;
languages = languagesPath;
settings = settingsPath;
};
}

View file

@ -0,0 +1,11 @@
let
importList =
let
content = builtins.readDir ./.;
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
in
map (name: ./. + "/${name}") dirContent;
in
{
imports = importList;
}

View file

@ -0,0 +1,16 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs.elmPackages)
elm
elm-format
elm-land
elm-language-server
elm-review
elm-test
;
};
}

View file

@ -0,0 +1,17 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs.haskellPackages)
cabal-install
haskell-language-server
fourmolu
cabal-fmt
hlint
cabal-gild
ghc
;
};
}

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs.nodePackages)
nodejs
;
};
}

View file

@ -0,0 +1,14 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
# python314
;
inherit (pkgs.python313Packages)
# venvShellHook
;
};
}

View file

@ -0,0 +1,11 @@
let
importList =
let
content = builtins.readDir ./.;
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
in
map (name: ./. + "/${name}") dirContent;
in
{
imports = importList;
}

View file

@ -0,0 +1,16 @@
{
config,
flake,
...
}:
let
user = config.home.username;
userConfig = flake.config.people.users.${user};
in
{
programs.git = {
enable = true;
userName = userConfig.name;
userEmail = userConfig.email.address0;
};
}

View file

@ -0,0 +1,7 @@
{
programs.lazygit = {
enable = true;
settings = {
};
};
}

View file

@ -0,0 +1,11 @@
let
importList =
let
content = builtins.readDir ./.;
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
in
map (name: ./. + "/${name}") dirContent;
in
{
imports = importList;
}

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
file-roller
;
};
}

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
ncdu
;
};
}

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
samba
;
};
}

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
unrar
;
};
}

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
unzip
;
};
}

View file

@ -0,0 +1,16 @@
{
keymap.manager.prepend_keymap = [
{
on = [
"Q"
];
run = "quit";
}
{
on = [
"q"
];
run = "quit --no-cwd-file";
}
];
}

View file

@ -0,0 +1,19 @@
{
settings = {
log = {
enabled = false;
};
manager = {
show_hidden = true;
sort_by = "alphabetical";
sort_dir_first = true;
sort_reverse = false;
};
preview = {
tab_size = 1;
wrap = "yes";
max_width = 1500;
max_height = 1000;
};
};
}

View file

@ -0,0 +1,17 @@
{
programs.yazi =
let
configPath = ./config;
keymapPath = import (configPath + /keymap.nix);
settingsPath = import (configPath + /settings.nix);
in
{
enable = true;
# package = flake.inputs.yazi.packages.${pkgs.system}.yazi;
enableNushellIntegration = true;
keymap = keymapPath;
settings = settingsPath;
};
# Keymap
# https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml
}

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
zip
;
};
}

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
ani-cli
;
};
}

Some files were not shown because too many files have changed in this diff Show more