From ef0d9f0bf734f1bf8bd26eb6abb87c50d6ac39f8 Mon Sep 17 00:00:00 2001 From: willemml Date: Thu, 16 Nov 2023 11:27:58 -0800 Subject: [PATCH] Enables cachix, fixes comma with sudo --- flake.lock | 10 +++++----- flake.nix | 2 +- home/packages.nix | 1 - home/programs/default.nix | 2 ++ nixos/hosts/zeus.nix | 9 ++++++++- nixos/modules/comma.nix | 5 +++++ nixos/modules/nix/cachix.nix | 12 ++++++++++++ nixos/profiles/default.nix | 4 ++-- 8 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 nixos/modules/comma.nix create mode 100644 nixos/modules/nix/cachix.nix diff --git a/flake.lock b/flake.lock index fd58a88..b79a902 100644 --- a/flake.lock +++ b/flake.lock @@ -223,15 +223,15 @@ ] }, "locked": { - "lastModified": 1699156599, - "narHash": "sha256-Qk9ZE/pG9lNIGUVNArJxL0Hc0Soa92eQPPIhcDwWinU=", - "owner": "Mic92", + "lastModified": 1699760693, + "narHash": "sha256-u/gkNUHQR/q23voqE5J4xmEWQIAqR+g3lUnCtzn0k7Y=", + "owner": "nix-community", "repo": "nix-index-database", - "rev": "5388a4002179d6778d212dc2fdcc7ac3fdbd5b65", + "rev": "8aff4ca3dee60d1422489fe8d52c2f837b3ad113", "type": "github" }, "original": { - "owner": "Mic92", + "owner": "nix-community", "repo": "nix-index-database", "type": "github" } diff --git a/flake.nix b/flake.nix index 290a504..4296eeb 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs"; - nix-index-database.url = "github:Mic92/nix-index-database"; + nix-index-database.url = "github:nix-community/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; nix-github-actions.url = "github:nix-community/nix-github-actions"; diff --git a/home/packages.nix b/home/packages.nix index a910715..d8a9fbf 100644 --- a/home/packages.nix +++ b/home/packages.nix @@ -34,7 +34,6 @@ in { cachix clang-tools cmake - comma coreutils curl docker diff --git a/home/programs/default.nix b/home/programs/default.nix index 59542f4..39fec42 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -12,6 +12,8 @@ ]; programs = { + nix-index-database.comma.enable = true; + bash.enableCompletion = true; direnv = { diff --git a/nixos/hosts/zeus.nix b/nixos/hosts/zeus.nix index b761537..eb7e625 100644 --- a/nixos/hosts/zeus.nix +++ b/nixos/hosts/zeus.nix @@ -1,8 +1,15 @@ -{pkgs, ...}: { +{ + pkgs, + inputs, + ... +}: { imports = [ ../../common/system.nix ../modules/nix/link-inputs.nix + ../modules/nix/optimise.nix ../modules/nix/use-flake-pkgs.nix + ../modules/nix/cachix.nix + ../modules/comma.nix ../users/willem/home/darwin.nix ../modules/yabai/default.nix ../modules/yabai/scripting-additions.nix diff --git a/nixos/modules/comma.nix b/nixos/modules/comma.nix new file mode 100644 index 0000000..6d6b630 --- /dev/null +++ b/nixos/modules/comma.nix @@ -0,0 +1,5 @@ +{inputs, ...}: { + imports = [inputs.nix-index-database.nixosModules.nix-index]; + programs.nix-index-database.comma.enable = true; + programs.command-not-found.enable = false; +} diff --git a/nixos/modules/nix/cachix.nix b/nixos/modules/nix/cachix.nix new file mode 100644 index 0000000..93fb0ec --- /dev/null +++ b/nixos/modules/nix/cachix.nix @@ -0,0 +1,12 @@ +{...}: { + nix.settings = { + substituters = [ + "https://willemml.cachix.org" + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "willemml.cachix.org-1:A8M1pBOuBmA6f4Pq4+VNO0r4Joi2I3DZI72V3U+YnKg=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; +} diff --git a/nixos/profiles/default.nix b/nixos/profiles/default.nix index b135918..740c53e 100644 --- a/nixos/profiles/default.nix +++ b/nixos/profiles/default.nix @@ -8,6 +8,8 @@ ../../common/system.nix ../modules/nix/use-flake-pkgs.nix ../modules/nix/optimise.nix + ../modules/nix/cachix.nix + ../modules/comma.nix ../users/willem/linux.nix ]; @@ -26,8 +28,6 @@ } ''; - programs.command-not-found.enable = false; - services.udev.enable = true; services.openssh.enable = true;