mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
update
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
"10-disable-camera" = {
|
"10-disable-camera" = {
|
||||||
"wireplumber.profiles" = { main."monitor.libcamera" = "disabled"; };
|
"wireplumber.profiles" = {main."monitor.libcamera" = "disabled";};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{ pkgs, ... }: {
|
{pkgs, ...}: {
|
||||||
environment.systemPackages = with pkgs; [ blueman ];
|
environment.systemPackages = with pkgs; [blueman];
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
powerOnBoot = true;
|
powerOnBoot = true;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }: {
|
{config, ...}: {
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
users.users."${config.var.username}".extraGroups = [ "docker" ];
|
users.users."${config.var.username}".extraGroups = ["docker"];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ pkgs, ... }: {
|
{pkgs, ...}: {
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
roboto
|
roboto
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{ inputs, ... }: {
|
{inputs, ...}: {
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
backupFileExtension = "hm-backup";
|
backupFileExtension = "hm-backup";
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = {inherit inputs;};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
{ inputs, pkgs, ... }: {
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
withUWSM = true;
|
withUWSM = true;
|
||||||
|
|||||||
@@ -1,26 +1,34 @@
|
|||||||
{ config, inputs, ... }:
|
{
|
||||||
let autoGarbageCollector = config.var.autoGarbageCollector;
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
autoGarbageCollector = config.var.autoGarbageCollector;
|
||||||
in {
|
in {
|
||||||
security.sudo.extraRules = [{
|
security.sudo.extraRules = [
|
||||||
users = [ config.var.username ];
|
{
|
||||||
commands = [{
|
users = [config.var.username];
|
||||||
command = "/run/current-system/sw/bin/nixos-rebuild";
|
commands = [
|
||||||
options = [ "NOPASSWD" ];
|
{
|
||||||
}];
|
command = "/run/current-system/sw/bin/nixos-rebuild";
|
||||||
}];
|
options = ["NOPASSWD"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
allowBroken = true;
|
allowBroken = true;
|
||||||
};
|
};
|
||||||
nix = {
|
nix = {
|
||||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||||
channel.enable = false;
|
channel.enable = false;
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
warn-dirty = false
|
warn-dirty = false
|
||||||
'';
|
'';
|
||||||
settings = {
|
settings = {
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
substituters = [
|
substituters = [
|
||||||
# high priority since it's almost always used
|
# high priority since it's almost always used
|
||||||
"https://cache.nixos.org?priority=10"
|
"https://cache.nixos.org?priority=10"
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
{ lib, pkgs, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
let
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
# Using beta driver for recent GPUs like RTX 4070
|
# Using beta driver for recent GPUs like RTX 4070
|
||||||
nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.beta;
|
nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
in {
|
in {
|
||||||
# Video drivers configuration for Xorg and Wayland
|
# Video drivers configuration for Xorg and Wayland
|
||||||
services.xserver.videoDrivers =
|
services.xserver.videoDrivers = ["nvidia"]; # Simplified - other modules are loaded automatically
|
||||||
[ "nvidia" ]; # Simplified - other modules are loaded automatically
|
|
||||||
|
|
||||||
# Kernel parameters for better Wayland and Hyprland integration
|
# Kernel parameters for better Wayland and Hyprland integration
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
@@ -16,7 +17,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Blacklist nouveau to avoid conflicts
|
# Blacklist nouveau to avoid conflicts
|
||||||
boot.blacklistedKernelModules = [ "nouveau" ];
|
boot.blacklistedKernelModules = ["nouveau"];
|
||||||
|
|
||||||
# Environment variables for better compatibility
|
# Environment variables for better compatibility
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
@@ -88,7 +89,7 @@ in {
|
|||||||
|
|
||||||
# Nix cache for CUDA
|
# Nix cache for CUDA
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = [ "https://cuda-maintainers.cachix.org" ];
|
substituters = ["https://cuda-maintainers.cachix.org"];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,8 +1,15 @@
|
|||||||
{ config, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
let
|
pkgs,
|
||||||
hp-omen-linux-module = pkgs.callPackage
|
...
|
||||||
({ kernel ? config.boot.kernelPackages.kernel, stdenv, fetchFromGitHub }:
|
}: let
|
||||||
|
hp-omen-linux-module =
|
||||||
|
pkgs.callPackage
|
||||||
|
({
|
||||||
|
kernel ? config.boot.kernelPackages.kernel,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "hp-omen-linux-module";
|
pname = "hp-omen-linux-module";
|
||||||
version = "rebase-6.14";
|
version = "rebase-6.14";
|
||||||
@@ -24,13 +31,13 @@ let
|
|||||||
install hp-wmi.ko -Dm444 -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/platform/x86/hp/
|
install hp-wmi.ko -Dm444 -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/platform/x86/hp/
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
})) { kernel = config.boot.kernelPackages.kernel; };
|
})) {kernel = config.boot.kernelPackages.kernel;};
|
||||||
in {
|
in {
|
||||||
boot.extraModulePackages = [ hp-omen-linux-module ];
|
boot.extraModulePackages = [hp-omen-linux-module];
|
||||||
boot.kernelModules = [ "hp-wmi" ];
|
boot.kernelModules = ["hp-wmi"];
|
||||||
|
|
||||||
users.groups.omen-rgb = { };
|
users.groups.omen-rgb = {};
|
||||||
users.users.${config.var.username}.extraGroups = [ "omen-rgb" ];
|
users.users.${config.var.username}.extraGroups = ["omen-rgb"];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"w /sys/devices/platform/hp-wmi/rgb_zones/zone00 0660 root omen-rgb -"
|
"w /sys/devices/platform/hp-wmi/rgb_zones/zone00 0660 root omen-rgb -"
|
||||||
@@ -51,22 +58,4 @@ in {
|
|||||||
RUN+="${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone03", \
|
RUN+="${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone03", \
|
||||||
RUN+="${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone03"
|
RUN+="${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone03"
|
||||||
'';
|
'';
|
||||||
# systemd.services.fix-hp-omen-perms = {
|
|
||||||
# description = "Fix HP Omen keyboard RGB zone permissions";
|
|
||||||
# after = [ "systemd-modules-load.service" ];
|
|
||||||
# wantedBy = [ "multi-user.target" ];
|
|
||||||
# serviceConfig = {
|
|
||||||
# Type = "oneshot";
|
|
||||||
# ExecStart = ''
|
|
||||||
# ${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone00
|
|
||||||
# ${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone00
|
|
||||||
# ${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone01
|
|
||||||
# ${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone01
|
|
||||||
# ${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone02
|
|
||||||
# ${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone02
|
|
||||||
# ${pkgs.coreutils}/bin/chgrp omen-rgb /sys/devices/platform/hp-wmi/rgb_zones/zone03
|
|
||||||
# ${pkgs.coreutils}/bin/chmod 0660 /sys/devices/platform/hp-wmi/rgb_zones/zone03
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,34 +1,14 @@
|
|||||||
# SDDM is a display manager for X11 and Wayland
|
# SDDM is a display manager for X11 and Wayland
|
||||||
{ pkgs, inputs, config, lib, ... }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
foreground = config.theme.textColorOnWallpaper;
|
foreground = config.theme.textColorOnWallpaper;
|
||||||
sddm-astronaut = pkgs.sddm-astronaut.override {
|
sddm-astronaut = pkgs.sddm-astronaut.override {
|
||||||
embeddedTheme = "pixel_sakura";
|
embeddedTheme = "pixel_sakura";
|
||||||
# TODO: Cleaner version for static vs .gif, just a string.replace
|
themeConfig = {
|
||||||
themeConfig = if lib.hasSuffix "sakura_static.png" config.stylix.image then
|
|
||||||
{ }
|
|
||||||
else if lib.hasSuffix "studio.png" config.stylix.image then {
|
|
||||||
Background = pkgs.fetchurl {
|
|
||||||
url =
|
|
||||||
"https://raw.githubusercontent.com/anotherhadi/nixy-wallpapers/refs/heads/main/wallpapers/studio.gif";
|
|
||||||
sha256 = "sha256-qySDskjmFYt+ncslpbz0BfXiWm4hmFf5GPWF2NlTVB8=";
|
|
||||||
};
|
|
||||||
HeaderTextColor = "#${foreground}";
|
|
||||||
DateTextColor = "#${foreground}";
|
|
||||||
TimeTextColor = "#${foreground}";
|
|
||||||
LoginFieldTextColor = "#${foreground}";
|
|
||||||
PasswordFieldTextColor = "#${foreground}";
|
|
||||||
UserIconColor = "#${foreground}";
|
|
||||||
PasswordIconColor = "#${foreground}";
|
|
||||||
WarningColor = "#${foreground}";
|
|
||||||
LoginButtonBackgroundColor = "#${foreground}";
|
|
||||||
SystemButtonsIconsColor = "#${foreground}";
|
|
||||||
SessionButtonTextColor = "#${foreground}";
|
|
||||||
VirtualKeyboardButtonTextColor = "#${foreground}";
|
|
||||||
DropdownBackgroundColor = "#${foreground}";
|
|
||||||
HighlightBackgroundColor = "#${foreground}";
|
|
||||||
} else {
|
|
||||||
Background = "${toString config.stylix.image}";
|
|
||||||
HeaderTextColor = "#${foreground}";
|
HeaderTextColor = "#${foreground}";
|
||||||
DateTextColor = "#${foreground}";
|
DateTextColor = "#${foreground}";
|
||||||
TimeTextColor = "#${foreground}";
|
TimeTextColor = "#${foreground}";
|
||||||
@@ -43,26 +23,37 @@ let
|
|||||||
VirtualKeyboardButtonTextColor = "#${foreground}";
|
VirtualKeyboardButtonTextColor = "#${foreground}";
|
||||||
DropdownBackgroundColor = "#${foreground}";
|
DropdownBackgroundColor = "#${foreground}";
|
||||||
HighlightBackgroundColor = "#${foreground}";
|
HighlightBackgroundColor = "#${foreground}";
|
||||||
|
Background =
|
||||||
|
if "sakura_pixelart_light_static.png" == config.stylix.image
|
||||||
|
then
|
||||||
|
pkgs.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/sakura_pixelart_light_animated.gif";
|
||||||
|
sha256 = "sha256-qySDskjmFYt+ncslpbz0BfXiWm4hmFf5GPWF2NlTVB8=";
|
||||||
|
}
|
||||||
|
else if "cat-watching-the-star_pixelart_purple_static.png" == config.stylix.image
|
||||||
|
then
|
||||||
|
pkgs.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/cat-watching-the-star_pixelart_purple_animated.gif";
|
||||||
|
sha256 = "";
|
||||||
|
}
|
||||||
|
else "${toString config.stylix.image}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
services.displayManager = {
|
services.displayManager = {
|
||||||
sddm = {
|
sddm = {
|
||||||
package = pkgs.kdePackages.sddm;
|
package = pkgs.kdePackages.sddm;
|
||||||
extraPackages = [ sddm-astronaut ];
|
extraPackages = [sddm-astronaut];
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
theme = "sddm-astronaut-theme";
|
theme = "sddm-astronaut-theme";
|
||||||
settings = {
|
settings = {
|
||||||
Wayland.SessionDir = "${
|
Wayland.SessionDir = "${
|
||||||
inputs.hyprland.packages."${pkgs.system}".hyprland
|
inputs.hyprland.packages."${pkgs.system}".hyprland
|
||||||
}/share/wayland-sessions";
|
}/share/wayland-sessions";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ sddm-astronaut ];
|
environment.systemPackages = [sddm-astronaut];
|
||||||
|
|
||||||
# To prevent getting stuck at shutdown
|
|
||||||
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{pkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
boot = {
|
boot = {
|
||||||
bootspec.enable = true;
|
bootspec.enable = true;
|
||||||
loader = {
|
loader = {
|
||||||
@@ -29,14 +25,17 @@
|
|||||||
consoleLogLevel = 0;
|
consoleLogLevel = 0;
|
||||||
initrd.verbose = false;
|
initrd.verbose = false;
|
||||||
|
|
||||||
plymouth = {
|
# plymouth = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
theme = lib.mkForce "cuts_alt";
|
# theme = lib.mkForce "cuts_alt";
|
||||||
themePackages = with pkgs; [
|
# themePackages = with pkgs; [
|
||||||
(adi1090x-plymouth-themes.override {
|
# (adi1090x-plymouth-themes.override {
|
||||||
selected_themes = ["cuts_alt"];
|
# selected_themes = ["cuts_alt"];
|
||||||
})
|
# })
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# To avoid systemd services hanging on shutdown
|
||||||
|
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,31 @@
|
|||||||
# Tailscale is a VPN service that makes it easy to connect your devices between each other.
|
# Tailscale is a VPN service that makes it easy to connect your devices between each other.
|
||||||
{ config, ... }: {
|
{config, ...}: let
|
||||||
security.sudo.extraRules = [{
|
username = config.var.username;
|
||||||
users = [ config.var.username ];
|
in {
|
||||||
commands = [
|
security.sudo.extraRules = [
|
||||||
{
|
{
|
||||||
command = "/etc/profiles/per-user/${config.var.username}/bin/tailscale";
|
users = [username];
|
||||||
options = [ "NOPASSWD" ];
|
# Allow running Tailscale commands without a password
|
||||||
}
|
commands = [
|
||||||
{
|
{
|
||||||
command = "/run/current-system/sw/bin/tailscale";
|
command = "/etc/profiles/per-user/${username}/bin/tailscale";
|
||||||
options = [ "NOPASSWD" ];
|
options = ["NOPASSWD"];
|
||||||
}
|
}
|
||||||
];
|
{
|
||||||
}];
|
command = "/run/current-system/sw/bin/tailscale";
|
||||||
|
options = ["NOPASSWD"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
services.tailscale = {
|
services.tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
trustedInterfaces = [ "tailscale0" ];
|
trustedInterfaces = ["tailscale0"];
|
||||||
# required to connect to Tailscale exit nodes
|
# required to connect to Tailscale exit nodes
|
||||||
checkReversePath = "loose";
|
checkReversePath = "loose";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
# TUIGreet is a display manager.
|
# TUIGreet is a display manager.
|
||||||
# Legacy, I'm now using SDDM
|
# Legacy, I'm now using SDDM
|
||||||
{ pkgs, ... }: {
|
{pkgs, ...}: {
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session = {
|
default_session = {
|
||||||
command =
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --asterisks --container-padding 2 --time --time-format '%I:%M %p | %a • %h | %F' --cmd Hyprland";
|
||||||
"${pkgs.greetd.tuigreet}/bin/tuigreet --remember --asterisks --container-padding 2 --time --time-format '%I:%M %p | %a • %h | %F' --cmd Hyprland";
|
|
||||||
user = "greeter";
|
user = "greeter";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ greetd.tuigreet ];
|
environment.systemPackages = with pkgs; [greetd.tuigreet];
|
||||||
|
|
||||||
# this is a life saver.
|
# this is a life saver.
|
||||||
# literally no documentation about this anywhere.
|
# literally no documentation about this anywhere.
|
||||||
@@ -28,8 +27,4 @@
|
|||||||
TTYVHangup = true;
|
TTYVHangup = true;
|
||||||
TTYVTDisallocate = true;
|
TTYVTDisallocate = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# To prevent getting stuck at shutdown
|
|
||||||
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
{ config, pkgs, ... }:
|
{
|
||||||
let username = config.var.username;
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
username = config.var.username;
|
||||||
in {
|
in {
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
users = {
|
users = {
|
||||||
defaultUserShell = pkgs.zsh;
|
defaultUserShell = pkgs.zsh;
|
||||||
|
|
||||||
users.${username} = {
|
users.${username} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "${username} account";
|
description = "${username} account";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = ["networkmanager" "wheel"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{ pkgs, config, inputs, ... }:
|
{
|
||||||
let
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
hostname = config.var.hostname;
|
hostname = config.var.hostname;
|
||||||
keyboardLayout = config.var.keyboardLayout;
|
keyboardLayout = config.var.keyboardLayout;
|
||||||
configDir = config.var.configDirectory;
|
configDir = config.var.configDirectory;
|
||||||
@@ -17,11 +20,11 @@ in {
|
|||||||
enable = autoUpgrade;
|
enable = autoUpgrade;
|
||||||
dates = "04:00";
|
dates = "04:00";
|
||||||
flake = "${configDir}";
|
flake = "${configDir}";
|
||||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
flags = ["--update-input" "nixpkgs" "--commit-lock-file"];
|
||||||
allowReboot = false;
|
allowReboot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
time = { timeZone = timeZone; };
|
time = {timeZone = timeZone;};
|
||||||
i18n.defaultLocale = defaultLocale;
|
i18n.defaultLocale = defaultLocale;
|
||||||
i18n.extraLocaleSettings = {
|
i18n.extraLocaleSettings = {
|
||||||
LC_ADDRESS = extraLocale;
|
LC_ADDRESS = extraLocale;
|
||||||
@@ -64,7 +67,7 @@ in {
|
|||||||
dbus = {
|
dbus = {
|
||||||
enable = true;
|
enable = true;
|
||||||
implementation = "broker";
|
implementation = "broker";
|
||||||
packages = with pkgs; [ gcr gnome-settings-daemon ];
|
packages = with pkgs; [gcr gnome-settings-daemon];
|
||||||
};
|
};
|
||||||
gvfs.enable = true;
|
gvfs.enable = true;
|
||||||
upower.enable = true;
|
upower.enable = true;
|
||||||
@@ -73,7 +76,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# enable zsh autocompletion for system packages (systemd, etc)
|
# enable zsh autocompletion for system packages (systemd, etc)
|
||||||
environment.pathsToLink = [ "/share/zsh" ];
|
environment.pathsToLink = ["/share/zsh"];
|
||||||
|
|
||||||
# Faster rebuilding
|
# Faster rebuilding
|
||||||
documentation = {
|
documentation = {
|
||||||
@@ -101,11 +104,11 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
xdgOpenUsePortal = true;
|
xdgOpenUsePortal = true;
|
||||||
config = {
|
config = {
|
||||||
common.default = [ "gtk" ];
|
common.default = ["gtk"];
|
||||||
hyprland.default = [ "gtk" "hyprland" ];
|
hyprland.default = ["gtk" "hyprland"];
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||||
};
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{ config, ... }:
|
# Adguard is a network-wide ad blocker
|
||||||
let domain = "adguard.hadi.diy";
|
# When installed, open localhost:3000 to setup
|
||||||
|
{config, ...}: let
|
||||||
|
domain = "adguard.hadi.diy";
|
||||||
in {
|
in {
|
||||||
services = {
|
services = {
|
||||||
adguardhome = {
|
adguardhome = {
|
||||||
@@ -11,8 +13,7 @@ in {
|
|||||||
useACMEHost = "hadi.diy";
|
useACMEHost = "hadi.diy";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass =
|
proxyPass = "http://127.0.0.1:${toString config.services.adguardhome.port}";
|
||||||
"http://127.0.0.1:${toString config.services.adguardhome.port}";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{ config, ... }:
|
# Bitwarden (or vaultwarden) is a self-hosted password manager.
|
||||||
let domain = "vault.hadi.diy";
|
{config, ...}: let
|
||||||
|
domain = "vault.hadi.diy";
|
||||||
in {
|
in {
|
||||||
services = {
|
services = {
|
||||||
vaultwarden = {
|
vaultwarden = {
|
||||||
@@ -18,8 +19,8 @@ in {
|
|||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${
|
proxyPass = "http://127.0.0.1:${
|
||||||
toString config.services.vaultwarden.config.ROCKET_PORT
|
toString config.services.vaultwarden.config.ROCKET_PORT
|
||||||
}";
|
}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# Firewall configuration for NixOS
|
||||||
{
|
{
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user