Skip to content

Commit

Permalink
Merge pull request #37 from isabelroses/refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Nov 9, 2023
2 parents ebbc256 + e2d39e9 commit 6b6ad98
Show file tree
Hide file tree
Showing 421 changed files with 52 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .sops.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
keys:
- &isabel age1882yv8el2gg07yfzsd0ul46qpvarn39g45za8uxx03v2ww56vdyqa37qcp
creation_rules:
- path_regex: modules/common/secrets/[^/]+\.yaml$
- path_regex: modules/base/common/secrets/[^/]+\.yaml$
- key_groups:
- age:
- *isabel
2 changes: 0 additions & 2 deletions home/isabel/programs/cli/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
_: {
imports = [
./confs

./shared.nix
./desktop.nix
./wayland.nix
Expand Down
23 changes: 15 additions & 8 deletions home/isabel/programs/cli/desktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@
osConfig,
lib,
pkgs,
inputs',
...
}: let
inherit (lib) mkIf isAcceptedDevice;
inherit (lib) mkIf isAcceptedDevice optionals;
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];

cfg = osConfig.modules.programs;
in {
config = mkIf ((isAcceptedDevice osConfig acceptedTypes) && osConfig.modules.programs.cli.enable) {
home.packages = with pkgs; [
libnotify # needed for some notifcations
bitwarden-cli # bitwarden, my chosen package manager
trash-cli # `rm` skips the "rubish bin", this cli tool uses that
brightnessctl # brightness managed via cli
];
config = mkIf ((isAcceptedDevice osConfig acceptedTypes) && cfg.cli.enable && cfg.gui.enable) {
home.packages = with pkgs;
[
libnotify # needed for some notifcations
bitwarden-cli # bitwarden, my chosen package manager
trash-cli # `rm` skips the "rubish bin", this cli tool uses that
brightnessctl # brightness managed via cli
]
++ optionals cfg.cli.modernShell.enable [
inputs'.catppuccin-toolbox.packages.catwalk
];
};
}
1 change: 0 additions & 1 deletion home/isabel/programs/cli/shared.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ in {
]
++ optionals cfg.cli.modernShell.enable [
ripgrep
inputs'.catppuccin-toolbox.packages.catwalk
];
};
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
_: {
imports = [
./shells

./bat.nix
./eza.nix
./git.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.
8 changes: 8 additions & 0 deletions home/isabel/programs/configs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
_: {
imports = [
./cli # command line interface app confurations
./editors # text editor / IDE configurations
./gui # graphical interface app confurations
./tui # terminal interface app confurations
];
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
config = lib.mkIf osConfig.modules.programs.editors.micro.enable {
programs.micro = {
enable = true;
# catppuccin.enable = true;
catppuccin.enable = true;
settings = {
"autosu" = true;
"clipboard" = "terminal";
"colorscheme" = "catppuccin-mocha";
"eofnewline" = false;
"savecursor" = true;
"statusformatl" = "$(filename) @($(line):$(col)) $(modified)| $(opt:filetype) $(opt:encoding)";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ in {
enable = true;
catppuccin.enable = true;
settings = {
color_theme = "catppuccin_mocha";
vim_keys = true;
rounded_corners = true;
};
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions home/isabel/programs/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
_: {
imports = [
./cli # command line applications
./editors # not all editors are GUI so they don't fit into the current catagories
./configs # app confiurations
./gui # graphical applications
./scripts # useful shell scrips
./shells # shell configurations
./tui # terminal interface applications
./wm # window managers
# TODO DE's
Expand Down
2 changes: 1 addition & 1 deletion home/isabel/programs/gui/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_: {
imports = [
./confs
./gaming

./shared.nix
./wayland.nix
Expand Down
4 changes: 0 additions & 4 deletions home/isabel/programs/tui/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
lib,
...
}: {
imports = [
./confs
];

config = lib.mkIf osConfig.modules.programs.tui.enable {
home.packages = with pkgs; [
wishlist # fancy ssh
Expand Down
33 changes: 15 additions & 18 deletions hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,39 @@

# modules
modulePath = ../modules; # the base module path
options = modulePath + /options; # the module options for quick configuration

# common modules, these are shared across all systems
commonModules = modulePath + /common; # the base directory for the common module
core = commonModules + /core; # defaults for all systems
secrets = commonModules + /secrets; # shhh
# base modules, are the basis of this system configuration and are shared across all systems
baseModules = modulePath + /base; # the base directory for the common module
common = baseModules + /common; # defaults for all systems
options = baseModules + /options; # the module options for quick configuration

# hardware types, providing improved defaults and system preformance improvements
deviceType = commonModules + /types; # the base directory for the types module
server = deviceType + /server; # for server type configurations
laptop = deviceType + /laptop; # for laptop type configurations
desktop = deviceType + /desktop; # for desktop type configurations
workstation = deviceType + /workstation; # for server type configurations
#hybrid = [server laptop]; # combine the server and laptop configurations for the best of both worlds
# profiles are hardware based, system optimised defaults
profilesModule = modulePath + /profiles; # the base directory for the types module
server = profilesModule + /server; # for server type configurations
laptop = profilesModule + /laptop; # for laptop type configurations
desktop = profilesModule + /desktop; # for desktop type configurations
workstation = profilesModule + /workstation; # for server type configurations

# extra modules
extraModules = modulePath + /extra; # the base directory for the extra module
sharedModules = extraModules + /shared; # the base directory for the shared module

## home-manager
# home-manager
home = ../home; # home-manager configurations, used if hm is enabled
homes = [hm home]; # combine hm input module and the home module, confiuration modules

# a list of shared modules
shared = [
core # default shared across all system configuratons
common # default shared across all system configuratons
options # amazing quick settings module
sharedModules # sharing is careing, this mainly contains: hm and nixos (if any) modules
cat # catppucin for the quick themeing
secrets # shh
];

# extraSpecialArgs that are on all machines
sharedArgs = {inherit inputs self lib;};
in {
# super rubbish laptop
hydra = mkNixosSystem {
inherit withSystem;
system = "x86_64-linux";
Expand All @@ -60,13 +58,11 @@ in {
++ concatLists [
shared
homes
/*
hybrid
*/
];
specialArgs = sharedArgs;
};

# super cool gamer pc
amatarasu = mkNixosSystem {
inherit withSystem;
system = "x86_64-linux";
Expand All @@ -80,6 +76,7 @@ in {
specialArgs = sharedArgs;
};

# hertzner cloud computer
bernie = mkNixosSystem {
inherit withSystem;
system = "x86_64-linux";
Expand Down
8 changes: 8 additions & 0 deletions modules/base/common/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
_: {
imports = [
./host # host configurations
./gaming # super cool procrastinations related things
./secrets # shhh
./services # allows for per-system system services to be enabled
];
}
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.
Loading

0 comments on commit 6b6ad98

Please sign in to comment.