flake: create common.nix for common options for all hosts

This commit is contained in:
Charlie Root 2025-03-03 15:56:59 +01:00
commit 1035c45548
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
3 changed files with 48 additions and 10 deletions

47
hosts/common.nix Normal file
View file

@ -0,0 +1,47 @@
# This is for packages I want in all systems.
# Keeping this list as small as possible is important,
# since these also get installed to server,
# which should have a small attack surface.
{
self,
pkgs,
...
}: let
inherit (self.packages.${pkgs.stdenv.system}) helix fish;
in {
environment.systemPackages = builtins.attrValues {
inherit
(pkgs)
cachix
calc
difftastic
eza
gcc
git
httpie
inetutils
jujutsu
just
lazygit
links2
linuxHeaders
neofetch
microfetch
nmap
polkit
ripgrep
smartmontools
trash-cli
util-linux
wireguard-tools
zip
zoxide
;
inherit helix fish;
};
# helix as the only editor, a reasonable choice.
environment.sessionVariables.EDITOR = pkgs.lib.getExe' helix "hx";
}

View file

@ -36,6 +36,7 @@ inputs: let
(flatten (
concatLists [
(singleton ./${hostname}/default.nix)
(singleton ./common.nix)
(
filter (hasSuffix "module.nix") (
map toString (listFilesRecursive ../modules)