Compare commits
1 Commits
a11dd05dba
...
wireguard
Author | SHA1 | Date | |
---|---|---|---|
84a5ff6fd4 |
11
.gitmodules
vendored
11
.gitmodules
vendored
@@ -1,3 +1,8 @@
|
||||
[submodule "secrets"]
|
||||
path = secrets
|
||||
url = https://git.karaolidis.com/karaolidis/nix-secrets.git
|
||||
[submodule "submodules/nixpkgs"]
|
||||
path = submodules/nixpkgs
|
||||
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.
|
||||
|
||||
- `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.
|
||||
- [`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.
|
||||
- [`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.
|
||||
|
||||
|
173
flake.lock
generated
173
flake.lock
generated
@@ -5,21 +5,21 @@
|
||||
"astal": [
|
||||
"astal"
|
||||
],
|
||||
"gnim": "gnim",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752328525,
|
||||
"narHash": "sha256-0aaVFLQxY1dKIS5jzwhbO847yIdr3U0o2heUzC5iat4=",
|
||||
"lastModified": 1744557573,
|
||||
"narHash": "sha256-XAyj0iDuI51BytJ1PwN53uLpzTDdznPDQFG4RwihlTQ=",
|
||||
"owner": "aylur",
|
||||
"repo": "ags",
|
||||
"rev": "2eb3ea54311b0f7ba9d333d661d12cda1ed5507e",
|
||||
"rev": "3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "aylur",
|
||||
"ref": "main",
|
||||
"repo": "ags",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -31,15 +31,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752404970,
|
||||
"narHash": "sha256-XULTToDUkIshNXEO+YP2mAHdQv8bxWDvKjbamBfOC8E=",
|
||||
"lastModified": 1749559749,
|
||||
"narHash": "sha256-TM95tg1G7S6rVBBoMwurXMz8Il4xlnuZ2TI4h6lfZzg=",
|
||||
"owner": "aylur",
|
||||
"repo": "astal",
|
||||
"rev": "2c5eb54f39e1710c6e2c80915a240978beb3269a",
|
||||
"rev": "dd8a4662f2f17fb4326a7bd0fb2d054f5d477ba3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "aylur",
|
||||
"ref": "main",
|
||||
"repo": "astal",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -51,43 +52,20 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746728054,
|
||||
"narHash": "sha256-eDoSOhxGEm2PykZFa/x9QG5eTH0MJdiJ9aR00VAofXE=",
|
||||
"lastModified": 1749436314,
|
||||
"narHash": "sha256-CqmqU5FRg5AadtIkxwu8ulDSOSoIisUMZRLlcED3Q5w=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "ff442f5d1425feb86344c028298548024f21256d",
|
||||
"rev": "dfa4d1b9c39c0342ef133795127a3af14598017a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "latest",
|
||||
"ref": "master",
|
||||
"repo": "disko",
|
||||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
@@ -125,26 +103,11 @@
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"ref": "main",
|
||||
"repo": "flake-utils",
|
||||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -152,31 +115,32 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753675338,
|
||||
"narHash": "sha256-KDS9sr7dddH97lUXa7oxfRqphBlCA6JxZO4m/Z4W06I=",
|
||||
"owner": "nix-community",
|
||||
"lastModified": 1749678254,
|
||||
"narHash": "sha256-6I+qez0MnHu9M2spLj3LsGA/cUGgfx17/hMPvmrUMoU=",
|
||||
"owner": "karaolidis",
|
||||
"repo": "home-manager",
|
||||
"rev": "e4b032ba5113664f0b8b23d956e59ce8e0bc349d",
|
||||
"rev": "e248f54290b483a47c7550f69faecb8ed97e4831",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"owner": "karaolidis",
|
||||
"ref": "integration",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1753549186,
|
||||
"narHash": "sha256-Znl7rzuxKg/Mdm6AhimcKynM7V3YeNDIcLjBuoBcmNs=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1749678247,
|
||||
"narHash": "sha256-K83Q3c/o5CdMB3Npk3P1kCIz6FcUuJV8E4k6z1YN8AQ=",
|
||||
"owner": "karaolidis",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "17f6bd177404d6d43017595c5264756764444ab8",
|
||||
"rev": "4d408c92fe165ab68f012a3fa36d4c58d84e83bd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"owner": "karaolidis",
|
||||
"ref": "integration",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -184,58 +148,40 @@
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"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"
|
||||
],
|
||||
"utils": [
|
||||
"flake-utils"
|
||||
"treefmt-nix": [
|
||||
"treefmt-nix"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753078133,
|
||||
"narHash": "sha256-z+cvobe/+6pSVmwVrI+/k4lt7CjsQtfhlMaAlLQcSPY=",
|
||||
"owner": "icewind1991",
|
||||
"repo": "nvidia-patch-nixos",
|
||||
"rev": "b5bb7576a5a951cea1a46703f488ac76fa827876",
|
||||
"lastModified": 1749675110,
|
||||
"narHash": "sha256-NkDE/JyeQJmLtpXjyFZK2wKs5K7isap7MBIzoYMC9nk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "0e8328c18d801a253ed5dfd17bd78254d9669d06",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "icewind1991",
|
||||
"repo": "nvidia-patch-nixos",
|
||||
"owner": "nix-community",
|
||||
"ref": "main",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"quadlet-nix": {
|
||||
"locked": {
|
||||
"lastModified": 1753321053,
|
||||
"narHash": "sha256-7d9eSy3qhzVut64dKzDriKo44LfXRCS5ykk4BAbNfVU=",
|
||||
"lastModified": 1749099346,
|
||||
"narHash": "sha256-5gi/YaLVsFztGvVH45eB6jsBmZf+HnvDeSA9RXUqbcY=",
|
||||
"owner": "SEIAROTg",
|
||||
"repo": "quadlet-nix",
|
||||
"rev": "172f2a786615dccc153550832f0bf2f373d5d261",
|
||||
"rev": "d4119a3423f938427252ba8bbdbe8ce040751864",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "SEIAROTg",
|
||||
"ref": "main",
|
||||
"repo": "quadlet-nix",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -245,36 +191,17 @@
|
||||
"ags": "ags",
|
||||
"astal": "astal",
|
||||
"disko": "disko",
|
||||
"flake-input-patcher": "flake-input-patcher",
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nur": "nur",
|
||||
"nvidia-patch": "nvidia-patch",
|
||||
"quadlet-nix": "quadlet-nix",
|
||||
"secrets": "secrets",
|
||||
"sops-nix": "sops-nix",
|
||||
"spicetify-nix": "spicetify-nix",
|
||||
"systems": "systems",
|
||||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -282,15 +209,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752544651,
|
||||
"narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=",
|
||||
"lastModified": 1749592509,
|
||||
"narHash": "sha256-VunQzfZFA+Y6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC+A=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "2c8def626f54708a9c38a5861866660395bb3461",
|
||||
"rev": "50754dfaa0e24e313c626900d44ef431f3210138",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Mic92",
|
||||
"ref": "master",
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -305,15 +233,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753591727,
|
||||
"narHash": "sha256-Ow+qyFckroPS4SQFHcFZ8mKh3HIQ2pQdC6DRjiYF9EE=",
|
||||
"lastModified": 1749357231,
|
||||
"narHash": "sha256-AbrPgGFVYR45TlYLHYTppayG0xzOG9XXhi+1j3Klbw8=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"rev": "26c488b60360e15db372483d826cec89ac532980",
|
||||
"rev": "03783416f7416715c52166d4e8ba0492a7149397",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Gerg-L",
|
||||
"ref": "master",
|
||||
"repo": "spicetify-nix",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -329,6 +258,7 @@
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"ref": "main",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -340,15 +270,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753439394,
|
||||
"narHash": "sha256-Bv9h1AJegLI8uAhiJ1sZ4XAndYxhgf38tMgCQwiEpmc=",
|
||||
"lastModified": 1749194973,
|
||||
"narHash": "sha256-eEy8cuS0mZ2j/r/FE0/LYBSBcIs/MKOIVakwHVuqTfk=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "2673921c03d6e75fdf4aa93e025772608d1482cf",
|
||||
"rev": "a05be418a1af1198ca0f63facb13c985db4cb3c5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"ref": "main",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
|
184
flake.nix
184
flake.nix
@@ -1,69 +1,113 @@
|
||||
{
|
||||
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 = {
|
||||
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";
|
||||
};
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko/latest";
|
||||
type = "github";
|
||||
owner = "nix-community";
|
||||
repo = "disko";
|
||||
ref = "master";
|
||||
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
type = "github";
|
||||
owner = "Mic92";
|
||||
repo = "sops-nix";
|
||||
ref = "master";
|
||||
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
secrets = {
|
||||
url = "git+https://git.karaolidis.com/karaolidis/nix-secrets.git";
|
||||
flake = false;
|
||||
systems = {
|
||||
type = "github";
|
||||
owner = "nix-systems";
|
||||
repo = "default";
|
||||
ref = "main";
|
||||
};
|
||||
|
||||
systems.url = "github:nix-systems/default";
|
||||
|
||||
nur = {
|
||||
url = "github:nix-community/NUR";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
type = "github";
|
||||
owner = "nix-community";
|
||||
repo = "NUR";
|
||||
ref = "main";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
treefmt-nix.follows = "treefmt-nix";
|
||||
};
|
||||
};
|
||||
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
type = "github";
|
||||
owner = "numtide";
|
||||
repo = "flake-utils";
|
||||
ref = "main";
|
||||
|
||||
inputs.systems.follows = "systems";
|
||||
};
|
||||
|
||||
treefmt-nix = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
type = "github";
|
||||
owner = "numtide";
|
||||
repo = "treefmt-nix";
|
||||
ref = "main";
|
||||
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake-input-patcher = {
|
||||
url = "github:jfly/flake-input-patcher";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
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";
|
||||
};
|
||||
quadlet-nix = {
|
||||
type = "github";
|
||||
owner = "SEIAROTg";
|
||||
repo = "quadlet-nix";
|
||||
ref = "main";
|
||||
};
|
||||
|
||||
astal = {
|
||||
url = "github:aylur/astal";
|
||||
type = "github";
|
||||
owner = "aylur";
|
||||
repo = "astal";
|
||||
ref = "main";
|
||||
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
ags = {
|
||||
url = "github:aylur/ags";
|
||||
type = "github";
|
||||
owner = "aylur";
|
||||
repo = "ags";
|
||||
ref = "main";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
astal.follows = "astal";
|
||||
@@ -71,7 +115,11 @@
|
||||
};
|
||||
|
||||
spicetify-nix = {
|
||||
url = "github:Gerg-L/spicetify-nix";
|
||||
type = "github";
|
||||
owner = "Gerg-L";
|
||||
repo = "spicetify-nix";
|
||||
ref = "master";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
systems.follows = "systems";
|
||||
@@ -80,28 +128,44 @@
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs:
|
||||
let
|
||||
mkInputs =
|
||||
system:
|
||||
let
|
||||
patcher = inputs.flake-input-patcher.lib.${system};
|
||||
in
|
||||
patcher.patch inputs (import ./patches.nix { inherit patcher; });
|
||||
|
||||
mkNixosConfiguration =
|
||||
inputs: system: modules:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
inherit system modules;
|
||||
{ self, nixpkgs, ... }@inputs:
|
||||
{
|
||||
nixosConfigurations = {
|
||||
installer = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/installer ];
|
||||
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;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
@@ -109,20 +173,12 @@
|
||||
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
installer = mkNixosConfiguration inputs system [ ./hosts/installer ];
|
||||
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 ];
|
||||
};
|
||||
devShells = import ./hosts/common/shells { inherit pkgs; };
|
||||
lib = import ./lib { inherit pkgs; };
|
||||
packages = import ./packages { inherit pkgs inputs system; };
|
||||
|
||||
devShells.${system} = import ./hosts/common/shells { inherit pkgs; };
|
||||
lib.${system} = import ./lib { inherit pkgs; };
|
||||
packages.${system} = import ./packages { inherit pkgs inputs system; };
|
||||
|
||||
formatter.${system} = treefmt.config.build.wrapper;
|
||||
checks.formatting.${system} = treefmt.config.build.check inputs.self;
|
||||
formatter = treefmt.config.build.wrapper;
|
||||
checks.formatting = treefmt.config.build.check self;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@@ -233,11 +233,11 @@ in
|
||||
unitConfig.ConditionPathExists = [ (lib.strings.escape [ " " ] c.source) ];
|
||||
what = c.source;
|
||||
where = c.target;
|
||||
options = lib.strings.concatStringsSep "," [
|
||||
options = lib.strings.concatStringsSep "," ([
|
||||
"bind"
|
||||
"X-fstrim.notrim"
|
||||
"x-gvfs-hide"
|
||||
];
|
||||
]);
|
||||
}) all;
|
||||
|
||||
services = builtins.listToAttrs (
|
||||
|
@@ -51,7 +51,7 @@ check_key() {
|
||||
set_password_file() {
|
||||
SOPS_AGE_KEY_FILE="$flake/secrets/$key/key.txt"
|
||||
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
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ prepare_disk() {
|
||||
|
||||
copy_keys() {
|
||||
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
|
||||
if [[ -z "$key" ]]; then
|
||||
|
@@ -2,8 +2,10 @@
|
||||
{
|
||||
sops = {
|
||||
secrets = {
|
||||
"git/credentials/github.com/public/username".sopsFile = "${inputs.secrets}/personal/secrets.yaml";
|
||||
"git/credentials/github.com/public/password".sopsFile = "${inputs.secrets}/personal/secrets.yaml";
|
||||
"git/credentials/github.com/public/username".sopsFile =
|
||||
../../../../../secrets/personal/secrets.yaml;
|
||||
"git/credentials/github.com/public/password".sopsFile =
|
||||
../../../../../secrets/personal/secrets.yaml;
|
||||
};
|
||||
|
||||
templates.nix-access-tokens = {
|
||||
|
@@ -2,20 +2,6 @@
|
||||
{
|
||||
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 = {
|
||||
podman.enable = true;
|
||||
|
||||
@@ -24,10 +10,7 @@
|
||||
storage.settings.storage.driver = "btrfs";
|
||||
};
|
||||
|
||||
quadlet = {
|
||||
enable = true;
|
||||
autoEscape = true;
|
||||
};
|
||||
quadlet.autoEscape = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
|
@@ -4,9 +4,4 @@
|
||||
smartmontools
|
||||
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 = {
|
||||
defaultSopsFile = "${inputs.secrets}/hosts/${config.networking.hostName}/secrets.yaml";
|
||||
defaultSopsFile = ../../../../. + "/${config.networking.hostName}/secrets/secrets.yaml";
|
||||
|
||||
age = {
|
||||
generateKey = true;
|
||||
|
@@ -1,22 +1,22 @@
|
||||
{ inputs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
programs.ssh.knownHosts = {
|
||||
installer.publicKeyFile = "${inputs.secrets}/hosts/installer/ssh_host_ed25519_key.pub";
|
||||
elara.publicKeyFile = "${inputs.secrets}/hosts/elara/ssh_host_ed25519_key.pub";
|
||||
himalia.publicKeyFile = "${inputs.secrets}/hosts/himalia/ssh_host_ed25519_key.pub";
|
||||
installer.publicKeyFile = ../../../../installer/secrets/ssh_host_ed25519_key.pub;
|
||||
elara.publicKeyFile = ../../../../elara/secrets/ssh_host_ed25519_key.pub;
|
||||
himalia.publicKeyFile = ../../../../himalia/secrets/ssh_host_ed25519_key.pub;
|
||||
|
||||
jupiter = {
|
||||
publicKeyFile = "${inputs.secrets}/hosts/jupiter/ssh_host_ed25519_key.pub";
|
||||
publicKeyFile = ../../../../jupiter/secrets/ssh_host_ed25519_key.pub;
|
||||
extraHostNames = [ "karaolidis.com" ];
|
||||
};
|
||||
|
||||
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" ];
|
||||
};
|
||||
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
|
@@ -1,11 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
kitty.terminfo
|
||||
tmux.terminfo
|
||||
];
|
||||
|
||||
enableAllTerminfo = true;
|
||||
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, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
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 = {
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
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;
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ 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,
|
||||
lib,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, inputs, ... }:
|
||||
{
|
||||
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, ... }:
|
||||
{
|
||||
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, ... }:
|
||||
{
|
||||
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;
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
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, ... }:
|
||||
{
|
||||
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, ... }:
|
||||
{
|
||||
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, ... }:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
environment.persistence = {
|
||||
|
@@ -3,9 +3,6 @@ volnorm = true
|
||||
default_keybindings = true
|
||||
library_tabs = [ "albums", "artists", "playlists", "browse" ]
|
||||
|
||||
[keybindings]
|
||||
"Esc" = "back"
|
||||
|
||||
[theme]
|
||||
background = "{{colors.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 = {
|
||||
|
@@ -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";
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
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, ... }:
|
||||
{
|
||||
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, ... }:
|
||||
{
|
||||
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,
|
||||
pkgs,
|
||||
@@ -16,10 +19,7 @@
|
||||
settings.storage.storage.driver = "btrfs";
|
||||
};
|
||||
|
||||
virtualisation.quadlet = {
|
||||
enable = true;
|
||||
autoEscape = true;
|
||||
};
|
||||
virtualisation.quadlet.autoEscape = true;
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, inputs, ... }:
|
||||
{
|
||||
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} = {
|
||||
|
@@ -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;
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, utils, ... }:
|
||||
{
|
||||
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;
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
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, ... }:
|
||||
{
|
||||
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, ... }:
|
||||
{
|
||||
environment.persistence."/persist/user" = {
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
@@ -24,18 +27,19 @@ in
|
||||
};
|
||||
|
||||
opener = {
|
||||
edit = [
|
||||
{
|
||||
run = "${hmConfig.programs.neovim.finalPackage}/bin/nvim \"$@\"";
|
||||
desc = "nvim";
|
||||
block = true;
|
||||
}
|
||||
]
|
||||
++ lib.lists.optional hmConfig.programs.vscode.enable {
|
||||
run = "${hmConfig.programs.vscode.package}/bin/code \"$@\"";
|
||||
desc = "code";
|
||||
orphan = true;
|
||||
};
|
||||
edit =
|
||||
[
|
||||
{
|
||||
run = "${hmConfig.programs.neovim.finalPackage}/bin/nvim \"$@\"";
|
||||
desc = "nvim";
|
||||
block = true;
|
||||
}
|
||||
]
|
||||
++ lib.lists.optional hmConfig.programs.vscode.enable {
|
||||
run = "${hmConfig.programs.vscode.package}/bin/code \"$@\"";
|
||||
desc = "code";
|
||||
orphan = true;
|
||||
};
|
||||
open = [
|
||||
{
|
||||
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, ... }:
|
||||
{
|
||||
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" = { };
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment = {
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import app from "ags/gtk3/app";
|
||||
import { exec } from "ags/process";
|
||||
import { monitorFile } from "ags/file";
|
||||
import { App } from "astal/gtk3";
|
||||
import { monitorFile } from "astal/file";
|
||||
import { exec } from "astal/process";
|
||||
import GLib from "gi://GLib";
|
||||
import Left from "./widget/Left";
|
||||
import Center from "./widget/Center";
|
||||
@@ -12,15 +12,15 @@ const scss = `${HOME}/.config/astal/theme.sass`;
|
||||
|
||||
monitorFile(scss, () => {
|
||||
exec(`sassc ${scss} ${css}`);
|
||||
app.apply_css(css, true);
|
||||
App.apply_css(css, true);
|
||||
});
|
||||
|
||||
exec(`sassc ${scss} ${css}`);
|
||||
|
||||
app.start({
|
||||
App.start({
|
||||
css,
|
||||
main() {
|
||||
app.get_monitors().map((monitor) => {
|
||||
App.get_monitors().map((monitor) => {
|
||||
Left(monitor);
|
||||
Center(monitor);
|
||||
Right(monitor);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { Gdk } from "ags/gtk3";
|
||||
import { Gdk } from "astal/gtk3";
|
||||
import Hyprland from "gi://AstalHyprland";
|
||||
|
||||
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) => {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "astal-shell",
|
||||
"dependencies": {
|
||||
"ags": "*"
|
||||
"astal": "~/.local/share/ags"
|
||||
}
|
||||
}
|
||||
|
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "ags/gtk3",
|
||||
"lib": ["ES2023"],
|
||||
"experimentalDecorators": true,
|
||||
"strict": true,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "Bundler",
|
||||
"strict": true,
|
||||
"target": "ES2020"
|
||||
"jsx": "react-jsx",
|
||||
"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 Hidden from "./components/Hidden";
|
||||
import app from "ags/gtk3/app";
|
||||
|
||||
export default (monitor: Gdk.Monitor) => (
|
||||
<window
|
||||
visible
|
||||
class="root"
|
||||
className="root"
|
||||
gdkmonitor={monitor}
|
||||
exclusivity={Astal.Exclusivity.IGNORE}
|
||||
anchor={Astal.WindowAnchor.TOP}
|
||||
application={app}
|
||||
application={App}
|
||||
>
|
||||
<Hidden>
|
||||
<box class="widgets" hexpand halign={Gtk.Align.CENTER}>
|
||||
<box className="widgets" hexpand halign={Gtk.Align.CENTER}>
|
||||
<Date />
|
||||
</box>
|
||||
</Hidden>
|
||||
|
@@ -1,22 +1,21 @@
|
||||
import { Astal, Gtk, Gdk } from "ags/gtk3";
|
||||
import app from "ags/gtk3/app";
|
||||
import { App, Astal, Gtk, Gdk } from "astal/gtk3";
|
||||
import Launcher from "./components/Launcher";
|
||||
import Workspace from "./components/Workspaces";
|
||||
import Hidden from "./components/Hidden";
|
||||
import { getHyprlandMonitor } from "../lib";
|
||||
|
||||
export default (monitor: Gdk.Monitor) => (
|
||||
<window
|
||||
visible
|
||||
class="root"
|
||||
className="root"
|
||||
gdkmonitor={monitor}
|
||||
exclusivity={Astal.Exclusivity.IGNORE}
|
||||
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.LEFT}
|
||||
application={app}
|
||||
application={App}
|
||||
>
|
||||
<Hidden>
|
||||
<box class="widgets" hexpand halign={Gtk.Align.START}>
|
||||
<box className="widgets" hexpand halign={Gtk.Align.START}>
|
||||
<Launcher />
|
||||
<Workspace gdkmonitor={monitor} />
|
||||
<Workspace monitor={getHyprlandMonitor(monitor)!} />
|
||||
</box>
|
||||
</Hidden>
|
||||
</window>
|
||||
|
@@ -1,21 +1,18 @@
|
||||
import { Astal, Gtk } from "ags/gtk3";
|
||||
import app from "ags/gtk3/app";
|
||||
import Gdk from "gi://Gdk";
|
||||
import { App, Astal, Gtk, Gdk } from "astal/gtk3";
|
||||
import Systray from "./components/Tray";
|
||||
import Hidden from "./components/Hidden";
|
||||
import Battery from "./components/Battery";
|
||||
|
||||
export default (monitor: Gdk.Monitor) => (
|
||||
<window
|
||||
visible
|
||||
class="root"
|
||||
className="root"
|
||||
gdkmonitor={monitor}
|
||||
exclusivity={Astal.Exclusivity.IGNORE}
|
||||
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.RIGHT}
|
||||
application={app}
|
||||
application={App}
|
||||
>
|
||||
<Hidden>
|
||||
<box class="widgets" hexpand halign={Gtk.Align.END}>
|
||||
<box className="widgets" hexpand halign={Gtk.Align.END}>
|
||||
<Systray />
|
||||
<Battery />
|
||||
</box>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { createBinding, createComputed } from "ags";
|
||||
import { bind, Variable } from "astal";
|
||||
import AstalBattery from "gi://AstalBattery";
|
||||
|
||||
const battery = AstalBattery.get_default();
|
||||
@@ -9,19 +9,19 @@ const formatTime = (seconds: number) =>
|
||||
: "--:--";
|
||||
|
||||
export default () => {
|
||||
const percentage = createBinding(battery, "percentage").as(
|
||||
const percentage = bind(battery, "percentage").as(
|
||||
(p) => Math.round(p * 100) + "%",
|
||||
);
|
||||
const charging = createBinding(battery, "charging");
|
||||
const timeToFull = createBinding(battery, "timeToFull");
|
||||
const timeToEmpty = createBinding(battery, "timeToEmpty");
|
||||
const charging = bind(battery, "charging");
|
||||
const timeToFull = bind(battery, "timeToFull");
|
||||
const timeToEmpty = bind(battery, "timeToEmpty");
|
||||
|
||||
const time = createComputed(
|
||||
const time = Variable.derive(
|
||||
[charging, timeToFull, timeToEmpty],
|
||||
(charging, full, empty) => formatTime(charging ? full : empty),
|
||||
);
|
||||
|
||||
const label = createComputed(
|
||||
const label = Variable.derive(
|
||||
[percentage, charging, time],
|
||||
(percentage, charging, time) => {
|
||||
const arrow = charging ? "▲" : "▼";
|
||||
@@ -30,8 +30,8 @@ export default () => {
|
||||
);
|
||||
|
||||
return (
|
||||
<button class="battery">
|
||||
<label class="label" label={label} />
|
||||
<button className="battery">
|
||||
<label className="label" label={bind(label)} />
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
@@ -1,16 +1,21 @@
|
||||
import { createPoll } from "ags/time";
|
||||
import GLib from "gi://GLib?version=2.0";
|
||||
import { bind, Variable } from "astal";
|
||||
import { GLib } from "astal";
|
||||
|
||||
export default () => {
|
||||
const time = createPoll(
|
||||
const time = Variable(
|
||||
GLib.DateTime.new_now_local().format("%H:%M - %A, %d %B %Y")!,
|
||||
).poll(
|
||||
1000,
|
||||
() => GLib.DateTime.new_now_local().format("%H:%M - %A, %d %B %Y")!,
|
||||
);
|
||||
|
||||
return (
|
||||
<button class="date">
|
||||
<label class="label" label={time} />
|
||||
<button className="date">
|
||||
<label
|
||||
className="label"
|
||||
onDestroy={() => time.drop()}
|
||||
label={bind(time)}
|
||||
/>
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { createState } from "ags";
|
||||
import { Gtk } from "ags/gtk3";
|
||||
import { timeout } from "ags/time";
|
||||
import { Gtk } from "astal/gtk3";
|
||||
import { Variable, bind, timeout } from "astal";
|
||||
|
||||
export default function Hidden({
|
||||
child,
|
||||
@@ -13,20 +12,24 @@ export default function Hidden({
|
||||
orientation?: Gtk.Orientation;
|
||||
transitionType?: Gtk.RevealerTransitionType;
|
||||
}) {
|
||||
const [show, setShow] = createState(true);
|
||||
const show = Variable(true);
|
||||
const contents = child ?? children;
|
||||
|
||||
return (
|
||||
<eventbox onHover={() => setShow(true)} onHoverLost={() => setShow(false)}>
|
||||
<eventbox
|
||||
clickThrough
|
||||
onHover={() => show.set(true)}
|
||||
onHoverLost={() => show.set(false)}
|
||||
>
|
||||
<box orientation={orientation}>
|
||||
<revealer
|
||||
onRealize={() => timeout(2000, () => setShow(false))}
|
||||
revealChild={show}
|
||||
setup={(self) => timeout(2000, () => (self.revealChild = false))}
|
||||
revealChild={bind(show)}
|
||||
transitionType={transitionType}
|
||||
>
|
||||
{Array.isArray(contents) ? <>{contents}</> : contents}
|
||||
</revealer>
|
||||
<box class="trigger-guard" />
|
||||
<box clickThrough className="trigger-guard" />
|
||||
</box>
|
||||
</eventbox>
|
||||
);
|
||||
|
@@ -1,14 +1,14 @@
|
||||
import { execAsync } from "ags/process";
|
||||
import { execAsync } from "astal/process";
|
||||
|
||||
export default () => (
|
||||
<button
|
||||
class="launcher"
|
||||
onClicked={() =>
|
||||
className="launcher"
|
||||
onClickRelease={() =>
|
||||
execAsync(
|
||||
'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>
|
||||
);
|
||||
|
@@ -1,31 +1,28 @@
|
||||
import { createBinding, For } from "ags";
|
||||
import app from "ags/gtk3/app";
|
||||
import { App } from "astal/gtk3";
|
||||
import { bind } from "astal";
|
||||
import Tray from "gi://AstalTray";
|
||||
|
||||
const tray = Tray.get_default();
|
||||
|
||||
const TrayButton = ({ item }: { item: Tray.TrayItem }) => (
|
||||
<menubutton
|
||||
class="item"
|
||||
tooltipMarkup={createBinding(item, "tooltipMarkup")}
|
||||
className="item"
|
||||
tooltipMarkup={bind(item, "tooltipMarkup")}
|
||||
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>
|
||||
);
|
||||
|
||||
export default () => {
|
||||
let items = createBinding(tray, "items");
|
||||
|
||||
return (
|
||||
<box class="systray">
|
||||
<For each={items}>
|
||||
{(item, _) => {
|
||||
if (item.iconThemePath) app.add_icons(item.iconThemePath);
|
||||
return <TrayButton item={item} />;
|
||||
}}
|
||||
</For>
|
||||
</box>
|
||||
);
|
||||
};
|
||||
export default () => (
|
||||
<box className="systray">
|
||||
{bind(tray, "items").as((items) =>
|
||||
items.map((item) => {
|
||||
if (item.iconThemePath) App.add_icons(item.iconThemePath);
|
||||
return <TrayButton item={item} />;
|
||||
}),
|
||||
)}
|
||||
</box>
|
||||
);
|
||||
|
@@ -1,83 +1,74 @@
|
||||
import { bind, Variable } from "astal";
|
||||
import Hyprland from "gi://AstalHyprland";
|
||||
import { getHyprlandMonitor, range } from "../../lib";
|
||||
import {
|
||||
Accessor,
|
||||
createBinding,
|
||||
createComputed,
|
||||
createState,
|
||||
Setter,
|
||||
} from "ags";
|
||||
import { Gdk, Gtk } from "ags/gtk3";
|
||||
import { range } from "../../lib";
|
||||
|
||||
const hyprland = Hyprland.get_default();
|
||||
const BLOCK_SIZE = 10;
|
||||
|
||||
const Workspace = ({ id }: { id: number }) => {
|
||||
let clients: Accessor<string[]>;
|
||||
let setClients: Setter<string[]>;
|
||||
let clients: Variable<string[]>;
|
||||
|
||||
try {
|
||||
const workspace = hyprland.get_workspace(id);
|
||||
[clients, setClients] = createState(
|
||||
workspace.clients.map((client) => client.address),
|
||||
);
|
||||
clients = Variable(workspace.clients.map((client) => client.address));
|
||||
} catch (_) {
|
||||
[clients, setClients] = createState<string[]>([]);
|
||||
clients = Variable([]);
|
||||
}
|
||||
|
||||
const active = createComputed(
|
||||
[createBinding(hyprland, "focusedWorkspace")],
|
||||
const active = Variable.derive(
|
||||
[bind(hyprland, "focusedWorkspace")],
|
||||
(focused) => focused.id == id,
|
||||
);
|
||||
|
||||
hyprland.connect("workspace-added", (_, workspace) => {
|
||||
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) => {
|
||||
if (workspaceId != id) return;
|
||||
setClients([]);
|
||||
clients.set([]);
|
||||
});
|
||||
|
||||
hyprland.connect("client-added", (_hyprland, client) => {
|
||||
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) => {
|
||||
if (workspace.id == id) {
|
||||
setClients([...clients.get(), client.address]);
|
||||
clients.set([...clients.get(), client.address]);
|
||||
} else {
|
||||
setClients(
|
||||
clients.set(
|
||||
clients.get().filter((oldClient) => oldClient != client.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 (clients.length > 0) return "button occupied";
|
||||
return "button";
|
||||
});
|
||||
|
||||
return (
|
||||
<box orientation={Gtk.Orientation.VERTICAL}>
|
||||
<box vertical>
|
||||
<box vexpand />
|
||||
<eventbox onClickRelease={() => hyprland.dispatch("workspace", `${id}`)}>
|
||||
<label class={className} />
|
||||
<label className={className()} />
|
||||
</eventbox>
|
||||
<box vexpand />
|
||||
</box>
|
||||
);
|
||||
};
|
||||
|
||||
export default ({ gdkmonitor }: { gdkmonitor: Gdk.Monitor }) => {
|
||||
const monitor = getHyprlandMonitor(gdkmonitor)!;
|
||||
export default ({ monitor }: { monitor: Hyprland.Monitor }) => {
|
||||
const workspaces = hyprland.get_workspaces();
|
||||
const displayWorkspaces = workspaces.filter(
|
||||
(w) => w.monitor.id === monitor.id,
|
||||
@@ -87,7 +78,7 @@ export default ({ gdkmonitor }: { gdkmonitor: Gdk.Monitor }) => {
|
||||
|
||||
return (
|
||||
<eventbox
|
||||
class="workspaces"
|
||||
className="workspaces"
|
||||
onScroll={(_, e) => {
|
||||
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,
|
||||
lib,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
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,
|
||||
lib,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
@@ -82,6 +85,6 @@ in
|
||||
};
|
||||
|
||||
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, ... }:
|
||||
{
|
||||
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,
|
||||
lib,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
@@ -60,7 +63,6 @@ in
|
||||
"browser.bookmarks.restore_default_bookmarks" = false;
|
||||
"browser.bookmarks.showMobileBookmarks" = true;
|
||||
"browser.download.useDownloadDir" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.system.topstories" = false;
|
||||
"browser.toolbars.bookmarks.visibility" = "never";
|
||||
"browser.sessionstore.restore_on_demand" = true;
|
||||
"browser.sessionstore.restore_pinned_tabs_on_demand" = false;
|
||||
@@ -72,10 +74,10 @@ in
|
||||
"unified-extensions-area" = [
|
||||
"_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action"
|
||||
"sponsorblocker_ajay_app-browser-action"
|
||||
"_44df5123-f715-9146-bfaa-c6e8d4461d44_-browser-action"
|
||||
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
|
||||
"_aecec67f-0d10-4fa7-b7c7-609a2db280cf_-browser-action"
|
||||
"languagetool-webextension_languagetool_org-browser-action"
|
||||
"_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action"
|
||||
];
|
||||
"nav-bar" = [
|
||||
"sidebar-button"
|
||||
@@ -102,6 +104,7 @@ in
|
||||
};
|
||||
"seen" = [
|
||||
"wayback_machine_mozilla_org-browser-action"
|
||||
"_44df5123-f715-9146-bfaa-c6e8d4461d44_-browser-action"
|
||||
"addon_darkreader_org-browser-action"
|
||||
"ublock0_raymondhill_net-browser-action"
|
||||
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
|
||||
@@ -110,8 +113,6 @@ in
|
||||
"sponsorblocker_ajay_app-browser-action"
|
||||
"_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action"
|
||||
"developer-button"
|
||||
"_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action"
|
||||
"screenshot-button"
|
||||
];
|
||||
"dirtyAreaCache" = [
|
||||
"unified-extensions-area"
|
||||
@@ -142,7 +143,7 @@ in
|
||||
ublock-origin
|
||||
violentmonkey
|
||||
wayback-machine
|
||||
user-agent-string-switcher
|
||||
fakespot-fake-reviews-amazon
|
||||
];
|
||||
|
||||
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,
|
||||
lib,
|
||||
@@ -37,15 +40,16 @@ in
|
||||
home = {
|
||||
pointerCursor.gtk.enable = true;
|
||||
|
||||
file = {
|
||||
".icons/default/index.theme".enable = false;
|
||||
}
|
||||
// builtins.listToAttrs (
|
||||
builtins.map (name: {
|
||||
name = ".icons/${name}";
|
||||
value.enable = false;
|
||||
}) (hmConfig.theme.icon.names ++ hmConfig.theme.cursor.names)
|
||||
);
|
||||
file =
|
||||
{
|
||||
".icons/default/index.theme".enable = false;
|
||||
}
|
||||
// builtins.listToAttrs (
|
||||
builtins.map (name: {
|
||||
name = ".icons/${name}";
|
||||
value.enable = false;
|
||||
}) (hmConfig.theme.icon.names ++ hmConfig.theme.cursor.names)
|
||||
);
|
||||
};
|
||||
|
||||
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,
|
||||
lib,
|
||||
@@ -9,7 +12,10 @@
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
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_donation_nag = true;
|
||||
};
|
||||
|
||||
# FIXME: https://github.com/ValveSoftware/gamescope/issues/1825
|
||||
debug.full_cm_proto = true;
|
||||
};
|
||||
|
||||
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, ... }:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
@@ -21,12 +24,8 @@ in
|
||||
inherit (hmConfig.theme.font) size;
|
||||
};
|
||||
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
enable_audio_bell = false;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
confirm_os_window_close 0
|
||||
include theme.conf
|
||||
'';
|
||||
};
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
{
|
||||
boot = {
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
@@ -380,7 +383,7 @@ in
|
||||
];
|
||||
searchProvider = "google";
|
||||
geocodingApiMethod = "path";
|
||||
geocodingApiPath = hmConfig.sops.secrets."google/cloud/obsidian/geocoding".path;
|
||||
geocodingApiPath = hmConfig.sops.secrets."google/geocoding".path;
|
||||
useGooglePlaces = true;
|
||||
letZoomBeyondMax = true;
|
||||
showGeolinkPreview = true;
|
||||
@@ -608,6 +611,6 @@ in
|
||||
}
|
||||
) 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, ... }:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
|
@@ -1,4 +1,7 @@
|
||||
{ user, home }:
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user