[nix] Set up a system for specifying packages

This commit is contained in:
Alyxia Sother 2023-06-09 13:31:06 +02:00
parent 370a8881b5
commit 73e9992f7e
No known key found for this signature in database
GPG key ID: 01E16C4E775A37E4

View file

@ -1,28 +1,48 @@
# hosts/YourHostName/default.nix
{ pkgs, dotfiles, ... }:
let
packageSets = with pkgs; rec {
base = [
jq
ripgrep
];
languages = [];
tooling = [];
multimedia = [];
everything = base ++ languages ++ tooling ++ multimedia;
};
in
{
imports = [];
# Make sure the nix daemon always runs
services.nix-daemon.enable = true;
# Installs a version of nix, that dosen't need "experimental-features = nix-command flakes" in /etc/nix/nix.conf
# services.nix-daemon.package = pkgs.nixFlakes;
# enable the gpg agent by default
programs.gnupg.agent.enable = true;
# if you use zsh (the default on new macOS installations),
# you'll need to enable this so nix-darwin creates a zshrc sourcing needed environment changes
programs.zsh.enable = true;
# Make sure to set the correct values, or everything will break! (in reality,
# it will just not build)
users.users.alyxia = {
name = "alyxia";
home = "/Users/alyxia";
};
# enable the gpg agent by default
programs.gnupg.agent.enable = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.alyxia = { pkgs, ... }: {
home = {
packages = packageSets.everything;
};
programs.zsh = {
enable = true;
initExtra = ''