Avoid importing the same file multiple times

This commit is contained in:
Leonardo Eugênio 2023-01-23 00:35:40 -03:00
parent 59c60cf9b2
commit 794613626e
18 changed files with 21 additions and 20 deletions

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, ... }:
let inherit (import ./variables.nix) key theme color accent font;
let inherit (pkgs.uservars) key theme color accent font;
in {
config = {
programs.alacritty = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, inputs, ... }:
let inherit (import ./variables.nix) key theme color accent font;
let inherit (pkgs.uservars) key theme color accent font;
in {
# My bemenu wrapper
xdg.configFile = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, font, ... }:
let inherit (import ./variables.nix) desktop browser;
let inherit (pkgs.uservars) desktop browser;
in {
config = {
programs.firefox = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, ... }:
let inherit (import ./variables.nix) key theme color accent font;
let inherit (pkgs.uservars) key theme color accent font;
in {
config = {
programs.fish = {

View File

@ -1,6 +1,6 @@
{ config, pkgs, lib, inputs, ... }:
let
inherit (import ./variables.nix) key theme color accent font;
inherit (pkgs.uservars) key theme color accent font;
colors = {
"bg+" = color.bg_light;

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, ... }:
let inherit (import ./variables.nix) username mail;
let inherit (pkgs.uservars) username mail;
in {
config = {
programs.git = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, font, ... }:
let inherit (import ./variables.nix) key theme color accent font;
let inherit (pkgs.uservars) key theme color accent font;
in {
config = {
programs.helix = {

View File

@ -1,6 +1,4 @@
{ config, pkgs, lib, inputs, ... }:
let inherit (import ./variables.nix) desktop;
in {
{ config, pkgs, lib, inputs, ... }: {
imports = [
./controller.nix
./waybar.nix
@ -30,9 +28,10 @@ in {
./zathura.nix
./man.nix
./mpd.nix
./sway.nix
inputs.hyprland.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
] ++ lib.optional (desktop == "sway") ./sway.nix;
];
# Home Manager needs a bit of information about you and the
# paths it should manage.

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, font, ... }:
let inherit (import ./variables.nix) key theme color accent font dmenu;
let inherit (pkgs.uservars) key theme color accent font dmenu;
in {
config = {
programs.kakoune = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, inputs, ... }:
let inherit (import ./variables.nix) key theme color accent font desktop;
let inherit (pkgs.uservars) key theme color accent font desktop;
in {
config = {
programs.man = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, font, ... }:
let inherit (import ./variables.nix) key theme color accent font;
let inherit (pkgs.uservars) key theme color accent font;
in {
config = {
programs.mangohud = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, font, ... }:
let inherit (import ./variables.nix) browser;
let inherit (pkgs.uservars) browser;
in {
config = {
xdg.desktopEntries = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, font, ... }:
let inherit (import ./variables.nix) key theme color accent font;
let inherit (pkgs.uservars) key theme color accent font;
in {
config = {
programs.rofi = {

View File

@ -1,6 +1,6 @@
{ config, pkgs, lib, ... }:
let
inherit (import ./variables.nix) key theme color accent font;
inherit (pkgs.uservars) key theme color accent font;
color_picker = pkgs.writeShellScript "color_picker" ''
grim -g "$(slurp -b aabbcc00 -p)" - |
convert - txt:- |

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, inputs, ... }:
let inherit (import ./variables.nix) key theme color accent font;
let inherit (pkgs.uservars) key theme color accent font;
in {
services.syncthing = {
enable = true;

View File

@ -79,6 +79,8 @@ let
};
in
rec {
inherit themes;
key = keys.colemak;
theme = themes.dark;

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, font, ... }:
let inherit (import ./variables.nix) key theme color accent font;
let inherit (pkgs.uservars) key theme color accent font;
in {
config = {
programs.waybar = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, font, ... }:
let inherit (import ./variables.nix) key color accent font;
let inherit (pkgs.uservars) key color accent font;
in {
config = {
programs.zathura.enable = true;