From 13a96aaea8092e796da87256fdbef5ba08b0a3c2 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 14 Nov 2024 17:39:21 -0300 Subject: [PATCH] fix: move fhs to be specific to home-manager per user --- modules/home-manager/packages.nix | 26 -------------------------- specific/desktop/home-manager.nix | 30 ++++++++++++++++++++++++++++++ specific/laptop/home-manager.nix | 31 +++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 26 deletions(-) diff --git a/modules/home-manager/packages.nix b/modules/home-manager/packages.nix index b6d3586..ac1cf8e 100644 --- a/modules/home-manager/packages.nix +++ b/modules/home-manager/packages.nix @@ -79,31 +79,5 @@ # Mail client thunderbird - - # Create an FHS environment using the command `fhs`, enabling the execution of non-NixOS packages in NixOS! - ( - let - base = appimageTools.defaultFhsEnvArgs; - in - buildFHSUserEnv ( - base - // { - name = "fhs"; - targetPkgs = - pkgs: - ( - # pkgs.buildFHSUserEnv provides only a minimal FHS environment, - # lacking many basic packages needed by most software. - # Therefore, we need to add them manually. - # - # pkgs.appimageTools provides basic packages required by most software. - (base.targetPkgs pkgs) ++ (with pkgs; [ nodejs ]) - ); - profile = "export FHS=1"; - runScript = "bash"; - extraOutputsToInstall = [ "dev" ]; - } - ) - ) ]; } diff --git a/specific/desktop/home-manager.nix b/specific/desktop/home-manager.nix index 7114161..dbd8d78 100644 --- a/specific/desktop/home-manager.nix +++ b/specific/desktop/home-manager.nix @@ -79,6 +79,36 @@ home.packages = with pkgs; [ pcsx2 + + # Create an FHS environment using the command `fhs`, enabling the execution of non-NixOS packages in NixOS! + ( + let + base = appimageTools.defaultFhsEnvArgs; + in + buildFHSUserEnv ( + base + // { + name = "fhs"; + targetPkgs = + pkgs: + ( + # pkgs.buildFHSUserEnv provides only a minimal FHS environment, + # lacking many basic packages needed by most software. + # Therefore, we need to add them manually. + # + # pkgs.appimageTools provides basic packages required by most software. + (base.targetPkgs pkgs) + ++ (with pkgs; [ + nodejs + dotnet-sdk_8 + ]) + ); + profile = "export FHS=1"; + runScript = "bash"; + extraOutputsToInstall = [ "dev" ]; + } + ) + ) ]; # diff --git a/specific/laptop/home-manager.nix b/specific/laptop/home-manager.nix index 59cd896..0acdb6f 100644 --- a/specific/laptop/home-manager.nix +++ b/specific/laptop/home-manager.nix @@ -62,6 +62,37 @@ ## Tools # Utilities brightnessctl + + # Create an FHS environment using the command `fhs`, enabling the execution of non-NixOS packages in NixOS! + ( + let + base = appimageTools.defaultFhsEnvArgs; + in + buildFHSUserEnv ( + base + // { + name = "fhs"; + targetPkgs = + pkgs: + ( + # pkgs.buildFHSUserEnv provides only a minimal FHS environment, + # lacking many basic packages needed by most software. + # Therefore, we need to add them manually. + # + # pkgs.appimageTools provides basic packages required by most software. + (base.targetPkgs pkgs) + ++ ( + with pkgs; + [ + ] + ) + ); + profile = "export FHS=1"; + runScript = "bash"; + extraOutputsToInstall = [ "dev" ]; + } + ) + ) ]; #