refactor: move home & secret files

This commit is contained in:
winston 2023-02-19 00:18:25 +01:00
parent 9e8530deb6
commit a364497901
Signed by: winston
GPG key ID: 3786770EDBC2B481
82 changed files with 32 additions and 31 deletions

1
.gitattributes vendored
View file

@ -1 +1,2 @@
flake.lock -diff flake.lock -diff
home/secrets/* -diff

2
.gitignore vendored
View file

@ -1,7 +1,7 @@
# secrets # secrets
.gitsecret/keys/random_seed .gitsecret/keys/random_seed
!*.secret !*.secret
modules/secrets.nix home/secrets/default.nix
# Generated by nix-pre-commit-hooks # Generated by nix-pre-commit-hooks
/.pre-commit-config.yaml /.pre-commit-config.yaml

View file

@ -1 +1 @@
modules/secrets.nix:bc21321a6d7bbbf00f8357ad0c1868361d7c4ad4379647f7e8807facd6093b80 home/secrets/default.nix:0e6b6e9c57743af34dd280dbafc83d5c27ca599e60c267f9eb63201ab7510856

View file

@ -70,7 +70,7 @@
sops.homeManagerModules.sops sops.homeManagerModules.sops
hyprland.homeManagerModules.default hyprland.homeManagerModules.default
]; ];
users.winston.imports = [./home.nix]; users.winston.imports = [./home];
extraSpecialArgs = { extraSpecialArgs = {
flakePath = "/home/winston/.config/nixpkgs"; flakePath = "/home/winston/.config/nixpkgs";
machine.personal = true; machine.personal = true;
@ -102,7 +102,7 @@
# TODO: remove hyprland from darwin, I just need this to work right now # TODO: remove hyprland from darwin, I just need this to work right now
hyprland.homeManagerModules.default hyprland.homeManagerModules.default
]; ];
users.winston.imports = [./home.nix]; users.winston.imports = [./home];
extraSpecialArgs = { extraSpecialArgs = {
flakePath = "/Users/winston/.config/nixpkgs"; flakePath = "/Users/winston/.config/nixpkgs";
machine.personal = true; machine.personal = true;

View file

@ -77,7 +77,7 @@
}; };
xdg.configFile."nvim" = { xdg.configFile."nvim" = {
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/neovim"; source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/neovim";
recursive = true; recursive = true;
}; };
} }

View file

@ -21,11 +21,11 @@ in {
home.file = { home.file = {
"${config.xdg.configHome}/Code/User/settings.json" = { "${config.xdg.configHome}/Code/User/settings.json" = {
enable = isLinux; enable = isLinux;
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/vscode/settings.json"; source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/settings.json";
}; };
"Library/Application Support/Code/User/settings.json" = { "Library/Application Support/Code/User/settings.json" = {
enable = isDarwin; enable = isDarwin;
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/vscode/settings.json"; source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/vscode/settings.json";
}; };
}; };
} }

View file

@ -6,7 +6,7 @@
home.sessionVariables = {TERMINAL = "wezterm";}; home.sessionVariables = {TERMINAL = "wezterm";};
xdg.configFile."wezterm" = { xdg.configFile."wezterm" = {
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/wezterm"; source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/wezterm";
recursive = true; recursive = true;
}; };
} }

View file

@ -104,8 +104,8 @@ in {
}; };
xdg.configFile = { xdg.configFile = {
"lsd" = symlink "modules/lsd" {recursive = true;}; "lsd" = symlink "home/apps/lsd" {recursive = true;};
"starship.toml" = symlink "modules/starship/config.toml" {}; "starship.toml" = symlink "home/apps/starship/config.toml" {};
"zsh/functions" = symlink "modules/zsh/functions" {recursive = true;}; "zsh/functions" = symlink "home/apps/zsh/functions" {recursive = true;};
}; };
} }

View file

@ -9,23 +9,23 @@
in { in {
imports = imports =
[ [
./modules/firefox.nix ./apps/firefox.nix
./modules/git.nix ./apps/git.nix
./modules/gpg.nix ./apps/gpg.nix
./modules/i3.nix ./apps/i3.nix
./modules/kubernetes.nix ./apps/kubernetes.nix
./modules/mail.nix ./apps/mail.nix
./modules/music.nix ./apps/music.nix
./modules/neovim.nix ./apps/neovim.nix
./modules/newsboat.nix ./apps/newsboat.nix
./modules/rice.nix ./apps/rice.nix
./modules/sops.nix ./apps/vscode.nix
./modules/vscode.nix ./apps/wayland.nix
./modules/wayland.nix ./apps/wezterm.nix
./modules/wezterm.nix ./apps/zsh.nix
./modules/zsh.nix ./secrets/sops.nix
] ]
++ lib.optionals (builtins.pathExists ./modules/secrets.nix) [./modules/secrets.nix]; ++ lib.optionals (builtins.pathExists ./secrets/default.nix) [./secrets];
home = { home = {
packages = with pkgs; ([ packages = with pkgs; ([

Binary file not shown.

View file

@ -14,12 +14,12 @@
then "${config.home.homeDirectory}/Library/Fonts/${fontname}.otf" then "${config.home.homeDirectory}/Library/Fonts/${fontname}.otf"
else throw "Unsupported platform"; else throw "Unsupported platform";
format = "binary"; format = "binary";
sopsFile = ../home/fonts/${fontname}.json; sopsFile = ./fonts/${fontname}.json;
}; };
in { in {
sops = { sops = {
gnupg.home = "${config.xdg.configHome}/gnupg"; gnupg.home = "${config.xdg.configHome}/gnupg";
defaultSopsFile = ../secrets.yaml; defaultSopsFile = ./main.yaml;
secrets = { secrets = {
"kubernetes-work-prod".path = "${config.xdg.configHome}/kube/work-prod"; "kubernetes-work-prod".path = "${config.xdg.configHome}/kube/work-prod";
"berkeley_regular" = fontMapping "berkeley_regular"; "berkeley_regular" = fontMapping "berkeley_regular";

View file

@ -11,7 +11,7 @@ boot: secret-stage && secret-unstage
sudo nixos-rebuild boot --flake . sudo nixos-rebuild boot --flake .
secret-stage: secret-stage:
git add -f modules/secrets.nix git add -f home/secrets/default.nix
secret-unstage: secret-unstage:
git restore --staged modules/secrets.nix git restore --staged home/secrets/default.nix

Binary file not shown.