Compare commits
90
Commits
26a4cba43c
..
disko
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68c241f31a | ||
|
|
81c37abadd | ||
|
|
85c962fd6d | ||
|
|
b0a8874a93 | ||
|
|
01021d179d | ||
|
|
b8a607c3d0 | ||
|
|
793015646d | ||
|
|
43f472fe88 | ||
|
|
51ab89cd98 | ||
|
|
f0d56df191 | ||
|
|
9a97168950 | ||
|
|
cdffa07675 | ||
|
|
13fbcea361 | ||
|
|
36c2c907d5 | ||
|
|
11bc7221e3 | ||
|
|
3a6122784b | ||
|
|
d4338f1861 | ||
|
|
ea290d9158 | ||
|
|
9cc07cdfaf | ||
|
|
33b9cee6a0 | ||
|
|
47479f40d1 | ||
|
|
e1cc2342b2 | ||
|
|
092b3551c1 | ||
|
|
9d50a66388 | ||
|
|
4a644607c6 | ||
|
|
e134b3db6e | ||
|
|
4cd01f17a3 | ||
|
|
e872cf3788 | ||
|
|
f4d938073c | ||
|
|
01374fe5b0 | ||
|
|
a75b839bc1 | ||
|
|
8c8b6b0206 | ||
|
|
1829531f25 | ||
|
|
daab746b40 | ||
|
|
6c452c6649 | ||
|
|
63386512a8 | ||
|
|
ad8d7c8c09 | ||
|
|
c37238700d | ||
|
|
330f5e2a50 | ||
|
|
fbbe869550 | ||
|
|
5e23488cae | ||
|
|
760815da50 | ||
|
|
c3c61ce654 | ||
|
|
626d78f088 | ||
|
|
bcd5606107 | ||
|
|
f8fbb52607 | ||
|
|
2b0bdb0248 | ||
|
|
f0403330e2 | ||
|
|
e10079e578 | ||
|
|
2a8fcf627b | ||
|
|
3d54536168 | ||
|
|
2c0ae15417 | ||
|
|
4ed934350d | ||
|
|
989ee1f6e5 | ||
|
|
1c9f01034e | ||
|
|
f62780826b | ||
|
|
83829303b5 | ||
|
|
d46d321142 | ||
|
|
f6442c65dd | ||
|
|
e7aac4bef4 | ||
|
|
8799c3c943 | ||
|
|
3631918db2 | ||
|
|
180d0b3b00 | ||
|
|
b191a3ff94 | ||
|
|
54d8f51fb5 | ||
|
|
9089f9d936 | ||
|
|
cdee5ca0e8 | ||
|
|
ca9757fecb | ||
|
|
d516be8e29 | ||
|
|
bfe15b2409 | ||
|
|
466fff5753 | ||
|
|
b965351818 | ||
|
|
7d806c7548 | ||
|
|
c28b56fc63 | ||
|
|
e6374ca39b | ||
|
|
cd9653561c | ||
|
|
6664cce060 | ||
|
|
22853f0190 | ||
|
|
bc5148e601 | ||
|
|
6b99c0f771 | ||
|
|
41867fb653 | ||
|
|
c063cf2dac | ||
|
|
755ce711fe | ||
|
|
a6190e3bb2 | ||
|
|
5c575254a1 | ||
|
|
f06855c2a2 | ||
|
|
435787f440 | ||
|
|
b7c1710046 | ||
|
|
aac0926608 | ||
|
|
8393f03b2a |
No files matched your search
@@ -2,6 +2,10 @@
|
||||
|
||||
My NixOS configuration.
|
||||
|
||||
## Usage
|
||||
## Installation
|
||||
|
||||
Clone the repository to some directory. And build with `sudo nixos-rebuild switch --flake /directory/containing/flake.nix/`.
|
||||
For disk configuration we use disko, this means that installing the system from the configuration is just a single command:
|
||||
|
||||
```
|
||||
sudo nix --experimental-features "nix-command flakes" run "github:nix-community/disko/latest#disko-install" -- --flake git+https://git.bulthuis.dev/Jan/dotfiles#<hostname> --disk main /dev/sda
|
||||
```
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Import modules
|
||||
./modules/default.nix
|
||||
|
||||
# Import custom packages
|
||||
./pkgs/default.nix
|
||||
];
|
||||
}
|
||||
Generated
+57
-712
@@ -1,85 +1,22 @@
|
||||
{
|
||||
"nodes": {
|
||||
"base16": {
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"fromYaml": "fromYaml"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732200724,
|
||||
"narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"rev": "153d52373b0fb2d343592871009a286ec8837aec",
|
||||
"lastModified": 1748225455,
|
||||
"narHash": "sha256-AzlJCKaM4wbEyEpV3I/PUq5mHnib2ryEy32c+qfj6xk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "a894f2811e1ee8d10c50560551e50d6ab3c392ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-fish": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1622559957,
|
||||
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-helix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736852337,
|
||||
"narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-vim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1732806396,
|
||||
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-vim",
|
||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-vim",
|
||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"firefox-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1741628778,
|
||||
"narHash": "sha256-RsvHGNTmO2e/eVfgYK7g+eYEdwwh7SbZa+gZkT24MEA=",
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"rev": "5a81d390bb64afd4e81221749ec4bffcbeb5fa80",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@@ -99,101 +36,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1717312683,
|
||||
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_3": {
|
||||
"locked": {
|
||||
"lastModified": 1733328505,
|
||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741352980,
|
||||
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"stylix",
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
@@ -212,126 +54,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": [
|
||||
"stylix",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fromYaml": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731966426,
|
||||
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"stylix",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741379162,
|
||||
"narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc",
|
||||
"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": 1732369855,
|
||||
"narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=",
|
||||
"owner": "GNOME",
|
||||
"repo": "gnome-shell",
|
||||
"rev": "dadd58f630eeea41d645ee225a63f719390829dc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "GNOME",
|
||||
"ref": "47.2",
|
||||
"repo": "gnome-shell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -339,11 +61,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742701794,
|
||||
"narHash": "sha256-bJIFFa6/4vBGoNmCwjO5TCIbiveV2BRxVLqHcxk5jXw=",
|
||||
"lastModified": 1748134483,
|
||||
"narHash": "sha256-5PBK1nV8X39K3qUj8B477Aa2RdbLq3m7wRxUKRtggX4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "9172a6f956f7e0f7810861b9b1146f1c43d9abcb",
|
||||
"rev": "c1e671036224089937e111e32ea899f59181c383",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -352,135 +74,70 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"impermanence": {
|
||||
"locked": {
|
||||
"lastModified": 1741635347,
|
||||
"narHash": "sha256-2aYfV44h18alHXopyfL4D9GsnpE5XlSVkp4MGe586VU=",
|
||||
"lastModified": 1737831083,
|
||||
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "7fb8678716c158642ac42f9ff7a18c0800fea551",
|
||||
"repo": "impermanence",
|
||||
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"repo": "impermanence",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ixx": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729958008,
|
||||
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "ixx",
|
||||
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"ref": "v0.0.6",
|
||||
"repo": "ixx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-matlab": {
|
||||
"nix-minecraft": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742655717,
|
||||
"narHash": "sha256-p1815USOcTj+kPSw2XkK8eWG19NZXpCST9vYDVnQ144=",
|
||||
"owner": "doronbehar",
|
||||
"repo": "nix-matlab",
|
||||
"rev": "ddc7d6354cf54880c6d0748fdf7ad370a748f562",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "doronbehar",
|
||||
"repo": "nix-matlab",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nixos-cosmic": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742641703,
|
||||
"narHash": "sha256-hoN8blvJco8OSZmPj8izwQaQUdydVi+5FO4/nWd1MNU=",
|
||||
"owner": "lilyinstarlight",
|
||||
"repo": "nixos-cosmic",
|
||||
"rev": "216557e6cd229dbe7d73a497c227824a3c579cd7",
|
||||
"lastModified": 1747581338,
|
||||
"narHash": "sha256-/+H9qce+NPsEcAC31s3pbD64nB6GKC3+3ZNLV1+tffk=",
|
||||
"owner": "Jan-Bulthuis",
|
||||
"repo": "nix-minecraft",
|
||||
"rev": "44b6b40d7a3e0a114567b38a203029a5bc67e838",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lilyinstarlight",
|
||||
"repo": "nixos-cosmic",
|
||||
"owner": "Jan-Bulthuis",
|
||||
"repo": "nix-minecraft",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-modpack": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747559249,
|
||||
"narHash": "sha256-+ygKEGMVcXNklO4RDYSd5XzydDmQOZWcOcxYZf/PH1U=",
|
||||
"owner": "Jan-Bulthuis",
|
||||
"repo": "nix-modpack",
|
||||
"rev": "a093625c2847afc3ef257513161c7fe318c6be1c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Jan-Bulthuis",
|
||||
"repo": "nix-modpack",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1742422364,
|
||||
"narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1742512142,
|
||||
"narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7105ae3957700a9646cc4b766f5815b23ed0c682",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1742606399,
|
||||
"narHash": "sha256-NAxwF5cjgh8o5aylhePXWNQETCWYaTpNvdO2bMfINpQ=",
|
||||
"lastModified": 1747958103,
|
||||
"narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0740f6f238767d4caf9afe774d3e88105766dfc6",
|
||||
"rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -490,171 +147,14 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1742578646,
|
||||
"narHash": "sha256-GiQ40ndXRnmmbDZvuv762vS+gew1uDpFwOfgJ8tLiEs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "94c4dbe77c0740ebba36c173672ca15a7926c993",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1741513245,
|
||||
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nuschtosSearch": "nuschtosSearch"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742645604,
|
||||
"narHash": "sha256-4LB/Gx1p/ml79xZfgTvOYvMXXnj5vrFfDYcWIndgXP0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "3d84c137eab329ec1a6d4c4b0a067bfa8eea0bb5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742725572,
|
||||
"narHash": "sha256-Lu1kVuH7MzOrCqR4K7XiXd5B8iCTSFzWQW/QfmHnoeI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "ddb77c54f257566ff34a0ba8c758a7b3cc0d76bf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur_2": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_3",
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
],
|
||||
"treefmt-nix": "treefmt-nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741693509,
|
||||
"narHash": "sha256-emkxnsZstiJWmGACimyAYqIKz2Qz5We5h1oBVDyQjLw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "5479646b2574837f1899da78bdf9a48b75a9fb27",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"ixx": "ixx",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741886583,
|
||||
"narHash": "sha256-sScfYKtxp3CYv5fJcHQDvQjqBL+tPNQqS9yf9Putd+s=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "2974bc5fa3441a319fba943f3ca41f7dcd1a1467",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"disko": "disko",
|
||||
"home-manager": "home-manager",
|
||||
"nix-matlab": "nix-matlab",
|
||||
"nixos-cosmic": "nixos-cosmic",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixvim": "nixvim",
|
||||
"nur": "nur",
|
||||
"stylix": "stylix"
|
||||
}
|
||||
},
|
||||
"stylix": {
|
||||
"inputs": {
|
||||
"base16": "base16",
|
||||
"base16-fish": "base16-fish",
|
||||
"base16-helix": "base16-helix",
|
||||
"base16-vim": "base16-vim",
|
||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"git-hooks": "git-hooks",
|
||||
"gnome-shell": "gnome-shell",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nur": "nur_2",
|
||||
"systems": "systems_3",
|
||||
"tinted-foot": "tinted-foot",
|
||||
"tinted-kitty": "tinted-kitty",
|
||||
"tinted-schemes": "tinted-schemes",
|
||||
"tinted-tmux": "tinted-tmux",
|
||||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742591463,
|
||||
"narHash": "sha256-CguaHULcm4RuIGN+i4u80dYZujFgZaeOTiShFxCwFhw=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "113643f332e1f70d90991722f8c4e5a0ace6fd06",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"type": "github"
|
||||
"impermanence": "impermanence",
|
||||
"nix-minecraft": "nix-minecraft",
|
||||
"nix-modpack": "nix-modpack",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
@@ -671,161 +171,6 @@
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-foot": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1726913040,
|
||||
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-foot",
|
||||
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-foot",
|
||||
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-kitty": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716423189,
|
||||
"narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"rev": "eb39e141db14baef052893285df9f266df041ff8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"rev": "eb39e141db14baef052893285df9f266df041ff8",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1741468895,
|
||||
"narHash": "sha256-YKM1RJbL68Yp2vESBqeZQBjTETXo8mCTTzLZyckCfZk=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"rev": "47c8c7726e98069cade5827e5fb2bfee02ce6991",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-tmux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1740877430,
|
||||
"narHash": "sha256-zWcCXgdC4/owfH/eEXx26y5BLzTrefjtSLFHWVD5KxU=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"rev": "d48ee86394cbe45b112ba23ab63e33656090edb4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-zed": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1725758778,
|
||||
"narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"rev": "122c9e5c0e6f27211361a04fae92df97940eccf9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"treefmt-nix_2": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
@@ -1,84 +1,21 @@
|
||||
{
|
||||
description = "NixOS system";
|
||||
description = "System configuration for NixOS";
|
||||
|
||||
inputs = {
|
||||
# General inputs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
stylix.url = "github:danth/stylix";
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
nur = {
|
||||
url = "github:nix-community/NUR";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-matlab = {
|
||||
url = "gitlab:doronbehar/nix-matlab";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
disko.url = "github:nix-community/disko";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
|
||||
# For Minecraft VM
|
||||
nix-minecraft.url = "github:Jan-Bulthuis/nix-minecraft";
|
||||
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nix-modpack.url = "github:Jan-Bulthuis/nix-modpack";
|
||||
nix-modpack.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
stylix,
|
||||
nixvim,
|
||||
nur,
|
||||
nix-matlab,
|
||||
nixos-cosmic,
|
||||
...
|
||||
}:
|
||||
let
|
||||
mkConfig =
|
||||
system: machineConfig: userConfig:
|
||||
(nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit system; };
|
||||
modules = [
|
||||
machineConfig
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
nix.settings = {
|
||||
substituters = [ "https://cosmic.cachix.org/" ];
|
||||
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
|
||||
};
|
||||
machine.users = userConfig;
|
||||
home-manager.extraSpecialArgs = { inherit system; };
|
||||
home-manager.sharedModules = [
|
||||
stylix.homeManagerModules.stylix
|
||||
nixvim.homeManagerModules.nixvim
|
||||
nur.modules.homeManager.default
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
nix-matlab.overlay
|
||||
nixos-cosmic.overlays.default
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
});
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
"20212060" = mkConfig "x86_64-linux" ./machines/laptop.nix {
|
||||
jan = {
|
||||
sudo = true;
|
||||
configuration = ./users/jan.nix;
|
||||
};
|
||||
};
|
||||
"vm-audio" = mkConfig "x86_64-linux" ./machines/vm-audio.nix {
|
||||
local = {
|
||||
sudo = true;
|
||||
configuration = ./users/server.nix;
|
||||
};
|
||||
};
|
||||
};
|
||||
lib = import ./shell-modules/default.nix self.inputs;
|
||||
};
|
||||
outputs = inputs: import ./glue inputs;
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
inputs:
|
||||
let
|
||||
flake = inputs.self;
|
||||
nixpkgs = inputs.nixpkgs;
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
importDir =
|
||||
path: fn:
|
||||
let
|
||||
entries = builtins.readDir path;
|
||||
|
||||
# Get paths to directories
|
||||
dirs = lib.filterAttrs (_: type: type == "directory") entries;
|
||||
dirPaths = lib.mapAttrs (name: type: {
|
||||
path = "${path}/${name}";
|
||||
type = type;
|
||||
}) dirs;
|
||||
|
||||
# Get paths to nix files
|
||||
nixName = name: builtins.match "(.*)\\.nix" name;
|
||||
files = lib.filterAttrs (name: type: (type != "directory") && ((nixName name) != null)) entries;
|
||||
filePaths = lib.mapAttrs' (name: type: {
|
||||
name = builtins.head (nixName name);
|
||||
value = {
|
||||
path = "${path}/${name}";
|
||||
type = type;
|
||||
};
|
||||
}) files;
|
||||
|
||||
combined = dirPaths // filePaths;
|
||||
in
|
||||
fn (lib.optionalAttrs (builtins.pathExists path) combined);
|
||||
|
||||
# Split out into getNixFiles, getNixFilesRecursive, getDirs
|
||||
importDirRecursive =
|
||||
path: fn:
|
||||
let
|
||||
entries = importDir path lib.id;
|
||||
|
||||
# Dig down recursively
|
||||
dirs = lib.filterAttrs (_: entry: entry.type == "directory") entries;
|
||||
recursedEntries = lib.mapAttrs (name: entry: (importDirRecursive entry.path lib.id)) dirs;
|
||||
in
|
||||
fn (entries // recursedEntries);
|
||||
|
||||
eachSystem = fn: lib.genAttrs lib.systems.flakeExposed fn;
|
||||
|
||||
systemArgs = eachSystem (system: {
|
||||
pkgs = (
|
||||
import inputs.nixpkgs {
|
||||
inherit system;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
allPackages = importDir "${flake}/packages" (
|
||||
attrs:
|
||||
lib.mapAttrs (
|
||||
name: entry: (if entry.type == "directory" then "${entry.path}/default.nix" else entry.path)
|
||||
) attrs
|
||||
);
|
||||
|
||||
packages =
|
||||
let
|
||||
# TODO: Filter out packages that are not supported on the platform?
|
||||
mkPackages =
|
||||
system:
|
||||
let
|
||||
args = systemArgs."${system}";
|
||||
pkgs = args.pkgs;
|
||||
in
|
||||
lib.mapAttrs (name: package: pkgs.callPackage package { }) allPackages;
|
||||
in
|
||||
eachSystem mkPackages;
|
||||
|
||||
overlay = final: prev: (lib.mapAttrs (name: package: prev.callPackage package { }) allPackages);
|
||||
|
||||
collectEntries =
|
||||
attrs:
|
||||
lib.attrsets.collect (
|
||||
entry: (lib.isAttrs entry) && (lib.hasAttr "path" entry) && (lib.hasAttr "type" entry)
|
||||
) attrs;
|
||||
|
||||
collectModules =
|
||||
path:
|
||||
importDirRecursive path (
|
||||
attrs:
|
||||
map (entry: if entry.type == "directory" then entry.path + "/default.nix" else entry.path) (
|
||||
collectEntries attrs
|
||||
)
|
||||
);
|
||||
|
||||
nixosModules = collectModules "${flake}/modules/nixos";
|
||||
nixosProfiles = collectModules "${flake}/profiles/nixos";
|
||||
inputNixosModules = lib.map (flake: flake.outputs.nixosModules.default) (
|
||||
lib.filter (flake: lib.hasAttrByPath [ "outputs" "nixosModules" "default" ] flake) (
|
||||
lib.attrValues inputs
|
||||
)
|
||||
);
|
||||
|
||||
homeModules = collectModules "${flake}/modules/home";
|
||||
homeProfiles = collectModules "${flake}/profiles/home";
|
||||
inputHomeModules = lib.map (flake: flake.outputs.homeManagerModules.default) (
|
||||
lib.filter (flake: lib.hasAttrByPath [ "outputs" "homeManagerModules" "default" ] flake) (
|
||||
lib.attrValues inputs
|
||||
)
|
||||
);
|
||||
|
||||
inputOverlays = lib.map (flake: flake.outputs.overlays.default) (
|
||||
lib.filter (flake: lib.hasAttrByPath [ "outputs" "overlays" "default" ] flake) (
|
||||
lib.attrValues inputs
|
||||
)
|
||||
);
|
||||
|
||||
overlayModule =
|
||||
{ ... }:
|
||||
{
|
||||
nixpkgs.overlays = [ overlay ] ++ inputOverlays;
|
||||
};
|
||||
|
||||
nixosConfigurations = importDir "${flake}/hosts" (
|
||||
attrs:
|
||||
lib.mapAttrs (
|
||||
name: entry:
|
||||
lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules =
|
||||
let
|
||||
systemPath = "${entry.path}/configuration.nix";
|
||||
|
||||
userEntries = importDir "${entry.path}/users" lib.id;
|
||||
|
||||
usersConfiguration = lib.mapAttrs (name: entry: {
|
||||
isNormalUser = true;
|
||||
group = name;
|
||||
}) userEntries;
|
||||
groupsConfiguration = lib.mapAttrs (name: entry: {
|
||||
}) userEntries;
|
||||
homesConfiguration = lib.mapAttrs (name: entry: entry.path) userEntries;
|
||||
|
||||
usersModule =
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.sharedModules = homeModules ++ homeProfiles ++ inputHomeModules;
|
||||
home-manager.useUserPackages = false; # TODO: See if this should be changed to true?
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users = homesConfiguration;
|
||||
users.users = usersConfiguration;
|
||||
users.groups = groupsConfiguration;
|
||||
};
|
||||
in
|
||||
[
|
||||
systemPath
|
||||
overlayModule
|
||||
usersModule
|
||||
]
|
||||
++ nixosModules
|
||||
++ nixosProfiles
|
||||
++ inputNixosModules;
|
||||
}
|
||||
) (lib.attrsets.filterAttrs (name: entry: entry.type == "directory") attrs)
|
||||
);
|
||||
|
||||
in
|
||||
{
|
||||
inherit packages nixosConfigurations overlay;
|
||||
overlays.default = overlay;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{ flake, ... }:
|
||||
|
||||
{
|
||||
# State version
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
# Machine hostname
|
||||
networking.hostName = "20212060";
|
||||
|
||||
# Admin users
|
||||
users.users.jan.extraGroups = [
|
||||
"wheel"
|
||||
"wireshark"
|
||||
];
|
||||
|
||||
# Enable virtualisation for VMs
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
# Enable wireshark
|
||||
programs.wireshark = {
|
||||
enable = true;
|
||||
dumpcap.enable = true;
|
||||
usbmon.enable = true;
|
||||
};
|
||||
|
||||
# Set up wstunnel client
|
||||
services.wstunnel = {
|
||||
enable = true;
|
||||
clients.wg-tunnel = {
|
||||
connectTo = "wss://tunnel.bulthuis.dev:443";
|
||||
localToRemote = [
|
||||
"udp://51820:10.10.40.100:51820"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Module setup
|
||||
modules = {
|
||||
profiles.laptop.enable = true;
|
||||
};
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
# Machine platform
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
# Hardware configuration
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
# Filesystems
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/3b91eaeb-ea95-4bea-8dc1-f55af7502d23";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/46BF-DE2C";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
# Swapfile
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16 * 1024;
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
modules.profiles.jan.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# State version
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
# Machine hostname
|
||||
networking.hostName = "vm-audio";
|
||||
|
||||
# Enabled modules
|
||||
modules = {
|
||||
profiles.vm.enable = true;
|
||||
sound.enable = true;
|
||||
# spotifyd.enable = true; # TODO: Add this as a local module
|
||||
};
|
||||
|
||||
# Install system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
carla
|
||||
xpra
|
||||
alsa-utils
|
||||
pulsemixer
|
||||
adwaita-icon-theme
|
||||
open-stage-control
|
||||
carla_osc_bridge
|
||||
|
||||
# Add LV2 plugins
|
||||
lsp-plugins
|
||||
airwindows-lv2
|
||||
distrho-ports
|
||||
cardinal
|
||||
calf
|
||||
];
|
||||
|
||||
# Setup firewall
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
8080
|
||||
10402
|
||||
15151
|
||||
22752
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
8080
|
||||
10402
|
||||
15151
|
||||
22752
|
||||
];
|
||||
};
|
||||
|
||||
# Setup dependencies
|
||||
environment.variables.LD_LIBRARY_PATH = lib.mkForce "${lib.makeLibraryPath (
|
||||
with pkgs;
|
||||
[
|
||||
cairo
|
||||
pipewire.jack
|
||||
]
|
||||
)}";
|
||||
qt = {
|
||||
enable = true;
|
||||
style = "adwaita";
|
||||
};
|
||||
xdg.icons = {
|
||||
enable = true;
|
||||
fallbackCursorThemes = [ "Adwaita" ];
|
||||
};
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
# User for audio mixing
|
||||
users.users.mixer = {
|
||||
isNormalUser = true;
|
||||
group = "mixer";
|
||||
extraGroups = [ "systemd-journal" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKKxoQSxfYqf9ITN8Fhckk8WbY4dwtBAXOhC9jxihJvq jan@bulthuis.dev"
|
||||
];
|
||||
};
|
||||
users.groups.mixer = { };
|
||||
users.groups.audio = {
|
||||
members = [
|
||||
"mixer"
|
||||
];
|
||||
};
|
||||
users.groups.bluetooth = {
|
||||
members = [
|
||||
"mixer"
|
||||
];
|
||||
};
|
||||
|
||||
# Xpra service
|
||||
systemd.user.services.xpra = {
|
||||
description = "Xpra Service";
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [
|
||||
"network.target"
|
||||
];
|
||||
unitConfig = {
|
||||
ConditionUser = "mixer";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.xpra}/bin/xpra start :7 --bind-tcp=0.0.0.0:15151 --daemon=no";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
|
||||
# Carla service
|
||||
systemd.user.services.carla = {
|
||||
description = "Carla Service";
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [
|
||||
"network.target"
|
||||
"sound.target"
|
||||
];
|
||||
requires = [
|
||||
"xpra.service"
|
||||
];
|
||||
unitConfig = {
|
||||
ConditionUser = "mixer";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.carla}/bin/carla /home/mixer/Default.carxp -platform xcb";
|
||||
Environment = "\"DISPLAY=:7\"";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
|
||||
# Carla service
|
||||
systemd.user.services.carla-bridge = {
|
||||
description = "Carla OSC Bridge";
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [
|
||||
"network.target"
|
||||
"sound.target"
|
||||
];
|
||||
requires = [
|
||||
"carla.service"
|
||||
];
|
||||
unitConfig = {
|
||||
ConditionUser = "mixer";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.carla_osc_bridge}/bin/carla_osc_bridge --clients \"127.0.0.1:8080\"";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
|
||||
# Open stage control service
|
||||
systemd.user.services.osc = {
|
||||
description = "OSC Service";
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [
|
||||
"network.target"
|
||||
];
|
||||
requires = [
|
||||
"carla.service"
|
||||
];
|
||||
unitConfig = {
|
||||
ConditionUser = "mixer";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.open-stage-control}/bin/open-stage-control --no-gui --send 127.0.0.1:10402 --load /home/mixer/open-stage-control/session.json --theme /home/mixer/open-stage-control/theme.css";
|
||||
Environment = "\"ELECTRON_RUN_AS_NODE=1\"";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
|
||||
# Create bluetooth A2DP source
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
disabledPlugins = [ "hostname" ];
|
||||
settings.General = {
|
||||
Name = "Linox";
|
||||
Class = "0x240414";
|
||||
DiscoverableTimeout = 0;
|
||||
AlwaysPairable = true;
|
||||
PairableTimeout = 0;
|
||||
FastConnectable = true;
|
||||
JustWorksRepairing = "always";
|
||||
};
|
||||
};
|
||||
services.pipewire.wireplumber.extraConfig."50-bluetooth-a2dp" = {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.roles" = [ "a2dp_source" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Create null sinks
|
||||
services.pipewire.extraConfig.pipewire."91-null-sinks" = {
|
||||
"context.objects" = [
|
||||
{
|
||||
factory = "adapter";
|
||||
args = {
|
||||
"factory.name" = "support.null-audio-sink";
|
||||
"node.name" = "Speaker-Proxy";
|
||||
"node.description" = "Proxy for Speaker Output";
|
||||
"media.class" = "Audio/Sink";
|
||||
"audio.position" = "L,R";
|
||||
};
|
||||
}
|
||||
{
|
||||
factory = "adapter";
|
||||
args = {
|
||||
"factory.name" = "support.null-audio-sink";
|
||||
"node.name" = "Headphone-Proxy";
|
||||
"node.description" = "Proxy for Headphone Output";
|
||||
"media.class" = "Audio/Sink";
|
||||
"audio.position" = "L,R";
|
||||
};
|
||||
}
|
||||
{
|
||||
factory = "adapter";
|
||||
args = {
|
||||
"factory.name" = "support.null-audio-sink";
|
||||
"node.name" = "SpotifyD-Proxy";
|
||||
"node.description" = "Proxy for SpotifyD";
|
||||
"media.class" = "Audio/Sink";
|
||||
"audio.position" = "L,R";
|
||||
};
|
||||
}
|
||||
{
|
||||
factory = "adapter";
|
||||
args = {
|
||||
"factory.name" = "support.null-audio-sink";
|
||||
"node.name" = "AnalogIn-Proxy";
|
||||
"node.description" = "Proxy for the analog input";
|
||||
"media.class" = "Audio/Source/Virtual";
|
||||
"audio.position" = "L,R";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
modules.profiles.base.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# State version
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
# Import the nix-minecraft modules
|
||||
imports = [
|
||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||
];
|
||||
|
||||
# Machine hostname
|
||||
networking.hostName = "vm-minecraft";
|
||||
|
||||
# Enabled modules
|
||||
modules = {
|
||||
profiles.vm.enable = true;
|
||||
};
|
||||
|
||||
# Set up minecraft servers
|
||||
users.users.local.extraGroups = [ "minecraft" ];
|
||||
services.minecraft-servers = {
|
||||
enable = true;
|
||||
eula = true;
|
||||
openFirewall = true;
|
||||
servers = {
|
||||
modpack = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
serverProperties = { };
|
||||
package = inputs.nix-modpack.packages.${pkgs.system}.mkModpackServer {
|
||||
packUrl = "https://raw.githubusercontent.com/Jan-Bulthuis/Modpack/refs/heads/master/pack.toml";
|
||||
server = inputs.nix-minecraft.legacyPackages.${pkgs.system}.neoForgeServers.neoforge-20_1_106;
|
||||
};
|
||||
jvmOpts = "-Xms6144M -Xmx8192M";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
modules.profiles.base.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# State version
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
# Machine hostname
|
||||
networking.hostName = "vm-vpn";
|
||||
|
||||
# Enabled modules
|
||||
modules = {
|
||||
profiles.vm.enable = true;
|
||||
};
|
||||
|
||||
# Setup wstunnel server
|
||||
services.wstunnel = {
|
||||
enable = true;
|
||||
servers.wg-tunnel = {
|
||||
enableHTTPS = false;
|
||||
listen = {
|
||||
host = "0.0.0.0";
|
||||
port = 8080;
|
||||
};
|
||||
restrictTo = [
|
||||
{
|
||||
host = "10.10.40.100";
|
||||
port = 51820;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 8080 ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
modules.profiles.base.enable = true;
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Import environment
|
||||
../default.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
# State version
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
# Machine hostname
|
||||
networking.hostName = "20212060";
|
||||
|
||||
# Enabled modules
|
||||
modules = {
|
||||
base.desktop.enable = true;
|
||||
bluetooth.enable = true;
|
||||
power-saving.enable = false;
|
||||
networkmanager.enable = true;
|
||||
grdp.enable = true;
|
||||
printing.enable = true;
|
||||
};
|
||||
|
||||
# Hardware configuration
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
# Filesystems
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/3b91eaeb-ea95-4bea-8dc1-f55af7502d23";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/46BF-DE2C";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
# Swapfile
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16 * 1024;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Import environment
|
||||
./vm-base.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
# Machine hostname
|
||||
networking.hostName = "vm-audio";
|
||||
|
||||
# Enabled modules
|
||||
modules = {
|
||||
pipewire.enable = true;
|
||||
spotifyd.enable = true;
|
||||
};
|
||||
|
||||
# Install system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
carla
|
||||
wprs
|
||||
xpra
|
||||
xwayland
|
||||
alsa-utils
|
||||
pulsemixer
|
||||
adwaita-icon-theme
|
||||
|
||||
# Add LV2 plugins
|
||||
lsp-plugins
|
||||
airwindows-lv2
|
||||
distrho-ports
|
||||
cardinal
|
||||
];
|
||||
|
||||
# Setup dependencies
|
||||
environment.variables.LD_LIBRARY_PATH = lib.mkForce "${lib.makeLibraryPath (
|
||||
with pkgs;
|
||||
[
|
||||
cairo
|
||||
pipewire.jack
|
||||
]
|
||||
)}";
|
||||
services.xserver.enable = true;
|
||||
qt = {
|
||||
enable = true;
|
||||
style = "adwaita";
|
||||
};
|
||||
xdg.icons = {
|
||||
enable = true;
|
||||
fallbackCursorThemes = [ "Adwaita" ];
|
||||
};
|
||||
|
||||
# User for audio mixing
|
||||
users.users.mixer = {
|
||||
isNormalUser = true;
|
||||
group = "mixer";
|
||||
extraGroups = [ "systemd-journal" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKKxoQSxfYqf9ITN8Fhckk8WbY4dwtBAXOhC9jxihJvq jan@bulthuis.dev"
|
||||
];
|
||||
};
|
||||
users.groups.mixer = { };
|
||||
users.groups.audio = {
|
||||
members = [
|
||||
"mixer"
|
||||
"local"
|
||||
];
|
||||
};
|
||||
|
||||
# wprsd service
|
||||
systemd.user.services.wprsd = {
|
||||
description = "wprsd Service";
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [ "network.target" ];
|
||||
unitConfig = {
|
||||
ConditionUser = "mixer";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.bash}/bin/bash -l -c wprsd --enable-xwayland=true"; # Use login shell to inherit environment
|
||||
Environment = "\"RUST_BACKTRACE=full\"";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
|
||||
# Create null sink for spotifyd
|
||||
services.pipewire.extraConfig.pipewire."91-null-sinks" = {
|
||||
"context.objects" = [
|
||||
{
|
||||
factory = "adapter";
|
||||
args = {
|
||||
"factory.name" = "support.null-audio-sink";
|
||||
"node.name" = "SpotifyD-Proxy";
|
||||
"node.description" = "Proxy for SpotifyD";
|
||||
"media.class" = "Audio/Sink";
|
||||
"audio.position" = "FL,FR";
|
||||
};
|
||||
}
|
||||
{
|
||||
factory = "adapter";
|
||||
args = {
|
||||
"factory.name" = "support.null-audio-sink";
|
||||
"node.name" = "AnalogIn-Proxy";
|
||||
"node.description" = "Proxy for the analog input";
|
||||
"media.class" = "Audio/Source/Virtual";
|
||||
"audio.position" = "FL,FR";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Import environment
|
||||
../default.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
# State version
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
# Machine hostname
|
||||
networking.hostName = lib.mkDefault "vm-base";
|
||||
|
||||
# Enabled modules
|
||||
modules = {
|
||||
base.enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
|
||||
# Enable qemu guest agent
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
# Hardware configuration
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
# Filesystems
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-partlabel/root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-partlabel/EFI";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
# Swapfile
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 6 * 1024;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.base;
|
||||
in
|
||||
{
|
||||
options.modules.base = {
|
||||
enable = mkEnableOption "base";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Add base linux utilities
|
||||
git
|
||||
wget
|
||||
curl
|
||||
dig
|
||||
procps
|
||||
wireguard-tools
|
||||
usbutils
|
||||
pciutils
|
||||
zip
|
||||
unzip
|
||||
];
|
||||
|
||||
modules = {
|
||||
# Enable base modules
|
||||
clean-tmp.enable = true;
|
||||
neovim.enable = true;
|
||||
systemd-boot.enable = true;
|
||||
};
|
||||
|
||||
# TODO: Remove everything below, it is here out of convenience and should be elsewhere
|
||||
# networking.nameservers = [
|
||||
# "9.9.9.9"
|
||||
# "149.112.112.112"
|
||||
# ];
|
||||
# programs.captive-browser.enable = true;
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
};
|
||||
networking.firewall.enable = true;
|
||||
modules.unfree.enable = true;
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
console.packages = [
|
||||
pkgs.dina-psfu
|
||||
];
|
||||
console.font = "dina";
|
||||
console.earlySetup = true;
|
||||
boot.loader.timeout = 0;
|
||||
};
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.base.desktop;
|
||||
in
|
||||
{
|
||||
options.modules.base.desktop = {
|
||||
enable = mkEnableOption "desktop";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# TODO: MOVE
|
||||
quickemu # TODO: Reenable once building this is fixed
|
||||
pdftk
|
||||
|
||||
# TODO: Move to USB module
|
||||
# usbutils
|
||||
# udiskie
|
||||
# udisks
|
||||
brightnessctl
|
||||
];
|
||||
|
||||
# Move to Realm module
|
||||
security.krb5 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
libdefaults = {
|
||||
rdns = false;
|
||||
};
|
||||
realms = {
|
||||
"GEWISWG.GEWIS.NL" = {
|
||||
kdc = [
|
||||
"https://gewisvdesktop.gewis.nl/KdcProxy"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
modules = {
|
||||
# Enable base modules
|
||||
base.enable = true;
|
||||
fontconfig.enable = true;
|
||||
nixgreety.enable = true;
|
||||
pipewire.enable = true;
|
||||
graphics.enable = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
services.libinput.enable = true;
|
||||
services.upower.enable = true; # For battery percentage in gnome
|
||||
modules.unfree.allowedPackages = [
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
];
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
{
|
||||
from = 10000;
|
||||
to = 11000;
|
||||
}
|
||||
];
|
||||
networking.firewall.allowedUDPPortRanges = [
|
||||
{
|
||||
from = 10000;
|
||||
to = 11000;
|
||||
}
|
||||
];
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# TODO: Move to USB module
|
||||
# services.gvfs.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.bluetooth;
|
||||
in
|
||||
{
|
||||
options.modules.bluetooth = {
|
||||
enable = mkEnableOption "bluetooth";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ bluez ];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.clean-tmp;
|
||||
in
|
||||
{
|
||||
options.modules.clean-tmp = {
|
||||
enable = mkEnableOption "clean-tmp";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable { boot.tmp.cleanOnBoot = true; };
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.silent-boot;
|
||||
in
|
||||
{
|
||||
options.modules.silent-boot = {
|
||||
enable = mkEnableOption "silent-boot";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot = {
|
||||
loader.timeout = 0;
|
||||
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
initrd.checkJournalingFS = false;
|
||||
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"udev.log_priority=3"
|
||||
"video=efifb:nobgrt"
|
||||
"bgrt_disable"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.brightnessctl;
|
||||
in
|
||||
{
|
||||
options.modules.brightnessctl = {
|
||||
enable = mkEnableOption "brightnessctl";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable { environment.systemPackages = [ pkgs.brightnessctl ]; };
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
{
|
||||
imports = [
|
||||
# Import modules
|
||||
./base/default.nix
|
||||
./base/desktop.nix
|
||||
./bluetooth/default.nix
|
||||
./boot/clean-tmp.nix
|
||||
./boot/silent-boot.nix
|
||||
./boot/systemd-boot.nix
|
||||
./brightnessctl/default.nix
|
||||
./fontconfig/default.nix
|
||||
./graphics/default.nix
|
||||
./grdp/default.nix
|
||||
./greeter/greetd/default.nix
|
||||
./greeter/greetd/nixgreety.nix
|
||||
./greeter/greetd/tuigreet.nix
|
||||
./greeter/ly/default.nix
|
||||
./locale/default.nix
|
||||
./neovim/default.nix
|
||||
./networkmanager/default.nix
|
||||
./power-saving/default.nix
|
||||
./printing/default.nix
|
||||
./sound/pipewire.nix
|
||||
./spotifyd/default.nix
|
||||
./ssh/default.nix
|
||||
./users/default.nix
|
||||
./unfree/default.nix
|
||||
./vpn/tailscale.nix
|
||||
./wifi/wpa_supplicant.nix
|
||||
];
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.fontconfig;
|
||||
in
|
||||
{
|
||||
options.modules.fontconfig = {
|
||||
enable = mkEnableOption "fontconfig";
|
||||
};
|
||||
|
||||
config = {
|
||||
fonts.fontconfig.enable = cfg.enable;
|
||||
fonts.enableDefaultPackages = false;
|
||||
fonts.fontconfig.defaultFonts = {
|
||||
serif = mkDefault [ ];
|
||||
sansSerif = mkDefault [ ];
|
||||
monospace = mkDefault [ ];
|
||||
emoji = mkDefault [ ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.fontconfig;
|
||||
in
|
||||
{
|
||||
options.modules.graphics = {
|
||||
enable = mkEnableOption "graphics";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
# TODO: Modularize further, especially modesetting should be its own module.
|
||||
# Set up graphics
|
||||
hardware.graphics.enable32Bit = true;
|
||||
hardware.graphics.enable = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
options.modules.grdp = {
|
||||
enable = mkEnableOption "grdp";
|
||||
};
|
||||
|
||||
config = mkIf config.modules.grdp.enable {
|
||||
services.gnome.gnome-remote-desktop.enable = true;
|
||||
systemd.services."gnome-remote-desktop".wantedBy = [ "graphical.target" ];
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 3389 ];
|
||||
allowedUDPPorts = [ 3389 ];
|
||||
};
|
||||
# programs.dconf.profiles.user.databases = [
|
||||
# {
|
||||
# settings = with lib.gvariant; {
|
||||
# "org/gnome/desktop/remote-desktop/rdp" = {
|
||||
# enable = true;
|
||||
# view-only = false;
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
};
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.greetd;
|
||||
in
|
||||
{
|
||||
options.modules.greetd = {
|
||||
enable = mkEnableOption "greetd";
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = "Command to run to show greeter.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings.default_session = {
|
||||
command = cfg.command;
|
||||
user = mkDefault "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.nixgreety;
|
||||
in
|
||||
{
|
||||
options.modules.nixgreety = {
|
||||
enable = mkEnableOption "nixgreety";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Enable greetd
|
||||
modules.greetd = {
|
||||
enable = true;
|
||||
command = "${pkgs.nixgreety}/bin/nixgreety";
|
||||
};
|
||||
|
||||
services.greetd.settings.default_session.user = "root";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nixgreety
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.tuigreet;
|
||||
in
|
||||
{
|
||||
options.modules.tuigreet = {
|
||||
enable = mkEnableOption "tuigreet";
|
||||
greeting = mkOption {
|
||||
type = types.str;
|
||||
default = "Hewwo! >_< :3";
|
||||
description = "Greeting message to show.";
|
||||
};
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
default = "~/.initrc";
|
||||
description = "Command to run after logging in.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Enable greetd
|
||||
modules.greetd = {
|
||||
enable = true;
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --greeting \"${cfg.greeting}\" --time --cmd \"${cfg.command}\" --asterisks";
|
||||
};
|
||||
|
||||
# Enable silent boot to prevent late log messages from messing up tuigreet
|
||||
modules.silent-boot.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.ly;
|
||||
in
|
||||
{
|
||||
options.modules.ly = {
|
||||
enable = mkEnableOption "ly";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.displayManager.ly = {
|
||||
enable = true;
|
||||
settings = {
|
||||
animation = "matrix";
|
||||
animation_refresh_ms = 32;
|
||||
box_title = "Hewwo! >_< :3";
|
||||
clear_password = true;
|
||||
load = true;
|
||||
save = true;
|
||||
xinitrc = "null";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.gnome;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.gnome = {
|
||||
enable = mkEnableOption "gnome";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# TODO: Enable extensions with dconf
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "capitaine-cursors";
|
||||
size = 24;
|
||||
package = pkgs.capitaine-cursors;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
gnome-session
|
||||
gnome-shell
|
||||
gnome-tweaks
|
||||
gnome-calculator
|
||||
snapshot
|
||||
gnome-characters
|
||||
gnome-connections
|
||||
blackbox-terminal
|
||||
baobab
|
||||
gnome-disk-utility
|
||||
papers
|
||||
nautilus
|
||||
gnome-font-viewer
|
||||
loupe
|
||||
gnome-maps
|
||||
gnome-music
|
||||
gnome-control-center
|
||||
gnome-text-editor
|
||||
showtime
|
||||
file-roller
|
||||
mission-center
|
||||
dconf-editor
|
||||
|
||||
# For theming gtk3
|
||||
adw-gtk3
|
||||
]
|
||||
++ (with pkgs.gnomeExtensions; [
|
||||
gsconnect
|
||||
disable-workspace-animation
|
||||
wallpaper-slideshow
|
||||
media-progress
|
||||
# luminus-desktop
|
||||
]);
|
||||
|
||||
# Enable and set the gtk themes
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk3.extraConfig = {
|
||||
gtk-theme-name = "adw-gtk3";
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-theme-name = "Adwaita";
|
||||
};
|
||||
};
|
||||
|
||||
# Set the theme with dconf
|
||||
dconf.settings."org/gnome/desktop/interface" = {
|
||||
gtk-theme = "adw-gtk3";
|
||||
};
|
||||
};
|
||||
}
|
||||
File renamed without changes.
+3
-8
@@ -15,11 +15,6 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Allow unfree
|
||||
modules.unfree.allowedPackages = [
|
||||
"vscode-extension-ms-vscode-cpptools"
|
||||
];
|
||||
|
||||
# Gitignore additions
|
||||
modules.git.ignores = [
|
||||
".ccls-cache"
|
||||
@@ -48,8 +43,8 @@ in
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = {
|
||||
plugins.lsp.servers.ccls.enable = true;
|
||||
};
|
||||
# programs.nixvim = {
|
||||
# plugins.lsp.servers.ccls.enable = true;
|
||||
# };
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -37,6 +37,6 @@ in
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = { };
|
||||
# programs.nixvim = { };
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -33,6 +33,6 @@ in
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = { };
|
||||
# programs.nixvim = { };
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -39,6 +39,6 @@ in
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = { };
|
||||
# programs.nixvim = { };
|
||||
};
|
||||
}
|
||||
+2
-2
@@ -53,8 +53,8 @@ in
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = {
|
||||
# programs.nixvim = {
|
||||
|
||||
};
|
||||
# };
|
||||
};
|
||||
}
|
||||
+1
-6
@@ -27,11 +27,6 @@ in
|
||||
# Development packages
|
||||
home.packages = [ ];
|
||||
|
||||
# Allow unfree
|
||||
modules.unfree.allowedPackages = [
|
||||
"vscode-extension-MS-python-vscode-pylance"
|
||||
];
|
||||
|
||||
# VSCode configuration
|
||||
programs.vscode = {
|
||||
profiles.default = {
|
||||
@@ -52,6 +47,6 @@ in
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = { };
|
||||
# programs.nixvim = { };
|
||||
};
|
||||
}
|
||||
+5
-5
@@ -50,10 +50,10 @@ in
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = {
|
||||
plugins.rustaceanvim = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
# programs.nixvim = {
|
||||
# plugins.rustaceanvim = {
|
||||
# enable = true;
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
+24
-24
@@ -39,31 +39,31 @@ in
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = {
|
||||
extraConfigVim = ''
|
||||
" Enforce latexmk
|
||||
let g:vimtex_compiler_method = 'latexmk'
|
||||
# programs.nixvim = {
|
||||
# extraConfigVim = ''
|
||||
# " Enforce latexmk
|
||||
# let g:vimtex_compiler_method = 'latexmk'
|
||||
|
||||
" Set latexmk compilation settings
|
||||
let g:vimtex_compiler_latexmk = {
|
||||
\ 'options': [
|
||||
\ '-shell-escape',
|
||||
\ '-verbose',
|
||||
\ '-file-line-error',
|
||||
\ '-synctex=1',
|
||||
\ '-interaction=nonstopmode',
|
||||
\ ],
|
||||
\}
|
||||
'';
|
||||
# " Set latexmk compilation settings
|
||||
# let g:vimtex_compiler_latexmk = {
|
||||
# \ 'options': [
|
||||
# \ '-shell-escape',
|
||||
# \ '-verbose',
|
||||
# \ '-file-line-error',
|
||||
# \ '-synctex=1',
|
||||
# \ '-interaction=nonstopmode',
|
||||
# \ ],
|
||||
# \}
|
||||
# '';
|
||||
|
||||
# Vimtex plugin
|
||||
plugins.vimtex = {
|
||||
enable = true;
|
||||
texlivePackage = null;
|
||||
settings = {
|
||||
view_method = "zathura";
|
||||
};
|
||||
};
|
||||
};
|
||||
# # Vimtex plugin
|
||||
# plugins.vimtex = {
|
||||
# enable = true;
|
||||
# texlivePackage = null;
|
||||
# settings = {
|
||||
# view_method = "zathura";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
+1
-5
@@ -11,7 +11,7 @@ let
|
||||
|
||||
my-mathematica = pkgs.mathematica.override {
|
||||
# TODO: Just use a generic name for the installer?
|
||||
source = ./Wolfram_14.1.0_LIN_Bndl.sh;
|
||||
# source = ./Wolfram_14.2.1_LIN_Bndl.sh;
|
||||
};
|
||||
in
|
||||
{
|
||||
@@ -20,10 +20,6 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
modules.unfree.allowedPackages = [
|
||||
"mathematica"
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
my-mathematica
|
||||
];
|
||||
@@ -0,0 +1,190 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.neovim;
|
||||
# theme = config.desktop.theming;
|
||||
# colors = theme.colors;
|
||||
in
|
||||
{
|
||||
options.modules.neovim = {
|
||||
enable = mkEnableOption "neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# programs.nixvim = {
|
||||
# enable = true;
|
||||
# defaultEditor = true;
|
||||
# viAlias = true;
|
||||
# vimAlias = true;
|
||||
|
||||
# # extraPackages = with pkgs; [ ];
|
||||
|
||||
# opts = {
|
||||
# number = true;
|
||||
# relativenumber = true;
|
||||
|
||||
# signcolumn = "yes";
|
||||
|
||||
# ignorecase = true;
|
||||
# smartcase = true;
|
||||
|
||||
# tabstop = 4;
|
||||
# shiftwidth = 4;
|
||||
# softtabstop = 0;
|
||||
# expandtab = true;
|
||||
# smarttab = true;
|
||||
|
||||
# list = true;
|
||||
# listchars = "tab:»┈«,trail:·,extends:→,precedes:←,nbsp:␣";
|
||||
# };
|
||||
|
||||
# diagnostic.settings = {
|
||||
# enable = true;
|
||||
# signs = true;
|
||||
# underline = true;
|
||||
# update_in_insert = true;
|
||||
# };
|
||||
|
||||
# extraConfigLua = ''
|
||||
# vim.fn.sign_define("DiagnosticSignError",
|
||||
# {text = "", texthl = "DiagnosticSignError"})
|
||||
# vim.fn.sign_define("DiagnosticSignWarn",
|
||||
# {text = "", texthl = "DiagnosticSignWarn"})
|
||||
# vim.fn.sign_define("DiagnosticSignInfo",
|
||||
# {text = "", texthl = "DiagnosticSignInfo"})
|
||||
# vim.fn.sign_define("DiagnosticSignHint",
|
||||
# {text = "💡", texthl = "DiagnosticSignHint"})
|
||||
# '';
|
||||
|
||||
# keymaps = [
|
||||
# # Save shortcut
|
||||
# {
|
||||
# action = ":update<CR>";
|
||||
# key = "<C-s>";
|
||||
# mode = "n";
|
||||
# }
|
||||
# {
|
||||
# action = "<C-o>:update<CR>";
|
||||
# key = "<C-s>";
|
||||
# mode = "i";
|
||||
# }
|
||||
|
||||
# # Neo tree
|
||||
# {
|
||||
# action = ":Neotree action=focus reveal toggle<CR>";
|
||||
# key = "<leader>n";
|
||||
# mode = "n";
|
||||
# options.silent = true;
|
||||
# }
|
||||
# ];
|
||||
|
||||
# autoCmd = [
|
||||
# {
|
||||
# desc = "Automatic formatting";
|
||||
# event = "BufWritePre";
|
||||
# callback = {
|
||||
# __raw = ''
|
||||
# function()
|
||||
# vim.lsp.buf.format {
|
||||
# async = false,
|
||||
# }
|
||||
# end
|
||||
# '';
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
|
||||
# # highlight = {
|
||||
# # Comment = {
|
||||
# # italic = true;
|
||||
# # fg = theme.schemeColors.withHashtag.base03; # TODO: Come up with a good name colors.muted maybe?
|
||||
# # };
|
||||
# # };
|
||||
|
||||
# plugins.lsp = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
# #plugins.treesitter = {
|
||||
# # enable = true;
|
||||
# #};
|
||||
|
||||
# plugins.cmp = {
|
||||
# enable = true;
|
||||
|
||||
# settings = {
|
||||
# mapping = {
|
||||
# "<C-Space>" = "cmp.mapping.complete()";
|
||||
# "<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
# "<C-e>" = "cmp.mapping.close()";
|
||||
# "<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
# "<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
# "<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
# "<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
# };
|
||||
# sources = [
|
||||
# { name = "path"; }
|
||||
# { name = "nvim_lsp"; }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
|
||||
# plugins.web-devicons = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
# plugins.neo-tree = {
|
||||
# enable = true;
|
||||
|
||||
# closeIfLastWindow = true;
|
||||
# window = {
|
||||
# width = 30;
|
||||
# autoExpandWidth = true;
|
||||
# };
|
||||
|
||||
# extraOptions = {
|
||||
# default_component_configs.git_status.symbols = {
|
||||
# # Change type
|
||||
# added = "+";
|
||||
# deleted = "✕";
|
||||
# modified = "✦";
|
||||
# renamed = "→";
|
||||
|
||||
# # Status type
|
||||
# untracked = "?";
|
||||
# ignored = "▫";
|
||||
# unstaged = "□";
|
||||
# staged = "■";
|
||||
# conflict = "‼";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
# #plugins.cmp-nvim-lsp.enable = true;
|
||||
|
||||
# plugins.gitsigns = {
|
||||
# enable = true;
|
||||
# settings.current_line_blame = true;
|
||||
# };
|
||||
|
||||
# #plugins.copilot-vim = {
|
||||
# # enable = true;
|
||||
# #};
|
||||
|
||||
# # plugins.vimtex = {
|
||||
# # enable = true;
|
||||
# # texlivePackage = null;
|
||||
# # settings = {
|
||||
# # view_method = "zathura";
|
||||
# # };
|
||||
# # };
|
||||
# };
|
||||
# programs.neovim.defaultEditor = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.vscode;
|
||||
# theme = config.desktop.theming;
|
||||
in
|
||||
{
|
||||
options.modules.vscode = {
|
||||
enable = mkEnableOption "vscode";
|
||||
# codeFont = mkOption {
|
||||
# type = types.anything;
|
||||
# default = theme.fonts.pkgs."Fira Code";
|
||||
# };
|
||||
# fallbackFont = mkOption {
|
||||
# type = types.anything;
|
||||
# default = theme.fonts.pkgs."Symbols Nerd Font Mono";
|
||||
# };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# TODO: Fix theming
|
||||
# desktop.theming.fonts.extraFonts = [ cfg.codeFont ];
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
mutableExtensionsDir = false;
|
||||
profiles.default = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
eamodio.gitlens
|
||||
ms-vscode.hexeditor
|
||||
mkhl.direnv
|
||||
usernamehw.errorlens
|
||||
gruntfuggly.todo-tree
|
||||
github.copilot
|
||||
github.copilot-chat
|
||||
tomoki1207.pdf
|
||||
ms-vsliveshare.vsliveshare
|
||||
ms-vscode-remote.remote-ssh
|
||||
];
|
||||
|
||||
userSettings =
|
||||
let
|
||||
# font-family = mkForce "'${cfg.codeFont.name}', '${cfg.fallbackFont.name}'";
|
||||
# TODO: Move the conversion factor to theme settings
|
||||
# font-size = mkForce cfg.codeFont.recommendedSize; # Convert pt to px
|
||||
in
|
||||
{
|
||||
# Font setup
|
||||
# "editor.fontFamily" = font-family;
|
||||
# "editor.inlayHints.fontFamily" = font-family;
|
||||
# "editor.inlineSuggest.fontFamily" = font-family;
|
||||
# "editor.fontSize" = font-size;
|
||||
# "editor.fontLigatures" = true;
|
||||
# "terminal.integrated.fontFamily" = font-family;
|
||||
# "terminal.integrated.fontSize" = font-size;
|
||||
# "chat.editor.fontFamily" = font-family; # TODO: Change this font to the standard UI font
|
||||
# "chat.editor.fontSize" = font-size;
|
||||
# "debug.console.fontFamily" = font-family;
|
||||
# "debug.console.fontSize" = font-size;
|
||||
# "scm.inputFontFamily" = font-family; # TODO: Change this font to the standard UI font
|
||||
# "scm.inputFontSize" = font-size;
|
||||
# "markdown.preview.fontFamily" = mkForce theme.fonts.sansSerif.name; # TODO: Change this font to the standard UI font
|
||||
# "markdown.preview.fontSize" = mkForce theme.fonts.sansSerif.recommendedSize;
|
||||
|
||||
# Formatting
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.tabSize" = 4;
|
||||
|
||||
# Layout
|
||||
"window.menuBarVisibility" = "hidden";
|
||||
|
||||
# Git settings
|
||||
"git.autofetch" = true;
|
||||
"git.enableSmartCommit" = false;
|
||||
"git.suggestSmartCommit" = false;
|
||||
|
||||
# Disable update notifications
|
||||
"update.mode" = "none";
|
||||
|
||||
# Set themes
|
||||
"window.autoDetectColorScheme" = true;
|
||||
|
||||
# TODO: Move to direnv module
|
||||
# Ignore direnv folder
|
||||
"files.exclude" = {
|
||||
".direnv" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -11,11 +11,17 @@ in
|
||||
{
|
||||
options.modules.bash = {
|
||||
enable = mkEnableOption "bash";
|
||||
aliases = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = {
|
||||
"..." = "cd ../..";
|
||||
};
|
||||
description = "Shell aliases";
|
||||
};
|
||||
};
|
||||
|
||||
config.programs.bash = {
|
||||
enable = cfg.enable;
|
||||
|
||||
shellAliases = config.modules.shell.aliases;
|
||||
shellAliases = cfg.aliases;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.direnv;
|
||||
in
|
||||
{
|
||||
options.modules.direnv = {
|
||||
enable = mkEnableOption "direnv";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
modules.git.ignores = [
|
||||
".direnv"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -12,12 +12,6 @@ in
|
||||
{
|
||||
options.modules.fish = {
|
||||
enable = mkEnableOption "fish";
|
||||
|
||||
plugins = {
|
||||
done = mkEnableOption "done";
|
||||
fzf = mkEnableOption "fzf";
|
||||
grc = mkEnableOption "grc";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
@@ -36,28 +30,28 @@ in
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
shellAliases = config.modules.shell.aliases;
|
||||
shellAliases = config.modules.bash.aliases;
|
||||
|
||||
plugins = [
|
||||
(mkIf cfg.plugins.done {
|
||||
{
|
||||
name = "done";
|
||||
src = pkgs.fishPlugins.done.src;
|
||||
})
|
||||
(mkIf cfg.plugins.fzf {
|
||||
}
|
||||
{
|
||||
name = "fzf";
|
||||
src = pkgs.fishPlugins.fzf-fish.src;
|
||||
})
|
||||
(mkIf cfg.plugins.grc {
|
||||
}
|
||||
{
|
||||
name = "grc";
|
||||
src = pkgs.fishPlugins.grc.src;
|
||||
})
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Fish plugin dependencies
|
||||
home.packages = with pkgs; [
|
||||
(mkIf cfg.plugins.fzf fzf)
|
||||
(mkIf cfg.plugins.grc grc)
|
||||
fzf
|
||||
grc
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.impermanence;
|
||||
in
|
||||
{
|
||||
options.modules.impermanence = {
|
||||
enable = mkEnableOption "Impermanence";
|
||||
directories = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Directories that should be stored in persistent storage.
|
||||
'';
|
||||
};
|
||||
files = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Files that should be stored in persistent storage.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.persistence."/persist/home/${config.home.username}" = {
|
||||
enable = true;
|
||||
hideMounts = true;
|
||||
allowOther = true;
|
||||
directories = cfg.directories;
|
||||
files = cfg.files;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.xpra;
|
||||
in
|
||||
{
|
||||
options.modules.xpra = {
|
||||
enable = mkEnableOption "Enable xpra";
|
||||
hosts = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = { };
|
||||
description = "xpra hosts";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
xpra
|
||||
];
|
||||
|
||||
xdg.desktopEntries = (
|
||||
listToAttrs (
|
||||
map
|
||||
(entry: {
|
||||
name = "xpra${
|
||||
builtins.substring 0 12 (builtins.hashString "sha256" "${entry.name} (${entry.comment})")
|
||||
}";
|
||||
value = entry // {
|
||||
type = "Application";
|
||||
terminal = false;
|
||||
genericName = entry.comment;
|
||||
};
|
||||
})
|
||||
(
|
||||
concatMap (
|
||||
host:
|
||||
let
|
||||
uri = "tcp://${host}:15151/7";
|
||||
in
|
||||
[
|
||||
{
|
||||
name = "Xpra - Attach";
|
||||
comment = host;
|
||||
exec = "xpra attach --min-quality=100 --min-speed=100 --encoding=png --speaker=off ${uri}";
|
||||
}
|
||||
{
|
||||
name = "Xpra - Detach";
|
||||
comment = host;
|
||||
exec = "xpra detach ${uri}";
|
||||
}
|
||||
]
|
||||
) cfg.hosts
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
config = {
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console.keyMap = "us";
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.neovim;
|
||||
in
|
||||
{
|
||||
options.modules.neovim = {
|
||||
enable = mkEnableOption "neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.networkmanager;
|
||||
in
|
||||
{
|
||||
options.modules.networkmanager = {
|
||||
enable = mkEnableOption "networkmanager";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
machine.sudo-groups = [ "networkmanager" ];
|
||||
networking = {
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
wifi.powersave = true;
|
||||
};
|
||||
firewall = {
|
||||
# Fix for wireguard
|
||||
checkReversePath = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.bluetooth;
|
||||
in
|
||||
{
|
||||
options.modules.bluetooth = {
|
||||
enable = mkEnableOption "bluetooth";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
# Enable bluetooth
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +1,17 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.systemd-boot;
|
||||
cfg = config.modules.bootloader;
|
||||
in
|
||||
{
|
||||
options.modules.systemd-boot = {
|
||||
enable = mkEnableOption "systemd-boot";
|
||||
options.modules.bootloader = {
|
||||
enable = mkEnableOption "bootloader";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Bootloader
|
||||
boot.loader = {
|
||||
timeout = 0;
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.editor = false;
|
||||
efi.canTouchEfiVariables = true;
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.disko;
|
||||
profile = import "${inputs.self}/profiles/disko/${cfg.profile}.nix";
|
||||
in
|
||||
{
|
||||
options.modules.disko = {
|
||||
enable = mkEnableOption "Disko module";
|
||||
profile = mkOption {
|
||||
type = types.str;
|
||||
default = null;
|
||||
description = "The profile to use for the disko module.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable { disko.devices = profile.disko.devices; };
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.fonts;
|
||||
in
|
||||
{
|
||||
options.modules.fonts = {
|
||||
enable = mkEnableOption "fonts";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
console.packages = [
|
||||
pkgs.dina-psfu
|
||||
];
|
||||
console.font = "dina";
|
||||
console.earlySetup = true;
|
||||
|
||||
# TODO: Disable default fonts, fonts should be managed per user
|
||||
# fonts.enableDefaultPackages = false;
|
||||
# fonts.fontconfig = {
|
||||
# enable = true;
|
||||
# defaultFonts = {
|
||||
# serif = mkDefault [ ];
|
||||
# sansSerif = mkDefault [ ];
|
||||
# monospace = mkDefault [ ];
|
||||
# emoji = mkDefault [ ];
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.gnome;
|
||||
in
|
||||
{
|
||||
options.modules.gnome = {
|
||||
enable = mkEnableOption "gnome";
|
||||
# TODO: Add RDP toggle
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Enable GDM and Gnome
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
services.gnome.core-utilities.enable = false;
|
||||
services.gnome.games.enable = false;
|
||||
services.gnome.core-developer-tools.enable = false;
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
adwaita-icon-theme
|
||||
(derivation { name = "nixos-background-info"; })
|
||||
gnome-backgrounds
|
||||
gnome-bluetooth
|
||||
gnome-color-manager
|
||||
gnome-control-center
|
||||
gnome-shell-extensions
|
||||
gnome-tour
|
||||
gnome-user-docs
|
||||
glib
|
||||
gnome-menus
|
||||
gtk3.out
|
||||
xdg-user-dirs
|
||||
xdg-user-dirs-gtk
|
||||
];
|
||||
|
||||
# Enable Gnome Remote Desktop
|
||||
services.gnome.gnome-remote-desktop.enable = true;
|
||||
systemd.services."gnome-remote-desktop".wantedBy = [ "graphical.target" ];
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
3389
|
||||
3390
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
3389
|
||||
3390
|
||||
];
|
||||
};
|
||||
|
||||
# For GSConnect/KDE Connect
|
||||
# TODO: Move to host config?
|
||||
networking.firewall = {
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Enable dependencies
|
||||
modules = {
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.graphics;
|
||||
in
|
||||
{
|
||||
options.modules.graphics = {
|
||||
enable = mkEnableOption "graphics";
|
||||
# TODO: Add toggle for hybrid graphics
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.enable32Bit = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
# TODO: Add nvidia settings back in
|
||||
# TODO: Move to nvidia module
|
||||
hardware.nvidia = {
|
||||
open = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.impermanence;
|
||||
in
|
||||
{
|
||||
options.modules.impermanence = {
|
||||
enable = mkEnableOption "Impermanence";
|
||||
directories = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Directories that should be stored in persistent storage.
|
||||
'';
|
||||
};
|
||||
files = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Files that should be stored in persistent storage.
|
||||
'';
|
||||
};
|
||||
resetScript = mkOption {
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Script to run on boot that resets the root partition.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
boot.initrd.postResumeCommands = mkAfter cfg.resetScript;
|
||||
|
||||
# For home-manager persistence
|
||||
programs.fuse.userAllowOther = true;
|
||||
|
||||
environment.persistence."/persist/system" = {
|
||||
enable = true;
|
||||
hideMounts = true;
|
||||
directories = cfg.directories;
|
||||
files = cfg.files;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.networkmanager;
|
||||
in
|
||||
{
|
||||
options.modules.networkmanager = {
|
||||
enable = mkEnableOption "networkmanager";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
# TODO: Add sudo users to the networkmanager group?
|
||||
networking.networkmanager.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.power-saving;
|
||||
in
|
||||
{
|
||||
options.modules.power-saving = {
|
||||
enable = mkEnableOption "power saving";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
# Setup power management
|
||||
powerManagement.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
|
||||
# Enable wifi power saving
|
||||
networking.networkmanager.wifi.powersave = true;
|
||||
};
|
||||
}
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
@@ -12,16 +8,18 @@ in
|
||||
options.modules.printing = {
|
||||
enable = mkEnableOption "printing";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.printing = {
|
||||
enable = true;
|
||||
# drivers = with pkgs; [];
|
||||
};
|
||||
# Enable CUPS
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable Avahi to auto-detect network printers
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
# For SMB network printers
|
||||
services.samba.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,21 +1,15 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.pipewire;
|
||||
cfg = config.modules.sound;
|
||||
in
|
||||
{
|
||||
options.modules.pipewire = {
|
||||
enable = mkEnableOption "pipewire";
|
||||
options.modules.sound = {
|
||||
enable = mkEnableOption "sound";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
security.rtkit.enable = true;
|
||||
# Enable pipewire
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
@@ -23,5 +17,8 @@ in
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# Recommended by wiki, allows user processes to use realtime kernel
|
||||
security.rtkit.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
@@ -13,8 +8,8 @@ in
|
||||
options.modules.ssh = {
|
||||
enable = mkEnableOption "ssh";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.openssh.enable = true;
|
||||
# TODO: Is this default configuration secure?
|
||||
};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.power-saving;
|
||||
in
|
||||
{
|
||||
options.modules.power-saving = {
|
||||
enable = mkEnableOption "power-saving";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
powerManagement.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 20;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.spotifyd;
|
||||
in
|
||||
{
|
||||
options.modules.spotifyd = {
|
||||
enable = mkEnableOption "spotifyd";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# User for spotifyd
|
||||
users.users.mixer = {
|
||||
group = "mixer";
|
||||
};
|
||||
users.groups.mixer = { };
|
||||
|
||||
# Spotifyd service
|
||||
systemd.user.services.spotifyd = {
|
||||
description = "SpotifyD Service";
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [
|
||||
"network.target"
|
||||
"sound.target"
|
||||
];
|
||||
unitConfig = {
|
||||
ConditionUser = "mixer"; # TODO: Allow user configuration
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.spotifyd}/bin/spotifyd --no-daemon --config-path /etc/spotifyd/spotifyd.conf";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
|
||||
# Set up config
|
||||
environment.etc = {
|
||||
"spotifyd/spotifyd.conf" = {
|
||||
source = ./spotifyd.conf;
|
||||
mode = "0444";
|
||||
user = "mixer"; # TODO: Make user configurable
|
||||
group = "mixer";
|
||||
};
|
||||
};
|
||||
|
||||
# Set up firewall
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
5353
|
||||
5454
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
5353
|
||||
5454
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
[global]
|
||||
|
||||
#---------#
|
||||
# GENERAL #
|
||||
#---------#
|
||||
|
||||
# The name that gets displayed under the connect tab on
|
||||
# official clients.
|
||||
device_name = "Linox"
|
||||
|
||||
# The displayed device type in Spotify clients.
|
||||
# Can be unknown, computer, tablet, smartphone, speaker, t_v,
|
||||
# a_v_r (Audio/Video Receiver), s_t_b (Set-Top Box), and audio_dongle.
|
||||
device_type = "a_v_r"
|
||||
|
||||
# The directory used to store credentials and audio cache.
|
||||
# Default: infers a sensible cache directory (e.g. on Linux: $XDG_CACHE_HOME)
|
||||
#
|
||||
# Note: The file path does not get expanded. Environment variables and
|
||||
# shell placeholders like $HOME or ~ don't work!
|
||||
#cache_path = "/full/path/to/cache/directory"
|
||||
|
||||
# If set to true, audio data does NOT get cached.
|
||||
# In this case, the cache is only used for credentials.
|
||||
#no_audio_cache = true
|
||||
|
||||
# The maximal size of the cache directory in bytes
|
||||
# The example value corresponds to ~ 1GB
|
||||
#max_cache_size = 1000000000
|
||||
|
||||
# If set to true, `spotifyd` tries to bind to dbus (default is the session bus)
|
||||
# and expose MPRIS controls. When running headless, without the session bus,
|
||||
# you should set this to false, to avoid errors. If you still want to use MPRIS,
|
||||
# have a look at the `dbus_type` option.
|
||||
use_mpris = false
|
||||
|
||||
# The bus to bind to with the MPRIS interface.
|
||||
# Possible values: "session", "system"
|
||||
# The system bus can be used if no graphical session is available
|
||||
# (e.g. on headless systems) but you still want to be able to use MPRIS.
|
||||
# NOTE: You might need to add appropriate policies to allow spotifyd to
|
||||
# own the name.
|
||||
#dbus_type = "session"
|
||||
|
||||
#-----------#
|
||||
# DISCOVERY #
|
||||
#-----------#
|
||||
|
||||
# If set to true, this disables zeroconf discovery.
|
||||
# This can be useful, if one prefers to run a single-user instance.
|
||||
#disable_discovery = false
|
||||
|
||||
# The port at which `spotifyd` is going to offer its service over the network (TCP).
|
||||
# If not set, a random port > 1024 is used. For the service to be discoverable on the
|
||||
# local network via mDNS, both the mDNS port (5353 UDP) and the random or fixed
|
||||
# zeroconf port need to be allowed through any active firewall.
|
||||
zeroconf_port = 5454
|
||||
|
||||
#-------#
|
||||
# AUDIO #
|
||||
#-------#
|
||||
|
||||
# The audio backend used to play music. To get
|
||||
# a list of possible backends, run `spotifyd --help`.
|
||||
#backend = "alsa" # use portaudio for macOS [homebrew]
|
||||
backend = "pulseaudio"
|
||||
|
||||
# The alsa audio device to stream audio. To get a
|
||||
# list of valid devices, run `aplay -L`,
|
||||
#device = "default" # omit for macOS
|
||||
device = "SpotifyD-Proxy"
|
||||
|
||||
# The PCM sample format to use. Possible values
|
||||
# are F32, S32, S24, S24_3, S16.
|
||||
# Change this value if you encounter errors like
|
||||
# "Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_format' failed with error 'EINVAL: Invalid argument'"
|
||||
#audio_format = "S16"
|
||||
|
||||
# The volume controller. Each one behaves different to
|
||||
# volume increases. For possible values, run
|
||||
# `spotifyd --help`.
|
||||
#volume_controller = "softvol" # use softvol for macOS
|
||||
|
||||
# ! Only relevant for ALSA !
|
||||
# The alsa control device. By default this is the same
|
||||
# name as the `device` field.
|
||||
#control = "default"
|
||||
|
||||
# ! Only relevant for ALSA !
|
||||
# The alsa mixer used by `spotifyd`.
|
||||
#mixer = "PCM" # omit for macOS
|
||||
|
||||
# The audio bitrate. 96, 160 or 320 kbit/s
|
||||
#bitrate = 160
|
||||
|
||||
# Volume on startup between 0 and 100
|
||||
#initial_volume = 90
|
||||
|
||||
# If set to true, enables volume normalisation between songs.
|
||||
# volume_normalisation = true
|
||||
|
||||
# The normalisation pregain that is applied for each song.
|
||||
#normalisation_pregain = -10
|
||||
|
||||
#-------ä
|
||||
# OTHER #
|
||||
#-------#
|
||||
|
||||
# After the music playback has ended, start playing similar songs based on the previous tracks.
|
||||
# By default, `spotifyd` infers this setting from the user settings.
|
||||
#autoplay = true
|
||||
|
||||
# A command that gets executed in your shell after each song changes.
|
||||
#on_song_change_hook = "echo \"hook executed on $PLAYER_EVENT\""
|
||||
|
||||
# The proxy `spotifyd` will use to connect to spotify.
|
||||
#proxy = "http://proxy.example.org:8080"
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.unfree;
|
||||
in
|
||||
{
|
||||
options.modules.unfree = {
|
||||
enable = mkEnableOption "unfree";
|
||||
allowedPackages = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (getName pkg) cfg.allowedPackages;
|
||||
};
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
# User configuration
|
||||
userModule = types.submodule {
|
||||
options = {
|
||||
sudo = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether the user is allowed sudo access.";
|
||||
};
|
||||
configuration = mkOption {
|
||||
type = types.path;
|
||||
default = ./users/base.nix;
|
||||
description = "What home manager configuration to use for this user.";
|
||||
};
|
||||
desktopInit = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Bash script to execute after initial log in.";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# Import systemwide configuration
|
||||
./systemwide.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
machine.sudo-groups = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = "Groups assigned to sudo users.";
|
||||
};
|
||||
machine.users = mkOption {
|
||||
type = types.attrsOf userModule;
|
||||
default = { };
|
||||
description = "Users configured on this system.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
# Add required home manager modules
|
||||
home-manager.sharedModules = [
|
||||
# Modules
|
||||
../../user-modules/default.nix
|
||||
|
||||
# Custom packages
|
||||
../../pkgs/default.nix
|
||||
];
|
||||
|
||||
# Create users
|
||||
users.users = attrsets.concatMapAttrs (name: value: {
|
||||
${name} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = mkIf value.sudo (
|
||||
[
|
||||
"wheel"
|
||||
]
|
||||
++ config.machine.sudo-groups
|
||||
);
|
||||
};
|
||||
}) config.machine.users;
|
||||
|
||||
# Create home manager configuration for users
|
||||
home-manager.users = attrsets.concatMapAttrs (name: value: {
|
||||
${name} = value.configuration;
|
||||
}) config.machine.users;
|
||||
};
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
moduleFiles = [
|
||||
../../user-modules/desktop/systemwide.nix
|
||||
../../user-modules/development/systemwide.nix
|
||||
../../user-modules/gaming/systemwide.nix
|
||||
../../user-modules/keyring/systemwide.nix
|
||||
];
|
||||
|
||||
moduleConfig = lists.foldr (file: acc: recursiveUpdate acc (import file)) { } moduleFiles;
|
||||
|
||||
moduleNames = attrNames moduleConfig;
|
||||
|
||||
mkModule =
|
||||
name: moduleConfig:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
config =
|
||||
mkIf
|
||||
(any (
|
||||
user:
|
||||
(
|
||||
config.home-manager.users.${user}.modules.${name}.enable
|
||||
|| (any (specialisation: specialisation.configuration.modules.${name}.enable) (
|
||||
attrValues config.home-manager.users.${user}.specialisation
|
||||
))
|
||||
)
|
||||
) (attrNames config.home-manager.users))
|
||||
(if (isAttrs moduleConfig) then moduleConfig else (moduleConfig { inherit config pkgs; }));
|
||||
};
|
||||
|
||||
imports = map (name: mkModule name moduleConfig."${name}") moduleNames;
|
||||
in
|
||||
{
|
||||
imports = imports;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.tailscale;
|
||||
in
|
||||
{
|
||||
options.modules.tailscale = {
|
||||
enable = mkEnableOption "tailscale";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = "client";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.wpa_supplicant;
|
||||
in
|
||||
{
|
||||
options.modules.wpa_supplicant = {
|
||||
enable = mkEnableOption "wpa_supplicant";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
userControlled.enable = true;
|
||||
allowAuxiliaryImperativeNetworks = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
File renamed without changes.
@@ -1,20 +0,0 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
overlay = final: prev: {
|
||||
dina-psfu = prev.callPackage ./fonts/dina-psfu.nix { };
|
||||
ttf2psf = prev.callPackage ./fonts/ttf2psf.nix { };
|
||||
wqy-zenhei = prev.callPackage ./fonts/wqy-zenhei.nix { };
|
||||
wqy-microhei = prev.callPackage ./fonts/wqy-microhei.nix { };
|
||||
wqy-bitmapsong = prev.callPackage ./fonts/wqy-bitmapsong.nix { };
|
||||
|
||||
wprs = prev.callPackage ./programs/wprs/default.nix { };
|
||||
nixgreety = prev.callPackage ./programs/nixgreety.nix { };
|
||||
# ly = prev.callPackage ./programs/ly/default.nix { };
|
||||
};
|
||||
in
|
||||
{
|
||||
nixpkgs.overlays = [ overlay ];
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "ttf2psf";
|
||||
version = "1.0.0";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "NateChoe1";
|
||||
repo = "ttf2psf";
|
||||
rev = "8db09d05385f595c320eccae4c48ff4393ca5bde";
|
||||
sha256 = "v52TZp+GyXHBAMsIoHFA8ZIMPsDVls13WW29vpesCig=";
|
||||
};
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
pkg-config
|
||||
freetype
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
make build/ttf2psf
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm 755 -t $out/bin build/ttf2psf
|
||||
install -Dm 644 -t $out/share/ttf2psf data/*.*
|
||||
install -Dm 644 -t $out/share/ttf2psf/fontsets data/fontsets/*
|
||||
'';
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "wqy-bitmapsong-pcf";
|
||||
version = "1.0.0-RC1";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgs.fontforge ];
|
||||
buildPhase = ''
|
||||
newName() {
|
||||
test "''${1:5:1}" = i && _it=Italic || _it=
|
||||
case ''${1:6:3} in
|
||||
400) test -z $it && _weight=Medium ;;
|
||||
700) _weight=Bold ;;
|
||||
esac
|
||||
_pt=''${1%.pcf}
|
||||
_pt=''${_pt#*-}
|
||||
echo "WenQuanYi_Bitmap_Song$_weight$_it$_pt"
|
||||
}
|
||||
|
||||
for i in *.pcf; do
|
||||
fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$(newName $i).otb\")"
|
||||
done
|
||||
'';
|
||||
installPhase = ''
|
||||
install -Dm644 *.otb -t $out/share/fonts/
|
||||
'';
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "wqy-microhei";
|
||||
version = "0.2.0-beta";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-KAKsgCOqNqZupudEWFTjoHjTd///QhaTQb0jeHH3IT4=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm644 *.ttc -t $out/share/fonts/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "wqy-zenhei";
|
||||
version = "0.9.45";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-5LfjBkdb+UJ9F1dXjw5FKJMMhMROqj8WfUxC8RDuddY=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm644 *.ttc -t $out/share/fonts/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
linux-pam,
|
||||
libxcb,
|
||||
makeBinaryWrapper,
|
||||
zig_0_12,
|
||||
callPackage,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "ly";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "peterc-s";
|
||||
repo = "ly";
|
||||
rev = "e6d8bea236dd0097adb1c22e9a23d95102ebe9d9";
|
||||
sha256 = "w9YdNVD+8UhrEbPJ7xqsd/WoxU2rlo2GXFtc9JpWHxo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeBinaryWrapper
|
||||
zig_0_12.hook
|
||||
];
|
||||
buildInputs = [
|
||||
libxcb
|
||||
linux-pam
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
|
||||
'';
|
||||
|
||||
passthru.tests = { inherit (nixosTests) ly; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "TUI display manager";
|
||||
license = licenses.wtfpl;
|
||||
homepage = "https://github.com/fairyglade/ly";
|
||||
maintainers = [ maintainers.vidister ];
|
||||
platforms = platforms.linux;
|
||||
mainProgram = "ly";
|
||||
};
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
# generated by zon2nix (https://github.com/Cloudef/zig2nix)
|
||||
|
||||
{
|
||||
lib,
|
||||
linkFarm,
|
||||
fetchurl,
|
||||
fetchgit,
|
||||
runCommandLocal,
|
||||
zig,
|
||||
name ? "zig-packages",
|
||||
}:
|
||||
|
||||
let
|
||||
unpackZigArtifact =
|
||||
{ name, artifact }:
|
||||
runCommandLocal name { nativeBuildInputs = [ zig ]; } ''
|
||||
hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
|
||||
mv "$TMPDIR/p/$hash" "$out"
|
||||
chmod 755 "$out"
|
||||
'';
|
||||
|
||||
fetchZig =
|
||||
{
|
||||
name,
|
||||
url,
|
||||
hash,
|
||||
}:
|
||||
let
|
||||
artifact = fetchurl { inherit url hash; };
|
||||
in
|
||||
unpackZigArtifact { inherit name artifact; };
|
||||
|
||||
fetchGitZig =
|
||||
{
|
||||
name,
|
||||
url,
|
||||
hash,
|
||||
}:
|
||||
let
|
||||
parts = lib.splitString "#" url;
|
||||
base = lib.elemAt parts 0;
|
||||
rev = lib.elemAt parts 1;
|
||||
in
|
||||
fetchgit {
|
||||
inherit name rev hash;
|
||||
url = base;
|
||||
deepClone = false;
|
||||
};
|
||||
|
||||
fetchZigArtifact =
|
||||
{
|
||||
name,
|
||||
url,
|
||||
hash,
|
||||
}:
|
||||
let
|
||||
parts = lib.splitString "://" url;
|
||||
proto = lib.elemAt parts 0;
|
||||
path = lib.elemAt parts 1;
|
||||
fetcher = {
|
||||
"git+http" = fetchGitZig {
|
||||
inherit name hash;
|
||||
url = "http://${path}";
|
||||
};
|
||||
"git+https" = fetchGitZig {
|
||||
inherit name hash;
|
||||
url = "https://${path}";
|
||||
};
|
||||
http = fetchZig {
|
||||
inherit name hash;
|
||||
url = "http://${path}";
|
||||
};
|
||||
https = fetchZig {
|
||||
inherit name hash;
|
||||
url = "https://${path}";
|
||||
};
|
||||
file = unpackZigArtifact {
|
||||
inherit name;
|
||||
artifact = /. + path;
|
||||
};
|
||||
};
|
||||
in
|
||||
fetcher.${proto};
|
||||
in
|
||||
linkFarm name [
|
||||
{
|
||||
name = "122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b";
|
||||
path = fetchZigArtifact {
|
||||
name = "clap";
|
||||
url = "https://github.com/Hejsil/zig-clap/archive/refs/tags/0.9.1.tar.gz";
|
||||
hash = "sha256-7qxm/4xb+58MGG+iUzssUtR97OG2dRjAqyS0BAet4HY=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "12209b971367b4066d40ecad4728e6fdffc4cc4f19356d424c2de57f5b69ac7a619a";
|
||||
path = fetchZigArtifact {
|
||||
name = "zigini";
|
||||
url = "https://github.com/Kawaii-Ash/zigini/archive/0bba97a12582928e097f4074cc746c43351ba4c8.tar.gz";
|
||||
hash = "sha256-OdaJ5tqmk2MPwaAbpK4HRD/CcQCN+Cjj8U63BqUcFMs=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "1220b0979ea9891fa4aeb85748fc42bc4b24039d9c99a4d65d893fb1c83e921efad8";
|
||||
path = fetchZigArtifact {
|
||||
name = "ini";
|
||||
url = "https://github.com/ziglibs/ini/archive/e18d36665905c1e7ba0c1ce3e8780076b33e3002.tar.gz";
|
||||
hash = "sha256-RQ6OPJBqqH7PCL+xiI58JT7vnIo6zbwpLWn+byZO5iM=";
|
||||
};
|
||||
}
|
||||
]
|
||||
@@ -1,19 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
with pkgs;
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "nixgreety";
|
||||
version = "master";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "git.bulthuis.dev";
|
||||
owner = "Jan";
|
||||
repo = "nixgreety";
|
||||
rev = "c7278a910a0238a53f23fe9a0ae881802a4bcb31";
|
||||
hash = "sha256-kZB+iEFIDJ8pOJetu4Isu4oaktgIn14D4PcpDXLOXA8=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-pklKVzYoChRqPZ/D3BsMGnaBFd615TKbvoAy7iU8UtA=";
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
}
|
||||
Generated
-2431
File diff suppressed because it is too large.
Load diff
@@ -1,52 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
libxkbcommon,
|
||||
python3,
|
||||
runCommand,
|
||||
wprs,
|
||||
}:
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "wprs";
|
||||
version = "0-unstable-2025-04-16";
|
||||
buildType = "debug";
|
||||
dontStrip = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wayland-transpositor";
|
||||
repo = "wprs";
|
||||
rev = "dfc1385bcb73734cd0d05a7e353522983c236562";
|
||||
hash = "sha256-MrfYrKAVFoT453B2zED6Ax2coZ/KZ7CWYdZCx469Q/4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libxkbcommon
|
||||
(python3.withPackages (pp: with pp; [ psutil ]))
|
||||
];
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-01PTfgDeagC72z8XADXEn5Aio6UWQAAYgDP4zKFTPpY=";
|
||||
|
||||
preFixup = ''
|
||||
cp wprs "$out/bin/wprs"
|
||||
'';
|
||||
|
||||
passthru.tests.sanity = runCommand "wprs-sanity" { nativeBuildInputs = [ wprs ]; } ''
|
||||
${wprs}/bin/wprs -h > /dev/null && touch $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "rootless remote desktop access for remote Wayland";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ mksafavi ];
|
||||
platforms = [ "x86_64-linux" ]; # The aarch64-linux support is not implemented in upstream yet. Also, the darwin platform is not supported as it requires wayland.
|
||||
homepage = "https://github.com/wayland-transpositor/wprs";
|
||||
mainProgram = "wprs";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "tank";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
tank = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
compression = "zstd";
|
||||
};
|
||||
mountpoint = null;
|
||||
postCreateHook = "zfs snapshot -r tank@blank && zfs hold -r blank tank@blank";
|
||||
|
||||
datasets = {
|
||||
root = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/";
|
||||
};
|
||||
nix = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
persist = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/persist";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.profiles.base;
|
||||
in
|
||||
{
|
||||
options.modules.profiles.base = {
|
||||
enable = mkEnableOption "Base home-manager profile";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
modules = {
|
||||
# btop.enable = true;
|
||||
direnv.enable = true;
|
||||
fish.enable = true;
|
||||
# scripts.enable = true;
|
||||
|
||||
# Development
|
||||
# neovim.enable = true;
|
||||
|
||||
# Languages
|
||||
nix.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.profiles.gnome;
|
||||
in
|
||||
{
|
||||
options.modules.profiles.gnome = {
|
||||
enable = mkEnableOption "Graphical GNOME environment";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
firefox # TODO: Move to dediated module
|
||||
];
|
||||
|
||||
modules = {
|
||||
profiles.base.enable = true;
|
||||
|
||||
# Desktop environment
|
||||
desktop.gnome.enable = true;
|
||||
# desktop.tiling.enable = true;
|
||||
|
||||
# Browser
|
||||
# firefox = {
|
||||
# enable = true;
|
||||
# default = false;
|
||||
# };
|
||||
# qutebrowser = {
|
||||
# enable = true;
|
||||
# default = true;
|
||||
# };
|
||||
|
||||
# Tools
|
||||
# obsidian.enable = true;
|
||||
# zathura.enable = true;
|
||||
|
||||
# Development
|
||||
# neovim.enable = true;
|
||||
vscode.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.profiles.jan;
|
||||
in
|
||||
{
|
||||
options.modules.profiles.jan = {
|
||||
enable = mkEnableOption "Jan's personal profile";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
libreoffice-still
|
||||
remmina
|
||||
thunderbird
|
||||
signal-desktop
|
||||
prusa-slicer
|
||||
freecad-wayland
|
||||
inkscape
|
||||
ente-auth
|
||||
bitwarden
|
||||
carla
|
||||
winbox
|
||||
whatsapp-for-linux
|
||||
discord
|
||||
steam
|
||||
spotify
|
||||
# feishin # TODO: Fix or replace as insecure
|
||||
eduvpn-client
|
||||
river # TODO: Move
|
||||
ryubing
|
||||
bottles
|
||||
prismlauncher
|
||||
foliate
|
||||
wireshark
|
||||
];
|
||||
|
||||
modules = {
|
||||
profiles.gnome.enable = true;
|
||||
|
||||
# Gaming
|
||||
# retroarch.enable = true;
|
||||
# ryujinx.enable = true;
|
||||
|
||||
# Tools
|
||||
git = {
|
||||
enable = true;
|
||||
user = "Jan-Bulthuis";
|
||||
email = "git@bulthuis.dev";
|
||||
# TODO: Move
|
||||
ignores = [
|
||||
".envrc"
|
||||
".direnv"
|
||||
"flake.nix"
|
||||
"flake.lock"
|
||||
];
|
||||
};
|
||||
xpra = {
|
||||
enable = true;
|
||||
hosts = [
|
||||
"mixer@10.20.60.251"
|
||||
];
|
||||
};
|
||||
|
||||
# Development
|
||||
# docker.enable = true;
|
||||
# matlab.enable = true;
|
||||
mathematica.enable = true;
|
||||
|
||||
# Languages
|
||||
haskell.enable = false;
|
||||
js.enable = true;
|
||||
nix.enable = true;
|
||||
rust.enable = true;
|
||||
python.enable = true;
|
||||
cpp.enable = true;
|
||||
tex.enable = true;
|
||||
jupyter.enable = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
{
|
||||
mkModule,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.profiles.base;
|
||||
in
|
||||
{
|
||||
options.modules.profiles.base = {
|
||||
enable = mkEnableOption "base profile";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
modules = {
|
||||
bootloader.enable = mkDefault true;
|
||||
ssh.enable = mkDefault true;
|
||||
|
||||
# Setup sensible default persistent data
|
||||
impermanence.directories = [
|
||||
"/var/lib/nixos"
|
||||
];
|
||||
impermanence.files = [
|
||||
"/etc/shadow"
|
||||
];
|
||||
};
|
||||
|
||||
# Localization
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console.keyMap = "us";
|
||||
|
||||
# Enable neovim
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Enable the usage of flakes
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# Clean tmp
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
|
||||
# Base packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
wget
|
||||
curl
|
||||
dig
|
||||
procps
|
||||
wireguard-tools
|
||||
usbutils
|
||||
pciutils
|
||||
zip
|
||||
unzip
|
||||
tmux
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.profiles.desktop;
|
||||
in
|
||||
{
|
||||
options.modules.profiles.desktop = {
|
||||
enable = mkEnableOption "desktop profile";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
modules = {
|
||||
profiles.base.enable = mkDefault true;
|
||||
fonts.enable = mkDefault true;
|
||||
graphics.enable = mkDefault true;
|
||||
gnome.enable = mkDefault true; # TODO: Rename to display manager?
|
||||
networkmanager.enable = mkDefault true;
|
||||
printing.enable = mkDefault true;
|
||||
sound.enable = mkDefault true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.profiles.laptop;
|
||||
in
|
||||
{
|
||||
options.modules.profiles.laptop = {
|
||||
enable = mkEnableOption "laptop profile";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Setup modules
|
||||
modules = {
|
||||
profiles.desktop.enable = mkDefault true;
|
||||
bluetooth.enable = mkDefault true;
|
||||
power-saving.enable = mkDefault true;
|
||||
};
|
||||
|
||||
# Add packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
brightnessctl
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
{
|
||||
mkModule,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.profiles.vm;
|
||||
in
|
||||
{
|
||||
options.modules.profiles.vm = {
|
||||
enable = mkEnableOption "Base VM profile";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Enabled modules
|
||||
modules = {
|
||||
profiles.base.enable = true;
|
||||
disko = {
|
||||
enable = true;
|
||||
profile = "vm";
|
||||
};
|
||||
impermanence = {
|
||||
enable = true;
|
||||
resetScript = ''
|
||||
# Revert to the blank state for the root directory
|
||||
zfs rollback -r tank/root@blank
|
||||
'';
|
||||
};
|
||||
ssh.enable = true;
|
||||
};
|
||||
|
||||
# Admin users
|
||||
users.users.local = {
|
||||
initialPassword = "local";
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 jan@bulthuis.dev"
|
||||
];
|
||||
};
|
||||
|
||||
# Enable qemu guest agent
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
# Machine platform
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
# Set hostid for ZFS
|
||||
networking.hostId = "deadbeef";
|
||||
|
||||
# Hardware configuration
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
# Swapfile
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 6 * 1024;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
imports = [
|
||||
./shell.nix
|
||||
./languages/python.nix
|
||||
./languages/rust.nix
|
||||
./utilities/cuda.nix
|
||||
./utilities/jupyter.nix
|
||||
];
|
||||
in
|
||||
{
|
||||
|
||||
mkShell =
|
||||
attrs:
|
||||
(flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
evaluated =
|
||||
(nixpkgs.lib.evalModules {
|
||||
modules = [ attrs ] ++ imports;
|
||||
specialArgs = {
|
||||
pkgs = pkgs;
|
||||
};
|
||||
}).config;
|
||||
recUpdate = nixpkgs.lib.recursiveUpdate;
|
||||
libPackages = evaluated.libPackages pkgs;
|
||||
shell = recUpdate {
|
||||
env =
|
||||
evaluated.env
|
||||
// (
|
||||
if (libPackages != [ ]) then
|
||||
{
|
||||
LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath libPackages;
|
||||
}
|
||||
else
|
||||
{ }
|
||||
);
|
||||
packages = evaluated.packages ++ (evaluated.extraPackages pkgs) ++ libPackages;
|
||||
} evaluated.override;
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell shell;
|
||||
}
|
||||
));
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
packages = config.python.packages;
|
||||
pythonPackage = pkgs.python3.withPackages packages;
|
||||
in
|
||||
{
|
||||
options.python = {
|
||||
enable = mkEnableOption "Python";
|
||||
packages = mkOption {
|
||||
type = types.functionTo (types.listOf types.package) // {
|
||||
merge =
|
||||
loc: defs: p:
|
||||
lib.concatMap (def: (def.value p)) defs;
|
||||
};
|
||||
default = p: [ ];
|
||||
description = "Python packages to install";
|
||||
};
|
||||
# TODO: Add option to directly read from requirements.txt, maybe with mach-nix
|
||||
};
|
||||
|
||||
config = mkIf config.python.enable {
|
||||
packages = [
|
||||
pythonPackage
|
||||
];
|
||||
|
||||
env.PYTHONINTERPRETER = "${pythonPackage}/bin/python";
|
||||
};
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
rustPackage = pkgs.rustc;
|
||||
in
|
||||
{
|
||||
options.rust = {
|
||||
enable = mkEnableOption "Rust";
|
||||
# TODO: Add option to specify toolchain file
|
||||
# See https://ayats.org/blog/nix-rustup
|
||||
};
|
||||
|
||||
config = mkIf config.rust.enable {
|
||||
packages = with pkgs; [
|
||||
rustPackage
|
||||
cargo
|
||||
clippy
|
||||
rustfmt
|
||||
cargo-audit
|
||||
|
||||
bacon
|
||||
evcxr
|
||||
|
||||
# TODO: Might be needed for bindgen
|
||||
# rustPlatform.bindgenHook
|
||||
# pkg-config
|
||||
];
|
||||
|
||||
# env.RUST_SRC_PATH = "${rustPackage}/lib/rustlib/src/rust/library";
|
||||
};
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
env = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
description = "Packages to install";
|
||||
};
|
||||
|
||||
extraPackages = mkOption {
|
||||
type = types.functionTo (types.listOf types.package) // {
|
||||
merge =
|
||||
loc: defs: p:
|
||||
lib.concatMap (def: (def.value p)) defs;
|
||||
};
|
||||
default = p: [ ];
|
||||
description = "Extra packages to install";
|
||||
};
|
||||
|
||||
libPackages = mkOption {
|
||||
type = types.functionTo (types.listOf types.package) // {
|
||||
merge =
|
||||
loc: defs: p:
|
||||
lib.concatMap (def: (def.value p)) defs;
|
||||
};
|
||||
default = p: [ ];
|
||||
description = "Packages to install and add to library path";
|
||||
};
|
||||
|
||||
override = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
description = "Settings in the mkShell call to override";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
{
|
||||
options.cuda = {
|
||||
enable = mkEnableOption "CUDA";
|
||||
};
|
||||
|
||||
config = mkIf config.cuda.enable {
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
{
|
||||
options.jupyter = {
|
||||
enable = mkEnableOption "Jupyter";
|
||||
};
|
||||
|
||||
config = mkIf config.jupyter.enable {
|
||||
python.enable = mkDefault true;
|
||||
python.packages =
|
||||
p: with p; [
|
||||
jupyter
|
||||
notebook
|
||||
ipykernel
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.bluetuith;
|
||||
in
|
||||
{
|
||||
options.modules.bluetuith = {
|
||||
enable = mkEnableOption "bluetuith";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ bluetuith ];
|
||||
|
||||
# Add nix tree
|
||||
xdg.desktopEntries.bluetuith = {
|
||||
exec = "${pkgs.bluetuith}/bin/bluetuith";
|
||||
name = "Bluetuith";
|
||||
terminal = true;
|
||||
type = "Application";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
{
|
||||
imports = [
|
||||
./firefox/default.nix
|
||||
./qutebrowser/default.nix
|
||||
];
|
||||
|
||||
options.default.browser = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = "Default browser";
|
||||
};
|
||||
|
||||
config = {
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
|
||||
defaultApplications = {
|
||||
"text/html" = "${config.default.browser}";
|
||||
"x-scheme-handler/http" = "${config.default.browser}";
|
||||
"x-scheme-handler/https" = "${config.default.browser}";
|
||||
"x-scheme-handler/about" = "${config.default.browser}";
|
||||
"x-scheme-handler/unknown" = "${config.default.browser}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.firefox;
|
||||
in
|
||||
{
|
||||
options.modules.firefox = {
|
||||
enable = lib.mkEnableOption "firefox";
|
||||
default = lib.mkEnableOption "default";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
default.browser = mkIf cfg.default "firefox.desktop";
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
policies = {
|
||||
AppAutoUpdate = false;
|
||||
BlockAboutAddons = false;
|
||||
BlockAboutConfig = true;
|
||||
BlockAboutProfiles = true;
|
||||
DisableAppUpdate = true;
|
||||
DisableFeedbackCommands = true;
|
||||
DisableMasterPasswordCreation = true;
|
||||
DisablePocket = true;
|
||||
DisableProfileImport = true;
|
||||
DisableProfileRefresh = true;
|
||||
DisableSetDesktopBackground = true;
|
||||
DisableTelemetry = true;
|
||||
DisplayBookmarksToolbar = "never";
|
||||
DisplayMenuBar = "never";
|
||||
DNSOverHTTPS = {
|
||||
Enabled = false;
|
||||
};
|
||||
DontCheckDefaultBrowser = true;
|
||||
PasswordManagerEnabled = false;
|
||||
TranslateEnabled = true;
|
||||
UseSystemPrintDialog = true;
|
||||
};
|
||||
|
||||
profiles.nixos = {
|
||||
search.default = "ddg";
|
||||
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
];
|
||||
|
||||
# Theming
|
||||
userChrome = readFile (
|
||||
pkgs.substituteAll {
|
||||
src = ./userChrome.css;
|
||||
colors = config.desktop.theming.colorsCSS;
|
||||
}
|
||||
);
|
||||
|
||||
settings = {
|
||||
"browser.tabs.inTitlebar" = 0;
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"devtools.chrome.enabled" = true;
|
||||
"devtools.debugger.remote-enabled" = true;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
};
|
||||
|
||||
# Force overwriting configuration file
|
||||
search.force = true;
|
||||
containersForce = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loaded 100 of 174 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user