Commit f7ec3a3c9055
Changed files (4)
systems/hosts/naruhodo.nix
@@ -22,7 +22,7 @@ in
imports = [
../hardware/thinkpad-t480s.nix
# (import ../../nix).home-manager
- ../modules
+ # ../modules
# (import ../../users).vincent
(import ../../users).root
];
systems/modules/default.flake.nix
@@ -0,0 +1,11 @@
+{
+ imports = [
+ ./core
+ ./hardware
+ ./profiles
+ ./programs
+ ./services
+ ./virtualisation
+ ];
+ sops.defaultSopsFile = ../../secrets/secrets.yaml;
+}
flake.lock
@@ -58,6 +58,27 @@
"type": "github"
}
},
+ "envfs": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "utils": "utils"
+ },
+ "locked": {
+ "lastModified": 1646734227,
+ "narHash": "sha256-fJ7glrf7sWHRMm7L8cBNWXQdoekOVJ699xPJqJxWsDw=",
+ "owner": "Mic92",
+ "repo": "envfs",
+ "rev": "b0f6c7e4906e9ac6f747a8d991fa8bb58e68f7f4",
+ "type": "github"
+ },
+ "original": {
+ "owner": "Mic92",
+ "repo": "envfs",
+ "type": "github"
+ }
+ },
"flake-compat": {
"flake": false,
"locked": {
@@ -297,6 +318,7 @@
"deploy-rs": "deploy-rs",
"devshell": "devshell",
"emacs-overlay": "emacs-overlay",
+ "envfs": "envfs",
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"flake-utils-plus": "flake-utils-plus",
@@ -307,7 +329,43 @@
"nixos-unstable": "nixos-unstable",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable",
- "nur": "nur"
+ "nur": "nur",
+ "sops-nix": "sops-nix"
+ }
+ },
+ "sops-nix": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1649756291,
+ "narHash": "sha256-KTll8bCINAzIUGaaMrbn9wb5nfhkXRLgmFrWGR/Dku0=",
+ "owner": "Mic92",
+ "repo": "sops-nix",
+ "rev": "c2614c4fe61943b3d280ac1892fcebe6e8eaf8c8",
+ "type": "github"
+ },
+ "original": {
+ "owner": "Mic92",
+ "repo": "sops-nix",
+ "type": "github"
+ }
+ },
+ "utils": {
+ "locked": {
+ "lastModified": 1610051610,
+ "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
}
}
},
flake.nix
@@ -29,6 +29,18 @@
inputs.utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
+ sops-nix = {
+ type = "github";
+ owner = "Mic92";
+ repo = "sops-nix";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ envfs = {
+ type = "github";
+ owner = "Mic92";
+ repo = "envfs";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
# Channels
# FIXME: is it needed or should I just alias nixos-unstable instead
@@ -46,6 +58,8 @@
, home-manager
, emacs-overlay
, nur
+ , sops-nix
+ , envfs
, ...
} @ inputs:
let
@@ -72,8 +86,11 @@
inherit self;
};
modules = [
- ./systems/modules
+ # Common modules
+ ./systems/modules/default.flake.nix
home-manager.nixosModules.home-manager
+ sops-nix.nixosModules.sops
+ envfs.nixosModules.envfs
{
# Import custom home-manager modules (NixOS)
config.home-manager.sharedModules = import ./users/modules/modules.nix;
@@ -90,7 +107,7 @@
};
shikoku = {
channelName = "nixos-21_11";
- modules = [ ./systems/hosts/shikoku.nix ];
+ modules = [ ./systems/hosts/shikoku.nix ]; # Can add additionnal things
};
};
@@ -99,18 +116,22 @@
in
{
overlay = import ./nix/overlays;
- devShell = with channels.nixpkgs; mkShell {
- sopsPGPKeyDirs = [ "./secrets/keys" ];
- nativeBuildInputs = [
- (pkgs.callPackage pkgs.sops-nix { }).sops-import-keys-hook
- ];
- buildInputs = with pkgs; [
- cachix
- git
- nixpkgs-fmt
- sops
- ];
- };
+ devShell =
+ let
+ inherit (sops-nix.packages."x86_64-linux") sops-import-keys-hook;
+ in
+ with channels.nixpkgs; mkShell {
+ sopsPGPKeyDirs = [ "./secrets/keys" ];
+ nativeBuildInputs = [
+ sops-import-keys-hook
+ ];
+ buildInputs = with pkgs; [
+ cachix
+ git
+ nixpkgs-fmt
+ sops
+ ];
+ };
};
};
}