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";
|
2023-02-07 11:42:25 +01:00
|
|
|
darwin = {
|
2023-02-11 02:37:39 +01:00
|
|
|
url = "github:lnl7/nix-darwin";
|
2023-04-27 09:30:26 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-02-10 07:46:37 +01:00
|
|
|
};
|
2023-04-21 05:59:56 +02:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-02-07 11:42:25 +01:00
|
|
|
|
2023-05-24 23:56:33 +02:00
|
|
|
# NUR
|
2023-04-06 15:41:53 +02:00
|
|
|
nur.url = "github:nix-community/nur";
|
2023-02-13 00:54:29 +01:00
|
|
|
nekowinston-nur.url = "github:nekowinston/nur";
|
2023-06-04 01:51:55 +02:00
|
|
|
caarlos0-nur.url = "github:nekowinston/caarlos0-nur/feat/add-apple-music-discord-module";
|
2023-05-24 23:56:33 +02:00
|
|
|
|
2023-02-11 02:37:39 +01:00
|
|
|
sops.url = "github:Mic92/sops-nix";
|
2023-04-13 22:14:04 +02:00
|
|
|
nix-index-database.url = "github:Mic92/nix-index-database";
|
|
|
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
2023-02-10 10:03:16 +01:00
|
|
|
|
2023-05-22 12:10:32 +02:00
|
|
|
swayfx.url = "github:willpower3309/swayfx";
|
2023-05-01 05:46:00 +02:00
|
|
|
swayfx.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2023-02-10 10:03:16 +01:00
|
|
|
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2023-02-07 11:42:25 +01:00
|
|
|
};
|
|
|
|
|
2023-05-29 14:11:41 +02:00
|
|
|
nixConfig = {
|
|
|
|
extra-substituters = [
|
2023-06-01 05:53:42 +02:00
|
|
|
"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 = [
|
2023-06-01 05:53:42 +02:00
|
|
|
"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-06-01 05:53:42 +02:00
|
|
|
extra-trusted-users = ["@wheel"];
|
|
|
|
tarball-ttl = 604800;
|
|
|
|
warn-dirty = false;
|
2023-05-29 14:11:41 +02:00
|
|
|
};
|
|
|
|
|
2023-02-07 11:42:25 +01:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
darwin,
|
2023-02-12 08:05:51 +01:00
|
|
|
home-manager,
|
2023-02-07 11:42:25 +01:00
|
|
|
nixpkgs,
|
|
|
|
...
|
2023-05-24 23:56:33 +02:00
|
|
|
} @ inputs: let
|
2023-02-18 22:36:15 +01:00
|
|
|
overlays = final: prev: {
|
2023-05-24 23:56:33 +02:00
|
|
|
nur = import inputs.nur {
|
2023-02-13 00:54:29 +01:00
|
|
|
nurpkgs = prev;
|
|
|
|
pkgs = prev;
|
2023-03-04 05:50:49 +01:00
|
|
|
repoOverrides = {
|
2023-05-24 23:56:33 +02:00
|
|
|
caarlos0 = inputs.caarlos0-nur.packages.${prev.system};
|
|
|
|
nekowinston = inputs.nekowinston-nur.packages.${prev.system};
|
2023-03-04 05:50:49 +01:00
|
|
|
};
|
2023-02-13 00:54:29 +01:00
|
|
|
};
|
2023-05-24 23:56:33 +02:00
|
|
|
sway-unwrapped = inputs.swayfx.packages.${prev.system}.default;
|
2023-02-09 17:35:00 +01:00
|
|
|
};
|
2023-05-18 15:19:31 +02:00
|
|
|
commonHMConfig = {username}: ({
|
2023-04-03 22:44:03 +02:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
config = {
|
|
|
|
nixpkgs.overlays = [overlays];
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
2023-05-26 21:58:36 +02:00
|
|
|
useUserPackages = true;
|
2023-04-03 22:44:03 +02:00
|
|
|
backupFileExtension = "backup";
|
2023-04-13 22:14:04 +02:00
|
|
|
sharedModules = [
|
2023-05-24 23:56:33 +02:00
|
|
|
inputs.nix-index-database.hmModules.nix-index
|
|
|
|
inputs.sops.homeManagerModules.sops
|
2023-06-04 01:51:55 +02:00
|
|
|
inputs.caarlos0-nur.homeManagerModules.default
|
2023-06-04 02:31:13 +02:00
|
|
|
inputs.nekowinston-nur.homeManagerModules.default
|
2023-04-13 22:14:04 +02:00
|
|
|
];
|
2023-04-03 22:44:03 +02:00
|
|
|
users.${username}.imports = [./home];
|
|
|
|
extraSpecialArgs = {
|
|
|
|
flakePath =
|
|
|
|
if pkgs.stdenv.isDarwin
|
|
|
|
then "/Users/${username}/.config/nixpkgs"
|
|
|
|
else "/home/${username}/.config/nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
2023-02-10 10:03:16 +01:00
|
|
|
in
|
|
|
|
{
|
2023-02-11 04:58:34 +01:00
|
|
|
nixosConfigurations = {
|
2023-05-11 23:26:32 +02:00
|
|
|
"futomaki" = nixpkgs.lib.nixosSystem {
|
2023-02-11 04:58:34 +01:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
home-manager.nixosModules.home-manager
|
2023-03-02 17:14:11 +01:00
|
|
|
./machines/common
|
2023-02-11 04:58:34 +01:00
|
|
|
./machines/futomaki
|
2023-04-08 13:03:00 +02:00
|
|
|
(commonHMConfig {
|
|
|
|
username = "winston";
|
|
|
|
})
|
2023-02-11 04:58:34 +01:00
|
|
|
];
|
|
|
|
};
|
2023-05-11 23:26:32 +02:00
|
|
|
"bento" = nixpkgs.lib.nixosSystem {
|
2023-03-01 21:03:45 +01:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
home-manager.nixosModules.home-manager
|
2023-03-02 17:14:11 +01:00
|
|
|
./machines/common
|
2023-03-01 21:03:45 +01:00
|
|
|
./machines/bento
|
2023-04-08 13:03:00 +02:00
|
|
|
(commonHMConfig {
|
|
|
|
username = "w";
|
|
|
|
})
|
2023-03-01 21:03:45 +01:00
|
|
|
];
|
|
|
|
};
|
2023-02-11 04:58:34 +01:00
|
|
|
};
|
2023-02-10 10:03:16 +01:00
|
|
|
darwinConfigurations = {
|
2023-05-11 23:26:32 +02:00
|
|
|
"sashimi" = darwin.lib.darwinSystem {
|
2023-02-10 10:03:16 +01:00
|
|
|
system = "aarch64-darwin";
|
|
|
|
modules = [
|
|
|
|
home-manager.darwinModules.home-manager
|
2023-06-04 02:31:13 +02:00
|
|
|
inputs.nekowinston-nur.darwinModules.default
|
2023-03-02 17:14:11 +01:00
|
|
|
./machines/common
|
2023-02-20 09:09:29 +01:00
|
|
|
./machines/sashimi
|
2023-04-08 13:03:00 +02:00
|
|
|
(commonHMConfig {
|
|
|
|
username = "winston";
|
|
|
|
})
|
2023-02-10 10:03:16 +01:00
|
|
|
];
|
|
|
|
};
|
2023-02-07 11:42:25 +01:00
|
|
|
};
|
2023-02-10 10:03:16 +01:00
|
|
|
}
|
2023-05-24 23:56:33 +02:00
|
|
|
// inputs.flake-utils.lib.eachDefaultSystem (system: let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in {
|
|
|
|
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;
|
2023-02-10 10:03:16 +01:00
|
|
|
};
|
|
|
|
};
|
2023-05-24 23:56:33 +02:00
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
name = "nixpkgs";
|
|
|
|
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
|
|
|
nativeBuildInputs = [pkgs.just pkgs.git-crypt pkgs.sops];
|
|
|
|
};
|
|
|
|
formatter = pkgs.alejandra;
|
2023-02-10 10:03:16 +01:00
|
|
|
});
|
2023-02-07 11:42:25 +01:00
|
|
|
}
|