Skip to content

Commit

Permalink
refactor and add zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
esselius committed Jul 8, 2024
1 parent 01b2f59 commit 4d8de2e
Show file tree
Hide file tree
Showing 23 changed files with 92 additions and 86 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Usage

Install nix with the DeterminateSystems nix-installer
Install nix with the [DeterminateSystems nix-installer](https://github.com/DeterminateSystems/nix-installer)

```shell
$ nix-installer plan macos --case-sensitive --extra-conf "use-case-hack = false" --encrypt true > plan.json
Expand Down
5 changes: 2 additions & 3 deletions darwin-configurations/Fox.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

{
imports = [
ezModules.tiling-wm
ezModules.homebrew-packages
ezModules.user-peteresselius
ezModules.desktop
ezModules.case-sensitive-nix-store
ezModules.homebrew
];

nixpkgs.hostPlatform = "aarch64-darwin";
Expand Down
5 changes: 2 additions & 3 deletions darwin-configurations/Petere-MBP.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

{
imports = [
ezModules.user-peteresselius
ezModules.desktop
ezModules.case-sensitive-nix-store
ezModules.tiling-wm
ezModules.homebrew
ezModules.user-peteresselius
];

nixpkgs.hostPlatform = "aarch64-darwin";
Expand Down
9 changes: 6 additions & 3 deletions darwin-modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
ezModules.context
ezModules.linux-builder
ezModules.nix-multi-user
ezModules.shell
ezModules.flakes
ezModules.case-sensitive-nix-store
];
}

nix.extraOptions = ''
extra-experimental-features = nix-command flakes
'';
}
5 changes: 0 additions & 5 deletions darwin-modules/flakes.nix

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions darwin-modules/shell.nix

This file was deleted.

File renamed without changes.
3 changes: 3 additions & 0 deletions darwin-modules/user-peteresselius.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
home = "/Users/peteresselius";
shell = pkgs.fish;
};

programs.fish.enable = true;
environment.shells = [ pkgs.fish ];
}
8 changes: 4 additions & 4 deletions home-configurations/peteresselius.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

{
imports = [
ezModules.shell
ezModules.ssh
ezModules.git
ezModules.secrets
ezModules.asdf
ezModules.fish-shell
ezModules.git
ezModules.ssh
ezModules.tools
];

home.stateVersion = "24.05";
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion home-modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{
imports = [
ezModules.context
ezModules.agenix
];

context = osConfig.context;
}
}
18 changes: 18 additions & 0 deletions home-modules/fish-shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{ pkgs, ... }:

{
programs = {
fish.enable = true;

starship = {
enable = true;
enableFishIntegration = true;
settings.gcloud.disabled = true;
};

direnv = {
enable = true;
nix-direnv.enable = true;
};
};
}
39 changes: 28 additions & 11 deletions home-modules/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,35 @@
};
};

programs.fish.functions = {
glo.body = "cd (${pkgs.ghq}/bin/ghq root)/$argv";
github-repos.body = ''${pkgs.gh}/bin/gh repo list "$argv" -L 1000 --json sshUrl -q ".[].sshUrl"'';
github-starred.body = "${pkgs.gh}/bin/gh api /user/starred --paginate -q '.[].ssh_url'";
github-get-all.body = ''
github-starred | ${pkgs.ghq}/bin/ghq get -u -P
github-repos (${pkgs.gh}/bin/gh api /user -q '.login') | ${pkgs.ghq}/bin/ghq get -u -P
programs.fish = {
shellAliases = {
gcb = "git checkout -b";
gs = "git status -sb";
"gcan!" = "git commit -v -a --no-edit --amend";
gcam = "git commit -a -m";
gl = "git pull";
gp = "git push";
gpsup = "git push --set-upstream origin (git rev-parse --abbrev-ref HEAD)";
gpf = "git push --force-with-lease";
};

shellAbbrs = {
gco = "git checkout";
};

for org in (${pkgs.gh}/bin/gh api /user/orgs -q '.[].login')
github-repos $org | ${pkgs.ghq}/bin/ghq get -u -P
end
'';
functions = {
glo.body = "cd (${pkgs.ghq}/bin/ghq root)/$argv";
github-repos.body = ''${pkgs.gh}/bin/gh repo list "$argv" -L 1000 --json sshUrl -q ".[].sshUrl"'';
github-starred.body = "${pkgs.gh}/bin/gh api /user/starred --paginate -q '.[].ssh_url'";
github-get-all.body = ''
github-starred | ${pkgs.ghq}/bin/ghq get -u -P
github-repos (${pkgs.gh}/bin/gh api /user -q '.login') | ${pkgs.ghq}/bin/ghq get -u -P
for org in (${pkgs.gh}/bin/gh api /user/orgs -q '.[].login')
github-repos $org | ${pkgs.ghq}/bin/ghq get -u -P
end
'';
};
};

xdg.configFile."fish/completions/glo.fish".text = "complete -f -c glo -a '(${pkgs.ghq}/bin/ghq list | sort)'";
Expand Down
48 changes: 0 additions & 48 deletions home-modules/shell.nix

This file was deleted.

23 changes: 23 additions & 0 deletions home-modules/tools.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ pkgs, ... }:

{
programs = {
fish = {
shellAbbrs = {
k = "kubectl";
kcuc = "kubectl config use-context";
kccc = "kubectl config current-context";

rg = "rg -S --hidden --glob '!.git/*'";
};
};

ripgrep.enable = true;
};

home.packages = with pkgs; [
nixpkgs-fmt
jq
zstd
];
}
1 change: 0 additions & 1 deletion nixos-configurations/adama.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
ezModules.user-peteresselius
ezModules.auth
ezModules.monitoring
ezModules.secrets
];

nixpkgs.hostPlatform = "aarch64-linux";
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions nixos-modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
imports = [
ezModules.context
ezModules.authentik
ezModules.agenix
];

nix.settings.trusted-users = [ "root" "@wheel" ];
Expand Down
2 changes: 2 additions & 0 deletions tests/monitoring-auth.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
sub_mode = "hashed_user_id";
include_claims_in_id_token = true;
issuer_mode = "per_provider";
redirect_uris = "http://localhost:3000/login/generic_oauth";
};
}
{
Expand All @@ -72,6 +73,7 @@
monitoring = {
enable = true;
grafana = {
domain = "localhost";
oauth = {
client_id_file = builtins.toFile "grafana-client-id" "grafana";
client_secret_file = builtins.toFile "grafana-client-secret" "secret";
Expand Down

0 comments on commit 4d8de2e

Please sign in to comment.