diff --git a/.sops.yaml b/.sops.yaml index 1a52266..9593357 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -3,28 +3,6 @@ keys: - &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q - &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74 creation_rules: - - path_regex: homebox/secrets.yaml$ - key_groups: - - age: - - *homebox - - path_regex: laptop/secrets.yaml$ - key_groups: - - age: - - *laptop - - path_regex: pi4/secrets.yaml$ - key_groups: - - age: - - *laptop - - path_regex: live/secrets.yaml$ - key_groups: - - age: - - *laptop - - path_regex: nathan/secrets.yaml$ - key_groups: - - age: - - *laptop - - *homebox - - *android - path_regex: system/secrets.yaml$ key_groups: - age: diff --git a/homes/nathan/home-manager/.sops.yaml b/homes/nathan/home-manager/.sops.yaml new file mode 100644 index 0000000..45c4006 --- /dev/null +++ b/homes/nathan/home-manager/.sops.yaml @@ -0,0 +1,11 @@ +keys: + - &homebox age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd + - &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q + - &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74 +creation_rules: + - path_regex: ^secrets.yaml$ + key_groups: + - age: + - *laptop + - *homebox + - *android diff --git a/homes/nathan/home-manager/default.nix b/homes/nathan/home-manager/default.nix index 551484b..7bf52df 100644 --- a/homes/nathan/home-manager/default.nix +++ b/homes/nathan/home-manager/default.nix @@ -1,11 +1,13 @@ { config, lib, pkgs, inputs, ... }: { - imports = [ - ./programs - ./services - ./packages - ./dotfiles - ]; + imports = let + dir = builtins.readDir ./.; + in (builtins.map (x: ./${x}) (builtins.filter + (file: (dir.${file} == "directory")) + (builtins.attrNames dir) + )) ++ [ + inputs.sops.homeManagerModules.sops + ]; options.homeconfig = with lib; { diff --git a/homes/nathan/home-manager/packages/default.nix b/homes/nathan/home-manager/packages/default.nix index b2c2f3c..1617ca2 100644 --- a/homes/nathan/home-manager/packages/default.nix +++ b/homes/nathan/home-manager/packages/default.nix @@ -22,8 +22,6 @@ home.packages = with pkgs; [ - inputs.disko.packages.${pkgs.stdenv.hostPlatform.system}.disko-install - kjv openssh sops @@ -77,7 +75,7 @@ (mkIf (!config.homeconfig.minimal && config.homeconfig.graphical) { - nixpkgs.config = mkIf (!config.homeconfig.minimal) { + nixpkgs.config = { allowUnfree = true; }; diff --git a/homes/nathan/home-manager/programs/default.nix b/homes/nathan/home-manager/programs/default.nix index 5c71834..cd11330 100644 --- a/homes/nathan/home-manager/programs/default.nix +++ b/homes/nathan/home-manager/programs/default.nix @@ -1,18 +1,12 @@ { config, lib, pkgs, inputs, ... }: { - imports = [ - ./git - ./nh - ./hyprland - ./hyprpanel - ./terminal - ./rofi - ./pywal - ./hyprlock - ./calcurse - ./firefox - ./quickshell - ]; + imports = let + dir = builtins.readDir ./.; + in builtins.map (x: ./${x}) (builtins.filter + (file: (dir.${file} == "directory")) + (builtins.attrNames dir) + ); + config = { diff --git a/homes/nathan/home-manager/services/default.nix b/homes/nathan/home-manager/services/default.nix index d2e0900..8c32d01 100644 --- a/homes/nathan/home-manager/services/default.nix +++ b/homes/nathan/home-manager/services/default.nix @@ -1,5 +1,9 @@ { ... }: { - imports = [ - ./mpd - ]; + + imports = let + dir = builtins.readDir ./.; + in builtins.map (x: ./${x}) (builtins.filter + (file: (dir.${file} == "directory")) + (builtins.attrNames dir) + ); } diff --git a/machines/android b/machines/android index a642257..9338682 160000 --- a/machines/android +++ b/machines/android @@ -1 +1 @@ -Subproject commit a642257fb33d9b0fdaef04c48cfde5debd076cc9 +Subproject commit 933868232cb4a2db0e4949a971ff24e7a8a58c17 diff --git a/system/packages/default.nix b/system/packages/default.nix index 6a43f1a..a9e7dd7 100644 --- a/system/packages/default.nix +++ b/system/packages/default.nix @@ -1,6 +1,7 @@ -{ pkgs, ... }: { +{ pkgs, disko, ... }: { environment.systemPackages = with pkgs; [ sops + disko.packages.${pkgs.stdenv.hostPlatform.system}.disko-install ]; }