update flake config

This commit is contained in:
Chris Dombroski 2024-04-12 21:48:22 -04:00
parent b183735ab5
commit 075bc4870c
2 changed files with 39 additions and 40 deletions

View file

@ -41,11 +41,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@ -109,9 +109,9 @@
"root": {
"inputs": {
"deploy-rs": "deploy-rs",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"utils": "utils_2"
"nixpkgs": "nixpkgs_2"
}
},
"systems": {
@ -161,25 +161,6 @@
"repo": "flake-utils",
"type": "github"
}
},
"utils_2": {
"inputs": {
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1696281284,
"narHash": "sha256-xcmtTmoiiAOSk4abifbtqVZk0iwBcqJfg47iUbkwhcE=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "6cf1e312fb259693c4930d07ca3cbe1d07ef4a48",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"ref": "v1.4.0",
"repo": "flake-utils-plus",
"type": "github"
}
}
},
"root": "root",

View file

@ -2,23 +2,36 @@
description = "Chris's system configuration";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
utils.url = github:gytis-ivaskevicius/flake-utils-plus/v1.4.0;
flake-utils.url = github:numtide/flake-utils;
deploy-rs.url = github:serokell/deploy-rs;
home-manager = {
url = github:nix-community/home-manager/release-23.11;
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "utils";
};
};
outputs = inputs@{ self, nixpkgs, utils, home-manager, deploy-rs, ... }:
outputs = inputs@{ self, nixpkgs, flake-utils, home-manager, deploy-rs, ... }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
aarch64Pkgs = import nixpkgs { system = "aarch64-linux"; };
deployAarch64Pkgs = import nixpkgs {
system = "aarch64-linux";
overlays = [
deploy-rs.overlay
(self: super: { deploy-rs = { inherit (aarch64Pkgs) deploy-rs; lib = super.deploy-rs.lib; }; })
];
};
deployPkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [
deploy-rs.overlay
(self: super: { deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; }; })
];
};
in
utils.lib.mkFlake {
inherit self inputs;
channelsConfig = { allowUnfree = true; };
hosts = {
{
nixosConfigurations = {
#smolboi.modules = [ ./systems/smolboi/configuration.nix ];
orangepihole = {
orangepihole = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [ ./systems/orangepihole/configuration.nix ];
};
@ -29,16 +42,21 @@
orangepihole = {
hostname = "orangepihole";
profiles.system.user = "root";
profiles.system.path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.orangepihole;
profiles.system.path = deployAarch64Pkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations.orangepihole;
};
};
};
outputsBuilder = channels: {
devShell = channels.nixpkgs.mkShell {
name = "default";
buildInputs = [ channels.nixpkgs.deploy-rs ];
};
} //
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
deployLib = deploy-rs.lib.${system};
in
{
devShells.default = pkgs.mkShell {
buildInputs = [ pkgs.deploy-rs ];
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
};
checks = deployLib.deployChecks self.deploy;
}
);
}