dotfiles/flake.nix

120 lines
3.7 KiB
Nix
Raw Normal View History

2023-02-07 11:42:25 +01:00
{
description = "nekowinston's hm flake";
inputs = {
2023-04-27 09:30:26 +02:00
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-02-07 11:42:25 +01:00
nur.url = "github:nix-community/nur";
nekowinston-nur.url = "github:nekowinston/nur";
caarlos0-nur.url = "github:caarlos0/nur";
caarlos0-nur.inputs.nixpkgs.follows = "nixpkgs";
2023-02-11 02:37:39 +01:00
sops.url = "github:Mic92/sops-nix";
sops.inputs.nixpkgs.follows = "nixpkgs";
2023-06-13 08:59:25 +02:00
sops.inputs.nixpkgs-stable.follows = "nixpkgs";
nix-index-database.url = "github:Mic92/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
swayfx.url = "github:willpower3309/swayfx";
2023-05-01 05:46:00 +02:00
swayfx.inputs.nixpkgs.follows = "nixpkgs";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
2023-06-13 08:59:25 +02:00
pre-commit-hooks.inputs.flake-utils.follows = "flake-utils";
pre-commit-hooks.inputs.nixpkgs-stable.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
flake-parts.url = "github:hercules-ci/flake-parts";
2023-02-07 11:42:25 +01:00
};
outputs = {flake-parts, ...} @ inputs: let
2023-06-15 01:40:55 +02:00
inherit (import ./machines/lib.nix {inherit inputs;}) mkSystems overlays;
in
flake-parts.lib.mkFlake {inherit inputs;}
{
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"];
flake = mkSystems [
{
host = "sashimi";
system = "aarch64-darwin";
username = "winston";
}
{
host = "futomaki";
system = "x86_64-linux";
username = "winston";
}
{
host = "bento";
system = "x86_64-linux";
username = "w";
}
];
perSystem = {
config,
self',
inputs',
pkgs,
system,
...
}: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
2023-06-15 14:30:19 +02:00
config.allowUnfree = true;
overlays = [overlays];
};
checks.pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
alejandra.enable = true;
commitizen.enable = true;
editorconfig-checker.enable = true;
luacheck.enable = true;
nil.enable = true;
shellcheck.enable = true;
stylua.enable = true;
};
};
devShells.default = pkgs.mkShell {
name = "nixpkgs";
inherit (self'.checks.pre-commit-check) shellHook;
};
2023-06-15 01:40:55 +02:00
legacyPackages.homeConfigurations = let
homeLib = import ./home/lib.nix {
inherit inputs pkgs username;
2023-06-15 08:58:16 +02:00
isNixOS = false;
2023-06-15 01:40:55 +02:00
};
username = "winston";
in {
${username} = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
inherit (homeLib) extraSpecialArgs modules;
};
};
};
};
2023-05-29 14:11:41 +02:00
nixConfig = {
extra-substituters = [
"https://cache.garnix.io"
2023-05-29 14:11:41 +02:00
"https://mic92.cachix.org"
"https://nekowinston.cachix.org"
"https://nix-community.cachix.org"
"https://pre-commit-hooks.cachix.org"
];
extra-trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
2023-05-29 14:11:41 +02:00
"mic92.cachix.org-1:gi8IhgiT3CYZnJsaW7fxznzTkMUOn1RY4GmXdT/nXYQ="
"nekowinston.cachix.org-1:lucpmaO+JwtoZj16HCO1p1fOv68s/RL1gumpVzRHRDs="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
];
};
2023-02-07 11:42:25 +01:00
}