Switch to nixfmt

This commit is contained in:
Dave Gallant
2024-07-28 08:26:07 -04:00
parent a009dd5fe4
commit 1bfd747ebb
13 changed files with 168 additions and 271 deletions

View File

@@ -1,14 +1,12 @@
let let
nix-pre-commit-hooks = nix-pre-commit-hooks = import (builtins.fetchTarball
import (builtins.fetchTarball "https://github.com/cachix/git-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;
nixpkgs-fmt.enable = true; nixfmt.enable = true;
}; };
}; };
} }

36
flake.lock generated
View File

@@ -143,11 +143,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717408969, "lastModified": 1721902368,
"narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", "narHash": "sha256-noQ5SghRPe0jzQEbFQb3fYbV6LZEzr7lIRQoxlU7fyI=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "1ebbe68d57457c8cae98145410b164b5477761f4", "rev": "cf8c7405479cfde7ea4dc815e195391d2328df10",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -271,11 +271,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721038330, "lastModified": 1721042469,
"narHash": "sha256-DyIGJ+DEnKeGd346YJCwjmp9hXwiYq8wqGtikgbDqSc=", "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "622291c026190caf13cb26f5136616b1ff0a07aa", "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -395,11 +395,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720845312, "lastModified": 1721719500,
"narHash": "sha256-yPhAsJTpyoIPQZJGC8Fw8W2lAXyhLoTn+HP20bmfkfk=", "narHash": "sha256-nnkqjv4Y37Hydjh6HE9wW4kSkV5Q7q4iIXlL5lwUFOw=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "5ce8503cf402cf76b203eba4b7e402bea8e44abc", "rev": "884f3fe6d9bf056ba0017c132c39c1f0d07d4fec",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -441,11 +441,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1721782431, "lastModified": 1721933792,
"narHash": "sha256-UNDpwjYxNXQet/g3mgRLsQ9zxrbm9j2JEvP4ijF3AWs=", "narHash": "sha256-zYVwABlQnxpbaHMfX6Wt9jhyQstFYwN2XjleOJV3VVg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4f02464258baaf54992debfd010a7a3662a25536", "rev": "2122a9b35b35719ad9a395fe783eabb092df01b1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -485,11 +485,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1721045803, "lastModified": 1721923172,
"narHash": "sha256-dQGvOK+t45unF7DTp5bfO37hY0NkDUw6X3MH5CCTEAs=", "narHash": "sha256-IWjuOYLf2wKD0mS8FkiM1n2d1PrkTRJPP+UAIOFgWCQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "eef2f4c6b190d92e296e47e5fe10e7ced65fd959", "rev": "551fc42d2aab63bcf3709aa20ebfd7269128642d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -562,11 +562,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720930114, "lastModified": 1721769617,
"narHash": "sha256-VZK73b5hG5bSeAn97TTcnPjXUXtV7j/AtS4KN8ggCS0=", "narHash": "sha256-6Pqa0bi5nV74IZcENKYRToRNM5obo1EQ+3ihtunJ014=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "b92afa1501ac73f1d745526adc4f89b527595f14", "rev": "8db8970be1fb8be9c845af7ebec53b699fe7e009",
"type": "github" "type": "github"
}, },
"original": { "original": {

194
flake.nix
View File

@@ -20,120 +20,96 @@
stylix.url = "github:danth/stylix/release-24.05"; stylix.url = "github:danth/stylix/release-24.05";
}; };
outputs = outputs = { self, darwin, home-manager, nixpkgs, nixpkgs-unstable
{ self , nixos-hardware, stylix, ... }@inputs: {
, darwin nixosConfigurations = let
, home-manager unstable = import nixpkgs-unstable {
, nixpkgs system = "x86_64-linux";
, nixpkgs-unstable config.allowUnfree = true;
, nixos-hardware
, stylix
, ...
} @ inputs: {
nixosConfigurations =
let
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfree = true;
};
in
{
hephaestus = nixpkgs.lib.nixosSystem {
specialArgs = { inherit unstable; };
modules =
[
./fonts.nix
./machines/hephaestus/configuration.nix
./packages.nix
./services/netdata/default.nix
./upgrade-diff.nix
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
({ config
, lib
, ...
}: {
config = {
nix = {
settings = {
auto-optimise-store = true;
sandbox = false;
substituters = [ "https://davegallant.cachix.org" ];
trusted-users = [ "root" "dave" ];
trusted-public-keys = [
"davegallant.cachix.org-1:SsUMqL4+tF2R3/G6X903E9laLlY1rES2QKFfePegF08="
];
};
registry = { nixpkgs.flake = nixpkgs; };
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 14d";
};
};
nixpkgs.overlays = [
(import ./overlays)
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.dave.imports = [
./home/default.nix
inputs.nixvim.homeManagerModules.nixvim
];
extraSpecialArgs = {
inherit unstable;
};
};
};
})
];
};
}; };
in {
hephaestus = nixpkgs.lib.nixosSystem {
specialArgs = { inherit unstable; };
modules = [
./fonts.nix
./machines/hephaestus/configuration.nix
./packages.nix
./services/netdata/default.nix
./upgrade-diff.nix
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
darwinConfigurations = ({ config, lib, ... }: {
let config = {
system = "aarch64-darwin"; nix = {
unstable = import nixpkgs-unstable { settings = {
config.allowUnfree = true; auto-optimise-store = true;
inherit system; sandbox = false;
}; substituters = [ "https://davegallant.cachix.org" ];
in trusted-users = [ "root" "dave" ];
{ trusted-public-keys = [
zelus = darwin.lib.darwinSystem { "davegallant.cachix.org-1:SsUMqL4+tF2R3/G6X903E9laLlY1rES2QKFfePegF08="
inherit system;
specialArgs = { inherit unstable; };
modules = [
home-manager.darwinModules.home-manager
stylix.darwinModules.stylix
./machines/zelus/configuration.nix
./packages.nix
./upgrade-diff.nix
({ config, ... }: {
config = {
nixpkgs.overlays = [
(import ./overlays)
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users."dave.gallant".imports = [
./home/default.nix
inputs.nixvim.homeManagerModules.nixvim
]; ];
extraSpecialArgs = { };
inherit unstable; registry = { nixpkgs.flake = nixpkgs; };
}; gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 14d";
}; };
}; };
})
]; nixpkgs.overlays = [ (import ./overlays) ];
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.dave.imports = [
./home/default.nix
inputs.nixvim.homeManagerModules.nixvim
];
extraSpecialArgs = { inherit unstable; };
};
};
})
];
}; };
};
darwinConfigurations = let
system = "aarch64-darwin";
unstable = import nixpkgs-unstable {
config.allowUnfree = true;
inherit system;
};
in {
zelus = darwin.lib.darwinSystem {
inherit system;
specialArgs = { inherit unstable; };
modules = [
home-manager.darwinModules.home-manager
stylix.darwinModules.stylix
./machines/zelus/configuration.nix
./packages.nix
./upgrade-diff.nix
({ config, ... }: {
config = {
nixpkgs.overlays = [ (import ./overlays) ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users."dave.gallant".imports = [
./home/default.nix
inputs.nixvim.homeManagerModules.nixvim
];
extraSpecialArgs = { inherit unstable; };
};
};
})
];
};
};
}; };
} }

