flake: create common.nix for common options for all hosts
This commit is contained in:
parent
a3edf577dc
commit
1035c45548
3 changed files with 48 additions and 10 deletions
47
hosts/common.nix
Normal file
47
hosts/common.nix
Normal 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";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -36,6 +36,7 @@ inputs: let
|
||||||
(flatten (
|
(flatten (
|
||||||
concatLists [
|
concatLists [
|
||||||
(singleton ./${hostname}/default.nix)
|
(singleton ./${hostname}/default.nix)
|
||||||
|
(singleton ./common.nix)
|
||||||
(
|
(
|
||||||
filter (hasSuffix "module.nix") (
|
filter (hasSuffix "module.nix") (
|
||||||
map toString (listFilesRecursive ../modules)
|
map toString (listFilesRecursive ../modules)
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
{, ...}: rec {
|
|
||||||
module = {
|
|
||||||
config = {
|
|
||||||
environment.sessionVariables.EDITOR = "hx";
|
|
||||||
environment.systemPackages = builtins.attrValues {
|
|
||||||
inherit (packages) fish helix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue