Compare commits

...

107 Commits

Author SHA1 Message Date
9ed92a3f91 removed need for rec 2024-02-16 17:48:28 +01:00
28ba8e57bc updated syntax 2024-02-16 17:45:51 +01:00
ae6da0ecc4 made option to set obs autostart behaviour 2024-02-16 17:41:53 +01:00
ae4462d98f made obx-studio autostart and started libs 2024-02-15 21:17:48 +01:00
b0c1be575b changed colour theme and extentions 2024-02-13 21:50:18 +01:00
4f1f1dfa77 added spicetify 2024-02-13 20:56:12 +01:00
a7b7f92d94 updated mimetypes 2024-02-12 15:30:17 +01:00
fae38b30e1 changed image viewer 2024-02-10 13:09:59 +01:00
e1c6428218 Set Mic Mute Keybind 2024-02-08 13:20:42 +01:00
a2f5757a36 Added easyeffects 2024-02-06 23:09:55 +01:00
8b67965f22 formatting 2024-02-06 20:37:18 +01:00
71dffa98ad updated inputs 2024-02-06 19:53:42 +01:00
5dfaa1d593 moved alias to bash module 2024-02-06 16:13:57 +01:00
9da8bbeb37 (re)moved comments 2024-02-06 15:52:02 +01:00
d7d2a131aa nixpkgs followes to remove dependencies 2024-02-06 15:26:29 +01:00
489e53b3ca Updated Flake
* Replaced VSCode with VSCodium
* Added own Overlays
* Added PrismLauncher
2024-02-06 13:23:36 +01:00
2b7235f3e6 Installed PolyMC
Appimage because the official Flake did not work
2024-02-05 22:16:29 +01:00
3266df0ae9 Added Scanned Image Extractor Application 2024-02-03 17:39:57 +01:00
541a9e9d7b updated story architect another time 2024-01-25 18:34:42 +01:00
6149734aa3 updated starc version 2024-01-25 16:24:16 +01:00
9a2ff5baf8 new version of Story Architect 2024-01-25 13:57:25 +01:00
23a3c153f5 added Story Architect Package 2024-01-25 13:09:27 +01:00
cb97b5c09c added mullvad-vpn client 2024-01-09 14:34:00 +01:00
e1f9112222 added java development tools 2024-01-08 23:33:47 +01:00
fae62232cc added onlyoffice 2024-01-08 18:59:37 +01:00
dcf00b71fe added the lutris game launcher 2023-12-28 20:45:53 +01:00
409eb0e4d9 use zig and zls from path 2023-12-11 21:45:34 +01:00
168460efff added zig and zls to vscode 2023-12-11 15:39:00 +01:00
85ff8412a7 gnome wornspaces only on primary monitor 2023-12-09 15:45:35 +01:00
f26f739f29 added modmanager for risk of rain 2 2023-12-06 18:30:44 +01:00
5be09f440a installed typst typesetting program 2023-12-06 17:30:01 +01:00
254ae35c72 updated to 23.11 2023-12-03 21:06:22 +01:00
6eff12ec36 added inkscape 2023-11-29 09:52:25 +01:00
30c4ee388f added wireshark 2023-11-22 13:18:22 +01:00
bb14d0ed56 added obsidian 2023-11-09 10:41:37 +01:00
229804be02 added audio production plugins 2023-11-07 23:24:27 +01:00
625b1d0249 added bottles for windows applications 2023-11-07 21:52:43 +01:00
9fe61160a8 added firefox extension 2023-11-07 21:52:03 +01:00
38a7200862 added rustdesk for remote assistance 2023-11-07 21:51:42 +01:00
eb85c39a96 added plugins for music production 2023-11-07 15:11:32 +01:00
8809d6a5d4 added digital audio workstation 2023-11-05 22:03:18 +01:00
71d0c7a202 added spotify 2023-11-05 13:13:46 +01:00
8a352b287f added university vpn 2023-11-04 14:43:46 +01:00
a7bb2b53f9 removed unused package 2023-10-29 18:26:30 +01:00
49c0c5fcc3 removed easyeffects 2023-10-28 22:41:34 +02:00
62d2fd6779 added easyeffects
this is an application that adds effects to pipewire applications
2023-10-28 22:26:21 +02:00
a463dec994 added vpn client for university 2023-10-24 11:35:45 +02:00
052499525b deactivated copilot for cpp files for uni coding exercises 2023-10-15 16:03:22 +02:00
9945f74cfa set c++ formatting style 2023-10-15 15:31:39 +02:00
659efbcb3e added and configured c/cpp extension and removed extensionr ecommendations 2023-10-15 15:05:56 +02:00
9cc53818e3 added autopep8 extension and fixed toml config 2023-10-15 14:44:31 +02:00
f7b84c1de6 removed onlyoffice
This is because it cannot find nix installed fonts but libreoffice can and replaces it now
2023-10-08 13:58:22 +02:00
3beca553a2 added libre office
This is because onlyoffice can't see nix installed fonts.
2023-10-08 13:06:10 +02:00
175171a3c1 replaced extension 2023-09-30 19:02:04 +02:00
05d4fb2cf1 Added GLSL Lint VSCode Extension 2023-09-30 18:42:46 +02:00
4f064d5451 removed zig and formatted 2023-09-30 16:16:07 +02:00
9e10776439 removed unneeded extension 2023-09-26 20:09:13 +02:00
6111707cc0 added zig extension and language server 2023-09-26 20:06:18 +02:00
23179e6e92 added german dictionary to vscode 2023-09-26 19:54:28 +02:00
5384754f60 added vscode extensions flake to allow for more extensions 2023-09-26 19:49:02 +02:00
4ccbc6e5bf removed weather. did not work 2023-09-25 20:15:27 +02:00
ea4d8c172d updated .gitignore 2023-09-25 20:15:18 +02:00
53832e7687 updated README 2023-09-25 20:15:08 +02:00
d26d2d5116 updated README 2023-09-25 20:09:24 +02:00
a2cd8d467f restructured
* laptop, pc and common now live in systems
* new dev shell to run dconf2nix
* New dconf weather entry (currently not functional)
2023-09-25 20:02:11 +02:00
de46bcead1 enabled file previews on network shares 2023-09-25 14:18:49 +02:00
331c1b5d81 removed unneeded 'config' 2023-09-25 01:29:53 +02:00
98730fbfee added comma via nix-index 2023-09-25 01:21:12 +02:00
3ec72fc172 changed structure to accommodate laptop 2023-09-22 22:13:46 +02:00
bd4a1763b4 added mpv keybinds 2023-09-21 16:21:24 +02:00
d08b631304 updated documentation 2023-09-18 17:05:23 +02:00
94f214ef12 added instructions 2023-09-18 15:50:16 +02:00
6411e64da0 added syncthing and flakes support 2023-09-18 15:30:35 +02:00
c7a3adabed updated inputs 2023-09-17 20:48:16 +02:00
3c75b4cb93 added spell checker for vscode 2023-09-13 21:55:05 +02:00
6494828356 Added DeArrow Firefox Extension 2023-09-10 15:17:11 +02:00
4cf04fe0f7 updated cache time 2023-09-07 16:30:20 +02:00
0f095e1996 use gpg for ssh 2023-09-07 03:05:30 +02:00
73df7f722f Added auto-cpufreq 2023-09-06 17:59:23 +02:00
6eb397d3f4 Changed time how long the agent should retain passwords. 2023-09-05 20:03:03 +02:00
2dc5b77471 Removed Minimap 2023-09-05 19:56:19 +02:00
77eb2ce7fb added cached nix package index for comma 2023-09-05 18:39:00 +02:00
42abc2a62e formatting 2023-09-04 23:56:05 +02:00
a53756452f added automatic git signing 2023-09-04 23:53:54 +02:00
c31759fc5e proper punctuation 2023-09-04 22:51:08 +02:00
78aab93bb3 added comment 2023-09-04 22:50:43 +02:00
c8a62320b9 added gpg 2023-09-04 22:46:32 +02:00
df0af41033 added IPTV client (needs more fonts) 2023-09-03 23:40:50 +02:00
6a6f369e29 changed notification settings for espresso 2023-09-02 22:05:15 +02:00
d0632a4fba modified pano clipboard manager 2023-09-02 18:53:03 +02:00
839c1bed3b removed new line 2023-09-02 17:16:59 +02:00
6ebcd46468 Changed line to since user and hostname are unneeded information 2023-09-01 13:15:58 +02:00
cf1bce3de6 changed since usernames math anyway 2023-08-31 15:00:54 +02:00
cf9b2896e0 alias for per device home-manager swithing 2023-08-31 14:59:22 +02:00
9e1438f949 moved to common config 2023-08-31 14:52:33 +02:00
e0512196de added bash text line 2023-08-31 14:51:06 +02:00
70d894da26 changed bash line 2023-08-30 22:51:38 +02:00
402245c8ee updated inputs 2023-08-30 15:02:41 +02:00
6cf91542a2 fixed declaring modules twice 2023-08-27 21:20:47 +02:00
6113c8891e seperated main PC and Laptop without NixOS 2023-08-27 21:17:36 +02:00
49a621b985 only incude fonts that i want to use 2023-08-27 20:19:50 +02:00
d12bbd3787 removed old clipboard manager 2023-08-27 00:32:02 +02:00
1c2fa46bce restructured and added font 2023-08-27 00:27:36 +02:00
91adefc48e added unfree applications explicitely 2023-08-26 18:49:08 +02:00
0444229bb0 changed structure 2023-08-26 18:35:30 +02:00
b49e4656f2 added pano gnome extension 2023-08-26 17:42:56 +02:00
f80ae52d95 added master version of davinci resolve 2023-08-25 17:51:31 +02:00
41 changed files with 1175 additions and 505 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/.direnv/
/dconf.nix

85
README.md Normal file
View File

@ -0,0 +1,85 @@
# Home Manager Config
## Systems
Current available systems are:
* `pc`
My workstation PC running NixOS.
* `laptop`
My laptop, a Thinkpad X1 Carbon Gen 7, also running NixOS.
After
## dconf
It is possible to observe live changes to dconf via `dconf watch /`.
If you want to convert the current dconf to a nix expression enter the dev shell with `nix develop` and do
```txt
dconf dump / | dconf2nix > dconf.nix
```
Build with
```txt
home-manager switch --flake .#[configuration]
```
After first deployment it suffices to do `hms` for `home-manager switch ...`.
This relies on the flake being saved to `$HOME/.config/home-manager`.
## Laptop
Specific instructions for the `Lenovo Thinkpad Yoga C13 (Morphius)`
Install Mr.Chromebox's [Firmware Utility Script](https://mrchromebox.tech/#fwscript).
Download [Fedora Workstation](https://www.fedoraproject.org/en/workstation/download).
Boot the Live USB in `minimal graphics mode`.
Install like usual but before restarting do edit the machine's kernel boot params like so:
```txt
sudo nano /mnt/sysroot/etc/default/grub
```
Add `iommu=pt` to `GRUB_CMDLINE_LINUX`.
Example:
```txt
GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-6ee676a5-8f57-4400-bde6-2f5ff7c1260d nomodeset rhgb iommu=pt quiet"
```
Disable SELinux, as Nix does not work with it enabled
```txt
sudo nano /etc/selinux/config
```
and change `SELINUX=enforcing` to `SELINUX=permissive`
Resize the `/tmp` directory to allow for building large packages like `nerdfonts`
```txt
mount -o remount,size=25G /tmp
systemctl daemon-reload
```
Download the current home-manager config from <https://git.krsnik.at/Kristian/home-manager>.
```txt
cd home-manager
nix shell nixpkgs#home-manager --extra-experimental-features "nix-command flakes"
home-manager switch --flake .#laptop --extra-experimental-features "nix-command flakes"
```
Configure the following:
* syncthing
* gpg
In case ssh does not work work do
```txt
gpgconf --kill gpg-agent
```

379
flake.lock generated
View File

@ -1,13 +1,29 @@
{
"nodes": {
"appimage-runtime": {
"flake": false,
"locked": {
"lastModified": 1652289700,
"narHash": "sha256-uxQBDy/JA7uEboTOUmGaZ2FAKY/0dQ9c0A0N8+J+a7I=",
"owner": "AppImageCrafters",
"repo": "appimage-runtime",
"rev": "6500a1ef68e039caba2ebab1c7ed74c2ea9e67a5",
"type": "github"
},
"original": {
"owner": "AppImageCrafters",
"repo": "appimage-runtime",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
@ -32,13 +48,29 @@
"type": "github"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"type": "github"
},
"original": {
@ -48,12 +80,48 @@
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
@ -91,48 +159,74 @@
]
},
"locked": {
"lastModified": 1692099905,
"narHash": "sha256-/pSusGhmIdSdAaywQRFA5dVbfdIzlWQTecM+E46+cJ0=",
"lastModified": 1706981411,
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2a6679aa9cc3872c29ba2a57fe1b71b3e3c5649f",
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
},
"nix-appimage": {
"inputs": {
"appimage-runtime": "appimage-runtime",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2",
"squashfuse": "squashfuse"
},
"locked": {
"lastModified": 1695276866,
"narHash": "sha256-/BBbYIoDhIPcVwhvau/g4lzrjTnudeRLW5qaTu7LAVs=",
"owner": "ralismark",
"repo": "nix-appimage",
"rev": "17dd6001ec228ea0b8505d6904fc5796d3de5012",
"type": "github"
},
"original": {
"owner": "ralismark",
"repo": "nix-appimage",
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1707016097,
"narHash": "sha256-V4lHr6hFQ3rK650dh64Xffxsf4kse9vUYWsM+ldjkco=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "3e3dad2808379c522138e2e8b0eb73500721a237",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "nix-index-database",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1692794066,
"narHash": "sha256-H0aG8r16dj0x/Wz6wQhQxc9V7AsObOiHPaKxQgH6Y08=",
"lastModified": 1707091808,
"narHash": "sha256-LahKBAfGbY836gtpVNnWwBTIzN7yf/uYM/S0g393r0Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fc944919f743bb22379dddf18dcb72db6cff84aa",
"rev": "9f2ee8c91ac42da3ae6c6a1d21555f283458247e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-master": {
"locked": {
"lastModified": 1692973538,
"narHash": "sha256-BgwQ9LhSj8bRPlU4WVD9+q2dkQsWTD4ampHADbr2I20=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9be946f3129e3aec29ff84d3b0230cf6014cdd9c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
@ -153,61 +247,28 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1692734709,
"narHash": "sha256-SCFnyHCyYjwEmgUsHDDuU0TsbVMKeU1vwkR+r7uS2Rg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b85ed9dcbf187b909ef7964774f8847d554fab3b",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1675309347,
"narHash": "sha256-D3CQ6HRDT2m3XJlrzb5jKq4vNFR5xFTEFKC7iSjlFpM=",
"lastModified": 1659526864,
"narHash": "sha256-XFzXrc1+6DZb9hBgHfEzfwylPUSqVFJbQPs8eOgYufU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "006c3bd4dd2f5d1d2094047f307cbf9e2b73d9c5",
"rev": "478f3cbc8448b5852539d785fbfe9a53304133be",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1689088367,
"narHash": "sha256-Y2tl2TlKCWEHrOeM9ivjCLlRAKH3qoPUE/emhZECU14=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5c9ddb86679c400d6b7360797b8a22167c2053f8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
"id": "nixpkgs",
"ref": "nixos-22.05",
"type": "indirect"
}
},
"nur": {
"locked": {
"lastModified": 1692971158,
"narHash": "sha256-1dZ9WJaPs1lCnRRctDgKwOXIn/t+UaiwxwcVksFXwzQ=",
"lastModified": 1707245063,
"narHash": "sha256-1E7kPslBZpGTmz7UTR/HnpCy8Rfc4Kv/njBiTTF1G2g=",
"owner": "nix-community",
"repo": "NUR",
"rev": "ee2675bab6f3120ada6671204e9eca40da2fb180",
"rev": "cd11db9649316bcd231a6ab9c677284ee0d8c184",
"type": "github"
},
"original": {
@ -218,7 +279,7 @@
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_3",
"flake-utils": [
"wallpaper",
"flake-utils"
@ -247,18 +308,152 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur",
"wallpaper": "wallpaper",
"zig": "zig"
"scanned-image-extractor": "scanned-image-extractor",
"spicetify": "spicetify",
"starc": "starc",
"vscode-extensions": "vscode-extensions",
"wallpaper": "wallpaper"
}
},
"scanned-image-extractor": {
"inputs": {
"nix-appimage": "nix-appimage",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1707220285,
"narHash": "sha256-JWXtWnw07xLTPeE51eiNS3MeMltP11DiS5cYsT1r1Tc=",
"ref": "refs/heads/main",
"rev": "846a94c50f089cafe49903ce6e157fe714520a8a",
"revCount": 11,
"type": "git",
"url": "https://git.krsnik.at/Kristian/scanned-image-extractor.git"
},
"original": {
"type": "git",
"url": "https://git.krsnik.at/Kristian/scanned-image-extractor.git"
}
},
"spicetify": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1704167711,
"narHash": "sha256-kFDq+kf/Di/P8bq5sUP8pVwRkrSVrABksBjMPmLic3s=",
"owner": "the-argus",
"repo": "spicetify-nix",
"rev": "1325416f951d6a82cfddb1289864ad782e2b87c4",
"type": "github"
},
"original": {
"owner": "the-argus",
"repo": "spicetify-nix",
"type": "github"
}
},
"squashfuse": {
"flake": false,
"locked": {
"lastModified": 1655253282,
"narHash": "sha256-RIhDXzpmrYUOwj5OYzjWKJw0cwE+L3t/9pIkg/hFXA0=",
"owner": "vasi",
"repo": "squashfuse",
"rev": "d1d7ddafb765098b34239eacaf2f9abee1fbc27c",
"type": "github"
},
"original": {
"owner": "vasi",
"repo": "squashfuse",
"type": "github"
}
},
"starc": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1707220280,
"narHash": "sha256-VBgd9wOebW7RWym52434Mgz5w2k1csgw35JAe28Buvs=",
"ref": "refs/heads/main",
"rev": "5586cecb4f76dea16f38b2c0678904edbcfb191b",
"revCount": 18,
"type": "git",
"url": "https://git.krsnik.at/Kristian/starc-flake.git"
},
"original": {
"type": "git",
"url": "https://git.krsnik.at/Kristian/starc-flake.git"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"vscode-extensions": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1707182119,
"narHash": "sha256-Egt1PmjNAbx2nS0h/iWpaTCcOzLPHpRXzTJBt3waEAs=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "4e7767c214364217e0a7611dca3f3420555ceb20",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"type": "github"
}
},
"wallpaper": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2",
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
@ -274,26 +469,6 @@
"repo": "nix-wallpaper",
"type": "github"
}
},
"zig": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1692971964,
"narHash": "sha256-fvswEIz5R1jiuVHEII655I8PcNz/L+ED11YEZl0pqS0=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "d4ce4f679e360c87303075c1ff3e8496e9702348",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"type": "github"
}
}
},
"root": "root",

