nixos/nixbit: init module
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
This commit is contained in:
@@ -168,6 +168,8 @@
|
||||
|
||||
- [Tenstorrent](https://tenstorrent.com) hardware module has been added.
|
||||
|
||||
- [nixbit](https://github.com/pbek/nixbit), a GUI application for updating your NixOS system from a Nix Flakes Git repository. Available as [programs.nixbit](#opt-programs.nixbit.enable).
|
||||
|
||||
## Backward Incompatibilities {#sec-release-25.11-incompatibilities}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
@@ -277,6 +277,7 @@
|
||||
./programs/nix-index.nix
|
||||
./programs/nix-ld.nix
|
||||
./programs/nix-required-mounts.nix
|
||||
./programs/nixbit.nix
|
||||
./programs/nm-applet.nix
|
||||
./programs/nncp.nix
|
||||
./programs/noisetorch.nix
|
||||
|
||||
49
nixos/modules/programs/nixbit.nix
Normal file
49
nixos/modules/programs/nixbit.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkOption
|
||||
mkPackageOption
|
||||
types
|
||||
;
|
||||
cfg = config.programs.nixbit;
|
||||
in
|
||||
{
|
||||
options.programs.nixbit = {
|
||||
enable = mkEnableOption "Nixbit configuration";
|
||||
|
||||
package = mkPackageOption pkgs "nixbit" { };
|
||||
|
||||
repository = mkOption {
|
||||
type = types.str;
|
||||
description = "Git repository URL for Nixbit";
|
||||
};
|
||||
|
||||
forceAutostart = mkEnableOption "" // {
|
||||
description = "Force creation of autostart desktop entry when application starts";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = [ cfg.package ];
|
||||
|
||||
etc."nixbit.conf".text =
|
||||
lib.optionalString (cfg.repository != "") ''
|
||||
[Repository]
|
||||
Url = ${cfg.repository}
|
||||
''
|
||||
+ ''
|
||||
[Autostart]
|
||||
Force = ${if cfg.forceAutostart then "true" else "false"}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user