summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2021-03-07 15:11:56 -0500
committerKjetil Orbekk <kj@orbekk.com>2021-03-07 15:11:56 -0500
commit78529ae2641e8645ee3459753819d0ecff655d86 (patch)
tree03f2f8e25ad0decd0f6dcd0a65664a8f7a90796a /flake.nix
parent46e1d2a1552d4aaad676faf49cb0582515d62c86 (diff)
Refactor configs into modules
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index d94478d..978b184 100644
--- a/flake.nix
+++ b/flake.nix
@@ -32,6 +32,16 @@
in
{
+ nixosModules = [
+ pkgs-module
+ ./modules/common.nix
+ ./modules/desktop.nix
+ ./modules/gaming.nix
+ ./modules/thinkpad.nix
+ ./modules/users.nix
+ ./modules/yubikey.nix
+ ];
+
nixosConfigurations = let
mkConfig = { hostName
, module ? (./. + "/machines/${hostName}.nix")
@@ -41,6 +51,7 @@
inherit system;
modules =
+ self.nixosModules ++
[
pkgs-module
module
@@ -50,7 +61,7 @@
# of this flake.
system.configurationRevision =
let
- lastModified = final.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101");
+ lastModified = pkgs.lib.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101");
in
"${lastModified}.${self.shortRev or "dirty"}";