mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
3db43afcb4
This new way of handling news should also work in Nix Flake setups.
18 lines
478 B
Nix
18 lines
478 B
Nix
{ pkgs ? import <nixpkgs> { }, confPath, confAttr ? null, check ? true
|
|
, newsReadIdsFile ? null }:
|
|
|
|
let
|
|
inherit (pkgs.lib)
|
|
concatMapStringsSep fileContents filter length optionalString removeSuffix
|
|
replaceStrings splitString;
|
|
|
|
env = import ../modules {
|
|
configuration = if confAttr == "" || confAttr == null then
|
|
confPath
|
|
else
|
|
(import confPath).${confAttr};
|
|
pkgs = pkgs;
|
|
check = check;
|
|
};
|
|
|
|
in { inherit (env) activationPackage config; }
|