Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 398745443d | |||
| fba52b1f2f | |||
| 702b8808cb | |||
| 4535cb4db5 | |||
| d93120d43e | |||
|
9418deddae
|
|||
|
fedfd9235c
|
|||
|
0eed1c5008
|
|||
|
85a295744b
|
|||
| adfcc88ef5 | |||
|
ab55d46cb4
|
|||
|
dc70f0e701
|
|||
| d7eb04e754 | |||
|
24f8e51285
|
|||
|
49cc2b51a6
|
|||
|
baa4928b0e
|
|||
| 15233d9ea5 | |||
| 6d379f7a02 | |||
| a513133bbe | |||
| 42719a9f92 | |||
| 06ccfa6b64 | |||
| 6ab4db91ab |
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Editor configuration, see http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
max_line_length = 0
|
||||||
|
trim_trailing_whitespace = false
|
||||||
@@ -9,7 +9,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
- name: Setup sudo (required for the next step)
|
- name: Setup sudo (required for the next step)
|
||||||
run: apt-get update && apt-get install -y sudo
|
run: apt-get update && apt-get install -y sudo
|
||||||
- name: Setup nix
|
- name: Setup nix
|
||||||
@@ -18,7 +18,7 @@ jobs:
|
|||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
github_access_token: ${{ secrets.GH_ACCESS_TOKEN }}
|
github_access_token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||||
nix_path: nixpkgs=channel:nixos-25.05
|
nix_path: nixpkgs=channel:nixos-25.11
|
||||||
- uses: cachix/cachix-action@v16
|
- uses: cachix/cachix-action@v16
|
||||||
with:
|
with:
|
||||||
name: palkx
|
name: palkx
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
name: Release a new version
|
name: Release a new version
|
||||||
needs: build
|
needs: build
|
||||||
uses: xaked/actions/.gitea/workflows/cog-release.yml@2.0.0
|
uses: xaked/actions/.gitea/workflows/cog-release.yml@2.0.3
|
||||||
|
|||||||
54
.gitea/workflows/update-flake-lock.yml
Normal file
54
.gitea/workflows/update-flake-lock.yml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
name: Sync flake lock with main nix-configuration project
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "15 3 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
name: Sync flake lock with main nix-configuration project
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
changes: ${{ steps.checkChanges.outputs.CHANGES }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: Checkout nix-configuration repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
repository: xaked/nix-config
|
||||||
|
path: nix-config
|
||||||
|
ref: master
|
||||||
|
token: ${{ secrets.NIX_CONFIGURATION_GITEA_CLONE_TOKEN }}
|
||||||
|
- name: Check for update and perform update
|
||||||
|
id: checkChanges
|
||||||
|
run: |
|
||||||
|
git config user.name gitea-bot
|
||||||
|
git config user.email bot@git.palkoi.net
|
||||||
|
git config --global user.email bot@git.palkoi.net
|
||||||
|
git config --global user.name gitea-bot
|
||||||
|
|
||||||
|
tmpfile="$(mktemp)"
|
||||||
|
jq -srM '.[1].nodes.nixpkgs = .[0].nodes.nixpkgs_2|.[1].nodes.nixpkgs_2 = .[0].nodes.nixpkgs_2 | .[1]' ./nix-config/flake.lock flake.lock > "$tmpfile"
|
||||||
|
cat "$tmpfile" > flake.lock
|
||||||
|
git add flake.lock
|
||||||
|
if [ -n "$(git diff --cached)" ]; then git diff --cached; echo 'CHANGES=y'>>$GITHUB_OUTPUT; else echo 'CHANGES=n'>>$GITHUB_OUTPUT; fi
|
||||||
|
- name: Commit updates
|
||||||
|
if: ${{ steps.checkChanges.outputs.CHANGES == 'y' }}
|
||||||
|
run: |
|
||||||
|
git commit --no-gpg-sign -m 'chore(flake): update flake.lock'
|
||||||
|
git push
|
||||||
|
build:
|
||||||
|
name: Build flake
|
||||||
|
if: ${{ needs.update.outputs.changes == 'y' }}
|
||||||
|
needs: update
|
||||||
|
uses: ./.gitea/workflows/build-flake.yml
|
||||||
|
release:
|
||||||
|
name: Release a new version
|
||||||
|
needs: build
|
||||||
|
uses: xaked/actions/.gitea/workflows/cog-release.yml@2.1.0
|
||||||
|
with:
|
||||||
|
ref: ${{ github.ref_name }}
|
||||||
1
cog.toml
1
cog.toml
@@ -1,2 +1,3 @@
|
|||||||
[commit_types]
|
[commit_types]
|
||||||
version = { bump_patch = true, changelog_title = "Version" }
|
version = { bump_patch = true, changelog_title = "Version" }
|
||||||
|
chore = { bump_patch = true, changelog_title = "Chore" }
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{ pkgs, ... }:
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
extraConfigLuaPre =
|
extraConfigLuaPre =
|
||||||
@@ -46,8 +42,14 @@
|
|||||||
|
|
||||||
plugins.conform-nvim = {
|
plugins.conform-nvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoInstall.enable = true;
|
autoInstall = {
|
||||||
|
enable = true;
|
||||||
|
overrides = {
|
||||||
|
"terraform_fmt" = pkgs.asdf-vm;
|
||||||
|
};
|
||||||
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
default_format_opts.lsp_format = "fallback";
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
html = {
|
html = {
|
||||||
__unkeyed-1 = "prettierd";
|
__unkeyed-1 = "prettierd";
|
||||||
@@ -81,7 +83,7 @@
|
|||||||
};
|
};
|
||||||
python = [ "ruff_format" ];
|
python = [ "ruff_format" ];
|
||||||
lua = [ "stylua" ];
|
lua = [ "stylua" ];
|
||||||
nix = [ "nixfmt-rfc-style" ];
|
nix = [ "nixfmt" ];
|
||||||
markdown = {
|
markdown = {
|
||||||
__unkeyed-1 = "prettierd";
|
__unkeyed-1 = "prettierd";
|
||||||
__unkeyed-2 = "prettier";
|
__unkeyed-2 = "prettier";
|
||||||
@@ -103,20 +105,61 @@
|
|||||||
"goimports"
|
"goimports"
|
||||||
"gofmt"
|
"gofmt"
|
||||||
];
|
];
|
||||||
|
# Auto correct misspelled words
|
||||||
|
# "*" = [ "codebook" ];
|
||||||
"_" = [ "trim_whitespace" ];
|
"_" = [ "trim_whitespace" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
formatters = {
|
formatters = {
|
||||||
terraform_fmt = {
|
# Disabling because if project has a project limitatiton, then
|
||||||
command = "${lib.getExe (
|
# formatter not working at all
|
||||||
pkgs.terraform.overrideAttrs (oldAttrs: {
|
# terraform_fmt = {
|
||||||
meta = lib.recursiveUpdate oldAttrs.meta {
|
# command = "${lib.getExe (
|
||||||
license = lib.licenses.gpl3Only;
|
# pkgs.terraform.overrideAttrs (oldAttrs: {
|
||||||
};
|
# meta = lib.recursiveUpdate oldAttrs.meta {
|
||||||
})
|
# license = lib.licenses.gpl3Only;
|
||||||
)}";
|
# };
|
||||||
};
|
# })
|
||||||
|
# )}";
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
|
format_on_save = # Lua
|
||||||
|
''
|
||||||
|
function(bufnr)
|
||||||
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if slow_format_filetypes[vim.bo[bufnr].filetype] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_format(err)
|
||||||
|
if err and err:match("timeout$") then
|
||||||
|
slow_format_filetypes[vim.bo[bufnr].filetype] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return { timeout_ms = 200, lsp_fallback = true }, on_format
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
format_after_save = # Lua
|
||||||
|
''
|
||||||
|
function(bufnr)
|
||||||
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not slow_format_filetypes[vim.bo[bufnr].filetype] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
return { lsp_fallback = true }
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
log_level = "warn";
|
||||||
|
notify_on_error = true;
|
||||||
|
notify_no_formatters = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
keymaps = [
|
keymaps = [
|
||||||
|
|||||||
40
flake.lock
generated
40
flake.lock
generated
@@ -5,11 +5,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763759067,
|
"lastModified": 1765835352,
|
||||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -26,11 +26,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763759067,
|
"lastModified": 1765835352,
|
||||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -87,11 +87,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764522689,
|
"lastModified": 1767799921,
|
||||||
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=",
|
"narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f",
|
"rev": "d351d0653aeb7877273920cd3e823994e7579b0b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -103,11 +103,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761765539,
|
"lastModified": 1765674936,
|
||||||
"narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
|
"narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
|
"rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -118,15 +118,15 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764338033,
|
"lastModified": 1767799921,
|
||||||
"narHash": "sha256-1LNGcU+aTbATD3BPCf7U1KsP1CjCH+ZWqM6JH0sZ6Q0=",
|
"narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ba9b83e5fb4b552a423d24dabe5ccb47a9c89901",
|
"rev": "d351d0653aeb7877273920cd3e823994e7579b0b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"ref": "nixos-25.11",
|
"ref": "nixos-25.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
@@ -140,11 +140,11 @@
|
|||||||
"systems": "systems_2"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764614282,
|
"lastModified": 1766849711,
|
||||||
"narHash": "sha256-oHT1/E5yf9lvOVHtO5joevADcQLGp5mVab5shVVqxso=",
|
"narHash": "sha256-gtLBwhgjERca1UCzGkFplD5epIVRiNkePHVVtyFr73g=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "6bdabc1359d7658e1d9ce065db37df92e904b581",
|
"rev": "cae79c48e93bd61e478dfc12456bf68b1ce66074",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
Reference in New Issue
Block a user