forked from KptltD00M/nixy
5082521524
- Introduced `default-creds` module for managing default credentials with Umami integration. - Added `fail2ban` module for brute-force attack protection with configurable ban times. - Created `firewall` module to enable and configure basic firewall settings. - Implemented `gitea` module for self-hosted Git service with PostgreSQL backend. - Developed `glance` module for a customizable dashboard with various widgets and themes. - Added `iknowyou` module for a self-hosted password manager with production and demo environments. - Introduced `kernel-hardening` module for enhancing kernel security settings. - Created `mazanoke` module for a simple web application with Nginx integration. - Added `mealie` module for a self-hosted meal planning application. - Implemented `stirling-pdf` module for PDF generation service. - Developed `umami` module for self-hosted analytics with secret management. - Added `ssh` module for secure SSH configuration with user restrictions. - Introduced `nixy` theme for a customized aesthetic experience across services.
64 lines
1.6 KiB
Nix
64 lines
1.6 KiB
Nix
# Nix configuration for NixOS
|
|
{
|
|
config,
|
|
inputs,
|
|
...
|
|
}: let
|
|
autoGarbageCollector = config.var.autoGarbageCollector;
|
|
in {
|
|
# Ask for password once per SSH session (tied to the tty, expires when session closes)
|
|
security.sudo.extraConfig = ''
|
|
Defaults timestamp_type=tty,timestamp_timeout=-1
|
|
'';
|
|
|
|
security.sudo.extraRules = [
|
|
{
|
|
users = [config.var.username];
|
|
commands = [
|
|
{
|
|
command = "/run/current-system/sw/bin/nixos-rebuild";
|
|
options = ["NOPASSWD"];
|
|
}
|
|
];
|
|
}
|
|
];
|
|
nixpkgs.config = {
|
|
allowUnfree = true;
|
|
allowBroken = false;
|
|
};
|
|
nix = {
|
|
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
|
channel.enable = false;
|
|
extraOptions = ''
|
|
warn-dirty = false
|
|
'';
|
|
settings = {
|
|
download-buffer-size = 262144000; # 250 MB (250 * 1024 * 1024)
|
|
auto-optimise-store = true;
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
substituters = [
|
|
# high priority since it's almost always used
|
|
"https://cache.nixos.org?priority=10"
|
|
|
|
"https://hyprland.cachix.org"
|
|
"https://nix-community.cachix.org"
|
|
"https://numtide.cachix.org"
|
|
];
|
|
trusted-public-keys = [
|
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
|
|
];
|
|
};
|
|
gc = {
|
|
automatic = autoGarbageCollector;
|
|
persistent = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 7d";
|
|
};
|
|
};
|
|
}
|