View File

@@ -1,12 +1,6 @@
{ lib { lib, pkgs, unstable, ... }:
, pkgs let inherit (pkgs) stdenv;
, unstable in {
, ...
}:
let
inherit (pkgs) stdenv;
in
{
home.stateVersion = "24.05"; home.stateVersion = "24.05";
home.packages = with pkgs; [ just ]; home.packages = with pkgs; [ just ];
@@ -23,13 +17,7 @@ in
opacity.terminal = 1.0; opacity.terminal = 1.0;
fonts.sizes = fonts.sizes =
if stdenv.isLinux if stdenv.isLinux then { terminal = 20; } else { terminal = 16; };
then {
terminal = 20;
}
else {
terminal = 16;
};
fonts.monospace = { fonts.monospace = {
name = "FiraCode Nerd Font Mono"; name = "FiraCode Nerd Font Mono";
@@ -77,14 +65,17 @@ in
d = "diff"; d = "diff";
dc = "diff --cached"; dc = "diff --cached";
dcn = "diff --cached --name-only"; dcn = "diff --cached --name-only";
ds = "! git diff origin | sed -r 's/value: (.*)/value: \"************\"/'"; ds =
l = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"; "! git diff origin | sed -r 's/value: (.*)/value: \"************\"/'";
l =
"log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
ms = "merge --squash"; ms = "merge --squash";
p = "push origin"; p = "push origin";
pf = "push -f"; pf = "push -f";
pl = "! git pull origin $(git rev-parse --abbrev-ref HEAD)"; pl = "! git pull origin $(git rev-parse --abbrev-ref HEAD)";
st = "status"; st = "status";
wip = "for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads"; wip =
"for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads";
}; };
includes = [{ path = "~/.gitconfig-work"; }]; includes = [{ path = "~/.gitconfig-work"; }];
@@ -118,9 +109,7 @@ in
add_newline = false; add_newline = false;
scan_timeout = 10; scan_timeout = 10;
character = { error_symbol = "[](bold red)"; }; character = { error_symbol = "[](bold red)"; };
gcloud = { gcloud = { format = ""; };
format = "";
};
kubernetes = { kubernetes = {
disabled = false; disabled = false;
context_aliases = { context_aliases = {
@@ -212,9 +201,7 @@ in
v = "nvim"; v = "nvim";
}; };
"oh-my-zsh" = { "oh-my-zsh" = { enable = true; };
enable = true;
};
}; };
alacritty = { alacritty = {
@@ -233,9 +220,7 @@ in
}; };
}; };
go = { go = { enable = true; };
enable = true;
};
tmux = { tmux = {
enable = true; enable = true;
@@ -327,9 +312,7 @@ in
''; '';
}; };
fzf = { fzf = { enable = true; };
enable = true;
};
nixvim = { nixvim = {
enable = true; enable = true;
@@ -340,14 +323,12 @@ in
key = "<C-n>"; key = "<C-n>";
mode = [ "n" ]; mode = [ "n" ];
action = "<cmd>tabnew<cr>"; action = "<cmd>tabnew<cr>";
options = { options = { silent = true; };
silent = true;
};
} }
{ {
key = "<leader>y"; key = "<leader>y";
mode = [ "v" ]; mode = [ "v" ];
action = "\"+y"; # copy to OS clipboard action = ''"+y''; # copy to OS clipboard
} }
{ {
key = "<leader>t"; key = "<leader>t";
@@ -425,11 +406,7 @@ in
enable = true; enable = true;
settings.defaults = { settings.defaults = {
layout_strategy = "vertical"; layout_strategy = "vertical";
layout_config = { layout_config = { vertical = { width = 0.9; }; };
vertical = {
width = 0.9;
};
};
}; };
package = pkgs.vimPlugins.telescope-fzy-native-nvim; package = pkgs.vimPlugins.telescope-fzy-native-nvim;
}; };
@@ -438,10 +415,7 @@ in
autoindent = true; autoindent = true;
backup = false; backup = false;
belloff = "all"; belloff = "all";
completeopt = [ completeopt = [ "menuone" "noselect" ];
"menuone"
"noselect"
];
cursorline = true; cursorline = true;
expandtab = true; expandtab = true;
fillchars = { fillchars = {
@@ -527,8 +501,7 @@ in
ms-dotnettools.csharp ms-dotnettools.csharp
ms-kubernetes-tools.vscode-kubernetes-tools ms-kubernetes-tools.vscode-kubernetes-tools
redhat.vscode-yaml redhat.vscode-yaml
] ] ++ lib.optionals stdenv.isLinux [
++ lib.optionals stdenv.isLinux [
ms-vsliveshare.vsliveshare ms-vsliveshare.vsliveshare
ms-python.python ms-python.python
]; ];
@@ -549,7 +522,8 @@ in
"dom.push.enabled" = false; "dom.push.enabled" = false;
"geo.enabled" = false; "geo.enabled" = false;
"intl.regional_prefs.use_os_locales" = true; "intl.regional_prefs.use_os_locales" = true;
"services.sync.prefs.sync.intl.regional._prefs.use_os_locates" = false; "services.sync.prefs.sync.intl.regional._prefs.use_os_locates" =
false;
}; };
name = "dev-edition-default"; name = "dev-edition-default";
path = "6b7pm104.dev-edition-default"; path = "6b7pm104.dev-edition-default";

