chore!(flake): Update inputs

This update required a change to 'nixfmt' which got replaced by either
'nixfmt-classic' or 'nixfmt-rfc-style' - I settled with the latter thus
the required whitespace change.
This commit is contained in:
Alexander Kobjolke 2024-04-19 22:35:30 +02:00
parent 5a37f8c449
commit 340be14a8d
3 changed files with 195 additions and 129 deletions

176
flake.nix
View file

@ -42,88 +42,116 @@
disko.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, home-manager, nixpkgs, pre-commit-hooks, ... }@inputs: {
checks."x86_64-linux" = let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
settings = { ormolu.defaultExtensions = [ "GHC2021" ]; };
tools.fourmolu = pkgs.haskellPackages.fourmolu;
hooks = {
nixfmt.enable = true;
fourmolu.enable = true;
hpack.enable = true;
hlint.enable = true;
};
};
};
nixosConfigurations."thrall" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
({ inputs, lib, ... }: {
nixpkgs = {
config.allowUnfree = true;
overlays = with inputs; [ emacs.overlay ];
};
})
./hosts/thrall
home-manager.nixosModules.home-manager
outputs =
{
self,
home-manager,
nixpkgs,
pre-commit-hooks,
...
}@inputs:
{
checks."x86_64-linux" =
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
{ home-manager.users.alex = ./hosts/thrall/alex.nix; }
];
};
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
tools.fourmolu = pkgs.haskellPackages.fourmolu;
tools.nixfmt = pkgs.nixfmt-rfc-style;
hooks = {
nixfmt.enable = true;
fourmolu.enable = true;
hpack.enable = true;
hlint.enable = true;
ormolu = {
settings.defaultExtensions = [ "GHC2021" ];
};
};
};
};
nixosConfigurations."dregil" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [ ./hosts/dregil ];
};
nixosConfigurations."igor" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [ ./hosts/igor ];
};
nixOnDroidConfigurations.default = with inputs;
nix-on-droid.lib.nixOnDroidConfiguration {
nixosConfigurations."thrall" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
./hosts/redmi
{ nix.registry.nixpkgs.flake = nixpkgs-droid; }
{ nix.nixPath = [ "nixpkgs=${nixpkgs-droid}" ]; }
(
{ inputs, lib, ... }:
{
nixpkgs = {
config.allowUnfree = true;
overlays = with inputs; [ emacs.overlay ];
};
}
)
./hosts/thrall
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
{ home-manager.users.alex = ./hosts/thrall/alex.nix; }
];
};
devShells."x86_64-linux".default = let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in pkgs.haskellPackages.shellFor {
inherit (self.checks.${system}.pre-commit-check) shellHook;
nixosConfigurations."dregil" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [ ./hosts/dregil ];
};
packages = p: [ p.xmonad p.xmonad-contrib ];
nixosConfigurations."igor" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [ ./hosts/igor ];
};
withHoogle = true;
nixOnDroidConfigurations.default =
with inputs;
nix-on-droid.lib.nixOnDroidConfiguration {
modules = [
./hosts/redmi
{ nix.registry.nixpkgs.flake = nixpkgs-droid; }
{ nix.nixPath = [ "nixpkgs=${nixpkgs-droid}" ]; }
];
};
nativeBuildInputs = with pkgs; [
haskellPackages.haskell-language-server
haskellPackages.fourmolu
haskellPackages.hspec-discover
haskellPackages.doctest
haskellPackages.xmonad
haskellPackages.xmonad-contrib
cabal-install
ghcid
nixfmt
hpack
hlint
];
devShells."x86_64-linux".default =
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
pkgs.haskellPackages.shellFor {
inherit (self.checks.${system}.pre-commit-check) shellHook;
packages = p: [
p.xmonad
p.xmonad-contrib
];
withHoogle = true;
nativeBuildInputs = with pkgs; [
haskellPackages.haskell-language-server
haskellPackages.fourmolu
haskellPackages.hspec-discover
haskellPackages.doctest
haskellPackages.xmonad
haskellPackages.xmonad-contrib
cabal-install
ghcid
nixfmt-rfc-style
hpack
hlint
];
};
};
};
}