Compare commits
3 Commits
35ba80b9cc
...
7fd49dcfd5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7fd49dcfd5 | ||
|
|
d0d73e19d2 | ||
|
|
db0c0a148e |
@@ -34,7 +34,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
mkhomeManagerModules = config: [
|
mkhomeManagerModules = config: [
|
||||||
(self.homeManagerModules.default inputs)
|
self.homeManagerModules.default
|
||||||
# { inherit (config) extraImports; }
|
# { inherit (config) extraImports; }
|
||||||
{
|
{
|
||||||
user = config.user;
|
user = config.user;
|
||||||
@@ -52,8 +52,10 @@
|
|||||||
{
|
{
|
||||||
lib = { inherit mkhomeManagerModules; };
|
lib = { inherit mkhomeManagerModules; };
|
||||||
|
|
||||||
homeManagerModules.default = inputs: {
|
homeManagerModules.default = {
|
||||||
imports = [ ./homeManagerModules ];
|
imports = [
|
||||||
|
./homeManagerModules
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosModules.default = { config, ... }: {
|
nixosModules.default = { config, ... }: {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
../nixosModules/options.nix
|
../nixosModules/options.nix
|
||||||
# inputs._1password-shell-plugins.hmModules.default
|
# inputs._1password-shell-plugins.hmModules.default
|
||||||
# Commented out because it tries to configure fish shell which we don't use
|
# Commented out because it tries to configure fish shell which we don't use
|
||||||
];
|
] ++ lib.optional (inputs ? resticprofile) inputs.resticprofile.homeManagerModules.default;
|
||||||
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
"1password-cli"
|
"1password-cli"
|
||||||
|
|||||||
@@ -10,8 +10,10 @@
|
|||||||
outputs = { self, nixpkgs, home-manager }:
|
outputs = { self, nixpkgs, home-manager }:
|
||||||
let
|
let
|
||||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
|
|
||||||
# Define a function to build the resticprofile package for a given system:
|
# Define a function to build the resticprofile package for a given system:
|
||||||
resticprofilePkg = { pkgs, lib, ... }:
|
resticprofilePkg = pkgs:
|
||||||
pkgs.buildGoModule rec {
|
pkgs.buildGoModule rec {
|
||||||
pname = "resticprofile";
|
pname = "resticprofile";
|
||||||
version = "0.32.0";
|
version = "0.32.0";
|
||||||
@@ -19,12 +21,12 @@
|
|||||||
owner = "creativeprojects";
|
owner = "creativeprojects";
|
||||||
repo = "resticprofile";
|
repo = "resticprofile";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-ezelvyroQG1EW3SU63OVHJ/T4qjN5DRllvPIXnei1Z4="; # source tarball hash
|
sha256 = "sha256-fmYsoGYppNgbtoX18aF5UHBG9ieYorBJ9JZkwrR+UBI="; # source tarball hash
|
||||||
};
|
};
|
||||||
vendorHash = "sha256-M9S6F/Csz7HnOq8PSWjpENKm1704kVx9zDts1ieraTE="; # Correct vendor hash
|
vendorHash = "sha256-/GVWjOvkYe7xMRjANKIKV6FSU0F5VY1ZP/ppgAJyhvw="; # Correct vendor hash
|
||||||
goPackagePath = "github.com/creativeprojects/resticprofile";
|
goPackagePath = "github.com/creativeprojects/resticprofile";
|
||||||
doCheck = false; # Disable tests due to sandboxed build environment
|
doCheck = false; # Disable tests due to sandboxed build environment
|
||||||
meta = with lib; {
|
meta = with pkgs.lib; {
|
||||||
description = "Configuration profiles manager and scheduler for restic backup";
|
description = "Configuration profiles manager and scheduler for restic backup";
|
||||||
homepage = "https://creativeprojects.github.io/resticprofile/";
|
homepage = "https://creativeprojects.github.io/resticprofile/";
|
||||||
license = licenses.gpl3Only;
|
license = licenses.gpl3Only;
|
||||||
@@ -33,14 +35,28 @@
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
# Provide the package for all supported systems:
|
# Provide the package for all supported systems:
|
||||||
packages = nixpkgs.lib.genAttrs systems (system:
|
packages = forAllSystems (system:
|
||||||
let pkgs = import nixpkgs { inherit system; };
|
let
|
||||||
in { resticprofile = resticprofilePkg { inherit pkgs; lib = pkgs.lib; }; }
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
in {
|
||||||
|
resticprofile = resticprofilePkg pkgs;
|
||||||
|
default = resticprofilePkg pkgs;
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
# Provide the Home Manager module
|
# Provide the Home Manager module
|
||||||
homeManagerModules = {
|
homeManagerModules = {
|
||||||
resticprofile = ./resticprofile.nix;
|
resticprofile = { config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
# Use the package built by this flake
|
||||||
|
resticprofilePackage = self.packages.${pkgs.system}.resticprofile;
|
||||||
|
in {
|
||||||
|
imports = [ ./resticprofile.nix ];
|
||||||
|
config = lib.mkIf config.programs.resticprofile.enable {
|
||||||
|
programs.resticprofile.package = lib.mkDefault resticprofilePackage;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
default = self.homeManagerModules.resticprofile;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user