simplify?

Signed-off-by: Xe <me@christine.website>
This commit is contained in:
Cadey Ratio 2021-12-21 18:02:15 -05:00
parent e1d375b8f2
commit 0c52e62c4e
2 changed files with 51 additions and 17 deletions

View File

@ -1,9 +1,27 @@
{ {
"nodes": { "nodes": {
"agenix": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1638837456,
"narHash": "sha256-WHLOxthAGx/wXw3QUa/lFE3mr6cQtnXfFYZ0DNyYwt4=",
"owner": "ryantm",
"repo": "agenix",
"rev": "57806bf7e340f4cae705c91748d4fdf8519293a9",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"deploy-rs": { "deploy-rs": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
@ -38,7 +56,7 @@
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1640115895, "lastModified": 1640115895,
@ -55,6 +73,19 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1618628710,
"narHash": "sha256-9xIoU+BrCpjs5nfWcd/GlU7XCVdnNKJPffoNTxgGfhs=",
"path": "/nix/store/z1rf17q0fxj935cmplzys4gg6nxj1as0-source",
"rev": "7919518f0235106d050c77837df5e338fb94de5d",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1632086102, "lastModified": 1632086102,
"narHash": "sha256-wVTcf0UclFS+zHtfPToB13jIO7n0U9N50MuRbPjQViE=", "narHash": "sha256-wVTcf0UclFS+zHtfPToB13jIO7n0U9N50MuRbPjQViE=",
@ -70,7 +101,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1640090545, "lastModified": 1640090545,
"narHash": "sha256-6qiF46uBGoSQmjDTFl8ilT+d1DuK39IRHlj0jE5gqZE=", "narHash": "sha256-6qiF46uBGoSQmjDTFl8ilT+d1DuK39IRHlj0jE5gqZE=",
@ -84,7 +115,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1640053112, "lastModified": 1640053112,
"narHash": "sha256-7C0UQssCdAMyCNSv8szLJfZ5xYMBr9mh27zYUmo8wHQ=", "narHash": "sha256-7C0UQssCdAMyCNSv8szLJfZ5xYMBr9mh27zYUmo8wHQ=",
@ -102,9 +133,10 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix",
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"utils": "utils_2" "utils": "utils_2"
} }
}, },

View File

@ -2,27 +2,29 @@
description = "My deploy-rs config for logos"; description = "My deploy-rs config for logos";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; agenix.url = "github:ryantm/agenix";
home-manager.url = "github:nix-community/home-manager";
deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.url = "github:serokell/deploy-rs";
home-manager.url = "github:nix-community/home-manager";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils"; utils.url = "github:numtide/flake-utils";
}; };
outputs = { self, nixpkgs, deploy-rs, home-manager, utils, ... }: outputs = { self, nixpkgs, deploy-rs, home-manager, agenix, ... }:
let pkgs = nixpkgs.legacyPackages."x86_64-linux"; let
pkgs = nixpkgs.legacyPackages."x86_64-linux";
mkSystem = extraModules:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
[ agenix.nixosModules.age home-manager.nixosModules.home-manager ]
++ extraModules;
};
in { in {
devShell.x86_64-linux = pkgs.mkShell { devShell.x86_64-linux = pkgs.mkShell {
buildInputs = [ deploy-rs.packages.x86_64-linux.deploy-rs ]; buildInputs = [ deploy-rs.packages.x86_64-linux.deploy-rs ];
}; };
nixosConfigurations.logos = nixpkgs.lib.nixosSystem { nixosConfigurations.logos = mkSystem [ ./hosts/logos ./hardware/alrest ];
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
./hosts/logos
./hardware/alrest
];
};
deploy.nodes.logos = { deploy.nodes.logos = {
hostname = "192.168.2.35"; hostname = "192.168.2.35";