Compare commits
1 Commits
9aaacb144d
...
7692945e7c
Author | SHA1 | Date |
---|---|---|
|
7692945e7c |
122
flake.nix
122
flake.nix
|
@ -11,8 +11,9 @@
|
||||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {flake-parts, ...}:
|
outputs =
|
||||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
inputs@{ flake-parts, ... }:
|
||||||
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
imports = [
|
imports = [
|
||||||
# To import a flake module
|
# To import a flake module
|
||||||
# 1. Add foo to inputs
|
# 1. Add foo to inputs
|
||||||
|
@ -29,67 +30,72 @@
|
||||||
# "aarch64-darwin"
|
# "aarch64-darwin"
|
||||||
# "x86_64-darwin"
|
# "x86_64-darwin"
|
||||||
];
|
];
|
||||||
|
perSystem =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
self',
|
||||||
|
inputs',
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# Per-system attributes can be defined here. The self' and inputs'
|
||||||
|
# module parameters provide easy access to attributes of the same
|
||||||
|
# system.
|
||||||
|
|
||||||
|
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
|
||||||
|
packages.default = pkgs.hello;
|
||||||
|
|
||||||
|
pre-commit = {
|
||||||
|
settings.hooks = {
|
||||||
|
mdformat.enable = true;
|
||||||
|
nixfmt-rfc-style.enable = true;
|
||||||
|
prettier.enable = true;
|
||||||
|
prettier.excludes = [
|
||||||
|
".*\.md"
|
||||||
|
"flake.lock"
|
||||||
|
];
|
||||||
|
stylish-haskell.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
devshells.default = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
cowsay
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
emanote.sites = {
|
||||||
|
osds-site = {
|
||||||
|
layers = [
|
||||||
|
{
|
||||||
|
path = ./osds-src;
|
||||||
|
pathString = "osds-src";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
baseUrl = "localhost";
|
||||||
|
port = 12513;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
treefmt = {
|
||||||
|
programs = {
|
||||||
|
mdformat.enable = true;
|
||||||
|
nixfmt.enable = true;
|
||||||
|
nixfmt.package = pkgs.nixfmt-rfc-style;
|
||||||
|
prettier.enable = true;
|
||||||
|
prettier.excludes = [ "*.md" ];
|
||||||
|
stylish-haskell.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
flake = {
|
flake = {
|
||||||
# The usual flake attributes can be defined here, including system-
|
# The usual flake attributes can be defined here, including system-
|
||||||
# agnostic ones like nixosModule and system-enumerating ones, although
|
# agnostic ones like nixosModule and system-enumerating ones, although
|
||||||
# those are more easily expressed in perSystem.
|
# those are more easily expressed in perSystem.
|
||||||
};
|
|
||||||
perSystem = {
|
|
||||||
config,
|
|
||||||
self',
|
|
||||||
inputs',
|
|
||||||
pkgs,
|
|
||||||
system,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# Per-system attributes can be defined here. The self' and inputs'
|
|
||||||
# module parameters provide easy access to attributes of the same
|
|
||||||
# system.
|
|
||||||
|
|
||||||
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
|
|
||||||
# packages.default = pkgs.hello;
|
|
||||||
packages.default = config.packages.osds-site;
|
|
||||||
|
|
||||||
devshells.default = {
|
|
||||||
packages = with pkgs; [
|
|
||||||
cowsay
|
|
||||||
|
|
||||||
alejandra
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
emanote.sites = {
|
|
||||||
osds-site = {
|
|
||||||
layers = [
|
|
||||||
{
|
|
||||||
path = ./osds-src;
|
|
||||||
pathString = "osds-src";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
baseUrl = "localhost";
|
|
||||||
port = 12513;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
pre-commit = {
|
|
||||||
settings.hooks = {
|
|
||||||
alejandra.enable = true;
|
|
||||||
mdformat.enable = true;
|
|
||||||
prettier.enable = true;
|
|
||||||
prettier.excludes = [".*\.md" "flake.lock"];
|
|
||||||
stylish-haskell.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
treefmt = {
|
|
||||||
programs = {
|
|
||||||
alejandra.enable = true;
|
|
||||||
mdformat.enable = true;
|
|
||||||
prettier.enable = true;
|
|
||||||
prettier.excludes = ["*.md"];
|
|
||||||
stylish-haskell.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue