some minor refactor

This commit is contained in:
2025-01-02 17:53:12 +01:00
parent d44ad67865
commit eb6727e458
20 changed files with 139 additions and 51 deletions

View File

@@ -120,6 +120,7 @@
options = { options = {
imports = [ imports = [
./options/monitors ./options/monitors
./options/theme
]; ];
}; };
}; };

View File

@@ -9,7 +9,6 @@
inherit (pkgs) eza bat; inherit (pkgs) eza bat;
cfg = config.home.programs.fish; cfg = config.home.programs.fish;
in { in {
# imports = [./tide.nix];
options = { options = {
home.programs.fish.enable = mkEnableOption "Enables fish home configuration"; home.programs.fish.enable = mkEnableOption "Enables fish home configuration";
}; };
@@ -24,8 +23,10 @@ in {
]; ];
shellAbbrs = { shellAbbrs = {
extract = "extract.sh"; extract = "extract.sh";
homemodules = "$EDITOR /home/$USER/.nix-config/users/$USER/modules.nix"; homemodules = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/home.nix";
hmod = "$EDITOR /home/$USER/.nix-config/users/$USER/modules.nix"; hmod = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/home.nix";
homeoptions = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/options.nix";
hopt = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/options.nix";
nixosmodules = "$EDITOR /home/$USER/.nix-config/hosts/$hostname/modules.nix"; nixosmodules = "$EDITOR /home/$USER/.nix-config/hosts/$hostname/modules.nix";
nmod = "$EDITOR /home/$USER/.nix-config/hosts/$hostname/modules.nix"; nmod = "$EDITOR /home/$USER/.nix-config/hosts/$hostname/modules.nix";
nixcleanboot = "sudo nix run /home/$USER/.nix-config#cleanup-boot"; nixcleanboot = "sudo nix run /home/$USER/.nix-config#cleanup-boot";
@@ -46,7 +47,8 @@ in {
cat = "${getExe bat} --style=plain"; cat = "${getExe bat} --style=plain";
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension"; ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
ll = "${getExe eza} -l --git --icons --color=auto --group-directories-first -s extension"; ll = "${getExe eza} -l --git --icons --color=auto --group-directories-first -s extension";
la = "${getExe eza} -lah --tree"; lat = "${getExe eza} -lah --tree --color=auto --group-directories-first -s extension";
la = "${getExe eza} -lah --color=auto --group-directories-first -s extension";
# Clear screen and scrollback # Clear screen and scrollback
clear = "printf '\\033[2J\\033[3J\\033[1;1H'"; clear = "printf '\\033[2J\\033[3J\\033[1;1H'";
}; };

View File

@@ -9,8 +9,8 @@
cfg = config.home.programs.helix; cfg = config.home.programs.helix;
in { in {
imports = [ imports = [
./lang.nix ./languages.nix
./theme.nix ./gruvbox.nix
]; ];
options = { options = {

View File

@@ -30,7 +30,7 @@ in {
background = [ background = [
{ {
monitor = ""; monitor = "";
path = "~/media/images/l_ash09_big.jpg"; path = config.theme.background.lockscreen;
} }
]; ];
input-field = [ input-field = [

View File

@@ -24,11 +24,14 @@ in {
cat = "${getExe bat} --style=plain"; cat = "${getExe bat} --style=plain";
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension"; ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
ll = "${getExe eza} -l --git --icons --color=auto --group-directories-first -s extension"; ll = "${getExe eza} -l --git --icons --color=auto --group-directories-first -s extension";
la = "${getExe eza} -lah --tree"; lat = "${getExe eza} -lah --tree";
la = "${getExe eza} -lah";
tree = "${getExe eza} --tree --icons=always"; tree = "${getExe eza} --tree --icons=always";
extract = "extract.sh"; extract = "extract.sh";
homemodules = "$EDITOR /home/$USER/.nix-config/users/$USER/modules.nix"; homemodules = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/home.nix";
hmod = "$EDITOR /home/$USER/.nix-config/users/$USER/modules.nix"; hmod = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/home.nix";
homeoptions = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/options.nix";
hopt = "$EDITOR /home/$USER/.nix-config/users/$USER/modules/options.nix";
nixosmodules = "$EDITOR /home/$USER/.nix-config/hosts/$HOST/modules.nix"; nixosmodules = "$EDITOR /home/$USER/.nix-config/hosts/$HOST/modules.nix";
nmod = "$EDITOR /home/$USER/.nix-config/hosts/$HOST/modules.nix"; nmod = "$EDITOR /home/$USER/.nix-config/hosts/$HOST/modules.nix";
nixcleanboot = "sudo nix run /home/$USER/.nix-config#cleanup-boot"; nixcleanboot = "sudo nix run /home/$USER/.nix-config#cleanup-boot";

View File

@@ -20,7 +20,7 @@ in {
name = "Adwaita"; name = "Adwaita";
size = 28; size = 28;
gtk.enable = true; gtk.enable = true;
x11.enable = true; x11.enable = false;
}; };
}; };
gtk = { gtk = {

View File

@@ -1,5 +1,6 @@
{ {
config, config,
osConfig,
lib, lib,
pkgs, pkgs,
inputs, inputs,
@@ -24,9 +25,9 @@ in {
splash_offset = 2.0; splash_offset = 2.0;
preload = [ preload = [
"~/media/images/l_ash08_big.jpg" "~/media/images/bg_1.jpg"
"~/media/images/l_ash09_big.jpg" "~/media/images/bg_2.jpg"
"~/media/images/l_int06_big.jpg" "~/media/images/bg_3.jpg"
"~/media/images/by_housevisit_2560.jpg" "~/media/images/by_housevisit_2560.jpg"
"~/media/images/nix.png" "~/media/images/nix.png"
"~/media/images/stacks.png" "~/media/images/stacks.png"
@@ -42,12 +43,11 @@ in {
wallpaper = [ wallpaper = [
# cnix # cnix
"DP-3,~/media/images/l_ash08_big.jpg" "DP-3,${config.theme.background.desktop}"
# adampad # cnixpad
"eDP-1,~/media/images/l_ash08_big.jpg" "eDP-1,${config.theme.background.desktop}"
# toothpc # toothpc
"DVI-D-1,~/media/images/l_ash08_big.jpg" "DVI-D-1,${config.theme.background.desktop}"
# "DP-1,/share/wallpapers/cat_pacman.png"
]; ];
}; };
}; };

View File

@@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf mkEnableOption mkForce elem; inherit (lib) mkIf mkEnableOption mkForce elem;
browser = browser =
if elem osConfig.networking.hostName ["cnix" "cnixpad" "toothpc"] if elem osConfig.networking.hostName ["cnix" "cnixpad"]
then "zen.desktop" then "zen.desktop"
else "firefox.desktop"; else "firefox.desktop";
cfg = config.home.services.xdg; cfg = config.home.services.xdg;
@@ -15,6 +15,31 @@ in {
home.services.xdg.enable = mkEnableOption "Enables XDG settings"; home.services.xdg.enable = mkEnableOption "Enables XDG settings";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
xresources.properties = {
"Xcursor.size" = config.home.pointerCursor.size;
"Xcursor.theme" = config.home.pointerCursor.name;
"XTerm*.foreground" = "#d5c4a1";
"XTerm*.background" = "#282828";
"XTerm*.cursorColor" = "#d5c4a1";
"XTerm*.color0" = "#282828";
"XTerm*.color1" = "#fb4934";
"XTerm*.color2" = "#b8bb26";
"XTerm*.color3" = "#fabd2f";
"XTerm*.color4" = "#83a598";
"XTerm*.color5" = "#d3869b";
"XTerm*.color6" = "#8ec07c";
"XTerm*.color7" = "#d5c4a1";
"XTerm*.color8" = "#665c54";
"XTerm*.color9" = "#fe8019";
"XTerm*.color10" = "#3c3836";
"XTerm*.color11" = "#504945";
"XTerm*.color12" = "#bdae93";
"XTerm*.color13" = "#ebdbb2";
"XTerm*.color14" = "#d65d0e";
"XTerm*.color15" = "#fbf1c7";
};
xdg = { xdg = {
userDirs = { userDirs = {
enable = true; enable = true;

View File

@@ -0,0 +1,28 @@
{
lib,
config,
...
}: let
inherit (lib) mkOption types;
bgs = {
wallpaper_1 = "~/media/images/bg_1.jpg";
wallpaper_2 = "~/media/images/bg_2.jpg";
wallpaper_3 = "~/media/images/bg_3.jpg";
};
bgList = builtins.attrNames bgs;
in {
options.theme = {
background = {
lockscreen = mkOption {
type = types.enum bgList;
apply = name: bgs.${name};
example = "wallpaper_2";
};
desktop = mkOption {
type = types.enum bgList;
apply = name: bgs.${name};
example = "wallpaper_1";
};
};
};
}

View File

@@ -31,6 +31,7 @@
auto-optimise-store = true; auto-optimise-store = true;
builders-use-substitutes = true; builders-use-substitutes = true;
warn-dirty = false; warn-dirty = false;
accept-flake-config = false;
allow-import-from-derivation = false; allow-import-from-derivation = false;
experimental-features = ["nix-command" "flakes"]; experimental-features = ["nix-command" "flakes"];
flake-registry = "/etc/nix/registry.json"; flake-registry = "/etc/nix/registry.json";

View File

@@ -9,7 +9,7 @@
# in # in
{ {
imports = [ imports = [
./modules.nix ./modules
./git.nix ./git.nix
]; ];
# ++ lib.optionals isCnixpad [./cpmodules.nix]; # ++ lib.optionals isCnixpad [./cpmodules.nix];

View File

@@ -0,0 +1,6 @@
{
imports = [
./home.nix
./options.nix
];
}

View File

@@ -1,23 +1,4 @@
{ {
monitors = [
{
name = "DP-3";
width = 2560;
height = 1440;
refreshRate = 240;
bitDepth = 10;
workspace = "1";
primary = true;
}
{
name = "eDP-1";
width = 1920;
height = 1200;
refreshRate = 60;
workspace = "1";
primary = false;
}
];
home = { home = {
programs = { programs = {
aerc = { aerc = {

View File

@@ -0,0 +1,27 @@
{
monitors = [
{
name = "DP-3";
width = 2560;
height = 1440;
refreshRate = 240;
bitDepth = 10;
workspace = "1";
primary = true;
}
{
name = "eDP-1";
width = 1920;
height = 1200;
refreshRate = 60;
workspace = "1";
primary = false;
}
];
theme = {
background = {
lockscreen = "wallpaper_2";
desktop = "wallpaper_1";
};
};
}

View File

@@ -1,6 +1,6 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [ imports = [
./modules.nix ./modules
./git.nix ./git.nix
]; ];
home = { home = {

View File

@@ -0,0 +1,6 @@
{
imports = [
./home.nix
./options.nix
];
}

View File

@@ -1,14 +1,4 @@
{ {
monitors = [
{
name = "DVI-D-1";
width = 1920;
height = 1080;
refreshRate = 144;
workspace = "1";
primary = true;
}
];
home = { home = {
programs = { programs = {
alacritty = { alacritty = {

View File

@@ -0,0 +1,18 @@
{
monitors = [
{
name = "DVI-D-1";
width = 1920;
height = 1080;
refreshRate = 144;
workspace = "1";
primary = true;
}
];
theme = {
background = {
lockscreen = "wallpaper_2";
desktop = "wallpaper_1";
};
};
}