refactor: get rid of mdDocs usage
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-06-24 12:30:49 -04:00
parent a793ff8a13
commit 27f1d01f31
11 changed files with 48 additions and 21 deletions

View file

@ -1,8 +1,4 @@
{ {pkgs, ...}: {
pkgs,
lib,
...
}: {
gradience = rec { gradience = rec {
# https://github.com/V-Mann-Nick/nix-home-manager/blob/main/gnome/theme.nix # https://github.com/V-Mann-Nick/nix-home-manager/blob/main/gnome/theme.nix
package = pkgs.gradience.overrideAttrs (old: { package = pkgs.gradience.overrideAttrs (old: {

View file

@ -31,7 +31,7 @@ in {
... ...
}: let }: let
symlink = config.lib.file.mkOutOfStoreSymlink; symlink = config.lib.file.mkOutOfStoreSymlink;
inherit (lib) hasPrefix mdDoc optionals removePrefix; inherit (lib) hasPrefix optionals removePrefix;
configJs = configJs =
# javascript # javascript
@ -46,7 +46,7 @@ in {
assertions = [ assertions = [
{ {
assertion = hasPrefix "/home/${mainUser}/" flakeDir; assertion = hasPrefix "/home/${mainUser}/" flakeDir;
message = mdDoc '' message = ''
Your $FLAKE environment variable needs to point to a directory in Your $FLAKE environment variable needs to point to a directory in
the main users' home to use the AGS module. the main users' home to use the AGS module.
''; '';

View file

@ -25,19 +25,19 @@ in {
imports = [arion.nixosModules.arion]; imports = [arion.nixosModules.arion];
options.arion = { options.arion = {
enable = mkEnableOption (lib.mdDoc "My custom arion config layer module"); enable = mkEnableOption "My custom arion config layer module";
rwDataDir = mkOption { rwDataDir = mkOption {
default = "/var/lib/arion"; default = "/var/lib/arion";
type = types.str; type = types.str;
description = lib.mdDoc '' description = ''
Directory to place persistent data in Directory to place persistent data in
''; '';
}; };
projects = mkOption { projects = mkOption {
default = {}; default = {};
description = lib.mdDoc '' description = ''
Declarative specification of docker-compose in nix. Declarative specification of docker-compose in nix.
''; '';
type = types.attrs; type = types.attrs;

View file

@ -5,7 +5,16 @@
... ...
}: let }: let
inherit (config.vars) mainUser; inherit (config.vars) mainUser;
hyprland = config.home-manager.users.${mainUser}.wayland.windowManager.hyprland.finalPackage;
hyprland =
config
.home-manager
.users
.${mainUser}
.wayland
.windowManager
.hyprland
.finalPackage;
in { in {
# Add home folder for home-manager to work # Add home folder for home-manager to work
users.users.greeter = { users.users.greeter = {

View file

@ -8,7 +8,15 @@
inherit (import ./hyprland.nix {inherit config lib pkgs;}) hyprConf; inherit (import ./hyprland.nix {inherit config lib pkgs;}) hyprConf;
# Nix stuff # Nix stuff
hyprland = config.home-manager.users.${mainUser}.wayland.windowManager.hyprland.finalPackage; hyprland =
config
.home-manager
.users
.${mainUser}
.wayland
.windowManager
.hyprland
.finalPackage;
in { in {
imports = [./astal.nix]; imports = [./astal.nix];

View file

@ -20,7 +20,14 @@
inherit (import ./setupMonitors.nix {inherit config pkgs;}) setupMonitors; inherit (import ./setupMonitors.nix {inherit config pkgs;}) setupMonitors;
# Nix stuff # Nix stuff
cfgHypr = config.home-manager.users.${mainUser}.wayland.windowManager.hyprland; cfgHypr =
config
.home-manager
.users
.${mainUser}
.wayland
.windowManager
.hyprland;
devices = filterAttrs (n: v: hasPrefix "device:" n) cfgHypr.settings; devices = filterAttrs (n: v: hasPrefix "device:" n) cfgHypr.settings;
monitors = cfgHypr.settings.monitor; monitors = cfgHypr.settings.monitor;

View file

@ -4,7 +4,16 @@
... ...
}: let }: let
inherit (config.vars) mainUser greetdDupe mainMonitor; inherit (config.vars) mainUser greetdDupe mainMonitor;
hyprland = config.home-manager.users.${mainUser}.wayland.windowManager.hyprland.finalPackage;
hyprland =
config
.home-manager
.users
.${mainUser}
.wayland
.windowManager
.hyprland
.finalPackage;
# Show Regreet on all monitors # Show Regreet on all monitors
dupeMonitors = pkgs.writeShellApplication { dupeMonitors = pkgs.writeShellApplication {

View file

@ -4,11 +4,7 @@
... ...
}: { }: {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
plugins = [ plugins = [Hyprspace.packages.${pkgs.system}.Hyprspace];
(Hyprspace.packages.${pkgs.system}.Hyprspace.overrideAttrs {
dontUseCmakeConfigure = true;
})
];
settings = { settings = {
bind = [ bind = [

View file

@ -9,6 +9,7 @@
inherit (config.vars) mainUser; inherit (config.vars) mainUser;
isTouchscreen = config.hardware.sensor.iio.enable; isTouchscreen = config.hardware.sensor.iio.enable;
cfg = cfg =
config config
.home-manager .home-manager

View file

@ -6,6 +6,7 @@
"logitech-g502-x" "logitech-g502-x"
"logitech-g502-hero-gaming-mouse" "logitech-g502-hero-gaming-mouse"
]; ];
mkConf = name: { mkConf = name: {
inherit name; inherit name;
sensitivity = 0; sensitivity = 0;

View file

@ -4,12 +4,12 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) mdDoc mkIf mkEnableOption mkOption optionals types; inherit (lib) mkIf mkEnableOption mkOption optionals types;
cfg = config.nvidia; cfg = config.nvidia;
in { in {
options.nvidia = { options.nvidia = {
enable = mkEnableOption (mdDoc "nvidia"); enable = mkEnableOption "nvidia";
enableNvidiaSettings = mkOption { enableNvidiaSettings = mkOption {
type = types.bool; type = types.bool;