commit 0b2136d6f8acbf0e7afaedba0730375c2628af0c
parent da4a71b1c1ab00657c5cf5675c9fd1d2ca616745
Author: Vincent Demeester <vincent@sbr.pm>
Date: Fri, 19 Aug 2022 09:50:07 +0000
systems: add wayland modules and some wakasu stuff
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
6 files changed, 207 insertions(+), 54 deletions(-)
diff --git a/flake.lock b/flake.lock
@@ -1,5 +1,21 @@
{
"nodes": {
+ "cachix": {
+ "locked": {
+ "lastModified": 1659446231,
+ "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-21.11",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
@@ -25,11 +41,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
- "lastModified": 1658918399,
- "narHash": "sha256-77OGFLb22D81I17Ualq47BZjDhEiWFwt8VsVS4XWuG4=",
+ "lastModified": 1660732240,
+ "narHash": "sha256-u3/pq8k7t9FHFEtArNinHs8ovY4hkFFuwB+zFX7FfIQ=",
"owner": "nix-community",
"repo": "emacs-overlay",
- "rev": "a12c123fd91e3206e136f5ed6f91b5390845a107",
+ "rev": "8a8ab5655af3e7a741b8230a2c36453622ea330d",
"type": "github"
},
"original": {
@@ -91,6 +107,22 @@
"type": "github"
}
},
+ "flake-compat_3": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1650374568,
+ "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "b4a34015c698c7793d592d66adbab377907a2be8",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
"flake-utils": {
"locked": {
"lastModified": 1642700792,
@@ -129,11 +161,11 @@
},
"flake-utils_2": {
"locked": {
- "lastModified": 1656928814,
- "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
+ "lastModified": 1659877975,
+ "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
+ "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
@@ -144,11 +176,11 @@
},
"flake-utils_3": {
"locked": {
- "lastModified": 1656928814,
- "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
+ "lastModified": 1659877975,
+ "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
+ "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
@@ -159,11 +191,26 @@
},
"flake-utils_4": {
"locked": {
- "lastModified": 1653893745,
- "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
+ "lastModified": 1659877975,
+ "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
+ "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "flake-utils_5": {
+ "locked": {
+ "lastModified": 1659877975,
+ "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
@@ -180,11 +227,11 @@
"utils": "utils_2"
},
"locked": {
- "lastModified": 1658924727,
- "narHash": "sha256-Fhh9FK9CvuCLxG1WkWJPoendDeXKI4gHYTfezo1n2Zg=",
+ "lastModified": 1660574517,
+ "narHash": "sha256-Lp5D2pAPrM3iAc1eeR0iGwz5rM+SYOWzVxI3p17nlrU=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "0e2f7876d2f2ae98a67d89a8bef8c49332aae5af",
+ "rev": "688e5c85b7537f308b82167c8eb4ecfb70a49861",
"type": "github"
},
"original": {
@@ -250,13 +297,32 @@
"type": "github"
}
},
+ "lib-aggregate": {
+ "inputs": {
+ "flake-utils": "flake-utils_5",
+ "nixpkgs-lib": "nixpkgs-lib"
+ },
+ "locked": {
+ "lastModified": 1660478979,
+ "narHash": "sha256-aQadm1JUR/1PpBETyuvEl3tycZU+sDZULfMPg/SPzUc=",
+ "owner": "nix-community",
+ "repo": "lib-aggregate",
+ "rev": "fb6e102dcf215dcf6879e7be4a5a3942207512aa",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "lib-aggregate",
+ "type": "github"
+ }
+ },
"nix-hardware": {
"locked": {
- "lastModified": 1658401027,
- "narHash": "sha256-z/sDfzsFOoWNO9nZGfxDCNjHqXvSVZLDBDSgzr9qDXE=",
+ "lastModified": 1660407119,
+ "narHash": "sha256-04lWO0pDbhAXFdL4v2VzzwgxrZ5IefKn+TmZPiPeKxg=",
"owner": "NixOS",
"repo": "nixos-hardware",
- "rev": "83009edccc2e24afe3d0165ed98b60ff7471a5f8",
+ "rev": "12620020f76b1b5d2b0e6fbbda831ed4f5fe56e1",
"type": "github"
},
"original": {
@@ -267,11 +333,11 @@
},
"nixos-21_11": {
"locked": {
- "lastModified": 1658346836,
- "narHash": "sha256-c9BZZbi0tqCQ4j6CMVDlsut3Q3ET1Fezf+qIslCfkhs=",
+ "lastModified": 1659446231,
+ "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "a1fe662eb26ffc2a036b37c4670392ade632c413",
+ "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
"type": "github"
},
"original": {
@@ -283,11 +349,11 @@
},
"nixos-22_05": {
"locked": {
- "lastModified": 1658777571,
- "narHash": "sha256-gJMDUeaRhi47NxtrfFMIejlV5N3Ra2669w16Ndz2Jo0=",
+ "lastModified": 1660581366,
+ "narHash": "sha256-et+bi9/jlSF/pHx5AYB9ZP2XDdZEQ0vnF7xlvs4503Y=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "f0fa012b649a47e408291e96a15672a4fe925d65",
+ "rev": "3d47bbaa26e7a771059d828eecf3bd8bf28a8b0f",
"type": "github"
},
"original": {
@@ -299,10 +365,12 @@
},
"nixos-hardware": {
"locked": {
- "lastModified": 0,
- "narHash": "sha256-zQyTr2UebTKUh1KLyLtevhHsM8umPK1LfQLGUGjRjiQ=",
- "path": "/nix/store/aqhzrz2k83h3pxid8va5r64szcmjd6n1-source",
- "type": "path"
+ "lastModified": 1660407119,
+ "narHash": "sha256-04lWO0pDbhAXFdL4v2VzzwgxrZ5IefKn+TmZPiPeKxg=",
+ "owner": "NixOS",
+ "repo": "nixos-hardware",
+ "rev": "12620020f76b1b5d2b0e6fbbda831ed4f5fe56e1",
+ "type": "github"
},
"original": {
"id": "nixos-hardware",
@@ -311,11 +379,11 @@
},
"nixos-unstable": {
"locked": {
- "lastModified": 1658737577,
- "narHash": "sha256-xosJ5nJT9HX+b6UWsSX6R+ap4AdZOCrl/r+IKFp2ASQ=",
+ "lastModified": 1660646295,
+ "narHash": "sha256-V4G+egGRc3elXPTr7QLJ7r7yrYed0areIKDiIAlMLC8=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "5a0e0d73b944157328d54c4ded1cf2f0146a86a5",
+ "rev": "762b003329510ea855b4097a37511eb19c7077f0",
"type": "github"
},
"original": {
@@ -334,11 +402,11 @@
]
},
"locked": {
- "lastModified": 1657910528,
- "narHash": "sha256-9hU+CCKwudwLJ8dfrdmk+ilaRpvp/4/wUBM4Gqz8nZk=",
+ "lastModified": 1660574212,
+ "narHash": "sha256-Dd/qBZ5r0OJn9t5KEjJvS+jociaWQKGq9A35QDewgKg=",
"owner": "nix-community",
"repo": "NixOS-WSL",
- "rev": "cc4888fff19ddf81eac53f3760e6798468d55956",
+ "rev": "b199d85cf3095e3bb7bb953afc83540c3141efdd",
"type": "github"
},
"original": {
@@ -365,11 +433,11 @@
},
"nixpkgs-22_05": {
"locked": {
- "lastModified": 1658634393,
- "narHash": "sha256-VW7edeFzA9VU8gZPxPFGpoPsM2AQLYHKhA9H5+OYtno=",
+ "lastModified": 1660410996,
+ "narHash": "sha256-arkfX1YYFmwMyDTCguzoOI4epABC41FGQU4J1/G3/9M=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "2e14bc76ab41c60ba57fd57ff52badaa29d349f5",
+ "rev": "70b6236f3cbc815f2cae8d597418c714cf83d1c8",
"type": "github"
},
"original": {
@@ -379,13 +447,28 @@
"type": "github"
}
},
+ "nixpkgs-lib": {
+ "locked": {
+ "lastModified": 1660438583,
+ "narHash": "sha256-rJUTYxFKlWUJI3njAwEc1pKAVooAViZGJvsgqfh/q/E=",
+ "owner": "nix-community",
+ "repo": "nixpkgs.lib",
+ "rev": "bbd8f7cd87d0b29294ef3072ffdbd61d60f05da4",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "nixpkgs.lib",
+ "type": "github"
+ }
+ },
"nixpkgs-unstable": {
"locked": {
- "lastModified": 1658850041,
- "narHash": "sha256-HA4koSVBPEERWSrH0LVBy28y2FGJnOeUmGDEyeQPmDY=",
+ "lastModified": 1660639432,
+ "narHash": "sha256-2WDiboOCfB0LhvnDVMXOAr8ZLDfm3WdO54CkoDPwN1A=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "3bbb296d9a0088c314ce83038b896753bbe33acb",
+ "rev": "6c6409e965a6c883677be7b9d87a95fab6c3472e",
"type": "github"
},
"original": {
@@ -395,12 +478,37 @@
"type": "github"
}
},
+ "nixpkgs-wayland": {
+ "inputs": {
+ "cachix": "cachix",
+ "flake-compat": "flake-compat_3",
+ "lib-aggregate": "lib-aggregate",
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1660897199,
+ "narHash": "sha256-whrtoGMvYj+O8lticbVP6pH59XKNhtxP/9/zMUpQf8E=",
+ "owner": "nix-community",
+ "repo": "nixpkgs-wayland",
+ "rev": "a361837689a2d1808dd89d94ed14a16fc70577a2",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "nixpkgs-wayland",
+ "type": "github"
+ }
+ },
"nixpkgs_2": {
"locked": {
- "lastModified": 0,
- "narHash": "sha256-mO+23f3SO+fBzEvbxRe6GkSB5Xp43CT2sV8Rs8MYdz8=",
- "path": "/nix/store/10lh597390yji6infh5xdad4wq42y7bg-source",
- "type": "path"
+ "lastModified": 1660639432,
+ "narHash": "sha256-2WDiboOCfB0LhvnDVMXOAr8ZLDfm3WdO54CkoDPwN1A=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "6c6409e965a6c883677be7b9d87a95fab6c3472e",
+ "type": "github"
},
"original": {
"id": "nixpkgs",
@@ -409,11 +517,11 @@
},
"nixpkgs_3": {
"locked": {
- "lastModified": 1658737577,
- "narHash": "sha256-xosJ5nJT9HX+b6UWsSX6R+ap4AdZOCrl/r+IKFp2ASQ=",
+ "lastModified": 1660646295,
+ "narHash": "sha256-V4G+egGRc3elXPTr7QLJ7r7yrYed0areIKDiIAlMLC8=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "5a0e0d73b944157328d54c4ded1cf2f0146a86a5",
+ "rev": "762b003329510ea855b4097a37511eb19c7077f0",
"type": "github"
},
"original": {
@@ -425,11 +533,11 @@
},
"nur": {
"locked": {
- "lastModified": 1658917434,
- "narHash": "sha256-AH1xtUA1hT+r+mbDhD/6qbqkPabFWYrmOfpgbsyFfjk=",
+ "lastModified": 1660735815,
+ "narHash": "sha256-oXXOqI4T55BKk3EKOgCHNW7eQmuRIfyuN7X2UyAnw6s=",
"owner": "nix-community",
"repo": "NUR",
- "rev": "864b70d110b86852cd177ffcaf0e68ba9a53f5b2",
+ "rev": "4a5e4c8f0ef1c062f19489e6df5a9d9b7adb8e11",
"type": "github"
},
"original": {
@@ -458,6 +566,7 @@
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable",
+ "nixpkgs-wayland": "nixpkgs-wayland",
"nur": "nur",
"sops-nix": "sops-nix"
}
@@ -470,11 +579,11 @@
"nixpkgs-22_05": "nixpkgs-22_05"
},
"locked": {
- "lastModified": 1658635258,
- "narHash": "sha256-EC8y3Rg+l9IzIUdOaFSA0LMdDipTRoweg1Y2EL8XhMc=",
+ "lastModified": 1660540143,
+ "narHash": "sha256-oqeOdJH0ey/UyG1G31BV6Lk8qjI+VKboTpTJB317OhM=",
"owner": "Mic92",
"repo": "sops-nix",
- "rev": "d7f8cf1b77ebe5f287884f17b1ee4cc4f48bad1d",
+ "rev": "773365016f5202a199f5aff72cac75c64add4528",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
@@ -19,6 +19,7 @@
home-manager-21_11 = { type = "github"; owner = "nix-community"; repo = "home-manager"; ref = "release-21.11"; inputs.nixpkgs.follows = "nixos-21_11"; };
home-manager-22_05 = { type = "github"; owner = "nix-community"; repo = "home-manager"; ref = "release-22.05"; inputs.nixpkgs.follows = "nixos-22_05"; };
impermanence = { type = "github"; owner = "nix-community"; repo = "impermanence"; };
+ nixpkgs-wayland = { type = "github"; owner = "nix-community"; repo = "nixpkgs-wayland"; inputs.nixpkgs.follows = "nixpkgs"; };
nur.url = "github:nix-community/NUR";
emacs-overlay.url = "github:nix-community/emacs-overlay";
@@ -84,6 +85,21 @@
home-manager.nixosModules.home-manager
./systems/modules/profiles/docker.nix
];
+ wayland = { pkgs, config, ... }: {
+ config = {
+ nix = {
+ settings = {
+ # add binary caches
+ trusted-public-keys = [
+ "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
+ ];
+ substituters = [ "https://nixpkgs-wayland.cachix.org" ];
+ };
+ };
+
+ nixpkgs.overlays = [ inputs.nixpkgs-wayland.overlay ];
+ };
+ };
in
flake-utils-plus.lib.mkFlake {
inherit self inputs nixosModules;
@@ -163,6 +179,7 @@
};
wakasu = {
modules = unstableModules ++ [
+ wayland
nixos-hardware.nixosModules.lenovo-thinkpad-x1-9th-gen
./systems/hosts/wakasu.nix
];
diff --git a/systems/hosts/wakasu.nix b/systems/hosts/wakasu.nix
@@ -81,7 +81,7 @@ in
modules = {
hardware = {
yubikey.enable = true;
- #laptop.enable = true;
+ laptop.enable = true;
};
};
diff --git a/systems/modules/hardware/default.nix b/systems/modules/hardware/default.nix
@@ -3,6 +3,8 @@
./audio.nix
./bluetooth.nix
./yubikey.nix
+ ./laptop.nix
+ ./server.nix
# remove "nixos"
./sane-extra-config.nixos.nix
];
diff --git a/systems/modules/hardware/laptop.nix b/systems/modules/hardware/laptop.nix
@@ -0,0 +1,13 @@
+{ config, lib, pkgs, ... }:
+let
+ inherit (lib) mkEnableOption mkIf mkOption types;
+ cfg = config.modules.hardware.laptop;
+in
+{
+ options = {
+ modules.hardware.laptop = {
+ enable = mkEnableOption "Enable laptop profile";
+ };
+ };
+ config = mkIf cfg.enable { };
+}
diff --git a/systems/modules/hardware/server.nix b/systems/modules/hardware/server.nix
@@ -0,0 +1,12 @@
+{ config, lib, pkgs, ... }:
+let
+ inherit (lib) mkEnableOption mkIf mkOption types;
+ cfg = config.modules.hardware.server;
+in
+{
+ options = {
+ modules.hardware.server = {
+ enable = mkEnableOption "Enable server profile";
+ };
+ };
+}