init
This commit is contained in:
commit
97ddcea8f3
11 changed files with 1283 additions and 0 deletions
74
flake.nix
Normal file
74
flake.nix
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
description = "Simple GUI program launcher";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
hooks = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
treefmt = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
hooks,
|
||||
treefmt,
|
||||
}@inputs:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [
|
||||
hooks.flakeModule
|
||||
treefmt.flakeModule
|
||||
];
|
||||
|
||||
systems = nixpkgs.lib.systems.flakeExposed;
|
||||
|
||||
perSystem =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
|
||||
programs.nixfmt = {
|
||||
enable = true;
|
||||
package = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
|
||||
programs.gofmt.enable = true;
|
||||
};
|
||||
|
||||
pre-commit.settings.hooks = {
|
||||
treefmt.enable = true;
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.go
|
||||
pkgs.gotools
|
||||
pkgs.wayland
|
||||
pkgs.libxkbcommon
|
||||
pkgs.libGL
|
||||
pkgs.pkg-config
|
||||
pkgs.xorg.libX11
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
${config.pre-commit.installationScript}
|
||||
'';
|
||||
};
|
||||
|
||||
packages.default = pkgs.callPackage ./package.nix { };
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue