Skip to content

Commit

Permalink
refactor(flake): actually make use of the asterisms
Browse files Browse the repository at this point in the history
  • Loading branch information
airone01 committed Dec 5, 2024
1 parent f5aa1db commit ed0d7ab
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 127 deletions.
20 changes: 20 additions & 0 deletions asterisms/base.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{stars, ...}: {
# Imports for the base asterism (profile)
imports = with stars; [
# Network core
core-direnv
core-sops
core-unfree

# Dev core
dev-core
dev-garnix

# Hardware settings
hard-graphics
hard-nvidia

# airone01-specific
r1-git
];
}
72 changes: 0 additions & 72 deletions asterisms/default.nix

This file was deleted.

32 changes: 32 additions & 0 deletions asterisms/desktop.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{stars, ...}: {
imports = with stars; [
# Asterism-unspecific stuff
./base.nix

# CLI tools/apps
cli-btop
cli-eza
cli-nvim
cli-oh-my-posh
cli-zellij
cli-zsh

# GUI tools/apps
gui-cursor
gui-gnome
gui-kitty
gui-firefox
gui-steam

# Core components
core-docker
core-font
core-gh
core-pipewire

# Networking
net-network-manager

#dev-rust # TODO: Move to direnv
];
}
15 changes: 15 additions & 0 deletions asterisms/server.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{stars, ...}: {
imports = with stars; [
# Asterism-unspecific stuff
./base.nix

# CLI tools/apps
cli-btop
cli-eza
cli-zellij
cli-zsh

# Core components
core-gh
];
}
31 changes: 3 additions & 28 deletions constellations/cassiopeia/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,13 @@
time.timeZone = "Europe/Paris";

imports = with stars; [
../../asterisms/desktop.nix

boot-plymouth
cli-btop
cli-eza
cli-nvim
cli-oh-my-posh
cli-zellij
cli-zsh
core-direnv
core-docker
core-font
core-gh
core-pipewire
core-sops
core-unfree
dev-core
dev-garnix
dev-rust
gui-cursor # cannot allow unfree since pkgs is passed to NixOS, hence not available yet.
# See https://discourse.nixos.org/t/allowunfree-doesnt-work-with-flake-managed-system/21798/4
# See https://github.com/NixOS/nixpkgs/issues/191910
gui-gnome
gui-kitty
gui-firefox
#gui-schizofox
gui-steam
hard-graphics
hard-nvidia
kbd-fr
net-network-manager
r1-git
];

# TODO: move that to its own star, and handle secrets with sops
home-manager.users.${config.stars.mainUser}.home.packages = with pkgs; [mullvad-vpn];
services.mullvad-vpn.enable = true;
}
14 changes: 1 addition & 13 deletions constellations/cetus/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@
time.timeZone = "Europe/Paris";

imports = with stars; [
cli-btop
cli-eza
cli-oh-my-posh
cli-zellij
cli-zsh
core-docker
core-font
core-gh
core-sops
core-unfree
dev-core
dev-garnix
r1-git
../../asterisms/server.nix
];
}
15 changes: 2 additions & 13 deletions constellations/hercules/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,8 @@
time.timeZone = "Europe/Paris";

imports = with stars; [
cli-btop
cli-eza
cli-oh-my-posh
cli-zellij
cli-zsh
core-docker
core-font
core-gh
core-sops
core-unfree
dev-core
dev-garnix
r1-git
../../asterisms/server.nix

srv-hydra
srv-gitea
srv-traefik
Expand Down
1 change: 0 additions & 1 deletion constellations/ursamajor/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_: {
# hostname
networking.hostName = "ursamajor";
stars.mainUser = "nixos";

Expand Down

0 comments on commit ed0d7ab

Please sign in to comment.