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:
@@ -1,5 +1,4 @@
|
||||
{pkgs, ...}: {
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
roboto
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, pkgs, ... }: {
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
{ config, inputs, ... }:
|
||||
let autoGarbageCollector = config.var.autoGarbageCollector;
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
autoGarbageCollector = config.var.autoGarbageCollector;
|
||||
in {
|
||||
security.sudo.extraRules = [{
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [config.var.username];
|
||||
commands = [{
|
||||
commands = [
|
||||
{
|
||||
command = "/run/current-system/sw/bin/nixos-rebuild";
|
||||
options = ["NOPASSWD"];
|
||||
}];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
allowBroken = true;
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
# Using beta driver for recent GPUs like RTX 4070
|
||||
nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
in {
|
||||
# Video drivers configuration for Xorg and Wayland
|
||||
services.xserver.videoDrivers =
|
||||
[ "nvidia" ]; # Simplified - other modules are loaded automatically
|
||||
services.xserver.videoDrivers = ["nvidia"]; # Simplified - other modules are loaded automatically
|
||||
|
||||
# Kernel parameters for better Wayland and Hyprland integration
|
||||
boot.kernelParams = [
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
hp-omen-linux-module = pkgs.callPackage
|
||||
({ kernel ? config.boot.kernelPackages.kernel, stdenv, fetchFromGitHub }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
hp-omen-linux-module =
|
||||
pkgs.callPackage
|
||||
({
|
||||
kernel ? config.boot.kernelPackages.kernel,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hp-omen-linux-module";
|
||||
version = "rebase-6.14";
|
||||
@@ -51,22 +58,4 @@ in {
|
||||
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"
|
||||
'';
|
||||
# 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,48 +1,42 @@
|
||||
# SDDM is a display manager for X11 and Wayland
|
||||
{ pkgs, inputs, config, lib, ... }:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
foreground = config.theme.textColorOnWallpaper;
|
||||
sddm-astronaut = pkgs.sddm-astronaut.override {
|
||||
embeddedTheme = "pixel_sakura";
|
||||
# TODO: Cleaner version for static vs .gif, just a string.replace
|
||||
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";
|
||||
themeConfig = {
|
||||
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}";
|
||||
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=";
|
||||
};
|
||||
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}";
|
||||
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 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 {
|
||||
@@ -62,7 +56,4 @@ in {
|
||||
};
|
||||
|
||||
environment.systemPackages = [sddm-astronaut];
|
||||
|
||||
# To prevent getting stuck at shutdown
|
||||
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
{pkgs, ...}: {
|
||||
boot = {
|
||||
bootspec.enable = true;
|
||||
loader = {
|
||||
@@ -29,14 +25,17 @@
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
|
||||
plymouth = {
|
||||
enable = true;
|
||||
theme = lib.mkForce "cuts_alt";
|
||||
themePackages = with pkgs; [
|
||||
(adi1090x-plymouth-themes.override {
|
||||
selected_themes = ["cuts_alt"];
|
||||
})
|
||||
];
|
||||
};
|
||||
# plymouth = {
|
||||
# enable = true;
|
||||
# theme = lib.mkForce "cuts_alt";
|
||||
# themePackages = with pkgs; [
|
||||
# (adi1090x-plymouth-themes.override {
|
||||
# selected_themes = ["cuts_alt"];
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
# To avoid systemd services hanging on shutdown
|
||||
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
# Tailscale is a VPN service that makes it easy to connect your devices between each other.
|
||||
{ config, ... }: {
|
||||
security.sudo.extraRules = [{
|
||||
users = [ config.var.username ];
|
||||
{config, ...}: let
|
||||
username = config.var.username;
|
||||
in {
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [username];
|
||||
# Allow running Tailscale commands without a password
|
||||
commands = [
|
||||
{
|
||||
command = "/etc/profiles/per-user/${config.var.username}/bin/tailscale";
|
||||
command = "/etc/profiles/per-user/${username}/bin/tailscale";
|
||||
options = ["NOPASSWD"];
|
||||
}
|
||||
{
|
||||
@@ -12,7 +16,9 @@
|
||||
options = ["NOPASSWD"];
|
||||
}
|
||||
];
|
||||
}];
|
||||
}
|
||||
];
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command =
|
||||
"${pkgs.greetd.tuigreet}/bin/tuigreet --remember --asterisks --container-padding 2 --time --time-format '%I:%M %p | %a • %h | %F' --cmd Hyprland";
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --asterisks --container-padding 2 --time --time-format '%I:%M %p | %a • %h | %F' --cmd Hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
@@ -28,8 +27,4 @@
|
||||
TTYVHangup = true;
|
||||
TTYVTDisallocate = true;
|
||||
};
|
||||
|
||||
# To prevent getting stuck at shutdown
|
||||
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
{ config, pkgs, ... }:
|
||||
let username = config.var.username;
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
username = config.var.username;
|
||||
in {
|
||||
programs.zsh.enable = true;
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
|
||||
users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = "${username} account";
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{ pkgs, config, inputs, ... }:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
hostname = config.var.hostname;
|
||||
keyboardLayout = config.var.keyboardLayout;
|
||||
configDir = config.var.configDirectory;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{ config, ... }:
|
||||
let domain = "adguard.hadi.diy";
|
||||
# Adguard is a network-wide ad blocker
|
||||
# When installed, open localhost:3000 to setup
|
||||
{config, ...}: let
|
||||
domain = "adguard.hadi.diy";
|
||||
in {
|
||||
services = {
|
||||
adguardhome = {
|
||||
@@ -11,8 +13,7 @@ in {
|
||||
useACMEHost = "hadi.diy";
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass =
|
||||
"http://127.0.0.1:${toString config.services.adguardhome.port}";
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.adguardhome.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ config, ... }:
|
||||
let domain = "vault.hadi.diy";
|
||||
# Bitwarden (or vaultwarden) is a self-hosted password manager.
|
||||
{config, ...}: let
|
||||
domain = "vault.hadi.diy";
|
||||
in {
|
||||
services = {
|
||||
vaultwarden = {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# Firewall configuration for NixOS
|
||||
{
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user