[nix] Redo and restructure the entire config

Thanks @KaitlynEthylia :)
This commit is contained in:
Alyxia Sother 2024-07-11 19:07:47 +02:00
parent 19b92cd8fd
commit 2daf5f1b05
No known key found for this signature in database
GPG key ID: 01E16C4E775A37E4
13 changed files with 378 additions and 302 deletions

20
nix/system/default.nix Normal file
View file

@ -0,0 +1,20 @@
{ importAll, ... }:
{
imports = importAll [] ./.;
users.users.alyxia = {
name = "alyxia";
home = "/Users/alyxia";
};
# 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;
# tailscaled isn't automatically registered as a service that should run on installation.
services.tailscale.enable = true;
}

90
nix/system/homebrew.nix Normal file
View file

@ -0,0 +1,90 @@
{ ... }:
{
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
cleanup = "zap";
upgrade = true;
};
taps = [
"drud/ddev"
"homebrew/cask-versions"
"int128/kubelogin"
];
# Please do not the brew.
brews = [
"bear"
"composer"
"croc"
"ddev"
"deno"
"dotnet"
"ferium"
"gradle"
"kubelogin"
"mkcert"
"nss"
"pinentry-mac"
"pkg-config"
"poetry"
"rustup"
"sdl2"
# Fyra crap, but from Homebrew because someone doesn't know how to
# package libraries in nixpkgs
"appstream-glib"
"glib"
"gobject-introspection"
"gsettings-desktop-schemas"
"gtk4"
"gtksourceview5"
"libgee"
];
casks = [
"1password"
"1password-cli"
"alt-tab"
"android-studio"
"audacity"
"background-music"
"browserstacklocal"
"db-browser-for-sqlite"
"discord"
"discord-ptb"
"docker"
"firefox"
"firefox-developer-edition"
"goland"
"google-chrome"
"intellij-idea"
"itch"
"iterm2"
"lens"
"minecraft"
"obs"
"orbstack"
"phpstorm"
"plexamp"
"raycast"
"readdle-spark"
"rider"
"rubymine"
"sequel-ace"
"shottr"
"slack"
"spotify"
"steam"
"texifier"
"thunderbird"
"transmit"
"typora"
"visual-studio-code"
"wine-stable"
];
};
}

20
nix/system/nix.nix Normal file
View file

@ -0,0 +1,20 @@
{ ... }:
{
services.nix-daemon.enable = true;
nix = {
settings.experimental-features = [ "nix-command" "flakes" ];
gc = {
automatic = true;
options = "--delete-older-than 8d";
};
};
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [ "python-2.7.18.8" ];
};
};
}