flake: refactor references to hlissner/dotfiles

This commit is contained in:
Infinidoge 2023-09-26 16:53:13 -04:00
parent 3ccf76d134
commit 0fe2c66bc0
26 changed files with 54 additions and 211 deletions

198
flake.lock generated
View file

@ -24,31 +24,10 @@
"type": "github" "type": "github"
} }
}, },
"agenix_2": {
"inputs": {
"nixpkgs": [
"hlissner-dotfiles",
"nixpkgs"
]
},
"locked": {
"lastModified": 1662241716,
"narHash": "sha256-urqPvSvvGUhkwzTDxUI8N1nsdMysbAfjmBNZaTYBZRU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "c96da5835b76d3d8e8d99a0fec6fe32f8539ee2e",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"crane": { "crane": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_4",
"nixpkgs": [ "nixpkgs": [
"universe-cli", "universe-cli",
"nixpkgs" "nixpkgs"
@ -132,25 +111,6 @@
"type": "github" "type": "github"
} }
}, },
"emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1663325995,
"narHash": "sha256-jXn/zFemtAT01xuhmKMhKPDTke7cYHe2IaNmVFQ6/G8=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "b50178f76a7868d0aca28278451141269df137fe",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -257,21 +217,6 @@
} }
}, },
"flake-utils": { "flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
@ -289,7 +234,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_3"
}, },
@ -307,7 +252,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_4"
}, },
@ -325,7 +270,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_5": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_5" "systems": "systems_5"
}, },
@ -343,7 +288,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_6": { "flake-utils_5": {
"inputs": { "inputs": {
"systems": "systems_7" "systems": "systems_7"
}, },
@ -377,53 +322,7 @@
"type": "github" "type": "github"
} }
}, },
"hlissner-dotfiles": {
"inputs": {
"agenix": "agenix_2",
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable"
},
"locked": {
"lastModified": 1663596637,
"narHash": "sha256-uKMuJnCINAJWdEapZeTaenBptJN+rIrh5Ml+9J7Gr+4=",
"owner": "hlissner",
"repo": "dotfiles",
"rev": "089f1a9da9018df9e5fc200c2d7bef70f4546026",
"type": "github"
},
"original": {
"owner": "hlissner",
"repo": "dotfiles",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": {
"nixpkgs": [
"hlissner-dotfiles",
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1663328500,
"narHash": "sha256-7n+J/exp8ky4dmk02y5a9R7CGmJvHpzrHMzfEkMtSWA=",
"owner": "rycee",
"repo": "home-manager",
"rev": "5427f3d1f0ea4357cd4af0bffee7248d640c6ffc",
"type": "github"
},
"original": {
"owner": "rycee",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -476,7 +375,7 @@
"nix-minecraft": { "nix-minecraft": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -497,21 +396,6 @@
} }
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": {
"lastModified": 1663229557,
"narHash": "sha256-1uU4nsDLXKG0AHc/VCsNBAEPkTA/07juYhcEWRb1O1E=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "a0df6cd6e199df4a78c833c273781ea92fa62cfb",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixos-hardware_2": {
"locked": { "locked": {
"lastModified": 1695033975, "lastModified": 1695033975,
"narHash": "sha256-GIUxbgLBhVyaKRxQw/NWYFLx7/jbKW3+U0HoSsMLPAs=", "narHash": "sha256-GIUxbgLBhVyaKRxQw/NWYFLx7/jbKW3+U0HoSsMLPAs=",
@ -529,7 +413,7 @@
"nixos-wsl": { "nixos-wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -564,49 +448,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1663264531,
"narHash": "sha256-2ncO5chPXlTxaebDlhx7MhL0gOEIWxzSyfsl0r0hxQk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "454887a35de6317a30be284e8adc2d2f6d8a07c4",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixpkgs-unstable",
"type": "indirect"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 0,
"narHash": "sha256-GGMupfk/lGzPBQ/dRrcQEhiFZ0F5KPg0j5Q4Fb5coxc=",
"path": "/nix/store/r2bbhmlfvfpir9hp8fjs31kj13kwgwyl-source",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1663178737,
"narHash": "sha256-ayOtdyoNx6BqJtTYVzdQCDz/YWb67TY/CMGacFCgNQo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1158501e7c7cba26d922723cf9f70099995eb755",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1694767346, "lastModified": 1694767346,
"narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=", "narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=",
@ -644,14 +486,13 @@
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-registry": "flake-registry", "flake-registry": "flake-registry",
"fork": "fork", "fork": "fork",
"hlissner-dotfiles": "hlissner-dotfiles", "home-manager": "home-manager",
"home-manager": "home-manager_2",
"impermanence": "impermanence", "impermanence": "impermanence",
"latest": "latest", "latest": "latest",
"nix-minecraft": "nix-minecraft", "nix-minecraft": "nix-minecraft",
"nixos-hardware": "nixos-hardware_2", "nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_2",
"private": "private", "private": "private",
"rust-overlay": "rust-overlay", "rust-overlay": "rust-overlay",
"stable": "stable", "stable": "stable",
@ -660,7 +501,7 @@
}, },
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_3",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -708,7 +549,7 @@
}, },
"rust-overlay_3": { "rust-overlay_3": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_6", "flake-utils": "flake-utils_5",
"nixpkgs": [ "nixpkgs": [
"universe-cli", "universe-cli",
"nixpkgs" "nixpkgs"
@ -872,21 +713,6 @@
"repo": "universe-cli", "repo": "universe-cli",
"type": "github" "type": "github"
} }
},
"utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -34,8 +34,6 @@
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
hlissner-dotfiles.url = "github:hlissner/dotfiles";
flake-registry.url = "github:NixOS/flake-registry"; flake-registry.url = "github:NixOS/flake-registry";
flake-registry.flake = false; flake-registry.flake = false;
@ -82,7 +80,6 @@
let let
libOverlay = (lfinal: lprev: { libOverlay = (lfinal: lprev: {
our = self.lib; our = self.lib;
hlissner = inputs.hlissner-dotfiles.lib;
hm = inputs.home-manager.lib.hm; hm = inputs.home-manager.lib.hm;
}); });
in in

View file

@ -36,4 +36,6 @@ rec {
import ./digga.nix { inherit lib; } import ./digga.nix { inherit lib; }
) // ( ) // (
import ./hosts.nix { inherit lib; } import ./hosts.nix { inherit lib; }
) // (
import ./options.nix { inherit lib; }
)) ))