138
flake.nix
View File

@ -2,73 +2,137 @@
description = "Home Manager configuration of kristian";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
# nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# nixpkgs-master.url = "github:nixos/nixpkgs/master";
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nix User Repository
nur.url = "github:nix-community/NUR";
nur = {
url = "github:nix-community/NUR";
};
# Zig
zig.url = "github:mitchellh/zig-overlay";
wallpaper = {
url = "github:lunik1/nix-wallpaper";
inputs.nixpkgs.follows = "nixpkgs";
};
# Wallpaper
wallpaper.url = "github:lunik1/nix-wallpaper";
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs";
};
spicetify = {
url = "github:the-argus/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
starc = {
url = "git+https://git.krsnik.at/Kristian/starc-flake.git";
inputs.nixpkgs.follows = "nixpkgs";
};
scanned-image-extractor = {
url = "git+https://git.krsnik.at/Kristian/scanned-image-extractor.git";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
nixpkgs-master,
# nixpkgs-unstable,
# nixpkgs-master,
home-manager,
nur,
zig,
wallpaper,
nix-index-database,
vscode-extensions,
spicetify,
starc,
scanned-image-extractor,
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
formatter.${system} = pkgs.alejandra;
homeConfigurations = {
kristian = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home
homeConfigurations = let
commonModules = [
./systems/common
{
_module.args.wallpaper = wallpaper.packages.${system}.default;
_module.args = {
inherit spicetify;
wallpaper = wallpaper.packages.${system}.default;
libs = import ./libs;
};
}
spicetify.homeManagerModule
nur.nixosModules.nur
nix-index-database.hmModules.nix-index
{
programs.nix-index-database.comma.enable = true;
}
{
nixpkgs.overlays = [
zig.overlays.default # Adds zig
( # https://github.com/nix-community/home-manager/issues/1538#issuecomment-706627100
final: prev: {
unstable = import nixpkgs-unstable {
system = final.system;
config.allowUnfreePredicate = _: true;
};
master = import nixpkgs-master {
system = final.system;
config.allowUnfreePredicate = _: true;
};
}
)
( # Overrides davinci-resolve with the unstable version because of https://github.com/NixOS/nixpkgs/pull/246074
final: prev: {davinci-resolve = final.unstable.davinci-resolve;}
)
vscode-extensions.overlays.default
starc.overlays.default
scanned-image-extractor.overlays.default
# ( # https://github.com/nix-community/home-manager/issues/1538#issuecomment-706627100
# final: prev: {
# unstable = import nixpkgs-unstable {
# system = final.system;
# config.allowUnfreePredicate = _: true;
# };
# master = import nixpkgs-master {
# system = final.system;
# config.allowUnfreePredicate = _: true;
# };
# }
# )
];
}
];
in {
pc = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules =
[
./systems/pc
]
++ commonModules;
};
laptop = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules =
[
./systems/laptop
]
++ commonModules;
};
};
devShells.${system}.default = pkgs.mkShellNoCC {
packages = [
pkgs.dconf2nix
];
};
};
}

