Skip to content

Commit 69eaa6a

Browse files
committed
devenv: add shared config
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
1 parent b20319d commit 69eaa6a

6 files changed

Lines changed: 46 additions & 86 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/public/bundles/
88
/var/
99
/vendor/
10+
.shared
1011
###< symfony/framework-bundle ###
1112

1213
###> symfony/phpunit-bridge ###

devenv.lock

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"devenv": {
44
"locked": {
55
"dir": "src/modules",
6-
"lastModified": 1744588088,
6+
"lastModified": 1769704695,
77
"owner": "cachix",
88
"repo": "devenv",
9-
"rev": "1e6c06a058dae3791c0303eb99636cee9605c8d9",
9+
"rev": "396c5cc6ae1c2bfcf66ad990779e47ef98284d56",
1010
"type": "github"
1111
},
1212
"original": {
@@ -19,14 +19,14 @@
1919
"flake-compat": {
2020
"flake": false,
2121
"locked": {
22-
"lastModified": 1733328505,
23-
"owner": "edolstra",
22+
"lastModified": 1767039857,
23+
"owner": "NixOS",
2424
"repo": "flake-compat",
25-
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
25+
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
2626
"type": "github"
2727
},
2828
"original": {
29-
"owner": "edolstra",
29+
"owner": "NixOS",
3030
"repo": "flake-compat",
3131
"type": "github"
3232
}
@@ -40,10 +40,10 @@
4040
]
4141
},
4242
"locked": {
43-
"lastModified": 1742649964,
43+
"lastModified": 1769069492,
4444
"owner": "cachix",
4545
"repo": "git-hooks.nix",
46-
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
46+
"rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23",
4747
"type": "github"
4848
},
4949
"original": {
@@ -60,10 +60,10 @@
6060
]
6161
},
6262
"locked": {
63-
"lastModified": 1709087332,
63+
"lastModified": 1762808025,
6464
"owner": "hercules-ci",
6565
"repo": "gitignore.nix",
66-
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
66+
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
6767
"type": "github"
6868
},
6969
"original": {
@@ -74,16 +74,16 @@
7474
},
7575
"nixpkgs": {
7676
"locked": {
77-
"lastModified": 1744463964,
78-
"owner": "NixOS",
79-
"repo": "nixpkgs",
80-
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
77+
"lastModified": 1767052823,
78+
"owner": "cachix",
79+
"repo": "devenv-nixpkgs",
80+
"rev": "538a5124359f0b3d466e1160378c87887e3b51a4",
8181
"type": "github"
8282
},
8383
"original": {
84-
"owner": "NixOS",
85-
"ref": "nixos-unstable",
86-
"repo": "nixpkgs",
84+
"owner": "cachix",
85+
"ref": "rolling",
86+
"repo": "devenv-nixpkgs",
8787
"type": "github"
8888
}
8989
},
@@ -94,7 +94,23 @@
9494
"nixpkgs": "nixpkgs",
9595
"pre-commit-hooks": [
9696
"git-hooks"
97-
]
97+
],
98+
"shared": "shared"
99+
}
100+
},
101+
"shared": {
102+
"flake": false,
103+
"locked": {
104+
"lastModified": 1769424296,
105+
"owner": "pbek",
106+
"repo": "nix-shared",
107+
"rev": "6af0fdb18fa4cda031ed691fa57eee5e0f265464",
108+
"type": "github"
109+
},
110+
"original": {
111+
"owner": "pbek",
112+
"repo": "nix-shared",
113+
"type": "github"
98114
}
99115
}
100116
},

devenv.nix

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
{
88
# https://devenv.sh/supported-languages/php/
99
languages.php = {
10-
enable = true;
1110
version = "8.3";
1211
ini = ''
1312
memory_limit = 256M
@@ -37,26 +36,13 @@
3736

3837
# https://devenv.sh/packages/
3938
packages = with pkgs; [
40-
git
4139
symfony-cli
4240
just # task runner
4341
zellij # smart terminal workspace
4442
lazygit # git terminal
4543
fzf # fuzzy finder
46-
47-
# Packages for treefmt
48-
nodePackages.prettier
49-
nixfmt-rfc-style
50-
shfmt
51-
statix
52-
taplo
53-
php83Packages.php-cs-fixer
5444
];
5545

56-
# https://devenv.sh/git-hooks/
57-
# git-hooks.hooks.shellcheck.enable = true;
58-
git-hooks.hooks.treefmt.enable = true;
59-
6046
# https://devenv.sh/integrations/dotenv/
6147
dotenv.enable = true;
6248
dotenv.filename = [

devenv.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
22
inputs:
3-
nixpkgs:
4-
# url: github:cachix/devenv-nixpkgs/rolling
5-
url: github:NixOS/nixpkgs/nixos-unstable
3+
nixpkgs:
4+
url: github:cachix/devenv-nixpkgs/rolling
5+
shared:
6+
url: github:pbek/nix-shared
7+
flake: false
8+
9+
imports:
10+
- shared/common
11+
- shared/php

justfile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Use `just <recipe>` to run a recipe
22
# https://just.systems/man/en/
33

4+
import ".shared/common.just"
5+
46
# By default, run the `--list` command
57
default:
68
@just --list
@@ -10,10 +12,6 @@ default:
1012
transferDir := `if [ -d "$HOME/NextcloudPrivate/Transfer" ]; then echo "$HOME/NextcloudPrivate/Transfer"; else echo "$HOME/Nextcloud/Transfer"; fi`
1113
sessionName := "qownnotes-api"
1214

13-
## Aliases
14-
15-
alias fmt := format
16-
1715
# Open a terminal with the qownnotes-api session
1816
[group('dev')]
1917
term:
@@ -41,8 +39,3 @@ git-apply-patch:
4139
echo "transferDir: {{ transferDir }}"
4240
git diff --no-ext-diff --staged --binary > {{ transferDir }}/{{ sessionName }}.patch
4341
ls -l1t {{ transferDir }}/ | head -2
44-
45-
# Format all files
46-
[group('linter')]
47-
format args='':
48-
nix-shell -p treefmt just nodePackages.prettier nixfmt-rfc-style shfmt statix taplo php83Packages.php-cs-fixer --run "treefmt {{ args }}"

treefmt.toml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)