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,8 +3,13 @@
flake.nixosModules.base = flake.nixosModules.base =
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ {
imports = [ inputs.hjem.nixosModules.default ]; imports = [
inputs.hjem.nixosModules.default
../../options.nix
];
config = {
username = "jingus";
nixpkgs.overlays = [ inputs.millennium.overlays.default ]; nixpkgs.overlays = [ inputs.millennium.overlays.default ];
# Set your time zone. # Set your time zone.
time.timeZone = "America/Chicago"; time.timeZone = "America/Chicago";
@ -50,4 +55,6 @@
# List services that you want to enable: # List services that you want to enable:
}; };
};
} }

View file

@ -8,24 +8,7 @@
... ...
}: }:
{ {
options.cursor-users = lib.mkOption { hjem.users."${config.username}" = {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "List of users to configure cursors for";
};
config = {
# Install cursor packages system-wide
environment.systemPackages = with pkgs; [
bibata-cursors
];
# Set up XDG data directories for cursor themes
environment.pathsToLink = [ "/share/icons" ];
# 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; enable = true;
files = { files = {
# GTK cursor settings # GTK cursor settings
@ -42,8 +25,6 @@
HYPRCURSOR_SIZE=24 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 = { files = lib.genAttrs config.wallpaper-destinations (_: {
"${config.wallpaper-destination}".source = pkgs.runCommand "wallpapers" { } '' 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,8 +14,7 @@
]; ];
# 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;
@ -23,12 +22,15 @@
".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/icons/waybar_icons.gresource.xml; ".config/waybar/icons/waybar_icons.gresource.xml".source =
".config/waybar/icons/waybar-privacy-audio-input-symbolic.svg".source = ./config/icons/waybar-privacy-audio-input-symbolic.svg; ./config/icons/waybar_icons.gresource.xml;
".config/waybar/icons/waybar-privacy-audio-output-symbolic.svg".source = ./config/icons/waybar-privacy-audio-output-symbolic.svg; ".config/waybar/icons/waybar-privacy-audio-input-symbolic.svg".source =
".config/waybar/icons/waybar-privacy-screen-share-symbolic.svg".source = ./config/icons/waybar-privacy-screen-share-symbolic.svg; ./config/icons/waybar-privacy-audio-input-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";
};
}