View File

@ -1,8 +0,0 @@
{enable}: {
inherit enable;
shellAliases = {
ll = "ls -lh";
la = "ls -lah";
".." = "cd ..";
};
}

View File

@ -1,77 +0,0 @@
{
config,
pkgs,
lib,
options,
specialArgs,
modulesPath,
wallpaper,
}: {
nixpkgs.config.allowUnfreePredicate = _: true;
home.stateVersion = "23.05";
home.username = "kristian";
home.homeDirectory = "/home/kristian";
home.sessionVariables = {
# Electron programms won't render correctly under wayland without this
NIXOS_OZONE_WL = 1;
};
# TODO: Change for Laptop
targets.genericLinux.enable = false; # Enable on non-nixos ditros
# Keyboard Layout
home.keyboard.layout = "at"; # NOTE: Set by Hyprland config
# Programs (additional programs)
home.packages = import ./packages.nix {inherit pkgs;};
# Services
services = {
copyq.enable = true;
};
# Programs
programs = {
home-manager.enable = true; # Allow home-manager to manage itself
mpv.enable = true;
obs-studio.enable = true;
yt-dlp.enable = true;
bash = import ./bash.nix {enable = true;};
vscode = import ./vscode.nix {
enable = true;
inherit pkgs;
};
direnv = import ./direnv.nix {enable = true;};
git = import ./git.nix {enable = true;};
thunderbird = import ./thunderbird.nix {enable = true;};
neovim = import ./nvim {
enable = true;
inherit pkgs;
};
firefox = import ./firefox.nix {
enable = true;
nur = config.nur;
};
};
xdg.mimeApps = {
enable = true;
defaultApplications = {
"image/png" = ["org.gnome.eog.desktop"];
"image/jpeg" = ["org.gnome.eog.desktop"];
"video/webm" = ["mpv.desktop"];
"application/pdf" = ["org.gnome.Evince.desktop"];
};
};
# Gnome settings
dconf.settings = import ./gnome.nix {
inherit lib;
inherit wallpaper;
};
}

