apply statix lints
Signed-off-by: fau <fau@faukah.com> Change-Id: I6a6a696442c7de5f519287ef8b3d80668973ef48
This commit is contained in:
parent
6ae25f23cf
commit
03067acb8d
5 changed files with 37 additions and 40 deletions
10
default.nix
10
default.nix
|
@ -4,14 +4,14 @@ let
|
||||||
# https://github.com/andir/npins?tab=readme-ov-file#using-the-nixpkgs-fetchers
|
# https://github.com/andir/npins?tab=readme-ov-file#using-the-nixpkgs-fetchers
|
||||||
src = import ./npins;
|
src = import ./npins;
|
||||||
pkgs = import src.nixpkgs { };
|
pkgs = import src.nixpkgs { };
|
||||||
sources = mapAttrs (k: v: v { inherit pkgs; }) src;
|
sources = mapAttrs (_: v: v { inherit pkgs; }) src;
|
||||||
|
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (lib.filesystem) listFilesRecursive;
|
inherit (lib.filesystem) listFilesRecursive;
|
||||||
inherit (lib.strings) hasSuffix;
|
inherit (lib.strings) hasSuffix;
|
||||||
|
|
||||||
mkSystem =
|
mkSystem =
|
||||||
system: hostname:
|
hostname:
|
||||||
import (src.nixpkgs + "/nixos/lib/eval-config.nix") {
|
import (src.nixpkgs + "/nixos/lib/eval-config.nix") {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit sources;
|
inherit sources;
|
||||||
|
@ -28,7 +28,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
temperance = mkSystem "x86_64-linux" "temperance";
|
temperance = mkSystem "temperance";
|
||||||
hermit = mkSystem "x86_64-linux" "hermit";
|
hermit = mkSystem "hermit";
|
||||||
tower = mkSystem "aarch64-linux" "tower";
|
tower = mkSystem "tower";
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ in
|
||||||
directory = config.users.users.${username}.home;
|
directory = config.users.users.${username}.home;
|
||||||
clobberFiles = mkForce true;
|
clobberFiles = mkForce true;
|
||||||
};
|
};
|
||||||
extraModules = ((listFilesRecursive ./.) |> filter (hasSuffix ".hjem.nix"));
|
extraModules = (listFilesRecursive ./.) |> filter (hasSuffix ".hjem.nix");
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit sources;
|
inherit sources;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
# We have to disable this and use nix-index instead. (Rust >>> Pearl)
|
# We have to disable this and use nix-index instead. (Rust >>> Pearl)
|
||||||
|
|
|
@ -20,43 +20,41 @@ in
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
config.nixpkgs.pkgs = (
|
config.nixpkgs.pkgs = import sources.nixpkgs {
|
||||||
import sources.nixpkgs {
|
inherit (pkgs.stdenv) hostPlatform;
|
||||||
hostPlatform = pkgs.stdenv.hostPlatform;
|
overlays = [ ];
|
||||||
overlays = [ ];
|
config = {
|
||||||
config = {
|
# Configuration reference:
|
||||||
# Configuration reference:
|
# <https://nixos.org/manual/nixpkgs/unstable/#chap-packageconfig>
|
||||||
# <https://nixos.org/manual/nixpkgs/unstable/#chap-packageconfig>
|
# Disallow broken packages to be built.
|
||||||
# Disallow broken packages to be built.
|
allowBroken = false;
|
||||||
allowBroken = false;
|
|
||||||
|
|
||||||
allowUnsupportedSystem = true;
|
allowUnsupportedSystem = true;
|
||||||
|
|
||||||
# Warn when config contains an unrecognized attribute.
|
# Warn when config contains an unrecognized attribute.
|
||||||
# This might be useful for getting a better configuration.
|
# This might be useful for getting a better configuration.
|
||||||
warnUndeclaredOptions = true;
|
warnUndeclaredOptions = true;
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
|
|
||||||
# Permitted insecure packages in a system.
|
# Permitted insecure packages in a system.
|
||||||
# Default to none, add more as necessary.
|
# Default to none, add more as necessary.
|
||||||
# Matrix also likes using deprecated libraries, which tend to go into this list.
|
# Matrix also likes using deprecated libraries, which tend to go into this list.
|
||||||
# permittedInsecurePackages = [];
|
# permittedInsecurePackages = [];
|
||||||
|
|
||||||
# Whether to set enableParallelBuilding to true by default while
|
# Whether to set enableParallelBuilding to true by default while
|
||||||
# building nixpkgs packages. Changing the default causes a mass rebuild.
|
# building nixpkgs packages. Changing the default causes a mass rebuild.
|
||||||
enableParallelBuildingByDefault = false;
|
enableParallelBuildingByDefault = false;
|
||||||
|
|
||||||
# Whether to expose old attribute names for compatibility.
|
# Whether to expose old attribute names for compatibility.
|
||||||
# This improves backwards compatibility,
|
# This improves backwards compatibility,
|
||||||
# which I could not care less about in my configuration.
|
# which I could not care less about in my configuration.
|
||||||
allowAliases = false;
|
allowAliases = false;
|
||||||
|
|
||||||
# List of derivation warnings to display while rebuilding.
|
# List of derivation warnings to display while rebuilding.
|
||||||
# See: <https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/check-meta.nix>
|
# See: <https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/check-meta.nix>
|
||||||
showDerivationWarnings = [ ];
|
showDerivationWarnings = [ ];
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
ralc = pkgsFor.${system}.callPackage ./nix/package.nix { };
|
ralc = pkgsFor.${system}.callPackage ./nix/package.nix { };
|
||||||
});
|
});
|
||||||
|
|
||||||
devShells = mapAttrs (system: pkgs: {
|
devShells = mapAttrs (_: pkgs: {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
cargo
|
cargo
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue