Use nixpkgs-fmt

This commit is contained in:
Dave Gallant
2024-03-05 16:03:33 -05:00
parent b05d25845c
commit 2b6fa6d5b2
17 changed files with 202 additions and 195 deletions

View File

@@ -24,4 +24,4 @@ update:
@./nix-flake-update.sh
fmt:
alejandra .
nixpkgs-fmt .

View File

@@ -1,11 +1,12 @@
{
config,
lib,
pkgs,
...
}: let
{ config
, lib
, pkgs
, ...
}:
let
checkBrew = "command -v brew > /dev/null";
in {
in
{
users.users."dave.gallant".home = "/Users/dave.gallant";
environment = {
extraInit = ''

View File

@@ -2,12 +2,13 @@ let
nix-pre-commit-hooks =
import (builtins.fetchTarball
"https://github.com/cachix/pre-commit-hooks.nix/tarball/master");
in {
in
{
pre-commit-check = nix-pre-commit-hooks.run {
src = ./.;
hooks = {
shellcheck.enable = true;
alejandra.enable = true;
nixpkgs-fmt.enable = true;
};
};
}

View File

@@ -1,11 +1,12 @@
{
lib,
pkgs,
unstable,
...
}: let
{ lib
, pkgs
, unstable
, ...
}:
let
inherit (pkgs) stdenv;
in {
in
{
home.stateVersion = "23.11";
services = {

View File

@@ -1,9 +1,9 @@
{
config,
pkgs,
unstable,
...
}: let
{ config
, pkgs
, unstable
, ...
}:
let
gnomeExtensions = with pkgs.gnomeExtensions; [
appindicator
bluetooth-quick-connect
@@ -17,7 +17,8 @@
tailscale-status
tray-icons-reloaded
];
in {
in
{
imports = [ ./hardware.nix ];
hardware.opengl.enable = true;

View File

@@ -1,9 +1,8 @@
{
config,
lib,
pkgs,
modulesPath,
...
{ config
, lib
, pkgs
, modulesPath
, ...
}: {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

View File

@@ -1,14 +1,14 @@
{
self,
darwin,
home-manager,
nixpkgs,
nixpkgs-unstable,
nixos-hardware,
nix-ld,
...
{ self
, darwin
, home-manager
, nixpkgs
, nixpkgs-unstable
, nixos-hardware
, nix-ld
, ...
} @ inputs: {
nixosConfigurations = let
nixosConfigurations =
let
modulesDir = ./modules;
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
@@ -23,11 +23,10 @@
./packages.nix
./upgrade-diff.nix
({
config,
lib,
lib',
...
({ config
, lib
, lib'
, ...
}: {
config = {
_module.args = {
@@ -70,7 +69,8 @@
};
})
];
in {
in
{
hephaestus = nixpkgs.lib.nixosSystem {
specialArgs = { inherit unstable; };
modules =
@@ -83,13 +83,15 @@
};
};
darwinConfigurations = let
darwinConfigurations =
let
system = "aarch64-darwin";
unstable = import nixpkgs-unstable {
config.allowUnfree = true;
inherit system;
};
in {
in
{
zelus = darwin.lib.darwinSystem {
inherit system;
specialArgs = { inherit unstable; };

View File

@@ -1,7 +1,7 @@
{
stdenv,
lib,
fetchurl,
{ stdenv
, lib
, fetchurl
,
}:
stdenv.mkDerivation rec {
pname = "tmux-sessionizer";

View File

@@ -1,7 +1,7 @@
{
lib,
fetchFromGitHub,
buildGoModule,
{ lib
, fetchFromGitHub
, buildGoModule
,
}:
buildGoModule rec {
pname = "vpngate";

View File

@@ -1,12 +1,13 @@
{
config,
lib,
pkgs,
unstable,
...
}: let
{ config
, lib
, pkgs
, unstable
, ...
}:
let
inherit (pkgs) stdenv;
in {
in
{
environment.systemPackages = with pkgs; [
# essentials
curl

View File

@@ -1,12 +1,13 @@
{
config,
pkgs,
...
}: let
{ config
, pkgs
, ...
}:
let
netdata = pkgs.netdata;
netdataConf = ./netdata.conf;
netdataDir = "/var/lib/netdata";
in {
in
{
users.extraGroups.netdata.gid = 220008;
users.users.netdata.group = "netdata";
users.extraUsers.netdata = {