init options, move ralph, fix wallpapers

This commit is contained in:
jackjohn7 2026-03-28 20:32:24 -05:00
parent 401109204b
commit 85dd534f53
15 changed files with 123 additions and 181 deletions

View file

@ -14,13 +14,8 @@
self.nixosModules.wallpapers self.nixosModules.wallpapers
]; ];
options.hyprland-users = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "List of users to configure hyprland for";
};
config = { config = {
wallpaper-destinations = [ "Pictures/wallpapers" ];
# System-level configuration # System-level configuration
programs.hyprland.enable = true; programs.hyprland.enable = true;
@ -58,18 +53,13 @@
}; };
# Configure hjem for specified users # Configure hjem for specified users
hjem = lib.mkIf (config.hyprland-users != [ ]) { hjem.users."${config.username}" = {
users = lib.genAttrs config.hyprland-users (username: { enable = true;
enable = true; files = {
files = { ".config/hypr/hyprland.conf".source = ./hyprland.conf;
".config/hypr/hyprland.conf".source = ./hyprland.conf; ".config/hypr/hyprpaper.conf".source = ./hyprpaper.conf;
".config/hypr/hyprpaper.conf".source = ./hyprpaper.conf; };
};
});
}; };
# Enable cursors for hyprland users
cursor-users = lib.mkDefault config.hyprland-users;
}; };
}; };
} }

View file

@ -17,7 +17,7 @@ env = HYPRCURSOR_THEME,Bibata-Modern-Ice
# Set programs that you use # Set programs that you use
$terminal = kitty $terminal = kitty
$browser = firefox $browser = librewolf
$fileManager = dolphin $fileManager = dolphin
$menu = wofi --show drun $menu = wofi --show drun
@ -292,8 +292,8 @@ bindl = , XF86AudioPrev, exec, playerctl previous
# Example windowrule # Example windowrule
windowrule { windowrule {
name = firefox-on-w2 name = librewolf-on-w2
match:class = ^(firefox)$ match:class = ^(librewolf)$
workspace = 2 workspace = 2
} }
windowrule { windowrule {

View file

@ -1,6 +1,6 @@
wallpaper { wallpaper {
monitor = eDP-1 monitor = eDP-1
path = /home/jingo/dev/dotfiles/wallpapers/Augustine/Augustine-catppuccin-mocha.png path = ~/Pictures/wallpapers/Augustine/Augustine-catppuccin-mocha.png
fit_mode = cover fit_mode = cover
} }

View file

@ -3,51 +3,58 @@
flake.nixosModules.base = flake.nixosModules.base =
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ {
imports = [ inputs.hjem.nixosModules.default ]; imports = [
inputs.hjem.nixosModules.default
../../options.nix
];
nixpkgs.overlays = [ inputs.millennium.overlays.default ]; config = {
# Set your time zone. username = "jingus";
time.timeZone = "America/Chicago"; nixpkgs.overlays = [ inputs.millennium.overlays.default ];
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
}; };
# Enable the X11 windowing system.
services.xserver.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
}; };
} }

View file

@ -8,41 +8,22 @@
... ...
}: }:
{ {
options.cursor-users = lib.mkOption { hjem.users."${config.username}" = {
type = lib.types.listOf lib.types.str; enable = true;
default = [ ]; files = {
description = "List of users to configure cursors for"; # GTK cursor settings
}; ".config/gtk-3.0/settings.ini".text = ''
[Settings]
config = { gtk-cursor-theme-name=Bibata-Modern-Ice
# Install cursor packages system-wide gtk-cursor-theme-size=24
environment.systemPackages = with pkgs; [ '';
bibata-cursors # X11/Wayland cursor environment
]; ".config/environment.d/cursor.conf".text = ''
XCURSOR_THEME=Bibata-Modern-Ice
# Set up XDG data directories for cursor themes XCURSOR_SIZE=24
environment.pathsToLink = [ "/share/icons" ]; HYPRCURSOR_THEME=Bibata-Modern-Ice
HYPRCURSOR_SIZE=24
# Configure hjem for specified users - set cursor theme in user config '';
hjem = lib.mkIf (config.cursor-users != [ ]) {
users = lib.genAttrs config.cursor-users (username: {
enable = true;
files = {
# GTK cursor settings
".config/gtk-3.0/settings.ini".text = ''
[Settings]
gtk-cursor-theme-name=Bibata-Modern-Ice
gtk-cursor-theme-size=24
'';
# X11/Wayland cursor environment
".config/environment.d/cursor.conf".text = ''
XCURSOR_THEME=Bibata-Modern-Ice
XCURSOR_SIZE=24
HYPRCURSOR_THEME=Bibata-Modern-Ice
HYPRCURSOR_SIZE=24
'';
};
});
}; };
}; };
}; };

View file

