Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr-check-signed-commits.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Check signed commits in PR
name: Check signed commits in PR
on: pull_request_target

jobs:
build:
name: Check signed commits in PR
name: Check signed commits in PR
permissions:
contents: read
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-flake-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
FILE_TO_COMMIT: flake.lock
COMMIT_BRANCH: automation/update-flake-dependencies
COMMIT_MESSAGE: "chore(nix): Update Flake dependencies"
run: |
run: |-
# fetch remote state
git fetch
# if branch exists on remote already
Expand Down
37 changes: 36 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,35 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs = { nixpkgs, systems, ... }:
outputs =
{
nixpkgs,
systems,
treefmt-nix,
...
}:
let
forAllSystems = function:
nixpkgs.lib.genAttrs (import systems) (
system: function nixpkgs.legacyPackages.${system}
);
forAllSystems =
function: nixpkgs.lib.genAttrs (import systems) (system: function nixpkgs.legacyPackages.${system});

treefmtEval = forAllSystems (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
in
{
formatter = forAllSystems (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);

checks = forAllSystems (pkgs: {
formatting = treefmtEval.${pkgs.system}.config.build.check (pkgs.path or ./.);
});

devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
name = "Shell with Go toolchain";
packages = with pkgs; [ go gopls ];
packages = with pkgs; [
go
gopls
];
};
});

Expand Down
5 changes: 1 addition & 4 deletions nix/shell-plugins.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ in
]
'';
description = "CLI Packages to enable 1Password Shell Plugins for; ensure that a Shell Plugin exists by checking the docs: https://developer.1password.com/docs/cli/shell-plugins/";

};
};
};
Expand Down Expand Up @@ -134,9 +133,7 @@ in
initExtraPosix = strings.concatStringsSep "\n" posixFunctions;
in
mkIf cfg.enable (mkMerge [
{
programs.fish.interactiveShellInit = strings.concatStringsSep "\n" fishFunctions;
}
{ programs.fish.interactiveShellInit = strings.concatStringsSep "\n" fishFunctions; }
(optionalAttrs is-home-manager {
home.checks = [ plugin-support-check ];
programs = {
Expand Down
6 changes: 3 additions & 3 deletions plugins/circleci/test-fixtures/cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ rest_endpoint: api/v2
tls_cert: ""
tls_insecure: false
orb_publishing:
default_namespace: ""
default_vcs_provider: ""
default_owner: ""
default_namespace: ""
default_vcs_provider: ""
default_owner: ""
26 changes: 13 additions & 13 deletions plugins/gitea/test-fixtures/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
logins:
- name: https://git.example.com
url: https://git.example.com
token: oyyfsny27bgphldmhvffxhhlmqvdkzjrfslrsj9f
default: true
ssh_host: ""
ssh_key: ""
insecure: false
ssh_certificate_principal: ""
ssh_agent: false
ssh_key_agent_pub: ""
version_check: false
user: example
created: 0
- name: https://git.example.com
url: https://git.example.com
token: oyyfsny27bgphldmhvffxhhlmqvdkzjrfslrsj9f
default: true
ssh_host: ""
ssh_key: ""
insecure: false
ssh_certificate_principal: ""
ssh_agent: false
ssh_key_agent_pub: ""
version_check: false
user: example
created: 0
38 changes: 19 additions & 19 deletions plugins/gitea/test-fixtures/import_config.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
logins:
- name: git.example.com
url: https://git.example.com
token: oyyfsny27bgphldmhvffxhhlmqvdkzjrfslrsj9f
default: false
ssh_host: git.example.com
ssh_key: ~/.ssh/id_ed25519
insecure: false
user: example
created: 1479340800000
- name: gitea.com
url: https://gitea.com
token: enjkarzu2ca5ffcnvzaczxncuczeoq9utlpqqrzs
default: false
ssh_host: git.example.com
ssh_key: ~/.ssh/id_ed25519
insecure: true
user: example@example.com
created: 1479340800000
- name: git.example.com
url: https://git.example.com
token: oyyfsny27bgphldmhvffxhhlmqvdkzjrfslrsj9f
default: false
ssh_host: git.example.com
ssh_key: ~/.ssh/id_ed25519
insecure: false
user: example
created: 1479340800000
- name: gitea.com
url: https://gitea.com
token: enjkarzu2ca5ffcnvzaczxncuczeoq9utlpqqrzs
default: false
ssh_host: git.example.com
ssh_key: ~/.ssh/id_ed25519
insecure: true
user: example@example.com
created: 1479340800000
preferences:
editor: false
flag_defaults:
remote: ""
remote: ""
12 changes: 6 additions & 6 deletions plugins/github/test-fixtures/hosts.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
github.com:
user: testUser
oauth_token: ghp_B2xokoZVNaqxLhWzxXY0MoARZyZlgEXAMPLE
git_protocol: https
user: testUser
oauth_token: ghp_B2xokoZVNaqxLhWzxXY0MoARZyZlgEXAMPLE
git_protocol: https

enterprise.github.com:
user: enterpriseUser
oauth_token: ghp_4v7aWhddhdqyIR1RmqiRcUjTgzrNFEXAMPLE
git_protocol: ssh
user: enterpriseUser
oauth_token: ghp_4v7aWhddhdqyIR1RmqiRcUjTgzrNFEXAMPLE
git_protocol: ssh
6 changes: 3 additions & 3 deletions plugins/github/test-fixtures/hosts_gho_token.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com:
user: testUser2
oauth_token: gho_8BQUJmcVkoNo7LqYY0Ng1wndPbwwfEXAMPLE
git_protocol: https
user: testUser2
oauth_token: gho_8BQUJmcVkoNo7LqYY0Ng1wndPbwwfEXAMPLE
git_protocol: https
8 changes: 4 additions & 4 deletions plugins/gitlab/test-fixtures/glab-config-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ git_protocol: ssh
check_update: false
display_hyperlinks: false
hosts:
gitlab.acme.com:
api_protocol: https
api_host: api.gitlab.acme.com
token: glpat-sJy3L26ZNW7A3EXAMPLE
gitlab.acme.com:
api_protocol: https
api_host: api.gitlab.acme.com
token: glpat-sJy3L26ZNW7A3EXAMPLE
8 changes: 4 additions & 4 deletions plugins/gitlab/test-fixtures/glab-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ git_protocol: ssh
check_update: false
display_hyperlinks: false
hosts:
gitlab.com:
api_protocol: https
api_host: gitlab.com
token: glpat-sJy3L26ZNW7A3EXAMPLE
gitlab.com:
api_protocol: https
api_host: gitlab.com
token: glpat-sJy3L26ZNW7A3EXAMPLE
48 changes: 48 additions & 0 deletions treefmt.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{ pkgs, ... }:
{
projectRootFile = "flake.nix";

programs = {
# keep-sorted start block=yes
deadnix.enable = true;
keep-sorted.enable = true;
nixfmt = {
enable = true;
package = pkgs.nixfmt-rfc-style;
includes = [ "*.nix" ];
strict = true;
};
statix.enable = true;
yamlfmt = {
enable = true;
settings = {
formatter = {
eof_newline = true;
max_line_length = -1;
retain_line_breaks_single = true;
scan_folded_as_literal = true;
trim_trailing_whitespace = true;
};
};
};
# keep-sorted end
};

settings = {
global.excludes = [
"*.lock"
"*.patch"
"LICENSE*"
".github/**/*.md"
];
};

settings.formatter = {
keep-sorted = {
options = [
"--mode"
"fix"
];
};
};
}