View File

@ -1,5 +0,0 @@
{enable}: {
inherit enable;
nix-direnv.enable = enable;
enableBashIntegration = true;
}

View File

@ -1,24 +0,0 @@
{
nur,
enable,
}: {
inherit enable;
profiles.kristian = {
isDefault = true;
search.default = "DuckDuckGo";
search.force = true;
extensions = builtins.attrValues {
inherit
(nur.repos.rycee.firefox-addons)
ublock-origin
umatrix
sponsorblock
sidebery
;
};
settings = {
"extensions.pocket.enabled" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
};
}

View File

@ -1,6 +0,0 @@
{enable}: {
inherit enable;
userName = "Kristian Krsnik";
userEmail = "git@krsnik.at";
extraConfig = {init.defaultBranch = "main";};
}

View File

@ -1,71 +0,0 @@
{
lib,
wallpaper,
}: {
# Use `dconf watch /` to track stateful changes you are doing, then set them here.
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-theme = "Adwaita-dark";
};
"org/gnome/desktop/background" = let
width = 3840;
height = 2160;
in {
picture-uri = "file://${wallpaper.override {
preset = "nord-snow-aurora";
inherit width;
inherit height;
}}/share/wallpapers/nixos-wallpaper.png";
picture-uri-dark = "file://${wallpaper.override {
preset = "nord-night-aurora";
inherit width;
inherit height;
}}/share/wallpapers/nixos-wallpaper.png";
};
"org/gnome/desktop/wm/keybindings" = {
switch-to-workspace-left = ["<Alt>1"];
switch-to-workspace-right = ["<Alt>2"];
move-to-workspace-left = ["<Shift><Alt>1"];
move-to-workspace-right = ["<Shift><Alt>2"];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Shift><Alt>a";
command = "kgx";
name = "Console";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Shift><Alt>f";
command = "nautilus";
name = "File Manager";
};
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
];
};
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "nothing"; # Automatic suspend/hibernation creates a suspend/hibernation loop
power-button-action = "suspend";
};
"org/gnome/mutter" = {
edge-tiling = true;
dynamic-workspaces = true;
};
"org/gnome/Console" = {
theme = "auto";
};
"org/gnome/simple-scan" = {
text-dpi = 300;
};
"org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = [
"quick-settings-audio-panel@rayzeq.github.io"
"places-menu@gnome-shell-extensions.gcampax.github.com"
"launch-new-instance@gnome-shell-extensions.gcampax.github.com"
"trayIconsReloaded@selfmade.pl"
"espresso@coadmunkee.github.com"
];
};
}

View File

@ -1,59 +0,0 @@
{
pkgs,
enable,
}: {
inherit enable;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
plugins = builtins.attrValues ({
inherit
(pkgs.vimPlugins)
telescope-nvim # fuzzy finder
tokyonight-nvim # theme
undotree # undotree
vim-fugitive # git integration
nvim-treesitter # syntax highlighting
# Autocomplete and LSP
nvim-lspconfig
nvim-cmp
cmp-nvim-lsp
luasnip
;
}
// {
# Parsers for syntax highlighting
inherit
(pkgs.vimPlugins.nvim-treesitter-parsers)
nix
zig
python
vim
vimdoc
markdown
dockerfile
yaml
json
toml
lua
c
glsl
bash
;
});
extraPackages = [pkgs.nodePackages.pyright];
extraLuaConfig =
builtins.readFile ./keybinds.lua
+ builtins.readFile ./colors.lua
+ builtins.readFile ./undotree.lua
+ builtins.readFile ./fugitive.lua
+ builtins.readFile ./treesitter.lua
+ builtins.readFile ./telescope.lua
+ builtins.readFile ./cmp.lua
+ builtins.readFile ./lspconfig.lua;
extraConfig = "set number relativenumber";
}

View File

