Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
ef33a15eeb
commit
9dae5ede60
2 changed files with 37 additions and 26 deletions
37
modules/scripts/zet.nix
Normal file
37
modules/scripts/zet.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{ inputs, withSystem, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
name = "zet";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
perSystem =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
packages.${name} = pkgs.writeShellApplication {
|
||||||
|
inherit name;
|
||||||
|
|
||||||
|
bashOptions = [ "pipefail" ];
|
||||||
|
|
||||||
|
runtimeInputs = with pkgs; [
|
||||||
|
bashInteractive
|
||||||
|
coreutils
|
||||||
|
fzf
|
||||||
|
git
|
||||||
|
];
|
||||||
|
|
||||||
|
text = builtins.readFile "${inputs.zet}/${name}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.modules.homeManager.base =
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
|
||||||
|
];
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
ZET_DIR = "${config.xdg.userDirs.documents}/zet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,26 +0,0 @@
|
||||||
{ inputs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
flake.modules.homeManager.base =
|
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages =
|
|
||||||
let
|
|
||||||
name = "zet";
|
|
||||||
in
|
|
||||||
[
|
|
||||||
(pkgs.writeShellApplication {
|
|
||||||
inherit name;
|
|
||||||
|
|
||||||
runtimeInputs = with pkgs; [
|
|
||||||
bashInteractive
|
|
||||||
coreutils
|
|
||||||
fzf
|
|
||||||
git
|
|
||||||
];
|
|
||||||
|
|
||||||
text = builtins.readFile "${inputs.zet}/${name}";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue