2021-10-26 18:25:19 +00:00
|
|
|
{
|
2021-10-28 22:15:24 +00:00
|
|
|
description = "nki's systems";
|
2021-10-26 18:25:19 +00:00
|
|
|
|
|
|
|
inputs = {
|
2021-12-01 18:52:13 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/21.11";
|
2021-10-26 18:25:19 +00:00
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
darwin.url = "github:lnl7/nix-darwin/master";
|
|
|
|
darwin.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
2021-12-01 18:52:13 +00:00
|
|
|
home-manager.url = "github:nix-community/home-manager/release-21.11";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2021-10-28 22:15:24 +00:00
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
2021-10-31 19:06:44 +00:00
|
|
|
deploy-rs.url = "github:Serokell/deploy-rs";
|
2021-10-28 22:15:24 +00:00
|
|
|
nur.url = "github:nix-community/NUR";
|
2021-10-29 04:25:58 +00:00
|
|
|
|
|
|
|
# ---
|
|
|
|
# Imported apps
|
2021-10-29 17:31:16 +00:00
|
|
|
naersk.url = "github:nix-community/naersk";
|
2021-10-29 04:25:58 +00:00
|
|
|
rnix-lsp.url = "github:nix-community/rnix-lsp";
|
2021-10-29 17:31:16 +00:00
|
|
|
rnix-lsp.inputs.naersk.follows = "naersk";
|
|
|
|
rnix-lsp.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
2021-11-03 19:01:23 +00:00
|
|
|
youmubot.url = "github:natsukagami/youmubot";
|
2021-11-03 22:42:02 +00:00
|
|
|
|
|
|
|
# ---
|
|
|
|
# DEPLOYMENT ONLY! secrets
|
|
|
|
secrets.url = "git+ssh://git@github.com/natsukagami/nix-deploy-secrets";
|
2021-10-26 18:25:19 +00:00
|
|
|
};
|
|
|
|
|
2021-12-01 18:52:13 +00:00
|
|
|
outputs = { self, darwin, nixpkgs, nixpkgs-unstable, home-manager, deploy-rs, sops-nix, nur, ... }@inputs:
|
2021-10-29 17:31:16 +00:00
|
|
|
let
|
|
|
|
overlayForSystem = import ./overlay.nix inputs;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
# MacBook configuration: nix-darwin + home-manager
|
|
|
|
darwinConfigurations."nki-macbook" = darwin.lib.darwinSystem {
|
|
|
|
system = "aarch64-darwin";
|
|
|
|
modules = [
|
|
|
|
./darwin/configuration.nix
|
2021-12-01 18:52:13 +00:00
|
|
|
home-manager.darwinModules.home-manager
|
2021-10-26 18:25:19 +00:00
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
2021-10-27 16:35:53 +00:00
|
|
|
home-manager.users.nki = import ./home/macbook-home.nix;
|
2021-10-29 17:31:16 +00:00
|
|
|
}
|
|
|
|
(overlayForSystem "aarch64-darwin")
|
|
|
|
];
|
|
|
|
};
|
2021-10-28 22:15:24 +00:00
|
|
|
|
2021-10-29 17:31:16 +00:00
|
|
|
# Home configuration
|
|
|
|
nixosConfigurations."nki-home" = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./modules/my-tinc
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
./nki-home/configuration.nix
|
2021-12-01 18:52:13 +00:00
|
|
|
home-manager.nixosModules.home-manager
|
2021-10-29 17:31:16 +00:00
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.nki = import ./home/kagami-pc-home.nix;
|
|
|
|
}
|
|
|
|
(overlayForSystem "x86_64-linux")
|
|
|
|
];
|
|
|
|
};
|
2021-10-31 19:06:44 +00:00
|
|
|
|
|
|
|
# DigitalOcean node
|
|
|
|
nixosConfigurations."nki-personal-do" = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./modules/my-tinc
|
2021-11-03 17:22:27 +00:00
|
|
|
inputs.youmubot.nixosModule.x86_64-linux
|
2021-10-31 19:06:44 +00:00
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
./nki-personal-do/configuration.nix
|
2021-11-03 22:42:02 +00:00
|
|
|
inputs.secrets.nixosModules.x86_64-linux.nki-personal-do
|
2021-11-01 01:41:29 +00:00
|
|
|
(overlayForSystem "x86_64-linux")
|
2021-10-31 19:06:44 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
deploy.nodes."nki-personal-do" = {
|
|
|
|
hostname = "nki-personal-do";
|
|
|
|
sshUser = "root";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations."nki-personal-do";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# This is highly advised, and will prevent many possible mistakes
|
|
|
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
|
|
|
|
2021-10-26 18:25:19 +00:00
|
|
|
};
|
|
|
|
}
|