mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
refactor variables & theme
This commit is contained in:
@@ -1,26 +1,19 @@
|
||||
{ config, ... }: {
|
||||
imports = [
|
||||
# Mostly system related configuration
|
||||
../../nixos/nvidia.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU
|
||||
../../nixos/prime.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU
|
||||
|
||||
../../nixos/audio.nix
|
||||
../../nixos/bluetooth.nix
|
||||
../../nixos/fonts.nix
|
||||
../../nixos/home-manager.nix
|
||||
../../nixos/network-manager.nix
|
||||
../../nixos/nix.nix
|
||||
../../nixos/systemd-boot.nix
|
||||
../../nixos/timezone.nix
|
||||
../../nixos/tuigreet.nix
|
||||
../../nixos/users.nix
|
||||
../../nixos/utils.nix
|
||||
../../nixos/xdg-portal.nix
|
||||
../../nixos/docker.nix
|
||||
../../nixos/variables-config.nix
|
||||
|
||||
# Choose your theme here
|
||||
# ../../themes/stylix/yoru.nix
|
||||
# ../../nixos/docker.nix
|
||||
|
||||
# You should let those lines as is
|
||||
./hardware-configuration.nix
|
||||
./variables.nix
|
||||
];
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
{ pkgs, config, ... }: {
|
||||
|
||||
imports = [
|
||||
# Mostly user-specific configuration
|
||||
./variables.nix
|
||||
|
||||
# Programs
|
||||
../../home/programs/kitty
|
||||
../../home/programs/nvim
|
||||
# ../../home/programs/nvf
|
||||
# ../../home/programs/qutebrowser
|
||||
../../home/programs/shell
|
||||
../../home/programs/fetch
|
||||
../../home/programs/git
|
||||
@@ -17,7 +16,6 @@
|
||||
../../home/programs/lazygit
|
||||
../../home/programs/zen
|
||||
../../home/programs/duckduckgo-colorscheme
|
||||
../../home/programs/superfile
|
||||
../../home/programs/discord
|
||||
|
||||
# Scripts
|
||||
@@ -36,8 +34,6 @@
|
||||
../../home/system/udiskie
|
||||
../../home/system/clipman
|
||||
|
||||
# ../../themes/stylix/yoru.nix
|
||||
|
||||
./secrets # CHANGEME: You should probably remove this line, this is where I store my secrets
|
||||
];
|
||||
|
||||
@@ -62,17 +58,14 @@
|
||||
nodejs
|
||||
python3
|
||||
jq
|
||||
figlet
|
||||
just
|
||||
pnpm
|
||||
lazydocker
|
||||
|
||||
# Utils
|
||||
zip
|
||||
unzip
|
||||
optipng
|
||||
pfetch
|
||||
pandoc
|
||||
btop
|
||||
fastfetch
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{ config, ... }: {
|
||||
imports = [ ../../nixos/variables-config.nix ../../themes/yoru.nix ];
|
||||
{ config, lib, ... }: {
|
||||
imports = [
|
||||
# Choose your theme here:
|
||||
../../themes/yoru.nix
|
||||
];
|
||||
|
||||
config.var = {
|
||||
hostname = "nixy";
|
||||
@@ -21,8 +24,13 @@
|
||||
|
||||
autoUpgrade = false;
|
||||
autoGarbageCollector = true;
|
||||
};
|
||||
|
||||
# Choose your theme variables here
|
||||
# theme = import ../../themes/var/2025.nix;
|
||||
# Let this here
|
||||
options = {
|
||||
var = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{ config, ... }:
|
||||
let configDir = config.var.configDirectory;
|
||||
in {
|
||||
system.autoUpgrade = {
|
||||
enable = config.var.autoUpgrade;
|
||||
dates = "04:00";
|
||||
flake = "${configDir}";
|
||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||
allowReboot = false;
|
||||
};
|
||||
}
|
||||
@@ -4,6 +4,5 @@
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, inputs, ... }: {
|
||||
{ pkgs, ... }: {
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
@@ -19,18 +19,8 @@
|
||||
nerd-fonts.meslo-lg
|
||||
openmoji-color
|
||||
twemoji-color-font
|
||||
inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd
|
||||
];
|
||||
|
||||
enableDefaultPackages = false;
|
||||
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
monospace = [ "FiraCode Nerd Font Mono" "Noto Color Emoji" ];
|
||||
sansSerif = [ "SFProDisplay Nerd Font" "Noto Color Emoji" ];
|
||||
serif = [ "SFProDisplay Nerd Font" "Noto Color Emoji" ];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
networking.networkmanager.enable = true;
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
}
|
||||
@@ -14,9 +14,14 @@ in {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
gc = {
|
||||
|
||||
@@ -41,6 +41,22 @@ in {
|
||||
true; # This can cause sleep/suspend to fail and saves entire VRAM to /tmp/
|
||||
modesetting.enable = true;
|
||||
package = nvidiaDriverChannel;
|
||||
|
||||
prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
|
||||
# sync.enable = true;
|
||||
|
||||
# CHANGEME: Change those values to match your hardware (if prime is imported)
|
||||
amdgpuBusId =
|
||||
"PCI:5:0:0"; # Set this to the bus ID of your AMD GPU if you have one
|
||||
# intelBusId = "PCI:0:2:0"; # Set this to the bus ID of your Intel GPU if you have one
|
||||
nvidiaBusId =
|
||||
"PCI:1:0:0"; # Set this to the bus ID of your Nvidia GPU if you have one
|
||||
};
|
||||
};
|
||||
graphics = {
|
||||
enable = true;
|
||||
@@ -55,4 +71,5 @@ in {
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{ config, ... }: {
|
||||
services.pia.enable = true;
|
||||
|
||||
# Alternatively, you can use the `authUserPassFile` attribute if you are using
|
||||
# a Nix secrets manager. Here's an example using sops-nix.
|
||||
#
|
||||
# The secret you provide to `authUserPassFile` should be a multiline string with
|
||||
# a single username on the first line a single password on the second line.
|
||||
services.pia.authUserPassFile = "/home/hadi/.config/pia/pia.ovpn";
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
hardware.nvidia.prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
|
||||
# sync.enable = true;
|
||||
|
||||
# CHANGEME: Change those values to match your hardware (if prime is imported)
|
||||
amdgpuBusId =
|
||||
"PCI:5:0:0"; # Set this to the bus ID of your AMD GPU if you have one
|
||||
# intelBusId = "PCI:0:2:0"; # Set this to the bus ID of your Intel GPU if you have one
|
||||
nvidiaBusId =
|
||||
"PCI:1:0:0"; # Set this to the bus ID of your Nvidia GPU if you have one
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{ config, ... }: {
|
||||
time.timeZone = config.var.timeZone;
|
||||
i18n.defaultLocale = config.var.defaultLocale;
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = config.var.extraLocale;
|
||||
LC_IDENTIFICATION = config.var.extraLocale;
|
||||
LC_MEASUREMENT = config.var.extraLocale;
|
||||
LC_MONETARY = config.var.extraLocale;
|
||||
LC_NAME = config.var.extraLocale;
|
||||
LC_NUMERIC = config.var.extraLocale;
|
||||
LC_PAPER = config.var.extraLocale;
|
||||
LC_TELEPHONE = config.var.extraLocale;
|
||||
LC_TIME = config.var.extraLocale;
|
||||
};
|
||||
}
|
||||
@@ -2,10 +2,36 @@
|
||||
let
|
||||
hostname = config.var.hostname;
|
||||
keyboardLayout = config.var.keyboardLayout;
|
||||
configDir = config.var.configDirectory;
|
||||
in {
|
||||
|
||||
networking.hostName = hostname;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = config.var.autoUpgrade;
|
||||
dates = "04:00";
|
||||
flake = "${configDir}";
|
||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||
allowReboot = false;
|
||||
};
|
||||
|
||||
time.timeZone = config.var.timeZone;
|
||||
i18n.defaultLocale = config.var.defaultLocale;
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = config.var.extraLocale;
|
||||
LC_IDENTIFICATION = config.var.extraLocale;
|
||||
LC_MEASUREMENT = config.var.extraLocale;
|
||||
LC_MONETARY = config.var.extraLocale;
|
||||
LC_NAME = config.var.extraLocale;
|
||||
LC_NUMERIC = config.var.extraLocale;
|
||||
LC_PAPER = config.var.extraLocale;
|
||||
LC_TELEPHONE = config.var.extraLocale;
|
||||
LC_TIME = config.var.extraLocale;
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{ lib, ... }: {
|
||||
options = {
|
||||
var = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{ config, ... }:
|
||||
let username = config.var.username;
|
||||
in {
|
||||
virtualisation.virtualbox.host = {
|
||||
enable = true;
|
||||
enableExtensionPack = true;
|
||||
};
|
||||
users.extraGroups.vboxusers.members = [ username ];
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.common.default = "*";
|
||||
wlr.enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.libsForQt5.xdg-desktop-portal-kde
|
||||
];
|
||||
config.hyprland = { default = [ "hyprland" "gtk" ]; };
|
||||
};
|
||||
}
|
||||
@@ -56,8 +56,8 @@
|
||||
};
|
||||
|
||||
cursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Ice";
|
||||
# package = pkgs.bibata-cursors;
|
||||
# name = "Bibata-Modern-Ice";
|
||||
size = 24;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user