mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
add programs.nix-script module
This commit is contained in:
parent
563a2b35b7
commit
c75776e589
3 changed files with 51 additions and 8 deletions
|
@ -25,6 +25,7 @@ let
|
|||
./modules/services/activate-system.nix
|
||||
./modules/services/nix-daemon.nix
|
||||
./modules/programs/bash.nix
|
||||
./modules/programs/nix-script.nix
|
||||
./modules/programs/tmux.nix
|
||||
./modules/programs/vim.nix
|
||||
./modules/programs/zsh.nix
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
system.defaults.trackpad.Clicking = true;
|
||||
|
||||
environment.systemPackages =
|
||||
[ pkgs.lnl.nix-script
|
||||
pkgs.curl
|
||||
[ pkgs.curl
|
||||
pkgs.fzf
|
||||
pkgs.gettext
|
||||
pkgs.git
|
||||
|
@ -40,6 +39,8 @@
|
|||
|
||||
services.activate-system.enable = true;
|
||||
|
||||
programs.nix-script.enable = true;
|
||||
|
||||
programs.tmux.enable = true;
|
||||
programs.tmux.enableSensible = true;
|
||||
programs.tmux.enableMouse = true;
|
||||
|
@ -147,11 +148,5 @@
|
|||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
lnl.nix-script = pkgs.substituteAll {
|
||||
name = "nix";
|
||||
src = ../../pkgs/nix-tools/nix-script.sh;
|
||||
dir = "bin";
|
||||
isExecutable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
47
modules/programs/nix-script.nix
Normal file
47
modules/programs/nix-script.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.nix-script;
|
||||
|
||||
nix-script = pkgs.substituteAll {
|
||||
inherit (cfg) name;
|
||||
src = ../../pkgs/nix-tools/nix-script.sh;
|
||||
dir = "bin";
|
||||
isExecutable = true;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
|
||||
programs.nix-script.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable the nix script.
|
||||
'';
|
||||
};
|
||||
|
||||
programs.nix-script.name = mkOption {
|
||||
type = types.str;
|
||||
default = "nix";
|
||||
description = ''
|
||||
Name to use for the nix script.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages =
|
||||
[ # Nix wrapper script
|
||||
nix-script
|
||||
];
|
||||
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue