2023-01-25 17:53:02 +01:00
|
|
|
{
|
2023-04-08 17:33:59 +02:00
|
|
|
description = "patricks tolle nix config";
|
|
|
|
|
2023-01-28 02:50:14 +01:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-04-08 17:33:59 +02:00
|
|
|
|
2023-01-28 02:50:14 +01:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
# should use system nixpkgs instead of their own
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-04-08 17:33:59 +02:00
|
|
|
|
2023-01-28 02:50:14 +01:00
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-01-28 18:41:31 +01:00
|
|
|
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2023-02-08 21:12:32 +01:00
|
|
|
|
|
|
|
pre-commit-hooks = {
|
|
|
|
url = "github:cachix/pre-commit-hooks.nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2023-03-06 07:47:49 +01:00
|
|
|
|
|
|
|
templates = {
|
2023-03-20 09:27:06 +01:00
|
|
|
url = "git+ssh://gitea@git.lel.lol/patrick/nix-templates.git";
|
2023-03-06 07:47:49 +01:00
|
|
|
};
|
2023-03-08 14:11:46 +01:00
|
|
|
|
|
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
2023-01-25 17:53:02 +01:00
|
|
|
};
|
|
|
|
|
2023-01-28 02:50:14 +01:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
|
|
|
agenix,
|
2023-01-28 18:41:31 +01:00
|
|
|
flake-utils,
|
2023-03-06 07:47:49 +01:00
|
|
|
templates,
|
2023-03-08 14:11:46 +01:00
|
|
|
hyprland,
|
2023-01-28 02:50:14 +01:00
|
|
|
...
|
2023-01-28 18:41:31 +01:00
|
|
|
} @ inputs: let
|
2023-01-28 02:50:14 +01:00
|
|
|
system = "x86_64-linux";
|
2023-01-28 18:41:31 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
nixosConfigurations.patricknix = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
}
|
2023-03-08 14:11:46 +01:00
|
|
|
{home-manager.users.patrick.imports = [hyprland.homeManagerModules.default];}
|
2023-02-04 15:40:33 +01:00
|
|
|
agenix.nixosModules.default
|
2023-01-28 18:41:31 +01:00
|
|
|
{
|
|
|
|
nix.registry = {
|
|
|
|
nixpkgs.flake = nixpkgs;
|
|
|
|
p.flake = nixpkgs;
|
|
|
|
pkgs.flake = nixpkgs;
|
2023-03-06 07:47:49 +01:00
|
|
|
templates.flake = templates;
|
2023-01-28 18:41:31 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
2023-02-08 19:52:31 +01:00
|
|
|
// flake-utils.lib.eachSystem [system] (localSystem: rec {
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit localSystem;
|
|
|
|
};
|
2023-01-28 18:41:31 +01:00
|
|
|
apps = import ./apps/rekey.nix inputs localSystem;
|
2023-02-08 21:12:32 +01:00
|
|
|
|
2023-02-08 19:52:31 +01:00
|
|
|
devShells.default = pkgs.mkShell {
|
2023-03-06 07:47:49 +01:00
|
|
|
name = "nixos config";
|
2023-02-08 19:52:31 +01:00
|
|
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
alejandra
|
|
|
|
statix
|
|
|
|
update-nix-fetchgit
|
2023-04-08 17:33:59 +02:00
|
|
|
# lua and nix language servers
|
|
|
|
lua-language-server
|
|
|
|
nil
|
2023-02-08 19:52:31 +01:00
|
|
|
];
|
2023-02-08 21:12:32 +01:00
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
${self.checks.${system}.pre-commit-check.shellHook}
|
|
|
|
'';
|
2023-02-08 19:52:31 +01:00
|
|
|
};
|
2023-02-08 21:12:32 +01:00
|
|
|
|
|
|
|
checks = import ./modules/checks.nix inputs localSystem;
|
2023-01-28 18:41:31 +01:00
|
|
|
});
|
2023-01-25 17:53:02 +01:00
|
|
|
}
|