Commit a802a5d3c33f

Vincent Demeester <vincent@sbr.pm>
2023-10-19 18:19:57
flake: clean flake and some unused files
No more flake-utils, flake-utils-plus or flake-parts. I am only relying on basic, normal flake. This is all I need for now as I only rely on `nixosConfiguration`. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 2fd40b7
nix/nixosSystem.nix
@@ -0,0 +1,33 @@
+{ nixpkgs
+, home-manager
+, system
+, specialArgs
+, nixos-modules
+,
+}:
+let
+  username = specialArgs.username;
+in
+nixpkgs.lib.nixosSystem {
+  inherit system specialArgs;
+  modules =
+    nixos-modules
+    // [
+      {
+        # make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
+        nix.registry.nixpkgs.flake = nixpkgs;
+
+        # make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
+        environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
+        nix.nixPath = [ "/etc/nix/inputs" ];
+      }
+
+      home-manager.nixosModules.home-manager
+      {
+        home-manager.useGlobalPkgs = true;
+        home-manager.useUserPackages = true;
+
+        home-manager.extraSpecialArgs = specialArgs;
+      }
+    ];
+}
systems/modules/default.nix
@@ -1,12 +0,0 @@
-{
-  imports = [
-    ./core
-    ./hardware
-    ./profiles
-    ./programs
-    ./services
-    ./virtualisation
-    "${(import ../../nix/sources.nix).sops-nix}/modules/sops"
-  ];
-  sops.defaultSopsFile = ../../secrets/secrets.yaml;
-}
systems/modules/default.stable.nix
@@ -1,12 +0,0 @@
-{
-  imports = [
-    ./core
-    ./hardware
-    ./profiles/default.stable.nix
-    ./programs
-    ./services
-    ./virtualisation
-    "${(import ../../nix/sources.nix).sops-nix}/modules/sops"
-  ];
-  sops.defaultSopsFile = ../../secrets/secrets.yaml;
-}
flake.lock
@@ -2,9 +2,7 @@
   "nodes": {
     "chapeau-rouge": {
       "inputs": {
-        "flake-utils": [
-          "flake-utils"
-        ],
+        "flake-utils": "flake-utils",
         "nixpkgs": [
           "nixpkgs"
         ],
@@ -28,7 +26,9 @@
       "inputs": {
         "flake-compat": "flake-compat_2",
         "nix": "nix",
-        "nixpkgs": "nixpkgs_2",
+        "nixpkgs": [
+          "nixpkgs"
+        ],
         "pre-commit-hooks": "pre-commit-hooks_2"
       },
       "locked": {
@@ -46,29 +46,10 @@
         "type": "github"
       }
     },
-    "devshell": {
-      "inputs": {
-        "nixpkgs": "nixpkgs_3",
-        "systems": "systems_2"
-      },
-      "locked": {
-        "lastModified": 1695973661,
-        "narHash": "sha256-BP2H4c42GThPIhERtTpV1yCtwQHYHEKdRu7pjrmQAwo=",
-        "owner": "numtide",
-        "repo": "devshell",
-        "rev": "cd4e2fda3150dd2f689caeac07b7f47df5197c31",
-        "type": "github"
-      },
-      "original": {
-        "owner": "numtide",
-        "repo": "devshell",
-        "type": "github"
-      }
-    },
     "emacs-overlay": {
       "inputs": {
-        "flake-utils": "flake-utils_3",
-        "nixpkgs": "nixpkgs_4",
+        "flake-utils": "flake-utils_4",
+        "nixpkgs": "nixpkgs_2",
         "nixpkgs-stable": "nixpkgs-stable_3"
       },
       "locked": {
@@ -232,6 +213,24 @@
       "inputs": {
         "systems": "systems"
       },
+      "locked": {
+        "lastModified": 1694529238,
+        "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
+    "flake-utils_2": {
+      "inputs": {
+        "systems": "systems_2"
+      },
       "locked": {
         "lastModified": 1685518550,
         "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
@@ -246,28 +245,7 @@
         "type": "github"
       }
     },
-    "flake-utils-plus": {
-      "inputs": {
-        "flake-utils": [
-          "flake-utils"
-        ]
-      },
-      "locked": {
-        "lastModified": 1638172912,
-        "narHash": "sha256-jxhQGNEsZTdop/Br3JPS+xmBf6t9cIWRzVZFxbT76Rw=",
-        "owner": "gytis-ivaskevicius",
-        "repo": "flake-utils-plus",
-        "rev": "166d6ebd9f0de03afc98060ac92cba9c71cfe550",
-        "type": "github"
-      },
-      "original": {
-        "owner": "gytis-ivaskevicius",
-        "ref": "v1.3.1",
-        "repo": "flake-utils-plus",
-        "type": "github"
-      }
-    },
-    "flake-utils_2": {
+    "flake-utils_3": {
       "locked": {
         "lastModified": 1667395993,
         "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
@@ -282,27 +260,9 @@
         "type": "github"
       }
     },
-    "flake-utils_3": {
-      "inputs": {
-        "systems": "systems_3"
-      },
-      "locked": {
-        "lastModified": 1694529238,
-        "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
-        "owner": "numtide",
-        "repo": "flake-utils",
-        "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
-        "type": "github"
-      },
-      "original": {
-        "owner": "numtide",
-        "repo": "flake-utils",
-        "type": "github"
-      }
-    },
     "flake-utils_4": {
       "inputs": {
-        "systems": "systems_4"
+        "systems": "systems_3"
       },
       "locked": {
         "lastModified": 1694529238,
@@ -421,7 +381,7 @@
     "home-manager-23_05": {
       "inputs": {
         "nixpkgs": [
-          "nixos-23_05"
+          "nixpkgs-23_05"
         ]
       },
       "locked": {
@@ -439,6 +399,55 @@
         "type": "github"
       }
     },
+    "hyprland": {
+      "inputs": {
+        "hyprland-protocols": "hyprland-protocols",
+        "nixpkgs": [
+          "nixpkgs"
+        ],
+        "systems": "systems_4",
+        "wlroots": "wlroots",
+        "xdph": "xdph"
+      },
+      "locked": {
+        "lastModified": 1697727899,
+        "narHash": "sha256-mQFa2+JQTyk0BCxmPGTMNxlchplbVLtIOyH2zASiTlA=",
+        "owner": "hyprwm",
+        "repo": "Hyprland",
+        "rev": "386708563c3d9d85ffd60b4eeb6c767d29f948db",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hyprwm",
+        "repo": "Hyprland",
+        "type": "github"
+      }
+    },
+    "hyprland-protocols": {
+      "inputs": {
+        "nixpkgs": [
+          "hyprland",
+          "nixpkgs"
+        ],
+        "systems": [
+          "hyprland",
+          "systems"
+        ]
+      },
+      "locked": {
+        "lastModified": 1691753796,
+        "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
+        "owner": "hyprwm",
+        "repo": "hyprland-protocols",
+        "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hyprwm",
+        "repo": "hyprland-protocols",
+        "type": "github"
+      }
+    },
     "impermanence": {
       "locked": {
         "lastModified": 1697303681,
@@ -516,7 +525,7 @@
     "nix-eval-jobs": {
       "inputs": {
         "flake-parts": "flake-parts_2",
-        "nixpkgs": "nixpkgs_6",
+        "nixpkgs": "nixpkgs_4",
         "treefmt-nix": "treefmt-nix"
       },
       "locked": {
@@ -533,7 +542,7 @@
         "type": "github"
       }
     },
-    "nix-hardware": {
+    "nixos-hardware": {
       "locked": {
         "lastModified": 1697100850,
         "narHash": "sha256-qSAzJVzNRIo+r3kBjL8TcpJctcgcHlnZyqdzpWgtg0M=",
@@ -548,50 +557,6 @@
         "type": "github"
       }
     },
-    "nixos-23_05": {
-      "locked": {
-        "lastModified": 1697226376,
-        "narHash": "sha256-cumLLb1QOUtWieUnLGqo+ylNt3+fU8Lcv5Zl+tYbRUE=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "898cb2064b6e98b8c5499f37e81adbdf2925f7c5",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixos-23.05",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "nixos-hardware": {
-      "locked": {
-        "lastModified": 0,
-        "narHash": "sha256-04lWO0pDbhAXFdL4v2VzzwgxrZ5IefKn+TmZPiPeKxg=",
-        "path": "/nix/store/y6sg4w3lfqnck6kp1ma9979mi6w3ywzc-source",
-        "type": "path"
-      },
-      "original": {
-        "id": "nixos-hardware",
-        "type": "indirect"
-      }
-    },
-    "nixos-unstable": {
-      "locked": {
-        "lastModified": 1697059129,
-        "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixos-unstable",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
     "nixos-wsl": {
       "inputs": {
         "flake-compat": "flake-compat_4",
@@ -630,6 +595,22 @@
         "type": "github"
       }
     },
+    "nixpkgs-23_05": {
+      "locked": {
+        "lastModified": 1697583813,
+        "narHash": "sha256-SRXK2EBMZHlOAs/5bjphhX9XnIKR6peTV6i7yoL6/Lg=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "b5f8ec6be261dfc44c3b56b220e2793d1b61512b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-23.05",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
     "nixpkgs-lib": {
       "locked": {
         "lastModified": 1697331025,
@@ -725,22 +706,6 @@
         "type": "github"
       }
     },
-    "nixpkgs-unstable": {
-      "locked": {
-        "lastModified": 1697379843,
-        "narHash": "sha256-RcnGuJgC2K/UpTy+d32piEoBXq2M+nVFzM3ah/ZdJzg=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "12bdeb01ff9e2d3917e6a44037ed7df6e6c3df9d",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixpkgs-unstable",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
     "nixpkgs-wayland": {
       "inputs": {
         "flake-compat": "flake-compat_5",
@@ -766,69 +731,37 @@
     },
     "nixpkgs_2": {
       "locked": {
-        "lastModified": 1678875422,
-        "narHash": "sha256-T3o6NcQPwXjxJMn2shz86Chch4ljXgZn746c2caGxd8=",
+        "lastModified": 1697059129,
+        "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "126f49a01de5b7e35a43fd43f891ecf6d3a51459",
+        "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593",
         "type": "github"
       },
       "original": {
         "owner": "NixOS",
-        "ref": "nixpkgs-unstable",
+        "ref": "nixos-unstable",
         "repo": "nixpkgs",
         "type": "github"
       }
     },
     "nixpkgs_3": {
       "locked": {
-        "lastModified": 1677383253,
-        "narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
+        "lastModified": 1697059129,
+        "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
+        "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593",
         "type": "github"
       },
       "original": {
         "owner": "NixOS",
-        "ref": "nixpkgs-unstable",
+        "ref": "nixos-unstable",
         "repo": "nixpkgs",
         "type": "github"
       }
     },
     "nixpkgs_4": {
-      "locked": {
-        "lastModified": 1697059129,
-        "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixos-unstable",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "nixpkgs_5": {
-      "locked": {
-        "lastModified": 1697059129,
-        "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixos-unstable",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "nixpkgs_6": {
       "locked": {
         "lastModified": 1697417052,
         "narHash": "sha256-QyFpNZ28H0IoWhbGxD4j2h3aYwap2l2rSWyoFue95sM=",
@@ -844,25 +777,10 @@
         "type": "github"
       }
     },
-    "nur": {
-      "locked": {
-        "lastModified": 1697444180,
-        "narHash": "sha256-cJ4/BhnVbK4AM7RJIvVbi+zQ7WGG6lEeLQqFGfCwe48=",
-        "owner": "nix-community",
-        "repo": "NUR",
-        "rev": "25c81e8f42731db9ae2a6934f9bc7e969ce10305",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nix-community",
-        "repo": "NUR",
-        "type": "github"
-      }
-    },
     "pre-commit-hooks": {
       "inputs": {
         "flake-compat": "flake-compat",
-        "flake-utils": "flake-utils",
+        "flake-utils": "flake-utils_2",
         "gitignore": "gitignore",
         "nixpkgs": "nixpkgs",
         "nixpkgs-stable": "nixpkgs-stable"
@@ -887,7 +805,7 @@
           "devenv",
           "flake-compat"
         ],
-        "flake-utils": "flake-utils_2",
+        "flake-utils": "flake-utils_3",
         "gitignore": "gitignore_2",
         "nixpkgs": [
           "devenv",
@@ -913,24 +831,18 @@
       "inputs": {
         "chapeau-rouge": "chapeau-rouge",
         "devenv": "devenv",
-        "devshell": "devshell",
         "emacs-overlay": "emacs-overlay",
         "envfs": "envfs",
         "flake-compat": "flake-compat_3",
-        "flake-utils": "flake-utils_4",
-        "flake-utils-plus": "flake-utils-plus",
         "home-manager": "home-manager",
         "home-manager-23_05": "home-manager-23_05",
+        "hyprland": "hyprland",
         "impermanence": "impermanence",
-        "nix-hardware": "nix-hardware",
-        "nixos-23_05": "nixos-23_05",
         "nixos-hardware": "nixos-hardware",
-        "nixos-unstable": "nixos-unstable",
         "nixos-wsl": "nixos-wsl",
-        "nixpkgs": "nixpkgs_5",
-        "nixpkgs-unstable": "nixpkgs-unstable",
+        "nixpkgs": "nixpkgs_3",
+        "nixpkgs-23_05": "nixpkgs-23_05",
         "nixpkgs-wayland": "nixpkgs-wayland",
-        "nur": "nur",
         "sops-nix": "sops-nix"
       }
     },
@@ -1002,16 +914,16 @@
     },
     "systems_4": {
       "locked": {
-        "lastModified": 1681028828,
-        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "lastModified": 1689347949,
+        "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
         "owner": "nix-systems",
-        "repo": "default",
-        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "repo": "default-linux",
+        "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
         "type": "github"
       },
       "original": {
         "owner": "nix-systems",
-        "repo": "default",
+        "repo": "default-linux",
         "type": "github"
       }
     },
@@ -1066,6 +978,54 @@
         "repo": "treefmt-nix",
         "type": "github"
       }
+    },
+    "wlroots": {
+      "flake": false,
+      "locked": {
+        "host": "gitlab.freedesktop.org",
+        "lastModified": 1696410538,
+        "narHash": "sha256-ecDhdYLXWHsxMv+EWG36mCNDvzRbu9qfjH7dLxL7aGM=",
+        "owner": "wlroots",
+        "repo": "wlroots",
+        "rev": "3406c1b17a4a7e6d4e2a7d9c1176affa72bce1bc",
+        "type": "gitlab"
+      },
+      "original": {
+        "host": "gitlab.freedesktop.org",
+        "owner": "wlroots",
+        "repo": "wlroots",
+        "rev": "3406c1b17a4a7e6d4e2a7d9c1176affa72bce1bc",
+        "type": "gitlab"
+      }
+    },
+    "xdph": {
+      "inputs": {
+        "hyprland-protocols": [
+          "hyprland",
+          "hyprland-protocols"
+        ],
+        "nixpkgs": [
+          "hyprland",
+          "nixpkgs"
+        ],
+        "systems": [
+          "hyprland",
+          "systems"
+        ]
+      },
+      "locked": {
+        "lastModified": 1694628480,
+        "narHash": "sha256-Qg9hstRw0pvjGu5hStkr2UX1D73RYcQ9Ns/KnZMIm9w=",
+        "owner": "hyprwm",
+        "repo": "xdg-desktop-portal-hyprland",
+        "rev": "8f45a6435069b9e24ebd3160eda736d7a391cbf2",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hyprwm",
+        "repo": "xdg-desktop-portal-hyprland",
+        "type": "github"
+      }
     }
   },
   "root": "root",
flake.nix
@@ -4,25 +4,28 @@
   inputs = {
     # Flake for compatibility with non-flake commands
     flake-compat = { type = "github"; owner = "edolstra"; repo = "flake-compat"; flake = false; };
-    flake-utils = { type = "github"; owner = "numtide"; repo = "flake-utils"; };
-    flake-utils-plus = {
-      type = "github";
-      owner = "gytis-ivaskevicius";
-      repo = "flake-utils-plus";
-      ref = "v1.3.1";
-      inputs.flake-utils.follows = "flake-utils";
+
+    devenv = {
+      url = "github:cachix/devenv/latest";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+    hyprland = {
+      url = "github:hyprwm/Hyprland";
+      inputs.nixpkgs.follows = "nixpkgs";
     };
-    devshell = { type = "github"; owner = "numtide"; repo = "devshell"; };
-    devenv.url = "github:cachix/devenv/latest";
 
 
-    # Flake Dependencies
+    # nixpkgs
+    nixpkgs = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixos-unstable"; };
+    nixpkgs-23_05 = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixos-23.05"; };
+    # Home Manager
     home-manager = { type = "github"; owner = "nix-community"; repo = "home-manager"; inputs.nixpkgs.follows = "nixpkgs"; };
-    home-manager-23_05 = { type = "github"; owner = "nix-community"; repo = "home-manager"; ref = "release-23.05"; inputs.nixpkgs.follows = "nixos-23_05"; };
+    home-manager-23_05 = { type = "github"; owner = "nix-community"; repo = "home-manager"; ref = "release-23.05"; inputs.nixpkgs.follows = "nixpkgs-23_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";
 
     sops-nix = {
@@ -40,58 +43,19 @@
 
     # WSL
     nixos-wsl = { type = "github"; owner = "nix-community"; repo = "NixOS-WSL"; inputs.nixpkgs.follows = "nixpkgs"; };
-    nix-hardware = { type = "github"; owner = "NixOS"; "repo" = "nixos-hardware"; };
+    nixos-hardware = { type = "github"; owner = "NixOS"; "repo" = "nixos-hardware"; };
 
     # Red Hat
     chapeau-rouge = {
       type = "github";
       owner = "vdemeester";
       repo = "chapeau-rouge";
-      inputs.flake-utils.follows = "flake-utils";
       inputs.nixpkgs.follows = "nixpkgs";
     };
-
-    # Channels
-    # FIXME: is it needed or should I just alias nixos-unstable instead
-    nixpkgs = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixos-unstable"; };
-    nixos-23_05 = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixos-23.05"; };
-    nixos-unstable = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixos-unstable"; };
-    nixpkgs-unstable = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixpkgs-unstable"; };
   };
 
-  outputs =
-    { self
-    , nixpkgs
-    , flake-utils-plus
-    , flake-utils
-    , home-manager
-    , home-manager-23_05
-    , emacs-overlay
-    , chapeau-rouge
-    , nur
-    , sops-nix
-    , envfs
-    , nixos-wsl
-    , nixos-hardware
-    , devshell
-    , devenv
-    , ...
-    } @ inputs:
+  outputs = { self, ... } @ inputs:
     let
-      mkApp = flake-utils.lib.mkApp;
-
-      nixosModules = flake-utils-plus.lib.exportModules [
-        ./systems/modules/virtualisation/buildkit.nix
-      ];
-
-      stableModules_23_05 = [
-        home-manager-23_05.nixosModules.home-manager
-        ./systems/modules/profiles/docker.nix
-      ];
-      unstableModules = [
-        home-manager.nixosModules.home-manager
-        ./systems/modules/profiles/docker.nix
-      ];
       wayland = { pkgs, config, ... }: {
         config = {
           nix = {
@@ -107,173 +71,122 @@
           nixpkgs.overlays = [ inputs.nixpkgs-wayland.overlay ];
         };
       };
-    in
-    flake-utils-plus.lib.mkFlake {
-      inherit self inputs nixosModules;
-
-      supportedSystems = [ "aarch64-linux" "x86_64-linux" ];
-      channels-config.allowUnfree = true;
-
-      sharedOverlays = [
-        (import ./nix/overlays).tekton
-        (import ./nix/overlays/sbr.nix)
-        emacs-overlay.overlay
-        nur.overlay
-        devshell.overlays.default
-        chapeau-rouge.overlays.openshift
-        (_: prev: {
-          inherit (devenv.packages.${prev.system}) devenv;
-        })
+      stableModules = [
+        inputs.home-manager-23_05.nixosModules.home-manager
       ];
+      unstableModules = [
+        inputs.home-manager.nixosModules.home-manager
+      ];
+      commonModules = [
+        {
+          config.nixpkgs.overlays = [
+            (import ./nix/overlays).tekton
+            (import ./nix/overlays/sbr.nix)
+            inputs.emacs-overlay.overlay
+            # inputs.nur.overlay
+            # inputs.devshell.overlays.default
+            inputs.chapeau-rouge.overlays.openshift
+            (_: prev: {
+              inherit (inputs.devenv.packages.${prev.system}) devenv;
+            })
+          ];
+        }
+        ./systems/modules/core/default.nix
+        ./systems/modules/shell/default.nix
+        ./systems/modules/desktop/default.nix
+        ./systems/modules/dev/default.nix
+        ./systems/modules/editors/default.nix
+        ./systems/modules/hardware/default.nix
+        ./systems/modules/profiles/default.flake.nix # TODO: rename
+        ./systems/modules/virtualisation/default.nix
+        ./systems/modules/virtualisation/buildkit.nix
+        ./systems/modules/services/default.nix
+        # FIXME: migrate this to elsewhere, or at least split it
+        # Profiles probably need to go away
+        ./systems/modules/profiles/base.nix
+        ./systems/modules/profiles/builder.nix
+        ./systems/modules/profiles/desktop.nix
+        ./systems/modules/profiles/dev.nix
+        ./systems/modules/profiles/dns.nix
+        ./systems/modules/profiles/docker.nix
+        ./systems/modules/profiles/git.nix
+        ./systems/modules/profiles/gnome.nix
+        ./systems/modules/profiles/home.nix
+        ./systems/modules/profiles/i18n.nix
+        ./systems/modules/profiles/i3.nix
+        ./systems/modules/profiles/ipfs.nix
+        ./systems/modules/profiles/kubernetes.nix
+        ./systems/modules/profiles/laptop.nix
+        ./systems/modules/profiles/mail.nix
+        ./systems/modules/profiles/printing.nix
+        ./systems/modules/profiles/qemu.nix
+        ./systems/modules/profiles/redhat.nix
+        ./systems/modules/profiles/scanning.nix
+        ./systems/modules/profiles/virtualization.nix
+        ./systems/modules/profiles/wireguard.server.nix
+        ./systems/modules/profiles/zsh.nix
+        inputs.sops-nix.nixosModules.sops
+        inputs.envfs.nixosModules.envfs
+        {
+          # config.nix.generateRegistryFromInputs = true;
+          config.home-manager.useGlobalPkgs = true;
+          config.home-manager.useUserPackages = true;
+          # Import custom home-manager modules (NixOS)
+          config.home-manager.sharedModules = import ./users/modules/modules.nix;
+          # Default SopsFile
+          config.sops.defaultSopsFile = ./secrets/secrets.yaml;
+        }
+      ];
+    in
+    {
+      nixosConfigurations =
+        {
+          # Work laptop (unstable)
+          wakasu = inputs.nixpkgs.lib.nixosSystem {
+            system = "x86_64-linux";
+            modules = commonModules ++ unstableModules ++ [
+              wayland
+              inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-9th-gen
+              ./systems/hosts/wakasu.nix
+            ];
+          };
+          # Work workstation (unstable)
+          aomi = inputs.nixpkgs.lib.nixosSystem {
+            system = "x86_64-linux";
+            modules = commonModules ++ unstableModules ++ [
+              inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1-gen3
+              inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
+              ./systems/hosts/aomi.nix
+            ];
+          };
+          # Servers (stable)
+          shikoku = inputs.nixpkgs-23_05.lib.nixosSystem {
+            system = "x86_64-linux";
+            modules = commonModules ++ stableModules ++ [
+              ./systems/hosts/shikoku.nix
+            ];
+          };
+          sakhalin = inputs.nixpkgs-23_05.lib.nixosSystem {
+            system = "x86_64-linux";
+            modules = commonModules ++ stableModules ++ [
+              inputs.nixos-hardware.nixosModules.common-pc-ssd
+              ./systems/hosts/sakhalin.nix
+            ];
+          };
+          kerkouane = inputs.nixpkgs-23_05.lib.nixosSystem {
+            system = "x86_64-linux";
+            modules = commonModules ++ stableModules ++ [
+              ./systems/modules/services/govanityurl.nix
+              ./systems/hosts/kerkouane.nix
+            ];
+          };
+        };
 
-      hostDefaults = {
-        system = "x86_64-linux";
-        channelName = "nixos-unstable";
-        extraArgs = {
-          # nixos/profiles/core.nix requires self parameter
-          inherit self;
-        };
-        modules = with nixosModules; [
-          { nix.generateRegistryFromInputs = true; }
-          # Exported modules
-          buildkit
-          # Common modules
-          ./systems/modules/core/default.nix
-          ./systems/modules/shell/default.nix
-          ./systems/modules/desktop/default.nix
-          ./systems/modules/dev/default.nix
-          ./systems/modules/editors/default.nix
-          ./systems/modules/hardware/default.nix
-          ./systems/modules/profiles/default.flake.nix # TODO: rename
-          ./systems/modules/virtualisation/default.nix
-          ./systems/modules/services/default.nix
-          # ./systems/modules/hardware/sane-extra-config.nixos.nix
-          # FIXME: migrate this to elsewhere, or at least split it
-          # Profiles probably need to go away
-          ./systems/modules/profiles/base.nix
-          ./systems/modules/profiles/builder.nix
-          ./systems/modules/profiles/desktop.nix
-          ./systems/modules/profiles/dev.nix
-          ./systems/modules/profiles/dns.nix
-          ./systems/modules/profiles/git.nix
-          ./systems/modules/profiles/gnome.nix
-          ./systems/modules/profiles/home.nix
-          ./systems/modules/profiles/i18n.nix
-          ./systems/modules/profiles/i3.nix
-          ./systems/modules/profiles/ipfs.nix
-          ./systems/modules/profiles/kubernetes.nix
-          ./systems/modules/profiles/laptop.nix
-          ./systems/modules/profiles/mail.nix
-          ./systems/modules/profiles/printing.nix
-          ./systems/modules/profiles/qemu.nix
-          ./systems/modules/profiles/redhat.nix
-          ./systems/modules/profiles/scanning.nix
-          ./systems/modules/profiles/virtualization.nix
-          ./systems/modules/profiles/wireguard.server.nix
-          ./systems/modules/profiles/zsh.nix
-          sops-nix.nixosModules.sops
-          envfs.nixosModules.envfs
-          {
-            config.nix.generateRegistryFromInputs = true;
-            config.home-manager.useGlobalPkgs = true;
-            config.home-manager.useUserPackages = true;
-            # Import custom home-manager modules (NixOS)
-            config.home-manager.sharedModules = import ./users/modules/modules.nix;
-            # Default SopsFile
-            config.sops.defaultSopsFile = ./secrets/secrets.yaml;
-          }
-        ];
-      };
-
-      hosts = {
-        # Main laptop
-        naruhodo = {
-          modules = unstableModules ++ [
-            nixos-hardware.nixosModules.lenovo-thinkpad-t480s
-            ./systems/hosts/naruhodo.nix
-          ];
-        };
-        wakasu = {
-          modules = unstableModules ++ [
-            wayland
-            nixos-hardware.nixosModules.lenovo-thinkpad-x1-9th-gen
-            ./systems/hosts/wakasu.nix
-          ];
-        };
-        # WSL setup
-        # FIXME okinawa doesn't have openssh
-        okinawa = {
-          modules = unstableModules ++ [
-            nixos-wsl.nixosModules.wsl
-            ./systems/hosts/okinawa.nix
-          ];
-        };
-        # Work "workstation"
-        aomi = {
-          modules = unstableModules ++ [
-            nixos-hardware.nixosModules.lenovo-thinkpad-p1-gen3
-            nixos-hardware.nixosModules.common-pc-laptop-ssd
-            ./systems/hosts/aomi.nix
-          ];
-        };
-        # Servers
-        shikoku = {
-          channelName = "nixos-23_05";
-          modules = stableModules_23_05 ++ [
-            ./systems/hosts/shikoku.nix
-          ];
-        };
-        sakhalin = {
-          channelName = "nixos-23_05";
-          modules = stableModules_23_05 ++ [
-            nixos-hardware.nixosModules.common-pc-ssd
-            ./systems/hosts/sakhalin.nix
-          ];
-        };
-        kerkouane = {
-          channelName = "nixos-23_05";
-          modules = stableModules_23_05 ++ [
-            ./systems/modules/services/govanityurl.nix
-            ./systems/hosts/kerkouane.nix
-          ];
-        };
-      };
-
-      # checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
+      # TODO: expose some packages ?
+      # This is probably not gonna happen, instead I should move any internal package here outside, in their
+      # own repository and flake. If they are useful upstream.
 
       overlays = import ./nix/overlays;
-      outputsBuilder = channels:
-        let
-          pkgs = channels.nixpkgs;
-        in
-        {
-          # overlays = import ./nix/overlays;
-
-          packages = with channels.nixpkgs; {
-            inherit
-              bekind
-              tkn
-              tkn_0_23
-              tkn_0_22
-              tkn-pac
-              tkn-pac_0_8
-              tkn-pac_0_7
-              tkn-pac_0_6
-              tkn-local
-              tkn-local_0_4
-              tkn-local_0_3
-              ;
-          };
-
-          # `nix develop`
-          devShells =
-            let
-              ls = builtins.readDir ./shells;
-              files = builtins.filter (name: ls.${name} == "regular") (builtins.attrNames ls);
-              shellNames = builtins.map (filename: builtins.head (builtins.split "\\." filename)) files;
-              nameToValue = name: import (./shells + "/${name}.nix") { inherit pkgs inputs; };
-            in
-            builtins.listToAttrs (builtins.map (name: { inherit name; value = nameToValue name; }) shellNames);
-        };
     };
+
 }