summaryrefslogtreecommitdiff
path: root/os/srv/nix-helper.nix
blob: fede111361df2a657a1f894b52a76348f4dcf063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ config, lib, pkgs, username, ... }:
let
  cfg = config.os.srv.nix-helper;
in
{
  options.os.srv.nix-helper.enable = lib.mkEnableOption "enables nix-helper";
  config = lib.mkIf cfg.enable {
    nix.settings = {
      trusted-users = [ "root" "${username}" ];
      experimental-features = [ "nix-command" "flakes" ];
    };

    programs.nh = {
      enable = true;
      osFlake = "/etc/nixos";
    };

    environment.systemPackages = with pkgs; [
      nix-output-monitor
      nvd
    ];
  };
}