@ -1,38 +0,0 @@
{pkgs}:
with pkgs; [
# Basic utils
unzip
magic-wormhole
# Important graphical applications
keepassxc
logseq
xournalpp
onlyoffice-bin
# Communication
webcord
telegram-desktop
signal-desktop
element-desktop
# image editor
gimp
davinci-resolve
# games
osu-lazer
# Misc
nerdfonts # Font with glyphs for status bar
comma # Run any binary from the repos with a comma `, cowsay neato`
# Gnome extension
gnomeExtensions.quick-settings-audio-panel
gnomeExtensions.tray-icons-reloaded
gnomeExtensions.espresso
gnome-decoder
tor-browser-bundle-bin
]

View File

@ -1,6 +0,0 @@
{enable}: {
inherit enable;
profiles.kristian = {
isDefault = true;
};
}

View File

@ -1,64 +0,0 @@
{
enable,
pkgs,
}: {
inherit enable;
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
keybindings = [
{
key = "alt+a";
command = "editor.action.commentLine";
when = "editorTextFocus && !editorReadonly";
}
];
extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
arrterian.nix-env-selector
mkhl.direnv
ms-python.python
ms-python.vscode-pylance
james-yu.latex-workshop
github.copilot
davidanson.vscode-markdownlint
tamasfe.even-better-toml
asciidoctor.asciidoctor-vscode
];
userSettings = {
"window.menuBarVisibility" = "hidden";
"[nix]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
};
"[python]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[latex]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
};
"[toml]" = {
"editor.formatOnSave" = true;
"editor.modificationsIfAvailable" = "file";
};
"python.formatting.autopep8Path" = "${pkgs.python311Packages.autopep8}/bin/autopep8";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nil}/bin/nil";
"nix.serverSettings" = {
nil = {
formatting = {command = ["${pkgs.alejandra}/bin/alejandra"];};
};
};
"direnv.path.executable" = "${pkgs.direnv}/bin/direnv";
"latex-workshop.latex.outDir" = "%DIR%/out";
"terminal.integrated.profiles.linux" = {
"bash" = {
"path" = "${pkgs.bashInteractive}/bin/bash";
"args" = [];
};
};
"terminal.integrated.defaultProfile.linux" = "bash";
};
}

16
libs/default.nix Normal file
View File

@ -0,0 +1,16 @@
{
mkAutostart = {
pkgs,
name,
command,
}: {
source = "${
pkgs.makeDesktopItem {
name = "${name}-autostart";
desktopName = "${name}-autostart";
exec = command;
noDisplay = true;
}
}/share/applications/${name}-autostart.desktop";
};
}

16
systems/common/bash.nix Normal file
View File

@ -0,0 +1,16 @@
{...}: {
programs.bash = {
enable = true;
initExtra = ''
PS1='\[\033[1;32m\][\[\e]0;\u@\h: \w\a\]\w]\$\[\033[0m\] '
'';
shellAliases = {
code = "codium"; # Alias VSCode with VSCodium
ll = "ls -lh";
la = "ls -lah";
".." = "cd ..";
};
};
}

View File

@ -0,0 +1,57 @@
{
config,
lib,
options,
specialArgs,
modulesPath,
}: {
home.stateVersion = "23.05";
home.username = "kristian";
home.homeDirectory = "/home/kristian";
home.sessionVariables = {
# Electron programms won't render correctly under wayland without this
NIXOS_OZONE_WL = 1;
};
# Keyboard Layout
home.keyboard.layout = "at";
imports = [
./bash.nix
./direnv.nix
./firefox.nix
./fonts.nix
./git.nix
./gnome.nix
./gpg.nix
./nvim
./obs.nix
./packages.nix
./spiceify.nix
./thunderbird.nix
./vscode.nix
./mpv.nix
];
# Programs
programs = {
home-manager.enable = true; # Allow home-manager to manage itself
yt-dlp.enable = true;
};
xdg.mimeApps = {
enable = true;
defaultApplications = let
imageViewer = ["org.gnome.Loupe.desktop"];
videoViewer = ["mpv.desktop"];
documentViewer = ["org.gnome.Evince.desktop"];
in {
"image/png" = imageViewer;
"image/jpeg" = imageViewer;
"video/webm" = videoViewer;
"application/pdf" = documentViewer;
};
};
}

View File

@ -0,0 +1,8 @@
{...}: {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
enableBashIntegration = true;
};
}

View File

@ -0,0 +1,24 @@
{config, ...}: {
programs.firefox = {
enable = true;
profiles.kristian = {
isDefault = true;
search.default = "DuckDuckGo";
search.force = true;
extensions = with config.nur.repos.rycee.firefox-addons; [
ublock-origin
umatrix
sidebery
sponsorblock
dearrow
user-agent-string-switcher
];
settings = {
"extensions.pocket.enabled" = false;
};
};
};
}

7
systems/common/fonts.nix Normal file
View File

@ -0,0 +1,7 @@
{pkgs, ...}: {
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
nerdfonts
];
}

19
systems/common/git.nix Normal file
View File

@ -0,0 +1,19 @@
{...}: {
programs.git = let
userName = "Kristian Krsnik";
userEmail = "git@krsnik.at";
in {
enable = true;
inherit userName userEmail;
signing = {
key = userEmail;
signByDefault = true;
};
extraConfig = {
init.defaultBranch = "main";
};
};
}

106
systems/common/gnome.nix Normal file
View File

