This commit is contained in:
@@ -34,66 +34,112 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, nix-darwin, globalprotect-openconnect, ... }@inputs:
|
||||
let
|
||||
linuxSystem = "x86_64-linux";
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nix-darwin,
|
||||
globalprotect-openconnect,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
linuxSystem = "x86_64-linux";
|
||||
|
||||
# Home Manager wiring shared by the NixOS (Linux) hosts.
|
||||
# plasma-manager is Linux-only, so it lives here rather than in the
|
||||
# darwin block below.
|
||||
nixosHome = {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
users.alex = import ./home/alex;
|
||||
extraSpecialArgs = { inherit inputs; isDarwin = false; };
|
||||
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
|
||||
# Systems this repo is edited/built on: the Linux hosts and the mac.
|
||||
# devShells are produced for each so `direnv`/`nix develop` works on all.
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
|
||||
# Home Manager wiring shared by the NixOS (Linux) hosts.
|
||||
# plasma-manager is Linux-only, so it lives here rather than in the
|
||||
# darwin block below.
|
||||
nixosHome = {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
users.alex = import ./home/alex;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
isDarwin = false;
|
||||
};
|
||||
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
|
||||
# To add a new Linux machine, duplicate this block and change the name.
|
||||
whitegrizzly = nixpkgs.lib.nixosSystem {
|
||||
system = linuxSystem;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/whitegrizzly
|
||||
home-manager.nixosModules.home-manager
|
||||
nixosHome
|
||||
];
|
||||
};
|
||||
|
||||
oreo = nixpkgs.lib.nixosSystem {
|
||||
system = linuxSystem;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/oreo
|
||||
home-manager.nixosModules.home-manager
|
||||
nixosHome
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
darwinConfigurations = {
|
||||
|
||||
seasoned = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/seasoned
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
users.alex = import ./home/alex;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
isDarwin = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Maintenance shell for working on this repo: formatter, linters, and
|
||||
# generation/closure inspectors. Kept out of every host's global profile
|
||||
# and auto-loaded by direnv via the repo-root .envrc (`use flake`).
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShellNoCC {
|
||||
name = "notfiles-dev";
|
||||
packages = with pkgs; [
|
||||
nixfmt # RFC 166 formatter
|
||||
statix # lint / anti-pattern detection
|
||||
deadnix # find unused (dead) bindings
|
||||
nvd # diff two system generations / profiles
|
||||
nix-tree # interactively explore a closure
|
||||
nix-output-monitor # `nom` — readable build output
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
|
||||
# To add a new Linux machine, duplicate this block and change the name.
|
||||
whitegrizzly = nixpkgs.lib.nixosSystem {
|
||||
system = linuxSystem;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/whitegrizzly
|
||||
home-manager.nixosModules.home-manager
|
||||
nixosHome
|
||||
];
|
||||
};
|
||||
|
||||
oreo = nixpkgs.lib.nixosSystem {
|
||||
system = linuxSystem;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/oreo
|
||||
home-manager.nixosModules.home-manager
|
||||
nixosHome
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
darwinConfigurations = {
|
||||
|
||||
seasoned = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/seasoned
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
users.alex = import ./home/alex;
|
||||
extraSpecialArgs = { inherit inputs; isDarwin = true; };
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user