@ -1,20 +1,25 @@
{ self, inputs, ... }: {
self,
inputs,
config,
...
}:
{ {
flake.nixosModules.user = flake.nixosModules.user =
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ {
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.jingus = { users.users."${config.username}" = {
isNormalUser = true; isNormalUser = true;
description = "jingus"; description = "${config.username} user account";
extraGroups = [ extraGroups = [
"networkmanager" "networkmanager"
"wheel" "wheel"
"docker"
"dialout"
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
packages = with pkgs; [
# thunderbird
];
}; };
hjem.users."${config.username}".enable = true;
}; };
} }

View file

@ -1,9 +0,0 @@
{ self, inputs, ... }:
{
flake.nixosModules.user-jingo =
{ ... }:
{
hyprland-users = [ "jingo" ];
wallpaper-users = [ "jingo" ];
};
}

View file

@ -1,9 +0,0 @@
{ self, inputs, ... }:
{
flake.nixosModules.user-jingus =
{ ... }:
{
niri-users = [ "jingus" ];
wallpaper-users = [ "jingus" ];
};
}

View file

@ -8,29 +8,20 @@
... ...
}: }:
{ {
options.wallpaper-destinations = lib.mkOption {
options.wallpaper-users = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
default = [ ]; default = [];
description = "List of users to include wallpapers for"; description = "Destination paths for wallpapers";
};
options.wallpaper-destination = lib.mkOption {
type = lib.types.str;
default = "Pictures/Wallpapers";
description = "Destination path for wallpapers";
}; };
config = { config = {
hjem = lib.mkIf (config.wallpaper-users != [ ]) { hjem.users."${config.username}" = {
users = lib.genAttrs config.wallpaper-users (username: { enable = true;
enable = true; files = lib.genAttrs config.wallpaper-destinations (_: {
files = { source = pkgs.runCommand "wallpapers" { } ''
"${config.wallpaper-destination}".source = pkgs.runCommand "wallpapers" { } '' mkdir -p $out
mkdir -p $out cp -r ${../../../assets/wallpapers}/* $out/
cp -r ${../../../assets/wallpapers}/* $out/ '';
'';
};
}); });
}; };
}; };

View file

@ -13,23 +13,14 @@
self.nixosModules.wallpapers self.nixosModules.wallpapers
]; ];
options.niri-users = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "List of users to configure niri for";
};
config = { config = {
programs.niri = { programs.niri = {
enable = true; enable = true;
package = self.packages.${pkgs.stdenv.hostPlatform.system}.myNiri; package = self.packages.${pkgs.stdenv.hostPlatform.system}.myNiri;
}; };
# Enable cursors for niri users
cursor-users = lib.mkDefault config.niri-users;
# Set wallpaper destination explicitly # Set wallpaper destination explicitly
wallpaper-destination = "Pictures/Wallpapers"; wallpaper-destinations = [ "Pictures/Wallpapers" ];
}; };
}; };

View file

@ -14,21 +14,23 @@
]; ];
# Configure hjem for specified users # Configure hjem for specified users
hjem = lib.mkIf (config.hyprland-users != [ ]) { hjem.users."${config.username}" = {
users = lib.genAttrs config.hyprland-users (username: { enable = true;
enable = true; files = {
files = { ".config/waybar/config.jsonc".source = ./config/config.jsonc;
".config/waybar/config.jsonc".source = ./config/config.jsonc; ".config/waybar/style.css".source = ./config/style.css;
".config/waybar/style.css".source = ./config/style.css; ".config/waybar/power_menu.xml".source = ./config/power_menu.xml;
".config/waybar/power_menu.xml".source = ./config/power_menu.xml; ".config/waybar/mediaplayer.py".source = ./config/mediaplayer.py;
".config/waybar/mediaplayer.py".source = ./config/mediaplayer.py; ".config/waybar/icons/meson.build".source = ./config/icons/meson.build;
".config/waybar/icons/meson.build".source = ./config/icons/meson.build; ".config/waybar/icons/waybar_icons.gresource.xml".source =
".config/waybar/icons/waybar_icons.gresource.xml".source = ./config/icons/waybar_icons.gresource.xml; ./config/icons/waybar_icons.gresource.xml;
".config/waybar/icons/waybar-privacy-audio-input-symbolic.svg".source = ./config/icons/waybar-privacy-audio-input-symbolic.svg; ".config/waybar/icons/waybar-privacy-audio-input-symbolic.svg".source =
".config/waybar/icons/waybar-privacy-audio-output-symbolic.svg".source = ./config/icons/waybar-privacy-audio-output-symbolic.svg; ./config/icons/waybar-privacy-audio-input-symbolic.svg;
".config/waybar/icons/waybar-privacy-screen-share-symbolic.svg".source = ./config/icons/waybar-privacy-screen-share-symbolic.svg; ".config/waybar/icons/waybar-privacy-audio-output-symbolic.svg".source =
}; ./config/icons/waybar-privacy-audio-output-symbolic.svg;
}); ".config/waybar/icons/waybar-privacy-screen-share-symbolic.svg".source =
./config/icons/waybar-privacy-screen-share-symbolic.svg;
};
}; };
}; };
}; };

View file

@ -13,7 +13,6 @@
self.nixosModules.niri self.nixosModules.niri
self.nixosModules.librewolf self.nixosModules.librewolf
self.nixosModules.user self.nixosModules.user
self.nixosModules.user-jingus
]; ];
programs.firefox.enable = true; programs.firefox.enable = true;

View file

@ -11,7 +11,7 @@
self.nixosModules.development self.nixosModules.development
self.nixosModules.librewolf self.nixosModules.librewolf
self.nixosModules.hyprland self.nixosModules.hyprland
self.nixosModules.user-jingo self.nixosModules.user
]; ];
# Bootloader. # Bootloader.
@ -37,20 +37,6 @@
variant = ""; variant = "";
}; };
# Define a user account. Don't forget to set a password with passwd.
users.users.jingo = {
isNormalUser = true;
description = "j";
extraGroups = [
"networkmanager"
"wheel"
"docker"
"dialout"
];
packages = with pkgs; [ ];
shell = pkgs.zsh;
};
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

8
modules/options.nix Normal file
View file

@ -0,0 +1,8 @@
{ lib, ... }:
{
options.username = lib.mkOption {
type = lib.types.str;
description = "Global username used across the evaluation.";
default = "jingus";
};
}