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" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1710146030,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -109,9 +109,9 @@
"root": { "root": {
"inputs": { "inputs": {
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2"
"utils": "utils_2"
} }
}, },
"systems": { "systems": {
@ -161,25 +161,6 @@
"repo": "flake-utils", "repo": "flake-utils",
"type": "github" "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", "root": "root",

View file

@ -2,23 +2,36 @@
description = "Chris's system configuration"; description = "Chris's system configuration";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11"; 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; deploy-rs.url = github:serokell/deploy-rs;
home-manager = { home-manager = {
url = github:nix-community/home-manager/release-23.11; url = github:nix-community/home-manager/release-23.11;
inputs.nixpkgs.follows = "nixpkgs"; 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 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 in
utils.lib.mkFlake { {
inherit self inputs; nixosConfigurations = {
channelsConfig = { allowUnfree = true; };
hosts = {
#smolboi.modules = [ ./systems/smolboi/configuration.nix ]; #smolboi.modules = [ ./systems/smolboi/configuration.nix ];
orangepihole = { orangepihole = nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ ./systems/orangepihole/configuration.nix ]; modules = [ ./systems/orangepihole/configuration.nix ];
}; };
@ -29,16 +42,21 @@
orangepihole = { orangepihole = {
hostname = "orangepihole"; hostname = "orangepihole";
profiles.system.user = "root"; 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 { flake-utils.lib.eachDefaultSystem (system:
name = "default"; let
buildInputs = [ channels.nixpkgs.deploy-rs ]; 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;
}; }
);
} }