Formatting
This commit is contained in:
parent
9f86e0d942
commit
848f8e1589
4 changed files with 64 additions and 57 deletions
12
flake.nix
12
flake.nix
|
@ -3,18 +3,21 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = {nixpkgs, ...}: let
|
||||
outputs = { nixpkgs, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
# Stolen from https://github.com/divnix/digga/blob/main/src/importers.nix
|
||||
rakeLeaves = dirPath: let
|
||||
rakeLeaves = dirPath:
|
||||
let
|
||||
seive = file: type:
|
||||
# Only rake `.nix` files or directories
|
||||
(type == "regular" && lib.hasSuffix ".nix" file) || (type == "directory");
|
||||
|
||||
collect = file: type: {
|
||||
name = lib.removeSuffix ".nix" file;
|
||||
value = let
|
||||
value =
|
||||
let
|
||||
path = dirPath + "/${file}";
|
||||
in
|
||||
if
|
||||
|
@ -28,7 +31,8 @@
|
|||
files = lib.filterAttrs seive (builtins.readDir dirPath);
|
||||
in
|
||||
lib.filterAttrs (n: v: v != { }) (lib.mapAttrs' collect files);
|
||||
in {
|
||||
in
|
||||
{
|
||||
nixosModules = rakeLeaves ./modules;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.system.autoUpgrade;
|
||||
|
||||
updateScript = pkgs.writeShellApplication {
|
||||
|
@ -19,7 +19,8 @@
|
|||
git push
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.system.autoUpgrade = {
|
||||
# TODO: make sure system.autoUpgrade.flake is a local folder
|
||||
updateFlake = lib.mkOption {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.qbittorrent-nox;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.qbittorrent-nox = {
|
||||
enable = lib.mkEnableOption "qbittorrent, BitTorrent client.";
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.unpackerr;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.unpackerr = {
|
||||
enable = lib.mkEnableOption "unpackerr";
|
||||
package = lib.mkPackageOption pkgs "unpackerr" { };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue