feat: add home-manager module output
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m19s
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m19s
This commit is contained in:
parent
c0911307fd
commit
646241f355
2 changed files with 50 additions and 6 deletions
12
flake.lock
generated
12
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1769789167,
|
||||
"narHash": "sha256-kKB3bqYJU5nzYeIROI82Ef9VtTbu4uA3YydSk/Bioa8=",
|
||||
"lastModified": 1770197578,
|
||||
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "62c8382960464ceb98ea593cb8321a2cf8f9e3e5",
|
||||
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -80,11 +80,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769957392,
|
||||
"narHash": "sha256-6PkqwwYf5K2CHi2V+faI/9pqjfz/HxUkI/MVid6hlOY=",
|
||||
"lastModified": 1770331927,
|
||||
"narHash": "sha256-jlOvO++uvne/lTgWqdI4VhTV5OpVWi70ZDVBlT6vGSs=",
|
||||
"owner": "pyproject-nix",
|
||||
"repo": "uv2nix",
|
||||
"rev": "d18bc50ae1c3d4be9c41c2d94ea765524400af75",
|
||||
"rev": "5b43a934e15b23bfba6c408cba1c570eccf80080",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
44
flake.nix
44
flake.nix
|
|
@ -85,6 +85,50 @@
|
|||
|
||||
in
|
||||
{
|
||||
homeManagerModules.default =
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.streamer;
|
||||
in
|
||||
{
|
||||
options.programs.streamer = {
|
||||
enable = lib.mkEnableOption "streamer";
|
||||
|
||||
base-folder = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Base Folder of Streamer";
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = self.packages.${pkgs.system}.streamer;
|
||||
defaultText = lib.literalExpression "inputs.streamer.packages.\${pkgs.system}.streamer";
|
||||
description = "The package to use for the streamer binary.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "programs.streamer" pkgs lib.platforms.linux)
|
||||
];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."streamer/config.yaml".source =
|
||||
(pkgs.formats.yaml { }).generate "streamer-configuration"
|
||||
{
|
||||
base_folder = cfg.base-folder;
|
||||
};
|
||||
|
||||
home.shellAliases.s = "streamer";
|
||||
};
|
||||
};
|
||||
|
||||
# Package a virtual environment as our main application.
|
||||
#
|
||||
# Enable no optional dependencies for production build.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue