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

@ -3,51 +3,58 @@
flake.nixosModules.base =
{ pkgs, lib, ... }:
{
imports = [ inputs.hjem.nixosModules.default ];
imports = [
inputs.hjem.nixosModules.default
../../options.nix
];
nixpkgs.overlays = [ inputs.millennium.overlays.default ];
# Set your time zone.
time.timeZone = "America/Chicago";
config = {
username = "jingus";
nixpkgs.overlays = [ inputs.millennium.overlays.default ];
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# Select internationalisation properties.
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 {
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;
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
'';
};
});
hjem.users."${config.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 =
{ pkgs, lib, ... }:
{
# Define a user account. Don't forget to set a password with passwd.
users.users.jingus = {
users.users."${config.username}" = {
isNormalUser = true;
description = "jingus";
description = "${config.username} user account";
extraGroups = [
"networkmanager"
"wheel"
"docker"
"dialout"
];
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-users = lib.mkOption {
options.wallpaper-destinations = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "List of users to include wallpapers for";
};
options.wallpaper-destination = lib.mkOption {
type = lib.types.str;
default = "Pictures/Wallpapers";
description = "Destination path for wallpapers";
default = [];
description = "Destination paths for wallpapers";
};
config = {
hjem = lib.mkIf (config.wallpaper-users != [ ]) {
users = lib.genAttrs config.wallpaper-users (username: {
enable = true;
files = {
"${config.wallpaper-destination}".source = pkgs.runCommand "wallpapers" { } ''
mkdir -p $out
cp -r ${../../../assets/wallpapers}/* $out/
'';
};
hjem.users."${config.username}" = {
enable = true;
files = lib.genAttrs config.wallpaper-destinations (_: {
source = pkgs.runCommand "wallpapers" { } ''
mkdir -p $out
cp -r ${../../../assets/wallpapers}/* $out/
'';
});
};
};