Skip to content

Commit

Permalink
style: Add statix
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Dec 20, 2023
1 parent 32c0ac4 commit 33b8cd8
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,13 @@
systems = [
"x86_64-linux"
];
perSystem = {...}: {
perSystem = _: {
treefmt = {
projectRootFile = ".git/config";
programs.alejandra.enable = true;
programs.deadnix.enable = true;
programs.prettier.enable = true;
programs.statix.enable = true;
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion hosts/framework/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# https://github.com/NixOS/nixpkgs/issues/171136#issuecomment-1627779037
security.pam.services.login.fprintAuth = false;
# similarly to how other distributions handle the fingerprinting login
security.pam.services.gdm-fingerprint = lib.mkIf (config.services.fprintd.enable) {
security.pam.services.gdm-fingerprint = lib.mkIf config.services.fprintd.enable {
text = ''
auth required pam_shells.so
auth requisite pam_nologin.so
Expand Down
2 changes: 1 addition & 1 deletion lib/nixos.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ in {
];
};

mapHosts = dir: attrs @ {...}:
mapHosts = dir: attrs:
mapModules dir (hostPath: mkHost hostPath attrs);
}
4 changes: 2 additions & 2 deletions modules/editors/emacs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
with lib;
with lib.my; let
cfg = config.modules.editors.emacs;
configDir = config.dotfiles.configDir;
inherit (config.dotfiles) configDir;
in {
options.modules.editors.emacs = {
enable = mkBoolOpt false;
Expand Down Expand Up @@ -44,7 +44,7 @@ in {
fd # faster projectile indexing
ffmpeg # whisper.el
imagemagick # for image-dired
(mkIf (config.programs.gnupg.agent.enable)
(mkIf config.programs.gnupg.agent.enable
pinentry-emacs) # in-emacs gnupg prompts
zstd # for undo-fu-session/undo-tree compression

Expand Down
4 changes: 2 additions & 2 deletions modules/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ with lib.my; {
type = attrsOf (oneOf [str path (listOf (either str path))]);
apply = mapAttrs (_n: v:
if isList v
then concatMapStringsSep ":" (x: toString x) v
then concatMapStringsSep ":" toString v
else (toString v));
default = {};
description = "TODO";
Expand Down Expand Up @@ -76,7 +76,7 @@ with lib.my; {
file = mkAliasDefinitions options.home.file;
# Necessary for home-manager to work with flakes, otherwise it will
# look for a nixpkgs channel.
stateVersion = config.system.stateVersion;
inherit (config.system) stateVersion;
};
xdg = {
configFile = mkAliasDefinitions options.home.configFile;
Expand Down
2 changes: 1 addition & 1 deletion modules/security.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{...}: {
_: {
## System security tweaks
boot.tmp.useTmpfs = true;
security.protectKernelImage = true;
Expand Down
2 changes: 1 addition & 1 deletion modules/shell/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
with lib;
with lib.my; let
cfg = config.modules.shell.zsh;
configDir = config.dotfiles.configDir;
inherit (config.dotfiles) configDir;
in {
options.modules.shell.zsh = with types; {
enable = mkBoolOpt false;
Expand Down
2 changes: 1 addition & 1 deletion modules/themes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ in {
''gtk-theme-name="${cfg.gtk.theme}"''}
${optionalString (cfg.gtk.iconTheme != "")
''gtk-icon-theme-name="${cfg.gtk.iconTheme}"''}
gtk-font-name="Sans ${toString (cfg.fonts.sans.size)}"
gtk-font-name="Sans ${toString cfg.fonts.sans.size}"
'';
# QT4/5 global theme
"Trolltech.conf".text = ''
Expand Down

0 comments on commit 33b8cd8

Please sign in to comment.