Compare commits
122 Commits
wireguard
...
34034a3550
Author | SHA1 | Date | |
---|---|---|---|
34034a3550
|
|||
12c7181490
|
|||
adf022169e
|
|||
09fbf7150c
|
|||
795ea28583
|
|||
4129589665
|
|||
62bd6e557b
|
|||
bbe3219985
|
|||
f0554a6a61
|
|||
197bfc447b
|
|||
37888fd991
|
|||
7b93b1ac5b
|
|||
9792e6b05b
|
|||
a039938333
|
|||
573d3dccc2
|
|||
0665ded197
|
|||
2da836953b
|
|||
ca575c9a4c
|
|||
9159756011
|
|||
1a1fe30c96
|
|||
a9875aa0e0
|
|||
b18dba83a4
|
|||
1234d7d455
|
|||
6873ecc0df
|
|||
96da7fdb0c
|
|||
027ecdf887
|
|||
300f2ff34f
|
|||
d8f143db13
|
|||
98dae8cb02
|
|||
9126dfed0d
|
|||
4512cce3d4
|
|||
f1593c2c56
|
|||
a11dd05dba
|
|||
a430f1ddd8
|
|||
ab8feea39c
|
|||
ece2150e10
|
|||
0c829b0bfb
|
|||
cbb908a968
|
|||
f1f1cf39b0
|
|||
bff2fca2eb
|
|||
7f9a1dcb66
|
|||
084fda4ba6
|
|||
4e80c1a890
|
|||
3ba9ee6249
|
|||
c4fafe3043
|
|||
077ceb3c69
|
|||
095f1d063a
|
|||
db63042d16
|
|||
fe95d3271a
|
|||
db6da46727
|
|||
573037d2ef
|
|||
b4640f8218
|
|||
ce2f51e914
|
|||
d663b05527
|
|||
aaca09300e
|
|||
453c8ecc65
|
|||
d38be7625c
|
|||
1f89f09159
|
|||
cec17c9bbf
|
|||
91187d92df
|
|||
fca7206764
|
|||
fa09a70b65
|
|||
b7c7023ff0 | |||
247897643c | |||
f691ed9bb9 | |||
b7161495a0 | |||
ce12d650d2 | |||
a8f05267bd | |||
9c48849e68 | |||
15bf209e8c | |||
ba55a766ec | |||
0649e4f9df | |||
53e2f3106b | |||
13f24c6880 | |||
bebe478a7b | |||
f3ca552897 | |||
129c59dd63 | |||
18daa8bd89 | |||
4a2d99957b | |||
1587967488 | |||
a3d44b8b26 | |||
718ccc506f | |||
3a110af1ec | |||
dca420751a | |||
752caa0321 | |||
390602f562 | |||
bb3b6856d6 | |||
453cde2a4b | |||
03e53accae | |||
e087cdb630 | |||
31e7d625cf | |||
72ea51e1d9 | |||
e2ee815d58 | |||
184aa4da8f | |||
8f965bbede | |||
41b173c3d2 | |||
3272063a43 | |||
249f6fcac0 | |||
479af0caf5 | |||
384f1b222f | |||
cb187f3518 | |||
d60050c5d1 | |||
a18ce54dc4 | |||
4f3b71e2a0 | |||
bf1c84c057 | |||
5c098a8aa9 | |||
48d3ba5092 | |||
bf49eac272 | |||
e24997677d | |||
ad7ef2705d | |||
6a029b66c3 | |||
e5c699fcb0 | |||
33cd3bece9 | |||
7289e685ab | |||
48dce9157c | |||
94d0f4e984 | |||
f315e11ba1 | |||
94500f51cd | |||
88ef04def8 | |||
68e6eddd22 | |||
b8c43dc5d8 | |||
ea2ab2101a |
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# ---> Nix
|
||||||
|
# Ignore build outputs from performing a nix-build or `nix build` command
|
||||||
|
result
|
||||||
|
result-*
|
||||||
|
|
||||||
|
# Ignore automatically generated direnv output
|
||||||
|
.direnv
|
@@ -1,27 +0,0 @@
|
|||||||
stages:
|
|
||||||
- build
|
|
||||||
- test
|
|
||||||
|
|
||||||
variables:
|
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
|
||||||
|
|
||||||
cache: &global_cache
|
|
||||||
key:
|
|
||||||
files:
|
|
||||||
- flake.lock
|
|
||||||
- flake.nix
|
|
||||||
paths:
|
|
||||||
- /nix/store
|
|
||||||
policy: pull-push
|
|
||||||
|
|
||||||
build:
|
|
||||||
image: nixos/nix
|
|
||||||
stage: build
|
|
||||||
timeout: 48h
|
|
||||||
cache:
|
|
||||||
<<: *global_cache
|
|
||||||
script:
|
|
||||||
- nix --experimental-features 'nix-command flakes' flake check --show-trace
|
|
||||||
|
|
||||||
include:
|
|
||||||
- template: Jobs/Secret-Detection.gitlab-ci.yml
|
|
17
.gitmodules
vendored
17
.gitmodules
vendored
@@ -1,8 +1,9 @@
|
|||||||
[submodule "submodules/nixpkgs"]
|
[submodule "secrets"]
|
||||||
path = submodules/nixpkgs
|
path = submodules/secrets
|
||||||
url = git@github.com:karaolidis/nixpkgs.git
|
url = git@karaolidis.com:karaolidis/nix-secrets.git
|
||||||
branch = integration
|
[submodule "sas"]
|
||||||
[submodule "submodules/home-manager"]
|
path = submodules/sas
|
||||||
path = submodules/home-manager
|
url = git@karaolidis.com:karaolidis/nix-sas.git
|
||||||
url = git@github.com:karaolidis/home-manager.git
|
[submodule "submodules/lib"]
|
||||||
branch = integration
|
path = submodules/lib
|
||||||
|
url = git@karaolidis.com:karaolidis/nix-lib.git
|
||||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"sops.defaults.ageKeyFile": "./secrets/personal/key.txt"
|
|
||||||
}
|
|
11
README.md
11
README.md
@@ -7,7 +7,6 @@ NixOS dotfiles and configuration for various hosts and users.
|
|||||||
- [`flake.lock`](./flake.lock) and [`flake.nix`](./flake.nix): Core Nix flake files defining the repository's dependencies and entry points.
|
- [`flake.lock`](./flake.lock) and [`flake.nix`](./flake.nix): Core Nix flake files defining the repository's dependencies and entry points.
|
||||||
|
|
||||||
- [`hosts/`](./hosts): All host-specific configurations.
|
- [`hosts/`](./hosts): All host-specific configurations.
|
||||||
|
|
||||||
- [`common/`](./hosts/common): Shared configuration definitions.
|
- [`common/`](./hosts/common): Shared configuration definitions.
|
||||||
- [`shells/`](./hosts/common/shells): Nix dev shells.
|
- [`shells/`](./hosts/common/shells): Nix dev shells.
|
||||||
- [`configs/`](./hosts/common/configs): System configurations applicable to all hosts.
|
- [`configs/`](./hosts/common/configs): System configurations applicable to all hosts.
|
||||||
@@ -17,19 +16,15 @@ NixOS dotfiles and configuration for various hosts and users.
|
|||||||
- [`gui/`](./hosts/common/configs/user/gui): GUI-related settings.
|
- [`gui/`](./hosts/common/configs/user/gui): GUI-related settings.
|
||||||
- `<name>/`: Individual host configurations.
|
- `<name>/`: Individual host configurations.
|
||||||
|
|
||||||
|
- [`overlays/`](./overlays/): Custom patches.
|
||||||
|
|
||||||
- [`packages/`](./packages/): Custom packages.
|
- [`packages/`](./packages/): Custom packages.
|
||||||
|
|
||||||
- `secrets/<namespace>/`: Global secrets for individual namespaces that apply across all hosts.
|
|
||||||
|
|
||||||
- [`lib/`](./lib): Nix library function definitions and utilities.
|
|
||||||
|
|
||||||
- [`scripts/`](./lib/scripts): Utility scripts for managing the repository.
|
- [`scripts/`](./lib/scripts): Utility scripts for managing the repository.
|
||||||
- [`add-host.sh`](./lib/scripts/add-host.sh): Instantiate the keys for a new host configuration.
|
- [`add-host.sh`](./lib/scripts/add-host.sh): Instantiate the keys for a new host configuration.
|
||||||
- [`remove-host.sh`](./lib/scripts/remove-host.sh): Remove references to a host.
|
- [`remove-host.sh`](./lib/scripts/remove-host.sh): Remove references to a host.
|
||||||
- [`update-keys.sh`](./lib/scripts/update-keys.sh): Update the encryption keys in all relevant files using `sops.yaml` configurations.
|
- [`update-keys.sh`](./lib/scripts/update-keys.sh): Update the encryption keys in all relevant files using `sops.yaml` configurations.
|
||||||
- [`update.sh`](./lib/scripts/update.sh): Update flake and all git submodules.
|
- [`update.sh`](./lib/scripts/update.sh): Update flake and all packages.
|
||||||
|
|
||||||
- [`submodules/`](./submodules): Flake forks used in the repository, such as [`nixpkgs`](https://github.com/NixOS/nixpkgs) and [`home-manager`](https://github.com/nix-community/home-manager).
|
|
||||||
|
|
||||||
Any `options.nix` files create custom option definitions when present.
|
Any `options.nix` files create custom option definitions when present.
|
||||||
|
|
||||||
|
378
flake.lock
generated
378
flake.lock
generated
@@ -10,16 +10,15 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744557573,
|
"lastModified": 1754932414,
|
||||||
"narHash": "sha256-XAyj0iDuI51BytJ1PwN53uLpzTDdznPDQFG4RwihlTQ=",
|
"narHash": "sha256-V8c+68Axn5AGDCaG9Zv+EqNU4D6xWPHNXLIapq6AGiM=",
|
||||||
"owner": "aylur",
|
"owner": "aylur",
|
||||||
"repo": "ags",
|
"repo": "ags",
|
||||||
"rev": "3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6",
|
"rev": "9e6912b51d7bc58f35d10b11be1a126b926b56d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "aylur",
|
"owner": "aylur",
|
||||||
"ref": "main",
|
|
||||||
"repo": "ags",
|
"repo": "ags",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -31,20 +30,34 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749559749,
|
"lastModified": 1754893912,
|
||||||
"narHash": "sha256-TM95tg1G7S6rVBBoMwurXMz8Il4xlnuZ2TI4h6lfZzg=",
|
"narHash": "sha256-kzU/3A4k+d3PsgMLohzSh4KJybTqvzqibUVqV2yXCGY=",
|
||||||
"owner": "aylur",
|
"owner": "aylur",
|
||||||
"repo": "astal",
|
"repo": "astal",
|
||||||
"rev": "dd8a4662f2f17fb4326a7bd0fb2d054f5d477ba3",
|
"rev": "5d4eef66392b0dff99a63a4f39ff886624bd69dd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "aylur",
|
"owner": "aylur",
|
||||||
"ref": "main",
|
|
||||||
"repo": "astal",
|
"repo": "astal",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"crane": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754269165,
|
||||||
|
"narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "444e81206df3f7d92780680e45858e31d2f07a08",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disko": {
|
"disko": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -52,33 +65,69 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749436314,
|
"lastModified": 1746728054,
|
||||||
"narHash": "sha256-CqmqU5FRg5AadtIkxwu8ulDSOSoIisUMZRLlcED3Q5w=",
|
"narHash": "sha256-eDoSOhxGEm2PykZFa/x9QG5eTH0MJdiJ9aR00VAofXE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "dfa4d1b9c39c0342ef133795127a3af14598017a",
|
"rev": "ff442f5d1425feb86344c028298548024f21256d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "master",
|
"ref": "latest",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747046372,
|
||||||
|
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-input-patcher": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1751871600,
|
||||||
|
"narHash": "sha256-I4/2ekJrbRMhOpKfzgnlrN45nQj9YQmZnoSeAaRa1SU=",
|
||||||
|
"owner": "jfly",
|
||||||
|
"repo": "flake-input-patcher",
|
||||||
|
"rev": "4ff068126d49829b106280738944bde91951d59d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "jfly",
|
||||||
|
"repo": "flake-input-patcher",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
"nur",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733312601,
|
"lastModified": 1754487366,
|
||||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -103,11 +152,32 @@
|
|||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"ref": "main",
|
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"lanzaboote",
|
||||||
|
"pre-commit-hooks-nix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -115,39 +185,48 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749678254,
|
"lastModified": 1755442500,
|
||||||
"narHash": "sha256-6I+qez0MnHu9M2spLj3LsGA/cUGgfx17/hMPvmrUMoU=",
|
"narHash": "sha256-RHK4H6SWzkAtW/5WBHsyugaXJX25yr5y7FAZznxcBJs=",
|
||||||
"owner": "karaolidis",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e248f54290b483a47c7550f69faecb8ed97e4831",
|
"rev": "d2ffdedfc39c591367b1ddf22b4ce107f029dcc3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "karaolidis",
|
"owner": "nix-community",
|
||||||
"ref": "integration",
|
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"lanzaboote": {
|
||||||
"locked": {
|
"inputs": {
|
||||||
"lastModified": 1749678247,
|
"crane": "crane",
|
||||||
"narHash": "sha256-K83Q3c/o5CdMB3Npk3P1kCIz6FcUuJV8E4k6z1YN8AQ=",
|
"flake-compat": "flake-compat",
|
||||||
"owner": "karaolidis",
|
"flake-parts": [
|
||||||
"repo": "nixpkgs",
|
"flake-parts"
|
||||||
"rev": "4d408c92fe165ab68f012a3fa36d4c58d84e83bd",
|
],
|
||||||
"type": "github"
|
"nixpkgs": [
|
||||||
},
|
"nixpkgs"
|
||||||
"original": {
|
],
|
||||||
"owner": "karaolidis",
|
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
|
||||||
"ref": "integration",
|
"rust-overlay": "rust-overlay"
|
||||||
"repo": "nixpkgs",
|
},
|
||||||
"type": "github"
|
"locked": {
|
||||||
}
|
"lastModified": 1754297745,
|
||||||
},
|
"narHash": "sha256-aD6/scLN3L4ZszmNbhhd3JQ9Pzv1ScYFphz14wHinfs=",
|
||||||
"nur": {
|
"owner": "nix-community",
|
||||||
|
"repo": "lanzaboote",
|
||||||
|
"rev": "892cbdca865d6b42f9c0d222fe309f7720259855",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "lanzaboote",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lib": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
@@ -156,32 +235,133 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749675110,
|
"lastModified": 1755506074,
|
||||||
"narHash": "sha256-NkDE/JyeQJmLtpXjyFZK2wKs5K7isap7MBIzoYMC9nk=",
|
"narHash": "sha256-SztuKbAPppW5grMJLSGO5rBCXEWCOfhb39cPDONEUfo=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "ac85b6f608ed88d424621ec30f3848d621383487",
|
||||||
|
"revCount": 6,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.karaolidis.com/karaolidis/nix-lib.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.karaolidis.com/karaolidis/nix-lib.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1755186698,
|
||||||
|
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1753579242,
|
||||||
|
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "0e8328c18d801a253ed5dfd17bd78254d9669d06",
|
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "main",
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nur": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": [
|
||||||
|
"flake-parts"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1755452770,
|
||||||
|
"narHash": "sha256-oc8xrqvVIoDxbfTlbkE1XQ7O88TgNZn5FOZKLiuIEmg=",
|
||||||
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
|
"rev": "eab62298402c7cdfdefda647a4046befa3a84051",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "NUR",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nvidia-patch": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"utils": [
|
||||||
|
"flake-utils"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1755069017,
|
||||||
|
"narHash": "sha256-cTD5WfZRK2mwrSktlYcrk6DOEEkQbE1z78O16TF293c=",
|
||||||
|
"owner": "icewind1991",
|
||||||
|
"repo": "nvidia-patch-nixos",
|
||||||
|
"rev": "d187885c14bdd8520d40f527134d536168f8d92b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "icewind1991",
|
||||||
|
"repo": "nvidia-patch-nixos",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre-commit-hooks-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": [
|
||||||
|
"lanzaboote",
|
||||||
|
"flake-compat"
|
||||||
|
],
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"lanzaboote",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1750779888,
|
||||||
|
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"quadlet-nix": {
|
"quadlet-nix": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749099346,
|
"lastModified": 1754008153,
|
||||||
"narHash": "sha256-5gi/YaLVsFztGvVH45eB6jsBmZf+HnvDeSA9RXUqbcY=",
|
"narHash": "sha256-MYT1mDtSkiVg343agxgBFsnuNU3xS8vRy399JXX1Vw0=",
|
||||||
"owner": "SEIAROTg",
|
"owner": "SEIAROTg",
|
||||||
"repo": "quadlet-nix",
|
"repo": "quadlet-nix",
|
||||||
"rev": "d4119a3423f938427252ba8bbdbe8ce040751864",
|
"rev": "1b2d27d460d8c7e4da5ba44ede463b427160b5c4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "SEIAROTg",
|
"owner": "SEIAROTg",
|
||||||
"ref": "main",
|
|
||||||
"repo": "quadlet-nix",
|
"repo": "quadlet-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -191,17 +371,87 @@
|
|||||||
"ags": "ags",
|
"ags": "ags",
|
||||||
"astal": "astal",
|
"astal": "astal",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
|
"flake-input-patcher": "flake-input-patcher",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"lanzaboote": "lanzaboote",
|
||||||
|
"lib": "lib",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
|
"nvidia-patch": "nvidia-patch",
|
||||||
"quadlet-nix": "quadlet-nix",
|
"quadlet-nix": "quadlet-nix",
|
||||||
|
"sas": "sas",
|
||||||
|
"secrets": "secrets",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"spicetify-nix": "spicetify-nix",
|
"spicetify-nix": "spicetify-nix",
|
||||||
"systems": "systems",
|
"systems": "systems",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"lanzaboote",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754189623,
|
||||||
|
"narHash": "sha256-fstu5eb30UYwsxow0aQqkzxNxGn80UZjyehQVNVHuBk=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "c582ff7f0d8a7ea689ae836dfb1773f1814f472a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sas": {
|
||||||
|
"inputs": {
|
||||||
|
"lib": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"treefmt-nix": [
|
||||||
|
"treefmt-nix"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1755506147,
|
||||||
|
"narHash": "sha256-B4e60+9j1cMEhAjpvgcNSSJbzPe2CUpAo2av15xd/0M=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "ebe2f986fc82df849d879f5b0af403c78ead2002",
|
||||||
|
"revCount": 10,
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@karaolidis.com/karaolidis/nix-sas.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@karaolidis.com/karaolidis/nix-sas.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"secrets": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1755454846,
|
||||||
|
"narHash": "sha256-tbI+AcQGvtucMKKr+VHM53ZI6upPBjD9kR5PCyF4K60=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "c1a835c4f9ba9915671c79b3241f4d4863f11323",
|
||||||
|
"revCount": 33,
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@karaolidis.com/karaolidis/nix-secrets.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@karaolidis.com/karaolidis/nix-secrets.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -209,16 +459,15 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749592509,
|
"lastModified": 1754988908,
|
||||||
"narHash": "sha256-VunQzfZFA+Y6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC+A=",
|
"narHash": "sha256-t+voe2961vCgrzPFtZxha0/kmFSHFobzF00sT8p9h0U=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "50754dfaa0e24e313c626900d44ef431f3210138",
|
"rev": "3223c7a92724b5d804e9988c6b447a0d09017d48",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"ref": "master",
|
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -233,16 +482,15 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749357231,
|
"lastModified": 1755405549,
|
||||||
"narHash": "sha256-AbrPgGFVYR45TlYLHYTppayG0xzOG9XXhi+1j3Klbw8=",
|
"narHash": "sha256-0vJD6WhL1jfXbnpH6r8yr1RgzB8mGFWIWokKHaJMJ/4=",
|
||||||
"owner": "Gerg-L",
|
"owner": "Gerg-L",
|
||||||
"repo": "spicetify-nix",
|
"repo": "spicetify-nix",
|
||||||
"rev": "03783416f7416715c52166d4e8ba0492a7149397",
|
"rev": "df1f5d4c0633040937358755defff9f07e9c0a73",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Gerg-L",
|
"owner": "Gerg-L",
|
||||||
"ref": "master",
|
|
||||||
"repo": "spicetify-nix",
|
"repo": "spicetify-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -258,7 +506,6 @@
|
|||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-systems",
|
"owner": "nix-systems",
|
||||||
"ref": "main",
|
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -270,16 +517,15 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749194973,
|
"lastModified": 1754847726,
|
||||||
"narHash": "sha256-eEy8cuS0mZ2j/r/FE0/LYBSBcIs/MKOIVakwHVuqTfk=",
|
"narHash": "sha256-2vX8QjO5lRsDbNYvN9hVHXLU6oMl+V/PsmIiJREG4rE=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "a05be418a1af1198ca0f63facb13c985db4cb3c5",
|
"rev": "7d81f6fb2e19bf84f1c65135d1060d829fae2408",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"ref": "main",
|
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
221
flake.nix
221
flake.nix
@@ -1,113 +1,93 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs = {
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
# --- Official
|
|
||||||
# type = "github";
|
|
||||||
# owner = "NixOS";
|
|
||||||
# repo = "nixpkgs";
|
|
||||||
# ref = "master";
|
|
||||||
# --- Fork
|
|
||||||
type = "github";
|
|
||||||
owner = "karaolidis";
|
|
||||||
repo = "nixpkgs";
|
|
||||||
ref = "integration";
|
|
||||||
# --- Local
|
|
||||||
# url = "git+file:./submodules/nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
# --- Official
|
url = "github:nix-community/home-manager";
|
||||||
# type = "github";
|
|
||||||
# owner = "nix-community"
|
|
||||||
# repo = "home-manager";
|
|
||||||
# --- Fork
|
|
||||||
type = "github";
|
|
||||||
owner = "karaolidis";
|
|
||||||
repo = "home-manager";
|
|
||||||
ref = "integration";
|
|
||||||
# --- Local
|
|
||||||
# url = "git+file:./submodules/home-manager";
|
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
disko = {
|
disko = {
|
||||||
type = "github";
|
url = "github:nix-community/disko/latest";
|
||||||
owner = "nix-community";
|
|
||||||
repo = "disko";
|
|
||||||
ref = "master";
|
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
sops-nix = {
|
sops-nix = {
|
||||||
type = "github";
|
url = "github:Mic92/sops-nix";
|
||||||
owner = "Mic92";
|
|
||||||
repo = "sops-nix";
|
|
||||||
ref = "master";
|
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
systems = {
|
lanzaboote = {
|
||||||
type = "github";
|
url = "github:nix-community/lanzaboote";
|
||||||
owner = "nix-systems";
|
inputs = {
|
||||||
repo = "default";
|
nixpkgs.follows = "nixpkgs";
|
||||||
ref = "main";
|
flake-parts.follows = "flake-parts";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nur = {
|
# FIXME: https://github.com/NixOS/nix/issues/12281
|
||||||
type = "github";
|
lib = {
|
||||||
owner = "nix-community";
|
url = "git+https://git.karaolidis.com/karaolidis/nix-lib.git";
|
||||||
repo = "NUR";
|
|
||||||
ref = "main";
|
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
treefmt-nix.follows = "treefmt-nix";
|
treefmt-nix.follows = "treefmt-nix";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flake-utils = {
|
# FIXME: https://github.com/NixOS/nix/issues/12281
|
||||||
type = "github";
|
sas = {
|
||||||
owner = "numtide";
|
url = "git+ssh://git@karaolidis.com/karaolidis/nix-sas.git";
|
||||||
repo = "flake-utils";
|
inputs = {
|
||||||
ref = "main";
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
lib.follows = "lib";
|
||||||
|
treefmt-nix.follows = "treefmt-nix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
inputs.systems.follows = "systems";
|
# FIXME: https://github.com/NixOS/nix/issues/12281
|
||||||
|
secrets = {
|
||||||
|
url = "git+ssh://git@karaolidis.com/karaolidis/nix-secrets.git";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
nur = {
|
||||||
|
url = "github:nix-community/NUR";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
flake-parts.follows = "flake-parts";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
treefmt-nix = {
|
treefmt-nix = {
|
||||||
type = "github";
|
url = "github:numtide/treefmt-nix";
|
||||||
owner = "numtide";
|
|
||||||
repo = "treefmt-nix";
|
|
||||||
ref = "main";
|
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
quadlet-nix = {
|
flake-input-patcher = {
|
||||||
type = "github";
|
url = "github:jfly/flake-input-patcher";
|
||||||
owner = "SEIAROTg";
|
inputs = {
|
||||||
repo = "quadlet-nix";
|
nixpkgs.follows = "nixpkgs";
|
||||||
ref = "main";
|
systems.follows = "systems";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
quadlet-nix.url = "github:SEIAROTg/quadlet-nix";
|
||||||
|
|
||||||
|
nvidia-patch = {
|
||||||
|
url = "github:icewind1991/nvidia-patch-nixos";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
utils.follows = "flake-utils";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
astal = {
|
astal = {
|
||||||
type = "github";
|
url = "github:aylur/astal";
|
||||||
owner = "aylur";
|
|
||||||
repo = "astal";
|
|
||||||
ref = "main";
|
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
ags = {
|
ags = {
|
||||||
type = "github";
|
url = "github:aylur/ags";
|
||||||
owner = "aylur";
|
|
||||||
repo = "ags";
|
|
||||||
ref = "main";
|
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
astal.follows = "astal";
|
astal.follows = "astal";
|
||||||
@@ -115,70 +95,73 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
spicetify-nix = {
|
spicetify-nix = {
|
||||||
type = "github";
|
url = "github:Gerg-L/spicetify-nix";
|
||||||
owner = "Gerg-L";
|
|
||||||
repo = "spicetify-nix";
|
|
||||||
ref = "master";
|
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
systems.follows = "systems";
|
systems.follows = "systems";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
|
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
|
||||||
|
flake-utils = {
|
||||||
|
url = "github:numtide/flake-utils";
|
||||||
|
inputs.systems.follows = "systems";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self, nixpkgs, ... }@inputs:
|
unpatchedInputs:
|
||||||
{
|
let
|
||||||
nixosConfigurations = {
|
patchInputs =
|
||||||
installer = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [ ./hosts/installer ];
|
|
||||||
specialArgs = { inherit inputs system; };
|
|
||||||
};
|
|
||||||
|
|
||||||
himalia = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [ ./hosts/himalia ];
|
|
||||||
specialArgs = { inherit inputs system; };
|
|
||||||
};
|
|
||||||
|
|
||||||
elara = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [ ./hosts/elara ];
|
|
||||||
specialArgs = { inherit inputs system; };
|
|
||||||
};
|
|
||||||
|
|
||||||
jupiter = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [ ./hosts/jupiter ];
|
|
||||||
specialArgs = { inherit inputs system; };
|
|
||||||
};
|
|
||||||
|
|
||||||
jupiter-vps = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [ ./hosts/jupiter-vps ];
|
|
||||||
specialArgs = { inherit inputs system; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// inputs.flake-utils.lib.eachSystem [ "x86_64-linux" ] (
|
|
||||||
system:
|
system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
patcher = unpatchedInputs.flake-input-patcher.lib.${system};
|
||||||
|
patches = import ./patches.nix { inherit patcher; };
|
||||||
|
in
|
||||||
|
if patches != { } then patcher.patch unpatchedInputs patches else unpatchedInputs;
|
||||||
|
|
||||||
|
mkNixosConfiguration =
|
||||||
|
inputs: system: modules:
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system modules;
|
||||||
|
specialArgs = { inherit inputs system; };
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
overlays.default = import ./overlays;
|
||||||
|
}
|
||||||
|
// (
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
inputs = patchInputs system;
|
||||||
|
|
||||||
|
pkgs = import inputs.nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
overlays = [
|
||||||
|
inputs.lib.overlays.default
|
||||||
|
inputs.self.overlays.default
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells = import ./hosts/common/shells { inherit pkgs; };
|
nixosConfigurations = {
|
||||||
lib = import ./lib { inherit pkgs; };
|
installer = mkNixosConfiguration inputs system [ ./hosts/installer ];
|
||||||
packages = import ./packages { inherit pkgs inputs system; };
|
himalia = mkNixosConfiguration inputs system [ ./hosts/himalia ];
|
||||||
|
elara = mkNixosConfiguration inputs system [ ./hosts/elara ];
|
||||||
|
jupiter = mkNixosConfiguration inputs system [ ./hosts/jupiter ];
|
||||||
|
jupiter-vps = mkNixosConfiguration inputs system [ ./hosts/jupiter-vps ];
|
||||||
|
};
|
||||||
|
|
||||||
formatter = treefmt.config.build.wrapper;
|
devShells.${system} = import ./hosts/common/shells { inherit pkgs; };
|
||||||
checks.formatting = treefmt.config.build.check self;
|
packages.${system} = import ./packages { inherit pkgs; };
|
||||||
|
formatter.${system} = treefmt.config.build.wrapper;
|
||||||
|
checks.${system}.formatting = treefmt.config.build.check inputs.self;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
14
hosts/common/configs/system/fail2ban/default.nix
Normal file
14
hosts/common/configs/system/fail2ban/default.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
environment.persistence."/persist/state"."/var/lib/fail2ban" = { };
|
||||||
|
|
||||||
|
services.fail2ban = {
|
||||||
|
enable = true;
|
||||||
|
bantime = "24h";
|
||||||
|
bantime-increment = {
|
||||||
|
enable = true;
|
||||||
|
maxtime = "720h";
|
||||||
|
overalljails = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@@ -233,11 +233,11 @@ in
|
|||||||
unitConfig.ConditionPathExists = [ (lib.strings.escape [ " " ] c.source) ];
|
unitConfig.ConditionPathExists = [ (lib.strings.escape [ " " ] c.source) ];
|
||||||
what = c.source;
|
what = c.source;
|
||||||
where = c.target;
|
where = c.target;
|
||||||
options = lib.strings.concatStringsSep "," ([
|
options = lib.strings.concatStringsSep "," [
|
||||||
"bind"
|
"bind"
|
||||||
"X-fstrim.notrim"
|
"X-fstrim.notrim"
|
||||||
"x-gvfs-hide"
|
"x-gvfs-hide"
|
||||||
]);
|
];
|
||||||
}) all;
|
}) all;
|
||||||
|
|
||||||
services = builtins.listToAttrs (
|
services = builtins.listToAttrs (
|
||||||
|
22
hosts/common/configs/system/lanzaboote/default.nix
Normal file
22
hosts/common/configs/system/lanzaboote/default.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ inputs.lanzaboote.nixosModules.lanzaboote ];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
persistence."/persist/state"."/var/lib/sbctl" = { };
|
||||||
|
|
||||||
|
systemPackages = with pkgs; [ sbctl ];
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||||
|
|
||||||
|
boot.lanzaboote = {
|
||||||
|
enable = true;
|
||||||
|
pkiBundle = "/var/lib/sbctl";
|
||||||
|
};
|
||||||
|
}
|
@@ -4,6 +4,7 @@ _nix-install_completion() {
|
|||||||
'-m[Mode: 'install' or 'repair']:mode:(install repair)'
|
'-m[Mode: 'install' or 'repair']:mode:(install repair)'
|
||||||
'-h[Host to configure]:host:($(_list_hosts))'
|
'-h[Host to configure]:host:($(_list_hosts))'
|
||||||
'-k[Key file to copy to user config]:key:($(_list_keys))'
|
'-k[Key file to copy to user config]:key:($(_list_keys))'
|
||||||
|
'-s[Enroll secure boot keys on current device]'
|
||||||
'-c[Copy configuration to target]'
|
'-c[Copy configuration to target]'
|
||||||
'-r[Reboot after completion]'
|
'-r[Reboot after completion]'
|
||||||
)
|
)
|
||||||
|
@@ -1,13 +1,14 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 flake -m install|repair -h host [-k key] [-p password_file] [-c] [-r]"
|
echo "Usage: $0 flake -m install|repair -h host [-k key] [-p password_file] [-s] [-c] [-r]"
|
||||||
echo
|
echo
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " flake Directory containing the flake.nix file."
|
echo " flake Directory containing the flake.nix file."
|
||||||
echo " -m mode Mode: 'install' or 'repair'."
|
echo " -m mode Mode: 'install' or 'repair'."
|
||||||
echo " -h host Host to configure."
|
echo " -h host Host to configure."
|
||||||
echo " -k key Key file to copy to user config."
|
echo " -k key Key file to copy to user config."
|
||||||
|
echo " -s Enroll secure boot keys on current device."
|
||||||
echo " -c Copy configuration to target."
|
echo " -c Copy configuration to target."
|
||||||
echo " -r Reboot after completion."
|
echo " -r Reboot after completion."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -35,7 +36,7 @@ check_flake() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_host() {
|
check_host() {
|
||||||
if ! nix flake show --quiet --json "$flake" 2>/dev/null | jq -e ".nixosConfigurations[\"$host\"]" &>/dev/null; then
|
if ! nix flake show --allow-import-from-derivation --quiet --json "$flake" 2>/dev/null | jq -e ".nixosConfigurations[\"$host\"]" &>/dev/null; then
|
||||||
echo "Host '$host' not found in flake."
|
echo "Host '$host' not found in flake."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -51,7 +52,8 @@ check_key() {
|
|||||||
set_password_file() {
|
set_password_file() {
|
||||||
SOPS_AGE_KEY_FILE="$flake/secrets/$key/key.txt"
|
SOPS_AGE_KEY_FILE="$flake/secrets/$key/key.txt"
|
||||||
export SOPS_AGE_KEY_FILE
|
export SOPS_AGE_KEY_FILE
|
||||||
sops --decrypt --extract "['luks']" "$flake/hosts/$host/secrets/secrets.yaml" > /tmp/keyfile
|
install -m 600 /dev/null /tmp/keyfile
|
||||||
|
sops --decrypt --extract "['luks']" "$flake/secrets/hosts/$host/secrets.yaml" > /tmp/keyfile
|
||||||
unset SOPS_AGE_KEY_FILE
|
unset SOPS_AGE_KEY_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,9 +64,9 @@ prepare_disk() {
|
|||||||
disko -m "$disko_mode" --yes-wipe-all-disks --root-mountpoint "$root" "$flake/hosts/$host/format.nix"
|
disko -m "$disko_mode" --yes-wipe-all-disks --root-mountpoint "$root" "$flake/hosts/$host/format.nix"
|
||||||
}
|
}
|
||||||
|
|
||||||
copy_keys() {
|
copy_sops_keys() {
|
||||||
mkdir -p "$root/persist/state/etc/ssh"
|
mkdir -p "$root/persist/state/etc/ssh"
|
||||||
cp -f "$flake/hosts/$host/secrets/ssh_host_ed25519_key" "$root/persist/state/etc/ssh/ssh_host_ed25519_key"
|
cp -f "$flake/secrets/hosts/$host/ssh_host_ed25519_key" "$root/persist/state/etc/ssh/ssh_host_ed25519_key"
|
||||||
|
|
||||||
for path in "$flake/hosts/$host/users"/*; do
|
for path in "$flake/hosts/$host/users"/*; do
|
||||||
if [[ -z "$key" ]]; then
|
if [[ -z "$key" ]]; then
|
||||||
@@ -87,26 +89,46 @@ copy_keys() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
install() {
|
copy_secure_boot_keys() {
|
||||||
|
mkdir -p "$root/persist/state/var/lib/sbctl/keys"/{db,KEK,PK}
|
||||||
|
|
||||||
|
SOPS_AGE_KEY_FILE="$flake/secrets/$key/key.txt"
|
||||||
|
export SOPS_AGE_KEY_FILE
|
||||||
|
|
||||||
|
sops --decrypt --extract "['guid']" "$flake/secrets/domains/lanzaboote/secrets.yaml" > "$root/persist/state/var/lib/sbctl/GUID"
|
||||||
|
sops --decrypt --extract "['keys']['kek']['key']" "$flake/secrets/domains/lanzaboote/secrets.yaml" > "$root/persist/state/var/lib/sbctl/keys/KEK/KEK.key"
|
||||||
|
sops --decrypt --extract "['keys']['kek']['pem']" "$flake/secrets/domains/lanzaboote/secrets.yaml" > "$root/persist/state/var/lib/sbctl/keys/KEK/KEK.pem"
|
||||||
|
sops --decrypt --extract "['keys']['pk']['key']" "$flake/secrets/domains/lanzaboote/secrets.yaml" > "$root/persist/state/var/lib/sbctl/keys/PK/PK.key"
|
||||||
|
sops --decrypt --extract "['keys']['pk']['pem']" "$flake/secrets/domains/lanzaboote/secrets.yaml" > "$root/persist/state/var/lib/sbctl/keys/PK/PK.pem"
|
||||||
|
sops --decrypt --extract "['keys']['db']['key']" "$flake/secrets/domains/lanzaboote/secrets.yaml" > "$root/persist/state/var/lib/sbctl/keys/db/db.key"
|
||||||
|
sops --decrypt --extract "['keys']['db']['pem']" "$flake/secrets/domains/lanzaboote/secrets.yaml" > "$root/persist/state/var/lib/sbctl/keys/db/db.pem"
|
||||||
|
|
||||||
|
chmod 400 "$root/persist/state/var/lib/sbctl/keys"/*/*
|
||||||
|
|
||||||
|
unset SOPS_AGE_KEY_FILE
|
||||||
|
|
||||||
|
mkdir -p "$root/var/lib/sbctl"
|
||||||
|
mount --bind -o X-fstrim.notrim,x-gvfs-hide "$root/persist/state/var/lib/sbctl" "$root/var/lib/sbctl"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_nixos() {
|
||||||
nixos-install --root "$root" --flake "$flake#$host" --no-root-passwd
|
nixos-install --root "$root" --flake "$flake#$host" --no-root-passwd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enroll_secure_boot() {
|
||||||
|
sbctl enroll-keys --microsoft
|
||||||
|
}
|
||||||
|
|
||||||
copy_config() {
|
copy_config() {
|
||||||
echo "Copying configuration..."
|
echo "Copying configuration..."
|
||||||
mkdir -p "$root/persist/user/etc/nixos"
|
mkdir -p "$root/persist/user/etc"
|
||||||
rm -rf "$root/persist/user/etc/nixos"
|
rm -rf "$root/persist/user/etc/nixos"
|
||||||
cp -r "$flake" "$root/persist/user/etc/nixos"
|
cp -r "$flake" "$root/persist/user/etc/nixos"
|
||||||
}
|
}
|
||||||
|
|
||||||
finish() {
|
|
||||||
echo "Rebooting system..."
|
|
||||||
trap - EXIT
|
|
||||||
cleanup
|
|
||||||
reboot
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rm -f /tmp/keyfile
|
rm -f /tmp/keyfile
|
||||||
|
if [[ -d "$root" ]]; then umount "$root/var/lib/sbctl"; fi
|
||||||
if [[ -n "$host" ]]; then disko -m "unmount" "$flake/hosts/$host/format.nix"; fi
|
if [[ -n "$host" ]]; then disko -m "unmount" "$flake/hosts/$host/format.nix"; fi
|
||||||
if [[ -d "$root" ]]; then rmdir "$root"; fi
|
if [[ -d "$root" ]]; then rmdir "$root"; fi
|
||||||
}
|
}
|
||||||
@@ -124,14 +146,16 @@ main() {
|
|||||||
mode=""
|
mode=""
|
||||||
host=""
|
host=""
|
||||||
key=""
|
key=""
|
||||||
|
enroll_secure_boot_flag="false"
|
||||||
copy_config_flag="false"
|
copy_config_flag="false"
|
||||||
reboot_flag="false"
|
reboot_flag="false"
|
||||||
|
|
||||||
while getopts "m:h:k:cr" opt; do
|
while getopts "m:h:k:scr" opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
m) mode="$OPTARG" ;;
|
m) mode="$OPTARG" ;;
|
||||||
h) host="$OPTARG" ;;
|
h) host="$OPTARG" ;;
|
||||||
k) key="$OPTARG" ;;
|
k) key="$OPTARG" ;;
|
||||||
|
s) enroll_secure_boot_flag="true" ;;
|
||||||
c) copy_config_flag="true" ;;
|
c) copy_config_flag="true" ;;
|
||||||
r) reboot_flag="true" ;;
|
r) reboot_flag="true" ;;
|
||||||
*) usage ;;
|
*) usage ;;
|
||||||
@@ -153,10 +177,17 @@ main() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
copy_keys
|
copy_sops_keys
|
||||||
install
|
copy_secure_boot_keys
|
||||||
|
|
||||||
|
install_nixos
|
||||||
|
|
||||||
|
[[ "$enroll_secure_boot_flag" == "true" ]] && enroll_secure_boot
|
||||||
[[ "$copy_config_flag" == "true" ]] && copy_config
|
[[ "$copy_config_flag" == "true" ]] && copy_config
|
||||||
[[ "$reboot_flag" == "true" ]] && finish
|
|
||||||
|
cleanup
|
||||||
|
|
||||||
|
[[ "$reboot_flag" == "true" ]] && reboot
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
@@ -1,12 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
nix-update = prev.nix-update.overrideAttrs (oldAttrs: {
|
|
||||||
patches = oldAttrs.patches or [ ] ++ [ ./source-attribute.patch ];
|
|
||||||
});
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ nix-update ];
|
environment.systemPackages = with pkgs; [ nix-update ];
|
||||||
}
|
}
|
||||||
|
@@ -1,127 +0,0 @@
|
|||||||
diff --git a/nix_update/__init__.py b/nix_update/__init__.py
|
|
||||||
index 89bbe45..93f9322 100644
|
|
||||||
--- a/nix_update/__init__.py
|
|
||||||
+++ b/nix_update/__init__.py
|
|
||||||
@@ -124,6 +124,12 @@ def parse_args(args: list[str]) -> Options:
|
|
||||||
default=[],
|
|
||||||
)
|
|
||||||
|
|
||||||
+ parser.add_argument(
|
|
||||||
+ "--src-attr",
|
|
||||||
+ help="Src attribute",
|
|
||||||
+ default="src",
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
a = parser.parse_args(args)
|
|
||||||
extra_flags = ["--extra-experimental-features", "flakes nix-command"]
|
|
||||||
if a.system:
|
|
||||||
@@ -146,6 +152,7 @@ def parse_args(args: list[str]) -> Options:
|
|
||||||
version=a.version,
|
|
||||||
version_preference=VersionPreference.from_str(a.version),
|
|
||||||
attribute=a.attribute,
|
|
||||||
+ source_attribute=a.src_attr,
|
|
||||||
test=a.test,
|
|
||||||
version_regex=a.version_regex,
|
|
||||||
review=a.review,
|
|
||||||
diff --git a/nix_update/eval.py b/nix_update/eval.py
|
|
||||||
index 1767056..f85ea69 100644
|
|
||||||
--- a/nix_update/eval.py
|
|
||||||
+++ b/nix_update/eval.py
|
|
||||||
@@ -105,12 +105,19 @@ class Package:
|
|
||||||
def eval_expression(
|
|
||||||
escaped_import_path: str,
|
|
||||||
attr: str,
|
|
||||||
+ source_attr: str,
|
|
||||||
flake: bool,
|
|
||||||
system: str | None,
|
|
||||||
override_filename: str | None,
|
|
||||||
) -> str:
|
|
||||||
system = f'"{system}"' if system else "builtins.currentSystem"
|
|
||||||
|
|
||||||
+ source_attrs = source_attr.rpartition(".")
|
|
||||||
+ source_attr_last = source_attrs[-1] or source_attr
|
|
||||||
+ source_attr_all_but_last = (
|
|
||||||
+ f".{source_attrs[0]}" if source_attr_last != source_attr else ""
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
if flake:
|
|
||||||
sanitize_position = (
|
|
||||||
f"""
|
|
||||||
@@ -164,8 +171,8 @@ let
|
|
||||||
raw_version_position
|
|
||||||
else if pkg ? isPhpExtension then
|
|
||||||
raw_version_position
|
|
||||||
- else if (builtins.unsafeGetAttrPos "src" pkg) != null then
|
|
||||||
- sanitizePosition (builtins.unsafeGetAttrPos "src" pkg)
|
|
||||||
+ else if (builtins.unsafeGetAttrPos "{source_attr_last}" pkg) != null then
|
|
||||||
+ sanitizePosition (builtins.unsafeGetAttrPos "{source_attr_last}" pkg{source_attr_all_but_last})
|
|
||||||
else
|
|
||||||
sanitizePosition (positionFromMeta pkg);
|
|
||||||
in {{
|
|
||||||
@@ -174,11 +181,11 @@ in {{
|
|
||||||
inherit raw_version_position;
|
|
||||||
filename = position.file;
|
|
||||||
line = position.line;
|
|
||||||
- urls = pkg.src.urls or null;
|
|
||||||
- url = pkg.src.url or null;
|
|
||||||
- rev = pkg.src.rev or null;
|
|
||||||
- tag = pkg.src.tag or null;
|
|
||||||
- hash = pkg.src.outputHash or null;
|
|
||||||
+ urls = pkg.{source_attr}.urls or null;
|
|
||||||
+ url = pkg.{source_attr}.url or null;
|
|
||||||
+ rev = pkg.{source_attr}.rev or null;
|
|
||||||
+ tag = pkg.{source_attr}.tag or null;
|
|
||||||
+ hash = pkg.{source_attr}.outputHash or null;
|
|
||||||
go_modules = pkg.goModules.outputHash or null;
|
|
||||||
go_modules_old = pkg.go-modules.outputHash or null;
|
|
||||||
cargo_deps = pkg.cargoDeps.outputHash or null;
|
|
||||||
@@ -205,7 +212,7 @@ in {{
|
|
||||||
mix_deps = pkg.mixFodDeps.outputHash or null;
|
|
||||||
tests = builtins.attrNames (pkg.passthru.tests or {{}});
|
|
||||||
has_update_script = {has_update_script};
|
|
||||||
- src_homepage = pkg.src.meta.homepage or null;
|
|
||||||
+ src_homepage = pkg.{source_attr}.meta.homepage or null;
|
|
||||||
changelog = pkg.meta.changelog or null;
|
|
||||||
maintainers = pkg.meta.maintainers or null;
|
|
||||||
}}"""
|
|
||||||
@@ -215,6 +222,7 @@ def eval_attr(opts: Options) -> Package:
|
|
||||||
expr = eval_expression(
|
|
||||||
opts.escaped_import_path,
|
|
||||||
opts.escaped_attribute,
|
|
||||||
+ opts.source_attribute,
|
|
||||||
opts.flake,
|
|
||||||
opts.system,
|
|
||||||
opts.override_filename,
|
|
||||||
diff --git a/nix_update/options.py b/nix_update/options.py
|
|
||||||
index 2d07b77..ab5c305 100644
|
|
||||||
--- a/nix_update/options.py
|
|
||||||
+++ b/nix_update/options.py
|
|
||||||
@@ -8,6 +8,7 @@ from .version.version import VersionPreference
|
|
||||||
@dataclass
|
|
||||||
class Options:
|
|
||||||
attribute: str
|
|
||||||
+ source_attribute: str = "src"
|
|
||||||
flake: bool = False
|
|
||||||
version: str = "stable"
|
|
||||||
version_preference: VersionPreference = VersionPreference.STABLE
|
|
||||||
@@ -33,4 +34,7 @@ class Options:
|
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
|
||||||
self.escaped_attribute = ".".join(map(json.dumps, self.attribute.split(".")))
|
|
||||||
+ self.escaped_source_attribute = ".".join(
|
|
||||||
+ map(json.dumps, self.source_attribute.split("."))
|
|
||||||
+ )
|
|
||||||
self.escaped_import_path = json.dumps(self.import_path)
|
|
||||||
diff --git a/nix_update/update.py b/nix_update/update.py
|
|
||||||
index 82b7bc5..464bf3d 100644
|
|
||||||
--- a/nix_update/update.py
|
|
||||||
+++ b/nix_update/update.py
|
|
||||||
@@ -155,7 +155,7 @@ def git_prefetch(x: tuple[str, tuple[str, str]]) -> tuple[str, str]:
|
|
||||||
|
|
||||||
|
|
||||||
def update_src_hash(opts: Options, filename: str, current_hash: str) -> None:
|
|
||||||
- target_hash = nix_prefetch(opts, "src")
|
|
||||||
+ target_hash = nix_prefetch(opts, opts.source_attribute)
|
|
||||||
replace_hash(filename, current_hash, target_hash)
|
|
||||||
|
|
||||||
|
|
@@ -3,9 +3,9 @@
|
|||||||
sops = {
|
sops = {
|
||||||
secrets = {
|
secrets = {
|
||||||
"git/credentials/github.com/public/username".sopsFile =
|
"git/credentials/github.com/public/username".sopsFile =
|
||||||
../../../../../secrets/personal/secrets.yaml;
|
"${inputs.secrets}/domains/personal/secrets.yaml";
|
||||||
"git/credentials/github.com/public/password".sopsFile =
|
"git/credentials/github.com/public/password".sopsFile =
|
||||||
../../../../../secrets/personal/secrets.yaml;
|
"${inputs.secrets}/domains/personal/secrets.yaml";
|
||||||
};
|
};
|
||||||
|
|
||||||
templates.nix-access-tokens = {
|
templates.nix-access-tokens = {
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
{ inputs, system, ... }:
|
{ system, ... }:
|
||||||
{
|
{
|
||||||
imports = [ inputs.nur.modules.nixos.default ];
|
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
hostPlatform = system;
|
hostPlatform = system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
@@ -10,7 +10,10 @@
|
|||||||
storage.settings.storage.driver = "btrfs";
|
storage.settings.storage.driver = "btrfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
quadlet.autoEscape = true;
|
quadlet = {
|
||||||
|
enable = true;
|
||||||
|
autoEscape = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
@@ -4,4 +4,9 @@
|
|||||||
smartmontools
|
smartmontools
|
||||||
nvme-cli
|
nvme-cli
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.smartd = {
|
||||||
|
enable = true;
|
||||||
|
defaults.autodetected = "-a -o on -n idle,10 -s (S/../.././02|L/../../7/04)";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = ../../../../. + "/${config.networking.hostName}/secrets/secrets.yaml";
|
defaultSopsFile = "${inputs.secrets}/hosts/${config.networking.hostName}/secrets.yaml";
|
||||||
|
|
||||||
age = {
|
age = {
|
||||||
generateKey = true;
|
generateKey = true;
|
||||||
|
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.ssh.startAgent = true;
|
|
||||||
}
|
|
@@ -1,22 +1,22 @@
|
|||||||
{ ... }:
|
{ inputs, ... }:
|
||||||
{
|
{
|
||||||
programs.ssh.knownHosts = {
|
programs.ssh.knownHosts = {
|
||||||
installer.publicKeyFile = ../../../../installer/secrets/ssh_host_ed25519_key.pub;
|
installer.publicKeyFile = "${inputs.secrets}/hosts/installer/ssh_host_ed25519_key.pub";
|
||||||
elara.publicKeyFile = ../../../../elara/secrets/ssh_host_ed25519_key.pub;
|
elara.publicKeyFile = "${inputs.secrets}/hosts/elara/ssh_host_ed25519_key.pub";
|
||||||
himalia.publicKeyFile = ../../../../himalia/secrets/ssh_host_ed25519_key.pub;
|
himalia.publicKeyFile = "${inputs.secrets}/hosts/himalia/ssh_host_ed25519_key.pub";
|
||||||
|
|
||||||
jupiter = {
|
jupiter = {
|
||||||
publicKeyFile = ../../../../jupiter/secrets/ssh_host_ed25519_key.pub;
|
publicKeyFile = "${inputs.secrets}/hosts/jupiter/ssh_host_ed25519_key.pub";
|
||||||
extraHostNames = [ "karaolidis.com" ];
|
extraHostNames = [ "karaolidis.com" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
jupiter-sish = {
|
jupiter-sish = {
|
||||||
publicKeyFile = ../../../../jupiter/users/storm/configs/console/podman/sish/ssh_host_ed25519_key.pub;
|
publicKeyFile = "${inputs.secrets}/hosts/jupiter/ssh_sish_ed25519_key.pub";
|
||||||
extraHostNames = [ "karaolidis.com" ];
|
extraHostNames = [ "karaolidis.com" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
jupiter-vps = {
|
jupiter-vps = {
|
||||||
publicKeyFile = ../../../../jupiter-vps/secrets/ssh_host_ed25519_key.pub;
|
publicKeyFile = "${inputs.secrets}/hosts/jupiter-vps/ssh_host_ed25519_key.pub";
|
||||||
extraHostNames = [ "vps.karaolidis.com" ];
|
extraHostNames = [ "vps.karaolidis.com" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -1,27 +1,15 @@
|
|||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment = {
|
environment.systemPackages = with pkgs; [
|
||||||
enableAllTerminfo = true;
|
kitty.terminfo
|
||||||
persistence."/persist/state"."/var/lib/fail2ban" = { };
|
tmux.terminfo
|
||||||
};
|
];
|
||||||
|
|
||||||
services = {
|
services.openssh = {
|
||||||
openssh = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
PrintMotd = false;
|
PrintMotd = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fail2ban = {
|
|
||||||
enable = true;
|
|
||||||
bantime = "24h";
|
|
||||||
bantime-increment = {
|
|
||||||
enable = true;
|
|
||||||
maxtime = "720h";
|
|
||||||
overalljails = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@@ -1,17 +1,6 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
android-tools = prev.android-tools.overrideAttrs (oldAttrs: {
|
|
||||||
patches = oldAttrs.patches or [ ] ++ [ ./env-var-user-home.patch ];
|
|
||||||
});
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
users.users.${user}.extraGroups = [
|
users.users.${user}.extraGroups = [
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.programs.btop = {
|
home-manager.users.${user}.programs.btop = {
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.programs.fastfetch.enable = true;
|
home-manager.users.${user}.programs.fastfetch.enable = true;
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.home.packages = with pkgs; [
|
home-manager.users.${user}.home.packages = with pkgs; [
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ config, inputs, ... }:
|
{ config, inputs, ... }:
|
||||||
{
|
{
|
||||||
imports = [ inputs.home-manager.nixosModules.default ];
|
imports = [ inputs.home-manager.nixosModules.default ];
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.home.packages = with pkgs; [ imagemagick ];
|
home-manager.users.${user}.home.packages = with pkgs; [ imagemagick ];
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.home.packages = with pkgs; [
|
home-manager.users.${user}.home.packages = with pkgs; [
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.programs.jq.enable = true;
|
home-manager.users.${user}.programs.jq.enable = true;
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.dconf.settings = {
|
home-manager.users.${user}.dconf.settings = {
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.home.packages = with pkgs; [ lsof ];
|
home-manager.users.${user}.home.packages = with pkgs; [ lsof ];
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.home.packages = with pkgs; [ mprocs ];
|
home-manager.users.${user}.home.packages = with pkgs; [ mprocs ];
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.persistence = {
|
environment.persistence = {
|
||||||
|
@@ -3,6 +3,9 @@ volnorm = true
|
|||||||
default_keybindings = true
|
default_keybindings = true
|
||||||
library_tabs = [ "albums", "artists", "playlists", "browse" ]
|
library_tabs = [ "albums", "artists", "playlists", "browse" ]
|
||||||
|
|
||||||
|
[keybindings]
|
||||||
|
"Esc" = "back"
|
||||||
|
|
||||||
[theme]
|
[theme]
|
||||||
background = "{{colors.surface.default.hex}}"
|
background = "{{colors.surface.default.hex}}"
|
||||||
primary = "{{colors.on_surface.default.hex}}"
|
primary = "{{colors.on_surface.default.hex}}"
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.programs = {
|
home-manager.users.${user}.programs = {
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.programs.zsh.shellAliases.ncl = "sudo nix-cleanup";
|
home-manager.users.${user}.programs.zsh.shellAliases.ncl = "sudo nix-cleanup";
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
|
@@ -1,42 +1,31 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs = {
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
type = "github";
|
|
||||||
owner = "karaolidis";
|
|
||||||
repo = "nixpkgs";
|
|
||||||
ref = "integration";
|
|
||||||
};
|
|
||||||
|
|
||||||
flake-utils = {
|
|
||||||
type = "github";
|
|
||||||
owner = "numtide";
|
|
||||||
repo = "flake-utils";
|
|
||||||
ref = "main";
|
|
||||||
};
|
|
||||||
|
|
||||||
treefmt-nix = {
|
treefmt-nix = {
|
||||||
type = "github";
|
url = "github:numtide/treefmt-nix";
|
||||||
owner = "numtide";
|
|
||||||
repo = "treefmt-nix";
|
|
||||||
ref = "main";
|
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self, nixpkgs, ... }@inputs:
|
inputs:
|
||||||
inputs.flake-utils.lib.eachDefaultSystem (
|
(
|
||||||
system:
|
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
pkgs = import inputs.nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
|
||||||
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells.default = pkgs.mkShell { packages = with pkgs; [ ]; };
|
devShells.${system}.default = pkgs.mkShell { packages = with pkgs; [ ]; };
|
||||||
|
|
||||||
formatter = treefmt.config.build.wrapper;
|
formatter.${system} = treefmt.config.build.wrapper;
|
||||||
checks.formatting = treefmt.config.build.check self;
|
checks.formatting.${system} = treefmt.config.build.check inputs.self;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -9,9 +9,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings.global.excludes = [ ".envrc" ];
|
||||||
global = {
|
|
||||||
excludes = [ ".envrc" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.persistence."/persist/cache"."${home}/.cache/nix" = { };
|
environment.persistence."/persist/cache"."${home}/.cache/nix" = { };
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.home.packages = with pkgs; [ ouch ];
|
home-manager.users.${user}.home.packages = with pkgs; [ ouch ];
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.persistence."/persist/state"."${home}/.local/state/wireplumber" = { };
|
environment.persistence."/persist/state"."${home}/.local/state/wireplumber" = { };
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -19,7 +16,10 @@
|
|||||||
settings.storage.storage.driver = "btrfs";
|
settings.storage.storage.driver = "btrfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.quadlet.autoEscape = true;
|
virtualisation.quadlet = {
|
||||||
|
enable = true;
|
||||||
|
autoEscape = true;
|
||||||
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ config, inputs, ... }:
|
{ config, inputs, ... }:
|
||||||
{
|
{
|
||||||
environment.persistence."/persist/state"."${home}/.config/sops-nix/key.txt" = { };
|
environment.persistence."/persist/state"."${home}/.config/sops-nix/key.txt" = { };
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.programs.ssh.enable = true;
|
home-manager.users.${user}.programs.ssh.enable = true;
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ config, utils, ... }:
|
{ config, utils, ... }:
|
||||||
{
|
{
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.programs.tmux.enable = true;
|
home-manager.users.${user}.programs.tmux.enable = true;
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.home.packages = with pkgs; [ tree ];
|
home-manager.users.${user}.home.packages = with pkgs; [ tree ];
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.home.packages = with pkgs; [ wget ];
|
home-manager.users.${user}.home.packages = with pkgs; [ wget ];
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.persistence."/persist/user" = {
|
environment.persistence."/persist/user" = {
|
||||||
|
@@ -1,18 +1,12 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
|
||||||
system,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
hmConfig = config.home-manager.users.${user};
|
hmConfig = config.home-manager.users.${user};
|
||||||
selfPkgs = inputs.self.packages.${system};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
@@ -27,8 +21,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
opener = {
|
opener = {
|
||||||
edit =
|
edit = [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
run = "${hmConfig.programs.neovim.finalPackage}/bin/nvim \"$@\"";
|
run = "${hmConfig.programs.neovim.finalPackage}/bin/nvim \"$@\"";
|
||||||
desc = "nvim";
|
desc = "nvim";
|
||||||
@@ -191,9 +184,8 @@ in
|
|||||||
ouch
|
ouch
|
||||||
mount
|
mount
|
||||||
mediainfo
|
mediainfo
|
||||||
|
custom-shell
|
||||||
;
|
;
|
||||||
|
|
||||||
custom-shell = selfPkgs.yazi-plugin-custom-shell;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user}.programs.yt-dlp = {
|
home-manager.users.${user}.programs.yt-dlp = {
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
environment.persistence."/persist/state"."${home}/.local/share/zoxide" = { };
|
environment.persistence."/persist/state"."${home}/.local/share/zoxide" = { };
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment = {
|
environment = {
|
||||||
@@ -14,7 +11,7 @@
|
|||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dotDir = ".config/zsh";
|
dotDir = "${home}/.config/zsh";
|
||||||
autocd = true;
|
autocd = true;
|
||||||
history = {
|
history = {
|
||||||
path = "${home}/.local/share/zsh/history";
|
path = "${home}/.local/share/zsh/history";
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./options.nix ];
|
imports = [ ./options.nix ];
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { App } from "astal/gtk3";
|
import app from "ags/gtk3/app";
|
||||||
import { monitorFile } from "astal/file";
|
import { exec } from "ags/process";
|
||||||
import { exec } from "astal/process";
|
import { monitorFile } from "ags/file";
|
||||||
import GLib from "gi://GLib";
|
import GLib from "gi://GLib";
|
||||||
import Left from "./widget/Left";
|
import Left from "./widget/Left";
|
||||||
import Center from "./widget/Center";
|
import Center from "./widget/Center";
|
||||||
@@ -12,15 +12,15 @@ const scss = `${HOME}/.config/astal/theme.sass`;
|
|||||||
|
|
||||||
monitorFile(scss, () => {
|
monitorFile(scss, () => {
|
||||||
exec(`sassc ${scss} ${css}`);
|
exec(`sassc ${scss} ${css}`);
|
||||||
App.apply_css(css, true);
|
app.apply_css(css, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
exec(`sassc ${scss} ${css}`);
|
exec(`sassc ${scss} ${css}`);
|
||||||
|
|
||||||
App.start({
|
app.start({
|
||||||
css,
|
css,
|
||||||
main() {
|
main() {
|
||||||
App.get_monitors().map((monitor) => {
|
app.get_monitors().map((monitor) => {
|
||||||
Left(monitor);
|
Left(monitor);
|
||||||
Center(monitor);
|
Center(monitor);
|
||||||
Right(monitor);
|
Right(monitor);
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { Gdk } from "astal/gtk3";
|
import { Gdk } from "ags/gtk3";
|
||||||
import Hyprland from "gi://AstalHyprland";
|
import Hyprland from "gi://AstalHyprland";
|
||||||
|
|
||||||
export const range = (length: number, start = 1) => {
|
export const range = (length: number, start = 1) => {
|
||||||
return Array.from({ length }, (n, i) => i + start);
|
return Array.from({ length }, (_, i) => i + start);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getHyprlandMonitor = (gdkmonitor: Gdk.Monitor) => {
|
export const getHyprlandMonitor = (gdkmonitor: Gdk.Monitor) => {
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "astal-shell",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"astal": "~/.local/share/ags"
|
"ags": "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/tsconfig",
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"experimentalDecorators": true,
|
"jsx": "react-jsx",
|
||||||
"strict": true,
|
"jsxImportSource": "ags/gtk3",
|
||||||
"target": "ES2022",
|
"lib": ["ES2023"],
|
||||||
"module": "ES2022",
|
"module": "ES2022",
|
||||||
"moduleResolution": "Bundler",
|
"moduleResolution": "Bundler",
|
||||||
"jsx": "react-jsx",
|
"strict": true,
|
||||||
"jsxImportSource": "astal/gtk3"
|
"target": "ES2020"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,17 +1,19 @@
|
|||||||
import { App, Astal, Gtk, Gdk } from "astal/gtk3";
|
import { Astal, Gtk, Gdk } from "ags/gtk3";
|
||||||
import Date from "./components/Date";
|
import Date from "./components/Date";
|
||||||
import Hidden from "./components/Hidden";
|
import Hidden from "./components/Hidden";
|
||||||
|
import app from "ags/gtk3/app";
|
||||||
|
|
||||||
export default (monitor: Gdk.Monitor) => (
|
export default (monitor: Gdk.Monitor) => (
|
||||||
<window
|
<window
|
||||||
className="root"
|
visible
|
||||||
|
class="root"
|
||||||
gdkmonitor={monitor}
|
gdkmonitor={monitor}
|
||||||
exclusivity={Astal.Exclusivity.IGNORE}
|
exclusivity={Astal.Exclusivity.IGNORE}
|
||||||
anchor={Astal.WindowAnchor.TOP}
|
anchor={Astal.WindowAnchor.TOP}
|
||||||
application={App}
|
application={app}
|
||||||
>
|
>
|
||||||
<Hidden>
|
<Hidden>
|
||||||
<box className="widgets" hexpand halign={Gtk.Align.CENTER}>
|
<box class="widgets" hexpand halign={Gtk.Align.CENTER}>
|
||||||
<Date />
|
<Date />
|
||||||
</box>
|
</box>
|
||||||
</Hidden>
|
</Hidden>
|
||||||
|
@@ -1,21 +1,22 @@
|
|||||||
import { App, Astal, Gtk, Gdk } from "astal/gtk3";
|
import { Astal, Gtk, Gdk } from "ags/gtk3";
|
||||||
|
import app from "ags/gtk3/app";
|
||||||
import Launcher from "./components/Launcher";
|
import Launcher from "./components/Launcher";
|
||||||
import Workspace from "./components/Workspaces";
|
import Workspace from "./components/Workspaces";
|
||||||
import Hidden from "./components/Hidden";
|
import Hidden from "./components/Hidden";
|
||||||
import { getHyprlandMonitor } from "../lib";
|
|
||||||
|
|
||||||
export default (monitor: Gdk.Monitor) => (
|
export default (monitor: Gdk.Monitor) => (
|
||||||
<window
|
<window
|
||||||
className="root"
|
visible
|
||||||
|
class="root"
|
||||||
gdkmonitor={monitor}
|
gdkmonitor={monitor}
|
||||||
exclusivity={Astal.Exclusivity.IGNORE}
|
exclusivity={Astal.Exclusivity.IGNORE}
|
||||||
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.LEFT}
|
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.LEFT}
|
||||||
application={App}
|
application={app}
|
||||||
>
|
>
|
||||||
<Hidden>
|
<Hidden>
|
||||||
<box className="widgets" hexpand halign={Gtk.Align.START}>
|
<box class="widgets" hexpand halign={Gtk.Align.START}>
|
||||||
<Launcher />
|
<Launcher />
|
||||||
<Workspace monitor={getHyprlandMonitor(monitor)!} />
|
<Workspace gdkmonitor={monitor} />
|
||||||
</box>
|
</box>
|
||||||
</Hidden>
|
</Hidden>
|
||||||
</window>
|
</window>
|
||||||
|
@@ -1,18 +1,21 @@
|
|||||||
import { App, Astal, Gtk, Gdk } from "astal/gtk3";
|
import { Astal, Gtk } from "ags/gtk3";
|
||||||
|
import app from "ags/gtk3/app";
|
||||||
|
import Gdk from "gi://Gdk";
|
||||||
import Systray from "./components/Tray";
|
import Systray from "./components/Tray";
|
||||||
import Hidden from "./components/Hidden";
|
import Hidden from "./components/Hidden";
|
||||||
import Battery from "./components/Battery";
|
import Battery from "./components/Battery";
|
||||||
|
|
||||||
export default (monitor: Gdk.Monitor) => (
|
export default (monitor: Gdk.Monitor) => (
|
||||||
<window
|
<window
|
||||||
className="root"
|
visible
|
||||||
|
class="root"
|
||||||
gdkmonitor={monitor}
|
gdkmonitor={monitor}
|
||||||
exclusivity={Astal.Exclusivity.IGNORE}
|
exclusivity={Astal.Exclusivity.IGNORE}
|
||||||
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.RIGHT}
|
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.RIGHT}
|
||||||
application={App}
|
application={app}
|
||||||
>
|
>
|
||||||
<Hidden>
|
<Hidden>
|
||||||
<box className="widgets" hexpand halign={Gtk.Align.END}>
|
<box class="widgets" hexpand halign={Gtk.Align.END}>
|
||||||
<Systray />
|
<Systray />
|
||||||
<Battery />
|
<Battery />
|
||||||
</box>
|
</box>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { bind, Variable } from "astal";
|
import { createBinding, createComputed } from "ags";
|
||||||
import AstalBattery from "gi://AstalBattery";
|
import AstalBattery from "gi://AstalBattery";
|
||||||
|
|
||||||
const battery = AstalBattery.get_default();
|
const battery = AstalBattery.get_default();
|
||||||
@@ -9,19 +9,19 @@ const formatTime = (seconds: number) =>
|
|||||||
: "--:--";
|
: "--:--";
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const percentage = bind(battery, "percentage").as(
|
const percentage = createBinding(battery, "percentage").as(
|
||||||
(p) => Math.round(p * 100) + "%",
|
(p) => Math.round(p * 100) + "%",
|
||||||
);
|
);
|
||||||
const charging = bind(battery, "charging");
|
const charging = createBinding(battery, "charging");
|
||||||
const timeToFull = bind(battery, "timeToFull");
|
const timeToFull = createBinding(battery, "timeToFull");
|
||||||
const timeToEmpty = bind(battery, "timeToEmpty");
|
const timeToEmpty = createBinding(battery, "timeToEmpty");
|
||||||
|
|
||||||
const time = Variable.derive(
|
const time = createComputed(
|
||||||
[charging, timeToFull, timeToEmpty],
|
[charging, timeToFull, timeToEmpty],
|
||||||
(charging, full, empty) => formatTime(charging ? full : empty),
|
(charging, full, empty) => formatTime(charging ? full : empty),
|
||||||
);
|
);
|
||||||
|
|
||||||
const label = Variable.derive(
|
const label = createComputed(
|
||||||
[percentage, charging, time],
|
[percentage, charging, time],
|
||||||
(percentage, charging, time) => {
|
(percentage, charging, time) => {
|
||||||
const arrow = charging ? "▲" : "▼";
|
const arrow = charging ? "▲" : "▼";
|
||||||
@@ -30,8 +30,8 @@ export default () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button className="battery">
|
<button class="battery">
|
||||||
<label className="label" label={bind(label)} />
|
<label class="label" label={label} />
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@@ -1,21 +1,16 @@
|
|||||||
import { bind, Variable } from "astal";
|
import { createPoll } from "ags/time";
|
||||||
import { GLib } from "astal";
|
import GLib from "gi://GLib?version=2.0";
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const time = Variable(
|
const time = createPoll(
|
||||||
GLib.DateTime.new_now_local().format("%H:%M - %A, %d %B %Y")!,
|
GLib.DateTime.new_now_local().format("%H:%M - %A, %d %B %Y")!,
|
||||||
).poll(
|
|
||||||
1000,
|
1000,
|
||||||
() => GLib.DateTime.new_now_local().format("%H:%M - %A, %d %B %Y")!,
|
() => GLib.DateTime.new_now_local().format("%H:%M - %A, %d %B %Y")!,
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button className="date">
|
<button class="date">
|
||||||
<label
|
<label class="label" label={time} />
|
||||||
className="label"
|
|
||||||
onDestroy={() => time.drop()}
|
|
||||||
label={bind(time)}
|
|
||||||
/>
|
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import { Gtk } from "astal/gtk3";
|
import { createState } from "ags";
|
||||||
import { Variable, bind, timeout } from "astal";
|
import { Gtk } from "ags/gtk3";
|
||||||
|
import { timeout } from "ags/time";
|
||||||
|
|
||||||
export default function Hidden({
|
export default function Hidden({
|
||||||
child,
|
child,
|
||||||
@@ -12,24 +13,20 @@ export default function Hidden({
|
|||||||
orientation?: Gtk.Orientation;
|
orientation?: Gtk.Orientation;
|
||||||
transitionType?: Gtk.RevealerTransitionType;
|
transitionType?: Gtk.RevealerTransitionType;
|
||||||
}) {
|
}) {
|
||||||
const show = Variable(true);
|
const [show, setShow] = createState(true);
|
||||||
const contents = child ?? children;
|
const contents = child ?? children;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<eventbox
|
<eventbox onHover={() => setShow(true)} onHoverLost={() => setShow(false)}>
|
||||||
clickThrough
|
|
||||||
onHover={() => show.set(true)}
|
|
||||||
onHoverLost={() => show.set(false)}
|
|
||||||
>
|
|
||||||
<box orientation={orientation}>
|
<box orientation={orientation}>
|
||||||
<revealer
|
<revealer
|
||||||
setup={(self) => timeout(2000, () => (self.revealChild = false))}
|
onRealize={() => timeout(2000, () => setShow(false))}
|
||||||
revealChild={bind(show)}
|
revealChild={show}
|
||||||
transitionType={transitionType}
|
transitionType={transitionType}
|
||||||
>
|
>
|
||||||
{Array.isArray(contents) ? <>{contents}</> : contents}
|
{Array.isArray(contents) ? <>{contents}</> : contents}
|
||||||
</revealer>
|
</revealer>
|
||||||
<box clickThrough className="trigger-guard" />
|
<box class="trigger-guard" />
|
||||||
</box>
|
</box>
|
||||||
</eventbox>
|
</eventbox>
|
||||||
);
|
);
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
import { execAsync } from "astal/process";
|
import { execAsync } from "ags/process";
|
||||||
|
|
||||||
export default () => (
|
export default () => (
|
||||||
<button
|
<button
|
||||||
className="launcher"
|
class="launcher"
|
||||||
onClickRelease={() =>
|
onClicked={() =>
|
||||||
execAsync(
|
execAsync(
|
||||||
'rofi -modes drun -show drun -run-command \"uwsm app -- {cmd}\"',
|
'rofi -modes drun -show drun -run-command \"uwsm app -- {cmd}\"',
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<icon className="icon" icon="nix-snowflake-symbolic" />;
|
<icon class="icon" icon="nix-snowflake-symbolic" />;
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
@@ -1,28 +1,37 @@
|
|||||||
import { App } from "astal/gtk3";
|
import { createBinding, For } from "ags";
|
||||||
import { bind } from "astal";
|
import app from "ags/gtk3/app";
|
||||||
import Tray from "gi://AstalTray";
|
import Tray from "gi://AstalTray";
|
||||||
|
|
||||||
const tray = Tray.get_default();
|
const tray = Tray.get_default();
|
||||||
|
|
||||||
const TrayButton = ({ item }: { item: Tray.TrayItem }) => (
|
const TrayButton = ({ item }: { item: Tray.TrayItem }) => (
|
||||||
<menubutton
|
<menubutton
|
||||||
className="item"
|
class="item"
|
||||||
tooltipMarkup={bind(item, "tooltipMarkup")}
|
tooltipMarkup={createBinding(item, "tooltipMarkup")}
|
||||||
usePopover={false}
|
usePopover={false}
|
||||||
menuModel={bind(item, "menuModel")}
|
menuModel={createBinding(item, "menuModel")}
|
||||||
actionGroup={bind(item, "actionGroup").as((ag) => ["dbusmenu", ag])}
|
onRealize={(self) => {
|
||||||
|
createBinding(item, "action_group").as((action_group) =>
|
||||||
|
self.insert_action_group("dbusmenu", action_group),
|
||||||
|
);
|
||||||
|
self.insert_action_group("dbusmenu", item.action_group);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<icon gicon={bind(item, "gicon")} />
|
<icon gicon={createBinding(item, "gicon")} />
|
||||||
</menubutton>
|
</menubutton>
|
||||||
);
|
);
|
||||||
|
|
||||||
export default () => (
|
export default () => {
|
||||||
<box className="systray">
|
let items = createBinding(tray, "items");
|
||||||
{bind(tray, "items").as((items) =>
|
|
||||||
items.map((item) => {
|
return (
|
||||||
if (item.iconThemePath) App.add_icons(item.iconThemePath);
|
<box class="systray">
|
||||||
|
<For each={items}>
|
||||||
|
{(item, _) => {
|
||||||
|
if (item.iconThemePath) app.add_icons(item.iconThemePath);
|
||||||
return <TrayButton item={item} />;
|
return <TrayButton item={item} />;
|
||||||
}),
|
}}
|
||||||
)}
|
</For>
|
||||||
</box>
|
</box>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
@@ -1,74 +1,83 @@
|
|||||||
import { bind, Variable } from "astal";
|
|
||||||
import Hyprland from "gi://AstalHyprland";
|
import Hyprland from "gi://AstalHyprland";
|
||||||
import { range } from "../../lib";
|
import { getHyprlandMonitor, range } from "../../lib";
|
||||||
|
import {
|
||||||
|
Accessor,
|
||||||
|
createBinding,
|
||||||
|
createComputed,
|
||||||
|
createState,
|
||||||
|
Setter,
|
||||||
|
} from "ags";
|
||||||
|
import { Gdk, Gtk } from "ags/gtk3";
|
||||||
|
|
||||||
const hyprland = Hyprland.get_default();
|
const hyprland = Hyprland.get_default();
|
||||||
const BLOCK_SIZE = 10;
|
const BLOCK_SIZE = 10;
|
||||||
|
|
||||||
const Workspace = ({ id }: { id: number }) => {
|
const Workspace = ({ id }: { id: number }) => {
|
||||||
let clients: Variable<string[]>;
|
let clients: Accessor<string[]>;
|
||||||
|
let setClients: Setter<string[]>;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const workspace = hyprland.get_workspace(id);
|
const workspace = hyprland.get_workspace(id);
|
||||||
clients = Variable(workspace.clients.map((client) => client.address));
|
[clients, setClients] = createState(
|
||||||
|
workspace.clients.map((client) => client.address),
|
||||||
|
);
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
clients = Variable([]);
|
[clients, setClients] = createState<string[]>([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const active = Variable.derive(
|
const active = createComputed(
|
||||||
[bind(hyprland, "focusedWorkspace")],
|
[createBinding(hyprland, "focusedWorkspace")],
|
||||||
(focused) => focused.id == id,
|
(focused) => focused.id == id,
|
||||||
);
|
);
|
||||||
|
|
||||||
hyprland.connect("workspace-added", (_, workspace) => {
|
hyprland.connect("workspace-added", (_, workspace) => {
|
||||||
if (workspace.id != id) return;
|
if (workspace.id != id) return;
|
||||||
clients.set(workspace.clients.map((client) => client.address));
|
setClients(workspace.clients.map((client) => client.address));
|
||||||
});
|
});
|
||||||
|
|
||||||
hyprland.connect("workspace-removed", (_, workspaceId) => {
|
hyprland.connect("workspace-removed", (_, workspaceId) => {
|
||||||
if (workspaceId != id) return;
|
if (workspaceId != id) return;
|
||||||
clients.set([]);
|
setClients([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
hyprland.connect("client-added", (_hyprland, client) => {
|
hyprland.connect("client-added", (_hyprland, client) => {
|
||||||
if (client.workspace.id != id) return;
|
if (client.workspace.id != id) return;
|
||||||
clients.set([...clients.get(), client.address]);
|
setClients([...clients.get(), client.address]);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Explicit separate event handling instead of Variable.derive(workspaces, clients)
|
|
||||||
// because client-moved events appear to be broken if done that way.
|
|
||||||
hyprland.connect("client-moved", (_hyprland, client, workspace) => {
|
hyprland.connect("client-moved", (_hyprland, client, workspace) => {
|
||||||
if (workspace.id == id) {
|
if (workspace.id == id) {
|
||||||
clients.set([...clients.get(), client.address]);
|
setClients([...clients.get(), client.address]);
|
||||||
} else {
|
} else {
|
||||||
clients.set(
|
setClients(
|
||||||
clients.get().filter((oldClient) => oldClient != client.address),
|
clients.get().filter((oldClient) => oldClient != client.address),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
hyprland.connect("client-removed", (_hyprland, address) => {
|
hyprland.connect("client-removed", (_hyprland, address) => {
|
||||||
clients.set(clients.get().filter((oldClient) => oldClient != address));
|
setClients(clients.get().filter((oldClient) => oldClient != address));
|
||||||
});
|
});
|
||||||
|
|
||||||
const className = Variable.derive([active, clients], (active, clients) => {
|
const className = createComputed([active, clients], (active, clients) => {
|
||||||
if (active) return "button active";
|
if (active) return "button active";
|
||||||
if (clients.length > 0) return "button occupied";
|
if (clients.length > 0) return "button occupied";
|
||||||
return "button";
|
return "button";
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<box vertical>
|
<box orientation={Gtk.Orientation.VERTICAL}>
|
||||||
<box vexpand />
|
<box vexpand />
|
||||||
<eventbox onClickRelease={() => hyprland.dispatch("workspace", `${id}`)}>
|
<eventbox onClickRelease={() => hyprland.dispatch("workspace", `${id}`)}>
|
||||||
<label className={className()} />
|
<label class={className} />
|
||||||
</eventbox>
|
</eventbox>
|
||||||
<box vexpand />
|
<box vexpand />
|
||||||
</box>
|
</box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ({ monitor }: { monitor: Hyprland.Monitor }) => {
|
export default ({ gdkmonitor }: { gdkmonitor: Gdk.Monitor }) => {
|
||||||
|
const monitor = getHyprlandMonitor(gdkmonitor)!;
|
||||||
const workspaces = hyprland.get_workspaces();
|
const workspaces = hyprland.get_workspaces();
|
||||||
const displayWorkspaces = workspaces.filter(
|
const displayWorkspaces = workspaces.filter(
|
||||||
(w) => w.monitor.id === monitor.id,
|
(w) => w.monitor.id === monitor.id,
|
||||||
@@ -78,7 +87,7 @@ export default ({ monitor }: { monitor: Hyprland.Monitor }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<eventbox
|
<eventbox
|
||||||
className="workspaces"
|
class="workspaces"
|
||||||
onScroll={(_, e) => {
|
onScroll={(_, e) => {
|
||||||
hyprland.dispatch("workspace", e.delta_y > 0 ? "m+1" : "m-1");
|
hyprland.dispatch("workspace", e.delta_y > 0 ? "m+1" : "m-1");
|
||||||
}}
|
}}
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
users.users.${user}.extraGroups = [
|
|
||||||
"video"
|
|
||||||
"inputs"
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.${user}.wayland.windowManager.hyprland.settings.bindle =
|
|
||||||
let
|
|
||||||
brightnessctl = lib.meta.getExe pkgs.brightnessctl;
|
|
||||||
in
|
|
||||||
[
|
|
||||||
", XF86MonBrightnessUp, exec, ${brightnessctl} -q s 5%+"
|
|
||||||
", XF86MonBrightnessDown, exec, ${brightnessctl} -q s 5%-"
|
|
||||||
];
|
|
||||||
}
|
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,27 +1,6 @@
|
|||||||
|
{ user, home }:
|
||||||
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
system,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
selfPkgs = inputs.self.packages.${system};
|
|
||||||
hmConfig = config.home-manager.users.${user};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
darktable = prev.darktable.overrideAttrs (oldAttrs: {
|
|
||||||
patches = oldAttrs.patches or [ ] ++ [ ./better-copy-and-import.patch ];
|
|
||||||
});
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.persistence = {
|
environment.persistence = {
|
||||||
"/persist/state" = {
|
"/persist/state" = {
|
||||||
"${home}/.config/darktable/data.db" = { };
|
"${home}/.config/darktable/data.db" = { };
|
||||||
@@ -31,22 +10,11 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
home = {
|
home.packages = with pkgs; [
|
||||||
packages =
|
|
||||||
with pkgs;
|
|
||||||
with selfPkgs;
|
|
||||||
[
|
|
||||||
darktable
|
darktable
|
||||||
exiftool
|
exiftool
|
||||||
darktable-ghost-cms-publish
|
|
||||||
];
|
];
|
||||||
|
|
||||||
sessionVariables = {
|
|
||||||
GHOST_URL = "https://photos.karaolidis.com";
|
|
||||||
GHOST_ADMIN_API_KEY_PATH = hmConfig.sops.secrets."jupiter/photos.karaolidis.com/admin".path;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"darktable/darktablerc".source = (pkgs.formats.keyValue { }).generate "darktablerc" {
|
"darktable/darktablerc".source = (pkgs.formats.keyValue { }).generate "darktablerc" {
|
||||||
"compress_xmp_tags" = "never";
|
"compress_xmp_tags" = "never";
|
||||||
@@ -72,19 +40,13 @@ in
|
|||||||
|
|
||||||
"darktable/luarc".text = ''
|
"darktable/luarc".text = ''
|
||||||
require "tools/script_manager"
|
require "tools/script_manager"
|
||||||
require "tools/publish"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
"darktable/lua/lib".source = "${selfPkgs.darktable-lua-scripts}/lib";
|
"darktable/lua/lib".source = "${pkgs.darktable-lua-scripts}/lib";
|
||||||
"darktable/lua/tools/script_manager.lua".source =
|
"darktable/lua/tools/script_manager.lua".source =
|
||||||
"${selfPkgs.darktable-lua-scripts}/tools/script_manager.lua";
|
"${pkgs.darktable-lua-scripts}/tools/script_manager.lua";
|
||||||
"darktable/lua/tools/publish.lua".source =
|
|
||||||
"${selfPkgs.darktable-ghost-cms-publish}/lib/darktable-ghost-cms-publish/publish.lua";
|
|
||||||
|
|
||||||
"darktable/luts".source = selfPkgs.darktable-hald-clut;
|
"darktable/luts".source = pkgs.darktable-hald-clut;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."jupiter/photos.karaolidis.com/admin".sopsFile =
|
|
||||||
../../../../../../secrets/personal/secrets.yaml;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.persistence."/persist/state"."${home}/.config/vesktop" = { };
|
environment.persistence."/persist/state"."${home}/.config/vesktop" = { };
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -63,6 +60,7 @@ in
|
|||||||
"browser.bookmarks.restore_default_bookmarks" = false;
|
"browser.bookmarks.restore_default_bookmarks" = false;
|
||||||
"browser.bookmarks.showMobileBookmarks" = true;
|
"browser.bookmarks.showMobileBookmarks" = true;
|
||||||
"browser.download.useDownloadDir" = false;
|
"browser.download.useDownloadDir" = false;
|
||||||
|
"browser.newtabpage.activity-stream.feeds.system.topstories" = false;
|
||||||
"browser.toolbars.bookmarks.visibility" = "never";
|
"browser.toolbars.bookmarks.visibility" = "never";
|
||||||
"browser.sessionstore.restore_on_demand" = true;
|
"browser.sessionstore.restore_on_demand" = true;
|
||||||
"browser.sessionstore.restore_pinned_tabs_on_demand" = false;
|
"browser.sessionstore.restore_pinned_tabs_on_demand" = false;
|
||||||
@@ -74,10 +72,10 @@ in
|
|||||||
"unified-extensions-area" = [
|
"unified-extensions-area" = [
|
||||||
"_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action"
|
"_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action"
|
||||||
"sponsorblocker_ajay_app-browser-action"
|
"sponsorblocker_ajay_app-browser-action"
|
||||||
"_44df5123-f715-9146-bfaa-c6e8d4461d44_-browser-action"
|
|
||||||
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
|
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
|
||||||
"_aecec67f-0d10-4fa7-b7c7-609a2db280cf_-browser-action"
|
"_aecec67f-0d10-4fa7-b7c7-609a2db280cf_-browser-action"
|
||||||
"languagetool-webextension_languagetool_org-browser-action"
|
"languagetool-webextension_languagetool_org-browser-action"
|
||||||
|
"_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action"
|
||||||
];
|
];
|
||||||
"nav-bar" = [
|
"nav-bar" = [
|
||||||
"sidebar-button"
|
"sidebar-button"
|
||||||
@@ -104,7 +102,6 @@ in
|
|||||||
};
|
};
|
||||||
"seen" = [
|
"seen" = [
|
||||||
"wayback_machine_mozilla_org-browser-action"
|
"wayback_machine_mozilla_org-browser-action"
|
||||||
"_44df5123-f715-9146-bfaa-c6e8d4461d44_-browser-action"
|
|
||||||
"addon_darkreader_org-browser-action"
|
"addon_darkreader_org-browser-action"
|
||||||
"ublock0_raymondhill_net-browser-action"
|
"ublock0_raymondhill_net-browser-action"
|
||||||
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
|
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
|
||||||
@@ -113,6 +110,8 @@ in
|
|||||||
"sponsorblocker_ajay_app-browser-action"
|
"sponsorblocker_ajay_app-browser-action"
|
||||||
"_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action"
|
"_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action"
|
||||||
"developer-button"
|
"developer-button"
|
||||||
|
"_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action"
|
||||||
|
"screenshot-button"
|
||||||
];
|
];
|
||||||
"dirtyAreaCache" = [
|
"dirtyAreaCache" = [
|
||||||
"unified-extensions-area"
|
"unified-extensions-area"
|
||||||
@@ -143,7 +142,7 @@ in
|
|||||||
ublock-origin
|
ublock-origin
|
||||||
violentmonkey
|
violentmonkey
|
||||||
wayback-machine
|
wayback-machine
|
||||||
fakespot-fake-reviews-amazon
|
user-agent-string-switcher
|
||||||
];
|
];
|
||||||
|
|
||||||
search = {
|
search = {
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
{ user, home }:
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.gamemode.enable = true;
|
||||||
|
}
|
11
hosts/common/configs/user/gui/gaming/gamescope/default.nix
Normal file
11
hosts/common/configs/user/gui/gaming/gamescope/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ user, home }:
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.gamescope = {
|
||||||
|
enable = true;
|
||||||
|
args = [
|
||||||
|
"--rt"
|
||||||
|
"-f"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
30
hosts/common/configs/user/gui/gaming/performance/default.nix
Normal file
30
hosts/common/configs/user/gui/gaming/performance/default.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{ user, home }:
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
# https://bonkmaykr.xyz/content/discovery_lin.htm
|
||||||
|
{
|
||||||
|
boot.kernel.sysctl."vm.max_map_count" = 1048576;
|
||||||
|
|
||||||
|
security.pam.loginLimits = [
|
||||||
|
{
|
||||||
|
domain = user;
|
||||||
|
item = "nofile";
|
||||||
|
type = "soft";
|
||||||
|
value = 200000;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
domain = user;
|
||||||
|
item = "nofile";
|
||||||
|
type = "hard";
|
||||||
|
value = 200000;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.${user}.wayland.windowManager.hyprland.settings.env = [
|
||||||
|
"__GL_SHADER_DISK_CACHE_SKIP_CLEANUP,1"
|
||||||
|
];
|
||||||
|
}
|
@@ -0,0 +1,14 @@
|
|||||||
|
{ user, home }:
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
hmConfig = config.home-manager.users.${user};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
environment.persistence."/persist/state"."${home}/.local/share/PrismLauncher" = { };
|
||||||
|
|
||||||
|
home-manager.users.${user}.home = {
|
||||||
|
packages = with pkgs; [ prismlauncher ];
|
||||||
|
file."Games/PrismLauncher".source =
|
||||||
|
hmConfig.lib.file.mkOutOfStoreSymlink "${home}/.local/share/PrismLauncher";
|
||||||
|
};
|
||||||
|
}
|
17
hosts/common/configs/user/gui/gaming/proton/default.nix
Normal file
17
hosts/common/configs/user/gui/gaming/proton/default.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ user, home }:
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.persistence."/persist/state"."${home}/.local/share/proton" = { };
|
||||||
|
|
||||||
|
home-manager.users.${user}.home.packages = [
|
||||||
|
(pkgs.writeShellApplication {
|
||||||
|
name = "proton-launch";
|
||||||
|
runtimeInputs = with pkgs; [ coreutils ];
|
||||||
|
runtimeEnv = {
|
||||||
|
PROTON = lib.makeSearchPathOutput "steamcompattool" "" [ pkgs.proton-ge-bin ];
|
||||||
|
STEAM_RUN = lib.meta.getExe pkgs.steam-run;
|
||||||
|
};
|
||||||
|
text = builtins.readFile ./proton-launch.sh;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
17
hosts/common/configs/user/gui/gaming/proton/proton-launch.sh
Normal file
17
hosts/common/configs/user/gui/gaming/proton/proton-launch.sh
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
if [ "$#" -lt 1 ]; then
|
||||||
|
echo "Usage: $0 <executable-path> [args...]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
PROTON_DATA="$HOME/.local/share/proton"
|
||||||
|
|
||||||
|
exec="$(realpath "$1")"
|
||||||
|
name="$(basename "$exec")"
|
||||||
|
mkdir -p "$PROTON_DATA/$name"
|
||||||
|
|
||||||
|
export STEAM_COMPAT_DATA_PATH="$PROTON_DATA/$name"
|
||||||
|
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$PROTON"
|
||||||
|
|
||||||
|
"$STEAM_RUN" "$PROTON/proton" run "$exec" "${@:2}" >/dev/null 2>&1 & disown
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -14,8 +11,7 @@
|
|||||||
"${home}/.local/share/Steam" = { };
|
"${home}/.local/share/Steam" = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs.steam = {
|
||||||
steam = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
localNetworkGameTransfers.openFirewall = true;
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
extest.enable = true;
|
extest.enable = true;
|
||||||
@@ -23,17 +19,6 @@
|
|||||||
extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
||||||
};
|
};
|
||||||
|
|
||||||
gamescope = {
|
|
||||||
enable = true;
|
|
||||||
args = [
|
|
||||||
"--rt"
|
|
||||||
"-f"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
gamemode.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${user}.systemd.user = {
|
home-manager.users.${user}.systemd.user = {
|
||||||
services.steam-ln =
|
services.steam-ln =
|
||||||
let
|
let
|
@@ -26,7 +26,7 @@ is_excluded() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for game in "$STEAM"/*/; do
|
for game in "$STEAM"/*/; do
|
||||||
name=$(basename "$game")
|
name="$(basename "$game")"
|
||||||
|
|
||||||
if is_excluded "$name"; then
|
if is_excluded "$name"; then
|
||||||
echo "Excluding $name from symlink creation."
|
echo "Excluding $name from symlink creation."
|
||||||
@@ -47,13 +47,13 @@ for game in "$STEAM"/*/; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
for link in "$GAMES"/*; do
|
for link in "$GAMES"/*; do
|
||||||
target=$(readlink "$link")
|
target="$(readlink -f "$link" || echo "")"
|
||||||
|
|
||||||
if [[ ! "$target" == "$STEAM/"* ]]; then
|
if [[ ! "$target" == "$STEAM/"* ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
name=$(basename "$target")
|
name="$(basename "$target")"
|
||||||
|
|
||||||
if [[ -e "$target" ]] && ! is_excluded "$name"; then
|
if [[ -e "$target" ]] && ! is_excluded "$name"; then
|
||||||
continue
|
continue
|
33
hosts/common/configs/user/gui/gaming/wivrn/default.nix
Normal file
33
hosts/common/configs/user/gui/gaming/wivrn/default.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{ user, home }:
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [ 9757 ];
|
||||||
|
allowedUDPPorts = [ 9757 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
udev.packages = with pkgs; [ android-udev-rules ];
|
||||||
|
|
||||||
|
avahi = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
publish = {
|
||||||
|
enable = true;
|
||||||
|
userServices = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
pathsToLink = [ "/share/openxr" ];
|
||||||
|
etc."xdg/openxr/1/active_runtime.json".source = "${pkgs.wivrn}/share/openxr/1/openxr_wivrn.json";
|
||||||
|
|
||||||
|
persistence = {
|
||||||
|
"/persist/cache"."${home}/.cache/wivrn" = { };
|
||||||
|
"/persist/state"."${home}/.config/wivrn" = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.${user}.home.packages = with pkgs; [ wivrn ];
|
||||||
|
}
|
@@ -1,7 +1,4 @@
|
|||||||
{
|
{ user, home }:
|
||||||
user ? throw "user argument is required",
|
|
||||||
home ? throw "home argument is required",
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -40,8 +37,7 @@ in
|
|||||||
home = {
|
home = {
|
||||||
pointerCursor.gtk.enable = true;
|
pointerCursor.gtk.enable = true;
|
||||||
|
|
||||||
file =
|
file = {
|
||||||
{
|
|
||||||
".icons/default/index.theme".enable = false;
|
".icons/default/index.theme".enable = false;
|
||||||
}
|
}
|
||||||
// builtins.listToAttrs (
|
// builtins.listToAttrs (
|
||||||
|
21
hosts/common/configs/user/gui/hypridle/default.nix
Normal file
21
hosts/common/configs/user/gui/hypridle/default.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{ user, home }:
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
home-manager.users.${user}.services.hypridle = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 60;
|
||||||
|
on-timeout = "brightnessctl -s set 10%";
|
||||||
|
on-resume = "brightnessctl -r";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 300;
|
||||||
|
on-timeout = "hyprctl dispatch dpms off";
|
||||||
|
on-resume = "hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@@ -1,78 +0,0 @@
|
|||||||
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
|
|
||||||
index c6593923..b4d3aaea 100644
|
|
||||||
--- a/src/Compositor.cpp
|
|
||||||
+++ b/src/Compositor.cpp
|
|
||||||
@@ -2890,6 +2890,30 @@ void CCompositor::arrangeMonitors() {
|
|
||||||
case eAutoDirs::DIR_AUTO_LEFT: newPosition.x = maxXOffsetLeft - m->m_size.x; break;
|
|
||||||
case eAutoDirs::DIR_AUTO_RIGHT:
|
|
||||||
case eAutoDirs::DIR_AUTO_NONE: newPosition.x = maxXOffsetRight; break;
|
|
||||||
+ case eAutoDirs::DIR_AUTO_CENTER_UP: {
|
|
||||||
+ int width = maxXOffsetRight - maxXOffsetLeft;
|
|
||||||
+ newPosition.y = maxYOffsetUp - m->m_size.y;
|
|
||||||
+ newPosition.x = maxXOffsetLeft + (width - m->m_size.x) / 2;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ case eAutoDirs::DIR_AUTO_CENTER_DOWN: {
|
|
||||||
+ int width = maxXOffsetRight - maxXOffsetLeft;
|
|
||||||
+ newPosition.y = maxYOffsetDown;
|
|
||||||
+ newPosition.x = maxXOffsetLeft + (width - m->m_size.x) / 2;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ case eAutoDirs::DIR_AUTO_CENTER_LEFT: {
|
|
||||||
+ int height = maxYOffsetDown - maxYOffsetUp;
|
|
||||||
+ newPosition.x = maxXOffsetLeft - m->m_size.x;
|
|
||||||
+ newPosition.y = maxYOffsetUp + (height - m->m_size.y) / 2;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ case eAutoDirs::DIR_AUTO_CENTER_RIGHT: {
|
|
||||||
+ int height = maxYOffsetDown - maxYOffsetUp;
|
|
||||||
+ newPosition.x = maxXOffsetRight;
|
|
||||||
+ newPosition.y = maxYOffsetUp + (height - m->m_size.y) / 2;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
default: UNREACHABLE();
|
|
||||||
}
|
|
||||||
Debug::log(LOG, "arrangeMonitors: {} auto {:j}", m->m_name, m->m_position);
|
|
||||||
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
|
|
||||||
index f5f0bed3..3c988a53 100644
|
|
||||||
--- a/src/config/ConfigManager.cpp
|
|
||||||
+++ b/src/config/ConfigManager.cpp
|
|
||||||
@@ -2046,10 +2046,20 @@ std::optional<std::string> CConfigManager::handleMonitor(const std::string& comm
|
|
||||||
newrule.autoDir = eAutoDirs::DIR_AUTO_UP;
|
|
||||||
else if (ARGS[2] == "auto-down")
|
|
||||||
newrule.autoDir = eAutoDirs::DIR_AUTO_DOWN;
|
|
||||||
+ else if (ARGS[2] == "auto-center-right")
|
|
||||||
+ newrule.autoDir = eAutoDirs::DIR_AUTO_CENTER_RIGHT;
|
|
||||||
+ else if (ARGS[2] == "auto-center-left")
|
|
||||||
+ newrule.autoDir = eAutoDirs::DIR_AUTO_CENTER_LEFT;
|
|
||||||
+ else if (ARGS[2] == "auto-center-up")
|
|
||||||
+ newrule.autoDir = eAutoDirs::DIR_AUTO_CENTER_UP;
|
|
||||||
+ else if (ARGS[2] == "auto-center-down")
|
|
||||||
+ newrule.autoDir = eAutoDirs::DIR_AUTO_CENTER_DOWN;
|
|
||||||
else {
|
|
||||||
Debug::log(WARN,
|
|
||||||
"Invalid auto direction. Valid options are 'auto',"
|
|
||||||
- "'auto-up', 'auto-down', 'auto-left', and 'auto-right'.");
|
|
||||||
+ "'auto-up', 'auto-down', 'auto-left', 'auto-right',"
|
|
||||||
+ "'auto-center-up', 'auto-center-down',"
|
|
||||||
+ "'auto-center-left', and 'auto-center-right'.");
|
|
||||||
error += "invalid auto direction ";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp
|
|
||||||
index 31777b0c..019a5547 100644
|
|
||||||
--- a/src/helpers/Monitor.hpp
|
|
||||||
+++ b/src/helpers/Monitor.hpp
|
|
||||||
@@ -25,7 +25,11 @@ enum eAutoDirs : uint8_t {
|
|
||||||
DIR_AUTO_UP,
|
|
||||||
DIR_AUTO_DOWN,
|
|
||||||
DIR_AUTO_LEFT,
|
|
||||||
- DIR_AUTO_RIGHT
|
|
||||||
+ DIR_AUTO_RIGHT,
|
|
||||||
+ DIR_AUTO_CENTER_UP,
|
|
||||||
+ DIR_AUTO_CENTER_DOWN,
|
|
||||||
+ DIR_AUTO_CENTER_LEFT,
|
|
||||||
+ DIR_AUTO_CENTER_RIGHT
|
|
||||||
};
|
|
||||||
|
|
||||||
enum eCMType : uint8_t {
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user