Skip to content

Commit

Permalink
Added basic nixosModule & made slight adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
ginkogruen committed Oct 15, 2024
1 parent 7e6e37e commit 9e60f0c
Showing 1 changed file with 33 additions and 10 deletions.
43 changes: 33 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "Developement and packaging flake for landingpage";
description = "Landingpage a simple overview of running processes";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
Expand Down Expand Up @@ -48,16 +48,39 @@
};
};

#frontend = pkgs.stdenv.mkDerivation {};
};

nixosModules.landingpage = { config, lib, pkgs, ...}: {
options.landingpage.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable landingpage";
frontend = pkgs.stdenv.mkDerivation {
pname = "frontend";
version = "1.0";
src = ./frontend;
meta = {
description = "JavaScript frontend displaying service status";
license = pkgs.lib.licenses.mit;
};
};
};
}
);
)
// {
nixosModules.landingpage = {
config,
lib,
pkgs,
...
}: {
options.landingpage.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable landingpage";
};

config = {
warnings = if config.landingpage.enable
then [
''
Landingpage is still WIP. Things may work in unexpected ways.
''
] else [];
};
};
};
}

0 comments on commit 9e60f0c

Please sign in to comment.