@ -0,0 +1,106 @@
{
pkgs,
wallpaper,
...
}: {
home.packages = with pkgs.gnomeExtensions; [
quick-settings-audio-panel
tray-icons-reloaded
espresso
pano
];
dconf.settings = {
# Use `dconf watch /` to track stateful changes you are doing, then set them here.
"org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = [
"quick-settings-audio-panel@rayzeq.github.io"
"places-menu@gnome-shell-extensions.gcampax.github.com"
"launch-new-instance@gnome-shell-extensions.gcampax.github.com"
"trayIconsReloaded@selfmade.pl"
"espresso@coadmunkee.github.com"
"pano@elhan.io"
];
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-theme = "Adwaita-dark";
};
"org/gnome/desktop/background" = let
width = 3840;
height = 2160;
in {
picture-uri = "file://${wallpaper.override {
preset = "nord-snow-aurora";
inherit width height;
}}/share/wallpapers/nixos-wallpaper.png";
picture-uri-dark = "file://${wallpaper.override {
preset = "nord-night-aurora";
inherit width height;
}}/share/wallpapers/nixos-wallpaper.png";
};
"org/gnome/desktop/wm/keybindings" = {
switch-to-workspace-left = ["<Alt>1"];
switch-to-workspace-right = ["<Alt>2"];
move-to-workspace-left = ["<Shift><Alt>1"];
move-to-workspace-right = ["<Shift><Alt>2"];
};
"org/gnome/settings-daemon/plugins/media-keys" = {
mic-mute = ["<Shift>AudioMute"];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Shift><Alt>a";
command = "kgx";
name = "Console";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Shift><Alt>f";
command = "nautilus";
name = "File Manager";
};
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
];
};
"org/gnome/mutter" = {
edge-tiling = true;
dynamic-workspaces = true;
workspaces-only-on-primary = true;
};
"org/gnome/Console" = {
theme = "auto";
};
"org/gnome/simple-scan" = {
text-dpi = 300;
};
"org/gnome/shell/extensions/pano" = {
play-audio-on-copy = false;
# This solves the stuttering issue for me.
# https://github.com/oae/gnome-shell-pano/issues/79
send-notification-on-copy = false;
};
"org/gnome/shell/extensions/espresso" = {
show-notifications = false;
};
"org/gnome/nautilus/preferences" = {
show-image-thumbnails = "always";
};
};
}

28
systems/common/gpg.nix Normal file
View File

@ -0,0 +1,28 @@
{...}: {
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
enableSshSupport = true;
sshKeys = ["A0B5D579ECACC45C51B2B38E317D346182083CD8"];
# The amount of time a key is kept in the cache before it is removed.
# The timer is reset after each use within that window.
defaultCacheTtl = 86400; # 1 Day
defaultCacheTtlSsh = 86400; # 1 Day
# The maximum amount after which the passphrase has to be retyped,
# even if the key is still cached.
maxCacheTtl = 86400; # 1 Day
maxCacheTtlSsh = 86400; # 1 Day
};
# Disable gnome-keyring-ssh for gpg-agent to work
# https://github.com/NixOS/nixpkgs/issues/101616
xdg.configFile."autostart/gnome-keyring-ssh.desktop".text = ''
[Desktop Entry]
Type=Application
Hidden=true
'';
}

23
systems/common/mpv.nix Normal file
View File

@ -0,0 +1,23 @@
{...}: {
programs.mpv = {
enable = true;
bindings = let
volume-step = "5";
speed-step = "0.125";
seek-step = "5";
in {
# supported commands https://raw.githubusercontent.com/mpv-player/mpv/master/etc/input.conf
WHEEL_UP = "add volume +${volume-step}";
WHEEL_DOWN = "add volume -${volume-step}";
RIGHT = "seek +${seek-step}";
LEFT = "seek -${seek-step}";
UP = "add volume +${volume-step}";
DOWN = "add volume -${volume-step}";
"Alt+h" = "vf toggle hflip";
"Alt+v" = "vf toggle vflip";
">" = "add speed +${speed-step}";
"<" = "add speed -${speed-step}";
BS = "set speed 1.0";
};
};
}

View File

@ -0,0 +1,54 @@
{pkgs, ...}: {
config.programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
plugins = with pkgs.vimPlugins;
[
telescope-nvim # fuzzy finder
tokyonight-nvim # theme
undotree # undotree
vim-fugitive # git integration
nvim-treesitter # syntax highlighting
# Autocomplete and LSP
nvim-lspconfig
nvim-cmp
cmp-nvim-lsp
luasnip
]
++ (with pkgs.vimPlugins.nvim-treesitter-parsers; [
# Parsers for syntax highlighting
nix
zig
python
vim
vimdoc
markdown
dockerfile
yaml
json
toml
lua
c
glsl
bash
]);
extraPackages = [pkgs.nodePackages.pyright];
extraLuaConfig =
builtins.readFile ./keybinds.lua
+ builtins.readFile ./colors.lua
+ builtins.readFile ./undotree.lua
+ builtins.readFile ./fugitive.lua
+ builtins.readFile ./treesitter.lua
+ builtins.readFile ./telescope.lua
+ builtins.readFile ./cmp.lua
+ builtins.readFile ./lspconfig.lua;
extraConfig = "set number relativenumber";
};
}

32
systems/common/obs.nix Normal file
View File

@ -0,0 +1,32 @@
{
pkgs,
libs,
config,
...
}: let
cfg = config.programs.obs;
in {
options.programs.obs = {
autostart = pkgs.lib.mkOption {
type = pkgs.lib.types.bool;
default = false;
};
};
config = {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
obs-source-record
];
};
xdg.configFile = pkgs.lib.mkIf cfg.autostart {
"autostart/obs-autostart.desktop" = libs.mkAutostart {
inherit pkgs;
name = "obs";
command = "obs --startreplaybuffer";
};
};
};
}

110
systems/common/packages.nix Normal file
View File

