❄️ Dotfiles for our NixOS system configuration.

refactor(home): split apart packages into categories

Chloe A 83d72d39 5be668cd

+2
home/chloe/default.nix
···
{
imports = [
./catppuccin.nix
./docs.nix
./files.nix
./packages
./programs
];
xdg.enable = true;
···
{
imports = [
+
./autostart.nix
./catppuccin.nix
./docs.nix
./files.nix
./packages
./programs
+
./scripts.nix
];
xdg.enable = true;
+7 -2
home/chloe/packages/autostart.nix home/chloe/autostart.nix
···
-
{ lib, osConfig, pkgs, ... }:
{
config = lib.mkIf osConfig.settings.profiles.graphical.enable {
xdg.configFile = {
# .desktop files for autostart only work on Linux with XDG
-
"autostart/1password.desktop" = lib.mkIf pkgs.stdenv.isLinux {
text = ''
[Desktop Entry]
Name=1Password
···
+
{
+
lib,
+
osConfig,
+
pkgs,
+
...
+
}:
{
config = lib.mkIf osConfig.settings.profiles.graphical.enable {
xdg.configFile = {
# .desktop files for autostart only work on Linux with XDG
+
"autostart/1password.desktop" = lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
text = ''
[Desktop Entry]
Name=1Password
+14
home/chloe/packages/base.nix
···
···
+
{ pkgs }:
+
+
with pkgs;
+
[
+
# dev tools
+
nodejs
+
deno
+
cloudflared
+
corepack_latest
+
bun
+
+
# other
+
_1password-cli
+
]
+15
home/chloe/packages/darwin.nix
···
···
+
{
+
pkgs,
+
lib,
+
osConfig,
+
}:
+
+
let
+
packages = with pkgs; [
+
# tools
+
shottr
+
];
+
in
+
lib.optionals (
+
osConfig.settings.profiles.graphical.enable && pkgs.stdenv.hostPlatform.isDarwin
+
) packages
+7 -10
home/chloe/packages/default.nix
···
-
{
pkgs,
lib,
-
osConfig,
...
}:
let
-
defaultPackages = import ./list/default.nix { inherit pkgs; };
-
guiPackages = import ./list/gui.nix { inherit pkgs lib osConfig; };
in
{
-
imports = [
-
./autostart.nix
-
./scripts.nix
-
];
-
config = {
-
home.packages = defaultPackages ++ guiPackages;
};
}
···
+
{
pkgs,
lib,
+
osConfig,
...
}:
let
+
basePackages = import ./base.nix { inherit pkgs; };
+
darwinPackages = import ./darwin.nix { inherit pkgs lib osConfig; };
+
linuxPackages = import ./linux.nix { inherit pkgs lib osConfig; };
+
universalPackages = import ./universal.nix { inherit pkgs lib osConfig; };
in
{
config = {
+
home.packages = basePackages ++ darwinPackages ++ linuxPackages ++ universalPackages;
};
}
+32
home/chloe/packages/linux.nix
···
···
+
{
+
pkgs,
+
lib,
+
osConfig,
+
}:
+
+
let
+
packages = with pkgs; [
+
# messengers
+
telegram-desktop
+
vesktop
+
+
# dev tools
+
httpie-desktop
+
+
# mail
+
thunderbird
+
+
# games
+
xivlauncher
+
+
# messengers
+
discord
+
+
# other GUI apps
+
obs-studio
+
_1password-gui
+
];
+
in
+
lib.optionals (
+
osConfig.settings.profiles.graphical.enable && pkgs.stdenv.hostPlatform.isLinux
+
) packages
-19
home/chloe/packages/list/default.nix
···
-
{ pkgs }:
-
-
with pkgs; [
-
# dev tools
-
nodejs
-
deno
-
cloudflared
-
corepack_latest
-
bun
-
-
# fonts
-
iosevka
-
inter
-
atkinson-hyperlegible
-
nerd-fonts.jetbrains-mono
-
-
# other
-
_1password-cli
-
]
···
-31
home/chloe/packages/list/gui.nix
···
-
{ pkgs, lib, osConfig }:
-
-
let
-
# Common GUI packages available on all platforms
-
commonPackages = with pkgs; [
-
# cloud
-
owncloud-client
-
-
# messengers
-
telegram-desktop
-
vesktop
-
-
# notes
-
obsidian
-
-
# dev tools
-
zed-editor
-
httpie-desktop
-
-
# mail
-
thunderbird
-
-
# games
-
prismlauncher
-
xivlauncher
-
-
# other GUI apps
-
obs-studio
-
_1password-gui
-
];
-
in lib.optionals osConfig.settings.profiles.graphical.enable commonPackages
···
home/chloe/packages/scripts.nix home/chloe/scripts.nix
+25
home/chloe/packages/universal.nix
···
···
+
{
+
pkgs,
+
lib,
+
osConfig,
+
}:
+
+
let
+
packages = with pkgs; [
+
# dev tools
+
zed-editor
+
+
# fonts
+
iosevka
+
inter
+
atkinson-hyperlegible
+
nerd-fonts.jetbrains-mono
+
+
# games
+
prismlauncher
+
+
# notes
+
obsidian
+
];
+
in
+
lib.optionals osConfig.settings.profiles.graphical.enable packages