Formats files

main
Abhinav Sarkar 2024-01-31 19:23:23 +05:30
parent cac568aa82
commit 8904d08571
8 changed files with 12 additions and 38 deletions

View File

@ -1,4 +1 @@
{ pkgs, inputs, ... }: { pkgs, inputs, ... }: { imports = [ ./nix.nix ./system.nix ]; }
{
imports = [./nix.nix ./system.nix];
}

View File

@ -40,8 +40,7 @@
inherit system; inherit system;
config = { allowUnfree = true; }; config = { allowUnfree = true; };
}; };
in in {
{
darwinConfigurations."Abhinavs-MacBook-Pro" = nix-darwin.lib.darwinSystem { darwinConfigurations."Abhinavs-MacBook-Pro" = nix-darwin.lib.darwinSystem {
inherit system; inherit system;
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };

View File

@ -1,5 +1,4 @@
{ config, pkgs, inputs, ... }: { config, pkgs, inputs, ... }: {
{
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
nix = { nix = {
package = pkgs.nixFlakes; package = pkgs.nixFlakes;
@ -26,7 +25,7 @@
max-jobs = 6; max-jobs = 6;
min-free = 128000000; min-free = 128000000;
warn-dirty = false; warn-dirty = false;
trusted-users = ["@admin"]; trusted-users = [ "@admin" ];
}; };
}; };
nixpkgs = { nixpkgs = {

View File

@ -12,23 +12,8 @@ let
statix statix
cachix cachix
]; ];
networkingPackages = with pkgs; [ networkingPackages = with pkgs; [ curl dig httpie openssh mosh ];
curl cmdLineUtilPackages = with pkgs; [ bash broot coreutils-full fd gnugrep less ranger tree ];
dig
httpie
openssh
mosh
];
cmdLineUtilPackages = with pkgs; [
bash
broot
coreutils-full
fd
gnugrep
less
ranger
tree
];
miscPackages = with pkgs; [ miscPackages = with pkgs; [
binutils binutils
cabal2nix cabal2nix

View File

@ -156,7 +156,7 @@ in {
"[json]" = { editor.defaultFormatter = "esbenp.prettier-vscode"; }; "[json]" = { editor.defaultFormatter = "esbenp.prettier-vscode"; };
"[python]" = { editor.defaultFormatter = "ms-python.black-formatter"; }; "[python]" = { editor.defaultFormatter = "ms-python.black-formatter"; };
black-formatter.args = ["--line-length" "100"]; black-formatter.args = [ "--line-length" "100" ];
}; };
keybindings = [ keybindings = [

View File

@ -1,7 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let rc = pkgs.callPackage ./report-hm-changes.nix { inherit config pkgs; };
rc = pkgs.callPackage ./report-hm-changes.nix { inherit config pkgs; }; in { home.packages = [ rc ]; }
in {
home.packages = [ rc ];
}

View File

@ -1,9 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let profiles = "/nix/var/nix/profiles/per-user/${config.home.username}/profile-*-link";
profiles = "/nix/var/nix/profiles/per-user/${config.home.username}/profile-*-link"; in pkgs.writeShellScriptBin "report-hm-changes" ''
in
pkgs.writeShellScriptBin "report-hm-changes" ''
# Disable nvd if there are less than 2 hm profiles. # Disable nvd if there are less than 2 hm profiles.
if [ $(/bin/ls -d1v ${profiles} 2>/dev/null | wc -l) -lt 2 ]; then if [ $(/bin/ls -d1v ${profiles} 2>/dev/null | wc -l) -lt 2 ]; then
echo "Skipping changes report..." echo "Skipping changes report..."

View File

@ -1,5 +1,4 @@
{ pkgs, inputs, ... }: { pkgs, inputs, ... }: {
{
security.pam.enableSudoTouchIdAuth = true; security.pam.enableSudoTouchIdAuth = true;
system = { system = {
defaults = { defaults = {