Skip to content

Commit

Permalink
refactor: more sane profile structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Swarsel committed Jan 1, 2025
1 parent a73f0e8 commit 2257a42
Show file tree
Hide file tree
Showing 123 changed files with 204 additions and 347 deletions.
314 changes: 157 additions & 157 deletions SwarselSystems.org

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
inputs.sops-nix.nixosModules.sops
inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm
inputs.nix-topology.nixosModules.default
./profiles/common/nixos
./profiles/nixos/common
];

# Home-Manager modules wanted on non-NixOS systems
Expand All @@ -112,7 +112,7 @@
mixedModules = [
inputs.sops-nix.homeManagerModules.sops
inputs.nix-index-database.hmModules.nix-index
./profiles/common/home
./profiles/home/common
];

in
Expand Down
4 changes: 2 additions & 2 deletions hosts/darwin/nbm-imba-166/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ let
in
{
imports = [
"${profilesPath}/darwin/common/nixos"
"${profilesPath}/darwin/nixos/common"

inputs.home-manager.darwinModules.home-manager
{
home-manager.users."leon.schwarzaeugl".imports = [
"${profilesPath}/darwin/common/home"
"${profilesPath}/darwin/home"
] ++ (builtins.attrValues outputs.homeManagerModules);
}
] ++ (builtins.attrValues outputs.nixosModules);
Expand Down
2 changes: 1 addition & 1 deletion hosts/nixos/chaostheatre/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ in

./hardware-configuration.nix

"${profilesPath}/optional/nixos/autologin.nix"
"${profilesPath}/nixos/optional/autologin.nix"

inputs.home-manager.nixosModules.home-manager
{
Expand Down
2 changes: 1 addition & 1 deletion hosts/nixos/iso/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ in
inputs.home-manager.nixosModules.home-manager
{
home-manager.users.swarsel.imports = [
"${self}/profiles/common/home/settings.nix"
"${self}/profiles/home/common/settings.nix"
] ++ (builtins.attrValues outputs.homeManagerModules);
}
];
Expand Down
16 changes: 8 additions & 8 deletions hosts/nixos/nbl-imba-2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ in
./hardware-configuration.nix
./disk-config.nix

"${profilesPath}/optional/nixos/virtualbox.nix"
# "${profilesPath}/optional/nixos/vmware.nix"
"${profilesPath}/optional/nixos/autologin.nix"
"${profilesPath}/optional/nixos/nswitch-rcm.nix"
"${profilesPath}/optional/nixos/gaming.nix"
"${profilesPath}/optional/nixos/work.nix"
"${profilesPath}/nixos/optional/virtualbox.nix"
# "${profilesPath}/nixos/optional/vmware.nix"
"${profilesPath}/nixos/optional/autologin.nix"
"${profilesPath}/nixos/optional/nswitch-rcm.nix"
"${profilesPath}/nixos/optional/gaming.nix"
"${profilesPath}/nixos/optional/work.nix"

inputs.home-manager.nixosModules.home-manager
{
home-manager.users.swarsel.imports = outputs.mixedModules ++ [
"${profilesPath}/optional/home/gaming.nix"
"${profilesPath}/optional/home/work.nix"
"${profilesPath}/home/optional/gaming.nix"
"${profilesPath}/home/optional/work.nix"
] ++ (builtins.attrValues outputs.homeManagerModules);
}
] ++ (builtins.attrValues outputs.nixosModules);
Expand Down
4 changes: 2 additions & 2 deletions hosts/nixos/sync/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ in
imports = [

inputs.sops-nix.nixosModules.sops
"${profilesPath}/server/nixos"
"${profilesPath}/nixos/server"
./hardware-configuration.nix

inputs.home-manager.nixosModules.home-manager
{
home-manager.users.swarsel.imports = [
"${profilesPath}/server/home"
"${profilesPath}/home/server"
] ++ (builtins.attrValues outputs.homeManagerModules);
}

Expand Down
24 changes: 12 additions & 12 deletions hosts/nixos/toto/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ in
inputs.impermanence.nixosModules.impermanence
inputs.lanzaboote.nixosModules.lanzaboote

"${profilesPath}/optional/nixos/autologin.nix"
"${profilesPath}/common/nixos/settings.nix"
"${profilesPath}/common/nixos/home-manager.nix"
"${profilesPath}/common/nixos/xserver.nix"
"${profilesPath}/common/nixos/users.nix"
"${profilesPath}/common/nixos/impermanence.nix"
"${profilesPath}/common/nixos/lanzaboote.nix"
"${profilesPath}/common/nixos/sops.nix"
"${profilesPath}/server/nixos/ssh.nix"
"${profilesPath}/nixos/optional/autologin.nix"
"${profilesPath}/nixos/common/settings.nix"
"${profilesPath}/nixos/common/home-manager.nix"
"${profilesPath}/nixos/common/xserver.nix"
"${profilesPath}/nixos/common/users.nix"
"${profilesPath}/nixos/common/impermanence.nix"
"${profilesPath}/nixos/common/lanzaboote.nix"
"${profilesPath}/nixos/common/sops.nix"
"${profilesPath}/nixos/server/ssh.nix"

inputs.home-manager.nixosModules.home-manager
{
home-manager.users.swarsel.imports = [
inputs.sops-nix.homeManagerModules.sops
"${profilesPath}/common/home/settings.nix"
"${profilesPath}/common/home/sops.nix"
"${profilesPath}/common/home/ssh.nix"
"${profilesPath}/home/common/settings.nix"
"${profilesPath}/home/common/sops.nix"
"${profilesPath}/home/common/ssh.nix"

] ++ (builtins.attrValues outputs.homeManagerModules);
}
Expand Down
6 changes: 3 additions & 3 deletions hosts/nixos/winters/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ in

./hardware-configuration.nix

"${profilesPath}/optional/nixos/autologin.nix"
"${profilesPath}/server/nixos"
"${profilesPath}/nixos/optional/autologin.nix"
"${profilesPath}/nixos/server"

inputs.home-manager.nixosModules.home-manager
{
home-manager.users.swarsel.imports = [
"${profilesPath}/server/home"
"${profilesPath}/home/server"
] ++ (builtins.attrValues outputs.homeManagerModules);
}

Expand Down
89 changes: 0 additions & 89 deletions profiles/common/disks/btrfs-luks.nix

This file was deleted.

8 changes: 0 additions & 8 deletions profiles/common/nixos/emacs.nix

This file was deleted.

4 changes: 0 additions & 4 deletions profiles/common/nixos/safeeyes.nix

This file was deleted.

2 changes: 1 addition & 1 deletion profiles/darwin/home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ let
in
{
imports = [
"${profilesPath}/common/home/settings.nix"
"${profilesPath}/home/common/settings.nix"
];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let
in
{
imports = [
"${profilesPath}/common/home/settings.nix"
"${profilesPath}/home/common/settings.nix"
./symlink.nix
];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ let
in
{
imports = [
"${profilesPath}/common/nixos/settings.nix"
"${profilesPath}/common/nixos/home-manager.nix"
"${profilesPath}/common/nixos/xserver.nix"
"${profilesPath}/common/nixos/gc.nix"
"${profilesPath}/common/nixos/store.nix"
"${profilesPath}/common/nixos/time.nix"
"${profilesPath}/common/nixos/users.nix"
"${profilesPath}/common/nixos/nix-ld.nix"
"${profilesPath}/nixos/common/settings.nix"
"${profilesPath}/nixos/common/home-manager.nix"
"${profilesPath}/nixos/common/xserver.nix"
"${profilesPath}/nixos/common/gc.nix"
"${profilesPath}/nixos/common/store.nix"
"${profilesPath}/nixos/common/time.nix"
"${profilesPath}/nixos/common/users.nix"
"${profilesPath}/nixos/common/nix-ld.nix"
./settings.nix
./packages.nix
./sops.nix
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions profiles/optional/nixos/steam.nix

This file was deleted.

32 changes: 0 additions & 32 deletions profiles/server/nixos/calibre.nix

This file was deleted.

12 changes: 6 additions & 6 deletions templates/hosts/nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ in
./hardware-configuration.nix
./disk-config.nix

"${profilesPath}/optional/nixos/virtualbox.nix"
# "${profilesPath}/optional/nixos/vmware.nix"
"${profilesPath}/optional/nixos/autologin.nix"
"${profilesPath}/optional/nixos/nswitch-rcm.nix"
"${profilesPath}/optional/nixos/gaming.nix"
"${profilesPath}/nixos/optional/virtualbox.nix"
# "${profilesPath}/nixos/optional/vmware.nix"
"${profilesPath}/nixos/optional/autologin.nix"
"${profilesPath}/nixos/optional/nswitch-rcm.nix"
"${profilesPath}/nixos/optional/gaming.nix"

inputs.home-manager.nixosModules.home-manager
{
home-manager.users.swarsel.imports = outputs.mixedModules ++ [
"${profilesPath}/optional/home/gaming.nix"
"${profilesPath}/home/optional/gaming.nix"
] ++ (builtins.attrValues outputs.homeManagerModules);
}
] ++ (builtins.attrValues outputs.nixosModules);
Expand Down

0 comments on commit 2257a42

Please sign in to comment.