Compare commits
21 Commits
28c8db6cb7
...
weekly-202
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d35b42c09 | ||
|
|
a96c9060ce | ||
|
|
28cb84aa3f | ||
|
|
ba7acaf360 | ||
|
|
13d1d3c6d9 | ||
|
|
66483c89ac | ||
|
|
32729627b1 | ||
|
|
848ca7ca90 | ||
|
|
72ea8a2da6 | ||
|
|
578fc60a5f | ||
|
|
30199ba69d | ||
|
|
5872d59084 | ||
|
|
98777a1935 | ||
|
|
23f2c7d564 | ||
|
|
0731933b14 | ||
|
|
b4ee7e7ebf | ||
|
|
684904a676 | ||
|
|
29bb85b5c9 | ||
|
|
9c6f17f113 | ||
|
|
195c55891e | ||
|
|
4f4c23d1df |
@@ -1,2 +1,3 @@
|
|||||||
prefix_rule(pattern=["deadnix", "-e"], decision="allow")
|
prefix_rule(pattern=["deadnix", "-e"], decision="allow")
|
||||||
prefix_rule(pattern=["nix", "eval"], decision="allow")
|
prefix_rule(pattern=["nix", "eval"], decision="allow")
|
||||||
|
prefix_rule(pattern=["nix", "develop", "path:.#nix", "--command", "bash", "-lc", "deadnix -e && nix run nixpkgs#nixfmt-tree && statix fix"], decision="allow")
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
name: Build on Push
|
name: Build on Push
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch: # Allow manual trigger
|
workflow_dispatch: # Allow manual trigger
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -91,4 +88,3 @@ jobs:
|
|||||||
echo "✅ Build on push completed successfully!"
|
echo "✅ Build on push completed successfully!"
|
||||||
echo "- Built workstation, server, and emacs-vm configurations"
|
echo "- Built workstation, server, and emacs-vm configurations"
|
||||||
echo "- Pushed all builds to Atticd cache"
|
echo "- Pushed all builds to Atticd cache"
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
name: runner-smoke
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ubuntu-2404:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
- name: Check OS
|
|
||||||
run: |
|
|
||||||
cat /etc/os-release
|
|
||||||
uname -a
|
|
||||||
@@ -26,11 +26,11 @@
|
|||||||
backupFileExtension = "hbckup";
|
backupFileExtension = "hbckup";
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
|
users.jawz = import ./home-manager.nix;
|
||||||
sharedModules = [ ../modules/home-manager.nix ];
|
sharedModules = [ ../modules/home-manager.nix ];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit inputs outputs;
|
inherit inputs outputs;
|
||||||
};
|
};
|
||||||
users.jawz = import ./home-manager.nix;
|
|
||||||
};
|
};
|
||||||
time = {
|
time = {
|
||||||
inherit (config.my) timeZone;
|
inherit (config.my) timeZone;
|
||||||
@@ -38,9 +38,7 @@
|
|||||||
};
|
};
|
||||||
i18n = {
|
i18n = {
|
||||||
defaultLocale = "en_CA.UTF-8";
|
defaultLocale = "en_CA.UTF-8";
|
||||||
extraLocaleSettings = {
|
extraLocaleSettings.LC_MONETARY = "es_MX.UTF-8";
|
||||||
LC_MONETARY = "es_MX.UTF-8";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
console = {
|
console = {
|
||||||
font = "Lat2-Terminus16";
|
font = "Lat2-Terminus16";
|
||||||
@@ -48,10 +46,6 @@
|
|||||||
};
|
};
|
||||||
security = {
|
security = {
|
||||||
polkit.enable = true;
|
polkit.enable = true;
|
||||||
sudo-rs = {
|
|
||||||
enable = true;
|
|
||||||
wheelNeedsPassword = false;
|
|
||||||
};
|
|
||||||
pam.loginLimits = [
|
pam.loginLimits = [
|
||||||
{
|
{
|
||||||
domain = "*";
|
domain = "*";
|
||||||
@@ -60,6 +54,10 @@
|
|||||||
value = "8192";
|
value = "8192";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
sudo-rs = {
|
||||||
|
enable = true;
|
||||||
|
wheelNeedsPassword = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
users = {
|
users = {
|
||||||
mutableUsers = false;
|
mutableUsers = false;
|
||||||
@@ -73,14 +71,6 @@
|
|||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "corefonts" ];
|
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "corefonts" ];
|
||||||
permittedInsecurePackages = [
|
|
||||||
"aspnetcore-runtime-wrapped-6.0.36"
|
|
||||||
"aspnetcore-runtime-6.0.36"
|
|
||||||
"dotnet-runtime-6.0.36"
|
|
||||||
"dotnet-sdk-wrapped-6.0.428"
|
|
||||||
"dotnet-sdk-6.0.428"
|
|
||||||
"mbedtls-2.28.10"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
nix = {
|
nix = {
|
||||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
|
|||||||
3
config/derek-home.nix
Normal file
3
config/derek-home.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
_: {
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
}
|
||||||
@@ -15,6 +15,9 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
sops.secrets = lib.mkIf config.my.secureHost {
|
||||||
|
derek-password.neededForUsers = true;
|
||||||
|
};
|
||||||
my = {
|
my = {
|
||||||
stylix = enableForDerek;
|
stylix = enableForDerek;
|
||||||
emacs = enableForDerek;
|
emacs = enableForDerek;
|
||||||
@@ -34,9 +37,6 @@ in
|
|||||||
multimedia = enableForDerek;
|
multimedia = enableForDerek;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
sops.secrets = lib.mkIf config.my.secureHost {
|
|
||||||
derek-password.neededForUsers = true;
|
|
||||||
};
|
|
||||||
services = {
|
services = {
|
||||||
tailscale.enable = true;
|
tailscale.enable = true;
|
||||||
sunshine = {
|
sunshine = {
|
||||||
@@ -48,17 +48,15 @@ in
|
|||||||
};
|
};
|
||||||
networking.nftables = {
|
networking.nftables = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tables = {
|
tables.local-uid-block = {
|
||||||
local-uid-block = {
|
family = "inet";
|
||||||
family = "inet";
|
content = ''
|
||||||
content = ''
|
chain output {
|
||||||
chain output {
|
type filter hook output priority 0; policy accept;
|
||||||
type filter hook output priority 0; policy accept;
|
meta skuid ${toString derekUid} ip daddr 127.0.0.1 tcp dport { ${toString openWebuiPort}, ${toString sillytavernPort} } drop
|
||||||
meta skuid ${toString derekUid} ip daddr 127.0.0.1 tcp dport { ${toString openWebuiPort}, ${toString sillytavernPort} } drop
|
meta skuid ${toString derekUid} ip6 daddr ::1 tcp dport { ${toString openWebuiPort}, ${toString sillytavernPort} } drop
|
||||||
meta skuid ${toString derekUid} ip6 daddr ::1 tcp dport { ${toString openWebuiPort}, ${toString sillytavernPort} } drop
|
}
|
||||||
}
|
'';
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.users.bearded_dragonn = {
|
users.users.bearded_dragonn = {
|
||||||
@@ -86,5 +84,4 @@ in
|
|||||||
"games"
|
"games"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
home-manager.users.bearded_dragonn.home.stateVersion = "23.05";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,17 +3,26 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
osConfig ? null,
|
||||||
|
preferredShell ? "zsh",
|
||||||
|
userEmail ? "danilo.reyes.251@proton.me",
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs) fd fzf;
|
inherit (pkgs) fd fzf;
|
||||||
inherit (inputs.jawz-scripts.packages.x86_64-linux) pokemon-colorscripts;
|
pokemon-colorscripts = lib.attrByPath [
|
||||||
shellType = osConfig.my.shell.type;
|
pkgs.stdenv.hostPlatform.system
|
||||||
commonInit = ''
|
"pokemon-colorscripts"
|
||||||
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
|
] null inputs.jawz-scripts.packages;
|
||||||
export command_timeout=60
|
shellType = if osConfig == null then preferredShell else osConfig.my.shell.type;
|
||||||
'';
|
stylixEnabled = if osConfig == null then false else lib.hasAttrByPath [ "my" "stylix" ] osConfig;
|
||||||
|
commonInit =
|
||||||
|
lib.optionalString (pokemon-colorscripts != null) ''
|
||||||
|
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
|
||||||
|
''
|
||||||
|
+ ''
|
||||||
|
export command_timeout=60
|
||||||
|
'';
|
||||||
commonAliases = inputs.self.lib.commonAliases // {
|
commonAliases = inputs.self.lib.commonAliases // {
|
||||||
open-gallery = ''
|
open-gallery = ''
|
||||||
cd /srv/pool/scrapping/JawZ/gallery-dl &&
|
cd /srv/pool/scrapping/JawZ/gallery-dl &&
|
||||||
@@ -21,30 +30,15 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./jawz-home.nix ];
|
imports =
|
||||||
|
lib.optionals (osConfig != null) [
|
||||||
|
./jawz-home.nix
|
||||||
|
]
|
||||||
|
++ lib.optionals stylixEnabled [
|
||||||
|
./stylix-home.nix
|
||||||
|
];
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
programs = {
|
programs = {
|
||||||
direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = shellType == "bash";
|
|
||||||
enableZshIntegration = shellType == "zsh";
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
};
|
|
||||||
git = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
pull.rebase = true;
|
|
||||||
init.defaultBranch = "main";
|
|
||||||
user = {
|
|
||||||
inherit (osConfig.my) email;
|
|
||||||
name = "Danilo Reyes";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
delta = {
|
|
||||||
enable = true;
|
|
||||||
enableGitIntegration = true;
|
|
||||||
};
|
|
||||||
ssh.enableDefaultConfig = false;
|
ssh.enableDefaultConfig = false;
|
||||||
bash = lib.mkIf (shellType == "bash") {
|
bash = lib.mkIf (shellType == "bash") {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -60,7 +54,7 @@ in
|
|||||||
};
|
};
|
||||||
zsh = lib.mkIf (shellType == "zsh") {
|
zsh = lib.mkIf (shellType == "zsh") {
|
||||||
enable = true;
|
enable = true;
|
||||||
dotDir = ".config/zsh";
|
dotDir = "${config.xdg.configHome}/zsh";
|
||||||
shellAliases = commonAliases;
|
shellAliases = commonAliases;
|
||||||
initContent = commonInit;
|
initContent = commonInit;
|
||||||
history = {
|
history = {
|
||||||
@@ -70,10 +64,31 @@ in
|
|||||||
ignoreAllDups = true;
|
ignoreAllDups = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
delta = {
|
||||||
|
enable = true;
|
||||||
|
enableGitIntegration = true;
|
||||||
|
};
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = shellType == "bash";
|
||||||
|
enableZshIntegration = shellType == "zsh";
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
pull.rebase = true;
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
user = {
|
||||||
|
email = if osConfig == null then userEmail else osConfig.my.email;
|
||||||
|
name = "Danilo Reyes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userDirs = {
|
userDirs = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
enable = true;
|
enable = true;
|
||||||
createDirectories = false;
|
createDirectories = false;
|
||||||
desktop = "${config.home.homeDirectory}";
|
desktop = "${config.home.homeDirectory}";
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ in
|
|||||||
];
|
];
|
||||||
openssh.authorizedKeys.keyFiles = inputs.self.lib.getSshKeys [
|
openssh.authorizedKeys.keyFiles = inputs.self.lib.getSshKeys [
|
||||||
"deacero"
|
"deacero"
|
||||||
|
"mac"
|
||||||
"workstation"
|
"workstation"
|
||||||
"server"
|
"server"
|
||||||
"miniserver"
|
"miniserver"
|
||||||
|
|||||||
41
config/stylix-home.nix
Normal file
41
config/stylix-home.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
schemesFile = import ./schemes.nix {
|
||||||
|
inherit pkgs inputs;
|
||||||
|
};
|
||||||
|
scheme = schemesFile.schemes.paul;
|
||||||
|
cfg = osConfig.my.stylix;
|
||||||
|
gnomeEnabled = osConfig.services.desktopManager.gnome.enable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
gtk = lib.mkIf (!cfg.enable && gnomeEnabled) {
|
||||||
|
enable = true;
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Light";
|
||||||
|
package = pkgs.papirus-icon-theme.override {
|
||||||
|
color = "yellow";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
stylix = {
|
||||||
|
inherit (cfg) enable;
|
||||||
|
autoEnable = cfg.enable;
|
||||||
|
iconTheme = {
|
||||||
|
enable = true;
|
||||||
|
package = scheme.iconPackage;
|
||||||
|
light = "Papirus-Light";
|
||||||
|
dark = "Papirus-Dark";
|
||||||
|
};
|
||||||
|
targets.librewolf = {
|
||||||
|
firefoxGnomeTheme.enable = true;
|
||||||
|
profileNames = [ config.home.username ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -11,7 +11,6 @@ let
|
|||||||
};
|
};
|
||||||
scheme = schemesFile.schemes.paul;
|
scheme = schemesFile.schemes.paul;
|
||||||
cfg = config.my.stylix;
|
cfg = config.my.stylix;
|
||||||
gnomeEnabled = config.services.desktopManager.gnome.enable;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.stylix = {
|
options.my.stylix = {
|
||||||
@@ -22,38 +21,11 @@ in
|
|||||||
description = "Users to apply Stylix theming for";
|
description = "Users to apply Stylix theming for";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config.stylix = {
|
||||||
stylix = {
|
inherit (scheme) image polarity;
|
||||||
inherit (scheme) image polarity;
|
enable = true;
|
||||||
enable = true;
|
autoEnable = cfg.enable;
|
||||||
autoEnable = cfg.enable;
|
targets.qt.platform = lib.mkForce "qtct";
|
||||||
targets.qt.platform = lib.mkForce "qtct";
|
}
|
||||||
}
|
// lib.optionalAttrs (scheme ? base16Scheme) { inherit (scheme) base16Scheme; };
|
||||||
// lib.optionalAttrs (scheme ? base16Scheme) { inherit (scheme) base16Scheme; };
|
|
||||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.stylix.users (user: {
|
|
||||||
gtk = lib.mkIf (!cfg.enable && gnomeEnabled) {
|
|
||||||
enable = true;
|
|
||||||
iconTheme = {
|
|
||||||
name = "Papirus-Light";
|
|
||||||
package = pkgs.papirus-icon-theme.override {
|
|
||||||
color = "yellow";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
stylix = {
|
|
||||||
inherit (cfg) enable;
|
|
||||||
autoEnable = cfg.enable;
|
|
||||||
iconTheme = {
|
|
||||||
enable = true;
|
|
||||||
package = scheme.iconPackage;
|
|
||||||
light = "Papirus-Light";
|
|
||||||
dark = "Papirus-Dark";
|
|
||||||
};
|
|
||||||
targets.librewolf = {
|
|
||||||
firefoxGnomeTheme.enable = true;
|
|
||||||
profileNames = [ user ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,11 @@
|
|||||||
|
|
||||||
## Repository Overview
|
## Repository Overview
|
||||||
- Architecture: Flake-based repo using `flake-parts` with inputs for pkgs (stable/unstable), stylix, home-manager, sops-nix, and service overlays. Common modules are composed through `parts/core.nix` and `parts/hosts.nix`.
|
- Architecture: Flake-based repo using `flake-parts` with inputs for pkgs (stable/unstable), stylix, home-manager, sops-nix, and service overlays. Common modules are composed through `parts/core.nix` and `parts/hosts.nix`.
|
||||||
|
- Host outputs: `parts/hosts.nix` publishes NixOS hosts through `flake.nixosConfigurations` and standalone Home Manager hosts through `flake.homeConfigurations`.
|
||||||
- Module auto-import: `modules/modules.nix` auto-imports legacy flat modules under `modules/apps`, `modules/dev`, `modules/scripts`, `modules/servers`, `modules/services`, `modules/shell`, `modules/websites`, and `modules/network`, excluding `librewolf.nix`, and also discovers nested `nixos.nix` files under those trees. `config/base.nix` registers `modules/home-manager.nix` as a Home Manager shared module, which discovers nested `home.nix` files under `modules/` for every Home Manager user. Factories live in `modules/factories/` (`mkserver`, `mkscript`), and shared options are in `modules/nix` and `modules/users`.
|
- Module auto-import: `modules/modules.nix` auto-imports legacy flat modules under `modules/apps`, `modules/dev`, `modules/scripts`, `modules/servers`, `modules/services`, `modules/shell`, `modules/websites`, and `modules/network`, excluding `librewolf.nix`, and also discovers nested `nixos.nix` files under those trees. `config/base.nix` registers `modules/home-manager.nix` as a Home Manager shared module, which discovers nested `home.nix` files under `modules/` for every Home Manager user. Factories live in `modules/factories/` (`mkserver`, `mkscript`), and shared options are in `modules/nix` and `modules/users`.
|
||||||
|
- Home Manager helper layer: Common Home Manager wrapper logic belongs in `parts/core.nix` helpers under `inputs.self.lib` when it is repeated across multiple `home.nix` modules. Current helpers include split-loader support plus `hmModule`, `hmShellType`, and `hmOnlyUser` for shared enablement and shell-selection patterns.
|
||||||
- Hosts and toggles: Host definitions live in `hosts/<name>/configuration.nix` with host-specific toggles in `hosts/<name>/toggles.nix`. The `my` namespace carries toggles for apps/dev/scripts/services/shell, feature flags like `enableProxy` and `enableContainers`, and per-host `interfaces` and `ips` maps.
|
- Hosts and toggles: Host definitions live in `hosts/<name>/configuration.nix` with host-specific toggles in `hosts/<name>/toggles.nix`. The `my` namespace carries toggles for apps/dev/scripts/services/shell, feature flags like `enableProxy` and `enableContainers`, and per-host `interfaces` and `ips` maps.
|
||||||
|
- Standalone Home Manager hosts: Home-only hosts may live under `hosts/<name>/home.nix` with `hosts/<name>/toggles.nix`, and should only enable modules that have a `home.nix` surface or are otherwise known to be Home Manager-compatible on that platform.
|
||||||
- Port assignment: Service ports should live with the service module when the port is intrinsic to a server definition under `modules/servers/`. Miscellaneous or host-specific ports that do not belong to a server module should be centralized in `my.ports` in `modules/modules.nix` and referenced via `config.my.ports.*` (use `toString config.my.ports.*` where a string is required).
|
- Port assignment: Service ports should live with the service module when the port is intrinsic to a server definition under `modules/servers/`. Miscellaneous or host-specific ports that do not belong to a server module should be centralized in `my.ports` in `modules/modules.nix` and referenced via `config.my.ports.*` (use `toString config.my.ports.*` where a string is required).
|
||||||
- Main server and proxies: `my.mainServer` selects the host that should serve traffic by default (default `vps`). Reverse proxies use helpers in `parts/core.nix` (`proxy`, `proxyReverse`, `proxyReverseFix`, `proxyReversePrivate`) and pick IPs from `my.ips` plus the hostName/ip set by `mkserver` options. Nginx defaults to `proxyReverse` for any server with `enableProxy = true` unless `useDefaultProxy = false` or the server is listed in the Fix/Private proxy lists.
|
- Main server and proxies: `my.mainServer` selects the host that should serve traffic by default (default `vps`). Reverse proxies use helpers in `parts/core.nix` (`proxy`, `proxyReverse`, `proxyReverseFix`, `proxyReversePrivate`) and pick IPs from `my.ips` plus the hostName/ip set by `mkserver` options. Nginx defaults to `proxyReverse` for any server with `enableProxy = true` unless `useDefaultProxy = false` or the server is listed in the Fix/Private proxy lists.
|
||||||
- Secure hosts and secrets: `my.secureHost` gates SOPS secrets. Secure hosts load secrets from `secrets/*.yaml` and wireguard definitions; non-secure hosts (e.g., `hosts/emacs`) skip secret-dependent services. Default SOPS file is `secrets/secrets.yaml` via `config/base.nix`. Proxy-only services that need private certificates must still define their cert secrets when `enableProxy = true`.
|
- Secure hosts and secrets: `my.secureHost` gates SOPS secrets. Secure hosts load secrets from `secrets/*.yaml` and wireguard definitions; non-secure hosts (e.g., `hosts/emacs`) skip secret-dependent services. Default SOPS file is `secrets/secrets.yaml` via `config/base.nix`. Proxy-only services that need private certificates must still define their cert secrets when `enableProxy = true`.
|
||||||
@@ -18,6 +21,7 @@
|
|||||||
- Minimize comments; prefer clear naming and shared helpers (`modules/factories/mkserver.nix`, `modules/factories/mkscript.nix`) to avoid duplication.
|
- Minimize comments; prefer clear naming and shared helpers (`modules/factories/mkserver.nix`, `modules/factories/mkscript.nix`) to avoid duplication.
|
||||||
- Use business-level, technology-agnostic language in AI docs; reserve implementation detail for module code.
|
- Use business-level, technology-agnostic language in AI docs; reserve implementation detail for module code.
|
||||||
- Nix structure: flatten single-child attribute sets into their full path; keep multi-child sets nested for readability; merge siblings under a shared parent; flatten the shallowest subtree first to reduce indentation without losing clarity.
|
- Nix structure: flatten single-child attribute sets into their full path; keep multi-child sets nested for readability; merge siblings under a shared parent; flatten the shallowest subtree first to reduce indentation without losing clarity.
|
||||||
|
- Nix attribute ordering: prefer `options` before `config` in module bodies; inside attribute sets keep `inherit` statements first, then boolean leaf assignments, then other leaf assignments, then nested attribute sets; when simple leaves and nested children share a parent, place the simple leaves first.
|
||||||
```nix
|
```nix
|
||||||
config.services.jellyfin.enable = true; # preferred single-leaf form
|
config.services.jellyfin.enable = true; # preferred single-leaf form
|
||||||
config.services = {
|
config.services = {
|
||||||
@@ -28,6 +32,20 @@ config.services = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
options.my.example.enable = lib.mkEnableOption "example";
|
||||||
|
config = lib.mkIf config.my.example.enable {
|
||||||
|
services.example = {
|
||||||
|
enable = true;
|
||||||
|
port = 1234;
|
||||||
|
nested = {
|
||||||
|
value = "x";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Terminology and Naming Standards
|
## Terminology and Naming Standards
|
||||||
- Module: Prefer a feature directory under `modules/<category>/<name>/` with `nixos.nix` for system concerns and `home.nix` for Home Manager concerns. Legacy flat modules at `modules/<category>/<name>.nix` remain valid during migration.
|
- Module: Prefer a feature directory under `modules/<category>/<name>/` with `nixos.nix` for system concerns and `home.nix` for Home Manager concerns. Legacy flat modules at `modules/<category>/<name>.nix` remain valid during migration.
|
||||||
@@ -49,8 +67,10 @@ config.services = {
|
|||||||
## Module Categories and Active Hosts
|
## Module Categories and Active Hosts
|
||||||
- Module categories: apps, dev, scripts, servers, services, shell, websites, network, users, nix. Factories sit in `modules/factories/` and are imported explicitly; patch artifacts live at the repo root in `patches/`.
|
- Module categories: apps, dev, scripts, servers, services, shell, websites, network, users, nix. Factories sit in `modules/factories/` and are imported explicitly; patch artifacts live at the repo root in `patches/`.
|
||||||
- Split-module preference: For categories that need both system and Home Manager behavior, co-locate both surfaces in `modules/<category>/<name>/nixos.nix` and `modules/<category>/<name>/home.nix`. Keep helpers local to that directory only when they are feature-specific; otherwise promote them into shared helpers/factories.
|
- Split-module preference: For categories that need both system and Home Manager behavior, co-locate both surfaces in `modules/<category>/<name>/nixos.nix` and `modules/<category>/<name>/home.nix`. Keep helpers local to that directory only when they are feature-specific; otherwise promote them into shared helpers/factories.
|
||||||
|
- Home module helper rule: Extract repeated Home Manager wrapper code into `parts/core.nix` once at least a few modules share the same structure. Keep only feature-specific package lists, files, and service settings inside each `home.nix`.
|
||||||
- User config split: Personal configs may also split across `config/<name>.nix` for NixOS-side account/secrets state and `config/<name>-home.nix` for Home Manager-only state imported from the user home module.
|
- User config split: Personal configs may also split across `config/<name>.nix` for NixOS-side account/secrets state and `config/<name>-home.nix` for Home Manager-only state imported from the user home module.
|
||||||
- Active hosts: `workstation`, `server`, `miniserver`, `galaxy`, `emacs`, `vps`. Host roles and secure status are defined in `hosts/<name>/configuration.nix` and toggles in `hosts/<name>/toggles.nix`.
|
- Active hosts: `workstation`, `server`, `miniserver`, `galaxy`, `emacs`, `vps`. Host roles and secure status are defined in `hosts/<name>/configuration.nix` and toggles in `hosts/<name>/toggles.nix`.
|
||||||
|
- Standalone Home Manager hosts: `mac` is a planned `aarch64-darwin` Home Manager target under `flake.homeConfigurations`, intended to reuse workstation-style dev and shell modules without Linux GUI app modules.
|
||||||
|
|
||||||
## Precedence and Conflict Resolution
|
## Precedence and Conflict Resolution
|
||||||
- Precedence: This constitution is authoritative for AI. Human docs must be updated to match. If conflicts are found, align human docs to the constitution and log the resolution in `specs/001-ai-docs/research.md`.
|
- Precedence: This constitution is authoritative for AI. Human docs must be updated to match. If conflicts are found, align human docs to the constitution and log the resolution in `specs/001-ai-docs/research.md`.
|
||||||
|
|||||||
@@ -8,12 +8,13 @@
|
|||||||
1. Create `modules/<category>/<name>/nixos.nix` for NixOS-only concerns such as `users.users`, `environment.systemPackages`, `services.*`, `programs.*`, firewall rules, and SOPS-backed system resources.
|
1. Create `modules/<category>/<name>/nixos.nix` for NixOS-only concerns such as `users.users`, `environment.systemPackages`, `services.*`, `programs.*`, firewall rules, and SOPS-backed system resources.
|
||||||
2. Create `modules/<category>/<name>/home.nix` for Home Manager concerns such as `programs.*`, `xdg.*`, `home.file.*`, `services.*` within Home Manager, and per-user shell aliases/config files.
|
2. Create `modules/<category>/<name>/home.nix` for Home Manager concerns such as `programs.*`, `xdg.*`, `home.file.*`, `services.*` within Home Manager, and per-user shell aliases/config files.
|
||||||
3. Keep the toggle namespace aligned across both files so the same feature name remains recognizable. During migration, duplicate the option schema if needed rather than keeping Home Manager logic embedded in the NixOS module.
|
3. Keep the toggle namespace aligned across both files so the same feature name remains recognizable. During migration, duplicate the option schema if needed rather than keeping Home Manager logic embedded in the NixOS module.
|
||||||
4. If the feature has truly shared logic, extract it into a local helper file within the feature directory or promote it into `modules/factories/` when reused across features.
|
4. If the feature has truly shared logic, extract it into a local helper file within the feature directory. If the same Home Manager wrapper pattern repeats across multiple features, promote that wrapper logic into `parts/core.nix` helpers instead of cloning the same `osConfig` and shell-selection code.
|
||||||
5. Remove the legacy flat module only after the paired files evaluate cleanly and all references are updated.
|
5. Remove the legacy flat module only after the paired files evaluate cleanly and all references are updated.
|
||||||
- Validation:
|
- Validation:
|
||||||
- `modules/modules.nix` discovers the feature’s `nixos.nix`.
|
- `modules/modules.nix` discovers the feature’s `nixos.nix`.
|
||||||
- `config/base.nix` registers `modules/home-manager.nix` in `home-manager.sharedModules`, and that loader discovers the feature’s `home.nix`.
|
- `config/base.nix` registers `modules/home-manager.nix` in `home-manager.sharedModules`, and that loader discovers the feature’s `home.nix`.
|
||||||
- System-only settings no longer reference `home-manager.users.*`.
|
- System-only settings no longer reference `home-manager.users.*`.
|
||||||
- Home Manager settings no longer depend on `osConfig` unless that coupling is intentional and documented.
|
- Home Manager settings no longer depend on `osConfig` unless that coupling is intentional and documented.
|
||||||
|
- Repeated HM wrapper logic uses shared helpers from `parts/core.nix` instead of being copied between modules.
|
||||||
- Outputs: Split module directory, retained toggle shape, and updated docs if the feature introduces new structure patterns.
|
- Outputs: Split module directory, retained toggle shape, and updated docs if the feature introduces new structure patterns.
|
||||||
- References: `docs/constitution.md` (Repository Overview, Terminology and Naming Standards, Maintenance Triggers), `docs/reference/index.md` (Module Directories, Auto-Import Rules)
|
- References: `docs/constitution.md` (Repository Overview, Terminology and Naming Standards, Maintenance Triggers), `docs/reference/index.md` (Module Directories, Auto-Import Rules)
|
||||||
|
|||||||
@@ -29,9 +29,19 @@
|
|||||||
- Migration rule: Legacy flat `modules/<category>/<name>.nix` modules remain supported while features are moved into split directories.
|
- Migration rule: Legacy flat `modules/<category>/<name>.nix` modules remain supported while features are moved into split directories.
|
||||||
- Implication: Place new dual-surface modules in a feature directory so NixOS and Home Manager stay adjacent; no manual import wiring is required unless adding a new factory.
|
- Implication: Place new dual-surface modules in a feature directory so NixOS and Home Manager stay adjacent; no manual import wiring is required unless adding a new factory.
|
||||||
|
|
||||||
|
## Home Manager Helpers
|
||||||
|
- Shared helper home: `parts/core.nix` exports reusable Home Manager helper functions through `inputs.self.lib`.
|
||||||
|
- Current helpers:
|
||||||
|
- `hmModule` → derive default HM enablement from `osConfig.my.<path>` and the current Home Manager username.
|
||||||
|
- `hmShellType` → resolve `bash` vs `zsh` consistently for HM modules with or without `osConfig`.
|
||||||
|
- `hmOnlyUser` → gate HM snippets to a specific username when a feature is intentionally user-specific.
|
||||||
|
- Usage rule: Use these helpers for repeated wrapper logic; keep feature-specific package sets and config payloads in local `common.nix` or `home.nix` files.
|
||||||
|
|
||||||
## Hosts and Roles
|
## Hosts and Roles
|
||||||
- Configs: `hosts/<name>/configuration.nix` with toggles in `hosts/<name>/toggles.nix`.
|
- NixOS configs: `hosts/<name>/configuration.nix` with toggles in `hosts/<name>/toggles.nix`.
|
||||||
- Active hosts: `workstation`, `server`, `miniserver`, `galaxy`, `emacs`, `vps`.
|
- Standalone Home Manager configs: `hosts/<name>/home.nix` with optional toggles in `hosts/<name>/toggles.nix`.
|
||||||
|
- Active NixOS hosts: `workstation`, `server`, `miniserver`, `galaxy`, `emacs`, `vps`.
|
||||||
|
- Active Home Manager hosts: `mac`.
|
||||||
- Roles:
|
- Roles:
|
||||||
- workstation: developer desktop; provides build power for distributed builds.
|
- workstation: developer desktop; provides build power for distributed builds.
|
||||||
- server: primary services host; runs most services and WireGuard targets.
|
- server: primary services host; runs most services and WireGuard targets.
|
||||||
@@ -39,8 +49,15 @@
|
|||||||
- galaxy: small server variant using nixpkgs-small.
|
- galaxy: small server variant using nixpkgs-small.
|
||||||
- emacs: VM profile, `my.secureHost = false` for secret-free usage.
|
- emacs: VM profile, `my.secureHost = false` for secret-free usage.
|
||||||
- vps: Linode VPS image target, secure host with enrollment-based secrets.
|
- vps: Linode VPS image target, secure host with enrollment-based secrets.
|
||||||
|
- mac: planned standalone `aarch64-darwin` Home Manager target for dev and shell tooling.
|
||||||
- Network maps: `my.ips` and `my.interfaces` declared in `modules/modules.nix`; host toggles may override.
|
- Network maps: `my.ips` and `my.interfaces` declared in `modules/modules.nix`; host toggles may override.
|
||||||
|
|
||||||
|
## Home Configuration Outputs
|
||||||
|
- NixOS outputs: `flake.nixosConfigurations.<name>` for Linux system hosts.
|
||||||
|
- Home Manager outputs: `flake.homeConfigurations.<name>` for standalone HM hosts.
|
||||||
|
- Current standalone HM example: `homeConfigurations.mac`.
|
||||||
|
- Validation note: Darwin home configurations can be evaluated from Linux, but their activation packages cannot be realized locally on a Linux builder.
|
||||||
|
|
||||||
## Proxy, Firewall, and Networking
|
## Proxy, Firewall, and Networking
|
||||||
- Proxy enablement: `my.enableProxy` toggles Nginx reverse proxy; assertions require at least one `my.servers.*.enableProxy` when enabled.
|
- Proxy enablement: `my.enableProxy` toggles Nginx reverse proxy; assertions require at least one `my.servers.*.enableProxy` when enabled.
|
||||||
- Proxy helpers: use `parts/core.nix` helpers (`proxy`, `proxyReverse`, `proxyReverseFix` for header preservation, `proxyReversePrivate` for mutual TLS). `mkserver` supplies `host`, `ip`, `url`, `enableProxy`, and `useDefaultProxy`.
|
- Proxy helpers: use `parts/core.nix` helpers (`proxy`, `proxyReverse`, `proxyReverseFix` for header preservation, `proxyReversePrivate` for mutual TLS). `mkserver` supplies `host`, `ip`, `url`, `enableProxy`, and `useDefaultProxy`.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
output.mode = "auto";
|
||||||
extractor = {
|
extractor = {
|
||||||
skip = "abort:5";
|
skip = "abort:5";
|
||||||
cookies = [
|
cookies = [
|
||||||
@@ -8,6 +9,29 @@
|
|||||||
];
|
];
|
||||||
retries = 10;
|
retries = 10;
|
||||||
sleep-request = 0;
|
sleep-request = 0;
|
||||||
|
pinterest.directory = [
|
||||||
|
"{board[owner][username]}"
|
||||||
|
"{board[name]}"
|
||||||
|
];
|
||||||
|
exhentai.directory = [
|
||||||
|
"{category}"
|
||||||
|
"{title}"
|
||||||
|
];
|
||||||
|
gfycat.format = "webm";
|
||||||
|
imgur.mp4 = true;
|
||||||
|
paheal.directory = [
|
||||||
|
"Husbands"
|
||||||
|
"{search_tags}"
|
||||||
|
];
|
||||||
|
rule34.directory = [
|
||||||
|
"Husbands"
|
||||||
|
"{search_tags}"
|
||||||
|
];
|
||||||
|
e621.directory = [
|
||||||
|
"Husbands"
|
||||||
|
"{search_tags}"
|
||||||
|
];
|
||||||
|
baraag.directory = [ "{account[username]}" ];
|
||||||
directlink = {
|
directlink = {
|
||||||
filename = "{filename}.{extension}";
|
filename = "{filename}.{extension}";
|
||||||
directory = [ ];
|
directory = [ ];
|
||||||
@@ -35,10 +59,6 @@
|
|||||||
"{owner[username]}"
|
"{owner[username]}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
pinterest.directory = [
|
|
||||||
"{board[owner][username]}"
|
|
||||||
"{board[name]}"
|
|
||||||
];
|
|
||||||
wikifeet = {
|
wikifeet = {
|
||||||
page-reverse = true;
|
page-reverse = true;
|
||||||
directory = [
|
directory = [
|
||||||
@@ -55,6 +75,11 @@
|
|||||||
parent-directory = true;
|
parent-directory = true;
|
||||||
directory = [ "{username}" ];
|
directory = [ "{username}" ];
|
||||||
previews = true;
|
previews = true;
|
||||||
|
tagged.directory = [
|
||||||
|
"{username}"
|
||||||
|
"tagged"
|
||||||
|
"{tagged_username}"
|
||||||
|
];
|
||||||
highlights = {
|
highlights = {
|
||||||
reverse = true;
|
reverse = true;
|
||||||
directory = [ "{username}" ];
|
directory = [ "{username}" ];
|
||||||
@@ -63,11 +88,6 @@
|
|||||||
reverse = true;
|
reverse = true;
|
||||||
directory = [ "{username}" ];
|
directory = [ "{username}" ];
|
||||||
};
|
};
|
||||||
tagged.directory = [
|
|
||||||
"{username}"
|
|
||||||
"tagged"
|
|
||||||
"{tagged_username}"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
kemonoparty = {
|
kemonoparty = {
|
||||||
limit-rate = "200k-300k";
|
limit-rate = "200k-300k";
|
||||||
@@ -79,10 +99,6 @@
|
|||||||
"{user}"
|
"{user}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
exhentai.directory = [
|
|
||||||
"{category}"
|
|
||||||
"{title}"
|
|
||||||
];
|
|
||||||
tumblr = {
|
tumblr = {
|
||||||
external = true;
|
external = true;
|
||||||
inline = true;
|
inline = true;
|
||||||
@@ -132,7 +148,6 @@
|
|||||||
external = true;
|
external = true;
|
||||||
directory = [ "{userinfo[username]}" ];
|
directory = [ "{userinfo[username]}" ];
|
||||||
};
|
};
|
||||||
gfycat.format = "webm";
|
|
||||||
reddit = {
|
reddit = {
|
||||||
user-agent = "Python:gallery-dl:v1.0 (by /u/captainjawz)";
|
user-agent = "Python:gallery-dl:v1.0 (by /u/captainjawz)";
|
||||||
client-id = "T7nZ6WZ3_onJWBhLP8r08g";
|
client-id = "T7nZ6WZ3_onJWBhLP8r08g";
|
||||||
@@ -143,20 +158,6 @@
|
|||||||
reverse = true;
|
reverse = true;
|
||||||
directory = [ "{userName}" ];
|
directory = [ "{userName}" ];
|
||||||
};
|
};
|
||||||
imgur.mp4 = true;
|
|
||||||
paheal.directory = [
|
|
||||||
"Husbands"
|
|
||||||
"{search_tags}"
|
|
||||||
];
|
|
||||||
rule34.directory = [
|
|
||||||
"Husbands"
|
|
||||||
"{search_tags}"
|
|
||||||
];
|
|
||||||
e621.directory = [
|
|
||||||
"Husbands"
|
|
||||||
"{search_tags}"
|
|
||||||
];
|
|
||||||
baraag.directory = [ "{account[username]}" ];
|
|
||||||
pixiv = {
|
pixiv = {
|
||||||
directory = [ "{user[account]} - {user[id]}" ];
|
directory = [ "{user[account]} - {user[id]}" ];
|
||||||
ugoira = true;
|
ugoira = true;
|
||||||
@@ -275,7 +276,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
output.mode = "auto";
|
|
||||||
downloader = {
|
downloader = {
|
||||||
part = true;
|
part = true;
|
||||||
part-directory = "/home/jawz/.cache/gallery-dl";
|
part-directory = "/home/jawz/.cache/gallery-dl";
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
users.users.jawz.packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
adw-gtk3 # theme legacy applications
|
||||||
|
papirus-icon-theme # icon theme
|
||||||
|
;
|
||||||
|
};
|
||||||
services = {
|
services = {
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
xserver = {
|
xserver = {
|
||||||
@@ -12,10 +18,4 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
style = "adwaita";
|
style = "adwaita";
|
||||||
};
|
};
|
||||||
users.users.jawz.packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
adw-gtk3 # theme legacy applications
|
|
||||||
papirus-icon-theme # icon theme
|
|
||||||
;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,11 +23,6 @@ in
|
|||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
qt.enable = true;
|
qt.enable = true;
|
||||||
services = {
|
|
||||||
gvfs.enable = true;
|
|
||||||
displayManager.gdm.enable = true;
|
|
||||||
desktopManager.gnome.enable = true;
|
|
||||||
};
|
|
||||||
environment.gnome.excludePackages = builtins.attrValues {
|
environment.gnome.excludePackages = builtins.attrValues {
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
baobab
|
baobab
|
||||||
@@ -55,5 +50,10 @@ in
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
services = {
|
||||||
|
gvfs.enable = true;
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
desktopManager.gnome.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
113
environments/hyprland-home.nix
Normal file
113
environments/hyprland-home.nix
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
mod = "SUPER";
|
||||||
|
waybarConfig = import ./waybar-config.nix { inherit pkgs config; };
|
||||||
|
waybarStyle = import ./waybar-style.nix { inherit config; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
waybar = waybarConfig.programs.waybar // {
|
||||||
|
style = waybarStyle;
|
||||||
|
};
|
||||||
|
wofi = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
allow_images = true;
|
||||||
|
allow_markup = true;
|
||||||
|
insensitive = true;
|
||||||
|
width = "30%";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
bind = [
|
||||||
|
"${mod}, return, exec, ghostty"
|
||||||
|
"${mod}, Q, killactive,"
|
||||||
|
"${mod} SHIFT, F, togglefloating,"
|
||||||
|
"${mod}, F, fullscreen,"
|
||||||
|
"${mod}, T, pin,"
|
||||||
|
"${mod}, G, togglegroup,"
|
||||||
|
"${mod}, bracketleft, changegroupactive, b"
|
||||||
|
"${mod}, bracketright, changegroupactive, f"
|
||||||
|
"${mod}, S, exec, wofi --show drun icons"
|
||||||
|
"${mod}, P, pin, active"
|
||||||
|
"${mod}, left, movefocus, l"
|
||||||
|
"${mod}, right, movefocus, r"
|
||||||
|
"${mod}, up, movefocus, u"
|
||||||
|
"${mod}, down, movefocus, d"
|
||||||
|
"${mod}, h, movefocus, l"
|
||||||
|
"${mod}, l, movefocus, r"
|
||||||
|
"${mod}, k, movefocus, u"
|
||||||
|
"${mod}, j, movefocus, d"
|
||||||
|
"${mod} SHIFT, left, movewindow, l"
|
||||||
|
"${mod} SHIFT, right, movewindow, r"
|
||||||
|
"${mod} SHIFT, up, movewindow, u"
|
||||||
|
"${mod} SHIFT, down, movewindow, d"
|
||||||
|
"${mod} SHIFT, h, movewindow, l"
|
||||||
|
"${mod} SHIFT, l, movewindow, r"
|
||||||
|
"${mod} SHIFT, k, movewindow, u"
|
||||||
|
"${mod} SHIFT, j, movewindow, d"
|
||||||
|
"${mod}, 1, workspace, 1"
|
||||||
|
"${mod}, 2, workspace, 2"
|
||||||
|
"${mod}, 3, workspace, 3"
|
||||||
|
"${mod}, 4, workspace, 4"
|
||||||
|
"${mod}, 5, workspace, 5"
|
||||||
|
"${mod}, 6, workspace, 6"
|
||||||
|
"${mod}, 7, workspace, 7"
|
||||||
|
"${mod}, 8, workspace, 8"
|
||||||
|
"${mod}, 9, workspace, 9"
|
||||||
|
"${mod}, 0, workspace, 10"
|
||||||
|
"${mod} SHIFT, 1, movetoworkspace, 1"
|
||||||
|
"${mod} SHIFT, 2, movetoworkspace, 2"
|
||||||
|
"${mod} SHIFT, 3, movetoworkspace, 3"
|
||||||
|
"${mod} SHIFT, 4, movetoworkspace, 4"
|
||||||
|
"${mod} SHIFT, 5, movetoworkspace, 5"
|
||||||
|
"${mod} SHIFT, 6, movetoworkspace, 6"
|
||||||
|
"${mod} SHIFT, 7, movetoworkspace, 7"
|
||||||
|
"${mod} SHIFT, 8, movetoworkspace, 8"
|
||||||
|
"${mod} SHIFT, 9, movetoworkspace, 9"
|
||||||
|
"${mod} SHIFT, 0, movetoworkspace, 10"
|
||||||
|
"${mod}, F3, exec, grimblast save area ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
||||||
|
"${mod} SHIFT, F3, exec, grimblast save screen ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
||||||
|
];
|
||||||
|
binde = [
|
||||||
|
"${mod} SHIFT, h, moveactive, -20 0"
|
||||||
|
"${mod} SHIFT, l, moveactive, 20 0"
|
||||||
|
"${mod} SHIFT, k, moveactive, 0 -20"
|
||||||
|
"${mod} SHIFT, j, moveactive, 0 20"
|
||||||
|
"${mod} CTRL, l, resizeactive, 30 0"
|
||||||
|
"${mod} CTRL, h, resizeactive, -30 0"
|
||||||
|
"${mod} CTRL, k, resizeactive, 0 -10"
|
||||||
|
"${mod} CTRL, j, resizeactive, 0 10"
|
||||||
|
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
|
",XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
|
];
|
||||||
|
bindm = [
|
||||||
|
"${mod}, mouse:272, movewindow"
|
||||||
|
"${mod}, mouse:273, resizewindow"
|
||||||
|
];
|
||||||
|
general = {
|
||||||
|
gaps_in = 5;
|
||||||
|
gaps_out = 10;
|
||||||
|
border_size = 3;
|
||||||
|
layout = "dwindle";
|
||||||
|
};
|
||||||
|
misc = {
|
||||||
|
disable_hyprland_logo = true;
|
||||||
|
disable_splash_rendering = true;
|
||||||
|
force_default_wallpaper = 0;
|
||||||
|
};
|
||||||
|
dwindle = {
|
||||||
|
pseudotile = true;
|
||||||
|
preserve_split = true;
|
||||||
|
force_split = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,15 +1,23 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
mod = "SUPER";
|
|
||||||
waybarConfig = import ./waybar-config.nix { inherit pkgs config; };
|
|
||||||
waybarStyle = import ./waybar-style.nix { inherit config; };
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
programs.hyprland.enable = true;
|
programs.hyprland.enable = true;
|
||||||
|
users.users.jawz.packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
wl-clipboard-rs
|
||||||
|
wf-recorder
|
||||||
|
grimblast
|
||||||
|
mako
|
||||||
|
libnotify
|
||||||
|
swaylock-effects
|
||||||
|
yazi
|
||||||
|
imv
|
||||||
|
playerctl
|
||||||
|
;
|
||||||
|
};
|
||||||
|
home-manager.users.jawz.imports = [ ./hyprland-home.nix ];
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.default_session = {
|
settings.default_session = {
|
||||||
@@ -17,121 +25,4 @@ in
|
|||||||
user = "greeter";
|
user = "greeter";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.users.jawz.packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
# Wayland utilities
|
|
||||||
wl-clipboard-rs
|
|
||||||
wf-recorder
|
|
||||||
grimblast # screenshots
|
|
||||||
mako # notification daemon
|
|
||||||
libnotify # dependency of mako
|
|
||||||
swaylock-effects # screen locker
|
|
||||||
yazi # file manager
|
|
||||||
imv # images
|
|
||||||
playerctl # media player control
|
|
||||||
;
|
|
||||||
};
|
|
||||||
home-manager.users.jawz = {
|
|
||||||
programs = {
|
|
||||||
wofi = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
allow_images = true;
|
|
||||||
allow_markup = true;
|
|
||||||
insensitive = true;
|
|
||||||
width = "30%";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
waybar = waybarConfig.programs.waybar // {
|
|
||||||
style = waybarStyle;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
wayland.windowManager.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
gaps_in = 5;
|
|
||||||
gaps_out = 10;
|
|
||||||
border_size = 3;
|
|
||||||
layout = "dwindle";
|
|
||||||
};
|
|
||||||
misc = {
|
|
||||||
disable_hyprland_logo = true;
|
|
||||||
disable_splash_rendering = true;
|
|
||||||
force_default_wallpaper = 0;
|
|
||||||
};
|
|
||||||
dwindle = {
|
|
||||||
pseudotile = true;
|
|
||||||
preserve_split = true;
|
|
||||||
force_split = 2;
|
|
||||||
};
|
|
||||||
bind = [
|
|
||||||
"${mod}, return, exec, ghostty"
|
|
||||||
"${mod}, Q, killactive,"
|
|
||||||
"${mod} SHIFT, F, togglefloating,"
|
|
||||||
"${mod}, F, fullscreen,"
|
|
||||||
"${mod}, T, pin,"
|
|
||||||
"${mod}, G, togglegroup,"
|
|
||||||
"${mod}, bracketleft, changegroupactive, b"
|
|
||||||
"${mod}, bracketright, changegroupactive, f"
|
|
||||||
"${mod}, S, exec, wofi --show drun icons"
|
|
||||||
"${mod}, P, pin, active"
|
|
||||||
"${mod}, left, movefocus, l"
|
|
||||||
"${mod}, right, movefocus, r"
|
|
||||||
"${mod}, up, movefocus, u"
|
|
||||||
"${mod}, down, movefocus, d"
|
|
||||||
"${mod}, h, movefocus, l"
|
|
||||||
"${mod}, l, movefocus, r"
|
|
||||||
"${mod}, k, movefocus, u"
|
|
||||||
"${mod}, j, movefocus, d"
|
|
||||||
"${mod} SHIFT, left, movewindow, l"
|
|
||||||
"${mod} SHIFT, right, movewindow, r"
|
|
||||||
"${mod} SHIFT, up, movewindow, u"
|
|
||||||
"${mod} SHIFT, down, movewindow, d"
|
|
||||||
"${mod} SHIFT, h, movewindow, l"
|
|
||||||
"${mod} SHIFT, l, movewindow, r"
|
|
||||||
"${mod} SHIFT, k, movewindow, u"
|
|
||||||
"${mod} SHIFT, j, movewindow, d"
|
|
||||||
"${mod}, 1, workspace, 1"
|
|
||||||
"${mod}, 2, workspace, 2"
|
|
||||||
"${mod}, 3, workspace, 3"
|
|
||||||
"${mod}, 4, workspace, 4"
|
|
||||||
"${mod}, 5, workspace, 5"
|
|
||||||
"${mod}, 6, workspace, 6"
|
|
||||||
"${mod}, 7, workspace, 7"
|
|
||||||
"${mod}, 8, workspace, 8"
|
|
||||||
"${mod}, 9, workspace, 9"
|
|
||||||
"${mod}, 0, workspace, 10"
|
|
||||||
"${mod} SHIFT, 1, movetoworkspace, 1"
|
|
||||||
"${mod} SHIFT, 2, movetoworkspace, 2"
|
|
||||||
"${mod} SHIFT, 3, movetoworkspace, 3"
|
|
||||||
"${mod} SHIFT, 4, movetoworkspace, 4"
|
|
||||||
"${mod} SHIFT, 5, movetoworkspace, 5"
|
|
||||||
"${mod} SHIFT, 6, movetoworkspace, 6"
|
|
||||||
"${mod} SHIFT, 7, movetoworkspace, 7"
|
|
||||||
"${mod} SHIFT, 8, movetoworkspace, 8"
|
|
||||||
"${mod} SHIFT, 9, movetoworkspace, 9"
|
|
||||||
"${mod} SHIFT, 0, movetoworkspace, 10"
|
|
||||||
"${mod}, F3, exec, grimblast save area ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
|
||||||
"${mod} SHIFT, F3, exec, grimblast save screen ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
|
||||||
];
|
|
||||||
binde = [
|
|
||||||
"${mod} SHIFT, h, moveactive, -20 0"
|
|
||||||
"${mod} SHIFT, l, moveactive, 20 0"
|
|
||||||
"${mod} SHIFT, k, moveactive, 0 -20"
|
|
||||||
"${mod} SHIFT, j, moveactive, 0 20"
|
|
||||||
"${mod} CTRL, l, resizeactive, 30 0"
|
|
||||||
"${mod} CTRL, h, resizeactive, -30 0"
|
|
||||||
"${mod} CTRL, k, resizeactive, 0 -10"
|
|
||||||
"${mod} CTRL, j, resizeactive, 0 10"
|
|
||||||
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+"
|
|
||||||
",XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"
|
|
||||||
];
|
|
||||||
bindm = [
|
|
||||||
"${mod}, mouse:272, movewindow"
|
|
||||||
"${mod}, mouse:273, resizewindow"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
150
flake.lock
generated
150
flake.lock
generated
@@ -20,11 +20,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772292445,
|
"lastModified": 1774211390,
|
||||||
"narHash": "sha256-4F1Q7U313TKUDDovCC96m/Za4wZcJ3yqtu4eSrj8lk8=",
|
"narHash": "sha256-sTtAgCCaX8VNNZlQFACd3i1IQ+DB0Wf3COgiFS152ds=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "aquamarine",
|
"repo": "aquamarine",
|
||||||
"rev": "1dbbba659c1cef0b0202ce92cadfe13bae550e8f",
|
"rev": "f62a4dbfa4e5584f14ad4c62afedf6e4b433cf70",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -270,11 +270,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769996383,
|
"lastModified": 1772408722,
|
||||||
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -420,11 +420,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770726378,
|
"lastModified": 1774104215,
|
||||||
"narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=",
|
"narHash": "sha256-EAtviqz0sEAxdHS4crqu7JGR5oI3BwaqG0mw7CmXkO8=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae",
|
"rev": "f799ae951fde0627157f40aec28dec27b22076d0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -503,11 +503,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772633058,
|
"lastModified": 1774559029,
|
||||||
"narHash": "sha256-SO7JapRy2HPhgmqiLbfnW1kMx5rakPMKZ9z3wtRLQjI=",
|
"narHash": "sha256-deix7yg3j6AhjMPnFDCmWB3f83LsajaaULP5HH2j34k=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "080657a04188aca25f8a6c70a0fb2ea7e37f1865",
|
"rev": "a0bb0d11514f92b639514220114ac8063c72d0a3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -533,11 +533,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753964049,
|
"lastModified": 1772461003,
|
||||||
"narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
|
"narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprcursor",
|
"repo": "hyprcursor",
|
||||||
"rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
|
"rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -562,11 +562,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770511807,
|
"lastModified": 1772461523,
|
||||||
"narHash": "sha256-suKmSbSk34uPOJDTg/GbPrKEJutzK08vj0VoTvAFBCA=",
|
"narHash": "sha256-mI6A51do+hEUzeJKk9YSWfVHdI/SEEIBi2tp5Whq5mI=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprgraphics",
|
"repo": "hyprgraphics",
|
||||||
"rev": "7c75487edd43a71b61adb01cae8326d277aab683",
|
"rev": "7d63c04b4a2dd5e59ef943b4b143f46e713df804",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -594,11 +594,11 @@
|
|||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772723663,
|
"lastModified": 1774561136,
|
||||||
"narHash": "sha256-OKaOxpeK42A0QdlUkl68/4l32EZzQRHjKzBHXI3Q2a8=",
|
"narHash": "sha256-R/PNW48UnEwUIUr9QXMT6KY/laufI4ikiz7Druxpglg=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "ae9ca17b40e04cd11b53b82e9292d3070710df18",
|
"rev": "2fde538e0fa5663ac99f631fcfee6742e09368f6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -640,11 +640,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767023960,
|
"lastModified": 1772467975,
|
||||||
"narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=",
|
"narHash": "sha256-kipyuDBxrZq+beYpZqWzGvFWm4QbayW9agAvi94vDXY=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprland-guiutils",
|
"repo": "hyprland-guiutils",
|
||||||
"rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660",
|
"rev": "5e1c6b9025aaf4d578f3eff7c0eb1f0c197a9507",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -665,11 +665,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765214753,
|
"lastModified": 1772460177,
|
||||||
"narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=",
|
"narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprland-protocols",
|
"repo": "hyprland-protocols",
|
||||||
"rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab",
|
"rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -694,11 +694,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771866172,
|
"lastModified": 1772459629,
|
||||||
"narHash": "sha256-fYFoXhQLrm1rD8vSFKQBOEX4OGCuJdLt1amKfHd5GAw=",
|
"narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprlang",
|
"repo": "hyprlang",
|
||||||
"rev": "0b219224910e7642eb0ed49f0db5ec3d008e3e41",
|
"rev": "7615ee388de18239a4ab1400946f3d0e498a8186",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -746,11 +746,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764592794,
|
"lastModified": 1772462885,
|
||||||
"narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=",
|
"narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprtoolkit",
|
"repo": "hyprtoolkit",
|
||||||
"rev": "5cfe0743f0e608e1462972303778d8a0859ee63e",
|
"rev": "9af245a69fa6b286b88ddfc340afd288e00a6998",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -771,11 +771,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771271487,
|
"lastModified": 1774211405,
|
||||||
"narHash": "sha256-41gEiUS0Pyw3L/ge1l8MXn61cK14VAhgWB/JV8s/oNI=",
|
"narHash": "sha256-6KNwP4ojUzv3YBlZU5BqCpTrWHcix1Jo01BISsTT0xk=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprutils",
|
"repo": "hyprutils",
|
||||||
"rev": "340a792e3b3d482c4ae5f66d27a9096bdee6d76d",
|
"rev": "cb4e152dc72095a2af422956c6b689590572231a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -796,11 +796,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770501770,
|
"lastModified": 1772459835,
|
||||||
"narHash": "sha256-NWRM6+YxTRv+bT9yvlhhJ2iLae1B1pNH3mAL5wi2rlQ=",
|
"narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprwayland-scanner",
|
"repo": "hyprwayland-scanner",
|
||||||
"rev": "0bd8b6cde9ec27d48aad9e5b4deefb3746909d40",
|
"rev": "0a692d4a645165eebd65f109146b8861e3a925e7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -825,11 +825,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771606233,
|
"lastModified": 1773074819,
|
||||||
"narHash": "sha256-F3PLUqQ/TwgR70U+UeOqJnihJZ2EuunzojYC4g5xHr0=",
|
"narHash": "sha256-qRqYnXiKoJLRTcfaRukn7EifmST2IVBUMZOeZMAc5UA=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprwire",
|
"repo": "hyprwire",
|
||||||
"rev": "06c7f1f8c4194786c8400653c4efc49dc14c0f3a",
|
"rev": "f68afd0e73687598cc2774804fedad76693046f0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -888,11 +888,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772678126,
|
"lastModified": 1774579928,
|
||||||
"narHash": "sha256-MZVqAmjcTmicg4WP2SxtNksUXS6tigY+EwBatLxc1bM=",
|
"narHash": "sha256-HgDoK1Z1koMnEf1aX2FK02xwHmKsOmVR6dGhJOFZA9Y=",
|
||||||
"owner": "fufexan",
|
"owner": "fufexan",
|
||||||
"repo": "nix-gaming",
|
"repo": "nix-gaming",
|
||||||
"rev": "aa9ba54128d03151f11e96b3213b3791a5496fe5",
|
"rev": "34f157cab59fc5fec17f7cef7a0f563d303b3fc9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -934,11 +934,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-lib_2": {
|
"nixpkgs-lib_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769909678,
|
"lastModified": 1772328832,
|
||||||
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
|
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "72716169fe93074c333e8d0173151350670b824c",
|
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -967,11 +967,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-small": {
|
"nixpkgs-small": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772732736,
|
"lastModified": 1774514157,
|
||||||
"narHash": "sha256-I7VdClhEh24q/CEPXmVXDOtNHlLuivsjCuRZBMZI3fo=",
|
"narHash": "sha256-lwwrvZUpnuZDlVUAq2PyOoVAqtaNtwlzN3je5rU0Kk0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d577c8cbee801f339ce4b127ae3ec37392250d07",
|
"rev": "a593dd828e01ff1d2cac72f1b8ff7006ea26f1c5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -983,11 +983,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772963539,
|
"lastModified": 1774386573,
|
||||||
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
|
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
|
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -999,11 +999,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772598333,
|
"lastModified": 1774388614,
|
||||||
"narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=",
|
"narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239",
|
"rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1042,11 +1042,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772745558,
|
"lastModified": 1774602479,
|
||||||
"narHash": "sha256-pVmX5Z0PLUZIL7TFcfYyWNqEKDVf72bAz0PORyNQHSQ=",
|
"narHash": "sha256-kNKE7ipfCTNSApWzDMvOWcrM/+EFdztUyb3Czr8pThI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "361709a61eebc0b1783dd478677b7ac4e1efa0a2",
|
"rev": "b0f07268a8d1f633b4514a9c6c0814f3a4f7d229",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1090,11 +1090,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772024342,
|
"lastModified": 1774104215,
|
||||||
"narHash": "sha256-+eXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg=",
|
"narHash": "sha256-EAtviqz0sEAxdHS4crqu7JGR5oI3BwaqG0mw7CmXkO8=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476",
|
"rev": "f799ae951fde0627157f40aec28dec27b22076d0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1127,11 +1127,11 @@
|
|||||||
"qbit_manage": {
|
"qbit_manage": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764428351,
|
"lastModified": 1774123356,
|
||||||
"narHash": "sha256-JCsbf2mPRhs7Mbekl946G/y/CSNSSvQBLvlwVy/Avcg=",
|
"narHash": "sha256-7B2JZNK8ESbfNLCVUL40Rldj67LCdDHOa+BkL7xmOcY=",
|
||||||
"owner": "StuffAnThings",
|
"owner": "StuffAnThings",
|
||||||
"repo": "qbit_manage",
|
"repo": "qbit_manage",
|
||||||
"rev": "371627bbeb082e68f057bbe4599565c2e63a14c7",
|
"rev": "b2b035b7c06d7e81ecbd322c9c2ea18986718ae3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1172,11 +1172,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772495394,
|
"lastModified": 1774303811,
|
||||||
"narHash": "sha256-hmIvE/slLKEFKNEJz27IZ8BKlAaZDcjIHmkZ7GCEjfw=",
|
"narHash": "sha256-fhG4JAcLgjKwt+XHbjs8brpWnyKUfU4LikLm3s0Q/ic=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "1d9b98a29a45abe9c4d3174bd36de9f28755e3ff",
|
"rev": "614e256310e0a4f8a9ccae3fa80c11844fba7042",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1206,11 +1206,11 @@
|
|||||||
"tinted-zed": "tinted-zed"
|
"tinted-zed": "tinted-zed"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771788390,
|
"lastModified": 1774194089,
|
||||||
"narHash": "sha256-RzBpBwn93GWxLjacTte+ngwwg0L/BVOg4G/sSIeK3Rw=",
|
"narHash": "sha256-SCczWhr8y8aaXVHG+gOGcRahNb0BU1Z5zYZuv9W/nA8=",
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "ebb238f14d6f930068be4718472da3105fd5d3bf",
|
"rev": "7c34241d80ea64dd2039bb3a786fb66b4c6261d9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1472,11 +1472,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761431178,
|
"lastModified": 1773601989,
|
||||||
"narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=",
|
"narHash": "sha256-2tJf/CQoHApoIudxHeJye+0Ii7scR0Yyi7pNiWk0Hn8=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
"rev": "4b8801228ff958d028f588f0c2b911dbf32297f9",
|
"rev": "a9b862d1aa000a676d310cc62d249f7ad726233d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
20
flake.nix
20
flake.nix
@@ -1,5 +1,15 @@
|
|||||||
{
|
{
|
||||||
description = "JawZ NixOS flake setup";
|
description = "JawZ NixOS flake setup";
|
||||||
|
outputs =
|
||||||
|
inputs:
|
||||||
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
imports = [
|
||||||
|
./parts/core.nix
|
||||||
|
./parts/hosts.nix
|
||||||
|
./parts/packages.nix
|
||||||
|
./parts/devshells.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
inputs = {
|
inputs = {
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.11";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.11";
|
||||||
@@ -71,14 +81,4 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
outputs =
|
|
||||||
inputs:
|
|
||||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
|
||||||
imports = [
|
|
||||||
./parts/core.nix
|
|
||||||
./parts/hosts.nix
|
|
||||||
./parts/packages.nix
|
|
||||||
./parts/devshells.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
../../config/stylix.nix
|
../../config/stylix.nix
|
||||||
../../environments/hyprland.nix
|
../../environments/hyprland.nix
|
||||||
];
|
];
|
||||||
|
networking.hostName = "emacs";
|
||||||
|
environment.systemPackages = [ ];
|
||||||
virtualisation.vmVariant.virtualisation = {
|
virtualisation.vmVariant.virtualisation = {
|
||||||
memorySize = 4096;
|
memorySize = 4096;
|
||||||
cores = 4;
|
cores = 4;
|
||||||
@@ -23,6 +25,11 @@
|
|||||||
emacs.enable = true;
|
emacs.enable = true;
|
||||||
shell.tools.enable = true;
|
shell.tools.enable = true;
|
||||||
services.network.enable = true;
|
services.network.enable = true;
|
||||||
|
interfaces = lib.mkMerge [
|
||||||
|
{
|
||||||
|
emacs = "eth0";
|
||||||
|
}
|
||||||
|
];
|
||||||
dev = {
|
dev = {
|
||||||
nix.enable = true;
|
nix.enable = true;
|
||||||
python.enable = true;
|
python.enable = true;
|
||||||
@@ -37,12 +44,5 @@
|
|||||||
zig.enable = true;
|
zig.enable = true;
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
};
|
};
|
||||||
interfaces = lib.mkMerge [
|
|
||||||
{
|
|
||||||
emacs = "eth0";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
networking.hostName = "emacs";
|
|
||||||
environment.systemPackages = [ ];
|
|
||||||
}
|
}
|
||||||
|
|||||||
24
hosts/mac/home.nix
Normal file
24
hosts/mac/home.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
my = import ./toggles.nix { inherit inputs; };
|
||||||
|
home = {
|
||||||
|
username = "carlosdaniloreyesmartinez";
|
||||||
|
homeDirectory = "/Users/carlosdaniloreyesmartinez";
|
||||||
|
packages = [ pkgs.google-cloud-sdk ];
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
starship.enable = true;
|
||||||
|
kitty = {
|
||||||
|
enable = true;
|
||||||
|
settings.term = "xterm-256color";
|
||||||
|
shellIntegration = {
|
||||||
|
enableBashIntegration = false;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
17
hosts/mac/toggles.nix
Normal file
17
hosts/mac/toggles.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ inputs }:
|
||||||
|
let
|
||||||
|
inherit (inputs.self.lib) mkEnabled enableList;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
emacs.enable = true;
|
||||||
|
dev = enableList mkEnabled [
|
||||||
|
"nix"
|
||||||
|
"python"
|
||||||
|
"sh"
|
||||||
|
];
|
||||||
|
shell = enableList mkEnabled [
|
||||||
|
"exercism"
|
||||||
|
"multimedia"
|
||||||
|
"tools"
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -6,13 +6,17 @@
|
|||||||
../../config/stylix.nix
|
../../config/stylix.nix
|
||||||
];
|
];
|
||||||
my = import ./toggles.nix { inherit inputs; } // {
|
my = import ./toggles.nix { inherit inputs; } // {
|
||||||
nix.cores = 3;
|
nix = {
|
||||||
nix.maxJobs = 8;
|
cores = 3;
|
||||||
users.nixremote.enable = true;
|
maxJobs = 8;
|
||||||
users.nixremote.authorizedKeys = inputs.self.lib.getSshKeys [
|
};
|
||||||
"nixworkstation"
|
users.nixremote = {
|
||||||
"nixserver"
|
enable = true;
|
||||||
];
|
authorizedKeys = inputs.self.lib.getSshKeys [
|
||||||
|
"nixworkstation"
|
||||||
|
"nixserver"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
nix.buildMachines =
|
nix.buildMachines =
|
||||||
let
|
let
|
||||||
@@ -34,7 +38,6 @@
|
|||||||
allowedUDPPorts = [ 2049 ];
|
allowedUDPPorts = [ 2049 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1w" ];
|
|
||||||
services = {
|
services = {
|
||||||
btrfs.autoScrub = {
|
btrfs.autoScrub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -54,19 +54,17 @@
|
|||||||
fileSystems =
|
fileSystems =
|
||||||
let
|
let
|
||||||
nfsMount = server: nfsDisk: {
|
nfsMount = server: nfsDisk: {
|
||||||
device = "${server}:/${nfsDisk}";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [
|
options = [
|
||||||
"x-systemd.automount"
|
"x-systemd.automount"
|
||||||
"noauto"
|
"noauto"
|
||||||
"x-systemd.idle-timeout=600"
|
"x-systemd.idle-timeout=600"
|
||||||
];
|
];
|
||||||
|
device = "${server}:/${nfsDisk}";
|
||||||
|
fsType = "nfs";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "/dev/mapper/nvme";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [
|
options = [
|
||||||
"subvol=nix"
|
"subvol=nix"
|
||||||
"ssd"
|
"ssd"
|
||||||
@@ -77,10 +75,10 @@
|
|||||||
"datacow"
|
"datacow"
|
||||||
"noatime"
|
"noatime"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
"/home" = {
|
|
||||||
device = "/dev/mapper/nvme";
|
device = "/dev/mapper/nvme";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
"/home" = {
|
||||||
options = [
|
options = [
|
||||||
"subvol=home"
|
"subvol=home"
|
||||||
"ssd"
|
"ssd"
|
||||||
@@ -90,6 +88,8 @@
|
|||||||
"commit=120"
|
"commit=120"
|
||||||
"datacow"
|
"datacow"
|
||||||
];
|
];
|
||||||
|
device = "/dev/mapper/nvme";
|
||||||
|
fsType = "btrfs";
|
||||||
};
|
};
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-uuid/bf0aeb95-94cc-4377-b6e4-1dbb4958b334";
|
device = "/dev/disk/by-uuid/bf0aeb95-94cc-4377-b6e4-1dbb4958b334";
|
||||||
@@ -100,18 +100,18 @@
|
|||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
"/var/lib/nextcloud/data" = {
|
"/var/lib/nextcloud/data" = {
|
||||||
device = "/srv/pool/nextcloud";
|
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
|
device = "/srv/pool/nextcloud";
|
||||||
depends = [ "/srv/pool" ];
|
depends = [ "/srv/pool" ];
|
||||||
};
|
};
|
||||||
"/export/pool" = {
|
"/export/pool" = {
|
||||||
device = "/srv/pool";
|
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
|
device = "/srv/pool";
|
||||||
depends = [ "/srv/pool" ];
|
depends = [ "/srv/pool" ];
|
||||||
};
|
};
|
||||||
"/export/jawz" = {
|
"/export/jawz" = {
|
||||||
device = "/home/jawz";
|
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
|
device = "/home/jawz";
|
||||||
depends = [ "/srv/pool" ];
|
depends = [ "/srv/pool" ];
|
||||||
};
|
};
|
||||||
"/srv/server/pool" = nfsMount "server" "pool" // { };
|
"/srv/server/pool" = nfsMount "server" "pool" // { };
|
||||||
|
|||||||
@@ -8,14 +8,6 @@ let
|
|||||||
;
|
;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
emacs = {
|
|
||||||
enable = true;
|
|
||||||
users = "jawz";
|
|
||||||
};
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
users = "jawz";
|
|
||||||
};
|
|
||||||
enableProxy = true;
|
enableProxy = true;
|
||||||
websites.portfolio.enableProxy = true;
|
websites.portfolio.enableProxy = true;
|
||||||
apps = enableList mkEnabledWithUsers [
|
apps = enableList mkEnabledWithUsers [
|
||||||
@@ -49,4 +41,12 @@ in
|
|||||||
// enableList mkEnabledWithProxy [
|
// enableList mkEnabledWithProxy [
|
||||||
"audiobookshelf"
|
"audiobookshelf"
|
||||||
];
|
];
|
||||||
|
emacs = {
|
||||||
|
enable = true;
|
||||||
|
users = "jawz";
|
||||||
|
};
|
||||||
|
stylix = {
|
||||||
|
enable = true;
|
||||||
|
users = "jawz";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,22 +17,26 @@ in
|
|||||||
];
|
];
|
||||||
my = import ./toggles.nix { inherit config inputs; } // {
|
my = import ./toggles.nix { inherit config inputs; } // {
|
||||||
nix.cores = 6;
|
nix.cores = 6;
|
||||||
users.nixremote.enable = true;
|
users.nixremote = {
|
||||||
users.nixremote.authorizedKeys = inputs.self.lib.getSshKeys [
|
enable = true;
|
||||||
"nixworkstation"
|
authorizedKeys = inputs.self.lib.getSshKeys [
|
||||||
"nixminiserver"
|
"nixworkstation"
|
||||||
];
|
"nixminiserver"
|
||||||
network.firewall.enabledServicePorts = true;
|
];
|
||||||
network.firewall.additionalPorts = [
|
};
|
||||||
2049 # idk
|
network.firewall = {
|
||||||
config.my.ports.syncthingGui
|
enabledServicePorts = true;
|
||||||
config.my.ports.syncthingRelay
|
additionalPorts = [
|
||||||
config.my.ports.sonarqube
|
2049 # idk
|
||||||
config.my.ports.synapseSsl
|
config.my.ports.syncthingGui
|
||||||
config.my.ports.tdarr
|
config.my.ports.syncthingRelay
|
||||||
config.my.ports.mediaMap
|
config.my.ports.sonarqube
|
||||||
config.my.ports.qbittorrent
|
config.my.ports.synapseSsl
|
||||||
];
|
config.my.ports.tdarr
|
||||||
|
config.my.ports.mediaMap
|
||||||
|
config.my.ports.qbittorrent
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
nix.buildMachines = [
|
nix.buildMachines = [
|
||||||
{
|
{
|
||||||
@@ -44,6 +48,7 @@ in
|
|||||||
supportedFeatures = config.my.nix.features;
|
supportedFeatures = config.my.nix.features;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [ "mbedtls-2.28.10" ];
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
"server/private" = lib.mkIf config.my.secureHost {
|
"server/private" = lib.mkIf config.my.secureHost {
|
||||||
sopsFile = ../../secrets/wireguard.yaml;
|
sopsFile = ../../secrets/wireguard.yaml;
|
||||||
@@ -65,10 +70,6 @@ in
|
|||||||
};
|
};
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "server";
|
hostName = "server";
|
||||||
firewall = {
|
|
||||||
allowedUDPPorts = config.networking.firewall.allowedTCPPorts;
|
|
||||||
interfaces.wg0.allowedTCPPorts = [ config.my.servers.nextcloud.port ];
|
|
||||||
};
|
|
||||||
wireguard.interfaces.wg0 = lib.mkIf config.my.secureHost {
|
wireguard.interfaces.wg0 = lib.mkIf config.my.secureHost {
|
||||||
ips = [ "${config.my.ips.wg-server}/32" ];
|
ips = [ "${config.my.ips.wg-server}/32" ];
|
||||||
privateKeyFile = config.sops.secrets."server/private".path;
|
privateKeyFile = config.sops.secrets."server/private".path;
|
||||||
@@ -86,6 +87,10 @@ in
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
firewall = {
|
||||||
|
allowedUDPPorts = config.networking.firewall.allowedTCPPorts;
|
||||||
|
interfaces.wg0.allowedTCPPorts = [ config.my.servers.nextcloud.port ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
users.users.jawz.packages = builtins.attrValues {
|
users.users.jawz.packages = builtins.attrValues {
|
||||||
inherit (pkgs) podman-compose attic-client;
|
inherit (pkgs) podman-compose attic-client;
|
||||||
@@ -116,14 +121,12 @@ in
|
|||||||
vpsHost = "lidarr-reports@${config.my.ips.vps}";
|
vpsHost = "lidarr-reports@${config.my.ips.vps}";
|
||||||
vpsPath = "/var/www/html/lidarr-mb-gap";
|
vpsPath = "/var/www/html/lidarr-mb-gap";
|
||||||
sshKeyFile = config.sops.secrets."private_keys/lidarr-mb-gap".path;
|
sshKeyFile = config.sops.secrets."private_keys/lidarr-mb-gap".path;
|
||||||
sshKnownHosts = {
|
sshKnownHosts.vps = {
|
||||||
vps = {
|
hostNames = [
|
||||||
hostNames = [
|
config.my.ips.vps
|
||||||
config.my.ips.vps
|
"[${config.my.ips.vps}]:3456"
|
||||||
"[${config.my.ips.vps}]:3456"
|
];
|
||||||
];
|
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPp0wAuZXk96OyA/+2YpQalokS9lZdacjJqY9zN8IScP";
|
||||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPp0wAuZXk96OyA/+2YpQalokS9lZdacjJqY9zN8IScP";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -84,8 +84,6 @@ in
|
|||||||
};
|
};
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "/dev/mapper/nvme";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [
|
options = [
|
||||||
"subvol=nix"
|
"subvol=nix"
|
||||||
"ssd"
|
"ssd"
|
||||||
@@ -96,10 +94,10 @@ in
|
|||||||
"datacow"
|
"datacow"
|
||||||
"noatime"
|
"noatime"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
"/home" = {
|
|
||||||
device = "/dev/mapper/nvme";
|
device = "/dev/mapper/nvme";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
"/home" = {
|
||||||
options = [
|
options = [
|
||||||
"subvol=home"
|
"subvol=home"
|
||||||
"ssd"
|
"ssd"
|
||||||
@@ -109,19 +107,19 @@ in
|
|||||||
"commit=120"
|
"commit=120"
|
||||||
"datacow"
|
"datacow"
|
||||||
];
|
];
|
||||||
|
device = "/dev/mapper/nvme";
|
||||||
|
fsType = "btrfs";
|
||||||
};
|
};
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
|
options = [ "nofail" ];
|
||||||
device = "/dev/disk/by-uuid/c574cb53-dc40-46db-beff-0fe8a4787156";
|
device = "/dev/disk/by-uuid/c574cb53-dc40-46db-beff-0fe8a4787156";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
options = [ "nofail" ];
|
|
||||||
};
|
};
|
||||||
"/boot/efi" = {
|
"/boot/efi" = {
|
||||||
device = "/dev/disk/by-uuid/CBE7-5DEB";
|
device = "/dev/disk/by-uuid/CBE7-5DEB";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
"/srv/pool" = {
|
"/srv/pool" = {
|
||||||
device = "/dev/disk/by-uuid/1e7cf787-e34d-4e3e-ac3c-0c07309dbd34";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [
|
options = [
|
||||||
"subvol=@data"
|
"subvol=@data"
|
||||||
"compress=zstd:3"
|
"compress=zstd:3"
|
||||||
@@ -129,34 +127,36 @@ in
|
|||||||
"commit=120"
|
"commit=120"
|
||||||
"datacow"
|
"datacow"
|
||||||
];
|
];
|
||||||
|
device = "/dev/disk/by-uuid/1e7cf787-e34d-4e3e-ac3c-0c07309dbd34";
|
||||||
|
fsType = "btrfs";
|
||||||
depends = [ "/boot/efi" ];
|
depends = [ "/boot/efi" ];
|
||||||
};
|
};
|
||||||
"/var/lib/nextcloud/data" = {
|
"/var/lib/nextcloud/data" = {
|
||||||
device = "/srv/pool/nextcloud";
|
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
|
device = "/srv/pool/nextcloud";
|
||||||
depends = [ "/srv/pool" ];
|
depends = [ "/srv/pool" ];
|
||||||
};
|
};
|
||||||
"/srv/jellyfin/media" = {
|
"/srv/jellyfin/media" = {
|
||||||
device = "/srv/pool/multimedia/media";
|
|
||||||
options = [
|
options = [
|
||||||
"bind"
|
"bind"
|
||||||
"ro"
|
"ro"
|
||||||
];
|
];
|
||||||
|
device = "/srv/pool/multimedia/media";
|
||||||
depends = [ "/srv/pool" ];
|
depends = [ "/srv/pool" ];
|
||||||
};
|
};
|
||||||
"/export/pool" = {
|
"/export/pool" = {
|
||||||
device = "/srv/pool";
|
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
|
device = "/srv/pool";
|
||||||
depends = [ "/srv/pool" ];
|
depends = [ "/srv/pool" ];
|
||||||
};
|
};
|
||||||
"/export/jawz" = {
|
"/export/jawz" = {
|
||||||
device = "/home/jawz";
|
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
|
device = "/home/jawz";
|
||||||
depends = [ "/srv/pool" ];
|
depends = [ "/srv/pool" ];
|
||||||
};
|
};
|
||||||
"/export/backups" = {
|
"/export/backups" = {
|
||||||
device = "/srv/backups";
|
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
|
device = "/srv/backups";
|
||||||
depends = [ "/srv/pool" ];
|
depends = [ "/srv/pool" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,20 +4,8 @@ let
|
|||||||
mkEnabledIp = inputs.self.lib.mkEnabledIp config.my.ips.wg-server;
|
mkEnabledIp = inputs.self.lib.mkEnabledIp config.my.ips.wg-server;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
emacs = {
|
|
||||||
enable = true;
|
|
||||||
users = "jawz";
|
|
||||||
};
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
users = "jawz";
|
|
||||||
};
|
|
||||||
enableProxy = true;
|
enableProxy = true;
|
||||||
enableContainers = true;
|
enableContainers = true;
|
||||||
apps.dictionaries = {
|
|
||||||
enable = true;
|
|
||||||
users = "jawz";
|
|
||||||
};
|
|
||||||
shell = enableList mkEnabledWithUsers [
|
shell = enableList mkEnabledWithUsers [
|
||||||
"multimedia"
|
"multimedia"
|
||||||
"tools"
|
"tools"
|
||||||
@@ -93,4 +81,16 @@ in
|
|||||||
"plausible"
|
"plausible"
|
||||||
"vaultwarden"
|
"vaultwarden"
|
||||||
];
|
];
|
||||||
|
emacs = {
|
||||||
|
enable = true;
|
||||||
|
users = "jawz";
|
||||||
|
};
|
||||||
|
stylix = {
|
||||||
|
enable = true;
|
||||||
|
users = "jawz";
|
||||||
|
};
|
||||||
|
apps.dictionaries = {
|
||||||
|
enable = true;
|
||||||
|
users = "jawz";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,13 +70,30 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
image.modules.linode = { };
|
||||||
|
environment.systemPackages = [ ];
|
||||||
|
security.sudo-rs.extraRules = [
|
||||||
|
{
|
||||||
|
users = [ "nixremote" ];
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
command = "/run/current-system/sw/bin/nixos-rebuild";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /var/www/html 2775 deploy www-data -"
|
||||||
|
"d /var/www/html/portfolio 2775 deploy www-data -"
|
||||||
|
"d /var/www/html/blog 2775 deploy www-data -"
|
||||||
|
"d /var/www/html/lidarr-mb-gap 2775 lidarr-reports lidarr-reports -"
|
||||||
|
];
|
||||||
sops.age = {
|
sops.age = {
|
||||||
generateKey = true;
|
generateKey = true;
|
||||||
keyFile = "/var/lib/sops-nix/key.txt";
|
keyFile = "/var/lib/sops-nix/key.txt";
|
||||||
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
};
|
};
|
||||||
image.modules.linode = { };
|
|
||||||
environment.systemPackages = [ ];
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "vps";
|
hostName = "vps";
|
||||||
nat = {
|
nat = {
|
||||||
@@ -137,23 +154,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
security.sudo-rs.extraRules = [
|
|
||||||
{
|
|
||||||
users = [ "nixremote" ];
|
|
||||||
commands = [
|
|
||||||
{
|
|
||||||
command = "/run/current-system/sw/bin/nixos-rebuild";
|
|
||||||
options = [ "NOPASSWD" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"d /var/www/html 2775 deploy www-data -"
|
|
||||||
"d /var/www/html/portfolio 2775 deploy www-data -"
|
|
||||||
"d /var/www/html/blog 2775 deploy www-data -"
|
|
||||||
"d /var/www/html/lidarr-mb-gap 2775 lidarr-reports lidarr-reports -"
|
|
||||||
];
|
|
||||||
services = {
|
services = {
|
||||||
smartd.enable = lib.mkForce false;
|
smartd.enable = lib.mkForce false;
|
||||||
openssh.ports = [ ports.ssh ];
|
openssh.ports = [ ports.ssh ];
|
||||||
|
|||||||
@@ -41,10 +41,6 @@ let
|
|||||||
secureToggles = {
|
secureToggles = {
|
||||||
enableProxy = true;
|
enableProxy = true;
|
||||||
enableContainers = true;
|
enableContainers = true;
|
||||||
websites = {
|
|
||||||
portfolio.enableProxy = true;
|
|
||||||
lidarrMbReport.enableProxy = true;
|
|
||||||
};
|
|
||||||
servers =
|
servers =
|
||||||
enableList mkEnabledWithProxy [
|
enableList mkEnabledWithProxy [
|
||||||
"isso"
|
"isso"
|
||||||
@@ -78,6 +74,10 @@ let
|
|||||||
"vaultwarden"
|
"vaultwarden"
|
||||||
"yamtrack"
|
"yamtrack"
|
||||||
];
|
];
|
||||||
|
websites = {
|
||||||
|
portfolio.enableProxy = true;
|
||||||
|
lidarrMbReport.enableProxy = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
|
|||||||
@@ -25,13 +25,17 @@ in
|
|||||||
../../environments/gnome.nix
|
../../environments/gnome.nix
|
||||||
];
|
];
|
||||||
my = import ./toggles.nix { inherit inputs; } // {
|
my = import ./toggles.nix { inherit inputs; } // {
|
||||||
nix.cores = 8;
|
nix = {
|
||||||
nix.maxJobs = 8;
|
cores = 8;
|
||||||
users.nixremote.enable = true;
|
maxJobs = 8;
|
||||||
users.nixremote.authorizedKeys = inputs.self.lib.getSshKeys [
|
};
|
||||||
"nixserver"
|
users.nixremote = {
|
||||||
"nixminiserver"
|
enable = true;
|
||||||
];
|
authorizedKeys = inputs.self.lib.getSshKeys [
|
||||||
|
"nixserver"
|
||||||
|
"nixminiserver"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
sops.secrets."workstation/private" = lib.mkIf config.my.secureHost {
|
sops.secrets."workstation/private" = lib.mkIf config.my.secureHost {
|
||||||
sopsFile = ../../secrets/wireguard.yaml;
|
sopsFile = ../../secrets/wireguard.yaml;
|
||||||
@@ -53,6 +57,21 @@ in
|
|||||||
};
|
};
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "workstation";
|
hostName = "workstation";
|
||||||
|
wireguard.interfaces.wg0 = lib.mkIf config.my.secureHost {
|
||||||
|
ips = [ "${config.my.ips.wg-workstation}/32" ];
|
||||||
|
privateKeyFile = config.sops.secrets."workstation/private".path;
|
||||||
|
peers = [
|
||||||
|
{
|
||||||
|
publicKey = "dFbiSekBwnZomarcS31o5+w6imHjMPNCipkfc2fZ3GY=";
|
||||||
|
endpoint = "${config.my.ips.vps}:51820";
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
allowedIPs = [
|
||||||
|
"${config.my.ips.wg-vps}/32"
|
||||||
|
config.my.subnets.wg-homelab
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
config.my.ports.nsUsbloader
|
config.my.ports.nsUsbloader
|
||||||
@@ -80,21 +99,6 @@ in
|
|||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
wireguard.interfaces.wg0 = lib.mkIf config.my.secureHost {
|
|
||||||
ips = [ "${config.my.ips.wg-workstation}/32" ];
|
|
||||||
privateKeyFile = config.sops.secrets."workstation/private".path;
|
|
||||||
peers = [
|
|
||||||
{
|
|
||||||
publicKey = "dFbiSekBwnZomarcS31o5+w6imHjMPNCipkfc2fZ3GY=";
|
|
||||||
endpoint = "${config.my.ips.vps}:51820";
|
|
||||||
persistentKeepalive = 25;
|
|
||||||
allowedIPs = [
|
|
||||||
"${config.my.ips.wg-vps}/32"
|
|
||||||
config.my.subnets.wg-homelab
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
users = {
|
users = {
|
||||||
groups.ai = { };
|
groups.ai = { };
|
||||||
@@ -130,7 +134,7 @@ in
|
|||||||
claude-code
|
claude-code
|
||||||
claude-monitor
|
claude-monitor
|
||||||
;
|
;
|
||||||
inherit (inputs.clip-tools.packages.${pkgs.system})
|
inherit (inputs.clip-tools.packages.${pkgs.stdenv.hostPlatform.system})
|
||||||
clip-thumbnailer
|
clip-thumbnailer
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -87,17 +87,16 @@ in
|
|||||||
fileSystems =
|
fileSystems =
|
||||||
let
|
let
|
||||||
nfsMount = server: nfsDisk: {
|
nfsMount = server: nfsDisk: {
|
||||||
device = "${server}:/${nfsDisk}";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [
|
options = [
|
||||||
"x-systemd.automount"
|
"x-systemd.automount"
|
||||||
"noauto"
|
"noauto"
|
||||||
"x-systemd.idle-timeout=600"
|
"x-systemd.idle-timeout=600"
|
||||||
];
|
];
|
||||||
|
device = "${server}:/${nfsDisk}";
|
||||||
|
fsType = "nfs";
|
||||||
};
|
};
|
||||||
btrfsMount = device: subvol: extraOpts: {
|
btrfsMount = device: subvol: extraOpts: {
|
||||||
inherit device;
|
inherit device;
|
||||||
fsType = "btrfs";
|
|
||||||
options = extraOpts ++ [
|
options = extraOpts ++ [
|
||||||
"subvol=${subvol}"
|
"subvol=${subvol}"
|
||||||
"ssd"
|
"ssd"
|
||||||
@@ -107,6 +106,7 @@ in
|
|||||||
"commit=120"
|
"commit=120"
|
||||||
"datacow"
|
"datacow"
|
||||||
];
|
];
|
||||||
|
fsType = "btrfs";
|
||||||
};
|
};
|
||||||
trashOptions = [
|
trashOptions = [
|
||||||
"x-gvfs-trash"
|
"x-gvfs-trash"
|
||||||
|
|||||||
@@ -3,14 +3,6 @@ let
|
|||||||
inherit (inputs.self.lib) mkEnabled mkEnabledWithUsers enableList;
|
inherit (inputs.self.lib) mkEnabled mkEnabledWithUsers enableList;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
users = "jawz";
|
|
||||||
};
|
|
||||||
emacs = {
|
|
||||||
enable = true;
|
|
||||||
users = "jawz";
|
|
||||||
};
|
|
||||||
enableContainers = true;
|
enableContainers = true;
|
||||||
servers.drpp.enable = true;
|
servers.drpp.enable = true;
|
||||||
apps =
|
apps =
|
||||||
@@ -52,4 +44,12 @@ in
|
|||||||
"ffmpeg4discord"
|
"ffmpeg4discord"
|
||||||
"update-org-agenda-cache"
|
"update-org-agenda-cache"
|
||||||
];
|
];
|
||||||
|
stylix = {
|
||||||
|
enable = true;
|
||||||
|
users = "jawz";
|
||||||
|
};
|
||||||
|
emacs = {
|
||||||
|
enable = true;
|
||||||
|
users = "jawz";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my = {
|
options.my = {
|
||||||
|
dev.gameDev.enable = lib.mkEnableOption "game development tools and engines";
|
||||||
apps.art = {
|
apps.art = {
|
||||||
enable = lib.mkEnableOption "digital art and creative applications";
|
enable = lib.mkEnableOption "digital art and creative applications";
|
||||||
users = lib.mkOption {
|
users = lib.mkOption {
|
||||||
@@ -45,7 +46,6 @@ in
|
|||||||
description = "Users to install art packages for";
|
description = "Users to install art packages for";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
dev.gameDev.enable = lib.mkEnableOption "game development tools and engines";
|
|
||||||
};
|
};
|
||||||
config.users.users =
|
config.users.users =
|
||||||
let
|
let
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ let
|
|||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ inputs.nix-gaming.nixosModules.platformOptimizations ];
|
|
||||||
options.my.apps = {
|
options.my.apps = {
|
||||||
|
switch.enable = lib.mkEnableOption "Nintendo Switch homebrew tools";
|
||||||
gaming = {
|
gaming = {
|
||||||
enable = lib.mkEnableOption "gaming applications and emulators";
|
enable = lib.mkEnableOption "gaming applications and emulators";
|
||||||
users = lib.mkOption {
|
users = lib.mkOption {
|
||||||
@@ -31,8 +31,8 @@ in
|
|||||||
description = "Users to install gaming packages for";
|
description = "Users to install gaming packages for";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
switch.enable = lib.mkEnableOption "Nintendo Switch homebrew tools";
|
|
||||||
};
|
};
|
||||||
|
imports = [ inputs.nix-gaming.nixosModules.platformOptimizations ];
|
||||||
config = lib.mkIf config.my.apps.gaming.enable {
|
config = lib.mkIf config.my.apps.gaming.enable {
|
||||||
# sops.secrets.switch-presence = lib.mkIf config.my.apps.gaming.switch.enable {
|
# sops.secrets.switch-presence = lib.mkIf config.my.apps.gaming.switch.enable {
|
||||||
# sopsFile = ../../secrets/env.yaml;
|
# sopsFile = ../../secrets/env.yaml;
|
||||||
@@ -40,16 +40,6 @@ in
|
|||||||
# owner = config.users.users.jawz.name;
|
# owner = config.users.users.jawz.name;
|
||||||
# inherit (config.users.users.jawz) group;
|
# inherit (config.users.users.jawz) group;
|
||||||
# };
|
# };
|
||||||
programs = {
|
|
||||||
gamemode.enable = true;
|
|
||||||
steam = {
|
|
||||||
enable = true;
|
|
||||||
gamescopeSession.enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
dedicatedServer.openFirewall = true;
|
|
||||||
platformOptimizations.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = lib.mkIf config.my.apps.switch.enable {
|
services = lib.mkIf config.my.apps.switch.enable {
|
||||||
switch-boot.enable = true;
|
switch-boot.enable = true;
|
||||||
# switch-presence = {
|
# switch-presence = {
|
||||||
@@ -80,5 +70,15 @@ in
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
inputs.self.lib.mkUserPackages lib config.my.apps.gaming.users packages;
|
inputs.self.lib.mkUserPackages lib config.my.apps.gaming.users packages;
|
||||||
|
programs = {
|
||||||
|
gamemode.enable = true;
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
gamescopeSession.enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
platformOptimizations.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
cfg = config.my.apps.internet;
|
cfg = config.my.apps.internet;
|
||||||
|
krisp-patch = builtins.readFile (
|
||||||
|
pkgs.fetchurl {
|
||||||
|
url = "https://pastebin.com/raw/8tQDsMVd";
|
||||||
|
sha256 = "sha256-IdXv0MfRG1/1pAAwHLS2+1NESFEz2uXrbSdvU9OvdJ8=";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
krisp-patcher = pkgs.writers.writePython3Bin "krisp-patcher" krisp-settings krisp-patch;
|
||||||
krisp-settings = {
|
krisp-settings = {
|
||||||
libraries = builtins.attrValues {
|
libraries = builtins.attrValues {
|
||||||
inherit (pkgs.python3Packages)
|
inherit (pkgs.python3Packages)
|
||||||
@@ -32,13 +39,6 @@ let
|
|||||||
"F405"
|
"F405"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
krisp-patch = builtins.readFile (
|
|
||||||
pkgs.fetchurl {
|
|
||||||
url = "https://pastebin.com/raw/8tQDsMVd";
|
|
||||||
sha256 = "sha256-IdXv0MfRG1/1pAAwHLS2+1NESFEz2uXrbSdvU9OvdJ8=";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
krisp-patcher = pkgs.writers.writePython3Bin "krisp-patcher" krisp-settings krisp-patch;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.apps.internet.enable = lib.mkEnableOption "internet browsers and communication apps";
|
options.my.apps.internet.enable = lib.mkEnableOption "internet browsers and communication apps";
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
clang # C/C++ compiler frontend (part of LLVM)
|
|
||||||
clang-tools # Extra LLVM tools (e.g. clang-tidy, clang-apply-replacements)
|
|
||||||
gcc # GNU Compiler Collection (C, C++, etc.)
|
|
||||||
gdb # GNU Debugger
|
|
||||||
valgrind # Memory leak detector and performance profiler
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.cc = {
|
|
||||||
enable = lib.mkEnableOption "Install C/C++ tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install C/C++ packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.cc = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "cc-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🔧 C/C++ dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "C/C++ development shell";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.my.dev.cc.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.cc.users { inherit packages; };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
23
modules/dev/cc/common.nix
Normal file
23
modules/dev/cc/common.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
basePackages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
clang-tools
|
||||||
|
gcc
|
||||||
|
gdb
|
||||||
|
valgrind
|
||||||
|
;
|
||||||
|
};
|
||||||
|
homePackages = basePackages;
|
||||||
|
devShellPackages = basePackages ++ [ pkgs.clang ];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit devShellPackages homePackages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
packages = devShellPackages;
|
||||||
|
name = "cc-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🔧 C/C++ dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
34
modules/dev/cc/home.nix
Normal file
34
modules/dev/cc/home.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"cc"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.cc;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.cc.enable = lib.mkEnableOption "Install C/C++ tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.cc.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.homePackages;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/cc/nixos.nix
Normal file
27
modules/dev/cc/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
devShells.cc = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "C/C++ development shell";
|
||||||
|
};
|
||||||
|
my.dev.cc = {
|
||||||
|
enable = lib.mkEnableOption "Install C/C++ tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install C/C++ packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
dockfmt # Format Dockerfiles
|
|
||||||
dockerfile-language-server # LSP for Dockerfiles
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.docker = {
|
|
||||||
enable = lib.mkEnableOption "Install Docker tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install Docker packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.docker = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "docker-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🐳 Docker dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Docker and Dockerfile tooling shell";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf config.my.dev.docker.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.docker.users { inherit packages; };
|
|
||||||
})
|
|
||||||
{
|
|
||||||
environment.variables.DOCKER_CONFIG = "\${XDG_CONFIG_HOME}/docker";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
19
modules/dev/docker/common.nix
Normal file
19
modules/dev/docker/common.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
dockfmt
|
||||||
|
dockerfile-language-server
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "docker-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🐳 Docker dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
37
modules/dev/docker/home.nix
Normal file
37
modules/dev/docker/home.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.docker;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.docker.enable = lib.mkEnableOption "Install Docker tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.docker.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home = {
|
||||||
|
inherit (feature) packages;
|
||||||
|
sessionVariables.DOCKER_CONFIG = "${config.xdg.configHome}/docker";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/docker/nixos.nix
Normal file
27
modules/dev/docker/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
devShells.docker = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Docker and Dockerfile tooling shell";
|
||||||
|
};
|
||||||
|
my.dev.docker = {
|
||||||
|
enable = lib.mkEnableOption "Install Docker tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install Docker packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -5,28 +5,59 @@
|
|||||||
emacsExtraConfig,
|
emacsExtraConfig,
|
||||||
emacsExtraPackages,
|
emacsExtraPackages,
|
||||||
}:
|
}:
|
||||||
{
|
let
|
||||||
packages = builtins.attrValues {
|
clipboardPackages =
|
||||||
inherit (pkgs.xorg) xwininfo;
|
if pkgs.stdenv.isDarwin then
|
||||||
inherit (pkgs)
|
builtins.attrValues {
|
||||||
xdotool
|
inherit (pkgs) pngpaste;
|
||||||
xclip
|
}
|
||||||
wl-clipboard-rs
|
else
|
||||||
fd
|
builtins.attrValues {
|
||||||
fzf
|
inherit (pkgs)
|
||||||
ripgrep
|
xclip
|
||||||
tree-sitter
|
wl-clipboard-rs
|
||||||
graphviz
|
;
|
||||||
tetex
|
};
|
||||||
languagetool
|
linuxWindowPackages = lib.optionals pkgs.stdenv.isLinux (
|
||||||
yaml-language-server
|
builtins.attrValues {
|
||||||
markdownlint-cli
|
inherit (pkgs.xorg) xwininfo;
|
||||||
;
|
inherit (pkgs) xdotool;
|
||||||
inherit (pkgs.nodePackages)
|
}
|
||||||
vscode-json-languageserver
|
);
|
||||||
prettier
|
doomDir = ../../../dotfiles/doom;
|
||||||
;
|
templateFiles = {
|
||||||
|
"events.org" = ../../../dotfiles/doom/templates/events.org;
|
||||||
|
"default.org" = ../../../dotfiles/doom/templates/default.org;
|
||||||
|
"programming.org" = ../../../dotfiles/doom/templates/programming.org;
|
||||||
};
|
};
|
||||||
|
templateDataFiles = {
|
||||||
|
"doom/templates/events.org".source = templateFiles."events.org";
|
||||||
|
"doom/templates/default.org".source = templateFiles."default.org";
|
||||||
|
"doom/templates/programming.org".source = templateFiles."programming.org";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit doomDir templateDataFiles templateFiles;
|
||||||
|
packages =
|
||||||
|
linuxWindowPackages
|
||||||
|
++ clipboardPackages
|
||||||
|
++ builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
fd
|
||||||
|
fzf
|
||||||
|
ripgrep
|
||||||
|
tree-sitter
|
||||||
|
graphviz
|
||||||
|
tetex
|
||||||
|
languagetool
|
||||||
|
yaml-language-server
|
||||||
|
markdownlint-cli
|
||||||
|
;
|
||||||
|
inherit (pkgs.nodePackages)
|
||||||
|
vscode-json-languageserver
|
||||||
|
prettier
|
||||||
|
;
|
||||||
|
};
|
||||||
extraPackages =
|
extraPackages =
|
||||||
epkgs:
|
epkgs:
|
||||||
let
|
let
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
shellType = inputs.self.lib.hmShellType config osConfig;
|
shellType = inputs.self.lib.hmShellType osConfig "zsh";
|
||||||
hm = inputs.self.lib.hmModule {
|
hm = inputs.self.lib.hmModule {
|
||||||
inherit
|
inherit
|
||||||
config
|
config
|
||||||
@@ -25,21 +25,17 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ inputs.doom-emacs.homeModule ];
|
|
||||||
options.my.emacs.enable = lib.mkEnableOption "Doom Emacs configuration";
|
options.my.emacs.enable = lib.mkEnableOption "Doom Emacs configuration";
|
||||||
|
imports = [ inputs.doom-emacs.homeModule ];
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
my.emacs.enable = lib.mkDefault hm.enabledByDefault;
|
my.emacs.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
}
|
}
|
||||||
(lib.mkIf cfg.enable {
|
(lib.mkIf cfg.enable {
|
||||||
home.packages = emacs.packages;
|
home.packages = emacs.packages;
|
||||||
xdg.dataFile = {
|
xdg.dataFile = emacs.templateDataFiles;
|
||||||
"doom/templates/events.org".source = ../../../dotfiles/doom/templates/events.org;
|
|
||||||
"doom/templates/default.org".source = ../../../dotfiles/doom/templates/default.org;
|
|
||||||
"doom/templates/programming.org".source = ../../../dotfiles/doom/templates/programming.org;
|
|
||||||
};
|
|
||||||
services = {
|
services = {
|
||||||
lorri.enable = true;
|
lorri.enable = pkgs.stdenv.isLinux;
|
||||||
emacs = {
|
emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
@@ -51,7 +47,7 @@ in
|
|||||||
};
|
};
|
||||||
programs.doom-emacs = {
|
programs.doom-emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
doomDir = ../../../dotfiles/doom;
|
inherit (emacs) doomDir;
|
||||||
doomLocalDir = "${config.xdg.dataHome}/nix-doom";
|
doomLocalDir = "${config.xdg.dataHome}/nix-doom";
|
||||||
tangleArgs = "--all config.org";
|
tangleArgs = "--all config.org";
|
||||||
inherit (emacs) extraPackages;
|
inherit (emacs) extraPackages;
|
||||||
|
|||||||
109
modules/dev/emacs/portable.nix
Normal file
109
modules/dev/emacs/portable.nix
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
emacs = import ./common.nix {
|
||||||
|
inherit pkgs;
|
||||||
|
lib = pkgs.lib;
|
||||||
|
stylixEnabled = false;
|
||||||
|
emacsExtraConfig = "";
|
||||||
|
emacsExtraPackages = _epkgs: [ ];
|
||||||
|
};
|
||||||
|
portableFonts =
|
||||||
|
let
|
||||||
|
customFonts = pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
name = "portable-emacs-fonts";
|
||||||
|
src = inputs.fonts;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share/fonts
|
||||||
|
find $src -type f \( \
|
||||||
|
-name "*.ttf" -o \
|
||||||
|
-name "*.otf" -o \
|
||||||
|
-name "*.woff" -o \
|
||||||
|
-name "*.woff2" \
|
||||||
|
\) -exec cp {} $out/share/fonts/ \;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
builtins.attrValues {
|
||||||
|
inherit customFonts;
|
||||||
|
inherit (pkgs.nerd-fonts)
|
||||||
|
comic-shanns-mono
|
||||||
|
iosevka
|
||||||
|
caskaydia-cove
|
||||||
|
;
|
||||||
|
};
|
||||||
|
portableHome = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
modules = [
|
||||||
|
../../../modules/home-manager.nix
|
||||||
|
../../../config/home-manager.nix
|
||||||
|
{
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
home = {
|
||||||
|
username = "portable";
|
||||||
|
homeDirectory = if pkgs.stdenv.isDarwin then "/Users/portable" else "/home/portable";
|
||||||
|
stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
my = {
|
||||||
|
emacs.enable = true;
|
||||||
|
shell.tools.enable = true;
|
||||||
|
dev = {
|
||||||
|
nix.enable = true;
|
||||||
|
python.enable = true;
|
||||||
|
sh.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
outputs = inputs.self;
|
||||||
|
osConfig = null;
|
||||||
|
preferredShell = "zsh";
|
||||||
|
userEmail = "danilo.reyes.251@proton.me";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
templateFarm = pkgs.linkFarm "portable-emacs-templates" (
|
||||||
|
builtins.attrNames emacs.templateFiles
|
||||||
|
|> map (name: {
|
||||||
|
inherit name;
|
||||||
|
path = emacs.templateFiles.${name};
|
||||||
|
})
|
||||||
|
);
|
||||||
|
fontConfig = pkgs.makeFontsConf {
|
||||||
|
fontDirectories = map (font: "${font}/share/fonts") portableFonts;
|
||||||
|
};
|
||||||
|
package = pkgs.writeShellApplication {
|
||||||
|
name = "doom-emacs";
|
||||||
|
runtimeInputs = [
|
||||||
|
portableHome.config.programs.doom-emacs.finalEmacsPackage
|
||||||
|
]
|
||||||
|
++ portableHome.config.home.packages;
|
||||||
|
text = ''
|
||||||
|
export HOME="''${HOME:?HOME must be set}"
|
||||||
|
export XDG_CONFIG_HOME="''${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
|
export XDG_CACHE_HOME="''${XDG_CACHE_HOME:-$HOME/.cache}"
|
||||||
|
export XDG_STATE_HOME="''${XDG_STATE_HOME:-$HOME/.local/state}"
|
||||||
|
export XDG_DATA_HOME="''${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||||
|
export DOOMDIR="${emacs.doomDir}"
|
||||||
|
export DOOMLOCALDIR="$XDG_DATA_HOME/nix-doom"
|
||||||
|
export FONTCONFIG_FILE="${fontConfig}"
|
||||||
|
mkdir -p "$XDG_DATA_HOME/doom/templates" "$DOOMLOCALDIR" "$XDG_CACHE_HOME" "$XDG_STATE_HOME"
|
||||||
|
ln -sfn "${templateFarm}/events.org" "$XDG_DATA_HOME/doom/templates/events.org"
|
||||||
|
ln -sfn "${templateFarm}/default.org" "$XDG_DATA_HOME/doom/templates/default.org"
|
||||||
|
ln -sfn "${templateFarm}/programming.org" "$XDG_DATA_HOME/doom/templates/programming.org"
|
||||||
|
exec ${portableHome.config.programs.doom-emacs.finalEmacsPackage}/bin/emacs "$@"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit package;
|
||||||
|
app = {
|
||||||
|
type = "app";
|
||||||
|
program = "${package}/bin/doom-emacs";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
go # Go compiler and core toolchain
|
|
||||||
gocode-gomod # Code completion for Go (modern fork of gocode)
|
|
||||||
gotools # Contains godoc, gorename, goimports, etc.
|
|
||||||
gore # Go REPL
|
|
||||||
gotests # Generate Go tests from function signatures
|
|
||||||
gomodifytags # Struct tag manipulation
|
|
||||||
golangci-lint # Linter aggregation
|
|
||||||
;
|
|
||||||
};
|
|
||||||
GOPATH = "\${XDG_DATA_HOME}/go";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.go = {
|
|
||||||
enable = lib.mkEnableOption "Install Go tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install Go packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.go = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages GOPATH;
|
|
||||||
name = "go-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🐹 Go dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Go development shell with Emacs tooling, REPL, formatter, and linter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkMerge [
|
|
||||||
{
|
|
||||||
environment.variables = { inherit GOPATH; };
|
|
||||||
}
|
|
||||||
(lib.mkIf config.my.dev.go.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.go.users { inherit packages; };
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
27
modules/dev/go/common.nix
Normal file
27
modules/dev/go/common.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
basePackages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
go
|
||||||
|
gocode-gomod
|
||||||
|
gore
|
||||||
|
gotests
|
||||||
|
gomodifytags
|
||||||
|
golangci-lint
|
||||||
|
;
|
||||||
|
};
|
||||||
|
homePackages = basePackages;
|
||||||
|
devShellPackages = basePackages ++ [ pkgs.gotools ];
|
||||||
|
GOPATH = "\${XDG_DATA_HOME:-\$HOME/.local/share}/go";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit devShellPackages homePackages GOPATH;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
packages = devShellPackages;
|
||||||
|
inherit GOPATH;
|
||||||
|
name = "go-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🐹 Go dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
37
modules/dev/go/home.nix
Normal file
37
modules/dev/go/home.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"go"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.go;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.go.enable = lib.mkEnableOption "Install Go tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.go.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home = {
|
||||||
|
packages = feature.homePackages;
|
||||||
|
sessionVariables.GOPATH = "${config.xdg.dataHome}/go";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/go/nixos.nix
Normal file
27
modules/dev/go/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
devShells.go = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Go development shell with Emacs tooling, REPL, formatter, and linter";
|
||||||
|
};
|
||||||
|
my.dev.go = {
|
||||||
|
enable = lib.mkEnableOption "Install Go tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install Go packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
haskell-language-server # LSP server for Haskell
|
|
||||||
cabal-install # Standard Haskell build tool
|
|
||||||
hlint # Linter for Haskell source code
|
|
||||||
;
|
|
||||||
inherit (pkgs.haskellPackages)
|
|
||||||
hoogle # Haskell API search engine
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.haskell = {
|
|
||||||
enable = lib.mkEnableOption "Install Haskell tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install Haskell packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.haskell = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "haskell-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "λ Haskell dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Haskell development shell";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf config.my.dev.haskell.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.haskell.users { inherit packages; };
|
|
||||||
})
|
|
||||||
{
|
|
||||||
environment.variables = {
|
|
||||||
CABAL_DIR = "\${XDG_CACHE_HOME}/cabal";
|
|
||||||
STACK_ROOT = "\${XDG_DATA_HOME}/stack";
|
|
||||||
GHCUP_USE_XDG_DIRS = "true";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
23
modules/dev/haskell/common.nix
Normal file
23
modules/dev/haskell/common.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
haskell-language-server
|
||||||
|
cabal-install
|
||||||
|
hlint
|
||||||
|
;
|
||||||
|
inherit (pkgs.haskellPackages)
|
||||||
|
hoogle
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "haskell-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "λ Haskell dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
41
modules/dev/haskell/home.nix
Normal file
41
modules/dev/haskell/home.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"haskell"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.haskell;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.haskell.enable = lib.mkEnableOption "Install Haskell tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.haskell.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home = {
|
||||||
|
inherit (feature) packages;
|
||||||
|
sessionVariables = {
|
||||||
|
CABAL_DIR = "${config.xdg.cacheHome}/cabal";
|
||||||
|
STACK_ROOT = "${config.xdg.dataHome}/stack";
|
||||||
|
GHCUP_USE_XDG_DIRS = "true";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/haskell/nixos.nix
Normal file
27
modules/dev/haskell/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
devShells.haskell = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Haskell development shell";
|
||||||
|
};
|
||||||
|
my.dev.haskell = {
|
||||||
|
enable = lib.mkEnableOption "Install Haskell tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install Haskell packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -14,12 +14,12 @@ in
|
|||||||
echo "📦 JavaScript dev environment"
|
echo "📦 JavaScript dev environment"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
sessionVariables = {
|
|
||||||
NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc";
|
|
||||||
PNPM_HOME = "\${XDG_DATA_HOME}/pnpm";
|
|
||||||
};
|
|
||||||
sessionPath = [
|
sessionPath = [
|
||||||
"\${XDG_DATA_HOME}/npm/bin"
|
"\${XDG_DATA_HOME}/npm/bin"
|
||||||
"\${XDG_DATA_HOME}/pnpm"
|
"\${XDG_DATA_HOME}/pnpm"
|
||||||
];
|
];
|
||||||
|
sessionVariables = {
|
||||||
|
NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc";
|
||||||
|
PNPM_HOME = "\${XDG_DATA_HOME}/pnpm";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
devShells.javascript = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = javascript.devShell;
|
||||||
|
description = "JavaScript/Node development shell with npm/pnpm support";
|
||||||
|
};
|
||||||
my.dev.javascript = {
|
my.dev.javascript = {
|
||||||
enable = lib.mkEnableOption "Install JavaScript tooling globally";
|
enable = lib.mkEnableOption "Install JavaScript tooling globally";
|
||||||
users = lib.mkOption {
|
users = lib.mkOption {
|
||||||
@@ -18,10 +23,5 @@ in
|
|||||||
description = "Users to install JavaScript packages for";
|
description = "Users to install JavaScript packages for";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
devShells.javascript = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = javascript.devShell;
|
|
||||||
description = "JavaScript/Node development shell with npm/pnpm support";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
16
modules/dev/julia/common.nix
Normal file
16
modules/dev/julia/common.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs) julia;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "julia-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🔬 Julia dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
34
modules/dev/julia/home.nix
Normal file
34
modules/dev/julia/home.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"julia"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.julia;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.julia.enable = lib.mkEnableOption "Install Julia globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.julia.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -6,12 +6,15 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
packages = builtins.attrValues {
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
inherit (pkgs) julia; # High-performance dynamic language for technical computing
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
devShells.julia = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Julia development shell";
|
||||||
|
};
|
||||||
my.dev.julia = {
|
my.dev.julia = {
|
||||||
enable = lib.mkEnableOption "Install Julia globally";
|
enable = lib.mkEnableOption "Install Julia globally";
|
||||||
users = lib.mkOption {
|
users = lib.mkOption {
|
||||||
@@ -20,19 +23,5 @@ in
|
|||||||
description = "Users to install Julia packages for";
|
description = "Users to install Julia packages for";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
devShells.julia = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "julia-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🔬 Julia dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Julia development shell";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.my.dev.julia.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.julia.users { inherit packages; };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
18
modules/dev/mcp/common.nix
Normal file
18
modules/dev/mcp/common.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ pkgs, inputs }:
|
||||||
|
let
|
||||||
|
packages = [
|
||||||
|
pkgs.codex
|
||||||
|
inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.nixos-mcp
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "mcp-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
export CODEX_HOME=$PWD/.codex
|
||||||
|
echo "MCP shell ready: codex + nixos-mcp"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
34
modules/dev/mcp/home.nix
Normal file
34
modules/dev/mcp/home.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"mcp"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.mcp;
|
||||||
|
feature = import ./common.nix { inherit pkgs inputs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.mcp.enable = lib.mkEnableOption "Install MCP tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.mcp.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -6,13 +6,15 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
packages = [
|
feature = import ./common.nix { inherit pkgs inputs; };
|
||||||
pkgs.codex
|
|
||||||
inputs.self.packages.${pkgs.system}.nixos-mcp
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
devShells.mcp = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "MCP dev shell for this repo";
|
||||||
|
};
|
||||||
my.dev.mcp = {
|
my.dev.mcp = {
|
||||||
enable = lib.mkEnableOption "Install MCP tooling globally";
|
enable = lib.mkEnableOption "Install MCP tooling globally";
|
||||||
users = lib.mkOption {
|
users = lib.mkOption {
|
||||||
@@ -21,20 +23,5 @@ in
|
|||||||
description = "Users to install MCP packages for";
|
description = "Users to install MCP packages for";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
devShells.mcp = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
description = "MCP dev shell for this repo";
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "mcp-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
export CODEX_HOME=$PWD/.codex
|
|
||||||
echo "MCP shell ready: codex + nixos-mcp"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.my.dev.mcp.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.mcp.users { inherit packages; };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
shellType = inputs.self.lib.hmShellType config osConfig;
|
shellType = inputs.self.lib.hmShellType osConfig "zsh";
|
||||||
hm = inputs.self.lib.hmModule {
|
hm = inputs.self.lib.hmModule {
|
||||||
inherit
|
inherit
|
||||||
config
|
config
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
devShells.nix = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = nix.devShell;
|
||||||
|
description = "Nix/NixOS development shell with formatter, linter, LSP, and Cachix";
|
||||||
|
};
|
||||||
my.dev.nix = {
|
my.dev.nix = {
|
||||||
enable = lib.mkEnableOption "Install Nix tooling globally";
|
enable = lib.mkEnableOption "Install Nix tooling globally";
|
||||||
users = lib.mkOption {
|
users = lib.mkOption {
|
||||||
@@ -21,10 +26,5 @@ in
|
|||||||
description = "Users to install Nix packages for";
|
description = "Users to install Nix packages for";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
devShells.nix = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = nix.devShell;
|
|
||||||
description = "Nix/NixOS development shell with formatter, linter, LSP, and Cachix";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
devShells.python = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = python.devShell;
|
||||||
|
};
|
||||||
my.dev.python = {
|
my.dev.python = {
|
||||||
enable = lib.mkEnableOption "Install Python tools globally";
|
enable = lib.mkEnableOption "Install Python tools globally";
|
||||||
users = lib.mkOption {
|
users = lib.mkOption {
|
||||||
@@ -18,9 +22,5 @@ in
|
|||||||
description = "Users to install Python packages for";
|
description = "Users to install Python packages for";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
devShells.python = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = python.devShell;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs) ruby; # Ruby interpreter
|
|
||||||
inherit (pkgs.rubyPackages) solargraph; # LSP for Ruby
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.ruby = {
|
|
||||||
enable = lib.mkEnableOption "Install Ruby tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install Ruby packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.ruby = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "ruby-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "💎 Ruby dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Ruby development shell with interpreter and Solargraph LSP";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf config.my.dev.ruby.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.ruby.users { inherit packages; };
|
|
||||||
})
|
|
||||||
{
|
|
||||||
environment.variables = {
|
|
||||||
GEM_HOME = "\${XDG_DATA_HOME}/ruby/gems";
|
|
||||||
GEM_PATH = "\${XDG_DATA_HOME}/ruby/gems";
|
|
||||||
GEM_SPEC_CACHE = "\${XDG_DATA_HOME}/ruby/specs";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
17
modules/dev/ruby/common.nix
Normal file
17
modules/dev/ruby/common.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs) ruby;
|
||||||
|
inherit (pkgs.rubyPackages) solargraph;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "ruby-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "💎 Ruby dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
41
modules/dev/ruby/home.nix
Normal file
41
modules/dev/ruby/home.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"ruby"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.ruby;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.ruby.enable = lib.mkEnableOption "Install Ruby tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.ruby.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home = {
|
||||||
|
inherit (feature) packages;
|
||||||
|
sessionVariables = {
|
||||||
|
GEM_HOME = "${config.xdg.dataHome}/ruby/gems";
|
||||||
|
GEM_PATH = "${config.xdg.dataHome}/ruby/gems";
|
||||||
|
GEM_SPEC_CACHE = "${config.xdg.dataHome}/ruby/specs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/ruby/nixos.nix
Normal file
27
modules/dev/ruby/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
devShells.ruby = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Ruby development shell with interpreter and Solargraph LSP";
|
||||||
|
};
|
||||||
|
my.dev.ruby = {
|
||||||
|
enable = lib.mkEnableOption "Install Ruby tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install Ruby packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
rustc # Rust compiler
|
|
||||||
cargo # Rust package manager
|
|
||||||
rust-analyzer # Language server for Rust
|
|
||||||
clippy # Linter for Rust
|
|
||||||
rustfmt # Formatter for Rust code
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.rust = {
|
|
||||||
enable = lib.mkEnableOption "Install Rust tooling globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install Rust packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.rust = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "rust-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🦀 Rust dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Rust development shell with cargo and rust-analyzer";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf config.my.dev.rust.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.rust.users { inherit packages; };
|
|
||||||
})
|
|
||||||
{
|
|
||||||
environment.variables.CARGO_HOME = "\${XDG_DATA_HOME}/cargo";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
22
modules/dev/rust/common.nix
Normal file
22
modules/dev/rust/common.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
rustc
|
||||||
|
cargo
|
||||||
|
rust-analyzer
|
||||||
|
clippy
|
||||||
|
rustfmt
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "rust-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🦀 Rust dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
37
modules/dev/rust/home.nix
Normal file
37
modules/dev/rust/home.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"rust"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.rust;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.rust.enable = lib.mkEnableOption "Install Rust tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.rust.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home = {
|
||||||
|
inherit (feature) packages;
|
||||||
|
sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/rust/nixos.nix
Normal file
27
modules/dev/rust/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
devShells.rust = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Rust development shell with cargo and rust-analyzer";
|
||||||
|
};
|
||||||
|
my.dev.rust = {
|
||||||
|
enable = lib.mkEnableOption "Install Rust tooling globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install Rust packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
packages = builtins.attrValues {
|
|
||||||
inherit (pkgs)
|
|
||||||
shellcheck # Shell script linter
|
|
||||||
shfmt # Shell parser and formatter
|
|
||||||
;
|
|
||||||
# LSP for Bash and sh
|
|
||||||
inherit (pkgs.nodePackages) bash-language-server;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
my.dev.sh = {
|
|
||||||
enable = lib.mkEnableOption "Install shell scripting tools globally";
|
|
||||||
users = lib.mkOption {
|
|
||||||
type = inputs.self.lib.usersOptionType lib;
|
|
||||||
default = config.my.toggleUsers.dev;
|
|
||||||
description = "Users to install shell scripting packages for";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
devShells.sh = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "sh-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "💻 Shell scripting dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Shell scripting dev shell";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.my.dev.sh.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.sh.users { inherit packages; };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
20
modules/dev/sh/common.nix
Normal file
20
modules/dev/sh/common.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
shellcheck
|
||||||
|
shfmt
|
||||||
|
;
|
||||||
|
inherit (pkgs.nodePackages) bash-language-server;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "sh-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "💻 Shell scripting dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
34
modules/dev/sh/home.nix
Normal file
34
modules/dev/sh/home.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"sh"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.sh;
|
||||||
|
sh = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.sh.enable = lib.mkEnableOption "Install shell scripting tools globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.sh.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = sh.packages;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
27
modules/dev/sh/nixos.nix
Normal file
27
modules/dev/sh/nixos.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
sh = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
devShells.sh = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = sh.devShell;
|
||||||
|
description = "Shell scripting dev shell";
|
||||||
|
};
|
||||||
|
my.dev.sh = {
|
||||||
|
enable = lib.mkEnableOption "Install shell scripting tools globally";
|
||||||
|
users = lib.mkOption {
|
||||||
|
type = inputs.self.lib.usersOptionType lib;
|
||||||
|
default = config.my.toggleUsers.dev;
|
||||||
|
description = "Users to install shell scripting packages for";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
modules/dev/zig/common.nix
Normal file
19
modules/dev/zig/common.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
zig
|
||||||
|
zls
|
||||||
|
;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit packages;
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
inherit packages;
|
||||||
|
name = "zig-dev-shell";
|
||||||
|
shellHook = ''
|
||||||
|
echo "🦎 Zig dev environment"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
34
modules/dev/zig/home.nix
Normal file
34
modules/dev/zig/home.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hm = inputs.self.lib.hmModule {
|
||||||
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
osConfig
|
||||||
|
;
|
||||||
|
optionPath = [
|
||||||
|
"dev"
|
||||||
|
"zig"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
cfg = config.my.dev.zig;
|
||||||
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.dev.zig.enable = lib.mkEnableOption "Install Zig tooling globally";
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
my.dev.zig.enable = lib.mkDefault hm.enabledByDefault;
|
||||||
|
}
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
home.packages = feature.packages;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -6,15 +6,15 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
packages = builtins.attrValues {
|
feature = import ./common.nix { inherit pkgs; };
|
||||||
inherit (pkgs)
|
|
||||||
zig # Zig compiler and stdlib
|
|
||||||
zls # Language server for Zig
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
devShells.zig = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = feature.devShell;
|
||||||
|
description = "Zig development shell with compiler and LSP";
|
||||||
|
};
|
||||||
my.dev.zig = {
|
my.dev.zig = {
|
||||||
enable = lib.mkEnableOption "Install Zig tooling globally";
|
enable = lib.mkEnableOption "Install Zig tooling globally";
|
||||||
users = lib.mkOption {
|
users = lib.mkOption {
|
||||||
@@ -23,19 +23,5 @@ in
|
|||||||
description = "Users to install Zig packages for";
|
description = "Users to install Zig packages for";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
devShells.zig = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.mkShell {
|
|
||||||
inherit packages;
|
|
||||||
name = "zig-dev-shell";
|
|
||||||
shellHook = ''
|
|
||||||
echo "🦎 Zig dev environment"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
description = "Zig development shell with compiler and LSP";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.my.dev.zig.enable {
|
|
||||||
users.users = inputs.self.lib.mkUserAttrs lib config.my.dev.zig.users { inherit packages; };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -65,41 +65,43 @@
|
|||||||
lib.mkMerge (
|
lib.mkMerge (
|
||||||
lib.mapAttrsToList (user: packages: inputs.self.lib.mkUserPackages lib user packages) userMap
|
lib.mapAttrsToList (user: packages: inputs.self.lib.mkUserPackages lib user packages) userMap
|
||||||
);
|
);
|
||||||
systemd.user.services =
|
systemd.user = {
|
||||||
config.my.scripts
|
services =
|
||||||
|> lib.mapAttrs' (
|
config.my.scripts
|
||||||
_name: script:
|
|> lib.mapAttrs' (
|
||||||
lib.nameValuePair "${script.name}" (
|
_name: script:
|
||||||
lib.mkIf (script.enable && script.service) {
|
lib.nameValuePair "${script.name}" (
|
||||||
restartIfChanged = true;
|
lib.mkIf (script.enable && script.service) {
|
||||||
inherit (script) description;
|
restartIfChanged = true;
|
||||||
wantedBy = [ "default.target" ];
|
inherit (script) description;
|
||||||
path = [
|
wantedBy = [ "default.target" ];
|
||||||
pkgs.nix
|
path = [
|
||||||
script.package
|
pkgs.nix
|
||||||
];
|
script.package
|
||||||
serviceConfig = {
|
];
|
||||||
Restart = "on-failure";
|
serviceConfig = {
|
||||||
RestartSec = 30;
|
Restart = "on-failure";
|
||||||
ExecStart = "${script.package}/bin/${script.name}";
|
RestartSec = 30;
|
||||||
};
|
ExecStart = "${script.package}/bin/${script.name}";
|
||||||
}
|
};
|
||||||
)
|
}
|
||||||
);
|
)
|
||||||
systemd.user.timers =
|
);
|
||||||
config.my.scripts
|
timers =
|
||||||
|> lib.mapAttrs' (
|
config.my.scripts
|
||||||
_name: script:
|
|> lib.mapAttrs' (
|
||||||
lib.nameValuePair "${script.name}" (
|
_name: script:
|
||||||
lib.mkIf (script.enable && script.service) {
|
lib.nameValuePair "${script.name}" (
|
||||||
enable = true;
|
lib.mkIf (script.enable && script.service) {
|
||||||
inherit (script) description;
|
enable = true;
|
||||||
wantedBy = [ "timers.target" ];
|
inherit (script) description;
|
||||||
timerConfig = {
|
wantedBy = [ "timers.target" ];
|
||||||
OnCalendar = script.timer;
|
timerConfig = {
|
||||||
};
|
OnCalendar = script.timer;
|
||||||
}
|
};
|
||||||
)
|
}
|
||||||
);
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ in
|
|||||||
};
|
};
|
||||||
ips = lib.mkOption {
|
ips = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.str;
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
description = "Set of IP's for all my computers.";
|
||||||
default = {
|
default = {
|
||||||
router = "192.168.100.1";
|
router = "192.168.100.1";
|
||||||
server = "192.168.100.15";
|
server = "192.168.100.15";
|
||||||
@@ -73,35 +74,34 @@ in
|
|||||||
wg-friend5 = "10.8.0.6";
|
wg-friend5 = "10.8.0.6";
|
||||||
wg-friend6 = "10.8.0.7";
|
wg-friend6 = "10.8.0.7";
|
||||||
};
|
};
|
||||||
description = "Set of IP's for all my computers.";
|
|
||||||
};
|
};
|
||||||
subnets = lib.mkOption {
|
subnets = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.str;
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
description = "Set of subnets for WireGuard networks.";
|
||||||
default = {
|
default = {
|
||||||
wg-homelab = "10.77.0.0/24";
|
wg-homelab = "10.77.0.0/24";
|
||||||
wg-friends = "10.8.0.0/24";
|
wg-friends = "10.8.0.0/24";
|
||||||
wg-guests = "10.9.0.0/24";
|
wg-guests = "10.9.0.0/24";
|
||||||
};
|
};
|
||||||
description = "Set of subnets for WireGuard networks.";
|
|
||||||
};
|
};
|
||||||
wgInterfaces = lib.mkOption {
|
wgInterfaces = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.str;
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
description = "WireGuard interface IPs for the VPS.";
|
||||||
default = {
|
default = {
|
||||||
wg-homelab = "10.77.0.1/24";
|
wg-homelab = "10.77.0.1/24";
|
||||||
wg-friends = "10.8.0.1/24";
|
wg-friends = "10.8.0.1/24";
|
||||||
wg-guests = "10.9.0.1/24";
|
wg-guests = "10.9.0.1/24";
|
||||||
};
|
};
|
||||||
description = "WireGuard interface IPs for the VPS.";
|
|
||||||
};
|
};
|
||||||
interfaces = lib.mkOption {
|
interfaces = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.str;
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
description = "Set of network interface names for all my computers.";
|
||||||
default = {
|
default = {
|
||||||
server = "enp0s31f6";
|
server = "enp0s31f6";
|
||||||
miniserver = "enp2s0";
|
miniserver = "enp2s0";
|
||||||
workstation = "enp5s0";
|
workstation = "enp5s0";
|
||||||
vps = "eth0";
|
vps = "eth0";
|
||||||
};
|
};
|
||||||
description = "Set of network interface names for all my computers.";
|
|
||||||
};
|
};
|
||||||
mainServer = lib.mkOption {
|
mainServer = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
@@ -130,6 +130,7 @@ in
|
|||||||
};
|
};
|
||||||
ports = lib.mkOption {
|
ports = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.port;
|
type = lib.types.attrsOf lib.types.port;
|
||||||
|
description = "Common port assignments for local services and firewall rules.";
|
||||||
default = {
|
default = {
|
||||||
comfyui = 8188;
|
comfyui = 8188;
|
||||||
giteaSsh = 22;
|
giteaSsh = 22;
|
||||||
@@ -147,7 +148,6 @@ in
|
|||||||
wg = 51820;
|
wg = 51820;
|
||||||
ssh = 3456;
|
ssh = 3456;
|
||||||
};
|
};
|
||||||
description = "Common port assignments for local services and firewall rules.";
|
|
||||||
};
|
};
|
||||||
email = lib.mkOption {
|
email = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
@@ -168,6 +168,7 @@ in
|
|||||||
};
|
};
|
||||||
toggleUsers = lib.mkOption {
|
toggleUsers = lib.mkOption {
|
||||||
type = lib.types.attrsOf (lib.types.either lib.types.str (lib.types.listOf lib.types.str));
|
type = lib.types.attrsOf (lib.types.either lib.types.str (lib.types.listOf lib.types.str));
|
||||||
|
description = "Map toggle categories to users. Can be a single user (string) or multiple users (list). Determines which user(s) get packages from each toggle category.";
|
||||||
default = {
|
default = {
|
||||||
apps = "jawz";
|
apps = "jawz";
|
||||||
dev = "jawz";
|
dev = "jawz";
|
||||||
@@ -176,7 +177,6 @@ in
|
|||||||
services = "jawz";
|
services = "jawz";
|
||||||
stylix = "jawz";
|
stylix = "jawz";
|
||||||
};
|
};
|
||||||
description = "Map toggle categories to users. Can be a single user (string) or multiple users (list). Determines which user(s) get packages from each toggle category.";
|
|
||||||
example = {
|
example = {
|
||||||
apps = "jawz";
|
apps = "jawz";
|
||||||
dev = "bearded_dragonn";
|
dev = "bearded_dragonn";
|
||||||
|
|||||||
@@ -30,8 +30,8 @@
|
|||||||
description = "Maximum number of parallel jobs (null = auto-detect)";
|
description = "Maximum number of parallel jobs (null = auto-detect)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config.nix = {
|
||||||
nix.settings = lib.mkMerge [
|
settings = lib.mkMerge [
|
||||||
{
|
{
|
||||||
system-features = config.my.nix.features;
|
system-features = config.my.nix.features;
|
||||||
}
|
}
|
||||||
@@ -42,6 +42,6 @@
|
|||||||
max-jobs = config.my.nix.maxJobs;
|
max-jobs = config.my.nix.maxJobs;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
nix.buildMachines = lib.mkIf (config.my.nix.buildMachines != [ ]) config.my.nix.buildMachines;
|
buildMachines = lib.mkIf (config.my.nix.buildMachines != [ ]) config.my.nix.buildMachines;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
shellType = inputs.self.lib.hmShellType config osConfig;
|
shellType = inputs.self.lib.hmShellType osConfig "zsh";
|
||||||
enabled =
|
enabled =
|
||||||
inputs.self.lib.hmOnlyUser config osConfig "jawz"
|
inputs.self.lib.hmOnlyUser config osConfig "jawz"
|
||||||
&& (osConfig.my.units.download.enable || osConfig.my.units.downloadManga.enable);
|
&& (osConfig.my.units.download.enable || osConfig.my.units.downloadManga.enable);
|
||||||
download = import ./common.nix {
|
download = import ./common.nix {
|
||||||
config = if osConfig == null then { } else osConfig;
|
|
||||||
inherit inputs lib pkgs;
|
inherit inputs lib pkgs;
|
||||||
|
config = if osConfig == null then { } else osConfig;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ in
|
|||||||
options.my.servers.drpp = setup.mkOptions "drpp" "drpp" 0;
|
options.my.servers.drpp = setup.mkOptions "drpp" "drpp" 0;
|
||||||
config.virtualisation.oci-containers.containers.drpp = lib.mkIf cfg.enable {
|
config.virtualisation.oci-containers.containers.drpp = lib.mkIf cfg.enable {
|
||||||
image = "ghcr.io/phin05/discord-rich-presence-plex:latest";
|
image = "ghcr.io/phin05/discord-rich-presence-plex:latest";
|
||||||
environment = {
|
|
||||||
DRPP_UID = toString config.users.users.jawz.uid;
|
|
||||||
DRPP_GID = toString config.users.groups.users.gid;
|
|
||||||
};
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"${config.my.containerData}/drpp:/app/data"
|
"${config.my.containerData}/drpp:/app/data"
|
||||||
"/run/user/${toString config.users.users.jawz.uid}:/run/app"
|
"/run/user/${toString config.users.users.jawz.uid}:/run/app"
|
||||||
];
|
];
|
||||||
|
environment = {
|
||||||
|
DRPP_UID = toString config.users.users.jawz.uid;
|
||||||
|
DRPP_GID = toString config.users.groups.users.gid;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,7 @@ in
|
|||||||
flameSecret = setup.mkOptions "flameSecret" "qampqwn4wprhqny8h8zj" 5007;
|
flameSecret = setup.mkOptions "flameSecret" "qampqwn4wprhqny8h8zj" 5007;
|
||||||
};
|
};
|
||||||
config = lib.mkIf enable {
|
config = lib.mkIf enable {
|
||||||
sops.secrets = {
|
sops.secrets.flame.sopsFile = ../../secrets/env.yaml;
|
||||||
flame.sopsFile = ../../secrets/env.yaml;
|
|
||||||
};
|
|
||||||
virtualisation.oci-containers.containers = lib.mkIf enable {
|
virtualisation.oci-containers.containers = lib.mkIf enable {
|
||||||
flame = lib.mkIf cfg.enable {
|
flame = lib.mkIf cfg.enable {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ let
|
|||||||
cfg = config.my.servers.gitea;
|
cfg = config.my.servers.gitea;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
options.my.servers.gitea = setup.mkOptions "gitea" "git" 9083;
|
||||||
imports = [
|
imports = [
|
||||||
../nix/gitea-actions-runners/nixos.nix
|
../nix/gitea-actions-runners/nixos.nix
|
||||||
../nix/gitea-actions-runners/docker.nix
|
../nix/gitea-actions-runners/docker.nix
|
||||||
];
|
];
|
||||||
options.my.servers.gitea = setup.mkOptions "gitea" "git" 9083;
|
|
||||||
config = lib.mkIf (cfg.enable && config.my.secureHost) {
|
config = lib.mkIf (cfg.enable && config.my.secureHost) {
|
||||||
sops.secrets.gitea.sopsFile = ../../secrets/env.yaml;
|
sops.secrets.gitea.sopsFile = ../../secrets/env.yaml;
|
||||||
users.groups.gitea.gid = 974;
|
users.groups.gitea.gid = 974;
|
||||||
|
|||||||
@@ -154,8 +154,8 @@
|
|||||||
icon = "${name}.png";
|
icon = "${name}.png";
|
||||||
href = url;
|
href = url;
|
||||||
widget = {
|
widget = {
|
||||||
type = name;
|
|
||||||
inherit url;
|
inherit url;
|
||||||
|
type = name;
|
||||||
username = "{{HOMEPAGE_VAR_QBIT_USERNAME}}";
|
username = "{{HOMEPAGE_VAR_QBIT_USERNAME}}";
|
||||||
password = "{{HOMEPAGE_VAR_QBIT_PASSWORD}}";
|
password = "{{HOMEPAGE_VAR_QBIT_PASSWORD}}";
|
||||||
};
|
};
|
||||||
@@ -169,8 +169,8 @@
|
|||||||
icon = "${name}.png";
|
icon = "${name}.png";
|
||||||
href = url;
|
href = url;
|
||||||
widget = {
|
widget = {
|
||||||
type = name;
|
|
||||||
inherit url;
|
inherit url;
|
||||||
|
type = name;
|
||||||
key = "{{HOMEPAGE_VAR_SABNZBD}}";
|
key = "{{HOMEPAGE_VAR_SABNZBD}}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -231,9 +231,9 @@
|
|||||||
icon = "paperless.png";
|
icon = "paperless.png";
|
||||||
href = url;
|
href = url;
|
||||||
widget = {
|
widget = {
|
||||||
|
inherit url;
|
||||||
type = name;
|
type = name;
|
||||||
key = "{{HOMEPAGE_VAR_PAPERLESS}}";
|
key = "{{HOMEPAGE_VAR_PAPERLESS}}";
|
||||||
inherit url;
|
|
||||||
fields = [
|
fields = [
|
||||||
"total"
|
"total"
|
||||||
"inbox"
|
"inbox"
|
||||||
@@ -262,9 +262,9 @@
|
|||||||
icon = "${name}.png";
|
icon = "${name}.png";
|
||||||
href = url;
|
href = url;
|
||||||
widget = {
|
widget = {
|
||||||
|
inherit url;
|
||||||
type = name;
|
type = name;
|
||||||
key = "{{HOMEPAGE_VAR_STASH}}";
|
key = "{{HOMEPAGE_VAR_STASH}}";
|
||||||
inherit url;
|
|
||||||
fields = [
|
fields = [
|
||||||
"scenes"
|
"scenes"
|
||||||
"images"
|
"images"
|
||||||
|
|||||||
@@ -22,14 +22,12 @@
|
|||||||
{
|
{
|
||||||
openweathermap = {
|
openweathermap = {
|
||||||
label = "Apodaca";
|
label = "Apodaca";
|
||||||
|
format.maximumFractionDigits = 1;
|
||||||
latitude = 25.760339;
|
latitude = 25.760339;
|
||||||
longitude = -100.2190662;
|
longitude = -100.2190662;
|
||||||
units = "metric";
|
units = "metric";
|
||||||
provider = "openweathermap";
|
provider = "openweathermap";
|
||||||
cache = 5;
|
cache = 5;
|
||||||
format = {
|
|
||||||
maximumFractionDigits = 1;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -54,11 +54,9 @@ in
|
|||||||
};
|
};
|
||||||
timers.sub-sync = {
|
timers.sub-sync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
timerConfig.OnCalendar = "20:00";
|
||||||
description = "syncronizes subtitles downloaded & modified today";
|
description = "syncronizes subtitles downloaded & modified today";
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "20:00";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,11 +13,6 @@ in
|
|||||||
autoStart = true;
|
autoStart = true;
|
||||||
image = "linuxserver/lidarr:latest";
|
image = "linuxserver/lidarr:latest";
|
||||||
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
|
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
|
||||||
environment = {
|
|
||||||
TZ = config.my.timeZone;
|
|
||||||
PUID = toString config.users.users.jawz.uid;
|
|
||||||
PGID = toString config.users.groups.piracy.gid;
|
|
||||||
};
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"/srv/pool/multimedia:/data"
|
"/srv/pool/multimedia:/data"
|
||||||
"/srv/pool/multimedia/media/Music:/music"
|
"/srv/pool/multimedia/media/Music:/music"
|
||||||
@@ -31,5 +26,10 @@ in
|
|||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=host"
|
"--network=host"
|
||||||
];
|
];
|
||||||
|
environment = {
|
||||||
|
TZ = config.my.timeZone;
|
||||||
|
PUID = toString config.users.users.jawz.uid;
|
||||||
|
PGID = toString config.users.groups.piracy.gid;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ in
|
|||||||
image = "krateng/maloja:latest";
|
image = "krateng/maloja:latest";
|
||||||
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
|
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
|
||||||
environmentFiles = [ config.sops.secrets.maloja.path ];
|
environmentFiles = [ config.sops.secrets.maloja.path ];
|
||||||
|
volumes = [ "${config.my.containerData}/maloja:/mljdata" ];
|
||||||
environment = {
|
environment = {
|
||||||
TZ = config.my.timeZone;
|
TZ = config.my.timeZone;
|
||||||
MALOJA_TIMEZONE = "-6";
|
MALOJA_TIMEZONE = "-6";
|
||||||
@@ -23,7 +24,6 @@ in
|
|||||||
MALOJA_DATA_DIRECTORY = "/mljdata";
|
MALOJA_DATA_DIRECTORY = "/mljdata";
|
||||||
MALOJA_SKIP_SETUP = "true";
|
MALOJA_SKIP_SETUP = "true";
|
||||||
};
|
};
|
||||||
volumes = [ "${config.my.containerData}/maloja:/mljdata" ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ in
|
|||||||
image = "foxxmd/multi-scrobbler:latest";
|
image = "foxxmd/multi-scrobbler:latest";
|
||||||
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
|
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
|
||||||
environmentFiles = [ config.sops.secrets.multi-scrobbler.path ];
|
environmentFiles = [ config.sops.secrets.multi-scrobbler.path ];
|
||||||
|
volumes = [ "${config.my.containerData}/multi-scrobbler:/config" ];
|
||||||
environment = {
|
environment = {
|
||||||
TZ = config.my.timeZone;
|
TZ = config.my.timeZone;
|
||||||
PUID = toString config.users.users.jawz.uid;
|
PUID = toString config.users.users.jawz.uid;
|
||||||
@@ -25,7 +26,6 @@ in
|
|||||||
PLEX_URL = "http://192.168.100.15:32400";
|
PLEX_URL = "http://192.168.100.15:32400";
|
||||||
WS_ENABLE = "true";
|
WS_ENABLE = "true";
|
||||||
};
|
};
|
||||||
volumes = [ "${config.my.containerData}/multi-scrobbler:/config" ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ let
|
|||||||
version = "12.70";
|
version = "12.70";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
pname = "Image-ExifTool";
|
|
||||||
inherit version;
|
inherit version;
|
||||||
|
pname = "Image-ExifTool";
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url = "https://exiftool.org/Image-ExifTool-${version}.tar.gz";
|
url = "https://exiftool.org/Image-ExifTool-${version}.tar.gz";
|
||||||
hash = "sha256-TLJSJEXMPj870TkExq6uraX8Wl4kmNerrSlX3LQsr/4=";
|
hash = "sha256-TLJSJEXMPj870TkExq6uraX8Wl4kmNerrSlX3LQsr/4=";
|
||||||
@@ -49,12 +49,10 @@ in
|
|||||||
owner = config.users.users.nextcloud.name;
|
owner = config.users.users.nextcloud.name;
|
||||||
inherit (config.users.users.nextcloud) group;
|
inherit (config.users.users.nextcloud) group;
|
||||||
};
|
};
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
|
||||||
"nodejs-14.21.3"
|
|
||||||
"openssl-1.1.1v"
|
|
||||||
];
|
|
||||||
users = {
|
users = {
|
||||||
groups.nextcloud = { inherit gid; };
|
groups.nextcloud = {
|
||||||
|
inherit gid;
|
||||||
|
};
|
||||||
users.nextcloud = {
|
users.nextcloud = {
|
||||||
inherit uid;
|
inherit uid;
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
@@ -189,20 +187,24 @@ in
|
|||||||
go-vod = lib.mkIf config.my.servers.go-vod.enable {
|
go-vod = lib.mkIf config.my.servers.go-vod.enable {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
image = "radialapps/go-vod:latest";
|
image = "radialapps/go-vod:latest";
|
||||||
|
volumes = [ "ncdata:/var/www/html:ro" ];
|
||||||
|
extraOptions = [
|
||||||
|
"--device=/dev/dri" # VA-API (omit for NVENC)
|
||||||
|
];
|
||||||
environment = {
|
environment = {
|
||||||
TZ = config.my.timeZone;
|
TZ = config.my.timeZone;
|
||||||
NEXTCLOUD_HOST = "https://${config.services.nextcloud.hostName}";
|
NEXTCLOUD_HOST = "https://${config.services.nextcloud.hostName}";
|
||||||
NVIDIA_VISIBLE_DEVICES = "all";
|
NVIDIA_VISIBLE_DEVICES = "all";
|
||||||
};
|
};
|
||||||
volumes = [ "ncdata:/var/www/html:ro" ];
|
|
||||||
extraOptions = [
|
|
||||||
"--device=/dev/dri" # VA-API (omit for NVENC)
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
collabora = lib.mkIf cfgC.enable {
|
collabora = lib.mkIf cfgC.enable {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
image = "collabora/code:latest";
|
image = "collabora/code:latest";
|
||||||
ports = [ "${toString cfgC.port}:${toString cfgC.port}" ];
|
ports = [ "${toString cfgC.port}:${toString cfgC.port}" ];
|
||||||
|
extraOptions = [
|
||||||
|
"--cap-add"
|
||||||
|
"MKNOD"
|
||||||
|
];
|
||||||
environment = {
|
environment = {
|
||||||
TZ = config.my.timeZone;
|
TZ = config.my.timeZone;
|
||||||
domain = cfg.host;
|
domain = cfg.host;
|
||||||
@@ -219,10 +221,6 @@ in
|
|||||||
DONT_GEN_SSL_CERT = "1";
|
DONT_GEN_SSL_CERT = "1";
|
||||||
SLEEPFORDEBUGGER = "0";
|
SLEEPFORDEBUGGER = "0";
|
||||||
};
|
};
|
||||||
extraOptions = [
|
|
||||||
"--cap-add"
|
|
||||||
"MKNOD"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd = lib.mkIf cfg.enableCron {
|
systemd = lib.mkIf cfg.enableCron {
|
||||||
@@ -248,11 +246,9 @@ in
|
|||||||
};
|
};
|
||||||
timers.nextcloud-cronjob = {
|
timers.nextcloud-cronjob = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
timerConfig.OnCalendar = "*:0/10";
|
||||||
description = "Runs various nextcloud-related cronjobs";
|
description = "Runs various nextcloud-related cronjobs";
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "*:0/10";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ in
|
|||||||
settings = {
|
settings = {
|
||||||
PAPERLESS_ACCOUNT_DEFAULT_HTTP_PROTOCOL = "http";
|
PAPERLESS_ACCOUNT_DEFAULT_HTTP_PROTOCOL = "http";
|
||||||
PAPERLESS_URL = "http://${config.my.ips.server}:${builtins.toString port}";
|
PAPERLESS_URL = "http://${config.my.ips.server}:${builtins.toString port}";
|
||||||
PAPERLESS_DBENGINE = "postgress";
|
PAPERLESS_DBENGINE = "postgresql";
|
||||||
PAPERLESS_DBNAME = "paperless";
|
PAPERLESS_DBNAME = "paperless";
|
||||||
PAPERLESS_DBHOST = config.my.postgresSocket;
|
PAPERLESS_DBHOST = config.my.postgresSocket;
|
||||||
PAPERLESS_TIME_ZONE = config.my.timeZone;
|
PAPERLESS_TIME_ZONE = config.my.timeZone;
|
||||||
|
|||||||
@@ -52,6 +52,21 @@ in
|
|||||||
config = lib.mkIf (config.my.servers.qbittorrent.enable && config.my.secureHost) {
|
config = lib.mkIf (config.my.servers.qbittorrent.enable && config.my.secureHost) {
|
||||||
my.network.firewall.additionalPorts = [ config.my.servers.qbittorrent.port ];
|
my.network.firewall.additionalPorts = [ config.my.servers.qbittorrent.port ];
|
||||||
home-manager.users.jawz.xdg.dataFile.vuetorrent.source = vuetorrent;
|
home-manager.users.jawz.xdg.dataFile.vuetorrent.source = vuetorrent;
|
||||||
|
home-manager.users.jawz.imports = [
|
||||||
|
(
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
home.activation.qbittorrentAutorunCommand = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
conf=/home/jawz/.config/qBittorrent/qBittorrent.conf
|
||||||
|
if [ -f "$conf" ]; then
|
||||||
|
sed -i \
|
||||||
|
's|^program=.*$|program=${torrentCompletionScript} %F|' \
|
||||||
|
"$conf"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
)
|
||||||
|
];
|
||||||
sops.secrets =
|
sops.secrets =
|
||||||
let
|
let
|
||||||
mkQbitSecret = file: mode: {
|
mkQbitSecret = file: mode: {
|
||||||
@@ -84,16 +99,6 @@ in
|
|||||||
};
|
};
|
||||||
user = {
|
user = {
|
||||||
services = {
|
services = {
|
||||||
qbit_manage = {
|
|
||||||
restartIfChanged = true;
|
|
||||||
description = "Tidy up my torrents";
|
|
||||||
wantedBy = [ "default.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 30;
|
|
||||||
ExecStart = "${qbit_manageEnv}/bin/python ${qbit_manage}/qbit_manage.py -r -c /home/jawz/.config/qbit_manage/config.yml";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
unpackerr = lib.mkIf config.my.servers.unpackerr.enable {
|
unpackerr = lib.mkIf config.my.servers.unpackerr.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
restartIfChanged = true;
|
restartIfChanged = true;
|
||||||
@@ -115,6 +120,16 @@ in
|
|||||||
ExecStart = "${pkgs.unpackerr}/bin/unpackerr";
|
ExecStart = "${pkgs.unpackerr}/bin/unpackerr";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
qbit_manage = {
|
||||||
|
restartIfChanged = true;
|
||||||
|
description = "Tidy up my torrents";
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
TimeoutStartSec = "5min";
|
||||||
|
ExecStart = "${qbit_manageEnv}/bin/python ${qbit_manage}/qbit_manage.py -r -c /home/jawz/.config/qbit_manage/config.yml";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
timers.qbit_manage = {
|
timers.qbit_manage = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ in
|
|||||||
image = "ghcr.io/ignisda/ryot:v10";
|
image = "ghcr.io/ignisda/ryot:v10";
|
||||||
ports = [ "${toString cfg.port}:8000" ];
|
ports = [ "${toString cfg.port}:8000" ];
|
||||||
environmentFiles = [ config.sops.secrets.ryot.path ];
|
environmentFiles = [ config.sops.secrets.ryot.path ];
|
||||||
|
volumes = [ "${config.my.postgresSocket}:${config.my.postgresSocket}" ];
|
||||||
environment = {
|
environment = {
|
||||||
RUST_LOG = "ryot=debug,sea_orm=debug";
|
RUST_LOG = "ryot=debug,sea_orm=debug";
|
||||||
TZ = config.my.timeZone;
|
TZ = config.my.timeZone;
|
||||||
DATABASE_URL = "postgres:///ryot?host=${config.my.postgresSocket}";
|
DATABASE_URL = "postgres:///ryot?host=${config.my.postgresSocket}";
|
||||||
FRONTEND_INSECURE_COOKIES = "true";
|
FRONTEND_INSECURE_COOKIES = "true";
|
||||||
};
|
};
|
||||||
volumes = [ "${config.my.postgresSocket}:${config.my.postgresSocket}" ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user