Compare commits
1 Commits
a11dd05dba
...
wireguard
Author | SHA1 | Date | |
---|---|---|---|
84a5ff6fd4 |
11
.gitmodules
vendored
11
.gitmodules
vendored
@@ -1,3 +1,8 @@
|
|||||||
[submodule "secrets"]
|
[submodule "submodules/nixpkgs"]
|
||||||
path = secrets
|
path = submodules/nixpkgs
|
||||||
url = https://git.karaolidis.com/karaolidis/nix-secrets.git
|
url = git@github.com:karaolidis/nixpkgs.git
|
||||||
|
branch = integration
|
||||||
|
[submodule "submodules/home-manager"]
|
||||||
|
path = submodules/home-manager
|
||||||
|
url = git@github.com:karaolidis/home-manager.git
|
||||||
|
branch = integration
|
||||||
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"sops.defaults.ageKeyFile": "./secrets/personal/key.txt"
|
||||||
|
}
|
@@ -19,13 +19,17 @@ NixOS dotfiles and configuration for various hosts and users.
|
|||||||
|
|
||||||
- [`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.
|
- [`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 packages.
|
- [`update.sh`](./lib/scripts/update.sh): Update flake and all git submodules.
|
||||||
|
|
||||||
|
- [`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.
|
||||||
|
|
||||||
|
173
flake.lock
generated
173
flake.lock
generated
@@ -5,21 +5,21 @@
|
|||||||
"astal": [
|
"astal": [
|
||||||
"astal"
|
"astal"
|
||||||
],
|
],
|
||||||
"gnim": "gnim",
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752328525,
|
"lastModified": 1744557573,
|
||||||
"narHash": "sha256-0aaVFLQxY1dKIS5jzwhbO847yIdr3U0o2heUzC5iat4=",
|
"narHash": "sha256-XAyj0iDuI51BytJ1PwN53uLpzTDdznPDQFG4RwihlTQ=",
|
||||||
"owner": "aylur",
|
"owner": "aylur",
|
||||||
"repo": "ags",
|
"repo": "ags",
|
||||||
"rev": "2eb3ea54311b0f7ba9d333d661d12cda1ed5507e",
|
"rev": "3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "aylur",
|
"owner": "aylur",
|
||||||
|
"ref": "main",
|
||||||
"repo": "ags",
|
"repo": "ags",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -31,15 +31,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752404970,
|
"lastModified": 1749559749,
|
||||||
"narHash": "sha256-XULTToDUkIshNXEO+YP2mAHdQv8bxWDvKjbamBfOC8E=",
|
"narHash": "sha256-TM95tg1G7S6rVBBoMwurXMz8Il4xlnuZ2TI4h6lfZzg=",
|
||||||
"owner": "aylur",
|
"owner": "aylur",
|
||||||
"repo": "astal",
|
"repo": "astal",
|
||||||
"rev": "2c5eb54f39e1710c6e2c80915a240978beb3269a",
|
"rev": "dd8a4662f2f17fb4326a7bd0fb2d054f5d477ba3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "aylur",
|
"owner": "aylur",
|
||||||
|
"ref": "main",
|
||||||
"repo": "astal",
|
"repo": "astal",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -51,43 +52,20 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746728054,
|
"lastModified": 1749436314,
|
||||||
"narHash": "sha256-eDoSOhxGEm2PykZFa/x9QG5eTH0MJdiJ9aR00VAofXE=",
|
"narHash": "sha256-CqmqU5FRg5AadtIkxwu8ulDSOSoIisUMZRLlcED3Q5w=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "ff442f5d1425feb86344c028298548024f21256d",
|
"rev": "dfa4d1b9c39c0342ef133795127a3af14598017a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "latest",
|
"ref": "master",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"type": "github"
|
"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": [
|
||||||
@@ -125,26 +103,11 @@
|
|||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
|
"ref": "main",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gnim": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1751928958,
|
|
||||||
"narHash": "sha256-vQY2L+Hnp6F1MHFa3UbMft1goGw3iODI5M+96Z7P+9Q=",
|
|
||||||
"owner": "aylur",
|
|
||||||
"repo": "gnim",
|
|
||||||
"rev": "9bffa83f52f711b13e3c139454623a9aea4f5552",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "aylur",
|
|
||||||
"repo": "gnim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -152,31 +115,32 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753675338,
|
"lastModified": 1749678254,
|
||||||
"narHash": "sha256-KDS9sr7dddH97lUXa7oxfRqphBlCA6JxZO4m/Z4W06I=",
|
"narHash": "sha256-6I+qez0MnHu9M2spLj3LsGA/cUGgfx17/hMPvmrUMoU=",
|
||||||
"owner": "nix-community",
|
"owner": "karaolidis",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e4b032ba5113664f0b8b23d956e59ce8e0bc349d",
|
"rev": "e248f54290b483a47c7550f69faecb8ed97e4831",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "karaolidis",
|
||||||
|
"ref": "integration",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753549186,
|
"lastModified": 1749678247,
|
||||||
"narHash": "sha256-Znl7rzuxKg/Mdm6AhimcKynM7V3YeNDIcLjBuoBcmNs=",
|
"narHash": "sha256-K83Q3c/o5CdMB3Npk3P1kCIz6FcUuJV8E4k6z1YN8AQ=",
|
||||||
"owner": "NixOS",
|
"owner": "karaolidis",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "17f6bd177404d6d43017595c5264756764444ab8",
|
"rev": "4d408c92fe165ab68f012a3fa36d4c58d84e83bd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "karaolidis",
|
||||||
"ref": "nixos-unstable",
|
"ref": "integration",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -184,58 +148,40 @@
|
|||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1753691404,
|
|
||||||
"narHash": "sha256-1sZg24xTL6k3ktFrOWOf0/bhYIYzND+cfsxb5VDRahU=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "NUR",
|
|
||||||
"rev": "e3fe68989cba00e16de704432a7a760fb1f7e573",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "NUR",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nvidia-patch": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"utils": [
|
"treefmt-nix": [
|
||||||
"flake-utils"
|
"treefmt-nix"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753078133,
|
"lastModified": 1749675110,
|
||||||
"narHash": "sha256-z+cvobe/+6pSVmwVrI+/k4lt7CjsQtfhlMaAlLQcSPY=",
|
"narHash": "sha256-NkDE/JyeQJmLtpXjyFZK2wKs5K7isap7MBIzoYMC9nk=",
|
||||||
"owner": "icewind1991",
|
"owner": "nix-community",
|
||||||
"repo": "nvidia-patch-nixos",
|
"repo": "NUR",
|
||||||
"rev": "b5bb7576a5a951cea1a46703f488ac76fa827876",
|
"rev": "0e8328c18d801a253ed5dfd17bd78254d9669d06",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "icewind1991",
|
"owner": "nix-community",
|
||||||
"repo": "nvidia-patch-nixos",
|
"ref": "main",
|
||||||
|
"repo": "NUR",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"quadlet-nix": {
|
"quadlet-nix": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753321053,
|
"lastModified": 1749099346,
|
||||||
"narHash": "sha256-7d9eSy3qhzVut64dKzDriKo44LfXRCS5ykk4BAbNfVU=",
|
"narHash": "sha256-5gi/YaLVsFztGvVH45eB6jsBmZf+HnvDeSA9RXUqbcY=",
|
||||||
"owner": "SEIAROTg",
|
"owner": "SEIAROTg",
|
||||||
"repo": "quadlet-nix",
|
"repo": "quadlet-nix",
|
||||||
"rev": "172f2a786615dccc153550832f0bf2f373d5d261",
|
"rev": "d4119a3423f938427252ba8bbdbe8ce040751864",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "SEIAROTg",
|
"owner": "SEIAROTg",
|
||||||
|
"ref": "main",
|
||||||
"repo": "quadlet-nix",
|
"repo": "quadlet-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -245,36 +191,17 @@
|
|||||||
"ags": "ags",
|
"ags": "ags",
|
||||||
"astal": "astal",
|
"astal": "astal",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"flake-input-patcher": "flake-input-patcher",
|
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"nvidia-patch": "nvidia-patch",
|
|
||||||
"quadlet-nix": "quadlet-nix",
|
"quadlet-nix": "quadlet-nix",
|
||||||
"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"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"secrets": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1753458351,
|
|
||||||
"narHash": "sha256-wsZQkEA3YYouRu7wjepetS6rnwLEr00wMpIQsxbZNTU=",
|
|
||||||
"ref": "refs/heads/main",
|
|
||||||
"rev": "6ce176beb34bfe0ac65131564c1fa3f5d0aca1fe",
|
|
||||||
"revCount": 26,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.karaolidis.com/karaolidis/nix-secrets.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.karaolidis.com/karaolidis/nix-secrets.git"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -282,15 +209,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752544651,
|
"lastModified": 1749592509,
|
||||||
"narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=",
|
"narHash": "sha256-VunQzfZFA+Y6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC+A=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "2c8def626f54708a9c38a5861866660395bb3461",
|
"rev": "50754dfaa0e24e313c626900d44ef431f3210138",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
|
"ref": "master",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -305,15 +233,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753591727,
|
"lastModified": 1749357231,
|
||||||
"narHash": "sha256-Ow+qyFckroPS4SQFHcFZ8mKh3HIQ2pQdC6DRjiYF9EE=",
|
"narHash": "sha256-AbrPgGFVYR45TlYLHYTppayG0xzOG9XXhi+1j3Klbw8=",
|
||||||
"owner": "Gerg-L",
|
"owner": "Gerg-L",
|
||||||
"repo": "spicetify-nix",
|
"repo": "spicetify-nix",
|
||||||
"rev": "26c488b60360e15db372483d826cec89ac532980",
|
"rev": "03783416f7416715c52166d4e8ba0492a7149397",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Gerg-L",
|
"owner": "Gerg-L",
|
||||||
|
"ref": "master",
|
||||||
"repo": "spicetify-nix",
|
"repo": "spicetify-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -329,6 +258,7 @@
|
|||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-systems",
|
"owner": "nix-systems",
|
||||||
|
"ref": "main",
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -340,15 +270,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753439394,
|
"lastModified": 1749194973,
|
||||||
"narHash": "sha256-Bv9h1AJegLI8uAhiJ1sZ4XAndYxhgf38tMgCQwiEpmc=",
|
"narHash": "sha256-eEy8cuS0mZ2j/r/FE0/LYBSBcIs/MKOIVakwHVuqTfk=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "2673921c03d6e75fdf4aa93e025772608d1482cf",
|
"rev": "a05be418a1af1198ca0f63facb13c985db4cb3c5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
|
"ref": "main",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
184
flake.nix
184
flake.nix
@@ -1,69 +1,113 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs = {
|
||||||
|
# --- 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 = {
|
||||||
url = "github:nix-community/home-manager";
|
# --- Official
|
||||||
|
# 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 = {
|
||||||
url = "github:nix-community/disko/latest";
|
type = "github";
|
||||||
|
owner = "nix-community";
|
||||||
|
repo = "disko";
|
||||||
|
ref = "master";
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
sops-nix = {
|
sops-nix = {
|
||||||
url = "github:Mic92/sops-nix";
|
type = "github";
|
||||||
|
owner = "Mic92";
|
||||||
|
repo = "sops-nix";
|
||||||
|
ref = "master";
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
secrets = {
|
systems = {
|
||||||
url = "git+https://git.karaolidis.com/karaolidis/nix-secrets.git";
|
type = "github";
|
||||||
flake = false;
|
owner = "nix-systems";
|
||||||
|
repo = "default";
|
||||||
|
ref = "main";
|
||||||
};
|
};
|
||||||
|
|
||||||
systems.url = "github:nix-systems/default";
|
|
||||||
|
|
||||||
nur = {
|
nur = {
|
||||||
url = "github:nix-community/NUR";
|
type = "github";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
owner = "nix-community";
|
||||||
|
repo = "NUR";
|
||||||
|
ref = "main";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
treefmt-nix.follows = "treefmt-nix";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flake-utils = {
|
flake-utils = {
|
||||||
url = "github:numtide/flake-utils";
|
type = "github";
|
||||||
|
owner = "numtide";
|
||||||
|
repo = "flake-utils";
|
||||||
|
ref = "main";
|
||||||
|
|
||||||
inputs.systems.follows = "systems";
|
inputs.systems.follows = "systems";
|
||||||
};
|
};
|
||||||
|
|
||||||
treefmt-nix = {
|
treefmt-nix = {
|
||||||
url = "github:numtide/treefmt-nix";
|
type = "github";
|
||||||
|
owner = "numtide";
|
||||||
|
repo = "treefmt-nix";
|
||||||
|
ref = "main";
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
flake-input-patcher = {
|
quadlet-nix = {
|
||||||
url = "github:jfly/flake-input-patcher";
|
type = "github";
|
||||||
inputs = {
|
owner = "SEIAROTg";
|
||||||
nixpkgs.follows = "nixpkgs";
|
repo = "quadlet-nix";
|
||||||
systems.follows = "systems";
|
ref = "main";
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
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 = {
|
||||||
url = "github:aylur/astal";
|
type = "github";
|
||||||
|
owner = "aylur";
|
||||||
|
repo = "astal";
|
||||||
|
ref = "main";
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
ags = {
|
ags = {
|
||||||
url = "github:aylur/ags";
|
type = "github";
|
||||||
|
owner = "aylur";
|
||||||
|
repo = "ags";
|
||||||
|
ref = "main";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
astal.follows = "astal";
|
astal.follows = "astal";
|
||||||
@@ -71,7 +115,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
spicetify-nix = {
|
spicetify-nix = {
|
||||||
url = "github:Gerg-L/spicetify-nix";
|
type = "github";
|
||||||
|
owner = "Gerg-L";
|
||||||
|
repo = "spicetify-nix";
|
||||||
|
ref = "master";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
systems.follows = "systems";
|
systems.follows = "systems";
|
||||||
@@ -80,28 +128,44 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs:
|
{ self, nixpkgs, ... }@inputs:
|
||||||
let
|
{
|
||||||
mkInputs =
|
nixosConfigurations = {
|
||||||
system:
|
installer = nixpkgs.lib.nixosSystem rec {
|
||||||
let
|
system = "x86_64-linux";
|
||||||
patcher = inputs.flake-input-patcher.lib.${system};
|
modules = [ ./hosts/installer ];
|
||||||
in
|
|
||||||
patcher.patch inputs (import ./patches.nix { inherit patcher; });
|
|
||||||
|
|
||||||
mkNixosConfiguration =
|
|
||||||
inputs: system: modules:
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system modules;
|
|
||||||
specialArgs = { inherit inputs system; };
|
specialArgs = { inherit inputs system; };
|
||||||
};
|
};
|
||||||
in
|
|
||||||
(
|
|
||||||
let
|
|
||||||
system = "x86_64-linux";
|
|
||||||
inputs = mkInputs system;
|
|
||||||
|
|
||||||
pkgs = import inputs.nixpkgs {
|
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:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
@@ -109,20 +173,12 @@
|
|||||||
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
devShells = import ./hosts/common/shells { inherit pkgs; };
|
||||||
installer = mkNixosConfiguration inputs system [ ./hosts/installer ];
|
lib = import ./lib { inherit pkgs; };
|
||||||
himalia = mkNixosConfiguration inputs system [ ./hosts/himalia ];
|
packages = import ./packages { inherit pkgs inputs system; };
|
||||||
elara = mkNixosConfiguration inputs system [ ./hosts/elara ];
|
|
||||||
jupiter = mkNixosConfiguration inputs system [ ./hosts/jupiter ];
|
|
||||||
jupiter-vps = mkNixosConfiguration inputs system [ ./hosts/jupiter-vps ];
|
|
||||||
};
|
|
||||||
|
|
||||||
devShells.${system} = import ./hosts/common/shells { inherit pkgs; };
|
formatter = treefmt.config.build.wrapper;
|
||||||
lib.${system} = import ./lib { inherit pkgs; };
|
checks.formatting = treefmt.config.build.check self;
|
||||||
packages.${system} = import ./packages { inherit pkgs inputs system; };
|
|
||||||
|
|
||||||
formatter.${system} = treefmt.config.build.wrapper;
|
|
||||||
checks.formatting.${system} = treefmt.config.build.check inputs.self;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -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 (
|
||||||
|
@@ -51,7 +51,7 @@ 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/secrets/hosts/$host/secrets.yaml" > /tmp/keyfile
|
sops --decrypt --extract "['luks']" "$flake/hosts/$host/secrets/secrets.yaml" > /tmp/keyfile
|
||||||
unset SOPS_AGE_KEY_FILE
|
unset SOPS_AGE_KEY_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ prepare_disk() {
|
|||||||
|
|
||||||
copy_keys() {
|
copy_keys() {
|
||||||
mkdir -p "$root/persist/state/etc/ssh"
|
mkdir -p "$root/persist/state/etc/ssh"
|
||||||
cp -f "$flake/secrets/hosts/$host/ssh_host_ed25519_key" "$root/persist/state/etc/ssh/ssh_host_ed25519_key"
|
cp -f "$flake/hosts/$host/secrets/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
|
||||||
|
@@ -2,8 +2,10 @@
|
|||||||
{
|
{
|
||||||
sops = {
|
sops = {
|
||||||
secrets = {
|
secrets = {
|
||||||
"git/credentials/github.com/public/username".sopsFile = "${inputs.secrets}/personal/secrets.yaml";
|
"git/credentials/github.com/public/username".sopsFile =
|
||||||
"git/credentials/github.com/public/password".sopsFile = "${inputs.secrets}/personal/secrets.yaml";
|
../../../../../secrets/personal/secrets.yaml;
|
||||||
|
"git/credentials/github.com/public/password".sopsFile =
|
||||||
|
../../../../../secrets/personal/secrets.yaml;
|
||||||
};
|
};
|
||||||
|
|
||||||
templates.nix-access-tokens = {
|
templates.nix-access-tokens = {
|
||||||
|
@@ -2,20 +2,6 @@
|
|||||||
{
|
{
|
||||||
imports = [ inputs.quadlet-nix.nixosModules.quadlet ];
|
imports = [ inputs.quadlet-nix.nixosModules.quadlet ];
|
||||||
|
|
||||||
# FIXME: https://github.com/containers/crun/pull/1807
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
crun = prev.crun.overrideAttrs (oldAttrs: {
|
|
||||||
patches = oldAttrs.patches or [ ] ++ [
|
|
||||||
(builtins.fetchurl {
|
|
||||||
url = "https://patch-diff.githubusercontent.com/raw/containers/crun/pull/1807.patch";
|
|
||||||
sha256 = "sha256:13ax2scvd27s341wy0b9gpfyn47gjvg9fvbl8al3905dblqhdlr0";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
});
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
podman.enable = true;
|
podman.enable = true;
|
||||||
|
|
||||||
@@ -24,10 +10,7 @@
|
|||||||
storage.settings.storage.driver = "btrfs";
|
storage.settings.storage.driver = "btrfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
quadlet = {
|
quadlet.autoEscape = true;
|
||||||
enable = true;
|
|
||||||
autoEscape = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
@@ -4,9 +4,4 @@
|
|||||||
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 = "${inputs.secrets}/hosts/${config.networking.hostName}/secrets.yaml";
|
defaultSopsFile = ../../../../. + "/${config.networking.hostName}/secrets/secrets.yaml";
|
||||||
|
|
||||||
age = {
|
age = {
|
||||||
generateKey = true;
|
generateKey = true;
|
||||||
|
@@ -1,22 +1,22 @@
|
|||||||
{ inputs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
programs.ssh.knownHosts = {
|
programs.ssh.knownHosts = {
|
||||||
installer.publicKeyFile = "${inputs.secrets}/hosts/installer/ssh_host_ed25519_key.pub";
|
installer.publicKeyFile = ../../../../installer/secrets/ssh_host_ed25519_key.pub;
|
||||||
elara.publicKeyFile = "${inputs.secrets}/hosts/elara/ssh_host_ed25519_key.pub";
|
elara.publicKeyFile = ../../../../elara/secrets/ssh_host_ed25519_key.pub;
|
||||||
himalia.publicKeyFile = "${inputs.secrets}/hosts/himalia/ssh_host_ed25519_key.pub";
|
himalia.publicKeyFile = ../../../../himalia/secrets/ssh_host_ed25519_key.pub;
|
||||||
|
|
||||||
jupiter = {
|
jupiter = {
|
||||||
publicKeyFile = "${inputs.secrets}/hosts/jupiter/ssh_host_ed25519_key.pub";
|
publicKeyFile = ../../../../jupiter/secrets/ssh_host_ed25519_key.pub;
|
||||||
extraHostNames = [ "karaolidis.com" ];
|
extraHostNames = [ "karaolidis.com" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
jupiter-sish = {
|
jupiter-sish = {
|
||||||
publicKeyFile = "${inputs.secrets}/hosts/jupiter/ssh_sish_ed25519_key.pub";
|
publicKeyFile = ../../../../jupiter/users/storm/configs/console/podman/sish/ssh_host_ed25519_key.pub;
|
||||||
extraHostNames = [ "karaolidis.com" ];
|
extraHostNames = [ "karaolidis.com" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
jupiter-vps = {
|
jupiter-vps = {
|
||||||
publicKeyFile = "${inputs.secrets}/hosts/jupiter-vps/ssh_host_ed25519_key.pub";
|
publicKeyFile = ../../../../jupiter-vps/secrets/ssh_host_ed25519_key.pub;
|
||||||
extraHostNames = [ "vps.karaolidis.com" ];
|
extraHostNames = [ "vps.karaolidis.com" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -1,11 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [
|
enableAllTerminfo = true;
|
||||||
kitty.terminfo
|
|
||||||
tmux.terminfo
|
|
||||||
];
|
|
||||||
|
|
||||||
persistence."/persist/state"."/var/lib/fail2ban" = { };
|
persistence."/persist/state"."/var/lib/fail2ban" = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.persistence = {
|
environment.persistence = {
|
||||||
|
@@ -3,9 +3,6 @@ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -16,10 +19,7 @@
|
|||||||
settings.storage.storage.driver = "btrfs";
|
settings.storage.storage.driver = "btrfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.quadlet = {
|
virtualisation.quadlet.autoEscape = true;
|
||||||
enable = true;
|
|
||||||
autoEscape = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{ config, utils, ... }:
|
{ config, utils, ... }:
|
||||||
{
|
{
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -24,18 +27,19 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
opener = {
|
opener = {
|
||||||
edit = [
|
edit =
|
||||||
{
|
[
|
||||||
run = "${hmConfig.programs.neovim.finalPackage}/bin/nvim \"$@\"";
|
{
|
||||||
desc = "nvim";
|
run = "${hmConfig.programs.neovim.finalPackage}/bin/nvim \"$@\"";
|
||||||
block = true;
|
desc = "nvim";
|
||||||
}
|
block = true;
|
||||||
]
|
}
|
||||||
++ lib.lists.optional hmConfig.programs.vscode.enable {
|
]
|
||||||
run = "${hmConfig.programs.vscode.package}/bin/code \"$@\"";
|
++ lib.lists.optional hmConfig.programs.vscode.enable {
|
||||||
desc = "code";
|
run = "${hmConfig.programs.vscode.package}/bin/code \"$@\"";
|
||||||
orphan = true;
|
desc = "code";
|
||||||
};
|
orphan = true;
|
||||||
|
};
|
||||||
open = [
|
open = [
|
||||||
{
|
{
|
||||||
run = "uwsm app -- xdg-open \"$1\"";
|
run = "uwsm app -- xdg-open \"$1\"";
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment = {
|
environment = {
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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 "ags/gtk3/app";
|
import { App } from "astal/gtk3";
|
||||||
import { exec } from "ags/process";
|
import { monitorFile } from "astal/file";
|
||||||
import { monitorFile } from "ags/file";
|
import { exec } from "astal/process";
|
||||||
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 "ags/gtk3";
|
import { Gdk } from "astal/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 }, (_, i) => i + start);
|
return Array.from({ length }, (n, i) => i + start);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getHyprlandMonitor = (gdkmonitor: Gdk.Monitor) => {
|
export const getHyprlandMonitor = (gdkmonitor: Gdk.Monitor) => {
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"name": "astal-shell",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ags": "*"
|
"astal": "~/.local/share/ags"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/tsconfig",
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"jsx": "react-jsx",
|
"experimentalDecorators": true,
|
||||||
"jsxImportSource": "ags/gtk3",
|
"strict": true,
|
||||||
"lib": ["ES2023"],
|
"target": "ES2022",
|
||||||
"module": "ES2022",
|
"module": "ES2022",
|
||||||
"moduleResolution": "Bundler",
|
"moduleResolution": "Bundler",
|
||||||
"strict": true,
|
"jsx": "react-jsx",
|
||||||
"target": "ES2020"
|
"jsxImportSource": "astal/gtk3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,19 +1,17 @@
|
|||||||
import { Astal, Gtk, Gdk } from "ags/gtk3";
|
import { App, Astal, Gtk, Gdk } from "astal/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
|
||||||
visible
|
className="root"
|
||||||
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 class="widgets" hexpand halign={Gtk.Align.CENTER}>
|
<box className="widgets" hexpand halign={Gtk.Align.CENTER}>
|
||||||
<Date />
|
<Date />
|
||||||
</box>
|
</box>
|
||||||
</Hidden>
|
</Hidden>
|
||||||
|
@@ -1,22 +1,21 @@
|
|||||||
import { Astal, Gtk, Gdk } from "ags/gtk3";
|
import { App, Astal, Gtk, Gdk } from "astal/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
|
||||||
visible
|
className="root"
|
||||||
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 class="widgets" hexpand halign={Gtk.Align.START}>
|
<box className="widgets" hexpand halign={Gtk.Align.START}>
|
||||||
<Launcher />
|
<Launcher />
|
||||||
<Workspace gdkmonitor={monitor} />
|
<Workspace monitor={getHyprlandMonitor(monitor)!} />
|
||||||
</box>
|
</box>
|
||||||
</Hidden>
|
</Hidden>
|
||||||
</window>
|
</window>
|
||||||
|
@@ -1,21 +1,18 @@
|
|||||||
import { Astal, Gtk } from "ags/gtk3";
|
import { App, Astal, Gtk, Gdk } from "astal/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
|
||||||
visible
|
className="root"
|
||||||
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 class="widgets" hexpand halign={Gtk.Align.END}>
|
<box className="widgets" hexpand halign={Gtk.Align.END}>
|
||||||
<Systray />
|
<Systray />
|
||||||
<Battery />
|
<Battery />
|
||||||
</box>
|
</box>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { createBinding, createComputed } from "ags";
|
import { bind, Variable } from "astal";
|
||||||
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 = createBinding(battery, "percentage").as(
|
const percentage = bind(battery, "percentage").as(
|
||||||
(p) => Math.round(p * 100) + "%",
|
(p) => Math.round(p * 100) + "%",
|
||||||
);
|
);
|
||||||
const charging = createBinding(battery, "charging");
|
const charging = bind(battery, "charging");
|
||||||
const timeToFull = createBinding(battery, "timeToFull");
|
const timeToFull = bind(battery, "timeToFull");
|
||||||
const timeToEmpty = createBinding(battery, "timeToEmpty");
|
const timeToEmpty = bind(battery, "timeToEmpty");
|
||||||
|
|
||||||
const time = createComputed(
|
const time = Variable.derive(
|
||||||
[charging, timeToFull, timeToEmpty],
|
[charging, timeToFull, timeToEmpty],
|
||||||
(charging, full, empty) => formatTime(charging ? full : empty),
|
(charging, full, empty) => formatTime(charging ? full : empty),
|
||||||
);
|
);
|
||||||
|
|
||||||
const label = createComputed(
|
const label = Variable.derive(
|
||||||
[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 class="battery">
|
<button className="battery">
|
||||||
<label class="label" label={label} />
|
<label className="label" label={bind(label)} />
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@@ -1,16 +1,21 @@
|
|||||||
import { createPoll } from "ags/time";
|
import { bind, Variable } from "astal";
|
||||||
import GLib from "gi://GLib?version=2.0";
|
import { GLib } from "astal";
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const time = createPoll(
|
const time = Variable(
|
||||||
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 class="date">
|
<button className="date">
|
||||||
<label class="label" label={time} />
|
<label
|
||||||
|
className="label"
|
||||||
|
onDestroy={() => time.drop()}
|
||||||
|
label={bind(time)}
|
||||||
|
/>
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import { createState } from "ags";
|
import { Gtk } from "astal/gtk3";
|
||||||
import { Gtk } from "ags/gtk3";
|
import { Variable, bind, timeout } from "astal";
|
||||||
import { timeout } from "ags/time";
|
|
||||||
|
|
||||||
export default function Hidden({
|
export default function Hidden({
|
||||||
child,
|
child,
|
||||||
@@ -13,20 +12,24 @@ export default function Hidden({
|
|||||||
orientation?: Gtk.Orientation;
|
orientation?: Gtk.Orientation;
|
||||||
transitionType?: Gtk.RevealerTransitionType;
|
transitionType?: Gtk.RevealerTransitionType;
|
||||||
}) {
|
}) {
|
||||||
const [show, setShow] = createState(true);
|
const show = Variable(true);
|
||||||
const contents = child ?? children;
|
const contents = child ?? children;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<eventbox onHover={() => setShow(true)} onHoverLost={() => setShow(false)}>
|
<eventbox
|
||||||
|
clickThrough
|
||||||
|
onHover={() => show.set(true)}
|
||||||
|
onHoverLost={() => show.set(false)}
|
||||||
|
>
|
||||||
<box orientation={orientation}>
|
<box orientation={orientation}>
|
||||||
<revealer
|
<revealer
|
||||||
onRealize={() => timeout(2000, () => setShow(false))}
|
setup={(self) => timeout(2000, () => (self.revealChild = false))}
|
||||||
revealChild={show}
|
revealChild={bind(show)}
|
||||||
transitionType={transitionType}
|
transitionType={transitionType}
|
||||||
>
|
>
|
||||||
{Array.isArray(contents) ? <>{contents}</> : contents}
|
{Array.isArray(contents) ? <>{contents}</> : contents}
|
||||||
</revealer>
|
</revealer>
|
||||||
<box class="trigger-guard" />
|
<box clickThrough className="trigger-guard" />
|
||||||
</box>
|
</box>
|
||||||
</eventbox>
|
</eventbox>
|
||||||
);
|
);
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
import { execAsync } from "ags/process";
|
import { execAsync } from "astal/process";
|
||||||
|
|
||||||
export default () => (
|
export default () => (
|
||||||
<button
|
<button
|
||||||
class="launcher"
|
className="launcher"
|
||||||
onClicked={() =>
|
onClickRelease={() =>
|
||||||
execAsync(
|
execAsync(
|
||||||
'rofi -modes drun -show drun -run-command \"uwsm app -- {cmd}\"',
|
'rofi -modes drun -show drun -run-command \"uwsm app -- {cmd}\"',
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<icon class="icon" icon="nix-snowflake-symbolic" />;
|
<icon className="icon" icon="nix-snowflake-symbolic" />;
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
@@ -1,31 +1,28 @@
|
|||||||
import { createBinding, For } from "ags";
|
import { App } from "astal/gtk3";
|
||||||
import app from "ags/gtk3/app";
|
import { bind } from "astal";
|
||||||
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
|
||||||
class="item"
|
className="item"
|
||||||
tooltipMarkup={createBinding(item, "tooltipMarkup")}
|
tooltipMarkup={bind(item, "tooltipMarkup")}
|
||||||
usePopover={false}
|
usePopover={false}
|
||||||
menuModel={createBinding(item, "menuModel")}
|
menuModel={bind(item, "menuModel")}
|
||||||
|
actionGroup={bind(item, "actionGroup").as((ag) => ["dbusmenu", ag])}
|
||||||
>
|
>
|
||||||
<icon gicon={createBinding(item, "gicon")} />
|
<icon gicon={bind(item, "gicon")} />
|
||||||
</menubutton>
|
</menubutton>
|
||||||
);
|
);
|
||||||
|
|
||||||
export default () => {
|
export default () => (
|
||||||
let items = createBinding(tray, "items");
|
<box className="systray">
|
||||||
|
{bind(tray, "items").as((items) =>
|
||||||
return (
|
items.map((item) => {
|
||||||
<box class="systray">
|
if (item.iconThemePath) App.add_icons(item.iconThemePath);
|
||||||
<For each={items}>
|
return <TrayButton item={item} />;
|
||||||
{(item, _) => {
|
}),
|
||||||
if (item.iconThemePath) app.add_icons(item.iconThemePath);
|
)}
|
||||||
return <TrayButton item={item} />;
|
</box>
|
||||||
}}
|
);
|
||||||
</For>
|
|
||||||
</box>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
@@ -1,83 +1,74 @@
|
|||||||
|
import { bind, Variable } from "astal";
|
||||||
import Hyprland from "gi://AstalHyprland";
|
import Hyprland from "gi://AstalHyprland";
|
||||||
import { getHyprlandMonitor, range } from "../../lib";
|
import { 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: Accessor<string[]>;
|
let clients: Variable<string[]>;
|
||||||
let setClients: Setter<string[]>;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const workspace = hyprland.get_workspace(id);
|
const workspace = hyprland.get_workspace(id);
|
||||||
[clients, setClients] = createState(
|
clients = Variable(workspace.clients.map((client) => client.address));
|
||||||
workspace.clients.map((client) => client.address),
|
|
||||||
);
|
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
[clients, setClients] = createState<string[]>([]);
|
clients = Variable([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const active = createComputed(
|
const active = Variable.derive(
|
||||||
[createBinding(hyprland, "focusedWorkspace")],
|
[bind(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;
|
||||||
setClients(workspace.clients.map((client) => client.address));
|
clients.set(workspace.clients.map((client) => client.address));
|
||||||
});
|
});
|
||||||
|
|
||||||
hyprland.connect("workspace-removed", (_, workspaceId) => {
|
hyprland.connect("workspace-removed", (_, workspaceId) => {
|
||||||
if (workspaceId != id) return;
|
if (workspaceId != id) return;
|
||||||
setClients([]);
|
clients.set([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
hyprland.connect("client-added", (_hyprland, client) => {
|
hyprland.connect("client-added", (_hyprland, client) => {
|
||||||
if (client.workspace.id != id) return;
|
if (client.workspace.id != id) return;
|
||||||
setClients([...clients.get(), client.address]);
|
clients.set([...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) {
|
||||||
setClients([...clients.get(), client.address]);
|
clients.set([...clients.get(), client.address]);
|
||||||
} else {
|
} else {
|
||||||
setClients(
|
clients.set(
|
||||||
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) => {
|
||||||
setClients(clients.get().filter((oldClient) => oldClient != address));
|
clients.set(clients.get().filter((oldClient) => oldClient != address));
|
||||||
});
|
});
|
||||||
|
|
||||||
const className = createComputed([active, clients], (active, clients) => {
|
const className = Variable.derive([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 orientation={Gtk.Orientation.VERTICAL}>
|
<box vertical>
|
||||||
<box vexpand />
|
<box vexpand />
|
||||||
<eventbox onClickRelease={() => hyprland.dispatch("workspace", `${id}`)}>
|
<eventbox onClickRelease={() => hyprland.dispatch("workspace", `${id}`)}>
|
||||||
<label class={className} />
|
<label className={className()} />
|
||||||
</eventbox>
|
</eventbox>
|
||||||
<box vexpand />
|
<box vexpand />
|
||||||
</box>
|
</box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ({ gdkmonitor }: { gdkmonitor: Gdk.Monitor }) => {
|
export default ({ monitor }: { monitor: Hyprland.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,
|
||||||
@@ -87,7 +78,7 @@ export default ({ gdkmonitor }: { gdkmonitor: Gdk.Monitor }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<eventbox
|
<eventbox
|
||||||
class="workspaces"
|
className="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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
20
hosts/common/configs/user/gui/brightnessctl/default.nix
Normal file
20
hosts/common/configs/user/gui/brightnessctl/default.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
inputs,
|
inputs,
|
||||||
@@ -82,6 +85,6 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."jupiter/photos.karaolidis.com/admin".sopsFile =
|
sops.secrets."jupiter/photos.karaolidis.com/admin".sopsFile =
|
||||||
"${inputs.secrets}/personal/secrets.yaml";
|
../../../../../../secrets/personal/secrets.yaml;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -60,7 +63,6 @@ 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;
|
||||||
@@ -72,10 +74,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"
|
||||||
@@ -102,6 +104,7 @@ 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"
|
||||||
@@ -110,8 +113,6 @@ 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"
|
||||||
@@ -142,7 +143,7 @@ in
|
|||||||
ublock-origin
|
ublock-origin
|
||||||
violentmonkey
|
violentmonkey
|
||||||
wayback-machine
|
wayback-machine
|
||||||
user-agent-string-switcher
|
fakespot-fake-reviews-amazon
|
||||||
];
|
];
|
||||||
|
|
||||||
search = {
|
search = {
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
{ user, home }:
|
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.gamemode.enable = true;
|
|
||||||
}
|
|
@@ -1,11 +0,0 @@
|
|||||||
{ user, home }:
|
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.gamescope = {
|
|
||||||
enable = true;
|
|
||||||
args = [
|
|
||||||
"--rt"
|
|
||||||
"-f"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,30 +0,0 @@
|
|||||||
{ 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"
|
|
||||||
];
|
|
||||||
}
|
|
@@ -1,14 +0,0 @@
|
|||||||
{ 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";
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,17 +0,0 @@
|
|||||||
{ 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;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
@@ -1,17 +0,0 @@
|
|||||||
# 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,33 +0,0 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -37,15 +40,16 @@ 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.map (name: {
|
// builtins.listToAttrs (
|
||||||
name = ".icons/${name}";
|
builtins.map (name: {
|
||||||
value.enable = false;
|
name = ".icons/${name}";
|
||||||
}) (hmConfig.theme.icon.names ++ hmConfig.theme.cursor.names)
|
value.enable = false;
|
||||||
);
|
}) (hmConfig.theme.icon.names ++ hmConfig.theme.cursor.names)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
theme.template = {
|
theme.template = {
|
||||||
|
@@ -1,21 +0,0 @@
|
|||||||
{ 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";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
78
hosts/common/configs/user/gui/hyprland/auto-center.patch
Normal file
78
hosts/common/configs/user/gui/hyprland/auto-center.patch
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
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 {
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -9,7 +12,10 @@
|
|||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
hyprland = prev.hyprland.overrideAttrs (oldAttrs: {
|
hyprland = prev.hyprland.overrideAttrs (oldAttrs: {
|
||||||
patches = oldAttrs.patches or [ ] ++ [ ./fix-maxwidth-resolution-mode.patch ];
|
patches = oldAttrs.patches or [ ] ++ [
|
||||||
|
./auto-center.patch
|
||||||
|
./maxwidth-resolution-mode.patch
|
||||||
|
];
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
@@ -152,9 +158,6 @@
|
|||||||
no_update_news = true;
|
no_update_news = true;
|
||||||
no_donation_nag = true;
|
no_donation_nag = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# FIXME: https://github.com/ValveSoftware/gamescope/issues/1825
|
|
||||||
debug.full_cm_proto = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = "source = ./theme.conf";
|
extraConfig = "source = ./theme.conf";
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
|
|
||||||
index 635c7977..80093c0d 100644
|
|
||||||
--- a/src/config/ConfigManager.cpp
|
|
||||||
+++ b/src/config/ConfigManager.cpp
|
|
||||||
@@ -2091,6 +2091,8 @@ bool CMonitorRuleParser::parseMode(const std::string& value) {
|
|
||||||
m_rule.resolution = Vector2D(-1, -1);
|
|
||||||
else if (value.starts_with("highres"))
|
|
||||||
m_rule.resolution = Vector2D(-1, -2);
|
|
||||||
+ else if (value.starts_with("maxwidth"))
|
|
||||||
+ m_rule.resolution = Vector2D(-1, -3);
|
|
||||||
else if (parseModeLine(value, m_rule.drmMode)) {
|
|
||||||
m_rule.resolution = Vector2D(m_rule.drmMode.hdisplay, m_rule.drmMode.vdisplay);
|
|
||||||
m_rule.refreshRate = float(m_rule.drmMode.vrefresh) / 1000;
|
|
@@ -0,0 +1,44 @@
|
|||||||
|
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
|
||||||
|
index f5f0bed3..cfe39b70 100644
|
||||||
|
--- a/src/config/ConfigManager.cpp
|
||||||
|
+++ b/src/config/ConfigManager.cpp
|
||||||
|
@@ -2013,6 +2013,8 @@ std::optional<std::string> CConfigManager::handleMonitor(const std::string& comm
|
||||||
|
newrule.resolution = Vector2D(-1, -1);
|
||||||
|
} else if (ARGS[1].starts_with("highres")) {
|
||||||
|
newrule.resolution = Vector2D(-1, -2);
|
||||||
|
+ } else if (ARGS[1].starts_with("maxwidth")) {
|
||||||
|
+ newrule.resolution = Vector2D(-1, -3);
|
||||||
|
} else if (parseModeLine(ARGS[1], newrule.drmMode)) {
|
||||||
|
newrule.resolution = Vector2D(newrule.drmMode.hdisplay, newrule.drmMode.vdisplay);
|
||||||
|
newrule.refreshRate = float(newrule.drmMode.vrefresh) / 1000;
|
||||||
|
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
|
||||||
|
index 4dc0942d..72a221f5 100644
|
||||||
|
--- a/src/helpers/Monitor.cpp
|
||||||
|
+++ b/src/helpers/Monitor.cpp
|
||||||
|
@@ -515,7 +515,7 @@ bool CMonitor::applyMonitorRule(SMonitorRule* pMonitorRule, bool force) {
|
||||||
|
} else if (RULE->resolution == Vector2D(-1, -2)) {
|
||||||
|
requestedStr = "highres";
|
||||||
|
|
||||||
|
- // sort prioritizing resultion 1st and refresh rate 2nd, then add best 3
|
||||||
|
+ // sort prioritizing resolution 1st and refresh rate 2nd, then add best 3
|
||||||
|
addBest3Modes([](auto const& a, auto const& b) {
|
||||||
|
if (a->pixelSize.x > b->pixelSize.x && a->pixelSize.y > b->pixelSize.y)
|
||||||
|
return true;
|
||||||
|
@@ -524,6 +524,17 @@ bool CMonitor::applyMonitorRule(SMonitorRule* pMonitorRule, bool force) {
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
+ } else if (RULE->resolution == Vector2D(-1, -3)) {
|
||||||
|
+ requestedStr = "maxwidth";
|
||||||
|
+
|
||||||
|
+ // sort prioritizing widest resolution 1st and refresh rate 2nd, then add best 3
|
||||||
|
+ addBest3Modes([](auto const& a, auto const& b) {
|
||||||
|
+ if (a->pixelSize.x > b->pixelSize.x)
|
||||||
|
+ return true;
|
||||||
|
+ if (a->pixelSize.x == b->pixelSize.x && std::round(a->refreshRate) > std::round(b->refreshRate))
|
||||||
|
+ return true;
|
||||||
|
+ return false;
|
||||||
|
+ });
|
||||||
|
} else if (RULE->resolution != Vector2D()) {
|
||||||
|
// user requested mode
|
||||||
|
requestedStr = std::format("{:X0}@{:.2f}Hz", RULE->resolution, RULE->refreshRate);
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -21,12 +24,8 @@ in
|
|||||||
inherit (hmConfig.theme.font) size;
|
inherit (hmConfig.theme.font) size;
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
|
||||||
confirm_os_window_close = 0;
|
|
||||||
enable_audio_bell = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
confirm_os_window_close 0
|
||||||
include theme.conf
|
include theme.conf
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
boot = {
|
boot = {
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -380,7 +383,7 @@ in
|
|||||||
];
|
];
|
||||||
searchProvider = "google";
|
searchProvider = "google";
|
||||||
geocodingApiMethod = "path";
|
geocodingApiMethod = "path";
|
||||||
geocodingApiPath = hmConfig.sops.secrets."google/cloud/obsidian/geocoding".path;
|
geocodingApiPath = hmConfig.sops.secrets."google/geocoding".path;
|
||||||
useGooglePlaces = true;
|
useGooglePlaces = true;
|
||||||
letZoomBeyondMax = true;
|
letZoomBeyondMax = true;
|
||||||
showGeolinkPreview = true;
|
showGeolinkPreview = true;
|
||||||
@@ -608,6 +611,6 @@ in
|
|||||||
}
|
}
|
||||||
) hmConfig.programs.obsidian.vaults;
|
) hmConfig.programs.obsidian.vaults;
|
||||||
|
|
||||||
sops.secrets."google/cloud/obsidian/geocoding".sopsFile = "${inputs.secrets}/personal/secrets.yaml";
|
sops.secrets."google/geocoding".sopsFile = ../../../../../../secrets/personal/secrets.yaml;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{ 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,4 +1,7 @@
|
|||||||
{ user, home }:
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user