150 lines
4.4 KiB
Nix
150 lines
4.4 KiB
Nix
{
|
|
description = "Chris's system configuration";
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
nixunstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
nixos-cosmic = {
|
|
url = "github:lilyinstarlight/nixos-cosmic";
|
|
inputs = {
|
|
nixpkgs-stable.follows = "nixpkgs";
|
|
nixpkgs.follows = "nixunstable";
|
|
};
|
|
};
|
|
flake-parts = {
|
|
url = "github:hercules-ci/flake-parts";
|
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
};
|
|
flake-compat = {
|
|
url = "github:edolstra/flake-compat";
|
|
};
|
|
devshell = {
|
|
url = "github:numtide/devshell";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
deploy-rs = {
|
|
url = "github:serokell/deploy-rs";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-compat.follows = "flake-compat";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
impermanence.url = "github:nix-community/impermanence";
|
|
stylix = {
|
|
url = "github:danth/stylix/release-24.05";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
home-manager.follows = "home-manager";
|
|
flake-compat.follows = "flake-compat";
|
|
};
|
|
};
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
ez-configs = {
|
|
url = "github:ehllie/ez-configs";
|
|
inputs = {
|
|
flake-parts.follows = "flake-parts";
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
};
|
|
outputs =
|
|
inputs:
|
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
|
|
{ withSystem, self, ... }:
|
|
{
|
|
imports = [
|
|
inputs.devshell.flakeModule
|
|
inputs.ez-configs.flakeModule
|
|
];
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
ezConfigs = {
|
|
root = ./.;
|
|
globalArgs = {
|
|
inherit inputs;
|
|
};
|
|
home.users.cdombroski.passInOsConfig = true;
|
|
home.users.root.importDefault = false;
|
|
nixos.hosts = builtins.listToAttrs (
|
|
builtins.map
|
|
(host: {
|
|
name = host;
|
|
value = {
|
|
userHomeModules = [
|
|
"root"
|
|
"cdombroski"
|
|
];
|
|
};
|
|
})
|
|
[
|
|
"smolboi"
|
|
"zeus"
|
|
"orangepihole"
|
|
]
|
|
);
|
|
};
|
|
flake = {
|
|
deploy = {
|
|
sshUser = "root";
|
|
fastConnection = true;
|
|
nodes =
|
|
withSystem "x86_64-linux" (
|
|
{ pkgs, ... }:
|
|
{
|
|
smolboi = {
|
|
hostname = "smolboi";
|
|
profiles.system.path = pkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations.smolboi;
|
|
};
|
|
zeus = {
|
|
hostname = "zeus";
|
|
profiles.system.path = pkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations.zeus;
|
|
};
|
|
}
|
|
)
|
|
// withSystem "aarch64-linux" (
|
|
{ pkgs, ... }:
|
|
{
|
|
orangepihole = {
|
|
hostname = "orangepihole";
|
|
profiles.system.path = pkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations.orangepihole;
|
|
};
|
|
}
|
|
);
|
|
};
|
|
};
|
|
perSystem =
|
|
{ pkgs, system, ... }:
|
|
{
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
inputs.deploy-rs.overlay
|
|
(final: prev: {
|
|
deploy-rs = {
|
|
inherit (inputs.nixpkgs.legacyPackages.${system}) deploy-rs;
|
|
inherit (prev.deploy-rs) lib;
|
|
};
|
|
})
|
|
];
|
|
config = { };
|
|
};
|
|
devshells.default = {
|
|
packages = [
|
|
pkgs.deploy-rs.deploy-rs
|
|
pkgs.sops
|
|
];
|
|
};
|
|
packages.zwave-js-ui = pkgs.callPackage ./pkgs/zwave-js-ui.nix { };
|
|
checks = inputs.deploy-rs.lib.${system}.deployChecks self.deploy;
|
|
formatter = pkgs.nixfmt-rfc-style;
|
|
};
|
|
}
|
|
);
|
|
}
|