misc improvements to modularity

This commit is contained in:
greyweather committed 2026-09-02 15:50:37 +01:00
1 parent 9c13923c2e
commit 6d8673ea1e
29 files changed
+111 -108

No files matched your search

@@ -4,10 +4,12 @@
"authenticated": false,
"settingsSync": false,
"url": "https://cloud.equicord.org/",
"settingsSyncVersion": 1788234114000
"settingsSyncVersion": 1788360340476
},
"enableOnlineThemes": true,
"enabledThemeLinks": [],
"enabledThemeLinks": [
"https://refact0r.github.io/midnight-discord/build/midnight.css"
],
"plugins": {
"AltKrispSwitch": {
"enabled": false
@@ -1218,13 +1220,13 @@
},
"useQuickCss": true,
"autoUpdateNotification": true,
"themeLinks": [],
"eagerPatches": false,
"enabledThemes": [
"noctalia.theme.css"
"themeLinks": [
"https://refact0r.github.io/midnight-discord/build/midnight.css"
],
"eagerPatches": false,
"enabledThemes": [],
"pinnedThemes": [
"noctalia.theme.css"
"https://refact0r.github.io/midnight-discord/build/midnight.css"
],
"themeNames": {},
"themeActivationModes": {},
+17 -33
View File
@@ -1,42 +1,26 @@
body {
/* font, change to '' for default discord font */
--font: 'figtree';
--code-font: '';
/* sizes */
--gap: 10px; /* spacing between panels */
--divider-thickness: 4px; /* thickness of unread messages divider and highlighted message borders */
--border-thickness: 0px; /* thickness of borders around main panels. DOES NOT AFFECT OTHER BORDERS */
--border-thickness: 1px; /* thickness of borders around main panels. DOES NOT AFFECT OTHER BORDERS */
--custom-guild-list-width: calc(var(--guildbar-avatar-size) + var(--custom-guild-list-padding) * 2 + var(--border-thickness) * 2);
/* animation/transition options */
--animations: on; /* off: disable animations/transitions, on: enable animations/transitions */
--list-item-transition: 0.2s ease; /* transition for list items */
--dms-icon-svg-transition: 0.35s ease; /* transition for the dms icon */
--border-hover-transition: 1s ease; /* transition for borders when hovered */
--border-hover-transition: 0.2s ease;
--elevation-low: none;
--elevation-medium: none;
--elevation-high: none;
}
/* color options */
:root {
--colors: on; /* off: discord default colors, on: midnight custom colors */
/* text colors */
--text-0: hsl(220, 16%, 95%); /* text on colored elements */
--text-2: hsl(217.5, 20%, 90%); /* headings and important text */
--text-3: hsl(219, 30%, 90%); /* normal text */
--text-4: hsl(220.5, 14%, 85%); /* icon buttons and channels */
--text-5: hsl(221, 13.5%, 80%); /* muted channels/chats and timestamps */
/* background and dark colors */
--bg-1: #303643; /* dark buttons when clicked */
--bg-2: #343b49; /* dark buttons */
--bg-3: #3b4252; /* spacing, secondary elements */
--bg-4: #2e3440; /* main background color */
--hover: #eceff415; /* channels and buttons when hovered */
--active: hsl(222, 18%, 35%); /* channels and buttons when clicked or selected */
--active-2: #2e3440; /* extra state for transparent buttons */
--message-hover: #3b425240; /* messages when hovered */
/* accent colors */
--accent-1: #8fbcbb; /* links and other accent text */
--accent-2: hsl(179, 30%, 45%); /* small accent elements */
--accent-3: hsl(193, 25%, 45%); /* accent buttons */
--accent-4: hsl(193, 25%, 55%); /* accent buttons when hovered */
--accent-5: hsl(193, 25%, 60%); /* accent buttons when clicked */
--accent-new: #bf616a; /* stuff that's normally red like mute/deafen buttons */
};
--text-0: var(--bg-4); /* text on colored elements */
--text-1: hsl(220, 45%, 95%); /* other normally white text */
--text-2: hsl(220, 25%, 85%); /* headings and important text */
--text-3: hsl(220, 20%, 70%); /* normal text */
--text-4: hsl(220, 15%, 60%); /* icon buttons and channels */
--text-5: hsl(220, 15%, 55%); /* muted channels/chats and timestamps */
}
+2 -2
View File
@@ -9,8 +9,8 @@
"hardwareAcceleration": true,
"minimizeToTray": true,
"tray": true,
"splashColor": "rgb(222, 227, 237)",
"splashBackground": "rgb(46, 52, 64)",
"splashColor": "rgb(163, 173, 194)",
"splashBackground": "rgb(22, 24, 29)",
"hardwareVideoAcceleration": true,
"clickTrayToShowHide": true,
"arRPCDisabled": false,
+6 -1
View File
@@ -134,7 +134,6 @@ window-rule {
clip-to-geometry true
}
window-rule { // Maximized on vertical monitor
match at-startup=true app-id="^steam$" title="^Steam$"
match at-startup=true app-id="^equibop$"
open-maximized-to-edges true
open-on-output "HDMI-A-1"
@@ -149,6 +148,12 @@ window-rule { // Steam windows float (excluding main window)
window-rule {
match app-id="steam" title=r#"^notificationtoasts_\d+_desktop$"#
default-floating-position x=10 y=10 relative-to="bottom-right"
open-focused false
}
window-rule { // Maximized on main monitor
match at-startup=true app-id="^steam$" title="^Steam$"
open-maximized-to-edges true
open-on-output "HDMI-A-1"
}
window-rule { // Fullscreen on main monitor
match app-id="^steam_app_\\d+$"
Generated
+4 -4
View File
@@ -187,11 +187,11 @@
]
},
"locked": {
"lastModified": 1788303756,
"narHash": "sha256-KwDkCX7JBWVjDCoP1CqF3HCMpM8Uy1anD0pKzAZ2Aaw=",
"lastModified": 1788319420,
"narHash": "sha256-y4hOpWzUp8ZWzoIsQINIxFifoWOV1tQPVqHVtX24luc=",
"ref": "refs/heads/main",
"rev": "fef3a464ef4db019bd654446b15eca1f9b31fd44",
"revCount": 48,
"rev": "1cfc810e699659bab9a9c8f071a5770fc3d8b886",
"revCount": 52,
"type": "git",
"url": "https://git.greyweather.dev/greyweather/nix-helper-flake"
},
+1 -1
View File
@@ -7,7 +7,7 @@
programs.noctalia.enable = true;
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
components.shells = [ "noctalia" ];
};
};
+1 -1
View File
@@ -35,7 +35,7 @@
}));
};
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
components.windowManagers = [ "niri" ];
};
};
@@ -1,4 +1,10 @@
{ inputs, self, ... }: let
{ inputs, self, lib, ... }: let
featureOptionName = "features.applications.cli.color-converter.enable";
moduleArgs = config: {
inherit config;
optionName = featureOptionName;
};
color-converter-package = { lib, pkgs }: pkgs.python3Packages.buildPythonApplication rec {
pname = "color-converter";
version = "1.0.0";
@@ -29,21 +35,17 @@
};
};
in {
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: {
options.features.applications.cli.color-converter.enable = lib.mkEnableOption "`color-converter`";
})) ];
imports = [ (inputs.helpers.mkStandardFeature.flakeModule "global" featureOptionName (lib.mkEnableOption "`color-converter`")) ];
flake.nixosModules.global = { pkgs, lib, config, ... }: {
config = lib.mkIf (config.features.applications.cli.color-converter.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.cli.color-converter.enable = lib.mkDefault true;
} {
imports = [ (inputs.helpers.mkStandardFeature.nixosModule (moduleArgs config) {
environment.systemPackages = [ (pkgs.callPackage color-converter-package {}) ];
});
}) ];
};
flake.homeModules.global = { pkgs, config, lib, ... }: {
config = lib.mkIf (config.features.applications.cli.color-converter.enable) {
imports = [ (inputs.helpers.mkStandardFeature.homeModule (moduleArgs config) {
home.packages = [ (pkgs.callPackage color-converter-package {}) ];
};
}) ];
};
}
@@ -5,7 +5,7 @@
flake.nixosModules.global = { pkgs, lib, config, ... }: {
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.cli.fastfetch.enable = lib.mkDefault true;
home-manager.users.${config.info.userName}.features.applications.cli.fastfetch.enable = lib.mkDefault true;
} {
environment.systemPackages = [ pkgs.fastfetch ];
});
+1 -1
View File
@@ -29,7 +29,7 @@ in {
config = lib.mkIf (config.features.applications.cli.nh.enable) {
programs.nh = mkNhAttrs config;
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
features.applications.cli.nh = lib.mkDefault config.features.applications.cli.nh;
};
};
+2 -10
View File
@@ -10,20 +10,12 @@ in {
})) ];
flake.nixosModules.graphicsOption = { lib, ... }: {
options.features.applications.gui.equibop.autostart = let
attrs = autostartOptionAttrs { inherit lib; };
in lib.mkOption {
inherit (attrs) type default;
description = ''
${attrs.description}
${inputs.helpers.mkRedundantOptionDescription "features.nixos.home-manager.enable" "true"}
'';
};
options.features.applications.gui.equibop.autostart = inputs.helpers.mkRedundantOption "features.nixos.home-manager.enable" "true" (autostartOptionAttrs { inherit lib; });
};
flake.nixosModules.graphics = { pkgs, lib, config, ...}: {
config = inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.equibop = lib.mkDefault config.features.applications.gui.equibop;
home-manager.users.${config.info.userName}.features.applications.gui.equibop = lib.mkDefault config.features.applications.gui.equibop;
} {
environment.systemPackages = [ pkgs.equibop ];
};
+1 -1
View File
@@ -5,7 +5,7 @@
flake.nixosModules.graphics = { pkgs, lib, config, ... }: {
config = lib.mkIf (config.features.applications.gui.floorp.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.floorp.enable = lib.mkDefault true;
home-manager.users.${config.info.userName}.features.applications.gui.floorp.enable = lib.mkDefault true;
} {
environment.systemPackages = [ pkgs.floorp-bin ];
});
+2 -2
View File
@@ -73,13 +73,13 @@ in {
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
config = lib.mkIf (config.features.applications.gui.fluxer.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.fluxer.enable = lib.mkDefault true;
home-manager.users.${config.info.userName}.features.applications.gui.fluxer.enable = lib.mkDefault true;
} {
environment.systemPackages = [
(pkgs.callPackage (fluxer-package) {})
];
}) // lib.mkIf (config.features.applications.gui.fluxer-canary.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.fluxer-canary.enable = lib.mkDefault true;
home-manager.users.${config.info.userName}.features.applications.gui.fluxer-canary.enable = lib.mkDefault true;
} {
environment.systemPackages = [
(pkgs.callPackage (fluxer-canary-package) {})
+1 -1
View File
@@ -6,7 +6,7 @@
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
config = let
in lib.mkIf (config.features.applications.gui.kitty.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.kitty.enable = lib.mkDefault true;
home-manager.users.${config.info.userName}.features.applications.gui.kitty.enable = lib.mkDefault true;
} {
environment.systemPackages = [ pkgs.kitty ];
});
@@ -19,7 +19,7 @@
terminal = "kitty";
};
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
features.applications.gui.nautilus.enable = true;
};
};
@@ -5,7 +5,7 @@
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
config = lib.mkIf (config.features.applications.gui.remmina.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.remmina.enable = lib.mkDefault true;
home-manager.users.${config.info.userName}.features.applications.gui.remmina.enable = lib.mkDefault true;
} {
environment.systemPackages = with pkgs; [
remmina
@@ -1,4 +1,4 @@
{ inputs, self, ... }: let
{ inputs, self, lib, ... }: let
spicetifyEnableOptionAttrs = { lib }: {
type = lib.types.bool;
description = "Whether to enable Spicetify, a modified version of Spotify that supports plugins and themes.";
@@ -6,7 +6,7 @@
};
spicetifyThemeOptionAttrs = { pkgs, lib }: {
type = inputs.nixpkgs.lib.types.nullOr (inputs.nixpkgs.lib.types.enum (builtins.attrNames inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system}.themes));
type = lib.types.nullOr (lib.types.enum (builtins.attrNames inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system}.themes));
description = "This option is used to select a theme for Spicetify to use, from the list of available packages themes.";
default = null;
};
@@ -15,7 +15,7 @@ in {
options.features.applications.gui.spotify.enable = lib.mkEnableOption "Spotify";
})) ];
flake.nixosModules.graphicsOptions = { lib, pkgs, ... }: {
flake.nixosModules.graphicsOptions = { pkgs, lib, ... }: {
options.features.applications.gui.spotify.spicetify = {
enable = inputs.helpers.mkRedundantOption "features.nixos.home-manager.enable" "true" (spicetifyEnableOptionAttrs { inherit lib; });
theme = inputs.helpers.mkRedundantOption "features.nixos.home-manager.enable" "true" (spicetifyThemeOptionAttrs { inherit pkgs lib; });
@@ -26,7 +26,7 @@ in {
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in {
config = lib.mkIf (config.features.applications.gui.spotify.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.spotify = {
home-manager.users.${config.info.userName}.features.applications.gui.spotify = {
enable = lib.mkDefault true;
spicetify = lib.mkDefault config.features.applications.gui.spotify.spicetify;
};
@@ -35,7 +35,7 @@ in {
});
};
flake.homeModules.graphicsOptions = { lib, pkgs, ... }: {
flake.homeModules.graphicsOptions = { pkgs, lib, ... }: {
options.features.applications.gui.spotify.spicetify = {
enable = lib.mkOption (spicetifyEnableOptionAttrs { inherit lib; });
theme = lib.mkOption (spicetifyThemeOptionAttrs { inherit pkgs lib; });
+1 -1
View File
@@ -5,7 +5,7 @@
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
config = lib.mkIf (config.features.applications.gui.vscode.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.vscode.enable = lib.mkDefault true;
home-manager.users.${config.info.userName}.features.applications.gui.vscode.enable = lib.mkDefault true;
} {
environment.systemPackages = [ pkgs.vscode ];
});
@@ -5,7 +5,7 @@
flake.nixosModules.gaming = { pkgs, config, lib, ... }: {
config = lib.mkIf (config.features.hardware.steam-controller.enable) {
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
features.hardware.steam-controller.enable = lib.mkDefault true;
};
};
+1 -1
View File
@@ -20,7 +20,7 @@
inherit inputs;
};
users.grey = self.homeModules.${config.info.hostName};
users.${config.info.userName} = self.homeModules."${config.info.userName}@${config.info.hostName}";
};
};
}
+1 -1
View File
@@ -13,7 +13,7 @@
stylix.image = builtins.path { path = "${self}/modules/hosts/${config.info.hostName}/wallpaper.jpg"; };
stylix.polarity = "dark";
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
features.nixos.stylix.enable = lib.mkDefault config.features.nixos.stylix.enable;
};
};
+1 -1
View File
@@ -11,6 +11,6 @@
programs.${config.features.shells.defaultShell}.enable = true;
users.defaultUserShell = pkgs.${config.features.shells.defaultShell};
users.users."grey".shell = pkgs.${config.features.shells.defaultShell};
users.users."${config.info.userName}".shell = pkgs.${config.features.shells.defaultShell};
};
}
+1 -1
View File
@@ -10,7 +10,7 @@
config = lib.mkIf (config.features.shells.zsh.enable || config.features.shells.defaultShell == "zsh") {
programs.zsh.enable = true;
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
features.shells.zsh.enable = lib.mkDefault true;
features.shells.zsh.antidote.enable = lib.mkDefault config.features.shells.zsh.antidote.enable;
};
+6 -7
View File
@@ -53,8 +53,6 @@
extraGroups = [ "networkmanager" "wheel" ];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
git
fzf
@@ -84,12 +82,13 @@
powerOnBoot = false;
};
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
nixpkgs.config.allowUnfree = true;
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
info = {
rootPath = lib.mkDefault config.info.rootPath;
hostName = lib.mkDefault config.info.hostName;
stateVersion = lib.mkDefault config.info.stateVersion;
isStandalone = lib.mkDefault false;
inherit (config.info) rootPath userName hostName stateVersion;
hostPlatform = config.nixpkgs.hostPlatform.system;
isStandalone = false;
};
};
+1 -1
View File
@@ -1,5 +1,5 @@
{ inputs, self, ... }: {
flake.homeModules.kitagawa = { pkgs, lib, config, ... }: {
flake.homeModules."grey@kitagawa" = { pkgs, lib, config, ... }: {
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) ({
programs.fastfetch = {
settings = {
+1 -1
View File
@@ -1,5 +1,5 @@
{ inputs, self, ... }: {
flake.homeModules.kitagawa = { pkgs, config, lib, ... }: {
flake.homeModules."grey@kitagawa" = { pkgs, config, lib, ... }: {
programs.kitty = {
font = lib.mkForce {
name = "Iosevka Comfy";
+1 -1
View File
@@ -1,5 +1,5 @@
{ inputs, self, ... }: {
flake.homeModules.kitagawa = { config, pkgs, ... }: let
flake.homeModules."grey@kitagawa" = { config, pkgs, ... }: let
mkConfigCommand = args: "zsh -c 'cd ${config.info.rootPath}; git add .; nh os switch ${args}'";
in {
programs.zsh.shellAliases = {
+1 -1
View File
@@ -86,7 +86,7 @@
};
};
flake.homeModules.kitagawa = { config, pkgs, inputs, lib, ... }: {
flake.homeModules."grey@kitagawa" = { config, pkgs, inputs, lib, ... }: {
imports = with self.homeModules; [
global
audio
+28 -9
View File
@@ -5,20 +5,19 @@ in {
options.info = {
rootPath = lib.mkOption {
type = lib.types.str;
description = "This option is used to tell the config the global path to the flake's root directory, in order to perform impure actions (in a Nix sense, not morally impure, I promise).";
description = "Used to tell the config the global path to the flake's root directory, in order to perform direct symlinking (not in `/nix/store`).";
default = "/home/grey/nixos";
};
userName = lib.mkOption {
type = lib.types.str;
description = "Used to tell the config the name of the primary user (the user that this flake should focus on for things like Home Manager configurations, etc).";
default = "grey";
};
hostName = lib.mkOption {
type = lib.types.str;
description = "This option is used to tell the config the hostname of the current machine, mostly for symlinking the right dotfiles.";
default = "";
};
stateVersion = lib.mkOption {
type = lib.types.str;
description = "This option is used to set the stateVersion value.";
example = "26.11";
description = "Used to tell the config the hostname of the current machine, mostly for symlinking the right dotfiles.";
default = "";
};
};
@@ -26,6 +25,13 @@ in {
flake.nixosModules.globalOptions = { lib, ... }: {
options = {
info.stateVersion = lib.mkOption {
type = lib.types.str;
description = "Used to set the `system.stateVersion` value.";
example = "26.11";
default = "";
};
components = {
bootLoader = {
selection = lib.mkOption {
@@ -59,6 +65,19 @@ in {
flake.homeModules.globalOptions = { lib, ... }: {
options = {
info = {
/* hostPlatform = lib.mkOption {
type = lib.types.str;
description = "Tells the config the platform string that should be used to generate `pkgs`, since `nixpkgs.hostPlatform` does not exist in a standalone Home Manager setup.";
default = "x86_64-linux";
}; */
stateVersion = lib.mkOption {
type = lib.types.str;
description = "Used to set the `home.stateVersion` value.";
example = "26.11";
default = "";
};
isStandalone = lib.mkOption {
type = lib.types.bool;
description = "This option tells the config whether this home-manager config is part of a larger NixOS config or not, and is read-only.";