18
lib/options.nix Normal file
View file

@ -0,0 +1,18 @@
# Taken from https://github.com/hlissner/dotfiles/blob/master/lib/options.nix
{ lib }:
let
inherit (lib) mkOption types;
in
{
mkOpt = type: default:
mkOption { inherit type default; };
mkOpt' = type: default: description:
mkOption { inherit type default description; };
mkBoolOpt = default: mkOption {
inherit default;
type = types.bool;
example = true;
};
}

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.services.ensure; cfg = config.services.ensure;
in in

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.services.soft-serve; cfg = config.services.soft-serve;
mkIfNotNull = v: mkIf (v != null) v; mkIfNotNull = v: mkIf (v != null) v;

View file

@ -1,7 +1,7 @@
# Heavily inspired by hlissner: https://github.com/hlissner/dotfiles/blob/master/modules/options.nix # Heavily inspired by hlissner: https://github.com/hlissner/dotfiles/blob/master/modules/options.nix
{ config, options, lib, home-manager, ... }: { config, options, lib, home-manager, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
mkAliasOpt = mkOpt types.attrs { }; mkAliasOpt = mkOpt types.attrs { };
mkInfoOpt = mkOpt types.str ""; mkInfoOpt = mkOpt types.str "";

View file

@ -1,6 +1,6 @@
{ config, options, lib, ... }: { config, options, lib, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.boot; cfg = config.modules.boot;
opt = options.modules.boot; opt = options.modules.boot;

View file

@ -1,6 +1,6 @@
{ config, options, lib, pkgs, ... }: { config, options, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.desktop.gaming; cfg = config.modules.desktop.gaming;
opt = options.modules.desktop.gaming; opt = options.modules.desktop.gaming;

View file

@ -1,6 +1,6 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.desktop.wm; cfg = config.modules.desktop.wm;
in in

View file

@ -2,7 +2,7 @@
{ options, config, lib, pkgs, ... }: { options, config, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.hardware.audio; cfg = config.modules.hardware.audio;
in in

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, inputs, ... }: { config, lib, pkgs, inputs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.hardware.form; cfg = config.modules.hardware.form;
in in

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.hardware.gpu; cfg = config.modules.hardware.gpu;
any' = any (v: v); any' = any (v: v);

View file

@ -1,6 +1,6 @@
{ config, options, lib, pkgs, ... }: { config, options, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.hardware.peripherals.fprint-sensor; cfg = config.modules.hardware.peripherals.fprint-sensor;
in in

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.hardware.peripherals.printing; cfg = config.modules.hardware.peripherals.printing;
in in

View file

@ -2,7 +2,7 @@
{ options, config, lib, pkgs, ... }: { options, config, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let cfg = config.modules.hardware.peripherals.razer; let cfg = config.modules.hardware.peripherals.razer;
in in
{ {

View file

@ -1,6 +1,6 @@
{ config, lib, private, ... }: { config, lib, private, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.hardware.wireless; cfg = config.modules.hardware.wireless;
in in

View file

@ -1,6 +1,6 @@
{ config, options, lib, ... }: { config, options, lib, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.locale; cfg = config.modules.locale;
opt = options.modules.locale; opt = options.modules.locale;

View file

@ -1,6 +1,6 @@
{ config, options, lib, pkgs, ... }: { config, options, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.services.apcupsd; cfg = config.modules.services.apcupsd;
port = 3551; port = 3551;

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.services.foldingathome; cfg = config.modules.services.foldingathome;
in in

View file

@ -1,6 +1,6 @@
{ config, options, lib, ... }: { config, options, lib, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.services.proxy; cfg = config.modules.services.proxy;
in in

View file

@ -1,6 +1,6 @@
{ config, options, lib, ... }: { config, options, lib, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.software.console; cfg = config.modules.software.console;
opt = options.modules.software.console; opt = options.modules.software.console;

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.software.minipro; cfg = config.modules.software.minipro;
in in

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.software.steam; cfg = config.modules.software.steam;

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
with lib.hlissner; with lib.our;
let let
cfg = config.modules.virtualization; cfg = config.modules.virtualization;
in in

View file

@ -7,7 +7,7 @@ let
secrets = lib.mapAttrs' (n: v: lib.nameValuePair (lib.removeSuffix ".age" n) { file = toFile n; }) filtered; secrets = lib.mapAttrs' (n: v: lib.nameValuePair (lib.removeSuffix ".age" n) { file = toFile n; }) filtered;
in in
{ {
options.modules.secrets.enable = lib.hlissner.mkOpt lib.types.bool true; options.modules.secrets.enable = lib.our.mkOpt lib.types.bool true;
config.age.secrets = lib.mkIf config.modules.secrets.enable secrets; config.age.secrets = lib.mkIf config.modules.secrets.enable secrets;
} }