diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..5626bcd
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,19 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
+software, either in source code form or as a compiled binary, for any purpose,
+commercial or non-commercial, and by any means.
+
+In jurisdictions that recognize copyright laws, the author or authors of this
+software dedicate any and all copyright interest in the software to the public
+domain. We make this dedication for the benefit of the public at large and to
+the detriment of our heirs and successors. We intend this dedication to be an
+overt act of relinquishment in perpetuity of all present and future rights to
+this software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..2eb75c9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,21 @@
+# My nix flake for my systems
+
+## Commands
+
+### Show the output of the flake
+
+```sh
+nix flake show
+```
+
+### Create install iso
+
+```sh
+nix build .#install-isoConfigurations.minimal
+```
+
+## Inpirations
+
+- [dafitt/dotfiles](https://github.com/dafitt/dotfiles/)
+- [khaneliman/khanelinix](https://github.com/khaneliman/khanelinix)
+- [hmajid2301/nixicle](https://gitlab.com/hmajid2301/nixicle) (the GOAT, he did what I am aiming for!)
\ No newline at end of file
diff --git a/secrets/secrets.yaml b/_secrets/secrets.yaml
similarity index 100%
rename from secrets/secrets.yaml
rename to _secrets/secrets.yaml
diff --git a/flake.lock b/flake.lock
index 87de250..1935971 100644
--- a/flake.lock
+++ b/flake.lock
@@ -37,11 +37,11 @@
"base16-helix": {
"flake": false,
"locked": {
- "lastModified": 1748408240,
- "narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=",
+ "lastModified": 1752979451,
+ "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=",
"owner": "tinted-theming",
"repo": "base16-helix",
- "rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e",
+ "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac",
"type": "github"
},
"original": {
@@ -73,11 +73,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
- "lastModified": 1749911151,
- "narHash": "sha256-nQ+bDURW2sP3DdEPw5X0UsaHArDgzH2+gHdJAolurXU=",
+ "lastModified": 1753879613,
+ "narHash": "sha256-oYhCJSAIZiu3maM2q6JBzh0+MYd4KTaq5eNFIstUurE=",
"owner": "emmanuelrosa",
"repo": "erosanix",
- "rev": "2d1aef5159a5a67a14ae5903a6b5aa21af69faee",
+ "rev": "0ad38bd182cd737f0f4b878ea04cb3676ecd4000",
"type": "github"
},
"original": {
@@ -94,11 +94,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
- "lastModified": 1750487788,
- "narHash": "sha256-79O83W9osY3wyvxZHqL0gw85tcACSX0TU5en3+dky/0=",
+ "lastModified": 1753944209,
+ "narHash": "sha256-dcGdqxhRRGoA/S38BsWOrwIiLYEBOqXKauHdFwKR310=",
"owner": "nix-community",
"repo": "fenix",
- "rev": "933bc78d45abaf764dbfe0fd117be981631f3e9a",
+ "rev": "5ef8607d6e8a08cfb3946aaacaa0494792adf4ae",
"type": "github"
},
"original": {
@@ -114,11 +114,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
- "lastModified": 1750004387,
- "narHash": "sha256-5NhN7NYyPI4q9hZhrVV3jN5Y/stVePUihGlclPT1K8c=",
+ "lastModified": 1753960679,
+ "narHash": "sha256-q82/pjksNMev2AJqK1v38BcK29kB2f7yB2GTEsrlR2M=",
"owner": "nix-community",
"repo": "flake-firefox-nightly",
- "rev": "dd885d03a55568a59a9c2874c3b03098c078d9eb",
+ "rev": "c709bb72ee604949ff54df9519dc6cb0c6040007",
"type": "github"
},
"original": {
@@ -191,12 +191,29 @@
}
},
"flake-compat_4": {
+ "flake": false,
"locked": {
- "lastModified": 1747046372,
- "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
+ "lastModified": 1751685974,
+ "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=",
+ "ref": "refs/heads/main",
+ "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1",
+ "revCount": 92,
+ "type": "git",
+ "url": "https://git.lix.systems/lix-project/flake-compat.git"
+ },
+ "original": {
+ "type": "git",
+ "url": "https://git.lix.systems/lix-project/flake-compat.git"
+ }
+ },
+ "flake-compat_5": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1650374568,
+ "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
- "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
+ "rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
@@ -207,14 +224,17 @@
},
"flake-parts": {
"inputs": {
- "nixpkgs-lib": "nixpkgs-lib_2"
+ "nixpkgs-lib": [
+ "nvf",
+ "nixpkgs"
+ ]
},
"locked": {
- "lastModified": 1749398372,
- "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
+ "lastModified": 1753121425,
+ "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
+ "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e",
"type": "github"
},
"original": {
@@ -231,11 +251,11 @@
]
},
"locked": {
- "lastModified": 1743550720,
- "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
+ "lastModified": 1751413152,
+ "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "c621e8422220273271f52058f618c94e405bb0f5",
+ "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
"type": "github"
},
"original": {
@@ -262,6 +282,25 @@
"type": "github"
}
},
+ "flake-utils-plus": {
+ "inputs": {
+ "flake-utils": "flake-utils_4"
+ },
+ "locked": {
+ "lastModified": 1715533576,
+ "narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
+ "owner": "gytis-ivaskevicius",
+ "repo": "flake-utils-plus",
+ "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
+ "type": "github"
+ },
+ "original": {
+ "owner": "gytis-ivaskevicius",
+ "repo": "flake-utils-plus",
+ "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
+ "type": "github"
+ }
+ },
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
@@ -300,14 +339,14 @@
},
"flake-utils_4": {
"inputs": {
- "systems": "systems_4"
+ "systems": "systems_5"
},
"locked": {
- "lastModified": 1731533236,
- "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+ "lastModified": 1694529238,
+ "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+ "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
@@ -350,71 +389,41 @@
"type": "github"
}
},
- "git-hooks": {
- "inputs": {
- "flake-compat": [
- "stylix",
- "flake-compat"
- ],
- "gitignore": "gitignore",
- "nixpkgs": [
- "stylix",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1747372754,
- "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
- "owner": "cachix",
- "repo": "git-hooks.nix",
- "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
- "type": "github"
- },
- "original": {
- "owner": "cachix",
- "repo": "git-hooks.nix",
- "type": "github"
- }
- },
- "gitignore": {
- "inputs": {
- "nixpkgs": [
- "stylix",
- "git-hooks",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1709087332,
- "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
- "owner": "hercules-ci",
- "repo": "gitignore.nix",
- "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
- "type": "github"
- },
- "original": {
- "owner": "hercules-ci",
- "repo": "gitignore.nix",
- "type": "github"
- }
- },
"gnome-shell": {
"flake": false,
"locked": {
- "lastModified": 1744584021,
- "narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=",
+ "lastModified": 1748186689,
+ "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=",
"owner": "GNOME",
"repo": "gnome-shell",
- "rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae",
+ "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0",
"type": "github"
},
"original": {
"owner": "GNOME",
- "ref": "48.1",
+ "ref": "48.2",
"repo": "gnome-shell",
"type": "github"
}
},
+ "grub2-themes": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_4"
+ },
+ "locked": {
+ "lastModified": 1753279958,
+ "narHash": "sha256-EJ1udnwKYgWeAJzncAccbLPtbSWiuIANryXTGI9nY6w=",
+ "owner": "vinceliuice",
+ "repo": "grub2-themes",
+ "rev": "6c26f99622cb1c705b3fe2dbe1eb88521096b25a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "vinceliuice",
+ "repo": "grub2-themes",
+ "type": "github"
+ }
+ },
"himmelblau": {
"inputs": {
"flake-utils": "flake-utils_2",
@@ -423,16 +432,15 @@
]
},
"locked": {
- "lastModified": 1750450607,
- "narHash": "sha256-z+sZbYISN46VKCawV8iBuwE3Cw6DoSZd5KXYrxBYbF0=",
+ "lastModified": 1753902883,
+ "narHash": "sha256-F7IUdBe//PDtcztUdu3XYxzJuKbYip6TwIRWLdrftO0=",
"owner": "himmelblau-idm",
"repo": "himmelblau",
- "rev": "5dc066cc063ea857f8c8b3dc524c83eb09dc0548",
+ "rev": "d01709bf0100183045927c03b90db78fb8e40bda",
"type": "github"
},
"original": {
"owner": "himmelblau-idm",
- "ref": "main",
"repo": "himmelblau",
"type": "github"
}
@@ -444,32 +452,11 @@
]
},
"locked": {
- "lastModified": 1750304462,
- "narHash": "sha256-Mj5t4yX05/rXnRqJkpoLZTWqgStB88Mr/fegTRqyiWc=",
+ "lastModified": 1753943136,
+ "narHash": "sha256-eiEE5SabVcIlGSTRcRyBjmJMaYAV95SJnjy8YSsVeW4=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "863842639722dd12ae9e37ca83bcb61a63b36f6c",
- "type": "github"
- },
- "original": {
- "owner": "nix-community",
- "repo": "home-manager",
- "type": "github"
- }
- },
- "home-manager_2": {
- "inputs": {
- "nixpkgs": [
- "stylix",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1748737919,
- "narHash": "sha256-5kvBbLYdp+n7Ftanjcs6Nv+UO6sBhelp6MIGJ9nWmjQ=",
- "owner": "nix-community",
- "repo": "home-manager",
- "rev": "5675a9686851d9626560052a032c4e14e533c1fa",
+ "rev": "bd82507edd860c453471c46957cbbe3c9fd01b5c",
"type": "github"
},
"original": {
@@ -486,11 +473,11 @@
]
},
"locked": {
- "lastModified": 1750403547,
- "narHash": "sha256-XDDINMbHTtKQeSRpX5mwq20z23Wg/I/G4JUinA3V8Xg=",
+ "lastModified": 1753938227,
+ "narHash": "sha256-KzjI9khMC2tOL5FClh3sHq8Gax1O5Rw0bH1hvJ3FU3E=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
- "rev": "52b86b86d925ec00c836ecc6d36f9c947bb15736",
+ "rev": "8d1f0004594e0eddc00159ad7666e669a6bcb711",
"type": "github"
},
"original": {
@@ -505,11 +492,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
- "lastModified": 1749989692,
- "narHash": "sha256-ojISk2CXljR3qIgwgZh4iNzP3W2H3zGH49xWTJARkoM=",
+ "lastModified": 1753618592,
+ "narHash": "sha256-9sDACkrSbZOA1srKWQzvbkBFHZeXvHW8EYpWrVZPxDg=",
"owner": "nix-community",
"repo": "lib-aggregate",
- "rev": "cae85629e70ce05b968757f3af8f2f2b3923d080",
+ "rev": "81b2f78680ca3864bfdc0d4cbc3444af3e1ff271",
"type": "github"
},
"original": {
@@ -533,27 +520,6 @@
"type": "github"
}
},
- "nil": {
- "inputs": {
- "nixpkgs": [
- "nvf",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1750047244,
- "narHash": "sha256-vluLARrk4485npdyHOj8XKr0yk6H22pNf+KVRNL+i/Y=",
- "owner": "oxalica",
- "repo": "nil",
- "rev": "870a4b1b5f12004832206703ac15aa85c42c247b",
- "type": "github"
- },
- "original": {
- "owner": "oxalica",
- "repo": "nil",
- "type": "github"
- }
- },
"nix-github-actions": {
"inputs": {
"nixpkgs": [
@@ -580,14 +546,14 @@
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_3",
- "nixpkgs": "nixpkgs_4"
+ "nixpkgs": "nixpkgs_5"
},
"locked": {
- "lastModified": 1750471420,
- "narHash": "sha256-NdmGCaMJH1OxOpscofZ61aqzHfVf8pMXtl9XFO/1T0k=",
+ "lastModified": 1753928630,
+ "narHash": "sha256-ASqyvmJ2EEUCyDJGMHRQ1ZqWnCd4SiVd7hi7dGBuSvw=",
"owner": "Infinidoge",
"repo": "nix-minecraft",
- "rev": "c2cda7b9a94779abe0632ac5b64207df002fea40",
+ "rev": "30af81148ee29a4a13c938c25d3e68877b1b27fb",
"type": "github"
},
"original": {
@@ -596,6 +562,21 @@
"type": "github"
}
},
+ "nixlib": {
+ "locked": {
+ "lastModified": 1736643958,
+ "narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
+ "owner": "nix-community",
+ "repo": "nixpkgs.lib",
+ "rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "nixpkgs.lib",
+ "type": "github"
+ }
+ },
"nixos-boot": {
"locked": {
"lastModified": 1722927293,
@@ -611,13 +592,55 @@
"type": "github"
}
},
+ "nixos-generators": {
+ "inputs": {
+ "nixlib": "nixlib",
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1751903740,
+ "narHash": "sha256-PeSkNMvkpEvts+9DjFiop1iT2JuBpyknmBUs0Un0a4I=",
+ "owner": "nix-community",
+ "repo": "nixos-generators",
+ "rev": "032decf9db65efed428afd2fa39d80f7089085eb",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "nixos-generators",
+ "type": "github"
+ }
+ },
+ "nixos-wsl": {
+ "inputs": {
+ "flake-compat": [],
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1753704990,
+ "narHash": "sha256-5E14xuNWy2Un1nFR55k68hgbnD8U2x/rE5DXJtYKusw=",
+ "owner": "nix-community",
+ "repo": "nixos-wsl",
+ "rev": "58c814cc6d4a789191f9c12e18277107144b0c91",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "nixos-wsl",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
- "lastModified": 1748359502,
- "narHash": "sha256-nnY29OR2nFG9NxF0eN0XemmJx8bpMdoRwvQt8PnI0Uw=",
+ "lastModified": 1751186460,
+ "narHash": "sha256-tSnI50oYaXOi/SFUmJC+gZ2xE9pAhTnV0D2/3JoKL7g=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "502151620cdde8fda50f1f05706caae833379754",
+ "rev": "dd5540905b1a13176efa13fa2f8dac776bcb275a",
"type": "github"
},
"original": {
@@ -629,11 +652,11 @@
},
"nixpkgs-lib": {
"locked": {
- "lastModified": 1749950217,
- "narHash": "sha256-qXoEFKOnznVvMAKezJhSXzRKsJ/LHLRY8NCw1mGhwrU=",
+ "lastModified": 1753579242,
+ "narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
- "rev": "753176a8605439613fc6dc9911267b9f720a2615",
+ "rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
"type": "github"
},
"original": {
@@ -642,28 +665,29 @@
"type": "github"
}
},
- "nixpkgs-lib_2": {
+ "nixpkgs_10": {
"locked": {
- "lastModified": 1748740939,
- "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
- "owner": "nix-community",
- "repo": "nixpkgs.lib",
- "rev": "656a64127e9d791a334452c6b6606d17539476e2",
+ "lastModified": 1727348695,
+ "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
"type": "github"
},
"original": {
- "owner": "nix-community",
- "repo": "nixpkgs.lib",
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
- "lastModified": 1749896453,
- "narHash": "sha256-6+AmSZBogyr1zbVc2k4IBcmY/Yt39mC4+cfZi0n/AAA=",
+ "lastModified": 1753948617,
+ "narHash": "sha256-68ounbeMLJTO/Igq0rEqjldNReb/r2gR9zgLU2qiH7A=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "ba48a1f6ce571455cb631dee840c6cd401ea4adb",
+ "rev": "4f1a1d0af135001efc1a58c8f31ede7bb1045874",
"type": "github"
},
"original": {
@@ -690,6 +714,22 @@
}
},
"nixpkgs_4": {
+ "locked": {
+ "lastModified": 1753965693,
+ "narHash": "sha256-ks84bo0xIjUdRJGqLHQTyXR5OGb+8zUQg+XarbSEtrw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "113bb8d5ca48dc31c62835b5fafed82092d87a91",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "master",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_5": {
"locked": {
"lastModified": 1748929857,
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
@@ -705,13 +745,13 @@
"type": "github"
}
},
- "nixpkgs_5": {
+ "nixpkgs_6": {
"locked": {
- "lastModified": 1750365781,
- "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=",
+ "lastModified": 1753694789,
+ "narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54",
+ "rev": "dc9637876d0dcc8c9e5e22986b857632effeb727",
"type": "github"
},
"original": {
@@ -721,13 +761,13 @@
"type": "github"
}
},
- "nixpkgs_6": {
+ "nixpkgs_7": {
"locked": {
- "lastModified": 1750215678,
- "narHash": "sha256-Rc/ytpamXRf6z8UA2SGa4aaWxUXRbX2MAWIu2C8M+ok=",
+ "lastModified": 1753432016,
+ "narHash": "sha256-cnL5WWn/xkZoyH/03NNUS7QgW5vI7D1i74g48qplCvg=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "5395fb3ab3f97b9b7abca147249fa2e8ed27b192",
+ "rev": "6027c30c8e9810896b92429f0092f624f7b1aace",
"type": "github"
},
"original": {
@@ -737,7 +777,7 @@
"type": "github"
}
},
- "nixpkgs_7": {
+ "nixpkgs_8": {
"locked": {
"lastModified": 1744868846,
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
@@ -753,33 +793,17 @@
"type": "github"
}
},
- "nixpkgs_8": {
- "locked": {
- "lastModified": 1748460289,
- "narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "ref": "nixos-unstable",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
"nixpkgs_9": {
"locked": {
- "lastModified": 1727348695,
- "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
- "owner": "nixos",
+ "lastModified": 1751792365,
+ "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=",
+ "owner": "NixOS",
"repo": "nixpkgs",
- "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
+ "rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb",
"type": "github"
},
"original": {
- "owner": "nixos",
+ "owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@@ -794,15 +818,14 @@
"nixpkgs": [
"stylix",
"nixpkgs"
- ],
- "treefmt-nix": "treefmt-nix"
+ ]
},
"locked": {
- "lastModified": 1748730660,
- "narHash": "sha256-5LKmRYKdPuhm8j5GFe3AfrJL8dd8o57BQ34AGjJl1R0=",
+ "lastModified": 1751906969,
+ "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=",
"owner": "nix-community",
"repo": "NUR",
- "rev": "2c0bc52fe14681e9ef60e3553888c4f086e46ecb",
+ "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25",
"type": "github"
},
"original": {
@@ -813,19 +836,18 @@
},
"nvf": {
"inputs": {
+ "flake-compat": "flake-compat_4",
"flake-parts": "flake-parts",
- "flake-utils": "flake-utils_4",
"mnw": "mnw",
- "nil": "nil",
- "nixpkgs": "nixpkgs_6",
- "systems": "systems_5"
+ "nixpkgs": "nixpkgs_7",
+ "systems": "systems_4"
},
"locked": {
- "lastModified": 1750441488,
- "narHash": "sha256-JuFBp2xM4JD/XGb69dTSDOdGbUD0fVHlgY9X9GHGTFE=",
+ "lastModified": 1753878721,
+ "narHash": "sha256-Y+Kr6FTHggnZ31nhaiOhIboIi+dhnLmQ9p0xf0wwnDc=",
"owner": "notashelf",
"repo": "nvf",
- "rev": "18c17b7b8dbf6e0f10e3eb5f1fa5341a9175a3b1",
+ "rev": "e35a74c44a35b28fd09f136dd3c0dbe9f300258f",
"type": "github"
},
"original": {
@@ -863,14 +885,18 @@
"fenix": "fenix",
"firefox": "firefox",
"flux": "flux",
+ "grub2-themes": "grub2-themes",
"himmelblau": "himmelblau",
"home-manager": "home-manager",
"jovian": "jovian",
"nix-minecraft": "nix-minecraft",
"nixos-boot": "nixos-boot",
- "nixpkgs": "nixpkgs_5",
+ "nixos-generators": "nixos-generators",
+ "nixos-wsl": "nixos-wsl",
+ "nixpkgs": "nixpkgs_6",
"nvf": "nvf",
"plasma-manager": "plasma-manager",
+ "snowfall-lib": "snowfall-lib",
"sops-nix": "sops-nix",
"stylix": "stylix",
"zen-browser": "zen-browser"
@@ -879,11 +905,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
- "lastModified": 1750405264,
- "narHash": "sha256-EMFKnO+J3dZOa9J+uiKZgHYgzALv9dqxY7NHV0DbO/U=",
+ "lastModified": 1753838657,
+ "narHash": "sha256-4FA7NTmrAqW5yt4A3hhzgDmAFD0LbGRMGKhb1LBSItI=",
"owner": "rust-lang",
"repo": "rust-analyzer",
- "rev": "b0552d779f7137c76f109666ce0ad28395c0e582",
+ "rev": "8611b714597c89b092f3d4874f14acd3f72f44fd",
"type": "github"
},
"original": {
@@ -893,16 +919,38 @@
"type": "github"
}
},
- "sops-nix": {
+ "snowfall-lib": {
"inputs": {
- "nixpkgs": "nixpkgs_7"
+ "flake-compat": "flake-compat_5",
+ "flake-utils-plus": "flake-utils-plus",
+ "nixpkgs": [
+ "nixpkgs"
+ ]
},
"locked": {
- "lastModified": 1750119275,
- "narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=",
+ "lastModified": 1736130495,
+ "narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=",
+ "owner": "snowfallorg",
+ "repo": "lib",
+ "rev": "02d941739f98a09e81f3d2d9b3ab08918958beac",
+ "type": "github"
+ },
+ "original": {
+ "owner": "snowfallorg",
+ "repo": "lib",
+ "type": "github"
+ }
+ },
+ "sops-nix": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_8"
+ },
+ "locked": {
+ "lastModified": 1752544651,
+ "narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=",
"owner": "Mic92",
"repo": "sops-nix",
- "rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2",
+ "rev": "2c8def626f54708a9c38a5861866660395bb3461",
"type": "github"
},
"original": {
@@ -918,12 +966,9 @@
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
- "flake-compat": "flake-compat_4",
"flake-parts": "flake-parts_2",
- "git-hooks": "git-hooks",
"gnome-shell": "gnome-shell",
- "home-manager": "home-manager_2",
- "nixpkgs": "nixpkgs_8",
+ "nixpkgs": "nixpkgs_9",
"nur": "nur",
"systems": "systems_6",
"tinted-foot": "tinted-foot",
@@ -933,15 +978,15 @@
"tinted-zed": "tinted-zed"
},
"locked": {
- "lastModified": 1750527172,
- "narHash": "sha256-ATl7gK98w27JaXzidK48YlG4o+mtfvyHu9zKuadE6j0=",
- "owner": "danth",
+ "lastModified": 1753919664,
+ "narHash": "sha256-U7Ts8VbVD4Z6n67gFx00dkpQJu27fMu173IUopX3pNI=",
+ "owner": "nix-community",
"repo": "stylix",
- "rev": "27721407de0615e927c84f7c23277628e1d12b67",
+ "rev": "30f5022236cf8dd257941cb0f910e198e7e464c7",
"type": "github"
},
"original": {
- "owner": "danth",
+ "owner": "nix-community",
"repo": "stylix",
"type": "github"
}
@@ -1072,11 +1117,11 @@
"tinted-schemes": {
"flake": false,
"locked": {
- "lastModified": 1748180480,
- "narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=",
+ "lastModified": 1750770351,
+ "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=",
"owner": "tinted-theming",
"repo": "schemes",
- "rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31",
+ "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a",
"type": "github"
},
"original": {
@@ -1088,11 +1133,11 @@
"tinted-tmux": {
"flake": false,
"locked": {
- "lastModified": 1748740859,
- "narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=",
+ "lastModified": 1751159871,
+ "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
- "rev": "57d5f9683ff9a3b590643beeaf0364da819aedda",
+ "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c",
"type": "github"
},
"original": {
@@ -1104,11 +1149,11 @@
"tinted-zed": {
"flake": false,
"locked": {
- "lastModified": 1725758778,
- "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=",
+ "lastModified": 1751158968,
+ "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=",
"owner": "tinted-theming",
"repo": "base16-zed",
- "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9",
+ "rev": "86a470d94204f7652b906ab0d378e4231a5b3384",
"type": "github"
},
"original": {
@@ -1117,31 +1162,9 @@
"type": "github"
}
},
- "treefmt-nix": {
- "inputs": {
- "nixpkgs": [
- "stylix",
- "nur",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1733222881,
- "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
- "owner": "numtide",
- "repo": "treefmt-nix",
- "rev": "49717b5af6f80172275d47a418c9719a31a78b53",
- "type": "github"
- },
- "original": {
- "owner": "numtide",
- "repo": "treefmt-nix",
- "type": "github"
- }
- },
"zen-browser": {
"inputs": {
- "nixpkgs": "nixpkgs_9"
+ "nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1727721329,
diff --git a/flake.nix b/flake.nix
index 7275c42..d696f4b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,6 +4,11 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+ snowfall-lib = {
+ url = "github:snowfallorg/lib";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@@ -15,14 +20,22 @@
inputs.home-manager.follows = "home-manager";
};
+ nixos-generators = {
+ url = "github:nix-community/nixos-generators";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
+ # neovim
nvf.url = "github:notashelf/nvf";
+ # plymouth theme
nixos-boot.url = "github:Melkor333/nixos-boot";
firefox.url = "github:nix-community/flake-firefox-nightly";
- stylix.url = "github:danth/stylix";
+ stylix.url = "github:nix-community/stylix";
+ # Rust toolchain
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
@@ -36,53 +49,64 @@
sops-nix.url = "github:Mic92/sops-nix";
+ # Azure AD for linux
himmelblau = {
- url = "github:himmelblau-idm/himmelblau/main";
+ url = "github:himmelblau-idm/himmelblau";
inputs.nixpkgs.follows = "nixpkgs";
};
+ # windows app utilities
erosanix.url = "github:emmanuelrosa/erosanix";
+ # Steam deck stuff
jovian = {
url = "github:Jovian-Experiments/Jovian-NixOS";
inputs.nixpkgs.follows = "nixpkgs";
};
+
+ grub2-themes = {
+ url = "github:vinceliuice/grub2-themes";
+ };
+
+ nixos-wsl = {
+ url = "github:nix-community/nixos-wsl";
+ inputs = {
+ nixpkgs.follows = "nixpkgs";
+ flake-compat.follows = "";
+ };
+ };
};
- outputs = inputs @ { self, nixpkgs, nix-minecraft, flux, ... }:
- let
- inherit (lib.my) readNixosModules mapHosts;
+ outputs = inputs: inputs.snowfall-lib.mkFlake {
+ inherit inputs;
+ src = ./.;
- system = "x86_64-linux";
+ snowfall = {
+ namespace = "sneeuwvlok";
- mkPkgs = pkgs: extraOverlays:
- import pkgs {
- inherit system;
- config.allowUnfree = true;
- overlays = extraOverlays ++ (lib.attrValues self.overlays);
- };
- pkgs = mkPkgs nixpkgs [self.overlays.default nix-minecraft.overlay flux.overlays.default];
-
- lib = nixpkgs.lib.extend (final: prev: {
- my = import ./lib {
- inherit pkgs inputs;
-
- lib = final;
- };
- });
- in
- {
- lib = lib.my;
-
- overlays = {
- default = final: prev: {
- my = self.packages.${system};
+ meta = {
+ name = "sneeuwvlok";
+ title = "Sneeuwvlok";
};
};
- packages."${system}" = lib.my.mapModules ./packages (p: pkgs.callPackage p { inherit inputs; });
+ channels-config = {
+ allowUnfree = true;
+ permittedInsecurePackages = [
+ "dotnet-sdk-6.0.428"
+ "aspnetcore-runtime-6.0.36"
+ ];
+ };
- nixosModules = readNixosModules ./modules import;
- nixosConfigurations = mapHosts ./hosts {};
+ overlays = with inputs; [
+ fenix.overlays.default
+ nix-minecraft.overlay
+ flux.overlays.default
+ ];
+
+ homes.modules = with inputs; [
+ stylix.homeModules.stylix
+ plasma-manager.homeManagerModules.plasma-manager
+ ];
};
}
diff --git a/homes/x86_64-linux/chris@mandos/default.nix b/homes/x86_64-linux/chris@mandos/default.nix
new file mode 100644
index 0000000..6989314
--- /dev/null
+++ b/homes/x86_64-linux/chris@mandos/default.nix
@@ -0,0 +1,35 @@
+{ osConfig, ... }:
+{
+ home.stateVersion = osConfig.system.stateVersion;
+
+ programs.git = {
+ userName = "Chris Kruining";
+ userEmail = "chris@kruining.eu";
+ };
+
+ sneeuwvlok = {
+ defaults = {
+ shell = "zsh";
+ terminal = "ghostty";
+ browser = "zen";
+ editor = "zed";
+ };
+
+ shell = {
+ corePkgs.enable = true;
+ };
+
+ themes = {
+ enable = true;
+ theme = "everforest";
+ polarity = "dark";
+ };
+
+ application = {
+ bitwarden.enable = true;
+ teamspeak.enable = true;
+ steam.enable = true;
+ zen.enable = true;
+ };
+ };
+}
diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix
new file mode 100644
index 0000000..cd6fa1a
--- /dev/null
+++ b/homes/x86_64-linux/chris@manwe/default.nix
@@ -0,0 +1,57 @@
+{ osConfig, ... }:
+{
+ home.stateVersion = osConfig.system.stateVersion;
+
+ programs.git = {
+ userName = "Chris Kruining";
+ userEmail = "chris@kruining.eu";
+ };
+
+ sneeuwvlok = {
+ defaults = {
+ shell = "zsh";
+ terminal = "ghostty";
+ browser = "zen";
+ editor = "zed";
+ };
+
+ shell = {
+ corePkgs.enable = true;
+ };
+
+ themes = {
+ enable = true;
+ theme = "everforest";
+ polarity = "dark";
+ };
+
+ development = {
+ rust.enable = true;
+ javascript.enable = true;
+ dotnet.enable = true;
+ };
+
+ application = {
+ bitwarden.enable = true;
+ discord.enable = true;
+ ladybird.enable = true;
+ obs.enable = true;
+ onlyoffice.enable = true;
+ signal.enable = true;
+ steam.enable = true;
+ studio.enable = true;
+ teamspeak.enable = true;
+ thunderbird.enable = true;
+ zen.enable = true;
+ };
+
+ shell.zsh.enable = true;
+ terminal.ghostty.enable = true;
+
+ editor = {
+ zed.enable = true;
+ nvim.enable = true;
+ nano.enable = true;
+ };
+ };
+}
diff --git a/homes/x86_64-linux/chris@orome/default.nix b/homes/x86_64-linux/chris@orome/default.nix
new file mode 100644
index 0000000..dece506
--- /dev/null
+++ b/homes/x86_64-linux/chris@orome/default.nix
@@ -0,0 +1,48 @@
+{ osConfig, ... }:
+{
+ home.stateVersion = osConfig.system.stateVersion;
+
+ programs.git = {
+ userName = "Chris Kruining";
+ userEmail = "chris@kruining.eu";
+ };
+
+ sneeuwvlok = {
+ defaults = {
+ shell = "zsh";
+ terminal = "ghostty";
+ browser = "zen";
+ editor = "zed";
+ };
+
+ shell = {
+ corePkgs.enable = true;
+ };
+
+ themes = {
+ enable = true;
+ theme = "everforest";
+ polarity = "dark";
+ };
+
+ development = {
+ javascript.enable = true;
+ dotnet.enable = true;
+ };
+
+ application = {
+ bitwarden.enable = true;
+ onlyoffice.enable = true;
+ signal.enable = true;
+ zen.enable = true;
+ };
+
+ shell.zsh.enable = true;
+ terminal.ghostty.enable = true;
+
+ editor = {
+ zed.enable = true;
+ nano.enable = true;
+ };
+ };
+}
diff --git a/homes/x86_64-linux/chris@tulkas/default.nix b/homes/x86_64-linux/chris@tulkas/default.nix
new file mode 100644
index 0000000..6989314
--- /dev/null
+++ b/homes/x86_64-linux/chris@tulkas/default.nix
@@ -0,0 +1,35 @@
+{ osConfig, ... }:
+{
+ home.stateVersion = osConfig.system.stateVersion;
+
+ programs.git = {
+ userName = "Chris Kruining";
+ userEmail = "chris@kruining.eu";
+ };
+
+ sneeuwvlok = {
+ defaults = {
+ shell = "zsh";
+ terminal = "ghostty";
+ browser = "zen";
+ editor = "zed";
+ };
+
+ shell = {
+ corePkgs.enable = true;
+ };
+
+ themes = {
+ enable = true;
+ theme = "everforest";
+ polarity = "dark";
+ };
+
+ application = {
+ bitwarden.enable = true;
+ teamspeak.enable = true;
+ steam.enable = true;
+ zen.enable = true;
+ };
+ };
+}
diff --git a/hosts/mandos/README.md b/hosts/mandos/README.md
deleted file mode 100644
index 3cf3db5..0000000
--- a/hosts/mandos/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# Description
-
-My desktop, reasoning for the name being the following chain of thought:
-**Mandos -> brother of manwe -> manwe used to be main pc, now mandos is**
diff --git a/hosts/mandos/default.nix b/hosts/mandos/default.nix
deleted file mode 100644
index 5b7bf26..0000000
--- a/hosts/mandos/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ config, pkgs, ... }:
-{
- fileSystems = {
- "/home/chris/media" = {
- device = "ulmo:/";
- fsType = "nfs";
- };
- };
-
- environment.systemPackages = [ pkgs.ventoy-full-qt ];
- permittedInsecurePackages = [ "ventoy-qt5-1.1.05"];
- boot.supportedFilesystems = [ "nfs" ];
-
- modules = {
- boot = {
- silentBoot = true;
- animatedBoot = true;
- };
-
- system.audio.enable = true;
-
- root = {
- user = {
- full_name = "__ROOT__";
- email = "__ROOT__@${config.networking.hostName}";
- };
-
- shell = {
- default = "zsh";
- };
- };
- };
-}
diff --git a/hosts/mandos/hardware.nix b/hosts/mandos/hardware.nix
deleted file mode 100644
index 24f6895..0000000
--- a/hosts/mandos/hardware.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{ config, lib, pkgs, modulesPath, ... }:
-let
- inherit (lib.modules) mkDefault;
-in
-{
- imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
-
- fileSystems = {
- "/" ={
- device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985";
- fsType = "ext4";
- };
-
- "/boot" = {
- device = "/dev/disk/by-uuid/C842-316A";
- fsType = "vfat";
- options = [ "fmask=0022" "dmask=0022" ];
- };
- };
-
- swapDevices = [
- { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; }
- ];
-
- boot = {
- initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
- initrd.kernelModules = [ ];
- kernelModules = [ "kvm-amd" ];
- kernelParams = [];
- extraModulePackages = [ ];
- };
-
- nixpkgs.hostPlatform = mkDefault "x86_64-linux";
- hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
-}
diff --git a/hosts/mandos/users/chris/default.nix b/hosts/mandos/users/chris/default.nix
deleted file mode 100644
index 96461c8..0000000
--- a/hosts/mandos/users/chris/default.nix
+++ /dev/null
@@ -1,65 +0,0 @@
-{ ... }:
-{
- user = {
- full_name = "Chris Kruining";
- email = "chris@kruining.eu";
- is_trusted = true;
- };
-
- themes = {
- enable = true;
- theme = "everforest";
- polarity = "dark";
- };
-
- develop = {
- rust.enable = true;
- js.enable = true;
- dotnet.enable = true;
- };
-
- desktop = {
- plasma = {
- enable = true;
- autoLogin = true;
- };
-
- applications = {
- communication.enable = true;
- email.enable = true;
- office.enable = true;
- steam.enable = true;
- recording.enable = true;
- studio.enable = true;
- };
-
- terminal = {
- default = "ghostty";
- alacritty.enable = true;
- ghostty.enable = true;
- };
-
- editors = {
- default = "zed";
- vscodium.enable = true;
- zed.enable = true;
- nvim.enable = true;
- nano.enable = true;
- kate.enable = true;
- };
-
- browsers = {
- default = "chromium";
- chrome.enable = true;
- ladybird.enable = true;
- };
-
- games = {
- minecraft.enable = true;
- };
- };
-
- shell = {
- default = "zsh";
- };
-}
diff --git a/hosts/manwe/default.nix b/hosts/manwe/default.nix
deleted file mode 100644
index 62bc7fe..0000000
--- a/hosts/manwe/default.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-{ config, pkgs, ... }:
-{
- fileSystems = {
- "/home/chris/games" = {
- device = "/dev/disk/by-label/games";
- fsType = "ext4";
- };
-
- "/home/chris/data" = {
- device = "/dev/disk/by-label/Data";
- fsType = "ntfs-3g";
- options = [ "rw" "uid=chris" ];
- };
- };
-
- modules = {
- boot = {
- silentBoot = true;
- animatedBoot = true;
- };
-
- desktop.gaming.enable = true;
-
- system.audio.enable = true;
-
- root = {
- user = {
- full_name = "__ROOT__";
- email = "__ROOT__@${config.networking.hostName}";
- };
-
- shell = {
- default = "zsh";
- };
- };
- };
-}
diff --git a/hosts/manwe/hardware.nix b/hosts/manwe/hardware.nix
deleted file mode 100644
index 35f6a44..0000000
--- a/hosts/manwe/hardware.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{ config, lib, pkgs, modulesPath, ... }:
-let
- inherit (lib.modules) mkDefault;
-in
-{
- imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
-
- fileSystems = {
- "/" ={
- device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985";
- fsType = "ext4";
- };
-
- "/boot" = {
- device = "/dev/disk/by-uuid/C842-316A";
- fsType = "vfat";
- options = [ "fmask=0022" "dmask=0022" ];
- };
- };
-
- swapDevices = [
- { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; }
- ];
-
- boot = {
- initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
- initrd.kernelModules = [ ];
- kernelModules = [ "kvm-intel" ];
- kernelParams = [];
- extraModulePackages = [ ];
- };
-
- nixpkgs.hostPlatform = mkDefault "x86_64-linux";
- hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
-}
diff --git a/hosts/manwe/users/chris/default.nix b/hosts/manwe/users/chris/default.nix
deleted file mode 100644
index 0598711..0000000
--- a/hosts/manwe/users/chris/default.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{ ... }:
-{
- user = {
- full_name = "Chris Kruining";
- email = "chris@kruining.eu";
- is_trusted = true;
- };
-
- themes = {
- enable = true;
- theme = "everforest";
- polarity = "dark";
- };
-
- desktop = {
- plasma = {
- enable = true;
- autoLogin = true;
- };
-
- applications = {
- steam.enable = true;
- };
-
- terminal = {
- default = "ghostty";
- ghostty.enable = true;
- };
-
- editors = {
- default = "nano";
- nano.enable = true;
- };
-
- browsers = {
- default = "chromium";
- chrome.enable = true;
- ladybird.enable = true;
- };
- };
-
- shell = {
- default = "zsh";
- };
-}
diff --git a/hosts/orome/default.nix b/hosts/orome/default.nix
deleted file mode 100644
index be2ce0c..0000000
--- a/hosts/orome/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ config, ... }:
-{
- modules = {
- system.audio.enable = true;
- system.bluetooth.enable = true;
-
- authentication.himmelblau.enable = true;
-
- root = {
- user = {
- full_name = "__ROOT__";
- email = "__ROOT__@${config.networking.hostName}";
- };
-
- shell = {
- default = "zsh";
- };
- };
- };
-}
diff --git a/hosts/orome/users/chris/default.nix b/hosts/orome/users/chris/default.nix
deleted file mode 100644
index 951ea48..0000000
--- a/hosts/orome/users/chris/default.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{ ... }:
-{
- user = {
- full_name = "Chris Kruining";
- email = "chris@kruining.eu";
- is_trusted = true;
- };
-
- themes = {
- enable = true;
- theme = "everforest";
- polarity = "dark";
- };
-
- develop = {
- rust.enable = true;
- js.enable = true;
- dotnet.enable = true;
- };
-
- desktop = {
- plasma = {
- enable = true;
- autoLogin = true;
- };
-
- applications = {
- communication.enable = true;
- email.enable = true;
- office.enable = true;
- };
-
- terminal = {
- default = "ghostty";
- ghostty.enable = true;
- };
-
- editors = {
- default = "zed";
- vscodium.enable = true;
- zed.enable = true;
- nvim.enable = true;
- nano.enable = true;
- };
-
- browsers = {
- default = "chromium";
- firefox.enable = true;
- chrome.enable = true;
- };
- };
-
-
- shell = {
- default = "zsh";
- };
-}
diff --git a/hosts/tulkas/default.nix b/hosts/tulkas/default.nix
deleted file mode 100644
index 6c4c2cb..0000000
--- a/hosts/tulkas/default.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ lib, config, ... }:let
- inherit (lib) mkForce;
-in
-{
- modules = {
- system.audio.enable = true;
-
- desktop.gaming.enable = true;
-
- root = {
- user = {
- full_name = "__ROOT__";
- email = "__ROOT__@${config.networking.hostName}";
- };
-
- shell = {
- default = "zsh";
- toolset.git.enable = mkForce false;
- };
- };
- };
-}
diff --git a/hosts/tulkas/hardware.nix b/hosts/tulkas/hardware.nix
deleted file mode 100644
index acd5d75..0000000
--- a/hosts/tulkas/hardware.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{ config, lib, modulesPath, ... }:
-let
- inherit (lib.modules) mkDefault;
-in
-{
- imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
-
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/aa438c4c-d193-436b-91ca-c386c0688265";
- fsType = "ext4";
- };
-
- fileSystems."/boot" = {
- device = "/dev/disk/by-uuid/89B8-0702";
- fsType = "vfat";
- };
-
- swapDevices = [
- { device = "/dev/disk/by-uuid/beddca5c-1ecc-4a46-9fc5-fd918eed8f2a"; }
- ];
-
- boot = {
- initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
- initrd.kernelModules = [ ];
- kernelModules = [ "kvm-amd" ];
- kernelParams = [];
- extraModulePackages = [ ];
- };
-
- nixpkgs.hostPlatform = mkDefault "x86_64-linux";
- hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
-}
diff --git a/hosts/tulkas/users/chris/default.nix b/hosts/tulkas/users/chris/default.nix
deleted file mode 100644
index 3f88927..0000000
--- a/hosts/tulkas/users/chris/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ lib, ... }: let
- inherit (lib) mkForce;
-in
-{
- user = {
- full_name = "Chris Kruining";
- email = "chris@kruining.eu";
- is_trusted = true;
- };
-
- themes = {
- enable = true;
- theme = "everforest";
- polarity = "dark";
- };
-
- desktop = {
- terminal = {
- default = "ghostty";
- ghostty.enable = true;
- };
-
- editors = {
- default = "nano";
- nano.enable = true;
- };
- };
-
- shell = {
- default = "zsh";
- toolset.git.enable = mkForce false;
- };
-}
diff --git a/hosts/ulmo/README.md b/hosts/ulmo/README.md
deleted file mode 100644
index dd557d1..0000000
--- a/hosts/ulmo/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# Description
-
-My current server, reasoning for the name being the following chain of thought:
-**Ulmo -> the king of the sea -> the sea provides -> services are provided -> server runs services**
\ No newline at end of file
diff --git a/hosts/ulmo/default.nix b/hosts/ulmo/default.nix
deleted file mode 100644
index a0ea9a0..0000000
--- a/hosts/ulmo/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ config, ... }:
-{
- config = {
- fileSystems."/var/media" = {
- device = "/dev/disk/by-label/data";
- fsType = "ext4";
- };
-
- modules = {
- networking = {
- ssh.enable = true;
- nfs.enable = true;
- };
-
- services = {
- auth.authelia.enable = true;
- auth.zitadel.enable = true;
- media.enable = true;
- nextcloud.enable = true;
- };
-
- root = {
- user = {
- full_name = "__ROOT__";
- email = "__ROOT__@${config.networking.hostName}";
- };
-
- shell = {
- default = "zsh";
- };
- };
- };
- };
-}
diff --git a/lib/attrs.nix b/lib/attrs.nix
deleted file mode 100644
index 9a576b2..0000000
--- a/lib/attrs.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ lib, ... }:
-let
- inherit (lib.lists) any count;
- inherit (lib.attrsets) filterAttrs listToAttrs mapAttrs' mapAttrsToList;
-in rec
-{
- attrsToList = attrs:
- mapAttrsToList (name: value: { inherit name value; }) attrs;
-
- mapFilterAttrs = pred: f: attrs:
- filterAttrs pred (mapAttrs' f attrs);
-
- getAttrs' = values: f:
- listToAttrs (map f values);
-
- anyAttrs = pred: attrs:
- any (attr: pred attr.name attr.value) (attrsToList attrs);
-
- countAttrs = pred: attrs:
- count (attr: pred attr.name attr.value) (attrsToList attrs);
-}
diff --git a/lib/default.nix b/lib/default.nix
deleted file mode 100644
index 38cfde6..0000000
--- a/lib/default.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ inputs, lib, pkgs, ... }:
-let
- inherit (lib.attrsets) attrValues;
- inherit (lib.fixedPoints) makeExtensible;
- inherit (lib.lists) foldr;
- inherit (modules) mapModules;
-
- modules = import ./modules.nix {
- inherit lib;
-
- self.attrs = import ./attrs.nix {
- inherit lib;
-
- self = {};
- };
- };
-
- mylib = makeExtensible (self:
- mapModules ./. (file: import file { inherit self lib pkgs inputs; })
- );
-in
- mylib.extend (self: super: foldr (a: b: a // b) {} (attrValues super))
diff --git a/lib/modules.nix b/lib/modules.nix
deleted file mode 100644
index ecc5dc9..0000000
--- a/lib/modules.nix
+++ /dev/null
@@ -1,52 +0,0 @@
-{ lib, self, ... }:
-let
- inherit (builtins) attrValues readDir pathExists concatLists replaceStrings listToAttrs;
- inherit (lib.attrsets) mapAttrsToList filterAttrs nameValuePair;
- inherit (lib.strings) hasPrefix hasSuffix removeSuffix removePrefix;
- inherit (lib.trivial) id;
- inherit (lib) flatten;
- inherit (self.attrs) mapFilterAttrs;
-in rec
-{
- mapModules = dir: fn:
- mapFilterAttrs (n: v: v != null && !(hasPrefix "_" n)) (n: v: let path = "${toString dir}/${n}"; in
- if v == "directory" && pathExists "${path}/default.nix"
- then nameValuePair n (fn path)
- else if v == "regular" && n != "default.nix" && hasSuffix ".nix" n && !(hasPrefix "_" n)
- then nameValuePair (removeSuffix ".nix" n) (fn path)
- else nameValuePair "" null
- ) (readDir dir);
-
- mapModules' = dir: fn: attrValues (mapModules dir fn);
-
- mapModulesRec = dir: fn:
- mapFilterAttrs (n: v: v != null && !(hasPrefix "_" n)) (n: v: let path = "${toString dir}/${n}"; in
- if v == "directory" && pathExists "${path}/default.nix"
- then nameValuePair n (mapModulesRec path fn)
- else if v == "regular" && n != "default.nix" && hasSuffix ".nix" n
- then nameValuePair (removeSuffix ".nix" n) (fn path)
- else nameValuePair "" null
- ) (readDir dir);
-
- mapModulesRec' = dir: fn: let
- dirs = mapAttrsToList (k: _: "${dir}/${k}") (filterAttrs (n: v: v == "directory" && !(hasPrefix "_" n)) (readDir dir));
- files = attrValues (mapModules dir id);
- paths = files ++ concatLists (map (d: mapModulesRec' d id) dirs);
- in
- map fn paths;
-
- readNixosModules = dir: fn: filterAttrs (name: value: value != null && !(hasPrefix "_" name)) (listToAttrs (flatten (readDirRecursive fn dir "")));
-
- readDirRecursive = fn: root: dir: mapAttrsToList (name: type:
- if type == "directory" && pathExists "${root}/${dir}/${name}/default.nix"
- then [
- (nameValuePair "${replaceStrings ["/"] ["_"] (removePrefix "/" dir)}_${name}" (fn "${root}/${dir}/${name}/default.nix"))
- (readDirRecursive fn root "${dir}/${name}")
- ]
- else if type == "directory"
- then readDirRecursive fn root "${dir}/${name}"
- else if type == "regular" && name != "default.nix" && hasSuffix ".nix" name
- then nameValuePair "${replaceStrings ["/"] ["_"] (removePrefix "/" dir)}_${removeSuffix ".nix" name}" (fn "${root}/${dir}/${name}")
- else nameValuePair "" null
- ) (readDir "${root}/${dir}");
-}
diff --git a/lib/nixos.nix b/lib/nixos.nix
deleted file mode 100644
index b99ffaf..0000000
--- a/lib/nixos.nix
+++ /dev/null
@@ -1,73 +0,0 @@
-{ inputs, lib, pkgs, self, ... }: let
- inherit (inputs.nixpkgs.lib) nixosSystem;
- inherit (builtins) baseNameOf elem map listToAttrs pathExists;
- inherit (lib) filterAttrs nameValuePair attrNames;
- inherit (lib.modules) mkDefault mkIf;
- inherit (lib.strings) removeSuffix;
- inherit (self.modules) mapModules mapModulesRec';
- inherit (self) mkSysUser;
-in rec
-{
- mkHost = path: attrs @ {system ? "x86_64-linux", ...}:
- nixosSystem {
- inherit system;
-
- specialArgs = {inherit lib inputs system; };
-
- modules = let
- stateVersion = "23.11";
- users = if (pathExists "${path}/users") then attrNames (mapModules "${path}/users" (p: p)) else [];
- in [
- inputs.nixos-boot.nixosModules.default
- ({ ... }: {
- nixpkgs.pkgs = pkgs;
-
- networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
-
- system = {
- inherit stateVersion;
- configurationRevision = mkIf (self ? rev) self.rev;
- };
-
- imports = [
- inputs.home-manager.nixosModules.home-manager
- "${path}/hardware.nix"
- ]
- ++ (mapModulesRec' ../modules/system import);
-
- users = {
- mutableUsers = true; # Set this to false when I get sops with passwords set up properly
- users = mkIf (pathExists "${path}/users") (mapModules "${path}/users" mkSysUser);
- };
- })
- (filterAttrs (n: v: !elem n ["system"]) attrs)
- (import path)
- (args@{ inputs, lib, pkgs, config, options, ... }: {
- imports = mapModulesRec' ../modules/home (file: (import file (args // { user = "root"; })));
- })
- ({...}: {
- imports = [];
-
- config = {
- home-manager = {
- backupFileExtension = "bak";
- useGlobalPkgs = true;
- sharedModules = [
- inputs.plasma-manager.homeManagerModules.plasma-manager
- ];
-
- users = listToAttrs (map (user: (nameValuePair user { home = { inherit stateVersion; }; })) (users ++ ["root"]));
- };
- };
- })
- ]
- ++ (map (user: (args@{ inputs, lib, pkgs, config, options, ... }: {
- imports = mapModulesRec' ../modules/home (file: (import file (args // { inherit user; })));
-
- config.modules.${user} = (import "${path}/users/${user}/default.nix" args);
- })) users);
- };
-
- mapHosts = dir: attrs @ {system ? system, ...}:
- mapModules dir (hostPath: mkHost hostPath attrs);
-}
diff --git a/lib/options.nix b/lib/options.nix
deleted file mode 100644
index ca175d6..0000000
--- a/lib/options.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{lib, ...}: let
- inherit (lib.options) mkOption;
-in {
- mkOpt = type: default: mkOption {inherit type default;};
-
- mkOpt' = type: default: description:
- mkOption {inherit type default description;};
-}
diff --git a/lib/user.nix b/lib/user.nix
deleted file mode 100644
index 3e1eb2b..0000000
--- a/lib/user.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ lib, ... }: let
- inherit (builtins) baseNameOf;
- inherit (lib.attrsets) filterAttrs;
- inherit (lib.strings) removeSuffix;
- inherit (lib.my) mapModulesRec';
-in rec
-{
- mkSysUser = path: let
- name = removeSuffix ".nix" (baseNameOf path);
- in
- {
- inherit name;
- isNormalUser = true;
- initialPassword = "kaas";
- home = "/home/${name}";
- group = "users";
- };
-
- mkHmUser = path: {stateVersion, ...}:
- {
- home = {
- inherit stateVersion;
- sessionPath = [ "$XDG_BIN_HOME" "$PATH" ]; # Pretty sure I don't need this.
- };
- };
-}
diff --git a/modules/home/application/bitwarden/default.nix b/modules/home/application/bitwarden/default.nix
new file mode 100644
index 0000000..f2cd869
--- /dev/null
+++ b/modules/home/application/bitwarden/default.nix
@@ -0,0 +1,15 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.bitwarden;
+in
+{
+ options.${namespace}.application.bitwarden = {
+ enable = mkEnableOption "enable bitwarden";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ bitwarden-desktop ];
+ };
+}
diff --git a/modules/home/desktop/browsers/chrome.nix b/modules/home/application/chrome/default.nix
similarity index 70%
rename from modules/home/desktop/browsers/chrome.nix
rename to modules/home/application/chrome/default.nix
index 5a7143c..ac9f5ef 100644
--- a/modules/home/desktop/browsers/chrome.nix
+++ b/modules/home/application/chrome/default.nix
@@ -1,18 +1,17 @@
-{ config, lib, pkgs, user, ... }:
+{ inputs, config, lib, pkgs, namespace, ... }:
let
- inherit (lib.options) mkEnableOption;
- inherit (lib.modules) mkIf;
- inherit (builtins) fetchurl;
+ inherit (lib) mkIf mkEnableOption;
- cfg = config.modules.${user}.desktop.browsers.chrome;
-in {
- options.modules.${user}.desktop.browsers.chrome = {
- enable = mkEnableOption "Enable Chrome";
+ cfg = config.${namespace}.application.chrome;
+in
+{
+ options.${namespace}.application.chrome = {
+ enable = mkEnableOption "enable chrome";
};
config = mkIf cfg.enable {
- home-manager.users.${user}.home.packages = [
- pkgs.chromium
+ home.packages = with pkgs; [
+ chromium
# (pkgs.ungoogled-chromium.override {
# commandLineArgs = [
# "--enable-features=AcceleratedVideoEncoder"
@@ -26,7 +25,7 @@ in {
programs.chromium = {
enable = true;
- enablePlasmaBrowserIntegration = true;
+ # enablePlasmaBrowserIntegration = true;
extensions = let
# create_extension_for = browserVersion: { id, sha256, version }: {
# inherit id;
@@ -64,19 +63,19 @@ in {
# version = "";
# })
];
- defaultSearchProviderEnabled = true;
- defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}";
- extraOpts = {
- "ExtensionManifestV2Availability" = 2;
- "BrowserSignin" = 0;
- "SyncDisabled" = true;
- "PasswordManagerEnabled" = false;
- "SpellcheckEnabled" = true;
- "SpellcheckLanguage" = [
- "nl-NL"
- "en-GB"
- ];
- };
+ # defaultSearchProviderEnabled = true;
+ # defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}";
+ # extraOpts = {
+ # "ExtensionManifestV2Availability" = 2;
+ # "BrowserSignin" = 0;
+ # "SyncDisabled" = true;
+ # "PasswordManagerEnabled" = false;
+ # "SpellcheckEnabled" = true;
+ # "SpellcheckLanguage" = [
+ # "nl-NL"
+ # "en-GB"
+ # ];
+ # };
};
};
}
diff --git a/modules/home/application/discord/default.nix b/modules/home/application/discord/default.nix
new file mode 100644
index 0000000..a736b37
--- /dev/null
+++ b/modules/home/application/discord/default.nix
@@ -0,0 +1,15 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.discord;
+in
+{
+ options.${namespace}.application.discord = {
+ enable = mkEnableOption "enable discord (vesktop)";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ vesktop ];
+ };
+}
diff --git a/modules/home/application/ladybird/default.nix b/modules/home/application/ladybird/default.nix
new file mode 100644
index 0000000..31d7c17
--- /dev/null
+++ b/modules/home/application/ladybird/default.nix
@@ -0,0 +1,15 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.ladybird;
+in
+{
+ options.${namespace}.application.ladybird = {
+ enable = mkEnableOption "enable ladybird";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ ladybird ];
+ };
+}
diff --git a/modules/home/application/obs/default.nix b/modules/home/application/obs/default.nix
new file mode 100644
index 0000000..a2be203
--- /dev/null
+++ b/modules/home/application/obs/default.nix
@@ -0,0 +1,30 @@
+{ config, lib, pkgs, namespace, osConfig ? {}, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.obs;
+in
+{
+ options.${namespace}.application.obs = {
+ enable = mkEnableOption "enable obs";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [
+ obs-studio
+ obs-studio-plugins.wlrobs
+ obs-studio-plugins.obs-backgroundremoval
+ obs-studio-plugins.obs-pipewire-audio-capture
+ ];
+
+ # boot = {
+ # extraModulePackages = with config.boot.kernelPackages; [
+ # v4l2loopback
+ # ];
+
+ # extraModprobeConfig = ''
+ # options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
+ # '';
+ # };
+ };
+}
diff --git a/modules/home/application/onlyoffice/default.nix b/modules/home/application/onlyoffice/default.nix
new file mode 100644
index 0000000..8153b68
--- /dev/null
+++ b/modules/home/application/onlyoffice/default.nix
@@ -0,0 +1,16 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.onlyoffice;
+in
+{
+ options.${namespace}.application.onlyoffice = {
+ enable = mkEnableOption "enable onlyoffice";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ onlyoffice-bin ];
+ # fonts.packages = with pkgs; [ corefonts ];
+ };
+}
diff --git a/modules/home/application/signal/default.nix b/modules/home/application/signal/default.nix
new file mode 100644
index 0000000..f4eb1d0
--- /dev/null
+++ b/modules/home/application/signal/default.nix
@@ -0,0 +1,15 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.signal;
+in
+{
+ options.${namespace}.application.signal = {
+ enable = mkEnableOption "enable signal";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ signal-desktop ];
+ };
+}
diff --git a/modules/home/application/steam/default.nix b/modules/home/application/steam/default.nix
new file mode 100644
index 0000000..4e62c41
--- /dev/null
+++ b/modules/home/application/steam/default.nix
@@ -0,0 +1,55 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.steam;
+in
+{
+ options.${namespace}.application.steam = {
+ enable = mkEnableOption "enable steam";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ protonup ];
+
+ home.sessionVariables = {
+ STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
+ };
+
+ programs = {
+ # steam = {
+ # enable = true;
+ # package = pkgs.steam-small.override {
+ # extraEnv = {
+ # DXVK_HUD = "compiler";
+ # MANGOHUD = true;
+ # };
+ # };
+
+ # gamescopeSession = {
+ # enable = true;
+ # args = ["--immediate-flips"];
+ # };
+ # };
+
+ # https://github.com/FeralInteractive/gamemode
+ # gamemode = {
+ # enable = true;
+ # enableRenice = true;
+ # settings = {};
+ # };
+
+ # gamescope = {
+ # enable = true;
+ # capSysNice = true;
+ # env = {
+ # DXVK_HDR = "1";
+ # ENABLE_GAMESCOPE_WSI = "1";
+ # WINE_FULLSCREEN_FSR = "1";
+ # WLR_RENDERER = "vulkan";
+ # };
+ # args = ["--hdr-enabled"];
+ # };
+ };
+ };
+}
diff --git a/modules/home/application/studio/default.nix b/modules/home/application/studio/default.nix
new file mode 100644
index 0000000..7f8173a
--- /dev/null
+++ b/modules/home/application/studio/default.nix
@@ -0,0 +1,15 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.studio;
+in
+{
+ options.${namespace}.application.studio = {
+ enable = mkEnableOption "enable Bricklink Studio";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs.${namespace}; [ studio ];
+ };
+}
diff --git a/modules/home/application/teamspeak/default.nix b/modules/home/application/teamspeak/default.nix
new file mode 100644
index 0000000..e15bd96
--- /dev/null
+++ b/modules/home/application/teamspeak/default.nix
@@ -0,0 +1,15 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.teamspeak;
+in
+{
+ options.${namespace}.application.teamspeak = {
+ enable = mkEnableOption "enable teamspeak";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ teamspeak_client ];
+ };
+}
diff --git a/modules/home/desktop/applications/email.nix b/modules/home/application/thunderbird/default.nix
similarity index 50%
rename from modules/home/desktop/applications/email.nix
rename to modules/home/application/thunderbird/default.nix
index 7fb8fd3..c05f57b 100644
--- a/modules/home/desktop/applications/email.nix
+++ b/modules/home/application/thunderbird/default.nix
@@ -1,29 +1,25 @@
-{ options, config, lib, pkgs, user, ... }:
+{ inputs, config, lib, pkgs, namespace, ... }:
let
- inherit (lib.modules) mkIf mkForce mkMerge;
- inherit (lib.attrsets) attrValues;
+ inherit (lib) mkIf mkEnableOption;
- cfg = config.modules.${user}.desktop.applications.email;
+ cfg = config.${namespace}.application.thunderbird;
in
{
- options.modules.${user}.desktop.applications.email = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "Enable email client (thunderbird)";
+ options.${namespace}.application.thunderbird = {
+ enable = mkEnableOption "enable thunderbird";
};
- config = mkIf cfg.enable
- {
+ config = mkIf cfg.enable {
programs.thunderbird = {
enable = true;
+ package = pkgs.thunderbird-latest;
+
+ profiles.${config.snowfallorg.user.name} = {
+ isDefault = true;
+ };
};
- home-manager.users.${user} = {
- home.packages = attrValues {
- inherit (pkgs) thunderbird;
- };
-
- accounts.email.accounts = {
+ accounts.email.accounts = {
kruining = {
primary = true;
address = "chris@kruinin.eu";
@@ -34,7 +30,7 @@ in
};
thunderbird = {
enable = true;
- profiles = [ "chris" ];
+ profiles = [ config.snowfallorg.user.name ];
};
};
@@ -48,6 +44,5 @@ in
};
};
};
- };
};
}
diff --git a/modules/home/application/zen/default.nix b/modules/home/application/zen/default.nix
new file mode 100644
index 0000000..4723cc3
--- /dev/null
+++ b/modules/home/application/zen/default.nix
@@ -0,0 +1,19 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.zen;
+in
+{
+ options.${namespace}.application.zen = {
+ enable = mkEnableOption "enable zen";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = [ inputs.zen-browser.packages.${pkgs.system}.specific ];
+
+ home.sessionVariables = {
+ MOZ_ENABLE_WAYLAND = "1";
+ };
+ };
+}
diff --git a/modules/home/default.nix b/modules/home/default.nix
new file mode 100644
index 0000000..e3185e0
--- /dev/null
+++ b/modules/home/default.nix
@@ -0,0 +1,47 @@
+{ pkgs, config, lib, namespace, ... }:
+let
+ inherit (lib) mkOption;
+ inherit (lib.types) enum;
+
+ cfg = config.${namespace}.defaults;
+in {
+ options.${namespace}.defaults = {
+ editor = mkOption {
+ type = enum [ "nano" "nvim" "zed" ];
+ default = "nano";
+ description = "Default editor for text manipulation";
+ example = "nvim";
+ };
+
+ shell = mkOption {
+ type = enum [ "fish" "zsh" "bash" ];
+ default = "zsh";
+ description = "Default shell";
+ example = "zsh";
+ };
+
+ terminal = mkOption {
+ type = enum [ "ghostty" "alacritty" ];
+ default = "ghostty";
+ description = "Default terminal";
+ example = "ghostty";
+ };
+
+ browser = mkOption {
+ type = enum [ "chrome" "ladybird" "zen" ];
+ default = "zen";
+ description = "Default terminal";
+ example = "zen";
+ };
+ };
+
+ config = {
+ home.sessionVariables = {
+ EDITOR = cfg.editor;
+ TERMINAL = cfg.terminal;
+ BROWSER = cfg.browser;
+ };
+
+ # home.shell = pkgs.${cfg.shell};
+ };
+}
diff --git a/modules/home/desktop/applications/communication.nix b/modules/home/desktop/applications/communication.nix
deleted file mode 100644
index 371bf0a..0000000
--- a/modules/home/desktop/applications/communication.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ options, config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf mkForce mkMerge;
- inherit (lib.attrsets) attrValues;
-
- cfg = config.modules.${user}.desktop.applications.communication;
-in
-{
- options.modules.${user}.desktop.applications.communication = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "Enable office suite (only-office)";
- };
-
- config = mkIf cfg.enable
- {
- home-manager.users.${user}.home.packages = with pkgs; [vesktop teamspeak_client signal-desktop];
- };
-}
diff --git a/modules/home/desktop/applications/office.nix b/modules/home/desktop/applications/office.nix
deleted file mode 100644
index 9965144..0000000
--- a/modules/home/desktop/applications/office.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ options, config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf mkForce mkMerge;
- inherit (lib.attrsets) attrValues;
-
- cfg = config.modules.${user}.desktop.applications.office;
-in
-{
- options.modules.${user}.desktop.applications.office = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "Enable office suite (only-office)";
- };
-
- config = mkIf cfg.enable
- {
- home-manager.users.${user}.home.packages = attrValues {
- inherit (pkgs) onlyoffice-bin;
- };
-
-# nixpkgs.config.allowUnfreePredicate = pkg:
-# builtins.elem (lib.getName pkg) [ "corefonts" ];
-
- fonts.packages = with pkgs; [
- corefonts
- ];
- };
-}
diff --git a/modules/home/desktop/applications/passwords.nix b/modules/home/desktop/applications/passwords.nix
deleted file mode 100644
index 9a07bb4..0000000
--- a/modules/home/desktop/applications/passwords.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ options, config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf mkForce mkMerge;
- inherit (lib.attrsets) attrValues;
-
- cfg = config.modules.${user}.desktop.applications.passwords;
-in
-{
- options.modules.${user}.desktop.applications.passwords = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "Enable password manager (bitwarden)";
- };
-
- config = mkIf cfg.enable
- {
- home-manager.users.${user}.home.packages = attrValues {
- inherit (pkgs) bitwarden-desktop;
- };
- };
-}
diff --git a/modules/home/desktop/applications/recording.nix b/modules/home/desktop/applications/recording.nix
deleted file mode 100644
index b8ba73b..0000000
--- a/modules/home/desktop/applications/recording.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ options, config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf mkForce mkMerge;
- inherit (lib.attrsets) attrValues;
-
- cfg = config.modules.${user}.desktop.applications.recording;
-in
-{
- options.modules.${user}.desktop.applications.recording = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "Enable recording software (OBS Studio)";
- };
-
- config = mkIf cfg.enable
- {
- boot = {
- extraModulePackages = with config.boot.kernelPackages; [
- v4l2loopback
- ];
-
- extraModprobeConfig = ''
- options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
- '';
- };
-
- security.polkit.enable = true;
-
- home-manager.users.${user}.home.packages = with pkgs; [
- obs-studio
- obs-studio-plugins.wlrobs
- obs-studio-plugins.obs-backgroundremoval
- obs-studio-plugins.obs-pipewire-audio-capture
- ];
- };
-}
diff --git a/modules/home/desktop/applications/steam.nix b/modules/home/desktop/applications/steam.nix
deleted file mode 100644
index 7f483e7..0000000
--- a/modules/home/desktop/applications/steam.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib) mkEnableOption mkIf mkForce mkMerge;
-
- cfg = config.modules.${user}.desktop.applications.steam;
- desktop = config.modules.${user}.desktop;
-in
-{
- options.modules.${user}.desktop.applications.steam = {
- enable = mkEnableOption "Enable steam, the game/software store";
- hardware.enable = mkEnableOption "Support for steam hardware";
- };
-
- config = mkIf cfg.enable (mkMerge [
- {
- programs.steam = {
- enable = true;
- package = pkgs.steam-small.override {
- extraEnv = {
- DXVK_HUD = "compiler";
- MANGOHUD = true;
- };
- };
- };
- hardware.steam-hardware.enable = mkForce cfg.hardware.enable;
-
- # https://github.com/FeralInteractive/gamemode
- programs.gamemode = {
- enable = true;
- enableRenice = true;
- settings = {};
- };
- }
-
- (mkIf (desktop.type == "wayland") {
- # https://github.com/ValveSoftware/gamescope
- programs.gamescope = {
- enable = true;
- capSysNice = true;
- env = {
- DXVK_HDR = "1";
- ENABLE_GAMESCOPE_WSI = "1";
- WINE_FULLSCREEN_FSR = "1";
- WLR_RENDERER = "vulkan";
- };
- args = ["--hdr-enabled"];
- };
-
- programs.steam.gamescopeSession = {
- enable = true;
- args = ["--immediate-flips"];
- };
- })
- ]);
-}
diff --git a/modules/home/desktop/applications/studio.nix b/modules/home/desktop/applications/studio.nix
deleted file mode 100644
index 940c386..0000000
--- a/modules/home/desktop/applications/studio.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ pkgs, config, lib, user, ... }:
-let
- inherit (lib) mkIf mkEnableOption;
-
- cfg = config.modules.${user}.desktop.applications.studio;
-in
-{
- options.modules.${user}.desktop.applications.studio = {
- enable = mkEnableOption "Enable Bricklink Studio";
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = with pkgs; [
- my.studio
- ];
- };
-}
diff --git a/modules/home/desktop/browsers/default.nix b/modules/home/desktop/browsers/default.nix
deleted file mode 100644
index 6bdfa36..0000000
--- a/modules/home/desktop/browsers/default.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- options,
- config,
- lib,
- pkgs,
- user,
- ...
-}: let
- inherit (lib.modules) mkIf;
- cfg = config.modules.${user}.desktop.browsers;
-in {
- options.modules.${user}.desktop.browsers = let
- inherit (lib.options) mkOption;
- inherit (lib.types) nullOr str;
- in {
- default = mkOption {
- type = nullOr str;
- default = null;
- description = "Default system browser";
- example = "firefox";
- };
- };
-
- config = mkIf (cfg.default != null) {
- home-manager.users.${user}.home.sessionVariables.BROWSER = cfg.default;
- };
-}
diff --git a/modules/home/desktop/browsers/firefox.nix b/modules/home/desktop/browsers/firefox.nix
deleted file mode 100644
index 7512ec9..0000000
--- a/modules/home/desktop/browsers/firefox.nix
+++ /dev/null
@@ -1,233 +0,0 @@
-{ inputs, options, config, lib, pkgs, user, ... }:
-let
- inherit (builtins) toJSON;
- inherit (lib.attrsets) attrValues mapAttrsToList;
- inherit (lib.modules) mkIf mkMerge;
- inherit (lib.strings) concatStrings;
-
- cfg = config.modules.${user}.desktop.browsers.firefox;
- usr = config.users.users.${user};
-in {
- options.modules.${user}.desktop.browsers.firefox = let
- inherit (lib.options) mkEnableOption;
- inherit (lib.types) attrsOf oneOf bool int lines str;
- inherit (lib.my) mkOpt mkOpt';
- in {
- enable = mkEnableOption "Gecko-based libre browser";
- privacy.enable = mkEnableOption "Privacy Focused Firefox fork";
-
- profileName = mkOpt str usr.name;
- settings = mkOpt' (attrsOf (oneOf [bool int str])) {} ''
- Firefox preferences set in user.js
- '';
- extraConfig = mkOpt' lines "" ''
- Extra lines to add to user.js
- '';
- userChrome = mkOpt' lines "" "CSS Styles for Firefox's interface";
- userContent = mkOpt' lines "" "Global CSS Styles for websites";
- };
-
- config = mkMerge [
- (mkIf (config.modules.${user}.desktop.type == "wayland") {
- environment.variables.MOZ_ENABLE_WAYLAND = "1";
- })
-
- (mkIf cfg.enable {
- modules.${user}.desktop.browsers.firefox.settings = {
- # TAB cycle URL's, not buttons..
- "browser.toolbars.keyboard_navigation" = false;
- # Disable annoying translation pop-up!
- "browser.translations.automaticallyPopup" = false;
- # Enables dark-themed flash before page-load:
- "ui.systemUsesDarkTheme" = "1";
- # Developer tools -> uses dark theme
- "devtools.theme" = "dark";
- # FIXME: IM-Wheel -> Manual scroll speed ctrl bcs == buggy...
- "mousewheel.min_line_scroll_amount" = 35;
- # Enables ETP = decent security -> firefox containers = redundent
- "browser.contentblocking.category" = "strict";
- "privacy.donottrackheader.enabled" = true;
- "privacy.donottrackheader.value" = 1;
- "privacy.purge_trackers.enabled" = true;
- # Syncs Firefox toolbar settings across machines
- # WARNING: May not work across OS'es
- "services.sync.prefs.sync.browser.uiCustomization.state" = true;
- # Enables userContent.css and userChrome.css for our theme modules
- "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
- # Stop creating ~/Downloads!
- "browser.download.dir" = "${usr.home}/downloads";
- # Disables built-in password manager -> use external PM!
- "signon.rememberSignons" = false;
- # Firefox, DO NOT CHECK if you are the default browser..
- "browser.shell.checkDefaultBrowser" = false;
- # Disables "New Tab Page" feature
- "browser.newtabpage.enabled" = false;
- # Disables Activity Stream
- "browser.newtabpage.activity-stream.enabled" = false;
- "browser.newtabpage.activity-stream.telemetry" = false;
- # Disables new tab tile ads & preload
- "browser.newtabpage.enhanced" = false;
- "browser.newtabpage.introShown" = true;
- "browser.newtab.preload" = false;
- "browser.newtabpage.directory.ping" = "";
- "browser.newtabpage.directory.source" = "data:text/plain,{}";
- # Reduces search engine noise in the urlbar's completion window
- # PS: Shortcuts and suggestions still work
- "browser.urlbar.suggest.searches" = false;
- "browser.urlbar.shortcuts.bookmarks" = false;
- "browser.urlbar.shortcuts.history" = false;
- "browser.urlbar.shortcuts.tabs" = false;
- "browser.urlbar.showSearchSuggestionsFirst" = false;
- "browser.urlbar.speculativeConnect.enabled" = false;
- # Prevents search terms from being sent to ISP
- "browser.urlbar.dnsResolveSingleWordsAfterSearch" = 0;
- # Disables sponsored search results
- "browser.urlbar.suggest.quicksuggest.nonsponsored" = false;
- "browser.urlbar.suggest.quicksuggest.sponsored" = false;
- # Shows whole URL in address bar
- "browser.urlbar.trimURLs" = false;
- # Disables non-useful funcionality of certain features
- "browser.disableResetPrompt" = true;
- "browser.onboarding.enabled" = false;
- "browser.aboutConfig.showWarning" = false;
- "media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
- "extensions.pocket.enabled" = false;
- "extensions.shield-recipe-client.enabled" = false;
- "reader.parse-on-load.enabled" = false;
- # Allow seperate search-engine usage in private mode!
- "browser.search.separatePrivateDefault.ui.enabled" = true;
-
- # Security-oriented defaults:
- "security.family_safety.mode" = 0;
- # https://blog.mozilla.org/security/2016/10/18/phasing-out-sha-1-on-the-public-web/
- "security.pki.sha1_enforcement_level" = 1;
- # https://github.com/tlswg/tls13-spec/issues/1001
- "security.tls.enable_0rtt_data" = false;
- # Uses Mozilla geolocation service instead of Google if given permission
- "geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
- "geo.provider.use_gpsd" = false;
- # https://support.mozilla.org/en-US/kb/extension-recommendations
- "browser.newtabpage.activity-stream.asrouter.userprefs.cfr" = false;
- "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" =
- false;
- "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" =
- false;
- "extensions.htmlaboutaddons.recommendations.enabled" = false;
- "extensions.htmlaboutaddons.discover.enabled" = false;
- "extensions.getAddons.showPane" = false; # Uses Google Analytics
- "browser.discovery.enabled" = false;
- # Reduces File IO / SSD abuse, 15 seconds -> 30 minutes
- "browser.sessionstore.interval" = "1800000";
- # Disables battery API
- "dom.battery.enabled" = false;
- # Disable cross-site ad-view tracking
- "dom.private-attribution.submission.enabled" = false;
- # Disables "beacon" asynchronous HTTP transfers (used for analytics)
- "beacon.enabled" = false;
- # Disables pinging URIs specified in HTML ping= attributes
- "browser.send_pings" = false;
- # Disables gamepad API to prevent USB device enumeration
- "dom.gamepad.enabled" = false;
- # Prevents guessing domain names on invalid entry in URL-bar
- "browser.fixup.alternate.enabled" = false;
- # Disables telemetry settings
- "toolkit.telemetry.unified" = false;
- "toolkit.telemetry.enabled" = false;
- "toolkit.telemetry.server" = "data:,";
- "toolkit.telemetry.archive.enabled" = false;
- "toolkit.telemetry.coverage.opt-out" = true;
- "toolkit.coverage.opt-out" = true;
- "toolkit.coverage.endpoint.base" = "";
- "experiments.supported" = false;
- "experiments.enabled" = false;
- "experiments.manifest.uri" = "";
- "browser.ping-centre.telemetry" = false;
- # https://mozilla.github.io/normandy/
- "app.normandy.enabled" = false;
- "app.normandy.api_url" = "";
- "app.shield.optoutstudies.enabled" = false;
- # Disables health reports (basically more telemetry)
- "datareporting.healthreport.uploadEnabled" = false;
- "datareporting.healthreport.service.enabled" = false;
- "datareporting.policy.dataSubmissionEnabled" = false;
- # Disables crash reports
- "breakpad.reportURL" = "";
- "browser.tabs.crashReporting.sendReport" = false;
- # Prevents the submission of backlogged reports
- "browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
-
- # Disable automatic Form autofill
- "browser.formfill.enable" = false;
- "extensions.formautofill.addresses.enabled" = false;
- "extensions.formautofill.available" = "off";
- "extensions.formautofill.creditCards.available" = false;
- "extensions.formautofill.creditCards.enabled" = false;
- "extensions.formautofill.heuristics.enabled" = false;
- };
-
- # Use a stable profile name so we can target it in themes
- home-manager.users.${user}.home = {
- packages = let
- inherit (pkgs) makeDesktopItem;
- inherit (inputs.firefox.packages.${pkgs.system}) firefox-nightly-bin;
- in [
- firefox-nightly-bin
- (makeDesktopItem {
- name = "firefox-nightly-private";
- desktopName = "Firefox Nightly (Private)";
- genericName = "Launch a private Firefox Nightly instance";
- icon = "firefox-nightly";
- exec = "${lib.getExe firefox-nightly-bin} --private-window";
- categories = ["Network" "WebBrowser"];
- })
- ];
-
- file = let
- cfgPath = ".mozilla/firefox";
- in {
- firefox-profiles = {
- target = "${cfgPath}/profiles.ini";
- text = ''
- [Profile0]
- Name=default
- IsRelative=1
- Path=${cfg.profileName}.default
- Default=1
-
- [General]
- StartWithLastProfile=1
- Version=2
- '';
- };
-
- user-js = mkIf (cfg.settings != {} || cfg.extraConfig != "") {
- target = "${cfgPath}/${cfg.profileName}.default/user.js";
- text = ''
- ${concatStrings (mapAttrsToList (name: value: ''
- user_pref("${name}", ${toJSON value});
- '')
- cfg.settings)}
- ${cfg.extraConfig}
- '';
- };
-
- user-chrome = mkIf (cfg.userChrome != "") {
- target = "${cfgPath}/${cfg.profileName}.default/chrome/userChrome.css";
- text = cfg.userChrome;
- };
-
- user-content = mkIf (cfg.userContent != "") {
- target = "${cfgPath}/${cfg.profileName}.default/chrome/userContent.css";
- text = cfg.userContent;
- };
- };
- };
- })
-
- (mkIf cfg.privacy.enable {
- home-manager.users.${user}.home.packages = attrValues {
- inherit (pkgs) librewolf;
- };
- })
- ];
-}
diff --git a/modules/home/desktop/browsers/ladybird.nix b/modules/home/desktop/browsers/ladybird.nix
deleted file mode 100644
index b9f698f..0000000
--- a/modules/home/desktop/browsers/ladybird.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.options) mkEnableOption;
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.${user}.desktop.browsers.ladybird;
-in {
- options.modules.${user}.desktop.browsers.ladybird = {
- enable = mkEnableOption "Enable Ladybird";
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = with pkgs; [
- ladybird
- ];
- };
-}
diff --git a/modules/home/desktop/browsers/zen.nix b/modules/home/desktop/browsers/zen.nix
deleted file mode 100644
index cf70760..0000000
--- a/modules/home/desktop/browsers/zen.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{ inputs, options, config, lib, pkgs, user, ... }:
-let
- inherit (builtins) toJSON;
- inherit (lib.attrsets) attrValues mapAttrsToList;
- inherit (lib.modules) mkIf mkMerge;
- inherit (lib.strings) concatStrings;
-
- cfg = config.modules.${user}.desktop.browsers.zen;
-in {
- options.modules.${user}.desktop.browsers.zen = let
- inherit (lib.options) mkEnableOption;
- inherit (lib.types) attrsOf oneOf bool int lines str;
- inherit (lib.my) mkOpt mkOpt';
- in {
- enable = mkEnableOption "Gecko-based libre browser";
- privacy.enable = mkEnableOption "Privacy Focused Firefox fork";
-
- profileName = mkOpt str config.user.name;
- settings = mkOpt' (attrsOf (oneOf [bool int str])) {} ''
- Firefox preferences set in user.js
- '';
- extraConfig = mkOpt' lines "" ''
- Extra lines to add to user.js
- '';
- userChrome = mkOpt' lines "" "CSS Styles for Firefox's interface";
- userContent = mkOpt' lines "" "Global CSS Styles for websites";
- };
-
- config = mkMerge [
- (mkIf (config.modules.${user}.desktop.type == "wayland") {
- environment.variables.MOZ_ENABLE_WAYLAND = "1";
- })
-
- (mkIf cfg.enable {
- home-manager.users.${user}.home.packages = let
- inherit (pkgs) makeDesktopItem;
- inherit (inputs.zen.packages.${pkgs.system}.specific) zen;
- in [
- zen
- ];
- })
- ];
-}
diff --git a/modules/home/desktop/default.nix b/modules/home/desktop/default.nix
deleted file mode 100644
index d281f4e..0000000
--- a/modules/home/desktop/default.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ lib, user, ... }:
-let
- inherit (lib.types) either str;
- inherit (lib.my) mkOpt;
-in
-{
- options.modules.${user}.desktop = {
- type = mkOpt (either str null) "wayland";
- };
-}
diff --git a/modules/home/desktop/editors/default.nix b/modules/home/desktop/editors/default.nix
deleted file mode 100644
index 292f324..0000000
--- a/modules/home/desktop/editors/default.nix
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- config,
- options,
- lib,
- pkgs,
- user,
- ...
-}: let
- inherit (lib.attrsets) attrValues;
- inherit (lib.modules) mkIf mkMerge;
- cfg = config.modules.${user}.desktop.editors;
-in {
- options.modules.${user}.desktop.editors = let
- inherit (lib.options) mkOption;
- inherit (lib.types) nullOr enum;
- in {
- default = mkOption {
- type = nullOr (enum [ "nano" "nvim" "zed" "kate" "vscodium" ]);
- default = "nano";
- description = "Default editor for text manipulation";
- example = "nvim";
- };
- };
-
- config = mkMerge [
- (mkIf (cfg.default != null) {
- home-manager.users.${user}.home.sessionVariables = {
- EDITOR = cfg.default;
- };
- })
-
- (mkIf (cfg.default == "nvim") {
- home-manager.users.${user}.home.packages = attrValues {
- inherit (pkgs) imagemagick editorconfig-core-c sqlite deno pandoc nuspell;
- inherit (pkgs.hunspellDicts) nl_NL en_GB-ise;
- };
- })
- ];
-}
diff --git a/modules/home/desktop/editors/kate.nix b/modules/home/desktop/editors/kate.nix
deleted file mode 100644
index 9e030e5..0000000
--- a/modules/home/desktop/editors/kate.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ config, options, lib, pkgs, user, ... }:
-let
- inherit (lib.meta) getExe;
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.${user}.desktop.editors.kate;
-in
-{
- options.modules.${user}.desktop.editors.kate = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "kate";
- };
-
- config = mkIf cfg.enable {
- home-manager.users.${user}.programs.kate.enable = true;
- };
-}
diff --git a/modules/home/desktop/editors/nano.nix b/modules/home/desktop/editors/nano.nix
deleted file mode 100644
index ff39996..0000000
--- a/modules/home/desktop/editors/nano.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ config, options, lib, pkgs, user, ... }:
-let
- inherit (lib.meta) getExe;
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.${user}.desktop.editors.nano;
-in
-{
- options.modules.${user}.desktop.editors.nano = let
- inherit (lib.options) mkEnableOption;
- in { enable = mkEnableOption "nano"; };
-
- config = mkIf cfg.enable {
- home-manager.users.${user}.home.packages = with pkgs; [
- nano
- ];
-
- programs.nano = {
- enable = true;
- syntaxHighlight = true;
- nanorc = ''
- set autoindent
- set jumpyscrolling
- set linenumbers
- set mouse
- set saveonexit
- set smarthome
- set tabstospaces
- set tabsize 2
- '';
- };
- };
-}
diff --git a/modules/home/desktop/editors/nvim.nix b/modules/home/desktop/editors/nvim.nix
deleted file mode 100644
index 9a738d5..0000000
--- a/modules/home/desktop/editors/nvim.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{ config, lib, user, ... }:
-let
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.${user}.desktop.editors.nvim;
-in
-{
- options.modules.${user}.desktop.editors.nvim = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "neo-vim (nixvim)";
- };
-
- config = mkIf cfg.enable {
- modules.desktop.editors.nvim.enable = true;
-
- programs.nvf = {
- enable = true;
- settings = {
- vim = {
- statusline.lualine.enable = true;
- telescope.enable = true;
- autocomplete.nvim-cmp.enable = true;
-
- lsp.enable = true;
-
- languages = {
- enableTreesitter = true;
-
- nix.enable = true;
- ts.enable = true;
- rust.enable = true;
- };
- };
- };
- };
- };
-}
diff --git a/modules/home/desktop/editors/vscodium.nix b/modules/home/desktop/editors/vscodium.nix
deleted file mode 100644
index 93524bc..0000000
--- a/modules/home/desktop/editors/vscodium.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
- inherit (lib.attrsets) attrValues;
-
- cfg = config.modules.${user}.desktop.editors.vscodium;
-in
-{
- options.modules.${user}.desktop.editors.vscodium = let
- inherit (lib.options) mkEnableOption;
- in { enable = mkEnableOption "vscodium"; };
-
- config = mkIf cfg.enable {
- home-manager.users.${user}.home.packages = attrValues {
- inherit (pkgs) vscodium;
- };
- };
-}
diff --git a/modules/home/desktop/editors/zed.nix b/modules/home/desktop/editors/zed.nix
deleted file mode 100644
index cbaafa3..0000000
--- a/modules/home/desktop/editors/zed.nix
+++ /dev/null
@@ -1,75 +0,0 @@
-{ config, lib, pkgs, user, ... }: let
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.${user}.desktop.editors.zed;
-in {
- options.modules.${user}.desktop.editors.zed = let
- inherit (lib.options) mkEnableOption;
- in {enable = mkEnableOption "zed";};
-
- config = mkIf cfg.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [
- zed-editor nixd nil alejandra
- ];
-
- programs.zed-editor = {
- enable = true;
-
- extensions = ["nix" "toml" "html"];
-
- userSettings = {
- assistant.enabled = false;
-
- vim_mode = false;
- load_direnv = "shell_hook";
- base_keymap = "JetBrains";
-
- format_on_save = "on";
- bindings = {
- "ctrl+s" = "workspace::SaveAll";
- };
-
- tabs = {
- file_icons = true;
- git_status = true;
- };
- project_panel.auto_reveal_entries = false;
-
- "experimental.theme_overrides" = {
- border = "#ffffff07";
- };
-
- hour_format = "hour24";
- auto_update = false;
-
- lsp = {
- nixd = {};
- nil = {
- initialization_options = {
- nix = {
- flake = {
- autoArchive = true;
- };
- };
- formatting = {
- command = ["alejandra" "--quiet" "--"];
- };
- };
- binary = {
- path_lookup = true;
- };
- };
- };
-
- languages = {
- "Nix" = {
- language_servers = ["nixd" "nil"];
- format_on_save = "on";
- };
- };
- };
- };
- };
- };
-}
diff --git a/modules/home/desktop/games/default.nix b/modules/home/desktop/games/default.nix
deleted file mode 100644
index 8e4bb22..0000000
--- a/modules/home/desktop/games/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ config, lib, pkgs, user, ... }: let
- inherit (lib) mkEnableOption mkIf;
-
- cfg = config.modules.${user}.desktop.games;
-in
-{
- options.modules.${user}.desktop.games = {
- enable = mkEnableOption "enable proton GE";
- };
-
- config = mkIf cfg.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [ protonup ];
-
- home.sessionVariables = {
- STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
- };
- };
- };
-}
diff --git a/modules/home/desktop/games/minecraft.nix b/modules/home/desktop/games/minecraft.nix
deleted file mode 100644
index b56fceb..0000000
--- a/modules/home/desktop/games/minecraft.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ options, config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf mkForce mkMerge;
- inherit (lib.attrsets) attrValues;
-
- cfg = config.modules.${user}.desktop.games.minecraft;
-in
-{
- options.modules.${user}.desktop.games.minecraft = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "minecraft (Modrinth)";
- };
-
- config = mkIf cfg.enable {
- # environment.systemPackages = [
- # pkgs.minecract
- # ];
- home-manager.users.${user}.home.packages = attrValues {
- inherit (pkgs) prismlauncher;
- };
- };
-}
diff --git a/modules/home/desktop/plasma.nix b/modules/home/desktop/plasma.nix
deleted file mode 100644
index c7ee813..0000000
--- a/modules/home/desktop/plasma.nix
+++ /dev/null
@@ -1,286 +0,0 @@
-{ inputs, config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.${user}.desktop.plasma;
-in
-{
- options.modules.${user}.desktop.plasma = let
- inherit (lib.options) mkEnableOption mkOption;
- in {
- enable = mkEnableOption "plasma 6";
-
- autoLogin = mkOption {
- type = lib.types.bool;
- default = false;
- example = true;
- description = "Enable plasma's auto login feature.";
- };
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = with pkgs.kdePackages; [
- kcoreaddons
- ];
-
- environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter oxygen ];
- environment.sessionVariables.NIXOS_OZONE_WL = "1";
-
- services = {
- xserver.enable = true;
-
- desktopManager.plasma6.enable = true;
-
- displayManager = {
- defaultSession = "plasma";
- sddm = {
- enable = true;
- wayland.enable = true;
- };
- autoLogin = mkIf cfg.autoLogin {
- enable = true;
- inherit user;
- };
- };
- };
-
- # should enable theme integration with gtk apps (i.e. firefox, thunderbird)
- programs.dconf.enable = true;
-
- home-manager = {
- sharedModules = [
- inputs.plasma-manager.homeManagerModules.plasma-manager
- ];
-
- users.${user}.programs.plasma = {
- enable = true;
- immutableByDefault = true;
- windows.allowWindowsToRememberPositions = true;
-
- session = {
- general.askForConfirmationOnLogout = false;
- sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout";
- };
-
- workspace = {
- clickItemTo = "select";
- colorScheme = "EverforestDark";
- wallpaper = config.stylix.image;
- };
-
- spectacle.shortcuts = {
- captureRectangularRegion = "Meta+Shift+S";
- };
-
- kwin = {
- edgeBarrier = 0;
- cornerBarrier = false;
-
- effects = {
- translucency.enable = true;
-
- blur = {
- enable = true;
- strength = 5;
- noiseStrength = 5;
- };
-
- snapHelper.enable = true;
- };
- };
-
- panels = [
- # Windows-like panel at the bottom
- {
- location = "bottom";
- floating = true;
- lengthMode = "fill";
- height = 42;
- hiding = "none";
- screen = "all";
- widgets = [
- {
- panelSpacer = {
- expanding = true;
- };
- }
- {
- kickoff = {
- applicationsDisplayMode = "list";
- compactDisplayStyle = false;
- favoritesDisplayMode = "grid";
- sortAlphabetically = true;
- showButtonsFor = {
- custom = [
- "shutdown"
- "reboot"
- "logout"
- "lock-screen"
- ];
- };
- showActionButtonCaptions = true;
- };
- }
- # {
- # appMenu = {
- # compactView = false;
- # };
- # }
- {
- iconTasks = {
- appearance = {
- fill = false;
- highlightWindows = true;
- iconSpacing = "medium";
- indicateAudioStreams = true;
- rows = {
- multirowView = "never";
- maximum = null;
- };
- showTooltips = true;
- };
- behavior = {
- grouping = {
- clickAction = "showPresentWindowsEffect";
- method = "byProgramName";
- };
- minimizeActiveTaskOnClick = true;
- newTasksAppearOn = "right";
- showTasks = {
- onlyInCurrentActivity = true;
- onlyInCurrentDesktop = true;
- onlyMinimized = false;
- onlyInCurrentScreen = false;
- };
- sortingMethod = "manually";
- unhideOnAttentionNeeded = true;
- wheel = {
- ignoreMinimizedTasks = true;
- switchBetweenTasks = true;
- };
- };
- launchers = [
- "preferred://filemanager"
- "preferred://browser"
- "preferred://terminalemulator"
- "preferred://email"
- "applications:zededitor.desktop"
- "applications:vesktop.desktop"
- "applications:steam.desktop"
- ];
- };
- }
- {
- panelSpacer = {
- expanding = true;
- };
- }
- {
- systemTray = {
- icons = {
- scaleToFit = true;
- spacing = "small";
- };
- items = {
- hidden = [
- "org.kde.plasma.brightness"
- ];
- };
- pin = false;
- };
- }
- {
- digitalClock = {
- date = {
- enable = true;
- format = "shortDate";
- position = "belowTime";
- };
- time = {
- format = "24h";
- showSeconds = "onlyInTooltip";
- };
- };
- }
- ];
- }
- ];
-
- powerdevil = {
- AC = {
- powerButtonAction = "shutDown";
- whenLaptopLidClosed = "doNothing";
-
- autoSuspend.action = "nothing";
- dimDisplay.enable = false;
-
- turnOffDisplay = {
- idleTimeout = "never";
- };
- };
-
- battery = {
- powerButtonAction = "shutDown";
- whenLaptopLidClosed = "doNothing";
-
- autoSuspend.action = "nothing";
- dimDisplay.enable = false;
-
- turnOffDisplay = {
- idleTimeout = "never";
- };
- };
-
- lowBattery = {
- powerButtonAction = "shutDown";
- whenLaptopLidClosed = "doNothing";
-
- autoSuspend.action = "nothing";
- dimDisplay.enable = false;
-
- turnOffDisplay = {
- idleTimeout = "never";
- };
- };
- };
-
- kscreenlocker = {
- autoLock = false;
- lockOnResume = false;
- lockOnStartup = false;
-
- appearance = {
- alwaysShowClock = true;
- showMediaControls = true;
- };
- };
-
- configFile = {
- baloofilerc = {
-
- };
- kdeglobals = {
- General = {
- # enable font antialiasing
- XftAntialias = true;
- XftHintStyle = "hintslight";
- XftSubPixel = "rgb";
- };
- };
- kwalletrc = {
- Wallet.Enabled = false;
- };
- plasmarc = {
- General = {
- RaiseMaximumVolume = true;
- VolumeStep = 2;
- };
- };
- kcminputrc = {
- Keyboard.NumLock.value = 0;
- };
- };
- };
- };
- };
-}
diff --git a/modules/home/desktop/plasma/default.nix b/modules/home/desktop/plasma/default.nix
new file mode 100644
index 0000000..8614a97
--- /dev/null
+++ b/modules/home/desktop/plasma/default.nix
@@ -0,0 +1,78 @@
+{ config, lib, namespace, osConfig ? {}, ... }:
+let
+ inherit (lib) mkIf;
+
+ cfg = config.${namespace}.desktop.plasma;
+ osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; };
+in
+{
+ options.${namespace}.desktop.plasma = {
+
+ };
+
+ config = mkIf osCfg.enable {
+ programs.plasma = {
+ enable = true;
+
+ immutableByDefault = true;
+ windows.allowWindowsToRememberPositions = true;
+
+ panels = import ./panels.nix;
+ powerdevil = import ./power.nix;
+
+ session = {
+ general.askForConfirmationOnLogout = false;
+ sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout";
+ };
+
+ workspace = {
+ clickItemTo = "select";
+ colorScheme = "EverforestDark";
+ wallpaper = config.stylix.image;
+ };
+
+ spectacle.shortcuts = {
+ captureRectangularRegion = "Meta+Shift+S";
+ };
+
+ kscreenlocker = {
+ autoLock = false;
+ lockOnResume = false;
+ lockOnStartup = false;
+
+ appearance = {
+ alwaysShowClock = true;
+ showMediaControls = true;
+ };
+ };
+
+ configFile = {
+ baloofilerc."Basic Settings"."Indexing-Enabled" = false;
+
+ kdeglobals = {
+ General = {
+ # enable font antialiasing
+ XftAntialias = true;
+ XftHintStyle = "hintslight";
+ XftSubPixel = "rgb";
+ };
+ };
+
+ kwalletrc = {
+ Wallet.Enabled = false;
+ };
+
+ plasmarc = {
+ General = {
+ RaiseMaximumVolume = true;
+ VolumeStep = 2;
+ };
+ };
+
+ kcminputrc = {
+ Keyboard.NumLock.value = 0;
+ };
+ };
+ };
+ };
+}
diff --git a/modules/home/desktop/plasma/panels.nix b/modules/home/desktop/plasma/panels.nix
new file mode 100644
index 0000000..52212b7
--- /dev/null
+++ b/modules/home/desktop/plasma/panels.nix
@@ -0,0 +1,109 @@
+[
+ {
+ location = "bottom";
+ floating = true;
+ lengthMode = "fill";
+ height = 42;
+ hiding = "none";
+ screen = "all";
+ widgets = [
+ {
+ panelSpacer = {
+ expanding = true;
+ };
+ }
+ {
+ kickoff = {
+ applicationsDisplayMode = "list";
+ compactDisplayStyle = false;
+ favoritesDisplayMode = "grid";
+ sortAlphabetically = true;
+ showButtonsFor = {
+ custom = [
+ "shutdown"
+ "reboot"
+ "logout"
+ "lock-screen"
+ ];
+ };
+ showActionButtonCaptions = true;
+ };
+ }
+ {
+ iconTasks = {
+ appearance = {
+ fill = false;
+ highlightWindows = true;
+ iconSpacing = "medium";
+ indicateAudioStreams = true;
+ rows = {
+ multirowView = "never";
+ maximum = null;
+ };
+ showTooltips = true;
+ };
+ behavior = {
+ grouping = {
+ clickAction = "showPresentWindowsEffect";
+ method = "byProgramName";
+ };
+ minimizeActiveTaskOnClick = true;
+ newTasksAppearOn = "right";
+ showTasks = {
+ onlyInCurrentActivity = true;
+ onlyInCurrentDesktop = true;
+ onlyMinimized = false;
+ onlyInCurrentScreen = false;
+ };
+ sortingMethod = "manually";
+ unhideOnAttentionNeeded = true;
+ wheel = {
+ ignoreMinimizedTasks = true;
+ switchBetweenTasks = true;
+ };
+ };
+ launchers = [
+ "preferred://filemanager"
+ "preferred://browser"
+ "preferred://terminalemulator"
+ "preferred://email"
+ "applications:vesktop.desktop"
+ "applications:steam.desktop"
+ ];
+ };
+ }
+ {
+ panelSpacer = {
+ expanding = true;
+ };
+ }
+ {
+ systemTray = {
+ icons = {
+ scaleToFit = true;
+ spacing = "small";
+ };
+ items = {
+ hidden = [
+ "org.kde.plasma.brightness"
+ ];
+ };
+ pin = false;
+ };
+ }
+ {
+ digitalClock = {
+ date = {
+ enable = true;
+ format = "shortDate";
+ position = "belowTime";
+ };
+ time = {
+ format = "24h";
+ showSeconds = "onlyInTooltip";
+ };
+ };
+ }
+ ];
+ }
+]
\ No newline at end of file
diff --git a/modules/home/desktop/plasma/power.nix b/modules/home/desktop/plasma/power.nix
new file mode 100644
index 0000000..e7cc4e2
--- /dev/null
+++ b/modules/home/desktop/plasma/power.nix
@@ -0,0 +1,37 @@
+{
+ AC = {
+ powerButtonAction = "shutDown";
+ whenLaptopLidClosed = "doNothing";
+
+ autoSuspend.action = "nothing";
+ dimDisplay.enable = false;
+
+ turnOffDisplay = {
+ idleTimeout = "never";
+ };
+ };
+
+ battery = {
+ powerButtonAction = "shutDown";
+ whenLaptopLidClosed = "doNothing";
+
+ autoSuspend.action = "nothing";
+ dimDisplay.enable = false;
+
+ turnOffDisplay = {
+ idleTimeout = "never";
+ };
+ };
+
+ lowBattery = {
+ powerButtonAction = "shutDown";
+ whenLaptopLidClosed = "doNothing";
+
+ autoSuspend.action = "nothing";
+ dimDisplay.enable = false;
+
+ turnOffDisplay = {
+ idleTimeout = "never";
+ };
+ };
+}
diff --git a/modules/home/desktop/terminal/alacritty.nix b/modules/home/desktop/terminal/alacritty.nix
deleted file mode 100644
index 76e528d..0000000
--- a/modules/home/desktop/terminal/alacritty.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- config,
- lib,
- pkgs,
- user,
- ...
-}: let
- inherit (lib.meta) getExe;
- inherit (lib.modules) mkIf mkMerge;
-in {
- options.modules.${user}.desktop.terminal.alacritty = let
- inherit (lib.options) mkEnableOption;
- in { enable = mkEnableOption "OpenGL terminal emulator"; };
-
- config = mkIf config.modules.${user}.desktop.terminal.alacritty.enable {
- modules.${user}.shell.toolset.tmux.enable = true;
-
- home-manager.users.${user}.programs.alacritty = {
- enable = true;
-
- settings = mkMerge [
- {
- env = {
- TERM = "xterm-256color";
- WINIT_X11_SCALE_FACTOR = "1.0";
- };
-
- window.dynamic_title = true;
-
- scrolling = {
- history = 5000;
- multiplier = 3;
- };
-
- selection = {
- semantic_escape_chars = '',│`|:"' ()[]{}<>'';
- save_to_clipboard = false;
- };
-
- general.live_config_reload = true;
-
- terminal.shell = {
- program = "${getExe pkgs.zsh}";
- args = ["-l" "-c" "tmux new || tmux"];
- };
- }
- ];
- };
- };
-}
diff --git a/modules/home/desktop/terminal/default.nix b/modules/home/desktop/terminal/default.nix
deleted file mode 100644
index d408215..0000000
--- a/modules/home/desktop/terminal/default.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ config, options, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkDefault mkIf mkMerge;
-
- cfg = config.modules.${user}.desktop.terminal;
-in {
- options.modules.${user}.desktop.terminal = let
- inherit (lib.options) mkOption;
- inherit (lib.types) str;
- in {
- default = mkOption {
- type = str;
- default = "alacrity";
- description = "Default terminal";
- example = "alacrity";
- };
- };
-
- config = mkMerge [
- {
- home-manager.users.${user}.home.sessionVariables.TERMINAL = cfg.default;
- }
- ];
-}
diff --git a/modules/home/desktop/terminal/ghostty.nix b/modules/home/desktop/terminal/ghostty.nix
deleted file mode 100644
index 7c2eb29..0000000
--- a/modules/home/desktop/terminal/ghostty.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- config,
- options,
- lib,
- pkgs,
- user,
- ...
-}: let
- inherit (builtins) toString;
- inherit (lib.meta) getExe;
- inherit (lib.modules) mkIf mkMerge;
-in {
- options.modules.${user}.desktop.terminal.ghostty = let
- inherit (lib.options) mkEnableOption;
- in { enable = mkEnableOption "ghostty"; };
-
- config = mkIf config.modules.${user}.desktop.terminal.ghostty.enable {
- environment.systemPackages = [
- pkgs.ghostty
- ];
-
- modules.${user}.shell.toolset.tmux.enable = true;
-
- home-manager.users.${user}.programs.ghostty = {
- enable = true;
- settings = {
- background-blur-radius = 20;
- theme = "dark:stylix,light:stylix";
- window-theme = (config.modules.${user}.themes.polarity or "dark");
- background-opacity = 0.8;
- minimum-contrast = 1.1;
- };
- };
- };
-}
diff --git a/modules/home/develop/default.nix b/modules/home/develop/default.nix
deleted file mode 100644
index ecb8664..0000000
--- a/modules/home/develop/default.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ config, lib, user, ... }:
-let
- inherit (lib.modules) mkIf;
-in
-{
- options.modules.${user}.develop = let
- inherit (lib.options) mkEnableOption;
- in
- {
- xdg.enable = mkEnableOption "XDG-related conf" // { default = true; };
- };
-
- config = mkIf config.modules.${user}.develop.xdg.enable {
-
- };
-}
diff --git a/modules/home/develop/dotnet.nix b/modules/home/develop/dotnet.nix
deleted file mode 100644
index 386d0a0..0000000
--- a/modules/home/develop/dotnet.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ inputs, config, options, lib, pkgs, user, ... }:
-let
- inherit (lib.attrsets) attrValues;
- inherit (lib.modules) mkIf mkMerge;
-in
-{
- options.modules.${user}.develop.dotnet = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption ".NET developmnt";
- };
-
- config = mkIf config.modules.${user}.develop.dotnet.enable {
- home-manager.users.${user}.home.packages = attrValues {
- inherit (pkgs) dotnet-sdk_8;
- };
- };
-}
diff --git a/modules/home/develop/js.nix b/modules/home/develop/js.nix
deleted file mode 100644
index 80ced1b..0000000
--- a/modules/home/develop/js.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ inputs, config, options, lib, pkgs, user, ... }:
-let
- inherit (lib.attrsets) attrValues;
- inherit (lib.modules) mkIf mkMerge;
-in
-{
- options.modules.${user}.develop.js = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "JS developmnt";
- };
-
- config = mkMerge [
- (mkIf config.modules.${user}.develop.js.enable {
- home-manager.users.${user}.home.packages = with pkgs; [
- bun
- nodejs
- nodePackages_latest.typescript-language-server
- ];
-
- })
-
- (mkIf config.modules.${user}.develop.xdg.enable {
- # home = {
- # };
- })
- ];
-}
diff --git a/modules/home/develop/rust.nix b/modules/home/develop/rust.nix
deleted file mode 100644
index a194ab6..0000000
--- a/modules/home/develop/rust.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ inputs, config, options, lib, pkgs, user, ... }:
-let
- inherit (lib.attrsets) attrValues;
- inherit (lib.modules) mkIf mkMerge;
- inherit (lib.meta) getExe;
-in
-{
- options.modules.${user}.develop.rust = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "Rust developmnt";
- };
-
- config = mkMerge [
-# (mkIf config.modules.${user}.develop.rust.enable {
-# # nixpkgs.overlays = [inputs.rust.overlays.default];
-#
-# home-manager.users.${user}.home.packages = attrValues {
-# # rust-package = pkgs.rust-bin.stable.latest.default;
-# # inherit (pkgs) rust-analyzer rust-script;
-# };
-#
-# environment.shellAliases = {
-# rs = "rustc";
-# ca = "cargo";
-# };
-# })
-#
-# (mkIf config.module.${user}s.develop.xdg.enable {
-# home-manager.users.${user}.home = {
-# sessionVariables.CARGO_HOME = "$XDG_DATA_HOME/cargo";
-# sessionPath = ["$CARGO_HOME/bin"];
-# };
-# })
- ];
-}
diff --git a/modules/home/development/dotnet/default.nix b/modules/home/development/dotnet/default.nix
new file mode 100644
index 0000000..7ed848e
--- /dev/null
+++ b/modules/home/development/dotnet/default.nix
@@ -0,0 +1,15 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkEnableOption mkIf;
+
+ cfg = config.${namespace}.development.dotnet;
+in
+{
+ options.${namespace}.development.dotnet = {
+ enable = mkEnableOption "Enable dotnet development tools";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ dotnet-sdk_8 ];
+ };
+}
diff --git a/modules/home/development/javascript/default.nix b/modules/home/development/javascript/default.nix
new file mode 100644
index 0000000..e649c86
--- /dev/null
+++ b/modules/home/development/javascript/default.nix
@@ -0,0 +1,15 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkEnableOption mkIf;
+
+ cfg = config.${namespace}.development.javascript;
+in
+{
+ options.${namespace}.development.javascript = {
+ enable = mkEnableOption "Enable javascript development tools";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ bun nodejs nodePackages_latest.typescript-language-server ];
+ };
+}
diff --git a/modules/home/development/rust/default.nix b/modules/home/development/rust/default.nix
new file mode 100644
index 0000000..4208c68
--- /dev/null
+++ b/modules/home/development/rust/default.nix
@@ -0,0 +1,15 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkEnableOption mkIf;
+
+ cfg = config.${namespace}.development.rust;
+in
+{
+ options.${namespace}.development.rust = {
+ enable = mkEnableOption "Enable rust development tools";
+ };
+
+ config = mkIf cfg.enable {
+
+ };
+}
diff --git a/modules/home/editor/nano/default.nix b/modules/home/editor/nano/default.nix
new file mode 100644
index 0000000..870db8e
--- /dev/null
+++ b/modules/home/editor/nano/default.nix
@@ -0,0 +1,30 @@
+{ config, options, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkEnableOption mkIf;
+
+ cfg = config.${namespace}.editor.nano;
+in
+{
+ options.${namespace}.editor.nano = {
+ enable = mkEnableOption "nano";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ nano ];
+
+ # programs.nano = {
+ # enable = true;
+ # syntaxHighlight = true;
+ # nanorc = ''
+ # set autoindent
+ # set jumpyscrolling
+ # set linenumbers
+ # set mouse
+ # set saveonexit
+ # set smarthome
+ # set tabstospaces
+ # set tabsize 2
+ # '';
+ # };
+ };
+}
diff --git a/modules/home/editor/nvim/default.nix b/modules/home/editor/nvim/default.nix
new file mode 100644
index 0000000..162772f
--- /dev/null
+++ b/modules/home/editor/nvim/default.nix
@@ -0,0 +1,46 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.editor.nvim;
+in
+{
+ # imports = [
+ # inputs.nvf.nixosModules.default
+ # ];
+
+ options.${namespace}.editor.nvim = {
+ enable = mkEnableOption "enable nvim via nvf on user level";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [
+ imagemagick
+ editorconfig-core-c
+ sqlite
+ pandoc
+ nuspell
+ hunspellDicts.nl_NL
+ hunspellDicts.en_GB-ise
+ ];
+
+ # programs.nvf = {
+ # enable = true;
+ # settings.vim = {
+ # statusline.lualine.enable = true;
+ # telescope.enable = true;
+ # autocomplete.nvim-cmp.enable = true;
+
+ # lsp.enable = true;
+
+ # languages = {
+ # enableTreesitter = true;
+
+ # nix.enable = true;
+ # ts.enable = true;
+ # rust.enable = true;
+ # };
+ # };
+ # };
+ };
+}
diff --git a/modules/home/editor/zed/default.nix b/modules/home/editor/zed/default.nix
new file mode 100644
index 0000000..b35acba
--- /dev/null
+++ b/modules/home/editor/zed/default.nix
@@ -0,0 +1,73 @@
+{ config, lib, pkgs, namespace, ... }: let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.editor.zed;
+in {
+ options.${namespace}.editor.zed = {
+ enable = mkEnableOption "zed";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [
+ zed-editor nixd nil alejandra
+ ];
+
+ programs.zed-editor = {
+ enable = true;
+
+ extensions = [ "nix" "toml" "html" ];
+
+ userSettings = {
+ assistant.enabled = false;
+
+ vim_mode = false;
+ load_direnv = "shell_hook";
+ base_keymap = "JetBrains";
+
+ format_on_save = "on";
+ bindings = {
+ "ctrl+s" = "workspace::SaveAll";
+ };
+
+ tabs = {
+ file_icons = true;
+ git_status = true;
+ };
+ project_panel.auto_reveal_entries = false;
+
+ "experimental.theme_overrides" = {
+ border = "#ffffff07";
+ };
+
+ hour_format = "hour24";
+ auto_update = false;
+
+ lsp = {
+ nixd = {};
+ nil = {
+ initialization_options = {
+ nix = {
+ flake = {
+ autoArchive = true;
+ };
+ };
+ formatting = {
+ command = ["alejandra" "--quiet" "--"];
+ };
+ };
+ binary = {
+ path_lookup = true;
+ };
+ };
+ };
+
+ languages = {
+ "Nix" = {
+ language_servers = ["nixd" "nil"];
+ format_on_save = "on";
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/modules/home/game/minecraft/default.nix b/modules/home/game/minecraft/default.nix
new file mode 100644
index 0000000..e5dedc6
--- /dev/null
+++ b/modules/home/game/minecraft/default.nix
@@ -0,0 +1,15 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.game.minecraft;
+in
+{
+ options.${namespace}.game.minecraft = {
+ enable = mkEnableOption "enable minecraft";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ prismlauncher ];
+ };
+}
diff --git a/modules/home/home-manager/default.nix b/modules/home/home-manager/default.nix
new file mode 100644
index 0000000..93bae2e
--- /dev/null
+++ b/modules/home/home-manager/default.nix
@@ -0,0 +1,10 @@
+{ lib, osConfig ? { }, ... }:
+let
+ inherit (lib) mkDefault;
+in
+{
+ systemd.user.startServices = "sd-switch";
+ programs.home-manager.enable = true;
+
+ home.stateVersion = mkDefault (osConfig.system.stateVersion or "25.05");
+}
\ No newline at end of file
diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix
index 3613c76..d1df4cb 100644
--- a/modules/home/shell/default.nix
+++ b/modules/home/shell/default.nix
@@ -1,32 +1,17 @@
-{ config, lib, pkgs, user, ... }:
+{ config, lib, pkgs, namespace, ... }:
let
- inherit (lib.attrsets) attrValues;
- inherit (lib.modules) mkIf mkMerge;
- inherit (lib.options) mkOption mkEnableOption;
- inherit (lib.types) nullOr enum;
+ inherit (lib) mkIf mkMerge mkEnableOption mkDefault;
- cfg = config.modules.${user}.shell;
+ cfg = config.${namespace}.shell;
in
{
- options.modules.${user}.shell = {
- default = mkOption {
- type = nullOr (enum ["fish" "zsh" "bash"]);
- default = null;
- description = "Default system shell";
- };
-
+ options.${namespace}.shell = {
corePkgs.enable = mkEnableOption "core shell packages";
};
config = mkMerge [
- (mkIf (cfg.default != null) {
- users.defaultUserShell = pkgs."${cfg.default}";
-
- # modules.${user}.shell.toolset.gnupg.enable = true;
- })
-
- (mkIf cfg.corePkgs.enable {
- modules.${user}.shell.toolset = {
+ (mkIf (cfg.corePkgs.enable) {
+ ${namespace}.shell.toolset = mkDefault {
bat.enable = true;
btop.enable = true;
eza.enable = true;
@@ -37,33 +22,21 @@ in
yazi.enable = true;
zoxide.enable = true;
};
+ })
- home-manager.users.${user} = {
- home.packages = attrValues {
- inherit (pkgs) any-nix-shell pwgen yt-dlp ripdrag;
- inherit (pkgs) fd;
+ ({
+ home.packages = with pkgs; [ any-nix-shell pwgen yt-dlp ripdrag fd (ripgrep.override {withPCRE2 = true;}) ];
- rgFull = pkgs.ripgrep.override {withPCRE2 = true;};
- };
-
- home.shellAliases = {
- # ls = "eza -a";
- # cat = "bat -pp";
- # y = "yazi";
- # zed = "zeditor .";
- };
-
- programs = {
- direnv = {
- enable = true;
- config.global = {
- load_dotenv = true;
- strict_env = true;
- hide_env_diff = true;
- };
- nix-direnv.enable = true;
- config.whitelist.prefix = ["/home"];
+ programs = {
+ direnv = {
+ enable = true;
+ config.global = {
+ load_dotenv = true;
+ strict_env = true;
+ hide_env_diff = true;
};
+ nix-direnv.enable = true;
+ config.whitelist.prefix = ["/home"];
};
};
})
diff --git a/modules/home/shell/toolset/bat.nix b/modules/home/shell/toolset/bat.nix
deleted file mode 100644
index a1d2177..0000000
--- a/modules/home/shell/toolset/bat.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
- inherit (lib.options) mkEnableOption;
-
- cfg = config.modules.${user}.shell.toolset.bat;
-in
-{
- options.modules.${user}.shell.toolset.bat = {
- enable = mkEnableOption "cat replacement";
- };
-
- config = mkIf cfg.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [ bat ];
-
- programs.bat = {
- enable = true;
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/bat/default.nix b/modules/home/shell/toolset/bat/default.nix
new file mode 100644
index 0000000..78899df
--- /dev/null
+++ b/modules/home/shell/toolset/bat/default.nix
@@ -0,0 +1,19 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.toolset.bat;
+in
+{
+ options.${namespace}.shell.toolset.bat = {
+ enable = mkEnableOption "cat replacement";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ bat ];
+
+ programs.bat = {
+ enable = true;
+ };
+ };
+}
diff --git a/modules/home/shell/toolset/btop.nix b/modules/home/shell/toolset/btop.nix
deleted file mode 100644
index f4a364d..0000000
--- a/modules/home/shell/toolset/btop.nix
+++ /dev/null
@@ -1,95 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib) mkIf mkEnableOption;
- inherit (lib.strings) concatStringsSep;
-
- cfg = config.modules.${user}.shell.toolset.btop;
-in
-{
- options.modules.${user}.shell.toolset.btop = {
- enable = mkEnableOption "system-monitor";
- };
-
- config = mkIf cfg.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [ btop ];
-
- programs.btop = {
- enable = true;
- settings = {
- force_tty = false;
- vim_keys = true; # Directional keys: "h,j,k,l,g,G"
- update_ms = 1500; # ms (s^{-3})
- temp_scale = "celsius";
- base_10_sizes = false;
- show_cpu_freq = true;
- clock_format = "%H:%M";
- background_update = true;
- disks_filter = "exclude=/boot";
-
- rounded_corners = true;
- theme_background = false;
- truecolor = true;
- presets = concatStringsSep "," [
- "cpu:1:default"
- "proc:0:default cpu:0:default"
- "mem:0:default"
- "net:0:default cpu:0:block"
- "net:0:tty"
- ];
- graph_symbol = "braille";
- graph_symbol_cpu = "default";
- graph_symbol_mem = "default";
- graph_symbol_net = "default";
- graph_symbol_proc = "default";
- shown_boxes = "proc cpu mem net";
-
- proc_sorting = "cpu lazy";
- proc_reversed = false;
- proc_tree = false;
- proc_colors = true;
- proc_gradient = true;
- proc_per_core = true;
- proc_mem_bytes = true;
- proc_info_smaps = false;
- proc_left = false;
-
- cpu_graph_upper = "total";
- cpu_graph_lower = "total";
- cpu_single_graph = false;
- cpu_bottom = false;
- show_uptime = true;
- check_temp = true;
- cpu_sensor = "Auto";
- show_coretemp = true;
- cpu_core_map = "";
- custom_cpu_name = "";
-
- mem_graphs = true;
- mem_below_net = false;
-
- show_swap = true;
- swap_disk = true;
- show_disks = true;
- only_physical = true;
- use_fstab = false; # Enable -> disables `only_physical`
- disk_free_priv = false;
- show_io_stat = true;
-
- io_mode = false;
- io_graph_combined = false;
- io_graph_speeds = "";
-
- net_download = 100;
- net_upload = 100;
- net_auto = true;
- net_sync = false;
- net_iface = "br0";
- show_battery = true;
- selected_battery = "Auto";
- log_level = "DEBUG";
- };
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/btop/default.nix b/modules/home/shell/toolset/btop/default.nix
new file mode 100644
index 0000000..b490acc
--- /dev/null
+++ b/modules/home/shell/toolset/btop/default.nix
@@ -0,0 +1,93 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+ inherit (lib.strings) concatStringsSep;
+
+ cfg = config.${namespace}.shell.toolset.btop;
+in
+{
+ options.${namespace}.shell.toolset.btop = {
+ enable = mkEnableOption "system-monitor";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ btop ];
+
+ programs.btop = {
+ enable = true;
+ settings = {
+ force_tty = false;
+ vim_keys = true; # Directional keys: "h,j,k,l,g,G"
+ update_ms = 1500; # ms (s^{-3})
+ temp_scale = "celsius";
+ base_10_sizes = false;
+ show_cpu_freq = true;
+ clock_format = "%H:%M";
+ background_update = true;
+ disks_filter = "exclude=/boot";
+
+ rounded_corners = true;
+ theme_background = false;
+ truecolor = true;
+ presets = concatStringsSep "," [
+ "cpu:1:default"
+ "proc:0:default cpu:0:default"
+ "mem:0:default"
+ "net:0:default cpu:0:block"
+ "net:0:tty"
+ ];
+ graph_symbol = "braille";
+ graph_symbol_cpu = "default";
+ graph_symbol_mem = "default";
+ graph_symbol_net = "default";
+ graph_symbol_proc = "default";
+ shown_boxes = "proc cpu mem net";
+
+ proc_sorting = "cpu lazy";
+ proc_reversed = false;
+ proc_tree = false;
+ proc_colors = true;
+ proc_gradient = true;
+ proc_per_core = true;
+ proc_mem_bytes = true;
+ proc_info_smaps = false;
+ proc_left = false;
+
+ cpu_graph_upper = "total";
+ cpu_graph_lower = "total";
+ cpu_single_graph = false;
+ cpu_bottom = false;
+ show_uptime = true;
+ check_temp = true;
+ cpu_sensor = "Auto";
+ show_coretemp = true;
+ cpu_core_map = "";
+ custom_cpu_name = "";
+
+ mem_graphs = true;
+ mem_below_net = false;
+
+ show_swap = true;
+ swap_disk = true;
+ show_disks = true;
+ only_physical = true;
+ use_fstab = false; # Enable -> disables `only_physical`
+ disk_free_priv = false;
+ show_io_stat = true;
+
+ io_mode = false;
+ io_graph_combined = false;
+ io_graph_speeds = "";
+
+ net_download = 100;
+ net_upload = 100;
+ net_auto = true;
+ net_sync = false;
+ net_iface = "br0";
+ show_battery = true;
+ selected_battery = "Auto";
+ log_level = "DEBUG";
+ };
+ };
+ };
+}
diff --git a/modules/home/shell/toolset/eza.nix b/modules/home/shell/toolset/eza.nix
deleted file mode 100644
index 3e2da9b..0000000
--- a/modules/home/shell/toolset/eza.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
- inherit (lib.options) mkEnableOption;
-
- cfg = config.modules.${user}.shell.toolset.eza;
-in
-{
- options.modules.${user}.shell.toolset.eza = {
- enable = mkEnableOption "system-monitor";
- };
-
- config = mkIf cfg.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [ eza ];
-
- programs.eza = {
- enable = true;
- icons = "auto";
- git = true;
- extraOptions = [
- "--hyperlink"
- "--across"
- "--group-directories-first"
- ];
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/eza/default.nix b/modules/home/shell/toolset/eza/default.nix
new file mode 100644
index 0000000..00026cf
--- /dev/null
+++ b/modules/home/shell/toolset/eza/default.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.toolset.eza;
+in
+{
+ options.${namespace}.shell.toolset.eza = {
+ enable = mkEnableOption "system-monitor";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ eza ];
+
+ programs.eza = {
+ enable = true;
+ icons = "auto";
+ git = true;
+ extraOptions = [
+ "--hyperlink"
+ "--across"
+ "--group-directories-first"
+ ];
+ };
+ };
+}
diff --git a/modules/home/shell/toolset/fzf.nix b/modules/home/shell/toolset/fzf.nix
deleted file mode 100644
index 3e99666..0000000
--- a/modules/home/shell/toolset/fzf.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib) mkIf mkEnableOption;
-
- defShell = config.modules.${user}.shell.default;
-in
-{
- options.modules.${user}.shell.toolset.fzf = {
- enable = mkEnableOption "TUI Fuzzy Finder.";
- };
-
- config = mkIf config.modules.${user}.shell.toolset.fzf.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [ fzf ];
-
- programs.fzf = {
- enable = true;
- enableBashIntegration = true;
- enableZshIntegration = defShell == "zsh";
- enableFishIntegration = defShell == "fish";
-
- tmux.enableShellIntegration = true;
- tmux.shellIntegrationOptions = ["-d 40%"];
-
- defaultCommand = "fd --type f";
- defaultOptions = ["--height 40%" "--border"];
-
- changeDirWidgetCommand = "fd --type d";
- changeDirWidgetOptions = ["--preview 'tree -C {} | head -200'"];
-
- fileWidgetCommand = "fd --type f";
- fileWidgetOptions = ["--preview 'head {}'"];
- historyWidgetOptions = ["--sort" "--exact"];
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/fzf/default.nix b/modules/home/shell/toolset/fzf/default.nix
new file mode 100644
index 0000000..e2f0313
--- /dev/null
+++ b/modules/home/shell/toolset/fzf/default.nix
@@ -0,0 +1,35 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.toolset.fzf;
+in
+{
+ options.${namespace}.shell.toolset.fzf = {
+ enable = mkEnableOption "TUI Fuzzy Finder.";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ fzf ];
+
+ programs.fzf = {
+ enable = true;
+ enableBashIntegration = true;
+ enableZshIntegration = true;
+ enableFishIntegration = true;
+
+ tmux.enableShellIntegration = true;
+ tmux.shellIntegrationOptions = ["-d 40%"];
+
+ defaultCommand = "fd --type f";
+ defaultOptions = ["--height 40%" "--border"];
+
+ changeDirWidgetCommand = "fd --type d";
+ changeDirWidgetOptions = ["--preview 'tree -C {} | head -200'"];
+
+ fileWidgetCommand = "fd --type f";
+ fileWidgetOptions = ["--preview 'head {}'"];
+ historyWidgetOptions = ["--sort" "--exact"];
+ };
+ };
+}
diff --git a/modules/home/shell/toolset/git.nix b/modules/home/shell/toolset/git.nix
deleted file mode 100644
index f40a8ce..0000000
--- a/modules/home/shell/toolset/git.nix
+++ /dev/null
@@ -1,112 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.options) mkEnableOption;
- inherit (lib.modules) mkIf;
-in
-{
- options.modules.${user}.shell.toolset.git = {
- enable = mkEnableOption "version-control system";
- };
-
- config = mkIf config.modules.${user}.shell.toolset.git.enable {
- environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)";
-
- home-manager.users.${user} = {
- home.packages = with pkgs; [ lazygit lazyjj jujutsu ];
-
- programs = {
- zsh.initContent = ''
- # -------===[ Helpful Git Fn's ]===------- #
- gitignore() {
- curl -s -o .gitignore https://gitignore.io/api/$1
- }
- '';
-
- fish.functions = {
- gitignore = "curl -sL https://www.gitignore.io/api/$argv";
- };
-
- git = {
- enable = true;
- package = pkgs.gitFull;
- difftastic = {
- enable = true;
- background = "dark";
- color = "always";
- display = "inline";
- };
-
- ignores = [
- # General:
- "*.bloop"
- "*.bsp"
- "*.metals"
- "*.metals.sbt"
- "*metals.sbt"
- "*.direnv"
- "*.envrc"
- "*hie.yaml"
- "*.mill-version"
- "*.jvmopts"
-
- # OS-related:
- ".DS_Store?"
- ".DS_Store"
- ".CFUserTextEncoding"
- ".Trash"
- ".Xauthority"
- "thumbs.db"
- "Thumbs.db"
- "Icon?"
-
- # Compiled residues:
- "*.class"
- "*.exe"
- "*.o"
- "*.pyc"
- "*.elc"
- ];
-
- extraConfig = {
- init.defaultBranch = "main";
- core = {
- editor = "nvim";
- whitespace = "trailing-space,space-before-tab";
- };
- credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
-
- user = {
- name = config.modules.${user}.user.full_name;
- email = config.modules.${user}.user.email;
- signingKey = "~/.ssh/id_rsa.pub";
- };
-
- gpg.format = "ssh";
- commit.gpgSign = true;
- tag.gpgSign = true;
-
- push = {
- autoSetupRemote = true;
- default = "current";
- gpgSign = "if-asked";
- autoSquash = true;
- };
- pull.rebase = true;
-
- filter = {
- required = true;
- smudge = "git-lfs smudge -- %f";
- process = "git-lfs filter-process";
- clean = "git-lfs clean -- %f";
- };
-
- url = {
- "https://github.com/".insteadOf = "gh:";
- "git@github.com:".insteadOf = "ssh+gh:";
- };
- };
- };
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/git/default.nix b/modules/home/shell/toolset/git/default.nix
new file mode 100644
index 0000000..3edfb60
--- /dev/null
+++ b/modules/home/shell/toolset/git/default.nix
@@ -0,0 +1,109 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkEnableOption mkIf;
+
+ cfg = config.${namespace}.shell.toolset.git;
+in
+{
+ options.${namespace}.shell.toolset.git = {
+ enable = mkEnableOption "version-control system";
+ };
+
+ config = mkIf cfg.enable {
+ home.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)";
+
+ home.packages = with pkgs; [ lazygit lazyjj jujutsu ];
+
+ programs = {
+ zsh.initContent = ''
+ # -------===[ Helpful Git Fn's ]===------- #
+ gitignore() {
+ curl -s -o .gitignore https://gitignore.io/api/$1
+ }
+ '';
+
+ fish.functions = {
+ gitignore = "curl -sL https://www.gitignore.io/api/$argv";
+ };
+
+ git = {
+ enable = true;
+ package = pkgs.gitFull;
+ difftastic = {
+ enable = true;
+ background = "dark";
+ color = "always";
+ display = "inline";
+ };
+
+ ignores = [
+ # General:
+ "*.bloop"
+ "*.bsp"
+ "*.metals"
+ "*.metals.sbt"
+ "*metals.sbt"
+ "*.direnv"
+ "*.envrc"
+ "*hie.yaml"
+ "*.mill-version"
+ "*.jvmopts"
+
+ # OS-related:
+ ".DS_Store?"
+ ".DS_Store"
+ ".CFUserTextEncoding"
+ ".Trash"
+ ".Xauthority"
+ "thumbs.db"
+ "Thumbs.db"
+ "Icon?"
+
+ # Compiled residues:
+ "*.class"
+ "*.exe"
+ "*.o"
+ "*.pyc"
+ "*.elc"
+ ];
+
+ extraConfig = {
+ init.defaultBranch = "main";
+ core = {
+ editor = "nvim";
+ whitespace = "trailing-space,space-before-tab";
+ };
+ credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
+
+ user = {
+ signingKey = "~/.ssh/id_rsa.pub";
+ };
+
+ gpg.format = "ssh";
+ commit.gpgSign = true;
+ tag.gpgSign = true;
+
+ push = {
+ autoSetupRemote = true;
+ default = "current";
+ gpgSign = "if-asked";
+ autoSquash = true;
+ };
+ pull.rebase = true;
+
+ filter = {
+ required = true;
+ smudge = "git-lfs smudge -- %f";
+ process = "git-lfs filter-process";
+ clean = "git-lfs clean -- %f";
+ };
+
+ url = {
+ "https://github.com/".insteadOf = "gh:";
+ "git@github.com:".insteadOf = "ssh+gh:";
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/modules/home/shell/toolset/gnugpg/default.nix b/modules/home/shell/toolset/gnugpg/default.nix
new file mode 100644
index 0000000..8b6ae38
--- /dev/null
+++ b/modules/home/shell/toolset/gnugpg/default.nix
@@ -0,0 +1,36 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.toolset.gnupg;
+in
+{
+ options.${namespace}.shell.toolset.gnupg = {
+ enable = mkEnableOption "cryptographic suite";
+ };
+
+ config = mkIf cfg.enable {
+ # home.packages = with pkgs; [ gnupg ];
+
+ # home.sessionVariables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg";
+
+ # programs.gnupg = {
+ # enable = true;
+
+ # agent = {
+ # enable = true;
+ # enableSSHSupport = true;
+ # pinentryPackage = pkgs.pinentry-gnome3;
+
+ # settings = let
+ # cacheTTL = 86400;
+ # in {
+ # default-cache-ttl = cacheTTL;
+ # default-cache-ttl-ssh = cacheTTL;
+ # max-cache-ttl = cacheTTL;
+ # max-cache-ttl-ssh = cacheTTL;
+ # };
+ # };
+ # };
+ };
+}
diff --git a/modules/home/shell/toolset/gnupg.nix b/modules/home/shell/toolset/gnupg.nix
deleted file mode 100644
index 33c4765..0000000
--- a/modules/home/shell/toolset/gnupg.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.${user}.shell.toolset.gnupg;
-in
-{
- options.modules.${user}.shell.toolset.gnupg = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "cryptographic suite";
- };
-
- config = mkIf cfg.enable {
- user.package = with pkgs; [ gnupg ];
-
- environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg";
-
- home-manager.users.${user}.programs.gnupg = {
- enable = true;
-
- agent = {
- enable = true;
- enableSSHSupport = true;
- pinentryPackage = pkgs.pinentry-gnome3;
-
- settings = let
- cacheTTL = 86400;
- in {
- default-cache-ttl = cacheTTL;
- default-cache-ttl-ssh = cacheTTL;
- max-cache-ttl = cacheTTL;
- max-cache-ttl-ssh = cacheTTL;
- };
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/starship.nix b/modules/home/shell/toolset/starship.nix
deleted file mode 100644
index f573ff1..0000000
--- a/modules/home/shell/toolset/starship.nix
+++ /dev/null
@@ -1,101 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
- inherit (lib.options) mkEnableOption;
-in
-{
- options.modules.${user}.shell.toolset.starship = {
- enable = mkEnableOption "fancy pansy shell prompt";
- };
-
- config = mkIf config.modules.${user}.shell.toolset.starship.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [ starship ];
-
- programs.starship = {
- enable = true;
- settings = {
- format = "[╭](bold green) $username@$hostname$nix_shell: $directory$cmd_duration$git_branch$git_commit$git_state$git_status$line_break[╰](green bold)$character";
-
- username = {
- format = "[$user]($style)";
- show_always = true;
- };
-
- hostname = {
- ssh_only = false;
- ssh_symbol = "🌐 ";
- format = "[$hostname](bold red)";
- trim_at = ".local";
- disabled = false;
- };
-
- nix_shell = {
- symbol = " ";
- format = "[$symbol$name]($style) ";
- style = "magenta bold";
- };
-
- git_branch = {
- only_attached = true;
- format = "[$symbol$branch]($style) ";
- symbol = " ";
- style = "yellow bold";
- };
-
- git_commit = {
- tag_disabled = false;
- };
-
- git_state = {
- style = "magenta bold";
- };
-
- git_status = {
- format = "[$all_status $ahead_behind]($style) ";
- style = "bold green";
- conflicted = "🏳";
- up_to_date = "";
- untracked = " ";
- ahead = "⇡\${count}";
- diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
- behind = "⇣\${count}";
- stashed = " ";
- modified = " ";
- staged = "[++\($count\)](green)";
- renamed = "襁 ";
- deleted = " ";
- };
-
- directory = {
- read_only = " ";
- };
-
- cmd_duration = {
- format = "[$duration]($style) ";
- style = "blue";
- };
-
- os = {
- format = "[$symbol](bold white)";
- disabled = false;
-
- symbols = {
- Windows = " ";
- Arch = "";
- Ubuntu = "";
- Macos = "";
- Manjaro = " ";
- Nobara = " ";
- Unknown = "";
- };
- };
-
- fill = {
- symbol = " ";
- };
- };
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/starship/default.nix b/modules/home/shell/toolset/starship/default.nix
new file mode 100644
index 0000000..28d57f7
--- /dev/null
+++ b/modules/home/shell/toolset/starship/default.nix
@@ -0,0 +1,100 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.toolset.starship;
+in
+{
+ options.${namespace}.shell.toolset.starship = {
+ enable = mkEnableOption "fancy pansy shell prompt";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ starship ];
+
+ programs.starship = {
+ enable = true;
+ settings = {
+ format = "[╭](bold green) $username@$hostname$nix_shell: $directory$cmd_duration$git_branch$git_commit$git_state$git_status$line_break[╰](green bold)$character";
+
+ username = {
+ format = "[$user]($style)";
+ show_always = true;
+ };
+
+ hostname = {
+ ssh_only = false;
+ ssh_symbol = "🌐 ";
+ format = "[$hostname](bold red)";
+ trim_at = ".local";
+ disabled = false;
+ };
+
+ nix_shell = {
+ symbol = " ";
+ format = "[$symbol$name]($style) ";
+ style = "magenta bold";
+ };
+
+ git_branch = {
+ only_attached = true;
+ format = "[$symbol$branch]($style) ";
+ symbol = " ";
+ style = "yellow bold";
+ };
+
+ git_commit = {
+ tag_disabled = false;
+ };
+
+ git_state = {
+ style = "magenta bold";
+ };
+
+ git_status = {
+ format = "[$all_status $ahead_behind]($style) ";
+ style = "bold green";
+ conflicted = "🏳";
+ up_to_date = "";
+ untracked = " ";
+ ahead = "⇡\${count}";
+ diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
+ behind = "⇣\${count}";
+ stashed = " ";
+ modified = " ";
+ staged = "[++\($count\)](green)";
+ renamed = "襁 ";
+ deleted = " ";
+ };
+
+ directory = {
+ read_only = " ";
+ };
+
+ cmd_duration = {
+ format = "[$duration]($style) ";
+ style = "blue";
+ };
+
+ os = {
+ format = "[$symbol](bold white)";
+ disabled = false;
+
+ symbols = {
+ Windows = " ";
+ Arch = "";
+ Ubuntu = "";
+ Macos = "";
+ Manjaro = " ";
+ Nobara = " ";
+ Unknown = "";
+ };
+ };
+
+ fill = {
+ symbol = " ";
+ };
+ };
+ };
+ };
+}
diff --git a/modules/home/shell/toolset/tmux.nix b/modules/home/shell/toolset/tmux.nix
deleted file mode 100644
index 137b600..0000000
--- a/modules/home/shell/toolset/tmux.nix
+++ /dev/null
@@ -1,107 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
-in
-{
- options.modules.${user}.shell.toolset.tmux = let
- inherit (lib.options) mkEnableOption;
- in { enable = mkEnableOption "terminal multiplexer"; };
-
- config = mkIf config.modules.${user}.shell.toolset.tmux.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [ tmux ];
-
- programs.tmux = {
- enable = true;
- secureSocket = true;
- keyMode = "vi";
- prefix = "C-a";
- terminal = "tmux-256color";
-
- baseIndex = 1;
- clock24 = true;
- disableConfirmationPrompt = true;
- escapeTime = 0;
-
- aggressiveResize = false;
- resizeAmount = 2;
- reverseSplit = false;
- historyLimit = 5000;
- newSession = true;
-
- plugins = let
- inherit (pkgs.tmuxPlugins) resurrect continuum;
- in [
- {
- plugin = resurrect;
- extraConfig = "set -g @resurrect-strategy-nvim 'session'";
- }
- {
- plugin = continuum;
- extraConfig = ''
- set -g @continuum-restore 'on'
- set -g @continuum-save-interval '60' # minutes
- '';
- }
- ];
-
- extraConfig = ''
- # -------===[ Color Correction ]===------- #
- set-option -ga terminal-overrides ",*256col*:Tc"
- set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
- set-environment -g COLORTERM "truecolor"
-
- # -------===[ General-Configurations ]===------- #
- set-option -g renumber-windows on
- set-window-option -g automatic-rename on
- set-window-option -g word-separators ' @"=()[]'
-
- set-option -g mouse on
- set-option -s focus-events on
- set-option -g renumber-windows on
- set-option -g allow-rename off
-
- # -------===[ Activity/Sound ]===------- #
- set-option -g bell-action none
- set-option -g visual-bell off
- set-option -g visual-silence off
- set-option -g visual-activity off
- set-window-option -g monitor-activity off
-
- # -------===[ Status-Bar ]===------- #
- set-option -g status on
- set-option -g status-interval 1
- set-option -g status-style bg=default,bold,italics
-
- set-option -g status-position top
- set-option -g status-justify left
-
- set-option -g status-left-length "40"
- set-option -g status-right-length "80"
-
- # -------===[ Keybindings ]===------- #
- bind-key c clock-mode
-
- # Window Control(s):
- bind-key q kill-session
- bind-key Q kill-server
- bind-key t new-window -c '#{pane_current_path}'
-
- # Buffers:
- bind-key b list-buffers
- bind-key p paste-buffer
- bind-key P choose-buffer
-
- # Split bindings:
- bind-key - split-window -v -c '#{pane_current_path}'
- bind-key / split-window -h -c '#{pane_current_path}'
-
- # Copy/Paste bindings:
- bind-key -T copy-mode-vi v send-keys -X begin-selection -N "Start visual mode for selection"
- bind-key -T copy-mode-vi y send-keys -X copy-selection -N "Yank text into buffer"
- bind-key -T copy-mode-vi r send-keys -X rectangle-toggle -N "Yank region into buffer"
- '';
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/tmux/default.nix b/modules/home/shell/toolset/tmux/default.nix
new file mode 100644
index 0000000..ed14ba6
--- /dev/null
+++ b/modules/home/shell/toolset/tmux/default.nix
@@ -0,0 +1,107 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.toolset.tmux;
+in
+{
+ options.${namespace}.shell.toolset.tmux = {
+ enable = mkEnableOption "terminal multiplexer";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ tmux ];
+
+ programs.tmux = {
+ enable = true;
+ secureSocket = true;
+ keyMode = "vi";
+ prefix = "C-a";
+ terminal = "tmux-256color";
+
+ baseIndex = 1;
+ clock24 = true;
+ disableConfirmationPrompt = true;
+ escapeTime = 0;
+
+ aggressiveResize = false;
+ resizeAmount = 2;
+ reverseSplit = false;
+ historyLimit = 5000;
+ newSession = true;
+
+ plugins = let
+ inherit (pkgs.tmuxPlugins) resurrect continuum;
+ in [
+ {
+ plugin = resurrect;
+ extraConfig = "set -g @resurrect-strategy-nvim 'session'";
+ }
+ {
+ plugin = continuum;
+ extraConfig = ''
+ set -g @continuum-restore 'on'
+ set -g @continuum-save-interval '60' # minutes
+ '';
+ }
+ ];
+
+ extraConfig = ''
+ # -------===[ Color Correction ]===------- #
+ set-option -ga terminal-overrides ",*256col*:Tc"
+ set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
+ set-environment -g COLORTERM "truecolor"
+
+ # -------===[ General-Configurations ]===------- #
+ set-option -g renumber-windows on
+ set-window-option -g automatic-rename on
+ set-window-option -g word-separators ' @"=()[]'
+
+ set-option -g mouse on
+ set-option -s focus-events on
+ set-option -g renumber-windows on
+ set-option -g allow-rename off
+
+ # -------===[ Activity/Sound ]===------- #
+ set-option -g bell-action none
+ set-option -g visual-bell off
+ set-option -g visual-silence off
+ set-option -g visual-activity off
+ set-window-option -g monitor-activity off
+
+ # -------===[ Status-Bar ]===------- #
+ set-option -g status on
+ set-option -g status-interval 1
+ set-option -g status-style bg=default,bold,italics
+
+ set-option -g status-position top
+ set-option -g status-justify left
+
+ set-option -g status-left-length "40"
+ set-option -g status-right-length "80"
+
+ # -------===[ Keybindings ]===------- #
+ bind-key c clock-mode
+
+ # Window Control(s):
+ bind-key q kill-session
+ bind-key Q kill-server
+ bind-key t new-window -c '#{pane_current_path}'
+
+ # Buffers:
+ bind-key b list-buffers
+ bind-key p paste-buffer
+ bind-key P choose-buffer
+
+ # Split bindings:
+ bind-key - split-window -v -c '#{pane_current_path}'
+ bind-key / split-window -h -c '#{pane_current_path}'
+
+ # Copy/Paste bindings:
+ bind-key -T copy-mode-vi v send-keys -X begin-selection -N "Start visual mode for selection"
+ bind-key -T copy-mode-vi y send-keys -X copy-selection -N "Yank text into buffer"
+ bind-key -T copy-mode-vi r send-keys -X rectangle-toggle -N "Yank region into buffer"
+ '';
+ };
+ };
+}
diff --git a/modules/home/shell/toolset/yazi.nix b/modules/home/shell/toolset/yazi.nix
deleted file mode 100644
index 252ae8a..0000000
--- a/modules/home/shell/toolset/yazi.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
- inherit (lib.options) mkEnableOption;
-
- cfg = config.modules.${user}.shell.toolset.yazi;
-in
-{
- options.modules.${user}.shell.toolset.yazi = {
- enable = mkEnableOption "cli file browser";
- };
-
- config = mkIf cfg.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [ yazi ];
-
- programs.yazi = {
- enable = true;
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/yazi/default.nix b/modules/home/shell/toolset/yazi/default.nix
new file mode 100644
index 0000000..37138a0
--- /dev/null
+++ b/modules/home/shell/toolset/yazi/default.nix
@@ -0,0 +1,19 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.toolset.yazi;
+in
+{
+ options.${namespace}.shell.toolset.yazi = {
+ enable = mkEnableOption "cli file browser";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ yazi ];
+
+ programs.yazi = {
+ enable = true;
+ };
+ };
+}
diff --git a/modules/home/shell/toolset/zellij.nix b/modules/home/shell/toolset/zellij.nix
deleted file mode 100644
index 01f6c8a..0000000
--- a/modules/home/shell/toolset/zellij.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
- inherit (lib.options) mkEnableOption;
-in
-{
- options.modules.${user}.shell.toolset.zellij = {
- enable = mkEnableOption "terminal multiplexer";
- };
-
- config = mkIf config.modules.${user}.shell.toolset.zellij.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [ zellij ];
-
- programs.zellij = {
- enable = true;
- attachExistingSession = true;
-
- settings = {};
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/zellij/default.nix b/modules/home/shell/toolset/zellij/default.nix
new file mode 100644
index 0000000..db5b7bd
--- /dev/null
+++ b/modules/home/shell/toolset/zellij/default.nix
@@ -0,0 +1,22 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.toolset.zellij;
+in
+{
+ options.${namespace}.shell.toolset.zellij = {
+ enable = mkEnableOption "terminal multiplexer";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ zellij ];
+
+ programs.zellij = {
+ enable = true;
+ attachExistingSession = true;
+
+ settings = {};
+ };
+ };
+}
diff --git a/modules/home/shell/toolset/zoxide.nix b/modules/home/shell/toolset/zoxide.nix
deleted file mode 100644
index 2d456b8..0000000
--- a/modules/home/shell/toolset/zoxide.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
- inherit (lib.options) mkEnableOption;
-
- cfg = config.modules.${user}.shell.toolset.zoxide;
-in
-{
- options.modules.${user}.shell.toolset.zoxide = {
- enable = mkEnableOption "cd replacement";
- };
-
- config = mkIf cfg.enable {
- home-manager.users.${user} = {
- home.packages = with pkgs; [ zoxide ];
-
- programs.zoxide = {
- enable = true;
- };
- };
- };
-}
diff --git a/modules/home/shell/toolset/zoxide/default.nix b/modules/home/shell/toolset/zoxide/default.nix
new file mode 100644
index 0000000..5b8acb6
--- /dev/null
+++ b/modules/home/shell/toolset/zoxide/default.nix
@@ -0,0 +1,19 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.toolset.zoxide;
+in
+{
+ options.${namespace}.shell.toolset.zoxide = {
+ enable = mkEnableOption "cd replacement";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [ zoxide ];
+
+ programs.zoxide = {
+ enable = true;
+ };
+ };
+}
diff --git a/modules/home/shell/zsh.nix b/modules/home/shell/zsh.nix
deleted file mode 100644
index e6fc881..0000000
--- a/modules/home/shell/zsh.nix
+++ /dev/null
@@ -1,104 +0,0 @@
-{ config, lib, pkgs, user, ... }:
-let
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.${user}.shell;
-in
-{
- config = mkIf (cfg.default == "zsh") {
- modules.shell.zsh.enable = true;
-
- modules.${user}.shell = {
- corePkgs.enable = true;
- };
-
- # Enable completion for sys-packages:
- environment.pathsToLink = ["/share/zsh"];
-
- home-manager.users.${user} = {
- # xdg.configFile."zsh-abbreviations" = {
- # target = "zsh/abbreviations";
- # text = let
- # abbrevs = {
- # ls = "eza -al";
- # };
- # in ''
- # ${concatStrings (mapAttrsToList
- # (k: v: "abbr ${k}=${escapeNixString v}")
- # abbrevs
- # )}
- # '';
- # };
-
- programs = {
- starship.enableZshIntegration = true;
- yazi.enableZshIntegration = true;
- zellij.enableZshIntegration = true;
-
- zsh = {
- enable = true;
- enableCompletion = true;
- autosuggestion.enable = true;
-
- history = {
- size = 10000;
- path = "$XDG_CONFIG_HOME/zsh/history";
- };
-
- oh-my-zsh = {
- enable = true;
- plugins = ["git" "docker-compose" "zoxide"];
- };
-
- plugins = let
- mkZshPlugin = {
- pkg,
- file ? "${pkg.pname}.plugin.zsh",
- }: {
- name = pkg.pname;
- src = pkg.src;
- inherit file;
- };
- in
- with pkgs; [
- (mkZshPlugin {pkg = zsh-abbr;})
- (mkZshPlugin {pkg = zsh-autopair;})
- (mkZshPlugin {pkg = zsh-you-should-use;})
- (mkZshPlugin {
- pkg = zsh-nix-shell;
- file = "nix-shell.plugin.zsh";
- })
-
- {
- name = "zsh-autosuggestion";
- src = pkgs.fetchFromGitHub {
- owner = "zsh-users";
- repo = "zsh-autosuggestions";
- rev = "v0.7.0";
- sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98";
- };
- }
- {
- name = "zsh-completions";
- src = pkgs.fetchFromGitHub {
- owner = "zsh-users";
- repo = "zsh-completions";
- rev = "0.34.0";
- sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9";
- };
- }
- {
- name = "zsh-syntax-highlighting";
- src = pkgs.fetchFromGitHub {
- owner = "zsh-users";
- repo = "zsh-syntax-highlighting";
- rev = "0.7.0";
- sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r";
- };
- }
- ];
- };
- };
- };
- };
-}
diff --git a/modules/home/shell/zsh/default.nix b/modules/home/shell/zsh/default.nix
new file mode 100644
index 0000000..b37cc4c
--- /dev/null
+++ b/modules/home/shell/zsh/default.nix
@@ -0,0 +1,87 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.zsh;
+in
+{
+ options.${namespace}.shell.zsh = {
+ enable = mkEnableOption "enable ZSH";
+ };
+
+ config = mkIf cfg.enable {
+ # ${namespace}.shell = {
+ # zsh.enable = true;
+ # };
+
+ programs = {
+ starship.enableZshIntegration = true;
+ yazi.enableZshIntegration = true;
+ zellij.enableZshIntegration = true;
+
+ zsh = {
+ enable = true;
+ enableCompletion = true;
+ autosuggestion.enable = true;
+
+ history = {
+ size = 10000;
+ path = "$XDG_CONFIG_HOME/zsh/history";
+ };
+
+ oh-my-zsh = {
+ enable = true;
+ plugins = ["git" "docker-compose" "zoxide"];
+ };
+
+ plugins = let
+ mkZshPlugin = {
+ pkg,
+ file ? "${pkg.pname}.plugin.zsh",
+ }: {
+ name = pkg.pname;
+ src = pkg.src;
+ inherit file;
+ };
+ in
+ with pkgs; [
+ (mkZshPlugin {pkg = zsh-abbr;})
+ (mkZshPlugin {pkg = zsh-autopair;})
+ (mkZshPlugin {pkg = zsh-you-should-use;})
+ (mkZshPlugin {
+ pkg = zsh-nix-shell;
+ file = "nix-shell.plugin.zsh";
+ })
+
+ {
+ name = "zsh-autosuggestion";
+ src = pkgs.fetchFromGitHub {
+ owner = "zsh-users";
+ repo = "zsh-autosuggestions";
+ rev = "v0.7.0";
+ sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98";
+ };
+ }
+ {
+ name = "zsh-completions";
+ src = pkgs.fetchFromGitHub {
+ owner = "zsh-users";
+ repo = "zsh-completions";
+ rev = "0.34.0";
+ sha256 = "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9";
+ };
+ }
+ {
+ name = "zsh-syntax-highlighting";
+ src = pkgs.fetchFromGitHub {
+ owner = "zsh-users";
+ repo = "zsh-syntax-highlighting";
+ rev = "0.7.0";
+ sha256 = "0s1z3whzwli5452h2yzjzzj27pf1hd45g223yv0v6hgrip9f853r";
+ };
+ }
+ ];
+ };
+ };
+ };
+}
diff --git a/modules/home/terminal/alacritty/default.nix b/modules/home/terminal/alacritty/default.nix
new file mode 100644
index 0000000..b6e5822
--- /dev/null
+++ b/modules/home/terminal/alacritty/default.nix
@@ -0,0 +1,43 @@
+{ config, lib, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.terminal.alacritty;
+in
+{
+ options.${namespace}.terminal.alacritty = {
+ enable = mkEnableOption "enable alacritty";
+ };
+
+ config = mkIf cfg.enable {
+ programs.alacritty = {
+ enable = true;
+
+ settings = {
+ env = {
+ TERM = "xterm-256color";
+ WINIT_X11_SCALE_FACTOR = "1.0";
+ };
+
+ window.dynamic_title = true;
+
+ scrolling = {
+ history = 5000;
+ multiplier = 3;
+ };
+
+ selection = {
+ semantic_escape_chars = '',│`|:"' ()[]{}<>'';
+ save_to_clipboard = false;
+ };
+
+ general.live_config_reload = true;
+
+ # terminal.shell = {
+ # program = "${getExe pkgs.zsh}";
+ # args = ["-l" "-c" "tmux new || tmux"];
+ # };
+ };
+ };
+ };
+}
diff --git a/modules/home/terminal/ghostty/default.nix b/modules/home/terminal/ghostty/default.nix
new file mode 100644
index 0000000..00d925c
--- /dev/null
+++ b/modules/home/terminal/ghostty/default.nix
@@ -0,0 +1,24 @@
+{ config, lib, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.terminal.ghostty;
+in
+{
+ options.${namespace}.terminal.ghostty = {
+ enable = mkEnableOption "enable ghostty";
+ };
+
+ config = mkIf cfg.enable {
+ programs.ghostty = {
+ enable = true;
+ settings = {
+ background-blur-radius = 20;
+ theme = "dark:stylix,light:stylix";
+ window-theme = (config.${namespace}.themes.polarity or "dark");
+ background-opacity = 0.8;
+ minimum-contrast = 1.1;
+ };
+ };
+ };
+}
diff --git a/modules/home/themes/default.nix b/modules/home/themes/default.nix
index 3e26492..276e850 100644
--- a/modules/home/themes/default.nix
+++ b/modules/home/themes/default.nix
@@ -1,12 +1,13 @@
-{ config, lib, pkgs, user, ... }:
+{ config, lib, pkgs, namespace, osConfig ? {}, ... }:
let
inherit (lib) mkIf mkDefault;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) nullOr enum;
- cfg = config.modules.${user}.themes;
+ cfg = config.${namespace}.themes;
+ osCfg = osConfig.${namespace}.theming;
in {
- options.modules.${user}.themes = {
+ options.${namespace}.themes = {
enable = mkEnableOption "Theming (Stylix)";
theme = mkOption {
@@ -24,13 +25,35 @@ in {
};
config = mkIf (cfg.enable) {
- modules.theming.enable = true;
-
stylix = {
+ enable = true;
+
base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml";
image = ./${cfg.theme}.jpg;
polarity = cfg.polarity;
targets.qt.platform = mkDefault "kde6";
+
+ fonts = {
+ serif = {
+ package = pkgs.dejavu_fonts;
+ name = "DejaVu Serif";
+ };
+
+ sansSerif = {
+ package = pkgs.dejavu_fonts;
+ name = "DejaVu Sans";
+ };
+
+ monospace = {
+ package = pkgs.nerd-fonts.jetbrains-mono;
+ name = "JetBrainsMono Nerd Font Mono";
+ };
+
+ emoji = {
+ package = pkgs.noto-fonts-emoji;
+ name = "Noto Color Emoji";
+ };
+ };
};
};
}
diff --git a/modules/home/user.nix b/modules/home/user.nix
deleted file mode 100644
index 4fa3d0e..0000000
--- a/modules/home/user.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{ options, config, lib, pkgs, user, ... }:
-let
- inherit (lib.attrsets) attrValues;
- inherit (lib.modules) mkIf mkMerge;
-
- cfg = config.modules.${user}.user;
-in
-{
- options.modules.${user}.user = let
- inherit (lib.options) mkOption mkEnableOption;
- inherit (lib.types) nullOr enum;
- in with lib.types; {
- full_name = mkOption {
- type = nullOr str;
- default = null;
- example = "John Doe";
- description = "Full name of the user, this is used as the kde plasma display name for example";
- };
-
- email = mkOption {
- type = nullOr str;
- default = null;
- example = "name@domain.tld";
- description = "user's email address";
- };
-
- is_trusted = mkOption {
- type = bool;
- default = false;
- example = true;
- description = "this is used to grant sudo priviledges for the user";
- };
-
- groups = mkOption {
- type = listOf str;
- default = [];
- example = [ "some" "group" "names" ];
- description = "groups to add the user to";
- };
- };
-
- config = mkIf (user != "root") {
- users.users.${user} = {
- description = (cfg.full_name or user);
- extraGroups = cfg.groups ++ (if cfg.is_trusted then [ "wheel" ] else []);
- };
- };
-}
diff --git a/modules/home/xgd.nix b/modules/home/xgd.nix
deleted file mode 100644
index 4af3989..0000000
--- a/modules/home/xgd.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{ config, user, ... }:
-{
- home-manager.users.${user}.xdg.enable = true;
-
- environment = {
- sessionVariables = {
- XDG_CACHE_HOME = "$HOME/.cache";
- XDG_CONFIG_HOME = "$HOME/.config";
- XDG_DATA_HOME = "$HOME/.local/share";
- XDG_BIN_HOME = "$HOME/.local/bin";
- };
-
- variables = {
- __GL_SHADER_DISK_CACHE_PATH = "$XDG_CACHE_HOME/nv";
- ASPELL_CONF = ''
- per-conf $XDG_CONFIG_HOME/aspell/aspell.conf;
- personal $XDG_CONFIG_HOME/aspell/en_US.pws;
- repl $XDG_CONFIG_HOME/aspell/en.prepl;
- '';
- CUDA_CACHE_PATH = "$XDG_CACHE_HOME/nv";
- HISTFILE = "$XDG_DATA_HOME/bash/history";
- INPUTRC = "$XDG_CONFIG_HOME/readline/inputrc";
- LESSHISTFILE = "$XDG_CACHE_HOME/lesshst";
- WGETRC = "$XDG_CONFIG_HOME/wgetrc";
- };
-
- extraInit = ''
- export XAUTHORITY=/tmp/Xauthority
- [ -e ~/.Xauthority ] && mv -f ~/.Xauthority "$XAUTHORITY"
- '';
- };
-}
diff --git a/modules/nixos/application/steam/default.nix b/modules/nixos/application/steam/default.nix
new file mode 100644
index 0000000..6170e8a
--- /dev/null
+++ b/modules/nixos/application/steam/default.nix
@@ -0,0 +1,49 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.application.steam;
+in
+{
+ options.${namespace}.application.steam = {
+ enable = mkEnableOption "enable steam";
+ };
+
+ config = mkIf cfg.enable {
+ programs = {
+ steam = {
+ enable = true;
+ package = pkgs.steam-small.override {
+ extraEnv = {
+ DXVK_HUD = "compiler";
+ MANGOHUD = true;
+ };
+ };
+
+ gamescopeSession = {
+ enable = true;
+ args = ["--immediate-flips"];
+ };
+ };
+
+ # https://github.com/FeralInteractive/gamemode
+ gamemode = {
+ enable = true;
+ enableRenice = true;
+ settings = {};
+ };
+
+ # gamescope = {
+ # enable = true;
+ # capSysNice = true;
+ # env = {
+ # DXVK_HDR = "1";
+ # ENABLE_GAMESCOPE_WSI = "1";
+ # WINE_FULLSCREEN_FSR = "1";
+ # WLR_RENDERER = "vulkan";
+ # };
+ # args = ["--hdr-enabled"];
+ # };
+ };
+ };
+}
diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix
new file mode 100644
index 0000000..1f844d1
--- /dev/null
+++ b/modules/nixos/boot/default.nix
@@ -0,0 +1,96 @@
+{ lib, namespace, config, pkgs, ... }:
+let
+ inherit (lib) mkIf mkMerge mkDefault mkOption;
+ inherit (lib.types) enum bool;
+
+ cfg = config.${namespace}.boot;
+in
+{
+ options.${namespace}.boot = {
+ type = mkOption {
+ type = enum [ "bios" "uefi" ];
+ default = "uefi";
+ };
+
+ quiet = mkOption {
+ type = bool;
+ default = false;
+ };
+
+ animated = mkOption {
+ type = bool;
+ default = false;
+ };
+ };
+
+ config = mkMerge [
+ ({
+ boot = {
+ kernelPackages = pkgs.linuxPackages_latest;
+
+ loader = {
+ systemd-boot.enable = false;
+ grub.enable = mkDefault true;
+
+ grub2-theme = {
+ enable = true;
+ theme = "vimix";
+ footer = true;
+ };
+ };
+
+ supportedFilesystems = [ "nfs" ];
+ };
+ })
+
+ (mkIf (cfg.type == "bios") {
+ boot.loader.grub.efiSupport = false;
+ })
+
+ (mkIf (cfg.type == "uefi") {
+ boot.loader = {
+ efi.canTouchEfiVariables = true;
+ grub = {
+ efiSupport = true;
+ efiInstallAsRemovable = mkDefault false;
+ device = "nodev"; # INFO: https://discourse.nixos.org/t/question-about-grub-and-nodev
+ };
+ };
+ })
+
+ (mkIf cfg.quiet {
+ boot = {
+ consoleLogLevel = 0;
+
+ initrd = {
+ systemd.enable = true;
+ verbose = false;
+ };
+
+ kernelParams = [
+ "quiet"
+ "loglevel=3"
+ "systemd.show_status=auto"
+ "udev.log_level=3"
+ "rd.udev.log_level=3"
+ "vt.global_cursor_default=0"
+ ];
+
+ loader.timeout = mkDefault 0;
+ };
+ })
+
+ (mkIf cfg.animated {
+ boot.plymouth = {
+ enable = true;
+
+ theme = mkDefault "pixels";
+ themePackages = with pkgs; [
+ (adi1090x-plymouth-themes.override {
+ selected_themes = [ "pixels" ];
+ })
+ ];
+ };
+ })
+ ];
+}
diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix
new file mode 100644
index 0000000..f38a28e
--- /dev/null
+++ b/modules/nixos/desktop/default.nix
@@ -0,0 +1,39 @@
+{ lib, config, namespace, inputs, ... }:
+let
+ inherit (lib) mkIf mkOption mkEnableOption mkMerge;
+ inherit (lib.types) nullOr enum;
+
+ cfg = config.${namespace}.desktop;
+in
+{
+ imports = [
+ inputs.grub2-themes.nixosModules.default
+ ];
+
+ options.${namespace}.desktop = {
+ use = mkOption {
+ type = nullOr (enum [ "plasma" "gamescope" "gnome" ]);
+ default = null;
+ example = "plasma";
+ description = "Which desktop to enable";
+ };
+
+ autoLogin = mkEnableOption "Enable plasma's auto login feature.";
+ };
+
+ config = mkMerge [
+ ({
+ services.displayManager = {
+ enable = true;
+
+ autoLogin = mkIf cfg.autoLogin {
+ enable = true;
+ };
+ };
+ })
+
+ # (mkIf (cfg.use != null) {
+ # ${namespace}.desktop.${cfg.use}.enable = true;
+ # })
+ ];
+}
diff --git a/modules/nixos/desktop/gamescope/default.nix b/modules/nixos/desktop/gamescope/default.nix
new file mode 100644
index 0000000..80e6099
--- /dev/null
+++ b/modules/nixos/desktop/gamescope/default.nix
@@ -0,0 +1,33 @@
+{ lib, config, namespace, inputs, ... }:
+let
+ inherit (lib) mkIf mkEnableOption mkForce;
+
+ cfg = config.${namespace}.desktop.gamescope;
+in
+{
+ imports = [ inputs.jovian.nixosModules.default ];
+
+ options.${namespace}.desktop.gamescope = {
+ enable = mkEnableOption "Enable Steamdeck ui" // {
+ default = (config.${namespace}.desktop.use == "gamescope");
+ };
+ };
+
+ config = mkIf cfg.enable {
+ ${namespace}.desktop.plasma.enable = true;
+
+ services.displayManager.sddm.enable = mkForce false;
+ services.displayManager.gdm.enable = mkForce false;
+
+ jovian = {
+ steam = {
+ enable = true;
+ autoStart = true;
+ user = "chris";
+ updater.splash = "steamos";
+ desktopSession = "plasma";
+ };
+ steamos.useSteamOSConfig = true;
+ };
+ };
+}
diff --git a/modules/nixos/desktop/gnome/default.nix b/modules/nixos/desktop/gnome/default.nix
new file mode 100644
index 0000000..979587f
--- /dev/null
+++ b/modules/nixos/desktop/gnome/default.nix
@@ -0,0 +1,16 @@
+{ lib, config, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.desktop.gnome;
+in
+{
+ options.${namespace}.desktop.gnome = {
+ enable = mkEnableOption "Enable Gnome" // {
+ default = (config.${namespace}.desktop.use == "gnome");
+ };
+ };
+
+ config = mkIf cfg.enable {
+ };
+}
diff --git a/modules/nixos/desktop/plasma/default.nix b/modules/nixos/desktop/plasma/default.nix
new file mode 100644
index 0000000..11c0cd9
--- /dev/null
+++ b/modules/nixos/desktop/plasma/default.nix
@@ -0,0 +1,32 @@
+{ pkgs, lib, config, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.desktop.plasma;
+in
+{
+ options.${namespace}.desktop.plasma = {
+ enable = mkEnableOption "Enable KDE Plasma" // {
+ default = (config.${namespace}.desktop.use == "plasma");
+ };
+ };
+
+ config = mkIf cfg.enable {
+ environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter oxygen ];
+ environment.sessionVariables.NIXOS_OZONE_WL = "1";
+
+ services = {
+ xserver.enable = false;
+
+ desktopManager.plasma6.enable = true;
+
+ displayManager = {
+ defaultSession = "plasma";
+ sddm = {
+ enable = true;
+ wayland.enable = true;
+ };
+ };
+ };
+ };
+}
diff --git a/modules/nixos/editor/nano/default.nix b/modules/nixos/editor/nano/default.nix
new file mode 100644
index 0000000..1cb7ff1
--- /dev/null
+++ b/modules/nixos/editor/nano/default.nix
@@ -0,0 +1,28 @@
+{ config, options, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkEnableOption mkIf;
+
+ cfg = config.${namespace}.editor.nano;
+in
+{
+ options.${namespace}.editor.nano = {
+ enable = mkEnableOption "nano";
+ };
+
+ config = mkIf cfg.enable {
+ programs.nano = {
+ enable = true;
+ syntaxHighlight = true;
+ nanorc = ''
+ set autoindent
+ set jumpyscrolling
+ set linenumbers
+ set mouse
+ set saveonexit
+ set smarthome
+ set tabstospaces
+ set tabsize 2
+ '';
+ };
+ };
+}
diff --git a/modules/nixos/editor/nvim/default.nix b/modules/nixos/editor/nvim/default.nix
new file mode 100644
index 0000000..c29de0f
--- /dev/null
+++ b/modules/nixos/editor/nvim/default.nix
@@ -0,0 +1,18 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.editor.nvim;
+in
+{
+ imports = [
+ inputs.nvf.nixosModules.default
+ ];
+
+ options.${namespace}.editor.nvim = {
+ enable = mkEnableOption "enable nvim via nvf on system level";
+ };
+
+ config = mkIf cfg.enable {
+ };
+}
diff --git a/modules/system/system/audio.nix b/modules/nixos/hardware/audio/default.nix
similarity index 52%
rename from modules/system/system/audio.nix
rename to modules/nixos/hardware/audio/default.nix
index 1e71a76..d3f340f 100644
--- a/modules/system/system/audio.nix
+++ b/modules/nixos/hardware/audio/default.nix
@@ -1,24 +1,18 @@
-{ config, lib, pkgs, ... }:
+{ pkgs, lib, namespace, config, ... }:
let
- inherit (lib.attrsets) attrValues;
- inherit (lib.modules) mkIf;
+ inherit (lib) mkIf mkEnableOption;
- cfg = config.modules.system.audio;
+ cfg = config.${namespace}.hardware.has.audio;
in
{
- options.modules.system.audio = let
- inherit (lib.options) mkEnableOption;
- in
- {
- enable = mkEnableOption "modern audio support";
- };
+ options.${namespace}.hardware.has.audio = mkEnableOption "Enable bluetooth";
- config = mkIf cfg.enable {
+ config = mkIf cfg {
environment.systemPackages = with pkgs; [
- # easyeffects
sof-firmware
];
+ # https://wiki.nixos.org/wiki/PipeWire
security.rtkit.enable = true;
services.pulseaudio.enable = false;
diff --git a/modules/nixos/hardware/bluetooth/default.nix b/modules/nixos/hardware/bluetooth/default.nix
new file mode 100644
index 0000000..1b99eef
--- /dev/null
+++ b/modules/nixos/hardware/bluetooth/default.nix
@@ -0,0 +1,25 @@
+{ lib, namespace, config, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.hardware.has.bluetooth;
+in
+{
+ options.${namespace}.hardware.has.bluetooth = mkEnableOption "Enable bluetooth";
+
+ config = mkIf cfg {
+ hardware.bluetooth = {
+ enable = true;
+ powerOnBoot = true;
+ };
+
+ services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
+ "monitor.bluez.properties" = {
+ "bluez5.enable-sbc-xq" = true;
+ "bluez5.enable-msbc" = true;
+ "bluez5.enable-hw-volume" = true;
+ "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
+ };
+ };
+ };
+}
diff --git a/modules/nixos/hardware/gpu/amd/default.nix b/modules/nixos/hardware/gpu/amd/default.nix
new file mode 100644
index 0000000..68db574
--- /dev/null
+++ b/modules/nixos/hardware/gpu/amd/default.nix
@@ -0,0 +1,29 @@
+{ pkgs, lib, namespace, config, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.hardware.has.gpu;
+in
+{
+ options.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration";
+
+ config = mkIf cfg.amd {
+ services.xserver.videoDrivers = [ "amd" ];
+
+ hardware = {
+ graphics = {
+ enable = true;
+ enable32Bit = true;
+ };
+
+ amdgpu = {
+ amdvlk = {
+ enable = true;
+ support32Bit.enable = true;
+ };
+
+ initrd.enable = true;
+ };
+ };
+ };
+}
diff --git a/modules/nixos/hardware/gpu/nvidia.nix b/modules/nixos/hardware/gpu/nvidia.nix
new file mode 100644
index 0000000..e8ac542
--- /dev/null
+++ b/modules/nixos/hardware/gpu/nvidia.nix
@@ -0,0 +1,31 @@
+{ pkgs, lib, namespace, config, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.hardware.has.gpu.nvidia;
+in
+{
+ options.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration";
+
+ config = mkIf cfg {
+ services.xserver.videoDrivers = [ "nvidia" ];
+
+ hardware = {
+ graphics = {
+ enable = true;
+ enable32Bit = true;
+ };
+
+ nvidia = {
+ modesetting.enable = true;
+ open = false;
+ nvidiaSettings = true;
+
+ powerManagement = {
+ enable = true;
+ finegrained = false;
+ };
+ };
+ };
+ };
+}
diff --git a/modules/nixos/hardware/gpu/nvidia/default.nix b/modules/nixos/hardware/gpu/nvidia/default.nix
new file mode 100644
index 0000000..ab7c087
--- /dev/null
+++ b/modules/nixos/hardware/gpu/nvidia/default.nix
@@ -0,0 +1,49 @@
+{ pkgs, lib, namespace, config, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.hardware.has.gpu;
+in
+{
+ options.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration";
+
+ config = mkIf cfg.nvidia {
+ services.xserver.videoDrivers = [ "nvidia" ];
+
+ hardware = {
+ graphics = {
+ enable = true;
+ enable32Bit = true;
+ };
+
+ nvidia = {
+ modesetting.enable = true;
+ open = false;
+ nvidiaSettings = true;
+
+ powerManagement = {
+ enable = true;
+ finegrained = false;
+ };
+
+ # package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
+
+ # package = let
+ # rcu_patch = pkgs.fetchpatch {
+ # url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch";
+ # hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg=";
+ # };
+ # in config.boot.kernelPackages.nvidiaPackages.mkDriver {
+ # version = "550.40.07";
+ # sha256_64bit = "sha256-KYk2xye37v7ZW7h+uNJM/u8fNf7KyGTZjiaU03dJpK0=";
+ # sha256_aarch64 = "sha256-AV7KgRXYaQGBFl7zuRcfnTGr8rS5n13nGUIe3mJTXb4=";
+ # openSha256 = "sha256-mRUTEWVsbjq+psVe+kAT6MjyZuLkG2yRDxCMvDJRL1I=";
+ # settingsSha256 = "sha256-c30AQa4g4a1EHmaEu1yc05oqY01y+IusbBuq+P6rMCs=";
+ # persistencedSha256 = "sha256-11tLSY8uUIl4X/roNnxf5yS2PQvHvoNjnd2CB67e870=";
+
+ # patches = [ rcu_patch ];
+ # };
+ };
+ };
+ };
+}
diff --git a/modules/nixos/hardware/keyboard/voyager.nix b/modules/nixos/hardware/keyboard/voyager.nix
new file mode 100644
index 0000000..fd470f8
--- /dev/null
+++ b/modules/nixos/hardware/keyboard/voyager.nix
@@ -0,0 +1,46 @@
+{ lib, config, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.hardware.keyboard.voyager;
+in
+{
+ options.${namespace}.hardware.keyboard.voyager = {
+ enble = mkEnableOption "Enable tools for ZSA Voyager";
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = with pkgs; [
+ keymapp
+ ];
+
+ hardware.keyboard.zsa.enable = true;
+
+ services.udev.extraRules = ''
+ # Rules for Oryx web flashing and live training
+ KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev"
+ KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev"
+
+ # Legacy rules for live training over webusb (Not needed for firmware v21+)
+ # Rule for all ZSA keyboards
+ SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev"
+ # Rule for the Moonlander
+ SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev"
+ # Rule for the Ergodox EZ
+ SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev"
+ # Rule for the Planck EZ
+ SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev"
+
+ # Wally Flashing rules for the Ergodox EZ
+ ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
+ ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
+ SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
+ KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"
+
+ # Keymapp / Wally Flashing rules for the Moonlander and Planck EZ
+ SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu"
+ # Keymapp Flashing rules for the Voyager
+ SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu"
+ '';
+ };
+}
diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix
new file mode 100644
index 0000000..7d1f069
--- /dev/null
+++ b/modules/nixos/nix/default.nix
@@ -0,0 +1,44 @@
+{ pkgs, lib, namespace, config, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.nix;
+in
+{
+ options.${namespace}.nix = {
+ enable = mkEnableOption "Enable nix command";
+ };
+
+ config = mkIf cfg.enable {
+ programs.git.enable = true;
+
+ nix = {
+ package = pkgs.nixVersions.latest;
+
+ extraOptions = "experimental-features = nix-command flakes";
+
+ settings = {
+ experimental-features = [ "nix-command" "flakes" ];
+ allowed-users = [ "@wheel" ];
+ trusted-users = [ "@wheel" ];
+
+ auto-optimise-store = true;
+ connect-timeout = 5;
+ http-connections = 50;
+ log-lines = 50; # more log lines in case of error
+ min-free = 1 * (1024 * 1024 * 1024); # GiB # start garbage collector
+ max-free = 50 * (1024 * 1024 * 1024); # GiB # until
+ warn-dirty = false;
+ };
+
+ gc = {
+ automatic = true;
+ dates = "monthly";
+ options = "--delete-older-than 45d";
+ };
+
+ # disable nix-channel, we use flakes instead.
+ channel.enable = false;
+ };
+ };
+}
diff --git a/modules/system/services/auth/authelia.nix b/modules/nixos/services/authentication/authelia.nix
similarity index 98%
rename from modules/system/services/auth/authelia.nix
rename to modules/nixos/services/authentication/authelia.nix
index c713279..e706439 100644
--- a/modules/system/services/auth/authelia.nix
+++ b/modules/nixos/services/authentication/authelia.nix
@@ -1,12 +1,12 @@
-{ config, lib, pkgs, ... }:
+{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
user = "authelia-testing";
- cfg = config.modules.services.auth.authelia;
+ cfg = config.${namespace}.services.authentication.authelia;
in
{
- options.modules.services.auth.authelia = {
+ options.${namespace}.services.authentication.authelia = {
enable = mkEnableOption "Authelia";
};
diff --git a/modules/nixos/services/authentication/default.nix b/modules/nixos/services/authentication/default.nix
new file mode 100644
index 0000000..c157af7
--- /dev/null
+++ b/modules/nixos/services/authentication/default.nix
@@ -0,0 +1 @@
+{ ... }: {}
diff --git a/modules/system/authentication/himmelblau.nix b/modules/nixos/services/authentication/himmelblau.nix
similarity index 68%
rename from modules/system/authentication/himmelblau.nix
rename to modules/nixos/services/authentication/himmelblau.nix
index 7817335..1228759 100644
--- a/modules/system/authentication/himmelblau.nix
+++ b/modules/nixos/services/authentication/himmelblau.nix
@@ -1,12 +1,12 @@
-{ inputs, lib, config, ... }: let
+{ inputs, lib, config, namespace, ... }: let
inherit (lib) mkEnableOption mkIf;
- cfg = config.modules.authentication.himmelblau;
+ cfg = config.${namespace}.services.authentication.himmelblau;
in
{
imports = [ inputs.himmelblau.nixosModules.himmelblau ];
- options.modules.authentication.himmelblau = {
+ options.${namespace}.services.authentication.himmelblau = {
enable = mkEnableOption "enable azure entra ID authentication";
};
diff --git a/modules/system/services/auth/zitadel.nix b/modules/nixos/services/authentication/zitadel.nix
similarity index 92%
rename from modules/system/services/auth/zitadel.nix
rename to modules/nixos/services/authentication/zitadel.nix
index 2814649..6142857 100644
--- a/modules/system/services/auth/zitadel.nix
+++ b/modules/nixos/services/authentication/zitadel.nix
@@ -1,14 +1,14 @@
-{ config, options, lib, pkgs, ... }:
+{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
- cfg = config.modules.services.auth.zitadel;
+ cfg = config.${namespace}.services.authentication.zitadel;
db_name = "zitadel";
db_user = "zitadel";
in
{
- options.modules.services.auth.zitadel = {
+ options.${namespace}.services.authentication.zitadel = {
enable = mkEnableOption "Zitadel";
};
diff --git a/modules/system/services/games/minecraft.nix b/modules/nixos/services/games/minecraft.nix
similarity index 91%
rename from modules/system/services/games/minecraft.nix
rename to modules/nixos/services/games/minecraft.nix
index c414881..7f408ae 100644
--- a/modules/system/services/games/minecraft.nix
+++ b/modules/nixos/services/games/minecraft.nix
@@ -1,22 +1,33 @@
-{ inputs, config, lib, pkgs, ... }:
+{ inputs, config, lib, pkgs, namespace, ... }:
let
- inherit (lib.modules) mkIf;
+ inherit (lib) mkIf mkEnableOption mkOption;
+ inherit (lib.types) str;
+
+ cfg = config.${namespace}.services.games.minecraft;
in
{
imports = [
inputs.nix-minecraft.nixosModules.minecraft-servers
];
- options.modules.services.games.minecraft = let
- inherit (lib.options) mkEnableOption;
- in {
+ options.${namespace}.services.games.minecraft = {
enable = mkEnableOption "Minecraft";
+
+ user = mkOption {
+ type = str;
+ default = "minecraft";
+ };
+
+ group = mkOption {
+ type = str;
+ default = "minecraft";
+ };
};
- config = mkIf config.modules.services.games.minecraft.enable {
- user.users."minecraft" = {
+ config = mkIf cfg.enable {
+ user.users.${cfg.user} = {
isSystemUser = true;
- group = "minecraft";
+ group = cfg.group;
};
services = {
@@ -25,7 +36,7 @@ in
eula = true;
openFirewall = true;
- user = "minecraft";
+ user = cfg.user;
dataDir = "/var/lib/minecraft";
managementSystem = {
@@ -151,7 +162,7 @@ in
symlinks = let
inherit (builtins) attrNames readDir map;
- inherit (pkgs) linkFarm fetchzip;
+ inherit (pkgs) linkFarm;
linkFarmFromDir = name: dir: linkFarm name (map (x: { name = x; path = "${src}/${dir}/${x}"; }) (attrNames (readDir "${src}/${dir}")));
in {
diff --git a/modules/system/services/games/palworld.nix b/modules/nixos/services/games/palworld.nix
similarity index 64%
rename from modules/system/services/games/palworld.nix
rename to modules/nixos/services/games/palworld.nix
index 2f11597..dea16b3 100644
--- a/modules/system/services/games/palworld.nix
+++ b/modules/nixos/services/games/palworld.nix
@@ -1,15 +1,15 @@
-{ config, options, lib, pkgs, ... }:
+{ config, lib, namespace, ... }:
let
- inherit (lib.modules) mkIf;
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.services.games.palworld;
in
{
- options.modules.services.games.palworld = let
- inherit (lib.options) mkEnableOption;
- in {
+ options.${namespace}.services.games.palworld = {
enable = mkEnableOption "Palworld";
};
- config = mkIf config.modules.services.games.palworld.enable {
+ config = mkIf cfg.enable {
# kaas = (pkgs.mkSteamServer rec {
# name = "Palworld";
# src = pkgs.fetchSteam {
diff --git a/modules/nixos/services/media/default.nix b/modules/nixos/services/media/default.nix
new file mode 100644
index 0000000..7d76794
--- /dev/null
+++ b/modules/nixos/services/media/default.nix
@@ -0,0 +1,156 @@
+{ pkgs, lib, namespace, config, ... }:
+let
+ inherit (lib) mkIf mkEnableOption mkOption;
+ inherit (lib.types) str;
+
+ cfg = config.${namespace}.services.media;
+in
+{
+ options.${namespace}.services.media = {
+ enable = mkEnableOption "Enable media services";
+
+ user = mkOption {
+ type = str;
+ default = "media";
+ };
+
+ group = mkOption {
+ type = str;
+ default = "media";
+ };
+
+ path = mkOption {
+ type = str;
+ default = "/var/media";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ #=========================================================================
+ # Dependencies
+ #=========================================================================
+ environment.systemPackages = with pkgs; [
+ podman-tui
+ jellyfin
+ jellyfin-web
+ jellyfin-ffmpeg
+ jellyseerr
+ mediainfo
+ id3v2
+ yt-dlp
+ ];
+
+ #=========================================================================
+ # Prepare system
+ #=========================================================================
+ users = {
+ users.${cfg.user} = {
+ isSystemUser = true;
+ group = cfg.group;
+ };
+ groups.${cfg.group} = {};
+ };
+
+ systemd.tmpfiles.rules = [
+ "d '${cfg.path}/series' 0700 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.path}/movies' 0700 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.path}/music' 0700 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.path}/qbittorrent' 0700 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.path}/sabnzbd' 0700 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.path}/reiverr/config' 0700 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.path}/downloads/incomplete' 0700 ${cfg.user} ${cfg.group} - -"
+ "d '${cfg.path}/downloads/done' 0700 ${cfg.user} ${cfg.group} - -"
+ ];
+
+ #=========================================================================
+ # Services
+ #=========================================================================
+ services = let
+ serviceConf = {
+ enable = true;
+ openFirewall = true;
+ user = cfg.user;
+ group = cfg.group;
+ };
+ in {
+ jellyfin = serviceConf;
+ radarr = serviceConf;
+ sonarr = serviceConf;
+ bazarr = serviceConf;
+ lidarr = serviceConf;
+
+ jellyseerr = {
+ enable = true;
+ openFirewall = true;
+ };
+
+ prowlarr = {
+ enable = true;
+ openFirewall = true;
+ };
+
+ qbittorrent = {
+ enable = true;
+ openFirewall = true;
+ webuiPort = 5000;
+
+ serverConfig = {
+ LegalNotice.Accepted = true;
+ };
+
+ user = cfg.user;
+ group = cfg.group;
+ };
+
+ sabnzbd = {
+ enable = true;
+ openFirewall = true;
+ configFile = "${cfg.path}/sabnzbd/config.ini";
+
+ user = cfg.user;
+ group = cfg.group;
+ };
+
+ caddy = {
+ enable = true;
+ virtualHosts = {
+ "media.kruining.eu".extraConfig = ''
+ import auth
+
+ reverse_proxy http://127.0.0.1:9494
+ '';
+ "jellyfin.kruining.eu".extraConfig = ''
+ reverse_proxy http://127.0.0.1:8096
+ '';
+ };
+ };
+ };
+
+ systemd.services.jellyfin.serviceConfig.killSignal = lib.mkForce "SIGKILL";
+
+ ${namespace}.services.virtualisation.podman.enable = true;
+
+ virtualisation = {
+ oci-containers = {
+ backend = "podman";
+
+ containers = {
+ flaresolverr = {
+ image = "flaresolverr/flaresolverr";
+ autoStart = true;
+ ports = [ "127.0.0.1:8191:8191" ];
+ };
+
+ reiverr = {
+ image = "ghcr.io/aleksilassila/reiverr:v2.2.0";
+ autoStart = true;
+ ports = [ "127.0.0.1:9494:9494" ];
+ volumes = [ "${cfg.path}/reiverr/config:/config" ];
+ };
+ };
+ };
+ };
+
+ networking.firewall.allowedTCPPorts = [ 80 443 6969 ];
+ };
+}
diff --git a/modules/system/services/nextcloud.nix b/modules/nixos/services/media/nextcloud.nix
similarity index 77%
rename from modules/system/services/nextcloud.nix
rename to modules/nixos/services/media/nextcloud.nix
index 4325d6c..658a5b4 100644
--- a/modules/system/services/nextcloud.nix
+++ b/modules/nixos/services/media/nextcloud.nix
@@ -1,26 +1,35 @@
-{ config, lib, pkgs, ... }:
+{ config, lib, pkgs, namespace, ... }:
let
- inherit (lib.options) mkEnableOption;
- inherit (lib.modules) mkIf;
+ inherit (lib) mkIf mkEnableOption mkOption;
+ inherit (lib.types) str;
- user = "nextcloud";
- group = "nextcloud";
+ cfg = config.${namespace}.services.media.nextcloud;
in
{
options.modules.services.nextcloud = {
enable = mkEnableOption "Nextcloud";
- };
- config = mkIf config.modules.services.nextcloud.enable {
- users = {
- users.${user} = {
- isSystemUser = true;
- group = group;
- };
- groups.${group} = {};
+ user = mkOption {
+ type = str;
+ default = "nextcloud";
};
- home-manager.users.${user}.home = {
+ group = mkOption {
+ type = str;
+ default = "nextcloud";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ users = {
+ users.${cfg.user} = {
+ isSystemUser = true;
+ group = cfg.group;
+ };
+ groups.${cfg.group} = {};
+ };
+
+ home-manager.users.${cfg.user}.home = {
stateVersion = config.system.stateVersion;
file.".netrc".text = ''
diff --git a/modules/system/networking/nfs.nix b/modules/nixos/services/media/nfs.nix
similarity index 75%
rename from modules/system/networking/nfs.nix
rename to modules/nixos/services/media/nfs.nix
index 38a42df..7674e69 100644
--- a/modules/system/networking/nfs.nix
+++ b/modules/nixos/services/media/nfs.nix
@@ -1,11 +1,11 @@
-{ config, lib, ... }:
+{ config, lib, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
- cfg = config.modules.networking.nfs;
+ cfg = config.${namespace}.media.nfs;
in
{
- options.modules.networking.nfs = {
+ options.${namespace}.media.nfs = {
enable = mkEnableOption "Enable NFS";
};
diff --git a/modules/system/networking/ssh.nix b/modules/nixos/services/networking/ssh/default.nix
similarity index 78%
rename from modules/system/networking/ssh.nix
rename to modules/nixos/services/networking/ssh/default.nix
index 8d2b1c6..5ebdfd2 100644
--- a/modules/system/networking/ssh.nix
+++ b/modules/nixos/services/networking/ssh/default.nix
@@ -1,12 +1,12 @@
-{ config, lib, ... }:
+{ config, lib, namespace, ... }:
let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
- cfg = config.modules.networking.ssh;
+ cfg = config.${namespace}.services.networking.ssh;
in
{
- options.modules.networking.ssh = {
+ options.${namespace}.services.networking.ssh = {
enable = mkEnableOption "enable ssh";
};
diff --git a/modules/system/services/security.nix b/modules/nixos/services/security/vaultwarden/default.nix
similarity index 60%
rename from modules/system/services/security.nix
rename to modules/nixos/services/security/vaultwarden/default.nix
index ff8bf62..6870606 100644
--- a/modules/system/services/security.nix
+++ b/modules/nixos/services/security/vaultwarden/default.nix
@@ -1,13 +1,13 @@
-{ config, lib, pkgs, ... }:
+{ pkgs, config, lib, namespace, ... }:
let
-inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf;
+ inherit (lib.options) mkEnableOption;
- cfg = config.modules.services.security;
+ cfg = config.${namespace}.services.security.vaultwarden;
in
{
- options.modules.services.security = {
- enable = mkEnableOption "Security service(s): Vaultwarden";
+ options.${namespace}.services.security.vaultwarden = {
+ enable = mkEnableOption "enable vaultwarden";
};
config = mkIf cfg.enable {
diff --git a/modules/nixos/services/virtualisation/podman/default.nix b/modules/nixos/services/virtualisation/podman/default.nix
new file mode 100644
index 0000000..9b9dc89
--- /dev/null
+++ b/modules/nixos/services/virtualisation/podman/default.nix
@@ -0,0 +1,23 @@
+{ config, options, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.services.virtualisation.podman;
+in
+{
+ options.${namespace}.services.virtualisation.podman = {
+ enable = mkEnableOption "enable podman";
+ };
+
+ config = mkIf cfg.enable {
+ virtualisation = {
+ containers.enable = true;
+
+ podman = {
+ enable = true;
+ dockerCompat = true;
+ defaultNetwork.settings.dns_enabled = true;
+ };
+ };
+ };
+}
diff --git a/modules/nixos/shells/default.nix b/modules/nixos/shells/default.nix
new file mode 100644
index 0000000..6b5c058
--- /dev/null
+++ b/modules/nixos/shells/default.nix
@@ -0,0 +1,2 @@
+{ ... }:
+{}
\ No newline at end of file
diff --git a/modules/nixos/shells/zsh/default.nix b/modules/nixos/shells/zsh/default.nix
new file mode 100644
index 0000000..399e7dd
--- /dev/null
+++ b/modules/nixos/shells/zsh/default.nix
@@ -0,0 +1,16 @@
+{ inputs, config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkIf mkEnableOption;
+
+ cfg = config.${namespace}.shell.zsh;
+in
+{
+ options.${namespace}.shell.zsh = {
+ enable = mkEnableOption "enable zsh shell";
+ };
+
+ config = mkIf cfg.enable {
+ # Enable completion for sys-packages:
+ environment.pathsToLink = ["/share/zsh"];
+ };
+}
diff --git a/modules/nixos/system/networking/default.nix b/modules/nixos/system/networking/default.nix
new file mode 100644
index 0000000..c61a81b
--- /dev/null
+++ b/modules/nixos/system/networking/default.nix
@@ -0,0 +1,25 @@
+{ config, lib, pkgs, namespace, ... }:
+let
+ inherit (lib) mkDefault;
+
+ cfg = config.${namespace}.system.networking;
+in
+{
+ options.${namespace}.system.networking = {};
+
+ config = {
+ systemd.services.NetworkManager-wait-online.enable = false;
+
+ networking = {
+ enableIPv6 = true;
+ useDHCP = mkDefault true;
+
+ firewall.enable = true;
+
+ networkmanager = {
+ enable = true;
+ wifi.backend = "wpa_supplicant";
+ };
+ };
+ };
+}
diff --git a/modules/system/security.nix b/modules/nixos/system/security/boot/default.nix
similarity index 70%
rename from modules/system/security.nix
rename to modules/nixos/system/security/boot/default.nix
index 734c339..ccf1f83 100644
--- a/modules/system/security.nix
+++ b/modules/nixos/system/security/boot/default.nix
@@ -1,43 +1,12 @@
-{ inputs, pkgs, ... }:
+{ config, namespace, inputs, ... }:
+let
+ cfg = config.${namespace}.system.security.boot;
+in
{
- imports = [
- inputs.sops-nix.nixosModules.sops
- ];
+ options.${namespace}.system.security.boot = {};
config = {
- environment.systemPackages = with pkgs; [
- bitwarden
- sops
- ];
-
- sops = {
- defaultSopsFile = ../../secrets/secrets.yaml;
- defaultSopsFormat = "yaml";
-
- age.keyFile = "/home/";
- };
-
- security = {
- sudo.execWheelOnly = true;
- acme.acceptTerms = true;
- polkit.enable = true;
- pam = {
- u2f = {
- enable = true;
- settings.cue = true;
- };
- };
- };
-
- networking.firewall.enable = true;
- programs.gnupg.agent.enable = true;
-
boot = {
- loader.systemd-boot = {
- editor = false;
- configurationLimit = 50;
- };
-
kernelModules = [ "tcp_bbr" ];
kernel.sysctl = {
## TCP hardening
@@ -74,4 +43,4 @@
};
};
};
-}
+}
\ No newline at end of file
diff --git a/modules/nixos/system/security/default.nix b/modules/nixos/system/security/default.nix
new file mode 100644
index 0000000..e168543
--- /dev/null
+++ b/modules/nixos/system/security/default.nix
@@ -0,0 +1,23 @@
+{ config, namespace, inputs, ... }:
+let
+ cfg = config.${namespace}.system.security;
+in
+{
+ options.${namespace}.system.security = {};
+
+ config = {
+ security = {
+ acme.acceptTerms = true;
+ polkit.enable = true;
+
+ pam = {
+ u2f = {
+ enable = true;
+ settings.cue = true;
+ };
+ };
+ };
+
+ programs.gnupg.agent.enable = true;
+ };
+}
\ No newline at end of file
diff --git a/modules/nixos/system/security/sops/default.nix b/modules/nixos/system/security/sops/default.nix
new file mode 100644
index 0000000..a75856d
--- /dev/null
+++ b/modules/nixos/system/security/sops/default.nix
@@ -0,0 +1,22 @@
+{ pkgs, config, namespace, inputs, ... }:
+let
+ cfg = config.${namespace}.system.security.sops;
+in
+{
+ imports = [
+ inputs.sops-nix.nixosModules.sops
+ ];
+
+ options.${namespace}.system.security.sops = {};
+
+ config = {
+ environment.systemPackages = with pkgs; [ sops ];
+
+ sops = {
+ defaultSopsFile = ../../../../secrets/secrets.yaml;
+ defaultSopsFormat = "yaml";
+
+ age.keyFile = "/home/";
+ };
+ };
+}
\ No newline at end of file
diff --git a/modules/nixos/system/security/sudo/default.nix b/modules/nixos/system/security/sudo/default.nix
new file mode 100644
index 0000000..6dedf50
--- /dev/null
+++ b/modules/nixos/system/security/sudo/default.nix
@@ -0,0 +1,23 @@
+{ config, namespace, ... }:
+let
+ cfg = config.${namespace}.system.security.sudo;
+in
+{
+ options.${namespace}.system.security.sudo = {};
+
+ config = {
+ security = {
+ sudo = {
+ enable = false;
+ execWheelOnly = true;
+ };
+
+ sudo-rs = {
+ enable = true;
+ extraConfig = ''
+ Defaults env_keep += "EDITOR PATH DISPLAY"
+ '';
+ };
+ };
+ };
+}
\ No newline at end of file
diff --git a/modules/system/boot.nix b/modules/system/boot.nix
deleted file mode 100644
index 4761b6e..0000000
--- a/modules/system/boot.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{ config, lib, pkgs, ... }:
-let
- inherit (lib) mkMerge mkIf mkEnableOption mkDefault mkForce;
-
- cfg = config.modules.boot;
-in
-{
- options.modules.boot =
- {
- silentBoot = mkEnableOption "Enable silent boot";
- animatedBoot = mkEnableOption "Enable boot animation";
- };
-
- config = mkMerge [
- ({
- boot.loader = {
- efi.canTouchEfiVariables = true;
-
- systemd-boot.enable = true;
-
- timeout = mkDefault 0;
- };
-
- time.timeZone = "Europe/Amsterdam";
- })
-
- (mkIf (cfg.silentBoot == true) {
- boot = {
- consoleLogLevel = 0;
- initrd.verbose = false;
- kernelParams = [ "quiet" "splash" "boot.shell_on_fail" "udev.log_priority=3" "rd.systemd.show_status=auto" ];
- loader.timeout = mkDefault 0;
- };
- })
-
- (mkIf (cfg.animatedBoot == true) {
- boot.plymouth = {
- enable = true;
- theme = mkForce "pixels";
- themePackages = with pkgs; [
- (adi1090x-plymouth-themes.override {
- selected_themes = [ "pixels" ];
- })
- ];
- };
- })
- ];
-}
diff --git a/modules/system/common/qbittorrent.nix b/modules/system/common/qbittorrent.nix
deleted file mode 100644
index 4176165..0000000
--- a/modules/system/common/qbittorrent.nix
+++ /dev/null
@@ -1,144 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let
- cfg = config.services.qbittorrent;
- UID = 888;
- GID = 888;
-in
-{
- options.services.qbittorrent = {
- enable = mkEnableOption (lib.mdDoc "qBittorrent headless");
-
- dataDir = mkOption {
- type = types.path;
- default = "/var/lib/qbittorrent";
- description = lib.mdDoc ''
- The directory where qBittorrent stores its data files.
- '';
- };
-
- user = mkOption {
- type = types.str;
- default = "qbittorrent";
- description = lib.mdDoc ''
- User account under which qBittorrent runs.
- '';
- };
-
- group = mkOption {
- type = types.str;
- default = "qbittorrent";
- description = lib.mdDoc ''
- Group under which qBittorrent runs.
- '';
- };
-
- port = mkOption {
- type = types.port;
- default = 8080;
- description = lib.mdDoc ''
- qBittorrent web UI port.
- '';
- };
-
- openFirewall = mkOption {
- type = types.bool;
- default = false;
- description = lib.mdDoc ''
- Open services.qBittorrent.port to the outside network.
- '';
- };
-
- package = mkOption {
- type = types.package;
- default = pkgs.qbittorrent-nox;
- defaultText = literalExpression "pkgs.qbittorrent-nox";
- description = lib.mdDoc ''
- The qbittorrent package to use.
- '';
- };
- };
-
- config = mkIf cfg.enable (let
- configFile = pkgs.writeText "qBittorrent.conf" ''
- [BitTorrent]
- Session\Port=53271
- Session\SSL\Port=45846
- Session\QueueingSystemEnabled=false
- Session\MaxUploads=-1
- Session\MaxUploadsPerTorrent=-1
-
- [Meta]
- MigrationVersion=8
-
- [Network]
- Cookies=@Invalid()
-
- [Preferences]
- WebUI\Port=5000
- WebUI\Username=admin
- WebUI\Password_PBKDF2="@ByteArray(Clgb2+ZyS3PDRVqtYpj0Ow==:kjN301CJife6g5ou8N2mk6ydQWPQIGgrTAWg5ByWCqAv0jDLphR/IaVQ1tu9KtA+il1udi48xSXZ3AUpjK/fRw==)"
-
- [RSS]
- AutoDownloader\DownloadRepacks=true
- AutoDownloader\SmartEpisodeFilter=s(\\d+)e(\\d+), (\\d+)x(\\d+), "(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "(\\d{1,2}[.\\-]\\d{1,2}[.\\-]\\d{4})"
- '';
- in {
- networking.firewall = mkIf cfg.openFirewall {
- allowedTCPPorts = [ cfg.port ];
- };
-
- systemd.tmpfiles.rules = [
- # https://www.mankier.com/5/tmpfiles.d
- "d '${cfg.dataDir}' 0700 ${cfg.user} ${cfg.group} - -"
- "d '${cfg.dataDir}/__config' 0700 ${cfg.user} ${cfg.group} - -"
- "L+ '${cfg.dataDir}/__config/qBittorrent.conf' - - - - ${configFile}"
- ];
-
- systemd.services.qbittorrent = {
- description = "qBittorrent-nox service";
- documentation = [ "man:qbittorrent-nox(1)" ];
- after = [ "network.target" ];
- wantedBy = [ "multi-user.target" ];
-
- serviceConfig = {
- Type = "simple";
- User = cfg.user;
- Group = cfg.group;
-
- ExecStartPre = let
- preStartScript = pkgs.writeScript "qbittorrent-run-prestart" ''
- #!${pkgs.bash}/bin/bash
-
- # Create data directory if it doesn't exist
- if ! test -d "$QBT_PROFILE"; then
- echo "Creating initial qBittorrent data directory in: $QBT_PROFILE"
- install -d -m 0755 -o "${cfg.user}" -g "${cfg.group}" "$QBT_PROFILE"
- fi
- '';
- in
- "!${preStartScript}";
-
- ExecStart = "${cfg.package}/bin/qbittorrent-nox";
- };
-
- environment = {
- QBT_PROFILE = cfg.dataDir;
- QBT_WEBUI_PORT = toString cfg.port;
- };
- };
-
- users.users = mkIf (cfg.user == "qbittorrent") {
- qbittorrent = {
- group = cfg.group;
- uid = UID;
- };
- };
-
- users.groups = mkIf (cfg.group == "qbittorrent") {
- qbittorrent = { gid = GID; };
- };
- });
-}
diff --git a/modules/system/desktop/editors/nvim.nix b/modules/system/desktop/editors/nvim.nix
deleted file mode 100644
index 12bdead..0000000
--- a/modules/system/desktop/editors/nvim.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ inputs, config, options, lib, pkgs, ... }:
-let
- inherit (lib.meta) getExe;
- inherit (lib.modules) mkIf;
-
- cfg = options.modules.desktop.editors.nvim;
-in
-{
- imports = [
- inputs.nvf.nixosModules.default
- ];
-
- options.modules.desktop.editors.nvim = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "neo-vim (nixvim)";
- };
-
- config = mkIf cfg.enable {
-
- };
-}
diff --git a/modules/system/desktop/gaming.nix b/modules/system/desktop/gaming.nix
deleted file mode 100644
index 54efe3b..0000000
--- a/modules/system/desktop/gaming.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ inputs, lib, config, ... }: let
- inherit (lib) mkEnableOption mkIf;
-
- cfg = config.modules.desktop.gaming;
-in
-{
- imports = [ inputs.jovian.nixosModules.default ];
-
- options.modules.desktop.gaming = {
- enable = mkEnableOption "enable steamdeck like desktop";
- };
-
- config = mkIf cfg.enable {
- services.desktopManager.plasma6.enable = true;
-
- jovian = {
- # devices = {
- # steamdeck = {
- # enable = true;
- # enableGyroDsuService = true;
- # autoUpdate = true;
- # };
- # };
- steam = {
- enable = true;
- autoStart = true;
- user = "chris";
- updater.splash = "steamos";
- desktopSession = "plasma";
- };
- steamos.useSteamOSConfig = true;
- };
- };
-}
diff --git a/modules/system/desktop/wine.nix b/modules/system/desktop/wine.nix
deleted file mode 100644
index 7444d77..0000000
--- a/modules/system/desktop/wine.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ inputs, lib, pkgs, ... }:
-{
- # imports = [ inputs.erosanix.nixosModules.someModule ];
-
- config = {
-
- };
-}
diff --git a/modules/system/graphics.nix b/modules/system/graphics.nix
deleted file mode 100644
index a4d9775..0000000
--- a/modules/system/graphics.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ ... }:
-{
- services.xserver.videoDrivers = [ "nvidia" ];
-
- hardware = {
- graphics = {
- enable = true;
- enable32Bit = true;
- };
-
- nvidia = {
- modesetting.enable = true;
- open = false;
- nvidiaSettings = true;
-
- powerManagement = {
- enable = true;
- finegrained = false;
- };
-
-# package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
-
- # package = let
- # rcu_patch = pkgs.fetchpatch {
- # url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch";
- # hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg=";
- # };
- # in config.boot.kernelPackages.nvidiaPackages.mkDriver {
- # version = "550.40.07";
- # sha256_64bit = "sha256-KYk2xye37v7ZW7h+uNJM/u8fNf7KyGTZjiaU03dJpK0=";
- # sha256_aarch64 = "sha256-AV7KgRXYaQGBFl7zuRcfnTGr8rS5n13nGUIe3mJTXb4=";
- # openSha256 = "sha256-mRUTEWVsbjq+psVe+kAT6MjyZuLkG2yRDxCMvDJRL1I=";
- # settingsSha256 = "sha256-c30AQa4g4a1EHmaEu1yc05oqY01y+IusbBuq+P6rMCs=";
- # persistencedSha256 = "sha256-11tLSY8uUIl4X/roNnxf5yS2PQvHvoNjnd2CB67e870=";
-
- # patches = [ rcu_patch ];
- # };
- };
- };
-}
diff --git a/modules/system/networking/default.nix b/modules/system/networking/default.nix
deleted file mode 100644
index d8cdec7..0000000
--- a/modules/system/networking/default.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ config, options, lib, pkgs, ... }: let
- inherit (lib.modules) mkDefault;
- inherit (lib.options) mkOption;
-
- cfg = config.modules.networking;
-in {
- options.modules.networking = {
- wifi.backend = mkOption {
- type = with lib.types; enum [ "wpa_supplicant" "iwd" ];
- default = "wpa_supplicant";
- example = "wpa_supplicant";
- description = "set the backend used for wifi wpa_supplicant by default";
- };
- };
-
- config = {
- systemd.services.NetworkManager-wait-online.enable = false;
-
- networking = {
- enableIPv6 = true;
- useDHCP = mkDefault true;
-
- firewall.enable = true;
-
- networkmanager = {
- enable = mkDefault true;
- wifi.backend = mkDefault config.modules.networking.wifi.backend;
- };
- };
- };
-}
diff --git a/modules/system/networking/samba.nix b/modules/system/networking/samba.nix
deleted file mode 100644
index d7e0b7f..0000000
--- a/modules/system/networking/samba.nix
+++ /dev/null
@@ -1,71 +0,0 @@
-{ pkgs, config, lib, ... }:
-let
- inherit (builtins) getEnv;
- inherit (lib.modules) mkIf mkMerge;
-in
-{
- options.modules.networking.samba = let
- inherit (lib.options) mkEnableOption;
- in {
- sharing.enable = mkEnableOption "Samba: enable NixOs -> external file-transfer";
- receicing.enable = mkEnableOption "Samba: enable external -> NixOs file-transfer";
- };
-
- config = mkMerge [
- (mkIf config.modules.networking.samba.sharing.enable {
- users = {
- groups.samba-guest = {};
- users.samba-guest = {
- isSystemUser = true;
- description = "Residence of our Samba guest users";
- group = "samba-guest";
- home = "/var/empty";
- createHome = false;
- shell = pkgs.shadow;
- };
- };
- user.extraGroups = [ "samba-guest" ];
-
- networking.firewall = {
- allowPing = true;
- allowedTCPPorts = [ 5327 ];
- allowedUDPPorts = [ 3702 ];
- };
-
- services.samba-wsdd.enable = true;
-
- services.samba = {
- enable = true;
- openFirewall = true;
- extraConfig = ''
- server string = ${config.networking.hostName}
- netbios name = ${config.networking.hostName}
- workgroup = WORKGROUP
- security = user
-
- create mask 0664
- force create mode 0664
- directory mask 0775
- force directory mode 0775
- follow symlink = yes
-
- hosts allow = 192.168.1.0/24 localhost
- hosts deny = 0.0.0.0/0
- guest account = nobody
- map to guest = bad user
- '';
- shares = {
- Public = {
- path = (getEnv "HOME") + "/Public";
- browseable = "yes";
- "read only" = "yes";
- "guest ok" = "yes";
- "forse user" = "${config.user.name}";
- "force group" = "samba-guest";
- "write list" = "${config.user.name}";
- };
- };
- };
- })
- ];
-}
diff --git a/modules/system/options.nix b/modules/system/options.nix
deleted file mode 100644
index abce819..0000000
--- a/modules/system/options.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ config, lib, ... }:
-let
- inherit (lib.types) attrs;
- inherit (lib.my) mkOpt;
-in
-{
- options = {
- user = mkOpt attrs {};
- };
-
- config = {
- environment.variables = {
- NIXPKGS_ALLOW_UNFREE = "1";
- };
-
- nix.settings = let
- inherit (lib) elem attrNames filterAttrs;
-
- users = (attrNames (filterAttrs (name: user: elem "wheel" (user.extraGroups or [])) config.users.users));# ++ [ "root" ];
- in
- {
- trusted-users = users;
- allowed-users = users;
- experimental-features = [ "nix-command" "flakes" ];
- };
- };
-}
diff --git a/modules/system/services/default.nix b/modules/system/services/default.nix
deleted file mode 100644
index 4afadc5..0000000
--- a/modules/system/services/default.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{ ... }:
-{
- options.modules.services = {};
-}
diff --git a/modules/system/services/media.nix b/modules/system/services/media.nix
deleted file mode 100644
index 9ec8e5e..0000000
--- a/modules/system/services/media.nix
+++ /dev/null
@@ -1,167 +0,0 @@
-{ config, lib, pkgs, ... }:
-let
- inherit (lib) mkIf;
-
- user = "media";
- group = "media";
- directory = "/var/media";
-in
-{
- options.modules.services.media = let
- inherit (lib.options) mkEnableOption;
- in {
- enable = mkEnableOption "Media tools";
- };
-
- imports = let
- extras = fetchTarball {
- url = "https://github.com/onny/nixos-nextcloud-testumgebung/archive/fa6f062830b4bc3cedb9694c1dbf01d5fdf775ac.tar.gz";
- sha256 = "0gzd0276b8da3ykapgqks2zhsqdv4jjvbv97dsxg0hgrhb74z0fs";
- };
- in [
- "${extras}/nextcloud-extras.nix"
- ];
-
- config = mkIf config.modules.services.media.enable {
- environment.systemPackages = with pkgs; [
- podman-tui
- jellyfin
- jellyfin-web
- jellyfin-ffmpeg
- jellyseerr
- mediainfo
- id3v2
- yt-dlp
- ];
-
- # need to permit these outdated packages until servarr finally upgrades at some point...
- permittedInsecurePackages = [
- "dotnet-sdk-6.0.428"
- "aspnetcore-runtime-6.0.36"
- ];
-
- users = {
- users.${user} = {
- isSystemUser = true;
- group = group;
- };
- groups.${group} = {};
- };
-
- systemd.tmpfiles.rules = [
- "d '${directory}/series' 0700 ${user} ${group} - -"
- "d '${directory}/movies' 0700 ${user} ${group} - -"
- "d '${directory}/music' 0700 ${user} ${group} - -"
- "d '${directory}/qbittorrent' 0700 ${user} ${group} - -"
- "d '${directory}/sabnzbd' 0700 ${user} ${group} - -"
- "d '${directory}/reiverr/config' 0700 ${user} ${group} - -"
- "d '${directory}/downloads/incomplete' 0700 ${user} ${group} - -"
- "d '${directory}/downloads/done' 0700 ${user} ${group} - -"
- ];
-
- services = let
- serviceConf = {
- enable = true;
- openFirewall = true;
- user = user;
- group = group;
- };
- in {
- jellyfin = serviceConf;
- radarr = serviceConf;
- sonarr = serviceConf;
- bazarr = serviceConf;
- lidarr = serviceConf;
-
- lanraragi = {
- enable = true;
- port = 6969;
- };
-
- jellyseerr = {
- enable = true;
- openFirewall = true;
- };
-
- prowlarr = {
- enable = true;
- openFirewall = true;
- };
-
- qbittorrent = {
- enable = true;
- openFirewall = true;
- dataDir = "${directory}/qbittorrent";
- port = 5000;
-
- user = user;
- group = group;
- };
-
- sabnzbd = {
- enable = true;
- openFirewall = true;
- configFile = "${directory}/sabnzbd/config.ini";
-
- user = user;
- group = group;
- };
-
- caddy = {
- enable = true;
- virtualHosts = {
- "media.kruining.eu".extraConfig = ''
- import auth
-
- reverse_proxy http://127.0.0.1:9494
- '';
- "jellyfin.kruining.eu".extraConfig = ''
- reverse_proxy http://127.0.0.1:8096
- '';
- # "series.kruining.eu".extraConfig = ''
- # reverse_proxy http://127.0.0.1:8989
- # '';
- # "movies.kruining.eu".extraConfig = ''
- # reverse_proxy http://127.0.0.1:7878
- # '';
- # "indexer.kruining.eu".extraConfig = ''
- # reverse_proxy http://127.0.0.1:9696
- # '';
- # "torrents.kruining.eu".extraConfig = ''
- # reverse_proxy http://127.0.0.1:5000
- # '';
- # "usenet.kruining.eu".extraConfig = ''
- # reverse_proxy http://127.0.0.1:8080
- # '';
- };
- };
- };
-
- networking.firewall.allowedTCPPorts = [ 80 443 6969 ];
-
- modules.virtualisation.podman.enable = true;
-
- virtualisation = {
- oci-containers = {
- backend = "podman";
-
- containers = {
- flaresolverr = {
- image = "flaresolverr/flaresolverr";
- autoStart = true;
- ports = [ "127.0.0.1:8191:8191" ];
- };
-
- reiverr = {
- image = "ghcr.io/aleksilassila/reiverr:v2.2.0";
- autoStart = true;
- ports = [ "127.0.0.1:9494:9494" ];
- volumes = [ "${directory}/reiverr/config:/config" ];
- };
- };
- };
- };
-
- systemd.services.jellyfin.serviceConfig.killSignal = lib.mkForce "SIGKILL";
- };
-}
diff --git a/modules/system/shell/default.nix b/modules/system/shell/default.nix
deleted file mode 100644
index c1a3a90..0000000
--- a/modules/system/shell/default.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ config, lib, ... }:
-let
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.shell;
-in
-{
- options.modules.shell = {};
-
- config = mkIf cfg.enable {};
-}
diff --git a/modules/system/shell/zsh.nix b/modules/system/shell/zsh.nix
deleted file mode 100644
index c54164b..0000000
--- a/modules/system/shell/zsh.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ config, lib, ... }: let
- inherit (lib.options) mkEnableOption;
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.shell.zsh;
-in
-{
- options.modules.shell.zsh = {
- enable = mkEnableOption "enable ZSH";
- };
-
- config = mkIf cfg.enable {
- programs.zsh.enable = true;
- };
-}
diff --git a/modules/system/system/bluetooth.nix b/modules/system/system/bluetooth.nix
deleted file mode 100644
index 45343c3..0000000
--- a/modules/system/system/bluetooth.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ config, lib, ... }:
-let
- inherit (lib.modules) mkIf;
- inherit (lib.options) mkEnableOption;
-
- cfg = config.modules.system.bluetooth;
-in
-{
- options.modules.system.bluetooth = {
- enable = mkEnableOption "enable bluetooth";
- };
-
- config = mkIf cfg.enable {
- hardware = {
- bluetooth = {
- enable = true;
- powerOnBoot = true;
- };
- };
-
- services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
- "monitor.bluez.properties" = {
- "bluez5.enable-sbc-xq" = true;
- "bluez5.enable-msbc" = true;
- "bluez5.enable-hw-volume" = true;
- "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
- };
- };
- };
-}
diff --git a/modules/system/theming.nix b/modules/system/theming.nix
deleted file mode 100644
index be7b853..0000000
--- a/modules/system/theming.nix
+++ /dev/null
@@ -1,49 +0,0 @@
-{ inputs, config, lib, pkgs, ... }:
-let
- inherit (lib) mkIf;
- inherit (lib.options) mkEnableOption;
-
- cfg = config.modules.theming;
-in
-{
- imports = [
- inputs.stylix.nixosModules.stylix
- ];
-
- options.modules.theming = {
- enable = mkEnableOption "enable theming";
- };
-
- config = mkIf cfg.enable {
- stylix = {
- enable = true;
- autoEnable = true;
-
- # base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml";
- # image = ./${cfg.theme}.jpg;
- # polarity = cfg.polarity;
-
- fonts = {
- serif = {
- package = pkgs.dejavu_fonts;
- name = "DejaVu Serif";
- };
-
- sansSerif = {
- package = pkgs.dejavu_fonts;
- name = "DejaVu Sans";
- };
-
- monospace = {
- package = pkgs.nerd-fonts.jetbrains-mono;
- name = "JetBrainsMono Nerd Font Mono";
- };
-
- emoji = {
- package = pkgs.noto-fonts-emoji;
- name = "Noto Color Emoji";
- };
- };
- };
- };
-}
diff --git a/modules/system/virtualisation/default.nix b/modules/system/virtualisation/default.nix
deleted file mode 100644
index 3bcff9f..0000000
--- a/modules/system/virtualisation/default.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ config, options, lib, pkgs, ... }:
-let
- inherit (lib) mkIf mkEnableOption;
-in
-{
- options.modules.virtualisation = {};
-}
diff --git a/modules/system/virtualisation/podman.nix b/modules/system/virtualisation/podman.nix
deleted file mode 100644
index dd455ff..0000000
--- a/modules/system/virtualisation/podman.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ config, options, lib, pkgs, ... }:
-let
- inherit (lib.modules) mkIf;
-
- cfg = config.modules.virtualisation.podman;
-in
-{
- options.modules.virtualisation.podman = let
- inherit (lib.options) mkEnableOption;
- in
- {
- enable = mkEnableOption "enable podman";
- };
-
- config = mkIf config.modules.virtualisation.podman.enable {
- virtualisation = {
- containers.enable = true;
-
- podman = {
- enable = true;
- dockerCompat = true;
- defaultNetwork.settings.dns_enabled = true;
- };
- };
- };
-}
diff --git a/modules/system/zsa_voyager.nix b/modules/system/zsa_voyager.nix
deleted file mode 100644
index c900954..0000000
--- a/modules/system/zsa_voyager.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{ config, pkgs, options, ... }:
-{
- environment.systemPackages = with pkgs; [
- keymapp
- ];
-
- hardware.keyboard.zsa.enable = true;
-
- services.udev.extraRules = ''
- # Rules for Oryx web flashing and live training
- KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev"
- KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev"
-
- # Legacy rules for live training over webusb (Not needed for firmware v21+)
- # Rule for all ZSA keyboards
- SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev"
- # Rule for the Moonlander
- SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev"
- # Rule for the Ergodox EZ
- SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev"
- # Rule for the Planck EZ
- SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev"
-
- # Wally Flashing rules for the Ergodox EZ
- ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
- ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
- SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
- KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"
-
- # Keymapp / Wally Flashing rules for the Moonlander and Planck EZ
- SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu"
- # Keymapp Flashing rules for the Voyager
- SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu"
- '';
-}
diff --git a/packages/studio.nix b/packages/studio/default.nix
similarity index 100%
rename from packages/studio.nix
rename to packages/studio/default.nix
diff --git a/packages/studio.png b/packages/studio/studio.png
similarity index 100%
rename from packages/studio.png
rename to packages/studio/studio.png
diff --git a/systems/x86_64-install-iso/minimal/default.nix b/systems/x86_64-install-iso/minimal/default.nix
new file mode 100644
index 0000000..7d80104
--- /dev/null
+++ b/systems/x86_64-install-iso/minimal/default.nix
@@ -0,0 +1,121 @@
+{ pkgs, lib, ... }:
+let
+ inherit (lib) mkForce;
+in
+{
+ boot = {
+ supportedFilesystems = mkForce ["btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs"];
+
+ loader.efi.canTouchEfiVariables = true;
+ };
+
+ networking = {
+ wireless.enable = mkForce false;
+ networkmanager.enable = true;
+ };
+
+ nix = {
+ enable = true;
+ extraOptions = "experimental-features = nix-command flakes";
+ channel.enable = false;
+
+ settings = {
+ experimental-features = [ "nix-command" "flakes" ];
+ allowed-users = [ "@wheel" ];
+ trusted-users = [ "@wheel" ];
+
+ auto-optimise-store = true;
+ connect-timeout = 5;
+ http-connections = 50;
+ log-lines = 50; # more log lines in case of error
+ min-free = 1 * (1024 * 1024 * 1024); # GiB # start garbage collector
+ max-free = 50 * (1024 * 1024 * 1024); # GiB # until
+ warn-dirty = false;
+ };
+ };
+
+ services = {
+ qemuGuest.enable = true;
+ openssh = {
+ enable = true;
+ settings.PermitRootLogin = mkForce "yes";
+ };
+ };
+
+ users.users.nixos = {
+ initialPassword = "kaas";
+ initialHashedPassword = mkForce null;
+ extraGroups = [ "networkmanager" ];
+ };
+
+ environment.systemPackages = with pkgs; [
+ # sbctl
+ git
+ # gum
+ # (
+ # writeShellScriptBin "rescue" ''
+ # #!/usr/bin/env bash
+ # set -euo pipefail
+
+ # gum "device name"
+
+ # sudo mkdir -p /mnt/{dev,proc,sys,boot}
+ # sudo mount -o bind /dev /mnt/dev
+ # sudo mount -o bind /proc /mnt/proc
+ # sudo mount -o bind /sys /mnt/sys
+ # sudo chroot /mnt /nix/var/nix/profiles/system/activate
+ # sudo chroot /mnt /run/current-system/sw/bin/bash
+
+ # sudo mount /dev/vda1 /mnt/boot
+ # sudo cryptsetup open /dev/vda3 cryptroot
+ # sudo mount /dev/mapper/cryptroot /mnt/
+
+ # sudo nixos-enter
+ # ''
+ # )
+ # (
+ # writeShellScriptBin "nix_installer"
+ # ''
+ # #!/usr/bin/env bash
+ # set -euo pipefail
+
+ # if [ "$(id -u)" -eq 0 ]; then
+ # echo "ERROR! $(basename "$0") should be run as a regular user"
+ # exit 1
+ # fi
+
+ # if [ ! -d "$HOME/github/sneeuwvlok/.git" ]; then
+ # git clone https://github.com/chris-kruining/sneeuwvlok.git "$HOME/github/sneeuwvlok"
+ # fi
+
+ # TARGET_HOST=$(ls -1 ~/github/sneeuwvlok/systems/*/default.nix | cut -d'/' -f6 | grep -v iso | gum choose)
+
+ # if [ ! -e "$HOME/github/sneeuwvlok/hosts/$TARGET_HOST/disks.nix" ]; then
+ # echo "ERROR! $(basename "$0") could not find the required $HOME/github/sneeuwvlok/hosts/$TARGET_HOST/disks.nix"
+ # exit 1
+ # fi
+
+ # gum confirm --default=false \
+ # "🔥 🔥 🔥 WARNING!!!! This will ERASE ALL DATA on the disk $TARGET_HOST. Are you sure you want to continue?"
+
+ # echo "Partitioning Disks"
+ # sudo nix run github:nix-community/disko \
+ # --extra-experimental-features "nix-command flakes" \
+ # --no-write-lock-file \
+ # -- \
+ # --mode zap_create_mount \
+ # "$HOME/dotfiles/hosts/$TARGET_HOST/disks.nix"
+
+ # #echo "Creating blank volume"
+ # #sudo btrfs subvolume snapshot -r /mnt/ /mnt/root-blank
+
+ # #echo "Set up attic binary cache"
+ # #attic use prod || true
+
+ # sudo nixos-install --flake "$HOME/dotfiles#$TARGET_HOST"
+ # ''
+ # )
+ ];
+
+ system.stateVersion = "23.11";
+}
diff --git a/hosts/aule/README.md b/systems/x86_64-linux/aule/README.md
similarity index 100%
rename from hosts/aule/README.md
rename to systems/x86_64-linux/aule/README.md
diff --git a/systems/x86_64-linux/mandos/README.md b/systems/x86_64-linux/mandos/README.md
new file mode 100644
index 0000000..b7e2801
--- /dev/null
+++ b/systems/x86_64-linux/mandos/README.md
@@ -0,0 +1,3 @@
+# Description
+
+Living room Steambox.
\ No newline at end of file
diff --git a/systems/x86_64-linux/mandos/default.nix b/systems/x86_64-linux/mandos/default.nix
new file mode 100644
index 0000000..b1605f8
--- /dev/null
+++ b/systems/x86_64-linux/mandos/default.nix
@@ -0,0 +1,31 @@
+{ ... }:
+{
+ imports = [
+ ./disks.nix
+ ./hardware.nix
+ ];
+
+ sneeuwvlok = {
+ hardware.has = {
+ gpu.nvidia = true;
+ audio = true;
+ };
+
+ boot = {
+ quiet = true;
+ animated = true;
+ };
+
+ desktop.use = "gamescope";
+
+ application = {
+ steam.enable = true;
+ };
+
+ editor = {
+ nano.enable = true;
+ };
+ };
+
+ system.stateVersion = "23.11";
+}
diff --git a/systems/x86_64-linux/mandos/disks.nix b/systems/x86_64-linux/mandos/disks.nix
new file mode 100644
index 0000000..b143047
--- /dev/null
+++ b/systems/x86_64-linux/mandos/disks.nix
@@ -0,0 +1,33 @@
+{ config, lib, pkgs, modulesPath, ... }:
+let
+ inherit (lib.modules) mkDefault;
+in
+{
+ # TODO :: Implement disko at some point
+ swapDevices = [ { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; } ];
+
+ fileSystems = {
+ "/" = {
+ device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985";
+ fsType = "ext4";
+ };
+
+ "/boot" = {
+ device = "/dev/disk/by-uuid/C842-316A";
+ fsType = "vfat";
+ options = [ "fmask=0022" "dmask=0022" ];
+ };
+
+ "/home/chris/games" = {
+ device = "/dev/disk/by-label/games";
+ fsType = "ext4";
+ };
+
+ # TODO :: Reformat the disk to ext4
+ "/home/chris/data" = {
+ device = "/dev/disk/by-label/Data";
+ fsType = "ntfs-3g";
+ options = [ "rw" "uid=chris" ];
+ };
+ };
+}
diff --git a/systems/x86_64-linux/mandos/hardware.nix b/systems/x86_64-linux/mandos/hardware.nix
new file mode 100644
index 0000000..60759bd
--- /dev/null
+++ b/systems/x86_64-linux/mandos/hardware.nix
@@ -0,0 +1,18 @@
+{ config, lib, pkgs, modulesPath, system, ... }:
+let
+ inherit (lib.modules) mkDefault;
+in
+{
+ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
+
+ boot = {
+ initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
+ initrd.kernelModules = [ ];
+ kernelModules = [ "kvm-intel" ];
+ kernelParams = [];
+ extraModulePackages = [ ];
+ };
+
+ nixpkgs.hostPlatform = mkDefault system;
+ hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/systems/x86_64-linux/manwe/README.md b/systems/x86_64-linux/manwe/README.md
new file mode 100644
index 0000000..3bb6746
--- /dev/null
+++ b/systems/x86_64-linux/manwe/README.md
@@ -0,0 +1,8 @@
+# Description
+
+<<<<<<< HEAD
+My steambox.
+=======
+My desktop, reasoning for the name being the following chain of thought:
+**Manwe -> the king of the valar -> leader -> desktop is main machine**
+>>>>>>> 72b0f6f8fad97a4ade1b54dfada26828a170febf
diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix
new file mode 100644
index 0000000..c333f85
--- /dev/null
+++ b/systems/x86_64-linux/manwe/default.nix
@@ -0,0 +1,32 @@
+{ ... }:
+{
+ imports = [
+ ./disks.nix
+ ./hardware.nix
+ ];
+
+ sneeuwvlok = {
+ hardware.has = {
+ gpu.amd = true;
+ bluetooth = true;
+ audio = true;
+ };
+
+ boot = {
+ quiet = true;
+ animated = true;
+ };
+
+ desktop.use = "plasma";
+
+ application = {
+ steam.enable = true;
+ };
+
+ editor = {
+ nano.enable = true;
+ };
+ };
+
+ system.stateVersion = "23.11";
+}
diff --git a/systems/x86_64-linux/manwe/disks.nix b/systems/x86_64-linux/manwe/disks.nix
new file mode 100644
index 0000000..913d5d7
--- /dev/null
+++ b/systems/x86_64-linux/manwe/disks.nix
@@ -0,0 +1,34 @@
+{ config, lib, pkgs, modulesPath, ... }:
+let
+ inherit (lib.modules) mkDefault;
+in
+{
+ # TODO :: Implement disko at some point
+
+ swapDevices = [];
+
+ boot.supportedFilesystems = [ "nfs" ];
+
+ fileSystems = {
+ "/" = {
+ device = "/dev/disk/by-label/NIXROOT";
+ fsType = "ext4";
+ };
+
+ "/boot" = {
+ device = "/dev/disk/by-label/NIXBOOT";
+ fsType = "vfat";
+ options = [ "fmask=0022" "dmask=0022" ];
+ };
+
+ "/home/chris/media" = {
+ device = "ulmo:/";
+ fsType = "nfs";
+ };
+
+ "/home/chris/mandos" = {
+ device = "mandos:/";
+ fsType = "nfs";
+ };
+ };
+}
diff --git a/systems/x86_64-linux/manwe/hardware.nix b/systems/x86_64-linux/manwe/hardware.nix
new file mode 100644
index 0000000..33ae3b5
--- /dev/null
+++ b/systems/x86_64-linux/manwe/hardware.nix
@@ -0,0 +1,18 @@
+{ config, lib, pkgs, modulesPath, system, ... }:
+let
+ inherit (lib.modules) mkDefault;
+in
+{
+ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
+
+ boot = {
+ initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
+ initrd.kernelModules = [ ];
+ kernelModules = [ "kvm-amd" ];
+ kernelParams = [];
+ extraModulePackages = [ ];
+ };
+
+ nixpkgs.hostPlatform = mkDefault system;
+ hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/hosts/manwe/README.md b/systems/x86_64-linux/melkor/README.md
similarity index 53%
rename from hosts/manwe/README.md
rename to systems/x86_64-linux/melkor/README.md
index 1da7ab1..a430921 100644
--- a/hosts/manwe/README.md
+++ b/systems/x86_64-linux/melkor/README.md
@@ -1,3 +1,3 @@
# Description
-My steambox.
+TBD
\ No newline at end of file
diff --git a/hosts/orome/README.md b/systems/x86_64-linux/orome/README.md
similarity index 100%
rename from hosts/orome/README.md
rename to systems/x86_64-linux/orome/README.md
diff --git a/systems/x86_64-linux/orome/default.nix b/systems/x86_64-linux/orome/default.nix
new file mode 100644
index 0000000..48e049b
--- /dev/null
+++ b/systems/x86_64-linux/orome/default.nix
@@ -0,0 +1,24 @@
+{ ... }:
+{
+ imports = [
+ ./disks.nix
+ ./hardware.nix
+ ];
+
+ sneeuwvlok = {
+ hardware.has = {
+ bluetooth = true;
+ audio = true;
+ };
+
+ application = {
+ steam.enable = true;
+ };
+
+ editor = {
+ nano.enable = true;
+ };
+ };
+
+ system.stateVersion = "23.11";
+}
diff --git a/systems/x86_64-linux/orome/disks.nix b/systems/x86_64-linux/orome/disks.nix
new file mode 100644
index 0000000..5a11407
--- /dev/null
+++ b/systems/x86_64-linux/orome/disks.nix
@@ -0,0 +1,23 @@
+{ config, lib, pkgs, modulesPath, ... }:
+let
+ inherit (lib.modules) mkDefault;
+in
+{
+ # TODO :: Implement disko at some point
+
+ swapDevices = [];
+
+ boot.supportedFilesystems = [ "nfs" ];
+
+ fileSystems = {
+ "/" = { device = "/dev/disk/by-uuid/e60745c9-b3ea-4aeb-9c5c-b67ef1730826";
+ fsType = "ext4";
+ };
+
+ "/boot" = {
+ device = "/dev/disk/by-uuid/42B3-C767";
+ fsType = "vfat";
+ options = [ "fmask=0077" "dmask=0077" ];
+ };
+ };
+}
diff --git a/hosts/orome/hardware.nix b/systems/x86_64-linux/orome/hardware.nix
similarity index 52%
rename from hosts/orome/hardware.nix
rename to systems/x86_64-linux/orome/hardware.nix
index 2d7a84e..ee52810 100644
--- a/hosts/orome/hardware.nix
+++ b/systems/x86_64-linux/orome/hardware.nix
@@ -1,23 +1,10 @@
-{ config, lib, pkgs, modulesPath, ... }:
+{ config, lib, pkgs, modulesPath, system, ... }:
let
inherit (lib.modules) mkDefault;
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/e60745c9-b3ea-4aeb-9c5c-b67ef1730826";
- fsType = "ext4";
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/42B3-C767";
- fsType = "vfat";
- options = [ "fmask=0077" "dmask=0077" ];
- };
-
- swapDevices = [];
-
boot = {
initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
initrd.kernelModules = [ ];
@@ -26,7 +13,6 @@ in
extraModulePackages = [ ];
};
- services.logrotate.checkConfig = false;
- nixpkgs.hostPlatform = mkDefault "x86_64-linux";
+ nixpkgs.hostPlatform = mkDefault system;
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
}
diff --git a/hosts/tulkas/README.md b/systems/x86_64-linux/tulkas/README.md
similarity index 100%
rename from hosts/tulkas/README.md
rename to systems/x86_64-linux/tulkas/README.md
diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix
new file mode 100644
index 0000000..40d1673
--- /dev/null
+++ b/systems/x86_64-linux/tulkas/default.nix
@@ -0,0 +1,32 @@
+{ ... }:
+{
+ imports = [
+ ./disks.nix
+ ./hardware.nix
+ ];
+
+ sneeuwvlok = {
+ hardware.has = {
+ gpu.amd = true;
+ bluetooth = true;
+ audio = true;
+ };
+
+ boot = {
+ quiet = true;
+ animated = true;
+ };
+
+ desktop.use = "gamescope";
+
+ application = {
+ steam.enable = true;
+ };
+
+ editor = {
+ nano.enable = true;
+ };
+ };
+
+ system.stateVersion = "23.11";
+}
diff --git a/systems/x86_64-linux/tulkas/disks.nix b/systems/x86_64-linux/tulkas/disks.nix
new file mode 100644
index 0000000..43b8825
--- /dev/null
+++ b/systems/x86_64-linux/tulkas/disks.nix
@@ -0,0 +1,23 @@
+{ config, lib, pkgs, modulesPath, ... }:
+let
+ inherit (lib.modules) mkDefault;
+in
+{
+ # TODO :: Implement disko at some point
+
+ swapDevices = [
+ { device = "/dev/disk/by-uuid/beddca5c-1ecc-4a46-9fc5-fd918eed8f2a"; }
+ ];
+
+ fileSystems = {
+ "/" = {
+ device = "/dev/disk/by-uuid/aa438c4c-d193-436b-91ca-c386c0688265";
+ fsType = "ext4";
+ };
+
+ "/boot" = {
+ device = "/dev/disk/by-uuid/89B8-0702";
+ fsType = "vfat";
+ };
+ };
+}
diff --git a/systems/x86_64-linux/tulkas/hardware.nix b/systems/x86_64-linux/tulkas/hardware.nix
new file mode 100644
index 0000000..950d7cc
--- /dev/null
+++ b/systems/x86_64-linux/tulkas/hardware.nix
@@ -0,0 +1,18 @@
+{ config, lib, pkgs, modulesPath, system, ... }:
+let
+ inherit (lib.modules) mkDefault;
+in
+{
+ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
+
+ boot = {
+ initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
+ initrd.kernelModules = [ ];
+ kernelModules = [ "kvm-amd" ];
+ kernelParams = [];
+ extraModulePackages = [ ];
+ };
+
+ nixpkgs.hostPlatform = mkDefault system;
+ hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/systems/x86_64-linux/ulmo/default.nix b/systems/x86_64-linux/ulmo/default.nix
new file mode 100644
index 0000000..7a2540f
--- /dev/null
+++ b/systems/x86_64-linux/ulmo/default.nix
@@ -0,0 +1,20 @@
+{ ... }:
+{
+ imports = [
+ ./disks.nix
+ ./hardware.nix
+ ];
+
+ sneeuwvlok = {
+ services = {
+ networking.ssh.enable = true;
+ media.enable = true;
+ };
+
+ editor = {
+ nano.enable = true;
+ };
+ };
+
+ system.stateVersion = "23.11";
+}
diff --git a/systems/x86_64-linux/ulmo/disks.nix b/systems/x86_64-linux/ulmo/disks.nix
new file mode 100644
index 0000000..a4033f7
--- /dev/null
+++ b/systems/x86_64-linux/ulmo/disks.nix
@@ -0,0 +1,31 @@
+{ config, lib, pkgs, modulesPath, ... }:
+let
+ inherit (lib.modules) mkDefault;
+in
+{
+ # TODO :: Implement disko at some point
+
+ swapDevices = [
+ { device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; }
+ ];
+
+ boot.supportedFilesystems = [ "nfs" ];
+
+ fileSystems = {
+ "/" = {
+ device = "/dev/disk/by-uuid/dd518f17-61c9-4831-b1bd-e1cc2af292aa";
+ fsType = "ext4";
+ };
+
+ "/boot" = {
+ device = "/dev/disk/by-uuid/0A56-EBFE";
+ fsType = "vfat";
+ options = [ "fmask=0022" "dmask=0022" ];
+ };
+
+ "/var/media" = {
+ device = "/dev/disk/by-label/data";
+ fsType = "ext4";
+ };
+ };
+}
diff --git a/hosts/ulmo/hardware.nix b/systems/x86_64-linux/ulmo/hardware.nix
similarity index 54%
rename from hosts/ulmo/hardware.nix
rename to systems/x86_64-linux/ulmo/hardware.nix
index f9c83bd..4479a12 100644
--- a/hosts/ulmo/hardware.nix
+++ b/systems/x86_64-linux/ulmo/hardware.nix
@@ -1,23 +1,10 @@
-{ config, lib, modulesPath, ... }:
+{ config, lib, pkgs, modulesPath, system, ... }:
let
inherit (lib.modules) mkDefault;
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/dd518f17-61c9-4831-b1bd-e1cc2af292aa";
- fsType = "ext4";
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/0A56-EBFE";
- fsType = "vfat";
- options = [ "fmask=0022" "dmask=0022" ];
- };
-
- swapDevices = [ ];
-
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
initrd.kernelModules = [ ];
@@ -26,6 +13,6 @@ in
extraModulePackages = [ ];
};
- nixpkgs.hostPlatform = mkDefault "x86_64-linux";
+ nixpkgs.hostPlatform = mkDefault system;
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
}
diff --git a/systems/x86_64-linux/varda/README.md b/systems/x86_64-linux/varda/README.md
new file mode 100644
index 0000000..a430921
--- /dev/null
+++ b/systems/x86_64-linux/varda/README.md
@@ -0,0 +1,3 @@
+# Description
+
+TBD
\ No newline at end of file
diff --git a/systems/x86_64-linux/yavanna/README.md b/systems/x86_64-linux/yavanna/README.md
new file mode 100644
index 0000000..a430921
--- /dev/null
+++ b/systems/x86_64-linux/yavanna/README.md
@@ -0,0 +1,3 @@
+# Description
+
+TBD
\ No newline at end of file