Skip to content

Commit

Permalink
nixosModules.dwarffs: Use pinned nix instead of overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Jul 1, 2024
1 parent 28c1d90 commit 79e9ff7
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,24 @@
};
});

nixosModules.dwarffs =
{ pkgs, ... }:
{
nixpkgs.overlays = [ self.overlay ];

systemd.packages = [ pkgs.dwarffs ];
nixosModules.dwarffs = { config, lib, pkgs, ... }:
let cfg = config.services.dwarffs;
in
{
options.services.dwarffs = {
package = lib.mkOption {
type = lib.types.package;
description = ''
Which dwarffs package to use.
'';
defaultText = lib.literalMD ''a build using the pinned nix and nixpkgs of the `dwarffs` flake'';
default = self.defaultPackage.${pkgs.stdenv.hostPlatform.system};
};
};
config = {
systemd.packages = [ cfg.package ];

system.fsPackages = [ pkgs.dwarffs ];
system.fsPackages = [ cfg.package ];

systemd.units."run-dwarffs.automount".wantedBy = [ "multi-user.target" ];

Expand All @@ -99,6 +109,6 @@

users.groups.dwarffs = {};
};

};
};
}

0 comments on commit 79e9ff7

Please sign in to comment.