@ -0,0 +1,110 @@
{
pkgs,
lib,
...
}: {
nixpkgs.config = {
allowUnfree = false;
permittedInsecurePackages = [
"electron-25.9.0"
];
allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"osu-lazer"
"spotify"
"linuxsampler"
"libsciter"
"obsidian"
"steam"
"steam-original"
"davinci-resolve"
];
};
home.packages = with pkgs; [
# Basic utils
unzip
magic-wormhole
# Important graphical applications
keepassxc
logseq
xournalpp
libreoffice
onlyoffice-bin
# For windows applications
bottles
# Games
lutris
osu-lazer
r2modman
prismlauncher
# Communication
webcord
telegram-desktop
signal-desktop
element-desktop
# Creative software
gimp
inkscape
davinci-resolve
ardour # DAW
# plugins
sfizz
swh_lv2
zynaddsubfx
caps
cmt
distrho
surge
calf
dexed
odin2
ninjas2
linuxsampler
yabridge
yabridgectl
geonkick # for drums
# Misc
gnome-decoder
tor-browser-bundle-bin
obsidian
easyeffects
starc
scanned-image-extractor
rustdesk
wireshark
mullvad-vpn
# Entertainment
hypnotix
# VPN client for university
(
pkgs.writeScriptBin "univpn"
''
read -p "Username: " username
read -s -p "Password: " password
# newline
echo ""
read -p "OTP: " otp
sudo ${pkgs.gof5}/bin/gof5 --server "vpn.univie.ac.at" --username "$username@$otp" --password "$password"
''
)
];
}

View File

@ -0,0 +1,23 @@
{
pkgs,
spicetify,
...
}: let
spicePkgs = spicetify.packages.${pkgs.system}.default;
in {
programs.spicetify = {
enable = true;
theme = spicePkgs.themes.text;
colorScheme = "CatppuccinLatte";
enabledExtensions = with spicePkgs.extensions; [
shuffle # shuffle+ (special characters are sanitized out of ext names)
groupSession
wikify
fullScreen
playlistIntersection
phraseToPlaylist
];
};
}

View File

@ -0,0 +1,10 @@
{...}: {
programs.thunderbird = {
enable = true;
profiles.kristian = {
isDefault = true;
withExternalGnupg = true;
};
};
}

136
systems/common/vscode.nix Normal file
View File

@ -0,0 +1,136 @@
{pkgs, ...}: {
programs.vscode = {
enable = true;
package = pkgs.vscodium; # Replace VSCode with VSCodium
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
keybindings = [
{
key = "alt+a";
command = "editor.action.commentLine";
when = "editorTextFocus && !editorReadonly";
}
];
# This will only yield extensions that are compatible with the installed version of vscode
extensions = with pkgs.vscode-marketplace; [
jnoortheen.nix-ide
mkhl.direnv
ms-python.python
ms-python.vscode-pylance
ms-python.autopep8
james-yu.latex-workshop
davidanson.vscode-markdownlint
tamasfe.even-better-toml
asciidoctor.asciidoctor-vscode
ziglang.vscode-zig
slevesque.shader
ms-vscode.cpptools
nvarner.typst-lsp
redhat.java
streetsidesoftware.code-spell-checker
streetsidesoftware.code-spell-checker-german
];
userSettings = {
"git.enableCommitSigning" = true;
"window.menuBarVisibility" = "toggle";
"editor.fontFamily" = "'FiraCode Nerd Font'";
"editor.fontLigatures" = true;
"editor.minimap.enabled" = false;
"extensions.ignoreRecommendations" = true;
"[nix]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
};
"[python]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
"editor.defaultFormatter" = "ms-python.autopep8";
};
"[javascript]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[typescript]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[latex]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "file"; # modificationsIfAvailable does not work
};
"[toml]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[c]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[cpp]" = {
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"[typst]" = {
"editor.defaultFormatter" = "nvarner.typst-lsp";
"editor.formatOnSave" = true;
"editor.formatOnSaveMode" = "modificationsIfAvailable";
};
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nil}/bin/nil";
"nix.serverSettings" = {
nil = {
formatting = {command = ["${pkgs.alejandra}/bin/alejandra"];};
};
};
"direnv.path.executable" = "${pkgs.direnv}/bin/direnv";
"latex-workshop.latex.outDir" = "%DIR%/out";
"terminal.integrated.profiles.linux" = {
"bash" = {
"path" = "${pkgs.bashInteractive}/bin/bash";
"args" = [];
};
};
"terminal.integrated.defaultProfile.linux" = "bash";
"cSpell.language" = "en,de-de";
"zig.path" = "";
"zig.zls.path" = "";
"zig.initialSetupDone" = true;
"typst-lsp.serverPath" = "${pkgs.typst-lsp}/bin/typst-lsp";
"typst-lsp.experimentalFormatterMode" = "on";
"C_Cpp.default.compilerPath" = "${pkgs.gnat}/bin/g++";
"C_Cpp.default.includePath" = [
"\${workspaceFolder}/**"
];
"C_Cpp.clang_format_fallbackStyle" = "Microsoft";
"redhat.telemetry.enabled" = false;
"java.jdt.ls.java.home" = "${pkgs.jdk21_headless}";
};
};
}

View File

@ -0,0 +1,16 @@
{...}: {
targets.genericLinux.enable = false;
programs.bash.shellAliases = {
hms = "home-manager switch --flake $HOME/.config/home-manager#laptop";
};
dconf.settings = {
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "suspend";
power-button-action = "hibernate";
};
};
programs.obs.autostart = false;
}

16
systems/pc/default.nix Normal file
View File

@ -0,0 +1,16 @@
{...}: {
targets.genericLinux.enable = false;
programs.bash.shellAliases = {
hms = "home-manager switch --flake $HOME/.config/home-manager#pc";
};
dconf.settings = {
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "nothing"; # Automatic suspend/hibernation creates a suspend/hibernation loop
power-button-action = "suspend";
};
};
programs.obs.autostart = true;
}