mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 07:13:40 +00:00
Use nixpkgs-fmt
This commit is contained in:
2
Makefile
2
Makefile
@@ -24,4 +24,4 @@ update:
|
|||||||
@./nix-flake-update.sh
|
@./nix-flake-update.sh
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
alejandra .
|
nixpkgs-fmt .
|
||||||
|
15
darwin.nix
15
darwin.nix
@@ -1,11 +1,12 @@
|
|||||||
{
|
{ config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
checkBrew = "command -v brew > /dev/null";
|
checkBrew = "command -v brew > /dev/null";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
users.users."dave.gallant".home = "/Users/dave.gallant";
|
users.users."dave.gallant".home = "/Users/dave.gallant";
|
||||||
environment = {
|
environment = {
|
||||||
extraInit = ''
|
extraInit = ''
|
||||||
|
@@ -2,12 +2,13 @@ let
|
|||||||
nix-pre-commit-hooks =
|
nix-pre-commit-hooks =
|
||||||
import (builtins.fetchTarball
|
import (builtins.fetchTarball
|
||||||
"https://github.com/cachix/pre-commit-hooks.nix/tarball/master");
|
"https://github.com/cachix/pre-commit-hooks.nix/tarball/master");
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
pre-commit-check = nix-pre-commit-hooks.run {
|
pre-commit-check = nix-pre-commit-hooks.run {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
hooks = {
|
hooks = {
|
||||||
shellcheck.enable = true;
|
shellcheck.enable = true;
|
||||||
alejandra.enable = true;
|
nixpkgs-fmt.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -1,11 +1,12 @@
|
|||||||
{
|
{ lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, unstable
|
||||||
unstable,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
inherit (pkgs) stdenv;
|
inherit (pkgs) stdenv;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
{
|
{ config
|
||||||
config,
|
, pkgs
|
||||||
pkgs,
|
, unstable
|
||||||
unstable,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
gnomeExtensions = with pkgs.gnomeExtensions; [
|
gnomeExtensions = with pkgs.gnomeExtensions; [
|
||||||
appindicator
|
appindicator
|
||||||
bluetooth-quick-connect
|
bluetooth-quick-connect
|
||||||
@@ -17,7 +17,8 @@
|
|||||||
tailscale-status
|
tailscale-status
|
||||||
tray-icons-reloaded
|
tray-icons-reloaded
|
||||||
];
|
];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ./hardware.nix ];
|
imports = [ ./hardware.nix ];
|
||||||
|
|
||||||
hardware.opengl.enable = true;
|
hardware.opengl.enable = true;
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
{
|
{ config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, modulesPath
|
||||||
modulesPath,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
38
outputs.nix
38
outputs.nix
@@ -1,14 +1,14 @@
|
|||||||
{
|
{ self
|
||||||
self,
|
, darwin
|
||||||
darwin,
|
, home-manager
|
||||||
home-manager,
|
, nixpkgs
|
||||||
nixpkgs,
|
, nixpkgs-unstable
|
||||||
nixpkgs-unstable,
|
, nixos-hardware
|
||||||
nixos-hardware,
|
, nix-ld
|
||||||
nix-ld,
|
, ...
|
||||||
...
|
|
||||||
} @ inputs: {
|
} @ inputs: {
|
||||||
nixosConfigurations = let
|
nixosConfigurations =
|
||||||
|
let
|
||||||
modulesDir = ./modules;
|
modulesDir = ./modules;
|
||||||
unstable = import nixpkgs-unstable {
|
unstable = import nixpkgs-unstable {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@@ -23,11 +23,10 @@
|
|||||||
./packages.nix
|
./packages.nix
|
||||||
./upgrade-diff.nix
|
./upgrade-diff.nix
|
||||||
|
|
||||||
({
|
({ config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, lib'
|
||||||
lib',
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
config = {
|
config = {
|
||||||
_module.args = {
|
_module.args = {
|
||||||
@@ -70,7 +69,8 @@
|
|||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
hephaestus = nixpkgs.lib.nixosSystem {
|
hephaestus = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit unstable; };
|
specialArgs = { inherit unstable; };
|
||||||
modules =
|
modules =
|
||||||
@@ -83,13 +83,15 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
darwinConfigurations = let
|
darwinConfigurations =
|
||||||
|
let
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
unstable = import nixpkgs-unstable {
|
unstable = import nixpkgs-unstable {
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
zelus = darwin.lib.darwinSystem {
|
zelus = darwin.lib.darwinSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit unstable; };
|
specialArgs = { inherit unstable; };
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{ stdenv
|
||||||
stdenv,
|
, lib
|
||||||
lib,
|
, fetchurl
|
||||||
fetchurl,
|
,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "tmux-sessionizer";
|
pname = "tmux-sessionizer";
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{ lib
|
||||||
lib,
|
, fetchFromGitHub
|
||||||
fetchFromGitHub,
|
, buildGoModule
|
||||||
buildGoModule,
|
,
|
||||||
}:
|
}:
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "vpngate";
|
pname = "vpngate";
|
||||||
|
17
packages.nix
17
packages.nix
@@ -1,12 +1,13 @@
|
|||||||
{
|
{ config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, unstable
|
||||||
unstable,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
inherit (pkgs) stdenv;
|
inherit (pkgs) stdenv;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# essentials
|
# essentials
|
||||||
curl
|
curl
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
{
|
{ config
|
||||||
config,
|
, pkgs
|
||||||
pkgs,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
netdata = pkgs.netdata;
|
netdata = pkgs.netdata;
|
||||||
netdataConf = ./netdata.conf;
|
netdataConf = ./netdata.conf;
|
||||||
netdataDir = "/var/lib/netdata";
|
netdataDir = "/var/lib/netdata";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
users.extraGroups.netdata.gid = 220008;
|
users.extraGroups.netdata.gid = 220008;
|
||||||
users.users.netdata.group = "netdata";
|
users.users.netdata.group = "netdata";
|
||||||
users.extraUsers.netdata = {
|
users.extraUsers.netdata = {
|
||||||
|
Reference in New Issue
Block a user