mirror of
https://github.com/Cian-H/My_NixOS_Config.git
synced 2026-07-31 17:32:08 +01:00
Compare commits
196
Commits
c2ec4c2e8a
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7c424e7da | ||
|
|
330e48d09d | ||
|
|
5e58401b07 | ||
|
|
759b219c36 | ||
|
|
f1480817f9 | ||
|
|
ccb5714ecd | ||
|
|
9f328e3e73 | ||
|
|
e90109b4ee | ||
|
|
fe279323a0 | ||
|
|
36f3f5b4c1 | ||
|
|
39572de780 | ||
|
|
3a7fbf1cc8 | ||
|
|
2b95358efc | ||
|
|
f3830a1fe9 | ||
|
|
16ab94d392 | ||
|
|
9a4ee42bf5 | ||
|
|
ab9a7210eb | ||
|
|
d0300e49a0 | ||
|
|
37d453b59e | ||
|
|
dd2adf6b0d | ||
|
|
1a66a5db02 | ||
|
|
2020356adb | ||
|
|
7c772445dd | ||
|
|
bd2b503d32 | ||
|
|
30b7fc282d | ||
|
|
5c0bc90983 | ||
|
|
ba3bbc68a5 | ||
|
|
ad8a7e6f86 | ||
|
|
937987ccfc | ||
|
|
1f42aca2a1 | ||
|
|
7960f7bbcf | ||
|
|
5e2dbf7416 | ||
|
|
6e69ebcc88 | ||
|
|
66b9844813 | ||
|
|
bf33ed4d2e | ||
|
|
18675a4e52 | ||
|
|
544c9d66be | ||
|
|
b0cbb2ee91 | ||
|
|
c87e692006 | ||
|
|
1fc240fc4e | ||
|
|
5ada0d4411 | ||
|
|
2dfe47eb03 | ||
|
|
95a7f0f306 | ||
|
|
7962c7e7f4 | ||
|
|
251ca3907e | ||
|
|
8bf836e16a | ||
|
|
7996c72dfc | ||
|
|
5c741e2281 | ||
|
|
951fc52b68 | ||
|
|
2e9320fae9 | ||
|
|
7fe169b484 | ||
|
|
2cd03bb1b8 | ||
|
|
b9d4c24606 | ||
|
|
d66814459a | ||
|
|
47316a6976 | ||
|
|
3b712cab95 | ||
|
|
35aa494701 | ||
|
|
7016937b2a | ||
|
|
35e84f6a6a | ||
|
|
493906ebe7 | ||
|
|
06d4c9a21e | ||
|
|
745c9818ea | ||
|
|
28f5b1bf9e | ||
|
|
7fa03a75b1 | ||
|
|
07df506d57 | ||
|
|
2276038b4d | ||
|
|
3d3f75eab6 | ||
|
|
39a5ec7a62 | ||
|
|
c8a5cc0ed4 | ||
|
|
4a05717387 | ||
|
|
5b4d807c4b | ||
|
|
0417c3f49e | ||
|
|
1e58131f67 | ||
|
|
ae27fb0bf0 | ||
|
|
835caf855b | ||
|
|
e2df2e71ce | ||
|
|
b28cb8dcb9 | ||
|
|
0979c4403b | ||
|
|
98ae337bff | ||
|
|
ad6090477f | ||
|
|
f7fd552478 | ||
|
|
8cab147fa5 | ||
|
|
1598bdb509 | ||
|
|
8eb608e3c6 | ||
|
|
8aea16cb59 | ||
|
|
1cf295ea5b | ||
|
|
8d59eb6a33 | ||
|
|
3f1e8b5be9 | ||
|
|
541cf20b85 | ||
|
|
36f12af898 | ||
|
|
e715109bcc | ||
|
|
363969cc9e | ||
|
|
266eca6265 | ||
|
|
441d6f060c | ||
|
|
058241d80b | ||
|
|
33ba2634da | ||
|
|
1c9fe2bb23 | ||
|
|
aa7fb1a2c7 | ||
|
|
7995a87f71 | ||
|
|
4678cadd72 | ||
|
|
b2645b5996 | ||
|
|
894a5c9828 | ||
|
|
576e5cfffa | ||
|
|
2d44cda4de | ||
|
|
647cb5c098 | ||
|
|
3906a51581 | ||
|
|
69a1f4364b | ||
|
|
36c0541d61 | ||
|
|
1a5c582aca | ||
|
|
58950a3a81 | ||
|
|
4d5a66d21b | ||
|
|
96abb9ca7a | ||
|
|
ac37790efd | ||
|
|
8bc8cfeb7c | ||
|
|
cf2c5a4269 | ||
|
|
d7dfb807a6 | ||
|
|
acbe360b55 | ||
|
|
0f9cdba39f | ||
|
|
85a598dd06 | ||
|
|
6dd23701d7 | ||
|
|
4b1cfdd845 | ||
|
|
7cd07d90f2 | ||
|
|
077f266b51 | ||
|
|
c264f0867f | ||
|
|
e08fe8a195 | ||
|
|
c1200dcf1e | ||
|
|
cc9e3c1927 | ||
|
|
bc5be7c553 | ||
|
|
b4cc636160 | ||
|
|
9332df2a8d | ||
|
|
cf76e1f8c2 | ||
|
|
da05b15ff0 | ||
|
|
e24b3e722e | ||
|
|
cbcfd5c482 | ||
|
|
75705ebced | ||
|
|
2ce738fc0e | ||
|
|
c4d74f74b8 | ||
|
|
ea35fe339b | ||
|
|
3cf2747833 | ||
|
|
1b5084c36c | ||
|
|
62622d8484 | ||
|
|
af45dc34cf | ||
|
|
3d2516aa83 | ||
|
|
5d15ebe2d2 | ||
|
|
e8becbb9b4 | ||
|
|
25e607b05f | ||
|
|
11dbca9a25 | ||
|
|
705861861c | ||
|
|
af9e6c1f99 | ||
|
|
60c8c0e805 | ||
|
|
052957dda2 | ||
|
|
a99d56674a | ||
|
|
0ee99ecacc | ||
|
|
5961834ac1 | ||
|
|
43890000f1 | ||
|
|
c9dd770fe7 | ||
|
|
d25930beda | ||
|
|
2e1da650f1 | ||
|
|
1bed7f9a24 | ||
|
|
0bdb2cd9c7 | ||
|
|
a2ccb82883 | ||
|
|
313788b705 | ||
|
|
10f251232f | ||
|
|
da96083321 | ||
|
|
1e7dc1c592 | ||
|
|
973d334944 | ||
|
|
22bc6e1411 | ||
|
|
4a57caf66f | ||
|
|
f9ff10b687 | ||
|
|
bfb58ab2d1 | ||
|
|
845f148529 | ||
|
|
dbe307daa8 | ||
|
|
a6f9f11759 | ||
|
|
60c06f47f6 | ||
|
|
71ef3cd92e | ||
|
|
15a6a14b7e | ||
|
|
1c5319f82f | ||
|
|
0d644d769c | ||
|
|
1d8ce0dd02 | ||
|
|
0303c204e4 | ||
|
|
6bbff50ba0 | ||
|
|
82ef0d74d6 | ||
|
|
74a6017de2 | ||
|
|
0016ae4a8a | ||
|
|
4e68cd734b | ||
|
|
dadbcbb9ea | ||
|
|
9670b914e2 | ||
|
|
4f11e3f493 | ||
|
|
8296de917d | ||
|
|
a81bce828a | ||
|
|
7cb86d6f50 | ||
|
|
a62f8fdcf4 | ||
|
|
4375c0629b | ||
|
|
4286f74af8 | ||
|
|
ddd249b6df | ||
|
|
94e38cbe84 |
@@ -1 +1,2 @@
|
|||||||
nix.conf
|
nix.conf
|
||||||
|
.direnv
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
# **My NixOS Configuration ❄️**
|
||||||
|
|
||||||
|
This repository contains my personal declarative configuration for NixOS systems and Home Manager profiles. It uses **Nix Flakes** for reproducibility and dependency management.
|
||||||
|
|
||||||
|
## **🖥️ Hosts**
|
||||||
|
|
||||||
|
| Hostname | Type | Description | Key Features |
|
||||||
|
| :---- | :---- | :---- | :---- |
|
||||||
|
| **worklaptop** | Laptop | Personal workstation | Hyprland (UWSM), Nvidia Prime, Dev Tools, Gaming |
|
||||||
|
| **homeserver** | Server | Headless Homelab | Podman Containers, Caddy Reverse Proxy, Gitea, Nextcloud |
|
||||||
|
| **core** | Profile | Generic Home Manager config | Base CLI tools, Shell config, Dotfiles (Distro-agnostic) |
|
||||||
|
|
||||||
|
## **✨ Features**
|
||||||
|
|
||||||
|
* **Flakes:** Fully flake-enabled configuration.
|
||||||
|
* **Shell:** [Nushell](https://www.nushell.sh/) configured as the default user shell with carapace and starship integration.
|
||||||
|
* **Core Profile:** A core configuration is available for bootstrapping new machines or for use on non-NixOS Linux distributions, providing a consistent shell and CLI environment without system-level dependencies.
|
||||||
|
* **Window Manager:** Hyprland with uwsm (Universal Wayland Session Manager) on the laptop.
|
||||||
|
* **Secrets:** [Sops-nix](https://github.com/Mic92/sops-nix) implementation using Age encryption for managing sensitive data (API keys, database passwords).
|
||||||
|
* **Containers:** Declarative OCI containers using Podman (replacing Docker) for homeserver services.
|
||||||
|
* **Automation:** A justfile is included to simplify system updates and garbage collection.
|
||||||
|
* **Theming:** Centralized TokyoNight theme definition passed as specialArgs to Home Manager modules.
|
||||||
|
* **Dotfiles:** Dotfiles are managed via a git submodule mapped to home-manager/core/dotfiles.
|
||||||
|
|
||||||
|
## **📂 Structure**
|
||||||
|
|
||||||
|
.
|
||||||
|
├── .github/ \# GitHub Actions (Submodule sync)
|
||||||
|
├── flake.nix \# Entrypoint & Input definitions
|
||||||
|
├── flake.lock \# Pinned dependency versions
|
||||||
|
├── justfile \# Command runner for system maintenance
|
||||||
|
├── nixos/ \# System-level configurations
|
||||||
|
│ ├── core/ \# Shared system modules
|
||||||
|
│ ├── homeserver/ \# Server-specific hardware & services
|
||||||
|
│ └── worklaptop/ \# Laptop-specific hardware & services
|
||||||
|
├── home-manager/ \# User-level configurations
|
||||||
|
│ ├── core/ \# Shared user modules (dotfiles, shell, etc.)
|
||||||
|
│ ├── homeserver/ \# Server user config
|
||||||
|
│ └── worklaptop/ \# Laptop user config (Hyprland, Theming)
|
||||||
|
└── secrets.yaml \# Encrypted secrets (SOPS)
|
||||||
|
|
||||||
|
## **🚀 Bootstrap / Installation**
|
||||||
|
|
||||||
|
1. **Clone the repository:**
|
||||||
|
git clone \--recursive \[https://github.com/Cian-H/my\_nixos\_config.git\](https://github.com/Cian-H/my\_nixos\_config.git) /home/cianh/my\_nixos\_config
|
||||||
|
cd my\_nixos\_config
|
||||||
|
|
||||||
|
2. **Setup Secrets:**
|
||||||
|
Place your Age private key in the appropriate location (defined in home-manager/\<host\>.nix):
|
||||||
|
* Target: \~/.config/sops/age/keys.txt
|
||||||
|
3. **Apply Configuration:**
|
||||||
|
* **NixOS System:**
|
||||||
|
sudo nixos-rebuild switch \--flake .\#\<hostname\>
|
||||||
|
|
||||||
|
* **Home Manager (Specific Host):**
|
||||||
|
home-manager switch \--flake .\#cianh@\<hostname\>
|
||||||
|
|
||||||
|
* **Home Manager (Core/Generic):**
|
||||||
|
home-manager switch \--flake .\#cianh@core
|
||||||
|
|
||||||
|
## **🛠️ Management (Justfile)**
|
||||||
|
|
||||||
|
I use just to abstract away common nixos-rebuild and home-manager commands.
|
||||||
|
|
||||||
|
| Command | Description |
|
||||||
|
| :---- | :---- |
|
||||||
|
| just update | Updates both System and Home Manager (pulls git & updates flake). |
|
||||||
|
| just update-root | Updates only the NixOS system configuration. |
|
||||||
|
| just update-home | Updates only the Home Manager configuration. |
|
||||||
|
| just install-home | Installs the generic core Home Manager profile. |
|
||||||
|
| just quick-update | Rebuilds configuration *without* pulling git or updating flake inputs. |
|
||||||
|
| just cleanup \<days\> | Garbage collects generations older than \<days\> and optimizes store. |
|
||||||
|
| just repl | Opens a Nix REPL loaded with the flake context. |
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
\# Full system update
|
||||||
|
just update
|
||||||
|
|
||||||
|
\# Quick rebuild after changing a config file
|
||||||
|
just quick-update
|
||||||
|
|
||||||
|
## **🔒 Secrets Management**
|
||||||
|
|
||||||
|
Secrets are managed via sops-nix.
|
||||||
|
|
||||||
|
* **Config:** .sops.yaml
|
||||||
|
* **Key:** keys.txt (Age key)
|
||||||
|
|
||||||
|
To edit secrets:
|
||||||
|
|
||||||
|
sops home-manager/secrets.yaml
|
||||||
|
|
||||||
|
## **📦 Server Services (Homeserver)**
|
||||||
|
|
||||||
|
The homeserver runs services via Podman, orchestrated in home-manager/homeserver/containers.nix.
|
||||||
|
|
||||||
|
Key services include:
|
||||||
|
|
||||||
|
* **Proxy:** Caddy
|
||||||
|
* **Cloud:** Nextcloud (with Redis & MariaDB)
|
||||||
|
* **Code:** Gitea
|
||||||
|
* **Productivity:** Vikunja
|
||||||
|
* **Media:** Jellyfin
|
||||||
|
|
||||||
|
## **🔗 Submodules**
|
||||||
|
|
||||||
|
This repo uses a submodule for raw dotfiles.
|
||||||
|
|
||||||
|
* **Path:** home-manager/core/dotfiles
|
||||||
|
* **Source:** https://github.com/Cian-H/dotfiles.git
|
||||||
|
|
||||||
|
If the folder is empty, initialize it:
|
||||||
|
|
||||||
|
git submodule update \--init \--recursive
|
||||||
|
|
||||||
Generated
+359
-44
@@ -1,5 +1,79 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"antigravity-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1785225335,
|
||||||
|
"narHash": "sha256-xzUNPgjfG06GvFNiZq+68euMeP05xydLwSv1cuS8Gq4=",
|
||||||
|
"owner": "jacopone",
|
||||||
|
"repo": "antigravity-nix",
|
||||||
|
"rev": "ab4c80d1e6524389fb4ccc05744e9e617ef363c4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "jacopone",
|
||||||
|
"repo": "antigravity-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"elephant": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1770910218,
|
||||||
|
"narHash": "sha256-IyHoHbhLFuIgFG+n7dqHwJaXuNnRaEsxCfAsfudV1KY=",
|
||||||
|
"owner": "abenz1267",
|
||||||
|
"repo": "elephant",
|
||||||
|
"rev": "c354a596ec7a7e34e9c26478dc7ef9680bc23e6d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "abenz1267",
|
||||||
|
"repo": "elephant",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1767039857,
|
||||||
|
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -7,16 +81,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767910483,
|
"lastModified": 1785119570,
|
||||||
"narHash": "sha256-MOU5YdVu4DVwuT5ztXgQpPuRRBjSjUGIdUzOQr9iQOY=",
|
"narHash": "sha256-Rgs2xKnGLFWQscxUaXX07oyZeuMDOHEbqDOsgliLFGM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "82fb7dedaad83e5e279127a38ef410bcfac6d77c",
|
"rev": "d4fd24667c8cbef124bb70a20380cab75ec8474d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-25.11",
|
"ref": "release-26.05",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -24,16 +98,17 @@
|
|||||||
"home-manager_2": {
|
"home-manager_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"nixers-repo",
|
||||||
"zen-browser",
|
"zen-browser",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767104570,
|
"lastModified": 1771756436,
|
||||||
"narHash": "sha256-GKgwu5//R+cLdKysZjGqvUEEOGXXLdt93sNXeb2M/Lk=",
|
"narHash": "sha256-Tl2I0YXdhSTufGqAaD1ySh8x+cvVsEI1mJyJg12lxhI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e4e78a2cbeaddd07ab7238971b16468cc1d14daf",
|
"rev": "5bd3589390b431a63072868a90c0f24771ff4cbb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -44,7 +119,7 @@
|
|||||||
},
|
},
|
||||||
"hyprcursor-phinger": {
|
"hyprcursor-phinger": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763845612,
|
"lastModified": 1763845612,
|
||||||
@@ -60,7 +135,79 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixers-repo": {
|
||||||
|
"inputs": {
|
||||||
|
"elephant": "elephant",
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"hyprcursor-phinger": "hyprcursor-phinger",
|
||||||
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
"walker": "walker",
|
||||||
|
"zen-browser": "zen-browser"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1772125727,
|
||||||
|
"narHash": "sha256-J41Xm8ewrCn16r0bDtOX+qu+uhNiOp9EAvy4FJ6mhKY=",
|
||||||
|
"owner": "Cian-H",
|
||||||
|
"repo": "Nixers",
|
||||||
|
"rev": "918d6b2bf5fbe032fda2bf989e0716de4d68e057",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Cian-H",
|
||||||
|
"repo": "Nixers",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1764242076,
|
||||||
|
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1771369470,
|
||||||
|
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1785090369,
|
||||||
|
"narHash": "sha256-m0pDuRJG7EDo9ri+4Ksu83VsI+PlxNC9lNBfydejce4=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "624af665418d3c65d544145b4d34ad696439570e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1762977756,
|
"lastModified": 1762977756,
|
||||||
"narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=",
|
"narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=",
|
||||||
@@ -76,29 +223,13 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768127708,
|
"lastModified": 1771714954,
|
||||||
"narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=",
|
"narHash": "sha256-nhZJPnBavtu40/L2aqpljrfUNb2rxmWTmSjK2c9UKds=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38",
|
"rev": "afbbf774e2087c3d734266c22f96fca2e78d3620",
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1768242861,
|
|
||||||
"narHash": "sha256-F4IIxa5xDHjtrmMcayM8lHctUq1oGltfBQu2+oqDWP4=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "1327e798cb055f96f92685df444e9a2c326ab5ed",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -108,13 +239,45 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768032153,
|
"lastModified": 1768564909,
|
||||||
"narHash": "sha256-6kD1MdY9fsE6FgSwdnx29hdH2UcBKs3/+JJleMShuJg=",
|
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3146c6aa9995e7351a398e17470e15305e6e18ff",
|
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_5": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1785104993,
|
||||||
|
"narHash": "sha256-eKbrvPoAOFutbYMdbB3r5EQVmFxKv24iKqHPPUXA0gM=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "8623c4c20aa4ca2f5fb81510d2944066c3fb0d96",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-26.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_6": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1782175435,
|
||||||
|
"narHash": "sha256-EMzXKmnOtBQ2MnvpiNOm7E+kOMvdPrIKaeg52Tip2Uk=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "89570f24e97e614aa34aa9ab1c927b6578a43775",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -124,26 +287,72 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"noctalia": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"noctalia-qs": "noctalia-qs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1783017890,
|
||||||
|
"narHash": "sha256-bAzrtN0GDMH0dOZkgeI3zSxfFs2rdD3pMuzOxvTF0bs=",
|
||||||
|
"owner": "noctalia-dev",
|
||||||
|
"repo": "noctalia-shell",
|
||||||
|
"rev": "a48885b9fec485c903c955749a7da6e30147cd38",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "noctalia-dev",
|
||||||
|
"ref": "legacy-v4",
|
||||||
|
"repo": "noctalia-shell",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"noctalia-qs": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"noctalia",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems_4",
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1780799499,
|
||||||
|
"narHash": "sha256-YloRtLqJabzYUWvdLyh67zH4DZrR3kQj+dlQJwLPmPM=",
|
||||||
|
"owner": "noctalia-dev",
|
||||||
|
"repo": "noctalia-qs",
|
||||||
|
"rev": "f308426239665e3bc3d624014e9295b2ae2f58ff",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "noctalia-dev",
|
||||||
|
"repo": "noctalia-qs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"antigravity-nix": "antigravity-nix",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"hyprcursor-phinger": "hyprcursor-phinger",
|
"nixers-repo": "nixers-repo",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable_2",
|
||||||
"sops-nix": "sops-nix",
|
"noctalia": "noctalia",
|
||||||
"zen-browser": "zen-browser"
|
"sops-nix": "sops-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768271704,
|
"lastModified": 1783174389,
|
||||||
"narHash": "sha256-jJqlW8A3OZ5tYbXphF7U8P8g/3Cn8PPwPa4YlJ/9agg=",
|
"narHash": "sha256-aCWC8ngycU7OdJrU2+Je3qf+1a2ykuBvpPhZT/9tXMc=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "691b8b6713855d0fe463993867291c158472fc6f",
|
"rev": "f1406619a3884cd5c47992a70b8b35c9c0fcb4c9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -152,19 +361,125 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"noctalia",
|
||||||
|
"noctalia-qs",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1780220602,
|
||||||
|
"narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "db947814a175b7ca6ded66e21383d938df01c227",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"walker": {
|
||||||
|
"inputs": {
|
||||||
|
"elephant": [
|
||||||
|
"nixers-repo",
|
||||||
|
"elephant"
|
||||||
|
],
|
||||||
|
"nixpkgs": "nixpkgs_4",
|
||||||
|
"systems": "systems_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1771062828,
|
||||||
|
"narHash": "sha256-y1jBFFO0u+V21y3YldHZozrDwVJVrdC+o3c4M8/rasU=",
|
||||||
|
"owner": "abenz1267",
|
||||||
|
"repo": "walker",
|
||||||
|
"rev": "19b1104585305e0806b842af341630f72038a4b9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "abenz1267",
|
||||||
|
"repo": "walker",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"zen-browser": {
|
"zen-browser": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"nixers-repo",
|
||||||
"nixpkgs-unstable"
|
"nixpkgs-unstable"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768329214,
|
"lastModified": 1771876204,
|
||||||
"narHash": "sha256-ASI9j+Fgj7TzB4mj+IBIBrV5mH9P/D/vjKLyVDZWZOw=",
|
"narHash": "sha256-nTX+Qa3W+xsFxBl+lr4RsWvC4vgZocLt/qDeIvnf4+w=",
|
||||||
"owner": "0xc000022070",
|
"owner": "0xc000022070",
|
||||||
"repo": "zen-browser-flake",
|
"repo": "zen-browser-flake",
|
||||||
"rev": "2357b84ef617772c012397a7e8b4542bd5e4bab8",
|
"rev": "2f951adfab1f5a090fe5ea4c5eaf11efca7f1039",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -1,22 +1,33 @@
|
|||||||
{
|
{
|
||||||
description = "Cian-H's nix config";
|
description = "Cian-H's nix config";
|
||||||
|
|
||||||
|
# Add cachix binary cache to prevent massive compilation times
|
||||||
|
nixConfig = {
|
||||||
|
extra-substituters = ["https://noctalia.cachix.org"];
|
||||||
|
extra-trusted-public-keys = ["noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4="];
|
||||||
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Nixpkgs
|
# Nixpkgs
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||||
# Nixpkgs-unstable
|
# Nixpkgs-unstable
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
# Nixers
|
||||||
|
nixers-repo.url = "github:Cian-H/Nixers";
|
||||||
# Home manager
|
# Home manager
|
||||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
home-manager.url = "github:nix-community/home-manager/release-26.05";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
# Add sops for secret management
|
# Add sops for secret management
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
# add phinger hyprcursor flake
|
# Add Noctalia input
|
||||||
hyprcursor-phinger.url = "github:jappie3/hyprcursor-phinger";
|
noctalia = {
|
||||||
# add zen browser flake
|
url = "github:noctalia-dev/noctalia-shell/legacy-v4";
|
||||||
zen-browser = {
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
url = "github:0xc000022070/zen-browser-flake";
|
};
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
# Antigravity, for managing busywork and chores
|
||||||
|
antigravity-nix = {
|
||||||
|
url = "github:jacopone/antigravity-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -24,18 +35,28 @@
|
|||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixpkgs-unstable,
|
nixpkgs-unstable,
|
||||||
|
nixers-repo,
|
||||||
|
antigravity-nix,
|
||||||
home-manager,
|
home-manager,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
worklaptopTheme = pkgs: {
|
worklaptopTheme = {
|
||||||
theme = {
|
pkgs,
|
||||||
|
unstablePkgs,
|
||||||
|
nixers,
|
||||||
|
}: {
|
||||||
|
gtkTheme = {
|
||||||
name = "Tokyonight-Dark";
|
name = "Tokyonight-Dark";
|
||||||
package = pkgs.tokyonight-gtk-theme;
|
package = pkgs.tokyonight-gtk-theme;
|
||||||
};
|
};
|
||||||
|
qtTheme = {
|
||||||
|
name = "Kvantum-Tokyo-Night";
|
||||||
|
package = nixers.tokyonight-kvantum-theme;
|
||||||
|
};
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Tokyonight-Light";
|
name = "Papirus-Dark";
|
||||||
package = pkgs.tokyonight-gtk-theme;
|
package = pkgs.papirus-icon-theme;
|
||||||
};
|
};
|
||||||
cursorTheme = {
|
cursorTheme = {
|
||||||
name = "phinger-cursors-dark";
|
name = "phinger-cursors-dark";
|
||||||
@@ -52,6 +73,17 @@
|
|||||||
avatar = "/var/lib/AccountsService/icons/cianh";
|
avatar = "/var/lib/AccountsService/icons/cianh";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
# A temporary devshell for running system management functions
|
||||||
|
devShells."x86_64-linux".default = let
|
||||||
|
pkgs = import nixpkgs {system = "x86_64-linux";};
|
||||||
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
|
packages = [
|
||||||
|
pkgs.babashka
|
||||||
|
(pkgs.python3.withPackages (ps: with ps; [typer rich]))
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
@@ -66,10 +98,12 @@
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = let
|
||||||
inherit inputs outputs;
|
|
||||||
unstablePkgs = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
|
unstablePkgs = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||||
theme = worklaptopTheme pkgs;
|
nixers = inputs.nixers-repo.packages.x86_64-linux;
|
||||||
|
in {
|
||||||
|
inherit inputs outputs unstablePkgs nixers;
|
||||||
|
theme = worklaptopTheme {inherit pkgs unstablePkgs nixers;};
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./nixos/worklaptop.nix
|
./nixos/worklaptop.nix
|
||||||
@@ -79,6 +113,7 @@
|
|||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs outputs;
|
inherit inputs outputs;
|
||||||
unstablePkgs = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
|
unstablePkgs = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||||
|
nixers = inputs.nixers-repo.packages.x86_64-linux;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./nixos/homeserver.nix
|
./nixos/homeserver.nix
|
||||||
@@ -89,7 +124,7 @@
|
|||||||
# Standalone home-manager configuration entrypoint
|
# Standalone home-manager configuration entrypoint
|
||||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"cianh@core" = home-manager.lib.homeManagerConfiguration {
|
"cianh@core" = let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
# Home-manager requires 'pkgs' instance
|
# Home-manager requires 'pkgs' instance
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@@ -99,21 +134,25 @@
|
|||||||
allowUnfreePredicate = _: true;
|
allowUnfreePredicate = _: true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraSpecialArgs = {
|
in
|
||||||
inherit inputs outputs;
|
home-manager.lib.homeManagerConfiguration {
|
||||||
unstablePkgs = import nixpkgs-unstable {
|
inherit pkgs;
|
||||||
# We also need to do the same for unstable
|
extraSpecialArgs = {
|
||||||
system = "x86_64-linux";
|
inherit inputs outputs;
|
||||||
config = {
|
unstablePkgs = import nixpkgs-unstable {
|
||||||
allowUnfree = true;
|
# We also need to do the same for unstable
|
||||||
allowUnfreePredicate = _: true;
|
inherit (pkgs.stdenv.hostPlatform) system;
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowUnfreePredicate = _: true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
nixers = inputs.nixers-repo.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
};
|
};
|
||||||
|
modules = [
|
||||||
|
./home-manager/core.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
modules = [
|
|
||||||
./home-manager/core.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"cianh@worklaptop" = let
|
"cianh@worklaptop" = let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@@ -127,8 +166,7 @@
|
|||||||
home-manager.lib.homeManagerConfiguration {
|
home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = let
|
||||||
inherit inputs outputs;
|
|
||||||
unstablePkgs = import nixpkgs-unstable {
|
unstablePkgs = import nixpkgs-unstable {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
cudaSupport = true;
|
cudaSupport = true;
|
||||||
@@ -137,14 +175,18 @@
|
|||||||
allowUnfreePredicate = _: true;
|
allowUnfreePredicate = _: true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
theme = worklaptopTheme pkgs;
|
nixers = inputs.nixers-repo.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
antigravityPkgs = antigravity-nix.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
in {
|
||||||
|
inherit inputs outputs unstablePkgs nixers antigravityPkgs;
|
||||||
|
theme = worklaptopTheme {inherit pkgs unstablePkgs nixers;};
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
./home-manager/worklaptop.nix
|
./home-manager/worklaptop.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"cianh@homeserver" = home-manager.lib.homeManagerConfiguration {
|
"cianh@homeserver" = let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
# Home-manager requires 'pkgs' instance
|
# Home-manager requires 'pkgs' instance
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@@ -154,21 +196,25 @@
|
|||||||
allowUnfreePredicate = _: true;
|
allowUnfreePredicate = _: true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraSpecialArgs = {
|
in
|
||||||
inherit inputs outputs;
|
home-manager.lib.homeManagerConfiguration {
|
||||||
unstablePkgs = import nixpkgs-unstable {
|
inherit pkgs;
|
||||||
# We also need to do the same for unstable
|
extraSpecialArgs = {
|
||||||
system = "x86_64-linux";
|
inherit inputs outputs;
|
||||||
config = {
|
unstablePkgs = import nixpkgs-unstable {
|
||||||
allowUnfree = true;
|
# We also need to do the same for unstable
|
||||||
allowUnfreePredicate = _: true;
|
system = "x86_64-linux";
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowUnfreePredicate = _: true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
nixers = inputs.nixers-repo.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
};
|
};
|
||||||
|
modules = [
|
||||||
|
./home-manager/homeserver.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
modules = [
|
|
||||||
./home-manager/homeserver.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
./core/packages.nix
|
./core/packages.nix
|
||||||
./core/programs.nix
|
./core/programs.nix
|
||||||
./core/services.nix
|
./core/services.nix
|
||||||
inputs.hyprcursor-phinger.homeManagerModules.hyprcursor-phinger
|
inputs.nixers-repo.homeManagerModules.hyprcursor-phinger
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
|||||||
Submodule home-manager/core/dotfiles updated: e7cad927d2...2322e815d4
+145
-52
@@ -6,69 +6,161 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
unstablePkgs,
|
unstablePkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
home.file = {
|
noctaliaPlugins = [
|
||||||
".bashrc" = lib.mkIf (!config.programs.bash.enable) {
|
"keybind-cheatsheet"
|
||||||
source = ./dotfiles/dot_bashrc;
|
"privacy-indicator"
|
||||||
};
|
"screen-toolkit"
|
||||||
"nushell" = {
|
];
|
||||||
source = ./dotfiles/dot_config/nushell;
|
|
||||||
target = ".config/nushell/my_config";
|
makeNoctaliaEntries = plugin: let
|
||||||
recursive = true;
|
pluginSource = ./dotfiles/dot_config/noctalia/plugins-repo + "/${plugin}";
|
||||||
};
|
in {
|
||||||
"nvim" = {
|
name = "noctalia-plugin-${plugin}";
|
||||||
source = lib.cleanSourceWith {
|
value = {
|
||||||
src = ./dotfiles/dot_config/nvim;
|
source = pluginSource;
|
||||||
filter = name: type: let
|
target = ".config/noctalia/plugins/${plugin}";
|
||||||
baseName = baseNameOf name;
|
|
||||||
in
|
|
||||||
! (
|
|
||||||
(lib.hasPrefix "*/nvim/*" name)
|
|
||||||
|| (lib.hasPrefix "." baseName)
|
|
||||||
|| (lib.hasPrefix "devenv" baseName)
|
|
||||||
|| (lib.hasSuffix ".toml" baseName)
|
|
||||||
|| (lib.hasSuffix ".yml" baseName)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
target = ".config/nvim";
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
"pypoetry" = {
|
|
||||||
source = ./dotfiles/dot_config/pypoetry;
|
|
||||||
target = ".config/pypoetry";
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
"Thunar" = {
|
|
||||||
source = ./dotfiles/dot_config/Thunar;
|
|
||||||
target = ".config/Thunar";
|
|
||||||
};
|
|
||||||
"rye" = {
|
|
||||||
source = ./dotfiles/dot_config/.rye;
|
|
||||||
target = ".config/.rye";
|
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
noctaliaPluginFiles = builtins.listToAttrs (map makeNoctaliaEntries noctaliaPlugins);
|
||||||
|
|
||||||
|
customPluginsDir = ./dotfiles/dot_config/noctalia/plugins-custom;
|
||||||
|
customPlugins = builtins.attrNames (
|
||||||
|
lib.filterAttrs (name: type: type == "directory") (builtins.readDir customPluginsDir)
|
||||||
|
);
|
||||||
|
|
||||||
|
makeCustomEntries = plugin: {
|
||||||
|
name = "noctalia-custom-plugin-${plugin}";
|
||||||
|
value = {
|
||||||
|
source = customPluginsDir + "/${plugin}";
|
||||||
|
target = ".config/noctalia/plugins/${plugin}";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
customPluginFiles = builtins.listToAttrs (map makeCustomEntries customPlugins);
|
||||||
|
in {
|
||||||
|
home.file =
|
||||||
|
{
|
||||||
|
".bashrc".source = ./dotfiles/dot_bashrc;
|
||||||
|
".zshrc".source = ./dotfiles/dot_zshrc;
|
||||||
|
"nushell" = {
|
||||||
|
source = ./dotfiles/dot_config/nushell;
|
||||||
|
target = ".config/nushell/my_config";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"atuin" = {
|
||||||
|
source = ./dotfiles/dot_config/atuin;
|
||||||
|
target = ".config/atuin";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"fish" = {
|
||||||
|
source = ./dotfiles/dot_config/fish;
|
||||||
|
target = ".config/fish";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"nvim" = {
|
||||||
|
source = lib.cleanSourceWith {
|
||||||
|
src = ./dotfiles/dot_config/nvim;
|
||||||
|
filter = name: type: let
|
||||||
|
baseName = baseNameOf name;
|
||||||
|
in
|
||||||
|
! (
|
||||||
|
(lib.hasPrefix "*/nvim/*" name)
|
||||||
|
|| ((lib.hasPrefix "." baseName) && (baseName != ".hotpot.fnl"))
|
||||||
|
|| (lib.hasPrefix "devenv" baseName)
|
||||||
|
|| (lib.hasSuffix ".toml" baseName)
|
||||||
|
|| (lib.hasSuffix ".yml" baseName)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
target = ".config/nvim";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"helix" = {
|
||||||
|
source = lib.cleanSourceWith {
|
||||||
|
src = ./dotfiles/dot_config/helix;
|
||||||
|
filter = name: type: let
|
||||||
|
baseName = baseNameOf name;
|
||||||
|
in
|
||||||
|
! (
|
||||||
|
(lib.hasPrefix "*/helix/*" name)
|
||||||
|
|| (lib.hasPrefix "." baseName)
|
||||||
|
|| (lib.hasPrefix "devenv" baseName)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
target = ".config/helix";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"emacs" = {
|
||||||
|
source = lib.cleanSourceWith {
|
||||||
|
src = ./dotfiles/dot_config/emacs;
|
||||||
|
filter = name: type: let
|
||||||
|
baseName = baseNameOf name;
|
||||||
|
in
|
||||||
|
! (
|
||||||
|
(lib.hasPrefix "*/emacs/*" name)
|
||||||
|
|| (lib.hasPrefix "." baseName)
|
||||||
|
|| (lib.hasPrefix "devenv" baseName)
|
||||||
|
|| (lib.hasSuffix ".toml" baseName)
|
||||||
|
|| (lib.hasSuffix ".yml" baseName)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
target = ".config/emacs";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"noctalia" = {
|
||||||
|
source = lib.cleanSourceWith {
|
||||||
|
src = ./dotfiles/dot_config/noctalia;
|
||||||
|
filter = name: type: let
|
||||||
|
baseName = baseNameOf name;
|
||||||
|
in
|
||||||
|
! (
|
||||||
|
(lib.hasInfix "/plugins/" name)
|
||||||
|
|| (lib.hasInfix "/plugins-repo/" name)
|
||||||
|
|| (lib.hasInfix "/plugins-custom/" name)
|
||||||
|
# || (lib.hasInfix "/plugins-settings/" name)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
target = ".config/noctalia";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"noctalia-cli" = {
|
||||||
|
source = ./dotfiles/dot_local/bin/executable_noctalia-cli;
|
||||||
|
target = ".local/bin/noctalia-cli";
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
"pypoetry" = {
|
||||||
|
source = ./dotfiles/dot_config/pypoetry;
|
||||||
|
target = ".config/pypoetry";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"Thunar" = {
|
||||||
|
source = ./dotfiles/dot_config/Thunar;
|
||||||
|
target = ".config/Thunar";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// noctaliaPluginFiles
|
||||||
|
// customPluginFiles;
|
||||||
|
|
||||||
|
# Move across noctalia plugin settings as a writable overlay
|
||||||
|
home.activation.overlayNoctaliaSettings = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
|
mkdir -p "$HOME/.config/noctalia/plugins"
|
||||||
|
cp -rL --no-preserve=mode "$HOME/.config/noctalia/plugins-settings/"* "$HOME/.config/noctalia/plugins/"
|
||||||
|
'';
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"bat".source = ./dotfiles/dot_config/bat;
|
"bat".source = ./dotfiles/dot_config/bat;
|
||||||
|
"path.env".source = ./dotfiles/dot_config/path.env;
|
||||||
"fastfetch".source = ./dotfiles/dot_config/fastfetch;
|
"fastfetch".source = ./dotfiles/dot_config/fastfetch;
|
||||||
"helix".source = ./dotfiles/dot_config/helix;
|
|
||||||
"home-manager".source = ./dotfiles/dot_config/home-manager;
|
"home-manager".source = ./dotfiles/dot_config/home-manager;
|
||||||
"hypr" = {
|
"hypr".source = ./dotfiles/dot_config/hypr;
|
||||||
source = ./dotfiles/dot_config/hypr;
|
|
||||||
recursive = true;
|
|
||||||
# Here, we use OnChange, because we don't want the config to be mutable but we do want it to
|
|
||||||
# manage modifiable state at runtime
|
|
||||||
onChange = ''
|
|
||||||
rm -f ${config.xdg.configHome}/hypr/inputs.conf
|
|
||||||
cp ${config.xdg.configHome}/hypr/HomeManagerInit_inputs.conf ${config.xdg.configHome}/hypr/inputs.conf
|
|
||||||
chmod u+w ${config.xdg.configHome}/hypr/inputs.conf
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
"just".source = ./dotfiles/dot_config/just;
|
"just".source = ./dotfiles/dot_config/just;
|
||||||
"kitty".source = ./dotfiles/dot_config/kitty;
|
"kitty".source = ./dotfiles/dot_config/kitty;
|
||||||
"ghostty".source = ./dotfiles/dot_config/ghostty;
|
"ghostty".source = ./dotfiles/dot_config/ghostty;
|
||||||
"micro".source = ./dotfiles/dot_config/micro;
|
"micro".source = ./dotfiles/dot_config/micro;
|
||||||
|
"niri".source = ./dotfiles/dot_config/niri;
|
||||||
"nushell/lsp.nu".text = ''
|
"nushell/lsp.nu".text = ''
|
||||||
source ~/.config/nushell/my_config/lsp.nu
|
source ~/.config/nushell/my_config/lsp.nu
|
||||||
'';
|
'';
|
||||||
@@ -76,6 +168,8 @@
|
|||||||
"glow".source = ./dotfiles/dot_config/glow;
|
"glow".source = ./dotfiles/dot_config/glow;
|
||||||
"glamour".source = ./dotfiles/dot_config/glamour;
|
"glamour".source = ./dotfiles/dot_config/glamour;
|
||||||
"starship.toml".source = ./dotfiles/dot_config/starship.toml;
|
"starship.toml".source = ./dotfiles/dot_config/starship.toml;
|
||||||
|
"elephant/websearch.toml".source = ./dotfiles/dot_config/elephant/websearch.toml;
|
||||||
|
"walker".source = ./dotfiles/dot_config/walker;
|
||||||
"waybar".source = ./dotfiles/dot_config/waybar;
|
"waybar".source = ./dotfiles/dot_config/waybar;
|
||||||
# "euporie".source = ./dotfiles/dot_config/euporie;
|
# "euporie".source = ./dotfiles/dot_config/euporie;
|
||||||
"bottom".source = ./dotfiles/dot_config/bottom;
|
"bottom".source = ./dotfiles/dot_config/bottom;
|
||||||
@@ -88,7 +182,6 @@
|
|||||||
"hg".source = ./dotfiles/dot_config/hg;
|
"hg".source = ./dotfiles/dot_config/hg;
|
||||||
"stylua.toml".source = ./dotfiles/dot_config/stylua.toml;
|
"stylua.toml".source = ./dotfiles/dot_config/stylua.toml;
|
||||||
"electron-flags.conf".source = ./dotfiles/dot_config/electron-flags.conf;
|
"electron-flags.conf".source = ./dotfiles/dot_config/electron-flags.conf;
|
||||||
"Kvantum".source = ./dotfiles/dot_config/Kvantum;
|
|
||||||
"foot".source = ./dotfiles/dot_config/foot;
|
"foot".source = ./dotfiles/dot_config/foot;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,14 @@
|
|||||||
pkgs.git-extras
|
pkgs.git-extras
|
||||||
pkgs.git-credential-manager
|
pkgs.git-credential-manager
|
||||||
pkgs.meld
|
pkgs.meld
|
||||||
|
pkgs.statix
|
||||||
pkgs.unzip
|
pkgs.unzip
|
||||||
unstablePkgs.devenv
|
unstablePkgs.devenv
|
||||||
unstablePkgs.lazygit
|
unstablePkgs.lazygit
|
||||||
unstablePkgs.nixd
|
unstablePkgs.nixd
|
||||||
unstablePkgs.nushell
|
unstablePkgs.nushell
|
||||||
|
unstablePkgs.nh
|
||||||
|
unstablePkgs.nix-output-monitor
|
||||||
|
unstablePkgs.nvd
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,10 +18,14 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
package = pkgStream.nushell;
|
package = pkgStream.nushell;
|
||||||
plugins = with pkgStream.nushellPlugins; [
|
plugins = with pkgStream.nushellPlugins; [
|
||||||
|
# bson
|
||||||
|
# desktop_notifications
|
||||||
formats
|
formats
|
||||||
gstat
|
gstat
|
||||||
|
# highlight
|
||||||
polars
|
polars
|
||||||
query
|
query
|
||||||
|
# semver
|
||||||
];
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
source ~/.config/nushell/my_config/config.nu
|
source ~/.config/nushell/my_config/config.nu
|
||||||
@@ -31,6 +35,10 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
|
carapace = {
|
||||||
|
enable = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
};
|
||||||
zoxide = {
|
zoxide = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableNushellIntegration = true;
|
enableNushellIntegration = true;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
package = unstablePkgs.yazi;
|
package = unstablePkgs.yazi;
|
||||||
enableNushellIntegration = true;
|
enableNushellIntegration = true;
|
||||||
|
shellWrapperName = "y";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Manually place plugins for now, until home-manager updates for newer yazi versions
|
# Manually place plugins for now, until home-manager updates for newer yazi versions
|
||||||
@@ -19,17 +20,16 @@
|
|||||||
"yazi/theme.toml".source = ../dotfiles/dot_config/yazi/theme.toml;
|
"yazi/theme.toml".source = ../dotfiles/dot_config/yazi/theme.toml;
|
||||||
"yazi/yazi.toml".source = ../dotfiles/dot_config/yazi/yazi.toml;
|
"yazi/yazi.toml".source = ../dotfiles/dot_config/yazi/yazi.toml;
|
||||||
"yazi/plugins/chmod.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/chmod.yazi;
|
"yazi/plugins/chmod.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/chmod.yazi;
|
||||||
|
"yazi/plugins/clipboard.yazi".source = ../dotfiles/dot_config/yazi/plugins/clipboard.yazi;
|
||||||
"yazi/plugins/full-border.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/full-border.yazi;
|
"yazi/plugins/full-border.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/full-border.yazi;
|
||||||
"yazi/plugins/git.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/git.yazi;
|
"yazi/plugins/git.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/git.yazi;
|
||||||
"yazi/plugins/glow.yazi".source = ../dotfiles/dot_config/yazi/plugins/glow.yazi;
|
|
||||||
"yazi/plugins/hexyl.yazi".source = ../dotfiles/dot_config/yazi/plugins/hexyl.yazi;
|
|
||||||
"yazi/plugins/max-preview.yazi".source = ../dotfiles/dot_config/yazi/plugins/max-preview.yazi;
|
"yazi/plugins/max-preview.yazi".source = ../dotfiles/dot_config/yazi/plugins/max-preview.yazi;
|
||||||
"yazi/plugins/mime-ext.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/mime-ext.yazi;
|
"yazi/plugins/mime-ext.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/mime-ext.yazi;
|
||||||
"yazi/plugins/ouch.yazi".source = ../dotfiles/dot_config/yazi/plugins/ouch.yazi;
|
"yazi/plugins/ouch.yazi".source = ../dotfiles/dot_config/yazi/plugins/ouch.yazi;
|
||||||
|
"yazi/plugins/piper.yazi".source = ../dotfiles/dot_config/yazi/plugins/yazi-rs-plugins/piper.yazi;
|
||||||
"yazi/plugins/rich-preview.yazi".source = ../dotfiles/dot_config/yazi/plugins/rich-preview.yazi;
|
"yazi/plugins/rich-preview.yazi".source = ../dotfiles/dot_config/yazi/plugins/rich-preview.yazi;
|
||||||
"yazi/plugins/starship.yazi".source = ../dotfiles/dot_config/yazi/plugins/starship.yazi;
|
"yazi/plugins/starship.yazi".source = ../dotfiles/dot_config/yazi/plugins/starship.yazi;
|
||||||
"yazi/plugins/sudo.yazi".source = ../dotfiles/dot_config/yazi/plugins/sudo.yazi;
|
"yazi/plugins/sudo.yazi".source = ../dotfiles/dot_config/yazi/plugins/sudo.yazi;
|
||||||
"yazi/plugins/wl-clipboard.yazi".source = ../dotfiles/dot_config/yazi/plugins/wl-clipboard.yazi;
|
|
||||||
"yazi/flavors/tokyo-night.yazi".source = ../dotfiles/dot_config/yazi/flavors/tokyo-night.yazi;
|
"yazi/flavors/tokyo-night.yazi".source = ../dotfiles/dot_config/yazi/flavors/tokyo-night.yazi;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,5 +11,8 @@
|
|||||||
username = "cianh";
|
username = "cianh";
|
||||||
homeDirectory = "/home/cianh";
|
homeDirectory = "/home/cianh";
|
||||||
shell.enableNushellIntegration = true;
|
shell.enableNushellIntegration = true;
|
||||||
|
sessionPath = [
|
||||||
|
"$HOME/.local/bin"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./core.nix
|
./core.nix
|
||||||
./homeserver/packages.nix
|
./homeserver/packages.nix
|
||||||
./homeserver/programs.nix
|
|
||||||
./homeserver/containers.nix
|
./homeserver/containers.nix
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
];
|
];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/home/cianh/caddy/config:/etc/caddy"
|
"/home/cianh/caddy/config:/etc/caddy"
|
||||||
|
"${./caddy/Caddyfile.persistent}:/etc/caddy/Caddyfile.persistent:ro"
|
||||||
"/home/cianh/caddy/data:/data:Z"
|
"/home/cianh/caddy/data:/data:Z"
|
||||||
"/home/cianh/caddy/logs:/var/log/caddy"
|
"/home/cianh/caddy/logs:/var/log/caddy"
|
||||||
"/home/cianh/caddy/placeholder_site:/var/www/site:Z"
|
"/home/cianh/caddy/placeholder_site:/var/www/site:Z"
|
||||||
|
|||||||
@@ -0,0 +1,125 @@
|
|||||||
|
(web_analytics) {
|
||||||
|
log {
|
||||||
|
output file /var/log/caddy/access.log
|
||||||
|
format json
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
(security_headers) {
|
||||||
|
header {
|
||||||
|
X-Content-Type-Options "nosniff"
|
||||||
|
X-Frame-Options "SAMEORIGIN"
|
||||||
|
Referrer-Policy "no-referrer"
|
||||||
|
Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"
|
||||||
|
X-XSS-Protection "1; mode=block"
|
||||||
|
X-Permitted-Cross-Domain-Policies "none"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bulba.space {
|
||||||
|
root * /var/www/site
|
||||||
|
file_server
|
||||||
|
import web_analytics
|
||||||
|
import security_headers
|
||||||
|
}
|
||||||
|
|
||||||
|
freshrss.bulba.space {
|
||||||
|
reverse_proxy freshrss:80
|
||||||
|
import web_analytics
|
||||||
|
import security_headers
|
||||||
|
}
|
||||||
|
|
||||||
|
vikunja.bulba.space {
|
||||||
|
reverse_proxy vikunja:3456
|
||||||
|
import web_analytics
|
||||||
|
import security_headers
|
||||||
|
}
|
||||||
|
|
||||||
|
blog.bulba.space {
|
||||||
|
root * /var/www/blog
|
||||||
|
file_server
|
||||||
|
import web_analytics
|
||||||
|
import security_headers
|
||||||
|
}
|
||||||
|
|
||||||
|
gitea.bulba.space {
|
||||||
|
reverse_proxy gitea:3000
|
||||||
|
import web_analytics
|
||||||
|
import security_headers
|
||||||
|
}
|
||||||
|
|
||||||
|
jellyfin.bulba.space {
|
||||||
|
reverse_proxy jellyfin:8096
|
||||||
|
import web_analytics
|
||||||
|
import security_headers
|
||||||
|
}
|
||||||
|
|
||||||
|
nextcloud.bulba.space {
|
||||||
|
header {
|
||||||
|
X-Robots-Tag "noindex, nofollow"
|
||||||
|
}
|
||||||
|
|
||||||
|
request_body {
|
||||||
|
max_size 5GB
|
||||||
|
}
|
||||||
|
|
||||||
|
root * /var/www/nextcloud/
|
||||||
|
file_server
|
||||||
|
php_fastcgi nextcloud:9000 {
|
||||||
|
root /var/www/html/
|
||||||
|
|
||||||
|
# This is required to inform Nextcloud that it shouldn't be setting
|
||||||
|
# headers itself. That's the job of the reverse proxy
|
||||||
|
env modHeadersAvailable true
|
||||||
|
}
|
||||||
|
|
||||||
|
redir /.well-known/carddav /remote.php/dav 301 permanent
|
||||||
|
redir /.well-known/caldav /remote.php/dav 301 permanent
|
||||||
|
|
||||||
|
@forbidden {
|
||||||
|
path /.htaccess
|
||||||
|
path /data/*
|
||||||
|
path /config/*
|
||||||
|
path /db_structure
|
||||||
|
path /.xml
|
||||||
|
path /README
|
||||||
|
path /3rdparty/*
|
||||||
|
path /lib/*
|
||||||
|
path /templates/*
|
||||||
|
path /occ
|
||||||
|
path /console.php
|
||||||
|
}
|
||||||
|
respond @forbidden "Access Denied" 403 {
|
||||||
|
close
|
||||||
|
}
|
||||||
|
import web_analytics
|
||||||
|
import security_headers
|
||||||
|
}
|
||||||
|
|
||||||
|
metrics.bulba.space {
|
||||||
|
import security_headers
|
||||||
|
import web_analytics
|
||||||
|
basic_auth {
|
||||||
|
admin $2a$14$/pMYYzIlniwZgFO7IvNCveax0OXzRpzROnE5krjtiZi5OhECQwpNi
|
||||||
|
}
|
||||||
|
|
||||||
|
handle /ws* {
|
||||||
|
reverse_proxy goaccess:7890
|
||||||
|
}
|
||||||
|
|
||||||
|
handle {
|
||||||
|
root * /var/www/goaccess
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
collabora.bulba.space {
|
||||||
|
reverse_proxy https://nextcloud-collabora:9980 {
|
||||||
|
transport http {
|
||||||
|
tls
|
||||||
|
tls_insecure_skip_verify
|
||||||
|
}
|
||||||
|
}
|
||||||
|
import web_analytics
|
||||||
|
import security_headers
|
||||||
|
}
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
"/home/cianh/TV_Archive/jf_cache:/cache:Z"
|
"/home/cianh/TV_Archive/jf_cache:/cache:Z"
|
||||||
];
|
];
|
||||||
userNS = "keep-id";
|
userNS = "keep-id";
|
||||||
|
devices = [ "/dev/dri:/dev/dri" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
containers = {
|
containers = {
|
||||||
goaccess = {
|
goaccess = {
|
||||||
image = "docker.io/allinurl/goaccess:latest";
|
image = "docker.io/allinurl/goaccess:latest";
|
||||||
exec = "--output=/var/www/goaccess/index.html --log-file=/var/log/caddy/access.log --log-format=CADDY --tz=Europe/Dublin --anonymize-ip --real-time-html --ws-url=wss://metrics.bulba.space:443/ws --port=7890 --origin=metrics.bulba.space";
|
exec = "--output=/var/www/goaccess/index.html --log-file=/var/log/caddy/access.log --log-format=CADDY --tz=Europe/Dublin --anonymize-ip --real-time-html --ws-url=wss://metrics.bulba.space:443/ws --port=7890 --origin=https://metrics.bulba.space";
|
||||||
autoUpdate = "registry";
|
autoUpdate = "registry";
|
||||||
network = [
|
network = [
|
||||||
"proxy-net"
|
"proxy-net"
|
||||||
@@ -20,6 +20,13 @@
|
|||||||
"/home/cianh/caddy/logs:/var/log/caddy:Z"
|
"/home/cianh/caddy/logs:/var/log/caddy:Z"
|
||||||
"/home/cianh/goaccess/site:/var/www/goaccess"
|
"/home/cianh/goaccess/site:/var/www/goaccess"
|
||||||
];
|
];
|
||||||
|
extraConfig = {
|
||||||
|
Unit = {
|
||||||
|
After = "podman-caddy.service";
|
||||||
|
Requires = "podman-caddy.service";
|
||||||
|
PartOf = "podman-caddy.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,14 +27,15 @@
|
|||||||
MYSQL_DATABASE = "nextcloud";
|
MYSQL_DATABASE = "nextcloud";
|
||||||
MYSQL_USER = "nextcloud";
|
MYSQL_USER = "nextcloud";
|
||||||
MYSQL_PASSWORD = config.sops.secrets.nextcloud-db_password.path;
|
MYSQL_PASSWORD = config.sops.secrets.nextcloud-db_password.path;
|
||||||
|
REDIS_HOST = "nextcloud-redis";
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
"/home/cianh/Nextcloud/:/var/www/html"
|
"/home/cianh/Nextcloud/:/var/www/html"
|
||||||
];
|
];
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
Unit = {
|
Unit = {
|
||||||
After = "podman-nextcloud-db.service";
|
After = [ "podman-nextcloud-db.service" "podman-nextcloud-redis.service" ];
|
||||||
Requires = "podman-nextcloud-db.service";
|
Requires = [ "podman-nextcloud-db.service" "podman-nextcloud-redis.service" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -52,6 +53,11 @@
|
|||||||
"/home/cianh/nextcloud_db:/var/lib/mysql"
|
"/home/cianh/nextcloud_db:/var/lib/mysql"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
nextcloud-redis = {
|
||||||
|
image = "docker.io/library/redis:alpine";
|
||||||
|
autoUpdate = "registry";
|
||||||
|
network = ["nextcloud-net"];
|
||||||
|
};
|
||||||
nextcloud-collabora = {
|
nextcloud-collabora = {
|
||||||
image = "docker.io/collabora/code:latest";
|
image = "docker.io/collabora/code:latest";
|
||||||
autoUpdate = "registry";
|
autoUpdate = "registry";
|
||||||
@@ -59,9 +65,6 @@
|
|||||||
"nextcloud-net"
|
"nextcloud-net"
|
||||||
"proxy-net"
|
"proxy-net"
|
||||||
];
|
];
|
||||||
ports = [
|
|
||||||
"9980:9980"
|
|
||||||
];
|
|
||||||
environment = {
|
environment = {
|
||||||
username = "admin";
|
username = "admin";
|
||||||
password = config.sops.secrets.nextcloud-collabora_password.path;
|
password = config.sops.secrets.nextcloud-collabora_password.path;
|
||||||
@@ -72,4 +75,30 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.user.services.nextcloud-cron = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Nextcloud cron.php job";
|
||||||
|
Requires = [ "podman-nextcloud.service" ];
|
||||||
|
After = [ "podman-nextcloud.service" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.podman}/bin/podman exec --user www-data nextcloud php -f /var/www/html/cron.php";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.timers.nextcloud-cron = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Run Nextcloud cron.php every 5 minutes";
|
||||||
|
};
|
||||||
|
Timer = {
|
||||||
|
OnBootSec = "5m";
|
||||||
|
OnUnitActiveSec = "5m";
|
||||||
|
Unit = "nextcloud-cron.service";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
volumes = [
|
volumes = [
|
||||||
"/home/cianh/vikunja/files:/app/vikunja/files"
|
"/home/cianh/vikunja/files:/app/vikunja/files"
|
||||||
];
|
];
|
||||||
|
extraPodmanArgs = ["--userns=keep-id"];
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
Unit = {
|
Unit = {
|
||||||
After = "podman-vikunja-db.service";
|
After = "podman-vikunja-db.service";
|
||||||
@@ -70,7 +71,6 @@
|
|||||||
"/home/cianh/freshrss/data:/var/www/FreshRSS/data"
|
"/home/cianh/freshrss/data:/var/www/FreshRSS/data"
|
||||||
"/home/cianh/freshrss/extensions:/var/www/FreshRSS/extensions"
|
"/home/cianh/freshrss/extensions:/var/www/FreshRSS/extensions"
|
||||||
];
|
];
|
||||||
ports = ["3457:80"];
|
|
||||||
extraPodmanArgs = [
|
extraPodmanArgs = [
|
||||||
"--log-opt max-size=10m"
|
"--log-opt max-size=10m"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
unstablePkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
programs = {
|
|
||||||
bash.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -14,5 +14,6 @@
|
|||||||
./worklaptop/programs.nix
|
./worklaptop/programs.nix
|
||||||
./worklaptop/defaultapps.nix
|
./worklaptop/defaultapps.nix
|
||||||
./worklaptop/theming.nix
|
./worklaptop/theming.nix
|
||||||
|
inputs.nixers-repo.homeManagerModules.walker
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,50 @@
|
|||||||
unstablePkgs,
|
unstablePkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
xdg.mimeApps.defaultApplications = {
|
xdg.mimeApps = {
|
||||||
"inode/directory" = "thunar.desktop";
|
enable = true;
|
||||||
"application/zip" = "xarchiver.desktop";
|
defaultApplications = {
|
||||||
"text/html" = "zen.desktop";
|
# Directories and Archives
|
||||||
"x-scheme-handler/http" = "zen.desktop";
|
"inode/directory" = "thunar.desktop";
|
||||||
"x-scheme-handler/https" = "zen.desktop";
|
"application/zip" = "xarchiver.desktop";
|
||||||
"x-scheme-handler/about" = "zen.desktop";
|
|
||||||
"x-scheme-handler/unknown" = "zen.desktop";
|
# PDFs
|
||||||
|
"application/pdf" = "sioyek.desktop";
|
||||||
|
|
||||||
|
# Web Browser (Vivaldi)
|
||||||
|
"text/html" = "vivaldi-stable.desktop";
|
||||||
|
"x-scheme-handler/http" = "vivaldi-stable.desktop";
|
||||||
|
"x-scheme-handler/https" = "vivaldi-stable.desktop";
|
||||||
|
"x-scheme-handler/about" = "vivaldi-stable.desktop";
|
||||||
|
"x-scheme-handler/unknown" = "vivaldi-stable.desktop";
|
||||||
|
|
||||||
|
# Text and Code (Neovide)
|
||||||
|
"text/plain" = "neovide.desktop";
|
||||||
|
"text/markdown" = "neovide.desktop";
|
||||||
|
|
||||||
|
# TeX and LaTeX (TeXstudio)
|
||||||
|
"text/x-tex" = "texstudio.desktop";
|
||||||
|
"text/x-latex" = "texstudio.desktop";
|
||||||
|
|
||||||
|
# Images (imv)
|
||||||
|
"image/jpeg" = "imv.desktop";
|
||||||
|
"image/png" = "imv.desktop";
|
||||||
|
"image/gif" = "imv.desktop";
|
||||||
|
"image/webp" = "imv.desktop";
|
||||||
|
"image/svg+xml" = "imv.desktop";
|
||||||
|
"image/tiff" = "imv.desktop";
|
||||||
|
"image/bmp" = "imv.desktop";
|
||||||
|
|
||||||
|
# Office Files (OnlyOffice)
|
||||||
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = "onlyoffice-desktopeditors.desktop"; # .docx
|
||||||
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = "onlyoffice-desktopeditors.desktop"; # .xlsx
|
||||||
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation" = "onlyoffice-desktopeditors.desktop"; # .pptx
|
||||||
|
"application/msword" = "onlyoffice-desktopeditors.desktop"; # .doc
|
||||||
|
"application/vnd.ms-excel" = "onlyoffice-desktopeditors.desktop"; # .xls
|
||||||
|
"application/vnd.ms-powerpoint" = "onlyoffice-desktopeditors.desktop"; # .ppt
|
||||||
|
"application/vnd.oasis.opendocument.text" = "onlyoffice-desktopeditors.desktop"; # .odt
|
||||||
|
"application/vnd.oasis.opendocument.spreadsheet" = "onlyoffice-desktopeditors.desktop"; # .ods
|
||||||
|
"application/vnd.oasis.opendocument.presentation" = "onlyoffice-desktopeditors.desktop"; # .odp
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,41 +5,51 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
unstablePkgs,
|
unstablePkgs,
|
||||||
|
nixers,
|
||||||
|
antigravityPkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
# Patch vivaldi to ensure reliability on wayland
|
patchedQuarto = pkgs.quarto.overrideAttrs (oldAttrs: {
|
||||||
vivaldi-wayland = pkgs.symlinkJoin {
|
postPatch =
|
||||||
name = "vivaldi-wayland";
|
(oldAttrs.postPatch or "")
|
||||||
paths = [pkgs.vivaldi];
|
+ ''
|
||||||
buildInputs = [pkgs.makeWrapper];
|
substituteInPlace bin/quarto.js \
|
||||||
postBuild = ''
|
--replace-fail "syntax-highlighting" "highlight-style"
|
||||||
wrapProgram $out/bin/vivaldi \
|
'';
|
||||||
--set NIXOS_OZONE_WL 1 \
|
});
|
||||||
--add-flags "--ozone-platform=wayland --enable-features=UseOzonePlatform --ozone-platform-hint=auto"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
python = pkgs.python314.withPackages (
|
|
||||||
python-pkgs: [
|
|
||||||
python-pkgs.pkginfo
|
|
||||||
python-pkgs.setuptools
|
|
||||||
]
|
|
||||||
);
|
|
||||||
in {
|
in {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.bitwarden-desktop
|
pkgs.babashka
|
||||||
pkgs.blueman
|
unstablePkgs.bat-extras.batman
|
||||||
|
unstablePkgs.bat-extras.batdiff
|
||||||
|
unstablePkgs.bat-extras.batgrep
|
||||||
|
unstablePkgs.bat-extras.prettybat
|
||||||
|
unstablePkgs.blender
|
||||||
|
pkgs.broot
|
||||||
pkgs.clapper
|
pkgs.clapper
|
||||||
|
pkgs.cliphist
|
||||||
pkgs.distrobox
|
pkgs.distrobox
|
||||||
|
pkgs.dvc
|
||||||
pkgs.feh
|
pkgs.feh
|
||||||
|
unstablePkgs.gimp-with-plugins
|
||||||
|
pkgs.git-lfs
|
||||||
pkgs.go
|
pkgs.go
|
||||||
|
unstablePkgs.gurk-rs
|
||||||
pkgs.has
|
pkgs.has
|
||||||
pkgs.hyperfine
|
pkgs.hyperfine
|
||||||
pkgs.imagemagick
|
pkgs.imagemagick
|
||||||
|
pkgs.imv
|
||||||
|
unstablePkgs.inkscape
|
||||||
|
pkgs.jujutsu
|
||||||
|
unstablePkgs.krita
|
||||||
pkgs.kubectl
|
pkgs.kubectl
|
||||||
|
pkgs.lnav
|
||||||
pkgs.lynx
|
pkgs.lynx
|
||||||
pkgs.minikube
|
pkgs.minikube
|
||||||
unstablePkgs.mission-center
|
unstablePkgs.mission-center
|
||||||
pkgs.neovide
|
pkgs.neovide
|
||||||
|
unstablePkgs.nil
|
||||||
|
pkgs.nix-tree
|
||||||
pkgs.nodejs_24
|
pkgs.nodejs_24
|
||||||
pkgs.nwg-look
|
pkgs.nwg-look
|
||||||
unstablePkgs.obsidian
|
unstablePkgs.obsidian
|
||||||
@@ -49,33 +59,48 @@ in {
|
|||||||
unstablePkgs.podman-compose
|
unstablePkgs.podman-compose
|
||||||
unstablePkgs.podman-desktop
|
unstablePkgs.podman-desktop
|
||||||
unstablePkgs.podman-tui
|
unstablePkgs.podman-tui
|
||||||
|
pkgs.poppler
|
||||||
pkgs.popsicle
|
pkgs.popsicle
|
||||||
python
|
nixers.python-env
|
||||||
pkgs.smile
|
patchedQuarto
|
||||||
|
nixers.rbw-autofill
|
||||||
|
unstablePkgs.ruff
|
||||||
|
unstablePkgs.signal-desktop
|
||||||
|
pkgs.sioyek
|
||||||
|
unstablePkgs.sone
|
||||||
pkgs.sshs
|
pkgs.sshs
|
||||||
|
pkgs.texliveFull
|
||||||
|
pkgs.texstudio
|
||||||
|
unstablePkgs.ty
|
||||||
|
unstablePkgs.typst
|
||||||
unstablePkgs.uv
|
unstablePkgs.uv
|
||||||
pkgs.vial
|
pkgs.vial
|
||||||
vivaldi-wayland
|
nixers.vivaldi-wayland
|
||||||
|
unstablePkgs.visidata
|
||||||
pkgs.vivaldi-ffmpeg-codecs
|
pkgs.vivaldi-ffmpeg-codecs
|
||||||
|
nixers.walker-obsidian-search
|
||||||
pkgs.warpinator
|
pkgs.warpinator
|
||||||
pkgs.xarchiver
|
pkgs.xarchiver
|
||||||
pkgs.zathura
|
pkgs.yubikey-agent
|
||||||
pkgs.zettlr
|
pkgs.yubikey-manager
|
||||||
|
pkgs.zeal
|
||||||
unstablePkgs.zed-editor
|
unstablePkgs.zed-editor
|
||||||
unstablePkgs.zotero
|
unstablePkgs.zotero
|
||||||
inputs.zen-browser.packages.x86_64-linux.default
|
nixers.zen-browser
|
||||||
# theming
|
# theming
|
||||||
pkgs.adwaita-icon-theme
|
pkgs.adwaita-icon-theme
|
||||||
pkgs.gtk-engine-murrine
|
pkgs.gtk-engine-murrine
|
||||||
pkgs.gtk_engines
|
pkgs.gtk_engines
|
||||||
pkgs.hicolor-icon-theme
|
pkgs.hicolor-icon-theme
|
||||||
pkgs.phinger-cursors
|
|
||||||
pkgs.tokyonight-gtk-theme
|
|
||||||
# Backend dev tools
|
# Backend dev tools
|
||||||
pkgs.lua54Packages.lua
|
pkgs.lua54Packages.lua
|
||||||
pkgs.luajitPackages.luarocks
|
pkgs.luajitPackages.luarocks
|
||||||
pkgs.steam-run
|
pkgs.steam-run
|
||||||
pkgs.tree-sitter
|
pkgs.tree-sitter
|
||||||
unstablePkgs.vimPlugins.mason-lspconfig-nvim
|
unstablePkgs.vimPlugins.mason-lspconfig-nvim
|
||||||
|
# LLM Agentic DE
|
||||||
|
antigravityPkgs.google-antigravity-no-fhs
|
||||||
|
antigravityPkgs.google-antigravity-ide-no-fhs
|
||||||
|
antigravityPkgs.google-antigravity-cli
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,13 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
unstablePkgs,
|
unstablePkgs,
|
||||||
|
nixers,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
imports = [
|
||||||
|
inputs.noctalia.homeModules.default
|
||||||
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
nix-your-shell = {
|
nix-your-shell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -16,9 +21,17 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableNushellIntegration = true;
|
enableNushellIntegration = true;
|
||||||
};
|
};
|
||||||
waybar = {
|
noctalia-shell.enable = true;
|
||||||
|
walker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
runAsService = true;
|
||||||
|
};
|
||||||
|
rbw = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
email = "chughes000@gmail.com";
|
||||||
|
pinentry = nixers.rbw-autofill;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
hyprcursor-phinger.enable = true;
|
hyprcursor-phinger.enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,8 +8,26 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services = {
|
services = {
|
||||||
swaync.enable = true;
|
|
||||||
pueue.enable = true;
|
pueue.enable = true;
|
||||||
hyprpaper.enable = true;
|
};
|
||||||
|
# Custom version of ghostty service, to stop closing during update
|
||||||
|
systemd.user.services."app-com.mitchellh.ghostty" = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Ghostty Terminal Emulator";
|
||||||
|
X-SwitchMethod = "keep-old";
|
||||||
|
X-RestartIfChanged = false;
|
||||||
|
After = ["graphical-session.target"];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${lib.getExe config.programs.ghostty.package}";
|
||||||
|
Environment = "WAYLAND_DISPLAY=wayland-1";
|
||||||
|
Type = "notify";
|
||||||
|
ReloadSignal = "SIGUSR2";
|
||||||
|
KillMode = "mixed";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = ["graphical-session.target"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,16 +12,16 @@
|
|||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = theme.iconTheme.name;
|
inherit (theme.iconTheme) name;
|
||||||
package = theme.iconTheme.package;
|
inherit (theme.iconTheme) package;
|
||||||
};
|
};
|
||||||
theme = {
|
theme = {
|
||||||
name = theme.theme.name;
|
inherit (theme.gtkTheme) name;
|
||||||
package = theme.theme.package;
|
inherit (theme.gtkTheme) package;
|
||||||
};
|
};
|
||||||
cursorTheme = {
|
cursorTheme = {
|
||||||
name = theme.cursorTheme.name;
|
inherit (theme.cursorTheme) name;
|
||||||
package = theme.cursorTheme.package;
|
inherit (theme.cursorTheme) package;
|
||||||
};
|
};
|
||||||
gtk2.extraConfig = ''
|
gtk2.extraConfig = ''
|
||||||
gtk-theme-name="Tokyonight-Dark"
|
gtk-theme-name="Tokyonight-Dark"
|
||||||
@@ -33,19 +33,43 @@
|
|||||||
gtk-application-prefer-dark-theme=1
|
gtk-application-prefer-dark-theme=1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
gtk4.extraConfig = {
|
gtk4 = {
|
||||||
Settings = ''
|
inherit (config.gtk) theme;
|
||||||
gtk-application-prefer-dark-theme=1
|
extraConfig = {
|
||||||
'';
|
Settings = ''
|
||||||
|
gtk-application-prefer-dark-theme=1
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# QT theming
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "kvantum";
|
||||||
|
style.name = "kvantum";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."Kvantum/kvantum.kvconfig".text = ''
|
||||||
|
[General]
|
||||||
|
theme=${theme.qtTheme.name}
|
||||||
|
'';
|
||||||
|
|
||||||
# dconf theming settings
|
# dconf theming settings
|
||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
"org/gnome/desktop/interface" = {
|
"org/gnome/desktop/interface" = {
|
||||||
color-scheme = "prefer-dark";
|
color-scheme = "prefer-dark";
|
||||||
gtk-theme = theme.theme.name;
|
gtk-theme = theme.gtkTheme.name;
|
||||||
icon-theme = theme.iconTheme.name;
|
icon-theme = theme.iconTheme.name;
|
||||||
cursor-theme = theme.cursorTheme.name;
|
cursor-theme = theme.cursorTheme.name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Ensure theming packages are installed
|
||||||
|
home.packages = [
|
||||||
|
theme.gtkTheme.package
|
||||||
|
theme.qtTheme.package
|
||||||
|
theme.iconTheme.package
|
||||||
|
theme.cursorTheme.package
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,17 +4,55 @@ git := "true"
|
|||||||
flake := "true"
|
flake := "true"
|
||||||
flatpak := "true"
|
flatpak := "true"
|
||||||
|
|
||||||
|
# Show this interactive menu
|
||||||
default:
|
default:
|
||||||
@just --choose
|
@just --choose
|
||||||
|
|
||||||
_git-sync:
|
_git-sync:
|
||||||
git pull --recurse
|
@if [ -n "$(git status --porcelain)" ]; then \
|
||||||
git submodule update --remote --recursive
|
if git status --porcelain | grep -q "flake.lock"; then \
|
||||||
|
echo ">> flake.lock is dirty. Resetting to avoid pull conflicts..."; \
|
||||||
|
git checkout flake.lock; \
|
||||||
|
fi; \
|
||||||
|
if [ -n "$(git status --porcelain)" ]; then \
|
||||||
|
echo ">> Stashing remaining local changes..."; \
|
||||||
|
git stash; \
|
||||||
|
git pull --ff-only --recurse-submodules; \
|
||||||
|
git submodule update --remote --recursive; \
|
||||||
|
git stash pop; \
|
||||||
|
else \
|
||||||
|
git pull --ff-only --recurse-submodules; \
|
||||||
|
git submodule update --remote --recursive; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
git pull --ff-only --recurse-submodules; \
|
||||||
|
git submodule update --remote --recursive; \
|
||||||
|
fi
|
||||||
|
|
||||||
_flake-update:
|
_flake-update:
|
||||||
nix flake update
|
nix flake update
|
||||||
|
|
||||||
|
# Safely commit the lockfile changes
|
||||||
|
commit-lock:
|
||||||
|
git add flake.lock
|
||||||
|
git commit -m "chore: update flake.lock" || echo "No changes to commit"
|
||||||
|
|
||||||
|
# Sync git and update flake inputs (override with git=false or flake=false)
|
||||||
prebuild:
|
prebuild:
|
||||||
|
@if [ -n "$(git ls-files --others --exclude-standard)" ]; then \
|
||||||
|
echo "⚠️ WARNING: You have untracked files in your repository."; \
|
||||||
|
echo "Nix flakes cannot see untracked files. They will not be included in this build."; \
|
||||||
|
echo "The untracked files are:"; \
|
||||||
|
git ls-files --others --exclude-standard; \
|
||||||
|
echo ""; \
|
||||||
|
read -p "Do you want to run 'git add -A' before building? (y/N) " choice; \
|
||||||
|
if [[ "$choice" == [Yy]* ]]; then \
|
||||||
|
echo ">> Staging files..."; \
|
||||||
|
git add -A; \
|
||||||
|
else \
|
||||||
|
echo ">> Proceeding without staging. Untracked files will be ignored by Nix."; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
@if [ "{{git}}" == "true" ]; then \
|
@if [ "{{git}}" == "true" ]; then \
|
||||||
echo ">> Syncing Git..."; \
|
echo ">> Syncing Git..."; \
|
||||||
just _git-sync; \
|
just _git-sync; \
|
||||||
@@ -25,50 +63,35 @@ prebuild:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
_update-root:
|
_update-root:
|
||||||
if `/usr/bin/env grep -Rq "nixos" /etc/*-release`; then \
|
@if [ -f /etc/NIXOS ] && grep -q "nixos" /etc/os-release 2>/dev/null; then \
|
||||||
sudo nixos-rebuild switch --flake .?submodules=1#$HOSTNAME; \
|
sudo nixos-rebuild switch --flake .?submodules=1#$(hostname); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Rebuild and switch NixOS system configuration
|
||||||
update-root: prebuild _update-root
|
update-root: prebuild _update-root
|
||||||
|
|
||||||
|
# Install Home Manager standalone (useful for initial non-NixOS setup)
|
||||||
install-home:
|
install-home:
|
||||||
home-manager switch --flake .?submodules=1#$USER@core \
|
home-manager switch --flake .?submodules=1#$(whoami)@core \
|
||||||
--extra-experimental-features nix-command \
|
--extra-experimental-features nix-command \
|
||||||
--extra-experimental-features flakes
|
--extra-experimental-features flakes
|
||||||
|
|
||||||
_update-home:
|
_update-home:
|
||||||
home-manager switch --flake .?submodules=1#$USER@$HOSTNAME \
|
home-manager switch --flake .?submodules=1#$(whoami)@$(hostname) \
|
||||||
|| home-manager switch --flake .?submodules=1#$USER@core
|
|| home-manager switch --flake .?submodules=1#$(whoami)@core
|
||||||
|
|
||||||
|
# Rebuild and switch Home Manager configuration
|
||||||
update-home: prebuild _update-home
|
update-home: prebuild _update-home
|
||||||
|
|
||||||
quick-update-root:
|
# Quick update skipping git and flake syncs
|
||||||
just git=false flake=false update-root
|
|
||||||
|
|
||||||
quick-update-home:
|
|
||||||
just git=false flake=false update-home
|
|
||||||
|
|
||||||
quick-update:
|
quick-update:
|
||||||
just git=false flake=false update
|
just git=false flake=false update
|
||||||
|
|
||||||
nogit-update-root:
|
# Update the system without fetching the latest git commits
|
||||||
just git=false update-root
|
|
||||||
|
|
||||||
nogit-update-home:
|
|
||||||
just git=false update-home
|
|
||||||
|
|
||||||
nogit-update:
|
nogit-update:
|
||||||
just git=false update
|
just git=false update
|
||||||
|
|
||||||
noflake-update-root:
|
# Update and clean up Flatpak packages
|
||||||
just flake=false update-root
|
|
||||||
|
|
||||||
noflake-update-home:
|
|
||||||
just flake=false update-home
|
|
||||||
|
|
||||||
noflake-update:
|
|
||||||
just flake=false update
|
|
||||||
|
|
||||||
update-flatpaks:
|
update-flatpaks:
|
||||||
@if [ "{{flatpak}}" == "true" ] && command -v flatpak &> /dev/null; then \
|
@if [ "{{flatpak}}" == "true" ] && command -v flatpak &> /dev/null; then \
|
||||||
echo ">> Updating Flatpaks..."; \
|
echo ">> Updating Flatpaks..."; \
|
||||||
@@ -78,17 +101,25 @@ update-flatpaks:
|
|||||||
echo ">> Flatpak not found or disabled. Skipping."; \
|
echo ">> Flatpak not found or disabled. Skipping."; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# View the 5 most recent NixOS and Home Manager generations
|
||||||
history:
|
history:
|
||||||
@echo ">> System Generations:"
|
@echo ">> System Generations:"
|
||||||
@nix-env -p /nix/var/nix/profiles/system --list-generations | tail -n 5
|
@nix-env -p /nix/var/nix/profiles/system --list-generations | tail -n 5
|
||||||
@echo "\n>> Home Manager Generations:"
|
@echo "\n>> Home Manager Generations:"
|
||||||
@home-manager generations | head -n 5
|
@home-manager generations | head -n 5
|
||||||
|
|
||||||
|
# Open a Nix REPL loaded with the current flake
|
||||||
repl:
|
repl:
|
||||||
nix repl --file flake.nix
|
nix repl --file flake.nix
|
||||||
|
|
||||||
|
# Fully update the system, home-manager, and flatpaks
|
||||||
update: prebuild _update-root _update-home update-flatpaks
|
update: prebuild _update-root _update-home update-flatpaks
|
||||||
|
|
||||||
|
# Preview system changes without activating them
|
||||||
|
dry-run: prebuild
|
||||||
|
sudo nixos-rebuild dry-activate --flake .?submodules=1#$(hostname)
|
||||||
|
|
||||||
|
# Run Nix and Flatpak garbage collection. Optionally specify age (e.g., 'just cleanup 7d')
|
||||||
cleanup days="":
|
cleanup days="":
|
||||||
@if [ -n "{{days}}" ]; then \
|
@if [ -n "{{days}}" ]; then \
|
||||||
echo ">> Deleting system generations older than {{days}}..."; \
|
echo ">> Deleting system generations older than {{days}}..."; \
|
||||||
@@ -101,3 +132,15 @@ cleanup days="":
|
|||||||
echo ">> Cleaning unused Flatpaks..."; \
|
echo ">> Cleaning unused Flatpaks..."; \
|
||||||
flatpak uninstall --unused -y; \
|
flatpak uninstall --unused -y; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Open the editor (nvim, yazi, or heh) for a target
|
||||||
|
edit target:
|
||||||
|
@direnv exec . scripts/edit.py "{{target}}"
|
||||||
|
|
||||||
|
# Edit packages.nix for a specific system/user (run 'just packages help' for flags)
|
||||||
|
packages *flags:
|
||||||
|
@direnv exec . scripts/packages.bb {{flags}}
|
||||||
|
|
||||||
|
# Bootstrap a fresh system from the repo
|
||||||
|
bootstrap:
|
||||||
|
@direnv exec . scripts/bootstrap.py
|
||||||
|
|||||||
@@ -8,8 +8,7 @@
|
|||||||
}: {
|
}: {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.atuin
|
pkgs.atuin
|
||||||
pkgs.bat
|
unstablePkgs.bat
|
||||||
pkgs.bitwarden-cli
|
|
||||||
pkgs.bottom
|
pkgs.bottom
|
||||||
pkgs.delta
|
pkgs.delta
|
||||||
pkgs.dust
|
pkgs.dust
|
||||||
@@ -22,12 +21,15 @@
|
|||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.git-extras
|
pkgs.git-extras
|
||||||
pkgs.git-filter-repo
|
pkgs.git-filter-repo
|
||||||
|
pkgs.git-lfs
|
||||||
pkgs.glab
|
pkgs.glab
|
||||||
pkgs.glow
|
pkgs.glow
|
||||||
pkgs.gnupg
|
pkgs.gnupg
|
||||||
|
pkgs.heh
|
||||||
pkgs.hexyl
|
pkgs.hexyl
|
||||||
pkgs.killall
|
pkgs.killall
|
||||||
pkgs.libsecret
|
pkgs.libsecret
|
||||||
|
pkgs.luaPackages.fennel
|
||||||
pkgs.micro
|
pkgs.micro
|
||||||
pkgs.netcat-gnu
|
pkgs.netcat-gnu
|
||||||
pkgs.nix-index
|
pkgs.nix-index
|
||||||
@@ -37,16 +39,20 @@
|
|||||||
pkgs.passh
|
pkgs.passh
|
||||||
pkgs.pkg-config
|
pkgs.pkg-config
|
||||||
pkgs.pueue
|
pkgs.pueue
|
||||||
|
pkgs.rbw
|
||||||
pkgs.ripgrep
|
pkgs.ripgrep
|
||||||
pkgs.rm-improved
|
pkgs.rm-improved
|
||||||
pkgs.starship
|
pkgs.starship
|
||||||
pkgs.tealdeer
|
pkgs.tealdeer
|
||||||
|
pkgs.tree-sitter
|
||||||
pkgs.wget
|
pkgs.wget
|
||||||
pkgs.wl-clipboard
|
pkgs.wl-clipboard
|
||||||
|
pkgs.wtype
|
||||||
pkgs.xclip
|
pkgs.xclip
|
||||||
pkgs.xcp
|
pkgs.xcp
|
||||||
pkgs.zellij
|
pkgs.zellij
|
||||||
pkgs.zoxide
|
pkgs.zoxide
|
||||||
|
unstablePkgs.binsider
|
||||||
unstablePkgs.just
|
unstablePkgs.just
|
||||||
unstablePkgs.neovim
|
unstablePkgs.neovim
|
||||||
unstablePkgs.nushell
|
unstablePkgs.nushell
|
||||||
|
|||||||
@@ -9,4 +9,11 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./programs/neovim.nix
|
./programs/neovim.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.nh = {
|
||||||
|
enable = true;
|
||||||
|
clean.enable = true;
|
||||||
|
clean.extraArgs = "--keep-since 7d --keep 5";
|
||||||
|
flake = "/home/cianh/.config/nix";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,11 +50,6 @@
|
|||||||
nix = {
|
nix = {
|
||||||
registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||||
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "daily";
|
|
||||||
options = "--delete-older-than 14d";
|
|
||||||
};
|
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
@@ -79,6 +74,7 @@
|
|||||||
users.users = {
|
users.users = {
|
||||||
cianh = {
|
cianh = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
linger = true;
|
||||||
hashedPasswordFile = "/etc/hashedPasswordFile";
|
hashedPasswordFile = "/etc/hashedPasswordFile";
|
||||||
description = "Cian Hughes";
|
description = "Cian Hughes";
|
||||||
extraGroups = ["networkmanager" "wheel" "docker" "podman" "nixcfg"];
|
extraGroups = ["networkmanager" "wheel" "docker" "podman" "nixcfg"];
|
||||||
|
|||||||
@@ -1,32 +1,39 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
lib,
|
||||||
];
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
boot = {
|
||||||
boot.initrd.kernelModules = [ ];
|
initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
initrd.kernelModules = [];
|
||||||
boot.extraModulePackages = [ ];
|
kernelModules = ["kvm-intel"];
|
||||||
|
extraModulePackages = [];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems = {
|
||||||
{ device = "/dev/disk/by-uuid/b6757b17-330d-4820-a45f-bad5e7f06516";
|
"/" = {
|
||||||
|
device = "/dev/disk/by-uuid/b6757b17-330d-4820-a45f-bad5e7f06516";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
"/boot" = {
|
||||||
fileSystems."/boot" =
|
device = "/dev/disk/by-uuid/AAE3-7115";
|
||||||
{ device = "/dev/disk/by-uuid/AAE3-7115";
|
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
options = ["fmask=0077" "dmask=0077"];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [
|
||||||
[ { device = "/dev/disk/by-uuid/173de2f3-09e8-4175-9f52-c8b6ea970ad5"; }
|
{device = "/dev/disk/by-uuid/173de2f3-09e8-4175-9f52-c8b6ea970ad5";}
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|||||||
+16
-10
@@ -42,13 +42,13 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
nvidia = {
|
nvidia = {
|
||||||
|
branch = "legacy_535";
|
||||||
# Modesetting is required.
|
# Modesetting is required.
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
powerManagement.enable = false;
|
powerManagement.enable = false;
|
||||||
powerManagement.finegrained = false;
|
powerManagement.finegrained = false;
|
||||||
open = false;
|
open = false;
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
prime = {
|
prime = {
|
||||||
sync.enable = true;
|
sync.enable = true;
|
||||||
intelBusId = "PCI:0:2:0";
|
intelBusId = "PCI:0:2:0";
|
||||||
@@ -75,10 +75,15 @@
|
|||||||
blacklistedKernelModules = ["nouveau"];
|
blacklistedKernelModules = ["nouveau"];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "worklaptop"; # Define your hostname.
|
# Configure networking
|
||||||
|
networking = {
|
||||||
# Enable networking
|
hostName = "worklaptop"; # Define your hostname.
|
||||||
networking.networkmanager.enable = true;
|
wireless.iwd.enable = true;
|
||||||
|
networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
wifi.backend = "iwd";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Dublin";
|
time.timeZone = "Europe/Dublin";
|
||||||
@@ -101,11 +106,6 @@
|
|||||||
nix = {
|
nix = {
|
||||||
registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||||
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "daily";
|
|
||||||
options = "--delete-older-than 14d";
|
|
||||||
};
|
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
@@ -138,7 +138,13 @@
|
|||||||
stateVersion = "23.11"; # Did you read the comment?
|
stateVersion = "23.11"; # Did you read the comment?
|
||||||
autoUpgrade.enable = true;
|
autoUpgrade.enable = true;
|
||||||
autoUpgrade.dates = "weekly";
|
autoUpgrade.dates = "weekly";
|
||||||
|
activationScripts.diff = ''
|
||||||
|
if [[ -e /run/current-system ]]; then
|
||||||
|
${pkgs.nushell}/bin/nu -c "let diff_closure = (${pkgs.nix}/bin/nix store diff-closures /run/current-system '$systemConfig'); let table = (\$diff_closure | lines | where \$it =~ KiB | where \$it =~ → | parse -r '^(?<Package>\S+): (?<Old>[^,]+)(?:.*) → (?<New>[^,]+)(?:.*), (?<DiffBin>.*)$' | insert Diff { get DiffBin | ansi strip | into filesize } | sort-by -r Diff | reject DiffBin); if (\$table | get Diff | is-not-empty) { print \"\"; \$table | append [[Package Old New Diff]; [\"\" \"\" \"\" \"\"]] | append [[Package Old New Diff]; [\"\" \"\" \"Total:\" (\$table | get Diff | math sum) ]] | print; print \"\" }"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
zramSwap.enable = true; # enable RAM compression
|
||||||
|
|
||||||
# Set user config settings
|
# Set user config settings
|
||||||
users.defaultUserShell = unstablePkgs.nushell;
|
users.defaultUserShell = unstablePkgs.nushell;
|
||||||
|
|||||||
@@ -12,25 +12,27 @@
|
|||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
boot = {
|
||||||
boot.initrd.kernelModules = [];
|
initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||||
boot.kernelModules = ["kvm-intel"];
|
initrd.kernelModules = [];
|
||||||
boot.extraModulePackages = [];
|
kernelModules = ["kvm-intel"];
|
||||||
|
extraModulePackages = [];
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/1eec95dd-9663-4a46-8b6f-10f7754322fa";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot/efi" = {
|
fileSystems = {
|
||||||
device = "/dev/disk/by-uuid/056D-249D";
|
"/" = {
|
||||||
fsType = "vfat";
|
device = "/dev/disk/by-uuid/1eec95dd-9663-4a46-8b6f-10f7754322fa";
|
||||||
options = ["fmask=0022" "dmask=0022"];
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
"/boot/efi" = {
|
||||||
fileSystems."/home" = {
|
device = "/dev/disk/by-uuid/056D-249D";
|
||||||
device = "/dev/disk/by-uuid/92c16a05-22ad-436d-a6ca-37d5f0c2cc3d";
|
fsType = "vfat";
|
||||||
fsType = "ext4";
|
options = ["fmask=0022" "dmask=0022"];
|
||||||
|
};
|
||||||
|
"/home" = {
|
||||||
|
device = "/dev/disk/by-uuid/92c16a05-22ad-436d-a6ca-37d5f0c2cc3d";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
unstablePkgs,
|
unstablePkgs,
|
||||||
|
nixers,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
@@ -22,21 +23,17 @@
|
|||||||
pkgs.qmk_hid
|
pkgs.qmk_hid
|
||||||
pkgs.regreet
|
pkgs.regreet
|
||||||
pkgs.seahorse
|
pkgs.seahorse
|
||||||
|
nixers.walker
|
||||||
pkgs.wayland
|
pkgs.wayland
|
||||||
pkgs.wayland-utils
|
pkgs.wayland-utils
|
||||||
pkgs.xfce.thunar
|
pkgs.thunar
|
||||||
pkgs.xfce.tumbler
|
pkgs.tumbler
|
||||||
pkgs.xh
|
pkgs.xh
|
||||||
unstablePkgs.ghostty
|
unstablePkgs.ghostty
|
||||||
unstablePkgs.hyprland
|
unstablePkgs.hyprland
|
||||||
unstablePkgs.hyprlock
|
|
||||||
unstablePkgs.hyprpaper
|
|
||||||
unstablePkgs.hyprpicker
|
unstablePkgs.hyprpicker
|
||||||
unstablePkgs.hyprshot
|
unstablePkgs.hyprshot
|
||||||
unstablePkgs.kitty
|
unstablePkgs.kitty
|
||||||
unstablePkgs.libnotify
|
unstablePkgs.libnotify
|
||||||
unstablePkgs.swaynotificationcenter
|
|
||||||
unstablePkgs.waybar
|
|
||||||
unstablePkgs.wofi
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,23 +13,26 @@ in {
|
|||||||
programs = {
|
programs = {
|
||||||
uwsm = {
|
uwsm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
waylandCompositors.hyprland.binPath = lib.mkForce "/run/current-system/sw/bin/start-hyprland";
|
waylandCompositors.hyprland = {
|
||||||
|
binPath = lib.mkForce "/run/current-system/sw/bin/start-hyprland";
|
||||||
|
prettyName = "Hyprland";
|
||||||
|
comment = "Hyprland managed by UWSM";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
regreet = {
|
regreet = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = {
|
theme = {
|
||||||
name = theme.theme.name;
|
inherit (theme.gtkTheme) name;
|
||||||
package = theme.theme.package;
|
inherit (theme.gtkTheme) package;
|
||||||
};
|
};
|
||||||
cursorTheme = {
|
cursorTheme = {
|
||||||
name = theme.cursorTheme.name;
|
inherit (theme.cursorTheme) name;
|
||||||
package = theme.cursorTheme.package;
|
inherit (theme.cursorTheme) package;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
inherit (theme.iconTheme) name;
|
||||||
|
inherit (theme.iconTheme) package;
|
||||||
};
|
};
|
||||||
iconTheme.name = "Adwaita";
|
|
||||||
# iconTheme = {
|
|
||||||
# name = theme.iconTheme.name;
|
|
||||||
# package = theme.iconTheme.package;
|
|
||||||
# };
|
|
||||||
font = {
|
font = {
|
||||||
name = "Noto Sans";
|
name = "Noto Sans";
|
||||||
size = 16;
|
size = 16;
|
||||||
@@ -38,7 +41,10 @@ in {
|
|||||||
settings = {
|
settings = {
|
||||||
GTK.application_prefer_dark_theme = true;
|
GTK.application_prefer_dark_theme = true;
|
||||||
appearance.greeting_msg = "Hello ${username}, welcome back to '${config.networking.hostName}'!";
|
appearance.greeting_msg = "Hello ${username}, welcome back to '${config.networking.hostName}'!";
|
||||||
background.path = theme.wallpaper;
|
background = {
|
||||||
|
path = theme.wallpaper;
|
||||||
|
fit = "Cover";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hyprland = {
|
hyprland = {
|
||||||
@@ -52,9 +58,9 @@ in {
|
|||||||
thunar = {
|
thunar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.xfce.thunar-volman
|
pkgs.thunar-volman
|
||||||
pkgs.xfce.thunar-archive-plugin
|
pkgs.thunar-archive-plugin
|
||||||
pkgs.xfce.thunar-media-tags-plugin
|
pkgs.thunar-media-tags-plugin
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
xfconf.enable = true;
|
xfconf.enable = true;
|
||||||
@@ -104,5 +110,9 @@ in {
|
|||||||
enableSSHSupport = true;
|
enableSSHSupport = true;
|
||||||
};
|
};
|
||||||
virt-manager.enable = true;
|
virt-manager.enable = true;
|
||||||
|
yubikey-touch-detector = {
|
||||||
|
enable = true;
|
||||||
|
libnotify = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,12 +20,37 @@
|
|||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
resolved.enable = true;
|
||||||
|
upower.enable = true;
|
||||||
|
tuned.enable = true;
|
||||||
pulseaudio.enable = false;
|
pulseaudio.enable = false;
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
|
|
||||||
|
extraConfig.pipewire."99-high-res-audio" = {
|
||||||
|
"context.properties" = {
|
||||||
|
"default.clock.rate" = 48000;
|
||||||
|
"default.clock.allowed-rates" = [44100 48000 88200 96000 176400 192000];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wireplumber.extraConfig."10-high-res-audio" = {
|
||||||
|
"monitor.alsa.rules" = [
|
||||||
|
{
|
||||||
|
matches = [
|
||||||
|
{"node.name" = "~alsa_output.*";}
|
||||||
|
];
|
||||||
|
actions = {
|
||||||
|
update-props = {
|
||||||
|
"audio.format" = "S32LE";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gvfs.enable = true;
|
gvfs.enable = true;
|
||||||
@@ -42,6 +67,11 @@
|
|||||||
|
|
||||||
gnome.gnome-keyring.enable = true;
|
gnome.gnome-keyring.enable = true;
|
||||||
pcscd.enable = true;
|
pcscd.enable = true;
|
||||||
|
udev = {
|
||||||
|
packages = [
|
||||||
|
pkgs.yubikey-personalization
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Add custom services
|
# Add custom services
|
||||||
|
|||||||
@@ -6,11 +6,14 @@
|
|||||||
theme,
|
theme,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# GTK theming
|
# Session Variable for GTK
|
||||||
environment.sessionVariables.GTK_THEME = theme.theme.name;
|
environment.sessionVariables.GTK_THEME = theme.gtkTheme.name;
|
||||||
|
|
||||||
# Delegate QT theming to kvantum
|
# QT config
|
||||||
environment.sessionVariables.QT_STYLE_OVERRIDE = "kvantum";
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
style = "kvantum";
|
||||||
|
};
|
||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
fonts = {
|
fonts = {
|
||||||
@@ -50,5 +53,10 @@
|
|||||||
# Adwaita (i love gnome, but god damn is adwaita annoying on other DEs)
|
# Adwaita (i love gnome, but god damn is adwaita annoying on other DEs)
|
||||||
pkgs.adwaita-icon-theme
|
pkgs.adwaita-icon-theme
|
||||||
pkgs.libadwaita
|
pkgs.libadwaita
|
||||||
|
# My theme packages set at the top level
|
||||||
|
theme.gtkTheme.package
|
||||||
|
theme.qtTheme.package
|
||||||
|
theme.iconTheme.package
|
||||||
|
theme.cursorTheme.package
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Executable
+216
@@ -0,0 +1,216 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
import socket
|
||||||
|
import getpass
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
REPO_URL = "https://github.com/Cian-H/My_NixOS_Config"
|
||||||
|
TARGET_DIR = os.path.expanduser("~/.config/nix")
|
||||||
|
|
||||||
|
|
||||||
|
def command_exists(cmd: str) -> bool:
|
||||||
|
"""Check if a command is available on the system."""
|
||||||
|
return shutil.which(cmd) is not None
|
||||||
|
|
||||||
|
|
||||||
|
def check_preconditions(target_dir: str):
|
||||||
|
"""Ensure the system is in a valid state to begin bootstrapping."""
|
||||||
|
if not command_exists("git"):
|
||||||
|
print(
|
||||||
|
"Error: 'git' is not installed. Please install git before bootstrapping.",
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
if os.path.exists(target_dir):
|
||||||
|
print(
|
||||||
|
f"Error: {target_dir} already exists. Aborting bootstrap.", file=sys.stderr
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
def clone_repository(repo_url: str, target_dir: str):
|
||||||
|
"""Clone the configuration repository and enter the directory."""
|
||||||
|
print(f">> Cloning {repo_url} into {target_dir}...")
|
||||||
|
try:
|
||||||
|
subprocess.run(["git", "clone", "--recursive", repo_url, target_dir], check=True)
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
print("Error: Failed to clone repository.", file=sys.stderr)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
os.chdir(target_dir)
|
||||||
|
|
||||||
|
|
||||||
|
def detect_nixos() -> bool:
|
||||||
|
"""Check if the current host system is NixOS."""
|
||||||
|
if os.path.exists("/etc/os-release"):
|
||||||
|
with open("/etc/os-release", "r") as f:
|
||||||
|
if "ID=nixos" in f.read():
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def has_config(sys_name: str, is_nixos: bool) -> bool:
|
||||||
|
"""Determine if system configuration directories exist for the given hostname."""
|
||||||
|
has_nixos_dir = os.path.isdir(f"nixos/{sys_name}")
|
||||||
|
has_hm_dir = os.path.isdir(f"home-manager/{sys_name}")
|
||||||
|
return (has_nixos_dir and has_hm_dir) if is_nixos else has_hm_dir
|
||||||
|
|
||||||
|
|
||||||
|
def get_available_systems() -> list:
|
||||||
|
"""Discover existing system configurations in the repository."""
|
||||||
|
opts = set()
|
||||||
|
if os.path.exists("nixos"):
|
||||||
|
opts.update([d for d in os.listdir("nixos") if os.path.isdir(f"nixos/{d}")])
|
||||||
|
if os.path.exists("home-manager"):
|
||||||
|
opts.update(
|
||||||
|
[
|
||||||
|
d
|
||||||
|
for d in os.listdir("home-manager")
|
||||||
|
if os.path.isdir(f"home-manager/{d}")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Filter out base/core directories and hidden folders, then sort for consistent output
|
||||||
|
return sorted([o for o in opts if o not in ["core"] and not o.startswith(".")])
|
||||||
|
|
||||||
|
|
||||||
|
def setup_new_config(target_sys: str, target_dir: str, is_nixos: bool):
|
||||||
|
"""Create boilerplate directories for a missing system and open an editor."""
|
||||||
|
print(">> Creating directories...")
|
||||||
|
if is_nixos:
|
||||||
|
os.makedirs(f"nixos/{target_sys}", exist_ok=True)
|
||||||
|
os.makedirs(f"home-manager/{target_sys}", exist_ok=True)
|
||||||
|
|
||||||
|
if command_exists("yazi"):
|
||||||
|
print(">> Opening yazi. Please add your configs and exit yazi when finished.")
|
||||||
|
subprocess.run(["yazi", target_dir])
|
||||||
|
else:
|
||||||
|
print(
|
||||||
|
f">> Yazi not found. Please manually configure your files in {target_dir} in another terminal."
|
||||||
|
)
|
||||||
|
input("Press Enter when you have finished adding your configurations...")
|
||||||
|
|
||||||
|
|
||||||
|
def prompt_for_existing_config(current_sys: str, current_user: str) -> tuple[str, str]:
|
||||||
|
"""Prompt the user to select an existing configuration from the repo."""
|
||||||
|
opts = get_available_systems()
|
||||||
|
if not opts:
|
||||||
|
print(
|
||||||
|
"Error: No existing configurations found. Cannot proceed.", file=sys.stderr
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
print("\nAvailable systems:")
|
||||||
|
for o in opts:
|
||||||
|
print(f" - {o}")
|
||||||
|
|
||||||
|
chosen_sys = input(f"\nEnter system to use [default: {current_sys}]: ").strip()
|
||||||
|
if chosen_sys:
|
||||||
|
if chosen_sys not in opts:
|
||||||
|
print(f"Error: '{chosen_sys}' is not a valid option.")
|
||||||
|
sys.exit(1)
|
||||||
|
target_sys = chosen_sys
|
||||||
|
else:
|
||||||
|
target_sys = current_sys
|
||||||
|
# Failsafe: if they press enter, but the default hostname isn't actually a valid config
|
||||||
|
if target_sys not in opts:
|
||||||
|
print(
|
||||||
|
f"Error: Default '{target_sys}' is not in available systems. You must type a valid option."
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
chosen_user = input(
|
||||||
|
f"Enter user configuration to use [default: {current_user}]: "
|
||||||
|
).strip()
|
||||||
|
target_user = chosen_user if chosen_user else current_user
|
||||||
|
|
||||||
|
return target_sys, target_user
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_configuration(
|
||||||
|
target_sys: str, target_user: str, target_dir: str, is_nixos: bool
|
||||||
|
) -> tuple[str, str]:
|
||||||
|
"""Ensure a valid configuration target exists, prompting the user for resolution if necessary."""
|
||||||
|
if has_config(target_sys, is_nixos):
|
||||||
|
return target_sys, target_user
|
||||||
|
|
||||||
|
print(
|
||||||
|
f"\n>> Configuration for system '{target_sys}' (user: '{target_user}') not found."
|
||||||
|
)
|
||||||
|
ans = (
|
||||||
|
input("Do you want to create the missing directories now? [y/N]: ")
|
||||||
|
.strip()
|
||||||
|
.lower()
|
||||||
|
)
|
||||||
|
|
||||||
|
if ans == "y":
|
||||||
|
setup_new_config(target_sys, target_dir, is_nixos)
|
||||||
|
return target_sys, target_user
|
||||||
|
|
||||||
|
ans = (
|
||||||
|
input("Do you want to switch to one of the existing configs instead? [y/N]: ")
|
||||||
|
.strip()
|
||||||
|
.lower()
|
||||||
|
)
|
||||||
|
if ans == "y":
|
||||||
|
return prompt_for_existing_config(target_sys, target_user)
|
||||||
|
|
||||||
|
print(
|
||||||
|
"Error: Cannot proceed without a valid configuration. Aborting.",
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
def execute_installation(target_sys: str, target_user: str, is_nixos: bool):
|
||||||
|
"""Execute the final NixOS or Home Manager commands to build the system."""
|
||||||
|
print(
|
||||||
|
f"\n>> Proceeding with installation for user '{target_user}' on system '{target_sys}'..."
|
||||||
|
)
|
||||||
|
try:
|
||||||
|
if is_nixos:
|
||||||
|
print(
|
||||||
|
">> [NixOS detected] Performing full system and home-manager install..."
|
||||||
|
)
|
||||||
|
subprocess.run(
|
||||||
|
["sudo", "nixos-rebuild", "switch", "--flake", f".#{target_sys}"],
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
subprocess.run(
|
||||||
|
["home-manager", "switch", "--flake", f".#{target_user}@{target_sys}"],
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
print(">> [Non-NixOS detected] Performing home-manager install only...")
|
||||||
|
subprocess.run(
|
||||||
|
["home-manager", "switch", "--flake", f".#{target_user}@{target_sys}"],
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
print("\n>> Bootstrap complete! Welcome to your new environment.")
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print(f"\nError: Command '{' '.join(e.cmd)}' failed with exit status {e.returncode}.", file=sys.stderr)
|
||||||
|
sys.exit(e.returncode)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Main orchestration loop."""
|
||||||
|
check_preconditions(TARGET_DIR)
|
||||||
|
clone_repository(REPO_URL, TARGET_DIR)
|
||||||
|
|
||||||
|
is_nixos = detect_nixos()
|
||||||
|
hostname = socket.gethostname()
|
||||||
|
username = getpass.getuser()
|
||||||
|
|
||||||
|
# The returned tuple contains the final resolved system/user strings
|
||||||
|
final_sys, final_user = resolve_configuration(
|
||||||
|
hostname, username, TARGET_DIR, is_nixos
|
||||||
|
)
|
||||||
|
|
||||||
|
execute_installation(final_sys, final_user, is_nixos)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Executable
+43
@@ -0,0 +1,43 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import typer
|
||||||
|
import subprocess
|
||||||
|
from pathlib import Path
|
||||||
|
import mimetypes
|
||||||
|
|
||||||
|
|
||||||
|
def is_text_file(filepath: str):
|
||||||
|
mime_type, _ = mimetypes.guess_type(filepath)
|
||||||
|
if mime_type:
|
||||||
|
return mime_type.startswith("text/")
|
||||||
|
|
||||||
|
try:
|
||||||
|
with open(filepath, "rb") as f:
|
||||||
|
chunk = f.read(1024)
|
||||||
|
if b"\0" in chunk:
|
||||||
|
return False # Null bytes usually mean binary
|
||||||
|
return True
|
||||||
|
except IsADirectoryError:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
app = typer.Typer()
|
||||||
|
|
||||||
|
|
||||||
|
@app.command()
|
||||||
|
def edit(target: Path = typer.Argument(..., help="File or directory to edit")):
|
||||||
|
if not target.exists():
|
||||||
|
subprocess.run(["nvim", str(target)])
|
||||||
|
return
|
||||||
|
|
||||||
|
if target.is_dir():
|
||||||
|
subprocess.run(["yazi", str(target)])
|
||||||
|
return
|
||||||
|
|
||||||
|
if is_text_file(str(target)):
|
||||||
|
subprocess.run(["nvim", str(target)])
|
||||||
|
else:
|
||||||
|
subprocess.run(["heh", str(target)])
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app()
|
||||||
Executable
+50
@@ -0,0 +1,50 @@
|
|||||||
|
#!/usr/bin/env bb
|
||||||
|
|
||||||
|
(require '[babashka.cli :as cli]
|
||||||
|
'[babashka.fs :as fs]
|
||||||
|
'[babashka.process :refer [shell]]
|
||||||
|
'[clojure.string :as str])
|
||||||
|
|
||||||
|
(defn get-hostname []
|
||||||
|
(let [env-host (System/getenv "HOSTNAME")
|
||||||
|
etc-host (try (str/trim (slurp "/etc/hostname")) (catch Exception _ nil))
|
||||||
|
java-host (try (.getHostName (java.net.InetAddress/getLocalHost)) (catch Exception _ nil))]
|
||||||
|
(first (remove str/blank? [env-host etc-host java-host "default-system"]))))
|
||||||
|
|
||||||
|
(def cli-spec
|
||||||
|
{:spec {:home {:coerce :boolean :desc "Edit home-manager config instead of NixOS config"}
|
||||||
|
:sys {:desc "Specify system (defaults to current hostname)"}
|
||||||
|
:user {:default (System/getProperty "user.name")
|
||||||
|
:desc "Specify user (defaults to current user)"}
|
||||||
|
:update {:coerce :boolean :default true
|
||||||
|
:desc "Run auto-update after editing"}
|
||||||
|
:help {:alias :h :coerce :boolean :desc "Show this help message"}}})
|
||||||
|
|
||||||
|
(let [opts (cli/parse-opts *command-line-args* cli-spec)]
|
||||||
|
|
||||||
|
(when (:help opts)
|
||||||
|
(println "Usage: just packages [OPTIONS]")
|
||||||
|
(println (cli/format-opts cli-spec))
|
||||||
|
(System/exit 0))
|
||||||
|
|
||||||
|
(let [sys (let [s (:sys opts)]
|
||||||
|
(if (str/blank? s) (get-hostname) s))
|
||||||
|
target (if (:home opts)
|
||||||
|
(str "home-manager/" sys "/packages.nix")
|
||||||
|
(str "nixos/" sys "/packages.nix"))]
|
||||||
|
|
||||||
|
(if-not (fs/exists? target)
|
||||||
|
(do
|
||||||
|
(binding [*out* *err*]
|
||||||
|
(println (str ">> Error: Target file does not exist: " target))
|
||||||
|
(println ">> Please ensure this system profile has been bootstrapped or configured first."))
|
||||||
|
(System/exit 1))
|
||||||
|
(do
|
||||||
|
(println ">> Editing" target "...")
|
||||||
|
(shell "just" "edit" target)
|
||||||
|
|
||||||
|
(if (:update opts)
|
||||||
|
(do
|
||||||
|
(println ">> Applying updates...")
|
||||||
|
(shell "just" "quick-update"))
|
||||||
|
(println ">> Skipping update (no-update provided)."))))))
|
||||||
Reference in New Issue
Block a user