2023-02-07 11:42:25 +01:00
|
|
|
{
|
|
|
|
description = "nekowinston's hm flake";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
|
|
|
|
darwin = {
|
|
|
|
url = "github:lnl7/nix-darwin/master";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/master";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
nur.url = "github:nix-community/NUR/master";
|
|
|
|
sops.url = "github:Mic92/sops-nix/feat/home-manager";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
darwin,
|
2023-02-09 17:35:00 +01:00
|
|
|
flake-utils,
|
2023-02-07 11:42:25 +01:00
|
|
|
home-manager,
|
|
|
|
nixpkgs,
|
|
|
|
nixpkgs-unstable,
|
|
|
|
nur,
|
|
|
|
sops,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
2023-02-09 17:35:00 +01:00
|
|
|
overlay-unstable-x86-64 = final: prev: {
|
|
|
|
unstable = import nixpkgs-unstable {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
overlay-unstable-aarch64 = final: prev: {
|
2023-02-07 11:42:25 +01:00
|
|
|
unstable = import nixpkgs-unstable {
|
2023-02-09 17:35:00 +01:00
|
|
|
system = "aarch64-darwin";
|
2023-02-07 11:42:25 +01:00
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
2023-02-09 17:35:00 +01:00
|
|
|
rec {
|
2023-02-07 11:42:25 +01:00
|
|
|
# TODO: enable for NixOS
|
|
|
|
# nixosConfigurations = {
|
|
|
|
# "copium" = nixpkgs.lib.nixosSystem {
|
|
|
|
# system = "x86_64-linux";
|
|
|
|
# modules = [
|
|
|
|
# # make "pkgs.unstable" available
|
|
|
|
# ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
|
|
|
# ./configuration.nix
|
|
|
|
# ];
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
|
|
|
|
darwinConfigurations = {
|
2023-02-09 17:35:00 +01:00
|
|
|
"sashimi-slicer" = darwin.lib.darwinSystem rec {
|
|
|
|
system = "aarch64-darwin";
|
|
|
|
# pkgs = import nixpkgs {
|
|
|
|
# inherit system;
|
|
|
|
# config.allowUnfree = true;
|
|
|
|
# };
|
2023-02-07 11:42:25 +01:00
|
|
|
|
|
|
|
modules = [
|
|
|
|
./darwin.nix
|
|
|
|
# make "pkgs.unstable" available
|
|
|
|
({ config, pkgs, ... }: {
|
2023-02-09 17:35:00 +01:00
|
|
|
nixpkgs.overlays = [ overlay-unstable-aarch64 ];
|
2023-02-07 11:42:25 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-02-09 17:35:00 +01:00
|
|
|
homeConfigurations.winston = home-manager.lib.homeManagerConfiguration rec {
|
2023-02-07 11:42:25 +01:00
|
|
|
pkgs = import nixpkgs {
|
2023-02-09 17:35:00 +01:00
|
|
|
system = "aarch64-darwin";
|
2023-02-07 11:42:25 +01:00
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
./home.nix
|
|
|
|
sops.homeManagerModules.sops
|
|
|
|
nur.nixosModules.nur
|
|
|
|
({ config, pkgs, ... }: {
|
2023-02-09 17:35:00 +01:00
|
|
|
nixpkgs.overlays = [ overlay-unstable-aarch64 ];
|
2023-02-07 11:42:25 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
extraSpecialArgs = {
|
|
|
|
machine = {
|
|
|
|
username = "winston";
|
|
|
|
homeDirectory = "/Users/winston";
|
|
|
|
personal = true;
|
2023-02-09 17:35:00 +01:00
|
|
|
flakePath = "/Users/winston/.config/nixpkgs";
|
2023-02-07 11:42:25 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|