refactor(repo): reformat to nixfmt; relicense to 0BSD

This commit is contained in:
Artur Manuel 2025-03-06 20:45:49 +00:00
commit db2564d828
Signed by: amadaluzia
SSH key fingerprint: SHA256:Zwg7gBuZyaG48ucAZneJwltiXu0+tJb7c3lYt9AYlLg
39 changed files with 451 additions and 318 deletions

21
LICENSE
View file

@ -1,13 +1,12 @@
Copyright 2025 Artur Manuel <balkenix@outlook.com>
Copyright (c) 2025 Artur Manuel <amad@atl.tools>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -72,10 +72,13 @@
ref = "gimp-meson";
};
};
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake
{
inherit inputs;
} {
}
{
systems = [ "x86_64-linux" ];
imports = [
./hosts

View file

@ -2,9 +2,11 @@
inputs,
self,
...
}: let
}:
let
inherit (self.lib) mkHosts;
in {
in
{
flake = {
nixosConfigurations = mkHosts {
solterra = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
boot.kernel.sysctl = {
"dev.tty.ldisc_autoload" = "0";
"fs.protected_fifos" = "2";

View file

@ -1,12 +1,11 @@
{...}: {
{ ... }:
{
boot.kernel.sysctl = {
"vm.dirty_ratio" = 20;
"vm.dirty_background_ratio" = 10;
"vm.vfs_cache_pressure" = 25;
"net.core.default_qdisc" = ''
cake'';
"net.ipv4.tcp_congestion_control" = ''
bbr'';
"net.core.default_qdisc" = ''cake'';
"net.ipv4.tcp_congestion_control" = ''bbr'';
"vm.page-cluster" = 1;
"kernel.nmi_watchdog" = 0;
"vm.swappiness" = 200;
@ -22,10 +21,8 @@
"net.core.wmem_default" = 1048576;
"net.core.wmem_max" = 16777216;
"net.core.optmem_max" = 65536;
"net.ipv4.tcp_rmem" = ''
4096 1048576 2097152'';
"net.ipv4.tcp_wmem" = ''
4096 65536 16777216'';
"net.ipv4.tcp_rmem" = ''4096 1048576 2097152'';
"net.ipv4.tcp_wmem" = ''4096 65536 16777216'';
"net.ipv4.udp_rmem_min" = 16384;
"net.ipv4.udp_wmem_min" = 16384;
"net.ipv4.tcp_fastopen" = 3;
@ -37,7 +34,6 @@
"net.ipv4.tcp_keepalive_intvl" = 10;
"net.ipv4.tcp_keepalive_probes" = 6;
"net.ipv4.tcp_mtu_probing" = 1;
"net.ipv4.ip_local_port_range" = ''
30000 65535'';
"net.ipv4.ip_local_port_range" = ''30000 65535'';
};
}

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
imports = [
./hardware.nix
./system.nix

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
services.tlp = {
enable = true;
settings = {

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
alqueva.system.fonts = {
enable = true;
names = {
@ -8,10 +9,27 @@
emoji = [ "OpenMoji Color" ];
};
packages = {
sansSerif = [pkgs.liberation_ttf pkgs.noto-fonts pkgs.noto-fonts-cjk-sans pkgs.noto-fonts-cjk-serif];
monospace = [pkgs.nerd-fonts.jetbrains-mono pkgs.noto-fonts];
serif = [pkgs.liberation_ttf pkgs.noto-fonts pkgs.noto-fonts pkgs.noto-fonts-cjk-sans pkgs.noto-fonts-cjk-serif];
emoji = [pkgs.openmoji-color pkgs.noto-fonts];
sansSerif = [
pkgs.liberation_ttf
pkgs.noto-fonts
pkgs.noto-fonts-cjk-sans
pkgs.noto-fonts-cjk-serif
];
monospace = [
pkgs.nerd-fonts.jetbrains-mono
pkgs.noto-fonts
];
serif = [
pkgs.liberation_ttf
pkgs.noto-fonts
pkgs.noto-fonts
pkgs.noto-fonts-cjk-sans
pkgs.noto-fonts-cjk-serif
];
emoji = [
pkgs.openmoji-color
pkgs.noto-fonts
];
};
};
}

View file

@ -6,12 +6,16 @@
lib,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci"];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
@ -22,12 +26,16 @@
options = [ "subvol=@" ];
};
boot.initrd.luks.devices."luks-fc6b34e2-c93a-4d14-8194-1c30b63f8fb5".device = "/dev/disk/by-uuid/fc6b34e2-c93a-4d14-8194-1c30b63f8fb5";
boot.initrd.luks.devices."luks-fc6b34e2-c93a-4d14-8194-1c30b63f8fb5".device =
"/dev/disk/by-uuid/fc6b34e2-c93a-4d14-8194-1c30b63f8fb5";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/47C4-D06C";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
networking = {
networkmanager = {
enable = true;

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
services.pipewire = {
enable = true;
wireplumber = {
@ -67,7 +68,10 @@
"rt.time.soft" = -1;
"rt.time.hard" = -1;
};
"flags" = ["ifexists" "nofail"];
"flags" = [
"ifexists"
"nofail"
];
}
{ "name" = "libpipewire-module-protocol-native"; }
{ "name" = "libpipewire-module-client-node"; }
@ -147,7 +151,10 @@
"uclamp.min" = 0;
"uclamp.max" = 2048;
};
"flags" = ["ifexists" "nofail"];
"flags" = [
"ifexists"
"nofail"
];
}
{
"name" = "libpipewire-module-protocol-native";
@ -237,7 +244,10 @@
"context.data-loops" = [
{
"loop.rt-prio" = -1;
"loop.class" = ["data.rt" "audio.rt"];
"loop.class" = [
"data.rt"
"audio.rt"
];
"library.name.system" = "support/libspa-support";
"thread.name" = "data-loop.0";
}
@ -287,7 +297,10 @@
"uclamp.min" = 0;
"uclamp.max" = 2048;
};
"flags" = ["ifexists" "nofail"];
"flags" = [
"ifexists"
"nofail"
];
}
{
"name" = "libpipewire-module-protocol-native";
@ -304,7 +317,10 @@
}
{
"name" = "libpipewire-module-portal";
"flags" = ["ifexists" "nofail"];
"flags" = [
"ifexists"
"nofail"
];
}
{
"name" = "libpipewire-module-access";
@ -328,7 +344,10 @@
"x11.display" = null;
"x11.xauthority" = null;
};
"flags" = ["ifexists" "nofail"];
"flags" = [
"ifexists"
"nofail"
];
"condition" = [
{
"module.x11.bell" = true;
@ -341,7 +360,10 @@
"source.props" = { };
"sink.props" = { };
};
"flags" = ["ifexists" "nofail"];
"flags" = [
"ifexists"
"nofail"
];
"condition" = [
{
"module.jackdbus-detect" = true;

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.ssh = {
startAgent = true;
enableAskPassword = true;

View file

@ -1,7 +1,8 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{pkgs, ...}: {
{ pkgs, ... }:
{
imports = [
./config/sysctl.d/performance.nix
./config/sysctl.d/hardening.nix
@ -69,7 +70,12 @@
fileSystems."/" = {
fsType = "btrfs";
options = ["compress=zstd:6" "discard" "flushoncommit" "subvol=@"];
options = [
"compress=zstd:6"
"discard"
"flushoncommit"
"subvol=@"
];
};
services.btrfs.autoScrub = {
@ -101,7 +107,11 @@
use-cgroups = true;
};
boot.initrd.kernelModules = ["amdgpu" "sha256" "sha512"];
boot.initrd.kernelModules = [
"amdgpu"
"sha256"
"sha512"
];
# Processor settings for AMD
hardware.cpu.amd = {
@ -115,8 +125,12 @@
# Bootloader.
boot.loader.systemd-boot = {
enable = true;
edk2-uefi-shell = {enable = true;};
memtest86 = {enable = true;};
edk2-uefi-shell = {
enable = true;
};
memtest86 = {
enable = true;
};
configurationLimit = 3;
};

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
qt = {
platformTheme = "qt5ct";
style = "kvantum";

View file

@ -1,9 +1,9 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
alqueva.users.unix = {
shell = pkgs.zsh;
packages = builtins.attrValues {
inherit
(pkgs)
inherit (pkgs)
wget2
fastfetch
btop-rocm
@ -29,21 +29,18 @@
man-pages-posix
xwayland-satellite
;
inherit
(pkgs.nodePackages_latest)
inherit (pkgs.nodePackages_latest)
nodejs
pnpm
;
inherit
(pkgs.llvmPackages_19)
inherit (pkgs.llvmPackages_19)
libcxxClang
clangUseLLVM
clang-tools
clang-manpages
openmp
;
inherit
(pkgs.emacsPackages)
inherit (pkgs.emacsPackages)
tree-sitter
tsc
tree-sitter-langs
@ -100,7 +97,15 @@
syntaxHighlighting = {
enable = true;
highlighters = ["main" "brackets" "pattern" "cursor" "regexp" "root" "line"];
highlighters = [
"main"
"brackets"
"pattern"
"cursor"
"regexp"
"root"
"line"
];
};
shellAliases = {
@ -111,7 +116,12 @@
ohMyZsh = {
enable = true;
plugins = ["git" "direnv" "fzf" "ssh-agent"];
plugins = [
"git"
"direnv"
"fzf"
"ssh-agent"
];
preLoaded = "zstyle :omz:plugins:ssh-agent agent-forwarding yes";
theme = "half-life";
};

View file

@ -3,18 +3,19 @@
lib,
pkgs,
...
}: let
}:
let
cfg = config.alqueva.programs.sleep-or-die;
inherit (lib) mkOption mkEnableOption types mkIf;
sleep-or-die = let
image =
if cfg.image == null
then ""
else "-i ${cfg.image}";
sound =
if cfg.sound == null
then ""
else "ffplay -nodisp -autoexit ${cfg.sound}";
inherit (lib)
mkOption
mkEnableOption
types
mkIf
;
sleep-or-die =
let
image = if cfg.image == null then "" else "-i ${cfg.image}";
sound = if cfg.sound == null then "" else "ffplay -nodisp -autoexit ${cfg.sound}";
in
pkgs.writeShellApplication {
name = "sod";
@ -28,7 +29,8 @@
shutdown +60 "This was automatically invoked by 'sleep-or-die'"
'';
};
in {
in
{
options.alqueva.programs.sleep-or-die = {
enable = mkEnableOption "sleep-or-die";

View file

@ -3,12 +3,16 @@
config,
lib,
...
}: let
}:
let
ezaOptions = "--colour=always --icons=never --group-directories-first --octal-permissions";
cfg = config.alqueva.shells.aliases;
in {
in
{
options.alqueva.shells.aliases = {
enable = (lib.mkEnableOption "default aliases") // {default = true;};
enable = (lib.mkEnableOption "default aliases") // {
default = true;
};
};
config = lib.mkIf cfg.enable {
environment = {

View file

@ -2,20 +2,23 @@
config,
lib,
...
}: let
}:
let
cfg = config.alqueva.system.dconf;
inherit (lib) types;
in {
in
{
options.alqueva.system.dconf = {
enable = lib.mkEnableOption "configuration with DConf";
luminosity = lib.mkOption {
type = types.enum ["dark" "light" "default"];
type = types.enum [
"dark"
"light"
"default"
];
default = "dark";
description = "The luminosity you want to use for GTK.";
apply = lum:
if lum == "default"
then lum
else "prefer-${lum}";
apply = lum: if lum == "default" then lum else "prefer-${lum}";
};
theme = lib.mkOption {
type = types.str;
@ -55,8 +58,7 @@ in {
programs.dconf = {
profiles.user.databases = [
{
settings =
{
settings = {
"org/gnome/desktop/interface" = {
color-scheme = cfg.luminosity;
cursor-size = cfg.cursor.size;
@ -64,8 +66,7 @@ in {
icon-theme = cfg.icon.theme;
gtk-theme = cfg.theme;
};
}
// cfg.extraDconfSettings;
} // cfg.extraDconfSettings;
}
];
packages = cfg.extraDconfPackages;

View file

@ -1,8 +1,7 @@
{lib, ...}: {
{ lib, ... }:
{
imports = lib.pipe (builtins.readDir ./.) [
(lib.filterAttrs
(n: _v: n != "default.nix" && lib.last (lib.stringToCharacters n) != "~"))
(lib.mapAttrsToList
(n: _v: ./${n}))
(lib.filterAttrs (n: _v: n != "default.nix" && lib.last (lib.stringToCharacters n) != "~"))
(lib.mapAttrsToList (n: _v: ./${n}))
];
}

View file

@ -2,9 +2,11 @@
config,
lib,
...
}: let
}:
let
cfg = config.alqueva.programs.git;
in {
in
{
options.alqueva.programs.git = {
enable = lib.mkEnableOption "git";
};

View file

@ -3,9 +3,11 @@
pkgs,
lib,
...
}: let
}:
let
cfg = config.alqueva.wms.niri;
in {
in
{
options.alqueva.wms.niri = {
enable = lib.mkEnableOption "niri";
package = lib.mkPackageOption pkgs "niri" { };

View file

@ -3,9 +3,11 @@
pkgs,
config,
...
}: let
}:
let
cfg = config.alqueva.shells.nushell;
in {
in
{
options.alqueva.shells.nushell = {
enable = lib.mkEnableOption "Nushell";
package = lib.mkPackageOption pkgs "nushell" { };

View file

@ -3,9 +3,11 @@
pkgs,
lib,
...
}: let
}:
let
cfg = config.alqueva.system.pipewire;
in {
in
{
options.alqueva.system.pipewire = {
enable = lib.mkEnableOption "PipeWire";
};

View file

@ -3,9 +3,11 @@
lib,
pkgs,
...
}: let
}:
let
cfg = config.alqueva.wms.river;
in {
in
{
options.alqueva.wms.river = {
enable = lib.mkEnableOption "River";
};
@ -35,8 +37,7 @@ in {
};
environment.systemPackages = builtins.attrValues {
inherit
(pkgs)
inherit (pkgs)
wf-recorder
rofi-wayland
kitty

View file

@ -2,9 +2,11 @@
config,
lib,
...
}: let
}:
let
cfg = config.alqueva.programs.openssh;
in {
in
{
options.alqueva.programs.openssh = {
enable = lib.mkEnableOption "OpenSSH";
};

View file

@ -3,10 +3,12 @@
lib,
pkgs,
...
}: let
}:
let
cfg = config.alqueva.support;
inherit (lib) mkEnableOption;
in {
in
{
options.alqueva.support = {
wayland = mkEnableOption "wayland support";
};

View file

@ -3,17 +3,23 @@
lib,
pkgs,
...
}: let
}:
let
cfg = config.alqueva.programs.swaybg;
inherit (lib) types;
in {
in
{
options.alqueva.programs.swaybg = {
enable = lib.mkEnableOption "swaybg";
package = lib.mkPackageOption pkgs "swaybg" { };
wallpaper = lib.mkOption {
default = "";
description = "The wallpaper you want to use with swaybg.";
type = types.oneOf [types.str types.package types.path];
type = types.oneOf [
types.str
types.package
types.path
];
};
mode = lib.mkOption {
default = "fill";

View file

@ -2,11 +2,19 @@
config,
lib,
...
}: let
}:
let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) attrsOf listOf submodule str package;
inherit (lib.types)
attrsOf
listOf
submodule
str
package
;
users = config.alqueva.users;
in {
in
{
options.alqueva.users = mkOption {
type = attrsOf (submodule {
options = {
@ -30,30 +38,30 @@ in {
default = config.programs.bash.package;
description = "Shell the user wants to use.";
};
enable = (mkEnableOption "this user.") // {default = true;};
enable = (mkEnableOption "this user.") // {
default = true;
};
};
});
description = "Users to have on the system.";
default = { };
};
config = let
config =
let
enabledUsers = lib.filterAttrs (_: user: user.enable == true) users;
in {
users.users =
builtins.mapAttrs (un: uc: {
in
{
users.users = builtins.mapAttrs (un: uc: {
description = un;
isNormalUser = true;
extraGroups = uc.groups;
inherit (uc) packages shell;
initialPassword = "password";
})
enabledUsers;
}) enabledUsers;
systemd.user.tmpfiles.users =
builtins.mapAttrs (_: uc: {
systemd.user.tmpfiles.users = builtins.mapAttrs (_: uc: {
rules = uc.tmpfiles;
})
enabledUsers;
}) enabledUsers;
};
}

View file

@ -3,12 +3,13 @@
pkgs,
lib,
...
}: let
}:
let
cfg = config.alqueva.shells.xonsh;
aliasesToPyDict = aliases:
lib.concatStringsSep "\n"
(lib.mapAttrsToList (k: v: "aliases['${k}'] = '${v}'") aliases);
in {
aliasesToPyDict =
aliases: lib.concatStringsSep "\n" (lib.mapAttrsToList (k: v: "aliases['${k}'] = '${v}'") aliases);
in
{
options.alqueva.shells.xonsh = {
enable = lib.mkEnableOption "xonsh";
package = lib.mkPackageOption pkgs "xonsh" { };

View file

@ -3,11 +3,11 @@
pkgs,
lib,
...
}: {
}:
{
environment = {
systemPackages = builtins.attrValues {
inherit
(pkgs)
inherit (pkgs)
nil
statix
deadnix

View file

@ -2,7 +2,8 @@
pkgs,
inputs,
...
}: {
}:
{
imports = [
./users/artur
./hardware.nix

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
alqueva.system.fonts = {
names = {
sansSerif = [ "Iosevka" ];

View file

@ -1,7 +1,9 @@
{config, ...}: let
{ config, ... }:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in {
in
{
services.nginx = {
virtualHosts.${cfg.settings.server.DOMAIN} = {
forceSSL = true;

View file

@ -6,12 +6,19 @@
lib,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];

View file

@ -2,7 +2,8 @@
pkgs,
config,
...
}: let
}:
let
themes = {
# gtk-theme = pkgs.everforest-gtk-theme;
gtk-theme = pkgs.everforest-gtk-theme.overrideAttrs (finalAttrs: {
@ -13,9 +14,7 @@
rev = "43cbe4f1aeba8b46e41836de4c8ea7ac398db119";
hash = "sha256-Z46i0Ihpzo4LhFvzKsvnzcHFzeYxJMvQmg2k6lmjGH0=";
};
nativeBuildInputs =
(finalAttrs.nativeBuildInputs or [])
++ [
nativeBuildInputs = (finalAttrs.nativeBuildInputs or [ ]) ++ [
pkgs.sassc
];
installPhase = ''
@ -31,7 +30,8 @@
cursor-theme = pkgs.simp1e-cursors;
};
cfg = config.alqueva.system.dconf;
in {
in
{
alqueva.system.dconf = {
enable = true;
luminosity = "dark";

View file

@ -3,18 +3,22 @@
pkgs,
config,
...
}: {
}:
{
alqueva.users.artur = {
shell = config.alqueva.shells.nushell.package;
tmpfiles = [
"L+ %h/.config/qutebrowser/config.py - - - - ${./configs/qutebrowser/config.py}"
"L+ %h/.config/qutebrowser/theme - - - - ${./configs/qutebrowser/theme}"
(let
(
let
theme = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/deathbeam/base16-discord/refs/heads/main/themes/base16-nord.theme.css";
hash = "sha256-LofqgsVl+XKisk/dmb/PpwuLEWdEgchIfIw4xZs6LQw=";
};
in "L+ %h/.config/vesktop/themes/theme.user.css - - - - ${theme}")
in
"L+ %h/.config/vesktop/themes/theme.user.css - - - - ${theme}"
)
"L+ %h/.config/vesktop/settings/quickCss.css - - - - ${./configs/vesktop/quickCss.css}"
"L+ %h/.config/kanshi/ - - - - ${./configs/kanshi}"
"L+ %h/.config/dunst/ - - - - ${./configs/dunst}"
@ -25,8 +29,7 @@
"L+ %h/.face.icon - - - - ${./.face.icon}"
];
packages = builtins.attrValues {
inherit
(pkgs)
inherit (pkgs)
eww
wget
vesktop-electron32

View file

@ -2,11 +2,14 @@
inputs,
self,
...
}: {
flake.lib = let
}:
{
flake.lib =
let
inherit (inputs.nixpkgs.lib) nixosSystem;
inherit (builtins) mapAttrs;
mkHost = {
mkHost =
{
hostname,
system,
extraModules ? [ ],
@ -14,9 +17,10 @@
}:
nixosSystem {
inherit system;
specialArgs = {inherit inputs self;} // extraSpecialArgs;
modules =
[
specialArgs = {
inherit inputs self;
} // extraSpecialArgs;
modules = [
../hosts/${hostname}
self.nixosModules.default
{
@ -44,14 +48,16 @@
};
systemd.oomd = {
enableRootSlice = true;
extraConfig = {DefaultMemoryPressureDurationSec = "20s";};
extraConfig = {
DefaultMemoryPressureDurationSec = "20s";
};
};
}
]
++ extraModules;
] ++ extraModules;
};
mkHosts = mapAttrs (hostname: args: mkHost (args // { inherit hostname; }));
in {
in
{
inherit mkHosts;
};
}

View file

@ -1,17 +1,20 @@
{inputs, ...}: {
{ inputs, ... }:
{
imports = [
inputs.git-hooks-nix.flakeModule
];
perSystem = {
perSystem =
{
config,
pkgs,
...
}: {
}:
{
pre-commit = {
check.enable = true;
settings.hooks = {
alejandra.enable = true;
nixfmt-rfc-style.enable = true;
nil.enable = true;
shellcheck.enable = true;
prettier.enable = true;
@ -30,15 +33,14 @@
};
devShells = {
default = let
default =
let
inherit (config) pre-commit;
in
pkgs.mkShell {
name = "pre-commit-shell";
shellHook = pre-commit.installationScript;
packages =
pre-commit.settings.enabledPackages
++ [
packages = pre-commit.settings.enabledPackages ++ [
pre-commit.settings.package
pkgs.ruff-lsp
pkgs.bash-language-server
@ -49,8 +51,7 @@
name = "haskell";
packages = builtins.attrValues {
inherit (pkgs) ghc;
inherit
(pkgs.haskellPackages)
inherit (pkgs.haskellPackages)
stack
haskell-language-server
ormolu