View File

@@ -21,7 +21,7 @@ update:
@./nix-flake-update.sh @./nix-flake-update.sh
fmt: fmt:
nixpkgs-fmt . nixfmt .
clean: clean:
echo 'Cleaning user...' echo 'Cleaning user...'

View File

@@ -1,10 +1,4 @@
{ config { config, lib, modulesPath, pkgs, unstable, ... }:
, lib
, modulesPath
, pkgs
, unstable
, ...
}:
let let
gnomeExtensions = with pkgs.gnomeExtensions; [ gnomeExtensions = with pkgs.gnomeExtensions; [
appindicator appindicator
@@ -18,16 +12,17 @@ let
tailscale-status tailscale-status
tray-icons-reloaded tray-icons-reloaded
]; ];
in in {
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
stylix = { stylix = {
enable = true; enable = true;
base16Scheme = "${unstable.base16-schemes}/share/themes/tokyo-night-dark.yaml"; base16Scheme =
"${unstable.base16-schemes}/share/themes/tokyo-night-dark.yaml";
image = pkgs.fetchurl { image = pkgs.fetchurl {
url = "https://github.com/davegallant/nix-config/blob/main/nixos-wallpaper.png?raw=true"; url =
"https://github.com/davegallant/nix-config/blob/main/nixos-wallpaper.png?raw=true";
sha256 = "Ztqn9+CHslr6wZdnOTeo/YNi/ICerpcFLyMArsZ/PIY="; sha256 = "Ztqn9+CHslr6wZdnOTeo/YNi/ICerpcFLyMArsZ/PIY=";
}; };
polarity = "dark"; polarity = "dark";
@@ -35,9 +30,7 @@ in
}; };
boot = { boot = {
extraModulePackages = with config.boot.kernelPackages; [ extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];
xpadneo
];
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-amd" ];
kernelPackages = pkgs.linuxPackages; kernelPackages = pkgs.linuxPackages;
@@ -55,23 +48,15 @@ in
supportedFilesystems = [ "ntfs" ]; supportedFilesystems = [ "ntfs" ];
initrd = { initrd = {
availableKernelModules = [ availableKernelModules =
"ahci" [ "ahci" "nvme" "sd_mod" "usb_storage" "usbhid" "xhci_pci" ];
"nvme"
"sd_mod"
"usb_storage"
"usbhid"
"xhci_pci"
];
luks.devices."root" = { luks.devices."root" = {
allowDiscards = true; allowDiscards = true;
device = "/dev/disk/by-uuid/21cd166c-1528-49a4-b31b-0d408d48aa80"; device = "/dev/disk/by-uuid/21cd166c-1528-49a4-b31b-0d408d48aa80";
preLVM = true; preLVM = true;
keyFile = "./keyfile0.bin"; keyFile = "./keyfile0.bin";
}; };
secrets = { secrets = { "keyfile0.bin" = "/etc/secrets/initrd/keyfile0.bin"; };
"keyfile0.bin" = "/etc/secrets/initrd/keyfile0.bin";
};
}; };
}; };
@@ -123,8 +108,7 @@ in
wine64 wine64
wireshark-qt wireshark-qt
zoom-us zoom-us
] ] ++ gnomeExtensions;
++ gnomeExtensions;
fileSystems = { fileSystems = {
"/" = { "/" = {
@@ -149,9 +133,8 @@ in
}; };
}; };
swapDevices = [ swapDevices =
{ device = "/dev/disk/by-uuid/5d6d0388-2b15-4ff1-9f0f-391818a76090"; } [{ device = "/dev/disk/by-uuid/5d6d0388-2b15-4ff1-9f0f-391818a76090"; }];
];
nixpkgs = { nixpkgs = {
hostPlatform = "x86_64-linux"; hostPlatform = "x86_64-linux";
@@ -164,9 +147,7 @@ in
networking = { networking = {
iproute2.enable = true; iproute2.enable = true;
hostName = "hephaestus"; hostName = "hephaestus";
interfaces.enp34s0 = { interfaces.enp34s0 = { useDHCP = true; };
useDHCP = true;
};
firewall = { firewall = {
allowPing = false; allowPing = false;
enable = true; enable = true;
@@ -175,18 +156,14 @@ in
}; };
}; };
systemd.services = { systemd.services = { NetworkManager-wait-online.enable = false; };
NetworkManager-wait-online.enable = false;
};
system = { system = {
autoUpgrade.enable = true; autoUpgrade.enable = true;
stateVersion = "24.05"; stateVersion = "24.05";
}; };
nix = { nix = { extraOptions = "experimental-features = nix-command flakes"; };
extraOptions = "experimental-features = nix-command flakes";
};
users.users.dave = { users.users.dave = {
isNormalUser = true; isNormalUser = true;
@@ -200,7 +177,8 @@ in
hardware = { hardware = {
opengl.enable = true; opengl.enable = true;
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
pulseaudio.enable = true; pulseaudio.enable = true;
# Vulkan # Vulkan
opengl.driSupport = true; opengl.driSupport = true;

View File

@@ -1,8 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
let let checkBrew = "command -v brew > /dev/null";
checkBrew = "command -v brew > /dev/null"; in {
in
{
nixpkgs = { nixpkgs = {
config = { config = {
allowUnfree = true; allowUnfree = true;
@@ -58,7 +56,7 @@ in
NSGlobalDomain = { NSGlobalDomain = {
"com.apple.sound.beep.feedback" = 0; "com.apple.sound.beep.feedback" = 0;
"com.apple.sound.beep.volume" = 0.000; "com.apple.sound.beep.volume" = 0.0;
ApplePressAndHoldEnabled = false; ApplePressAndHoldEnabled = false;
InitialKeyRepeat = 10; InitialKeyRepeat = 10;
KeyRepeat = 2; KeyRepeat = 2;
@@ -71,9 +69,7 @@ in
enable = true; enable = true;
onActivation.autoUpdate = false; onActivation.autoUpdate = false;
onActivation.upgrade = false; onActivation.upgrade = false;
global = { global = { brewfile = true; };
brewfile = true;
};
brews = [ brews = [
"azure-cli" "azure-cli"

View File

@@ -1,9 +1,4 @@
{ lib { lib, fetchFromGitHub, pkgs, stdenv, }:
, fetchFromGitHub
, pkgs
, stdenv
,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "sbx-h6-rgb"; pname = "sbx-h6-rgb";
version = "95b4ef9788ef94e557a4d1e815079d5ea8a70943"; version = "95b4ef9788ef94e557a4d1e815079d5ea8a70943";
@@ -15,9 +10,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-tKKNdzijloBiGBHf5C604824B/BbxBxvCL/ms4orT9M="; sha256 = "sha256-tKKNdzijloBiGBHf5C604824B/BbxBxvCL/ms4orT9M=";
}; };
buildInputs = with pkgs; [ buildInputs = with pkgs; [ hidapi ];
hidapi
];
buildPhase = '' buildPhase = ''
make make
@@ -35,4 +28,3 @@ stdenv.mkDerivation rec {
}; };
} }

View File

@@ -1,8 +1,4 @@
{ stdenv { stdenv, lib, fetchurl, }:
, lib
, fetchurl
,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "tmux-sessionizer"; pname = "tmux-sessionizer";
version = "0.0.0"; version = "0.0.0";
@@ -17,8 +13,8 @@ stdenv.mkDerivation rec {
''; '';
meta = with lib; { meta = with lib; {
description = " description =
Tmux sessionizer adapted from https://sourcegraph.com/github.com/ThePrimeagen/.dotfiles@5cd09f06d6683b91c26822a73b40e3d7fb9af57a/-/blob/bin/.local/bin/tmux-sessionizer"; "\n Tmux sessionizer adapted from https://sourcegraph.com/github.com/ThePrimeagen/.dotfiles@5cd09f06d6683b91c26822a73b40e3d7fb9af57a/-/blob/bin/.local/bin/tmux-sessionizer";
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }

View File

@@ -1,8 +1,4 @@
{ lib { lib, fetchFromGitHub, buildGoModule, }:
, fetchFromGitHub
, buildGoModule
,
}:
buildGoModule rec { buildGoModule rec {
pname = "vpngate"; pname = "vpngate";
version = "v0.2.0"; version = "v0.2.0";

View File

@@ -1,13 +1,6 @@
{ config { config, lib, pkgs, unstable, ... }:
, lib let inherit (pkgs) stdenv;
, pkgs in {
, unstable
, ...
}:
let
inherit (pkgs) stdenv;
in
{
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# essentials # essentials
curl curl
@@ -93,7 +86,7 @@ in
# nix # nix
nix-tree nix-tree
nixpkgs-fmt nixfmt-rfc-style
nixpkgs-review nixpkgs-review
# python # python

View File

@@ -1,13 +1,9 @@
{ 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 = {

View File

@@ -1,9 +1,11 @@
let let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05"; nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
pkgs = import nixpkgs { config = { }; overlays = [ ]; }; pkgs = import nixpkgs {
in config = { };
overlays = [ ];
};
pkgs.mkShell { in pkgs.mkShell {
shellHook = '' shellHook = ''
${(import ./default.nix).pre-commit-check.shellHook} ${(import ./default.nix).pre-commit-check.shellHook}
''; '';