-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'flake_refactoring' into 'main'
refactor(flake): Massive flake refactoring with flake-parts. See merge request garuda-linux/infra-nix!5
- Loading branch information
Showing
89 changed files
with
1,356 additions
and
842 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
profile: production | ||
skip_list: [run-once, command-instead-of-module] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use nix shell.nix |
Validating CODEOWNERS rules β¦
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @garudalinux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
liberapay: garudalinux | ||
open_collective: garudalinux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: Run nix flake check | ||
on: | ||
pull_request_target: | ||
types: [labeled] | ||
push: | ||
branches: [main] | ||
jobs: | ||
flake_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@6a9a9e84a173d90b3ffb42c5ddaf9ea033fad011 # v23 | ||
with: | ||
extra_nix_config: | | ||
accept-flake-config = true | ||
experimental-features = nix-command flakes | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: Run nix flake check | ||
run: nix flake check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
.direnv | ||
.envrc | ||
.pre-commit-config.yaml | ||
.vault_pass | ||
node_modules/ | ||
package-lock.json | ||
package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.github/** | ||
flake.lock | ||
docker-compose/** | ||
secrets/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
yaml-files: ["*.yaml", "*.yml", .yamllint] | ||
rules: | ||
braces: enable | ||
brackets: enable | ||
colons: enable | ||
commas: enable | ||
comments: | ||
level: warning | ||
min-spaces-from-content: 1 | ||
comments-indentation: | ||
level: warning | ||
document-end: disable | ||
document-start: | ||
level: warning | ||
empty-lines: enable | ||
empty-values: disable | ||
float-values: disable | ||
hyphens: enable | ||
indentation: enable | ||
key-duplicates: enable | ||
key-ordering: disable | ||
line-length: disable | ||
new-line-at-end-of-file: enable | ||
new-lines: enable | ||
octal-values: disable | ||
quoted-strings: disable | ||
trailing-spaces: enable | ||
truthy: | ||
check-keys: false | ||
|
||
ignore: | | ||
.pre-commit-config.yaml | ||
secrets/* |
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
_: | ||
{ | ||
perSystem = { devShells, pkgs, ... }: | ||
{ | ||
# The default development shell spawned by "nix develop" | ||
devshells.default = { | ||
commands = [ | ||
{ | ||
package = "pre-commit"; | ||
category = "formatter"; | ||
} | ||
{ | ||
package = "manix"; | ||
category = "handbook"; | ||
} | ||
{ | ||
name = "deploy"; | ||
category = "deployment"; | ||
command = '' | ||
ansible-playbook playbooks/garuda.yml | ||
''; | ||
} | ||
{ | ||
name = "apply"; | ||
category = "deployment"; | ||
command = '' | ||
ansible-playbook playbooks/apply.yml | ||
''; | ||
} | ||
{ | ||
name = "clean"; | ||
category = "tools"; | ||
command = '' | ||
ansible-playbook playbooks/garbage_collect.yml | ||
''; | ||
} | ||
{ | ||
name = "update"; | ||
category = "deployment"; | ||
command = '' | ||
ansible-playbook playbooks/system_update.yml | ||
''; | ||
} | ||
{ | ||
package = "nixpkgs-fmt"; | ||
category = "formatter"; | ||
} | ||
{ | ||
package = "ansible"; | ||
category = "deployment"; | ||
} | ||
{ | ||
package = "yamlfix"; | ||
category = "formatter"; | ||
} | ||
]; | ||
motd = '' | ||
{202}π¨ Welcome to the Garuda infra-nix shell βοΈ{reset} | ||
$(type -p menu &>/dev/null && menu) | ||
''; | ||
name = "infra-nix"; | ||
}; | ||
|
||
# Pre-commit linters & formatters | ||
pre-commit = { | ||
check.enable = true; | ||
devShell = devShells.default; | ||
inherit pkgs; | ||
settings = { | ||
hooks = { | ||
actionlint.enable = true; | ||
ansible-lint.enable = true; | ||
commitizen.enable = true; | ||
deadnix.enable = true; | ||
nil.enable = true; | ||
nixpkgs-fmt.enable = true; | ||
prettier.enable = true; | ||
shellcheck.enable = true; | ||
shfmt.enable = true; | ||
statix.enable = true; | ||
yamllint.enable = true; | ||
}; | ||
settings.deadnix = { | ||
edit = true; | ||
hidden = true; | ||
noLambdaArg = true; | ||
}; | ||
src = ../.; | ||
}; | ||
}; | ||
}; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...-compose/github-runner/docker-compose.yml β ...-compose/github-runner/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
version: '3.9' | ||
version: "3.9" | ||
services: | ||
github-runner: | ||
image: myoung34/github-runner:latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.