treewide: remove variables from pkgs

This commit is contained in:
Leonardo Eugênio 2024-06-05 01:18:48 -03:00
parent 36a717072a
commit 2f67b084d2
38 changed files with 60 additions and 64 deletions

View file

@ -6,7 +6,6 @@ rec {
themes
new-packages
patches
variables
lib_extended
];
@ -80,8 +79,6 @@ rec {
}
);
variables = (final: prev: { uservars = import ../user/variables.nix; });
lib_extended = (
final: prev: {
lib = prev.lib // rec {

View file

@ -1,12 +1,4 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) dmenu;
available_menus = {
bmenu = "bmenu";
rofi = "rofi -dmenu -sort";
};
menu_cmd = available_menus.${dmenu};
in
pkgs.writeShellScriptBin "wdmenu" ''
exec ${menu_cmd} "$@"
exec bmenu "$@"
''

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) dmenu;
inherit (config.my) dmenu;
available_menus = {
bmenu = "bmenu run";
rofi = "rofi -show drun -sort";

View file

@ -1,12 +1,4 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) dmenu;
available_menus = {
bmenu = "bmenu run";
rofi = "rofi -show drun -sort";
};
menu_cmd = available_menus.${dmenu};
in
pkgs.writeShellScriptBin "wlauncher" ''
exec ${menu_cmd} "$@"
exec bmenu run "$@"
''

6
settings/default.nix Normal file
View file

@ -0,0 +1,6 @@
{ lib, ... }:
{
options = {
my = lib.mkOption { };
};
}

View file

@ -43,7 +43,7 @@
};
plymouth = {
enable = true;
theme = lib.mkIf (pkgs.uservars.desktop == "sway") "red_loader";
theme = lib.mkIf (config.my.desktop == "sway") "red_loader";
themePackages = with pkgs; [
(adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; })
];

View file

@ -22,8 +22,11 @@
./users.nix
./containers.nix
./network.nix
../settings
];
my = import ../user/variables.nix;
zramSwap.enable = true;
programs.adb.enable = true;

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
accent
font

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
theme
accent

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
theme
accent

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs.uservars) desktop browser;
inherit (config.my) desktop browser;
bugfixedFirefox = pkgs.firefox-esr-unwrapped // {
requireSigning = false;
allowAddonSideload = true;

View file

@ -5,15 +5,7 @@
...
}:
let
inherit (pkgs.uservars)
key
theme
color
accent
font
editor
desktop
;
inherit (config.my) accent editor desktop;
in
{
config = {

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
theme
accent

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (pkgs.uservars) username mail;
inherit (config.my) username mail;
in
{
config = {

View file

@ -2,9 +2,10 @@
pkgs,
lib,
inputs,
config,
...
}:
lib.mkIf (pkgs.uservars.desktop == "gnome") {
lib.mkIf (config.my.desktop == "gnome") {
home.pointerCursor = {
name = "Adwaita";

View file

@ -1,6 +1,11 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
config,
...
}:
let
inherit (pkgs.uservars) accent theme editor;
inherit (config.my) accent theme editor;
inherit (theme) color;
in
{

View file

@ -44,8 +44,11 @@
./xdg-dirs.nix
inputs.hyprland.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
../settings
];
my = import ./variables.nix;
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "lelgenio";

View file

@ -5,7 +5,7 @@
...
}:
{
config = lib.mkIf (pkgs.uservars.desktop == "hyprland") {
config = lib.mkIf (config.my.desktop == "hyprland") {
wayland.windowManager.hyprland = {
enable = false;
extraConfig = ''

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
dmenu
editor

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
theme
color

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
theme
color

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs.uservars) browser;
inherit (config.my) browser;
cfg = config.xdg.defaultApplications;
in
{

View file

@ -5,7 +5,7 @@
...
}:
{
config = lib.mkIf (pkgs.uservars.desktop != "gnome") {
config = lib.mkIf (config.my.desktop != "gnome") {
services.mpd = {
enable = true;
musicDirectory = config.home.homeDirectory + "/Música";

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
theme
color

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
theme
accent

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (pkgs.uservars) username mail;
inherit (config.my) username mail;
in
{
config = {

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
accent
font
@ -24,7 +24,7 @@ in
./swaylock.nix
./theme.nix
];
config = lib.mkIf (pkgs.uservars.desktop == "sway") {
config = lib.mkIf (config.my.desktop == "sway") {
services.mako.enable = true;
services.swayidle.enable = true;
services.kanshi.enable = true;

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
accent
font

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
accent
font

View file

@ -1,7 +1,7 @@
{ config, pkgs, ... }:
let
in
# inherit (pkgs.uservars) key accent font theme;
# inherit (config.my) key accent font theme;
# inherit (theme) color;
# inherit (pkgs) lib;
# mod = "Mod4";

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }:
let
inherit (pkgs.uservars)
inherit (config.my)
key
accent
font

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }:
let
inherit (pkgs.uservars)
inherit (config.my)
key
accent
font

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
accent
font

View file

@ -5,7 +5,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
accent
font

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs.uservars) theme font desktop;
inherit (config.my) theme font desktop;
inherit (theme)
color
gtk_theme

View file

@ -1,6 +1,11 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
config,
...
}:
let
inherit (pkgs.uservars) nextcloud;
inherit (config.my) nextcloud;
pass_cmd = (
pkgs.writeShellScript "get_pass" ''
pass "${nextcloud.pass}" | head -n1

View file

@ -7,7 +7,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
theme
accent

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs.uservars)
inherit (config.my)
key
accent
font