1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-14 15:19:45 +01:00
home-manager/home-manager/home-manager.nix
Robert Helgesson 3db43afcb4
home-manager: rework news command
This new way of handling news should also work in Nix Flake setups.
2023-07-31 12:43:36 +02:00

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; }