Skip to content

Commit d8c5a16

Browse files
lib: remove icons.nix and use launcher in main lib
The functions in icon.nix are unused so removed. The `rmDesktopEntries` function was being imported by file path where ever it was used. This change now exports it as part of the lib for easier access. Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
1 parent 65af7bf commit d8c5a16

File tree

6 files changed

+13
-111
lines changed

6 files changed

+13
-111
lines changed

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
inputs@{ flake-parts, ... }:
202202
let
203203
# Create the extended lib
204-
ghafLib = import ./lib.nix { inherit inputs; };
204+
ghafLib = import ./lib { inherit inputs; };
205205
extendedLib = inputs.nixpkgs.lib.extend ghafLib;
206206
in
207207
flake-parts.lib.mkFlake

lib.nix renamed to lib/default.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
# SPDX-License-Identifier: MIT
55
# FlattenTree and rakeLeaves originate from
66
# https://github.com/divnix/digga
7-
_: lib: prev: {
7+
_: lib: prev:
8+
let
9+
# Import launcher utilities
10+
launcherLib = import ./launcher.nix { };
11+
in
12+
{
813
/*
914
*
1015
Filters Nix packages based on the target system platform.
@@ -97,4 +102,7 @@ _: lib: prev: {
97102
};
98103

99104
};
105+
106+
# Launcher utilities
107+
inherit (launcherLib) rmDesktopEntries;
100108
}

lib/icons.nix

Lines changed: 0 additions & 101 deletions
This file was deleted.

modules/development/debug-tools.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ let
1414
sysbench-fileio-test-script = pkgs.callPackage ./scripts/sysbench_fileio_test.nix { };
1515
nvpmodel-check = pkgs.callPackage ./scripts/nvpmodel_check.nix { };
1616

17-
inherit (lib) mkEnableOption mkIf;
18-
#TODO; make sure that the lib is exported correctly and remove this cross file import
19-
inherit (import ../../lib/launcher.nix { inherit pkgs lib; }) rmDesktopEntries;
17+
inherit (lib) mkEnableOption mkIf rmDesktopEntries;
2018
in
2119
{
2220
options.ghaf.development.debug.tools = {

modules/development/dt-gui.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
}:
99
let
1010
cfg = config.ghaf.development.debug.tools.gui;
11-
#TODO; make sure that the lib is exported correctly and remove this cross file import
12-
inherit (import ../../lib/launcher.nix { inherit pkgs lib; }) rmDesktopEntries;
11+
inherit (lib) rmDesktopEntries;
1312
in
1413
{
1514
options.ghaf.development.debug.tools.gui = {

modules/microvm/sysvms/guivm.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
{
55
config,
66
lib,
7-
pkgs,
87
...
98
}:
109
let
1110
configHost = config;
1211
vmName = "gui-vm";
1312

14-
#TODO do not import from a path like this
15-
inherit (import ../../../lib/launcher.nix { inherit pkgs lib; }) rmDesktopEntries;
13+
inherit (lib) rmDesktopEntries;
1614
guivmBaseConfiguration = {
1715
imports = [
1816
inputs.self.nixosModules.profiles

0 commit comments

Comments
 (0)