Compare commits

142 Commits

Author SHA1 Message Date
Gitea Actions
a9d601e574 Update flake.lock 2025-04-28 2025-12-14 00:30:31 +00:00
Gitea Actions
7dca7c15ff Update flake.lock 2025-04-27 2025-12-14 00:30:31 +00:00
Gitea Actions
e53144fb5d Update flake.lock 2025-04-26 2025-12-14 00:30:31 +00:00
Gitea Actions
8416942602 Update flake.lock 2025-04-25 2025-12-14 00:30:31 +00:00
Gitea Actions
0c83332bd6 Update flake.lock 2025-04-24 2025-12-14 00:30:31 +00:00
Gitea Actions
d03d05242c Update flake.lock 2025-04-23 2025-12-14 00:30:31 +00:00
Gitea Actions
79d4a2ba40 Update flake.lock 2025-04-22 2025-12-14 00:30:31 +00:00
Gitea Actions
74dc373016 Update flake.lock 2025-04-21 2025-12-14 00:30:31 +00:00
Gitea Actions
35ddbd4da4 Update flake.lock 2025-04-20 2025-12-14 00:30:31 +00:00
Gitea Actions
683eec8608 Update flake.lock 2025-04-19 2025-12-14 00:30:31 +00:00
Gitea Actions
d87b25d05d Update flake.lock 2025-04-18 2025-12-14 00:30:31 +00:00
Gitea Actions
545ee874d6 Update flake.lock 2025-04-17 2025-12-14 00:30:31 +00:00
Gitea Actions
3536264b14 Update flake.lock 2025-04-16 2025-12-14 00:30:31 +00:00
Gitea Actions
6a568ae565 Update flake.lock 2025-04-15 2025-12-14 00:30:31 +00:00
Gitea Actions
15e284bf9e Update flake.lock 2025-04-14 2025-12-14 00:30:31 +00:00
Gitea Actions
98c4806b4b Update flake.lock 2025-04-13 2025-12-14 00:30:31 +00:00
Gitea Actions
f9d1edfbf9 Update flake.lock 2025-04-12 2025-12-14 00:30:31 +00:00
Gitea Actions
7272df733f Update flake.lock 2025-04-11 2025-12-14 00:30:31 +00:00
Gitea Actions
35979ddc96 Update flake.lock 2025-04-10 2025-12-14 00:30:31 +00:00
Gitea Actions
f864679da6 Update flake.lock 2025-04-09 2025-12-14 00:30:31 +00:00
Gitea Actions
87a7910dfc Update flake.lock 2025-04-08 2025-12-14 00:30:31 +00:00
Gitea Actions
22903c92cf Update flake.lock 2025-04-07 2025-12-14 00:30:31 +00:00
Gitea Actions
03efc68a7f Update flake.lock 2025-04-06 2025-12-14 00:30:31 +00:00
Gitea Actions
98a91544f4 Update flake.lock 2025-04-05 2025-12-14 00:30:31 +00:00
Gitea Actions
32eda11d42 Update flake.lock 2025-04-04 2025-12-14 00:30:31 +00:00
Gitea Actions
7989c032ab Update flake.lock 2025-04-03 2025-12-14 00:30:31 +00:00
Gitea Actions
4746f44a15 Update flake.lock 2025-04-02 2025-12-14 00:30:31 +00:00
Gitea Actions
9f8668d646 Update flake.lock 2025-04-01 2025-12-14 00:30:31 +00:00
Gitea Actions
4ddf3c4522 Update flake.lock 2025-03-31 2025-12-14 00:30:31 +00:00
Gitea Actions
40f10a98b4 Update flake.lock 2025-03-30 2025-12-14 00:30:31 +00:00
Gitea Actions
3fb91bfff8 Update flake.lock 2025-03-29 2025-12-14 00:30:31 +00:00
Gitea Actions
91538ed268 Update flake.lock 2025-03-28 2025-12-14 00:30:31 +00:00
Gitea Actions
58285beed1 Update flake.lock 2025-03-27 2025-12-14 00:30:31 +00:00
Gitea Actions
a999b8bb78 Update flake.lock 2025-03-26 2025-12-14 00:30:31 +00:00
Gitea Actions
c331f6b776 Update flake.lock 2025-03-25 2025-12-14 00:30:31 +00:00
Gitea Actions
536906d529 Update flake.lock 2025-03-24 2025-12-14 00:30:31 +00:00
Gitea Actions
3548df93a6 Update flake.lock 2025-03-23 2025-12-14 00:30:31 +00:00
fec13e08b9 dev suite: remove latex
Some checks failed
Update Nix Flake / update-flake (push) Failing after 13s
2025-12-13 07:59:44 +01:00
a540ca622d kardorf: switch to hyprland 2025-12-13 07:59:35 +01:00
7fb0bcdac0 nixvim: add orgmode support 2025-12-13 07:59:20 +01:00
b7726fce94 hyprland: fix cursor tearing 2025-12-13 07:58:54 +01:00
30c987bd9b hm: remove my binarycache for hm-standalone
Some checks failed
Update Nix Flake / update-flake (push) Failing after 12s
Normally I wont have VPN access on standalone
2025-12-08 17:12:10 +01:00
539e9a0b8e v3ms: add qt-distrobox 2025-12-08 17:09:45 +01:00
1e4593ea17 home: add qt-distrobox config 2025-12-08 17:09:14 +01:00
ec8a71de95 open-messaging: update name of telegram binary
Some checks failed
Update Nix Flake / update-flake (push) Failing after 14s
2025-12-06 11:30:42 +01:00
0c39388b21 gc: change to older than 30
the old +3 did not seem to work
2025-12-06 11:28:02 +01:00
ebb043b589 format code 2025-12-06 11:24:15 +01:00
fcfc9f6450 hm: make it backup conflicting files 2025-12-06 11:24:08 +01:00
fe3cd057cd fix regreet with hyprland 2025-12-06 11:23:41 +01:00
b9cdb9299e auto-upgrade: commit flake.lock if upgrading worked 2025-12-06 09:22:21 +01:00
8b6ba76848 pianonix: add rpi-ws281x package 2025-12-06 09:22:02 +01:00
2e79bd9e00 nix: do not optimise store on build, but regularly 2025-12-06 09:21:30 +01:00
cfdc9f7001 aspi: activate wireguard 2025-12-06 09:21:17 +01:00
a12b50edfa pianonix: try getting piano-led-visualizer to run
Still did not work, using raspberrypi os
2025-12-06 09:20:52 +01:00
194d4bcec0 tmux: use vim bindings and better prefix 2025-12-06 09:20:00 +01:00
5badb000be install vagrant and qtcreator 2025-12-06 09:19:38 +01:00
08b3f2c194 emacs: add more tools for c++ and typst development 2025-12-06 09:19:20 +01:00
5f9a110464 update to nixos 25.11 2025-12-06 09:19:06 +01:00
bcd041484d Auto-update flake.lock 2025-12-05 14:03:59 +01:00
fd3b9f20f0 update flake, add tmux
Some checks failed
Update Nix Flake / update-flake (push) Failing after 14s
2025-11-25 20:13:12 +01:00
bc160af26a fix open-messaging and workspace assignments
Some checks failed
Update Nix Flake / update-flake (push) Failing after 15s
2025-11-17 07:05:41 +01:00
a34abd0f05 fix broken programs
Some checks failed
Update Nix Flake / update-flake (push) Failing after 14s
2025-11-16 12:24:15 +01:00
2fd1f5ee53 update flake 2025-11-16 12:24:09 +01:00
88547dc82c pianonix: small fixes to make it compile
Some checks failed
Update Nix Flake / update-flake (push) Failing after 13s
2025-11-11 10:06:37 +01:00
ccf38c2da2 remove broken packages after update 2025-11-11 09:55:54 +01:00
b1107ae904 update flake 2025-11-11 09:55:49 +01:00
48f53b3884 first setup of piano-visualizer on pianonix 2025-11-11 09:55:32 +01:00
9bcca96597 aspi firefwall: reactivate checkReversePath
Some checks failed
Update Nix Flake / update-flake (push) Failing after 12s
2025-10-28 09:09:03 +01:00
78e219a6cb sops: do not use keyfile makes ssh keys work 2025-10-28 09:09:03 +01:00
8b958d6a56 mdns: try fixes for bug with pianonix 2025-10-28 09:09:03 +01:00
1a1aa20690 pianonix: add bluetooth, fix firefox autostart 2025-10-28 09:09:03 +01:00
54952923f3 fish: add ctrl-space shortcut for zi 2025-10-28 09:09:03 +01:00
ca20fa6c35 hm-standalone: add official nix to trusted keys
Some checks failed
Update Nix Flake / update-flake (push) Failing after 17s
2025-10-27 11:19:12 +01:00
c1b2b51d13 update flake
Some checks failed
Update Nix Flake / update-flake (push) Failing after 11s
2025-10-21 20:04:02 +02:00
28f78bb67e flake: add nixos-generators for output pianonix-image 2025-10-21 20:03:46 +02:00
114647aa96 pianonix: update commented wireless networking config 2025-10-21 20:03:25 +02:00
64ae389f27 pianonix: update secrets for new installation 2025-10-21 20:03:12 +02:00
fd39dbfcd4 readme: update ssh-to-age command 2025-10-21 20:02:18 +02:00
b13cca7173 shell: add nix helper programs
Some checks failed
Update Nix Flake / update-flake (push) Failing after 20s
2025-10-20 19:37:44 +02:00
7807091b83 builder: use networkmanager again 2025-10-20 19:37:16 +02:00
d3026afb97 update flake 2025-10-20 19:37:05 +02:00
152daf1230 pianonix: multiple improvements, improve secrets, add wireguard, use sheetless in browser 2025-10-20 19:36:24 +02:00
ffda398f8d builder: disable autoupgrade
Some checks failed
Update Nix Flake / update-flake (push) Failing after 13s
2025-10-09 21:29:40 +02:00
3e179960de builder: simplify network config by using static dns list 2025-10-09 21:28:34 +02:00
93e655ed27 aspi: use wireguard via networkmanager 2025-10-09 21:28:14 +02:00
710c1dedb8 install additional software
Some checks failed
Update Nix Flake / update-flake (push) Failing after 13s
2025-10-05 15:36:37 +02:00
28ec5c73d4 format code 2025-10-05 15:36:26 +02:00
fc7285bd5c setup pob user for running pob2-frajul 2025-10-05 15:36:06 +02:00
11ee156b29 pipewire: try fixing video conference freeze 2025-10-05 15:34:21 +02:00
2dba549787 builder: setup as jenkins node 2025-10-05 15:33:58 +02:00
d28c7d870c add caches to substituters 2025-10-05 15:32:52 +02:00
8bf17e74ef use stable nixos-25.05 instead of unstable 2025-10-05 15:30:41 +02:00
08cf457aa3 neovim: use smartcase search 2025-09-11 08:04:03 +02:00
448002ebf4 update config syntax 2025-09-11 08:03:22 +02:00
9735d3f0c0 frajul-auto-upgrade: restore flake.lock if update failed 2025-09-09 21:47:35 +02:00
8f1b0ade4d user: add to rtkit groups to maybe fix audio 2025-09-09 21:47:08 +02:00
db05024dc6 builder: add fallback to substituters 2025-09-09 21:46:36 +02:00
21053dac8c install dig 2025-09-09 21:46:19 +02:00
1ab0bf54fa neovim: fix telescope file_browser, add lsps 2025-09-09 21:46:13 +02:00
5070d4dbfc Add yukari user 2025-09-01 17:24:27 +02:00
12466b4426 frajul-auto-upgrade: re-add lock file usage
Some checks failed
Update Nix Flake / update-flake (push) Failing after 11s
2025-08-03 16:05:46 +02:00
23155d57b7 update flake
Some checks failed
Update Nix Flake / update-flake (push) Failing after 18s
2025-07-26 08:13:42 +02:00
a9e30bd84b Set fallback for binary caches
This makes builds not fail when my own binary cache is offline for some reason
2025-07-26 08:13:02 +02:00
e62f6e9dce Fix frajul-auto-upgrade git permission issue 2025-07-26 08:12:43 +02:00
c543bc13ea hm: disable warn-dirty
Some checks failed
Update Nix Flake / update-flake (push) Failing after 16s
2025-07-12 15:52:17 +02:00
b4d1681b99 hyprland: fix waybar by running it with exec-once 2025-07-12 15:51:43 +02:00
6c32ffbe94 frajul-auto-upgrade: only run once a day
Some checks failed
Update Nix Flake / update-flake (push) Failing after 14s
2025-07-11 16:22:17 +02:00
6787243414 flake: update 2025-07-11 13:15:42 +02:00
d350807e8c builder: do enable auto-upgrades 2025-07-11 13:15:25 +02:00
f872c8db0c aspi: enable frajul auto upgrade module and integrate into waybar 2025-07-11 13:15:02 +02:00
8c53c66c4d Add frajul-auto-upgrade module 2025-07-11 13:14:48 +02:00
0f07029660 Add openconnect plugin to networkmanager
Some checks failed
Update Nix Flake / update-flake (push) Failing after 17s
2025-07-10 17:50:34 +02:00
8010d771a1 builder: add gitlab-runner
Some checks failed
Update Nix Flake / update-flake (push) Failing after 17s
2025-07-09 21:34:52 +02:00
7f4c41429e update flake
Some checks failed
Update Nix Flake / update-flake (push) Failing after 15s
2025-07-04 14:44:51 +02:00
6d21fe4262 format code 2025-07-04 14:44:31 +02:00
c081f95aaf open-messaging: adapt to new telegram program name 2025-07-04 14:44:01 +02:00
452a34c7e8 Neovim: add clangd 2025-07-04 14:43:51 +02:00
15c4616b91 Fix emacs not having TERMINAL env var 2025-07-04 14:43:45 +02:00
07274a0364 Update alacritty config, use as default 2025-07-04 14:41:58 +02:00
3bb8db1349 Fix builder using itself as remote subsituter 2025-07-04 14:40:58 +02:00
65a3dcdc08 Use ghostty as primary terminal
Some checks failed
Update Nix Flake / update-flake (push) Failing after 16s
2025-06-30 08:37:24 +02:00
9fe40bfd13 package rtklib 2025-05-26 21:51:07 +02:00
07943d4f95 format file
Some checks failed
Update Nix Flake / update-flake (push) Failing after 12s
2025-05-23 09:59:30 +02:00
815a79ff41 kardorf: fix seahorse and plasma6 config conflict 2025-05-23 09:58:59 +02:00
32ddceba8f kardorf: use i3 instead of hyprland 2025-05-23 09:58:38 +02:00
55ba4125d6 add latex packages to fix org mode exporting
Some checks failed
Update Nix Flake / update-flake (push) Failing after 11s
2025-05-21 23:01:09 +02:00
b9274f546f update flake 2025-05-21 23:01:03 +02:00
fd246d7daf Add hydra-auto-upgrade module, still wip
Some checks failed
Update Nix Flake / update-flake (push) Failing after 16s
2025-05-16 13:13:47 +02:00
edae0d2bb0 Delete i3 scripts also available in my nix pkgs 2025-05-16 12:56:22 +02:00
1cb23dd0a4 Add todo 2025-05-16 12:53:20 +02:00
ab1052193a rename deprecated options 2025-05-16 12:12:22 +02:00
6dadb2008c kardorf: enable ssh access 2025-05-16 12:11:45 +02:00
18f9cc3fa8 Add user julian to dialout for serial port access 2025-05-16 08:27:45 +02:00
9295ad7010 add kardorf ssh key to common secrets.yaml 2025-05-16 08:27:45 +02:00
e3cf2379ab yazi: update config to new version 2025-05-16 08:27:45 +02:00
f6c3f676b2 update flake 2025-05-16 08:27:45 +02:00
d57017382a v3ms: add /snap/bin to path
Some checks failed
Update Nix Flake / update-flake (push) Failing after 14s
2025-05-09 11:41:21 +02:00
1d7690eab4 Fix mako settings
Some checks failed
Update Nix Flake / update-flake (push) Failing after 14s
2025-05-06 07:50:35 +02:00
67d68a9946 Fix waybar not visible on second monitor after toggling mirroring twice
Some checks failed
Update Nix Flake / update-flake (push) Failing after 15s
2025-05-05 15:10:07 +02:00
9af362b5c8 hyprland: quick and dirty screen mirroring 2025-05-05 14:56:22 +02:00
a0ae09452f hyprland: install hyprpicker 2025-05-05 08:24:26 +02:00
711859e660 hyprland: fix cursor theme not applied 2025-05-05 08:24:09 +02:00
75 changed files with 2288 additions and 366 deletions

View File

@@ -1,7 +1,7 @@
keys: keys:
- &primary age1ee5udznhadk6m7jtglu4709rep080yjyd2ukzdl8jma4mm92y3psv0slpg - &primary age1ee5udznhadk6m7jtglu4709rep080yjyd2ukzdl8jma4mm92y3psv0slpg
- &aspi-ssh age1q8lc5340gz5xw2f57nglrss68wv0j0hf36py2pdtrl6ky3yrq9qqk0njr4 - &aspi-ssh age1q8lc5340gz5xw2f57nglrss68wv0j0hf36py2pdtrl6ky3yrq9qqk0njr4
- &pianonix-ssh age1hsmfz8fjxu83sax9lr487h8xr6cyge0apdq4zpge4c8jpcjj2cksj825ct - &pianonix-ssh age1tguyu2yd5xv8rgjjl50cq6dq5rr7umqgv098dgre4u9wyj30ea7sexw62c
- &builder-ssh age1kw4kmdm45zprvdkrrpvgq966l7585vhusmum083qlwnr0xxgd3uqatcyja - &builder-ssh age1kw4kmdm45zprvdkrrpvgq966l7585vhusmum083qlwnr0xxgd3uqatcyja
- &kardorf-ssh age15lxw97z03q40xrdscnxqqugh5ky5aqrerg2t2rphkcqm6rnllurq8v98q5 - &kardorf-ssh age15lxw97z03q40xrdscnxqqugh5ky5aqrerg2t2rphkcqm6rnllurq8v98q5
@@ -20,7 +20,7 @@ creation_rules:
- *primary - *primary
- *builder-ssh - *builder-ssh
- path_regex: hosts/pianonix/secrets.yaml$ - path_regex: hosts/pianonix/secrets*
key_groups: key_groups:
- age: - age:
- *primary - *primary

View File

@@ -24,7 +24,7 @@ sops edit secrets/secrets.yaml
** Authorize new device ** Authorize new device
- Generate public key from ssh -> Private age key generation not needed - Generate public key from ssh -> Private age key generation not needed
#+begin_src sh #+begin_src sh
ssh-to-age < /etc/ssh/ssh_host_ed25519_key ssh-to-age < /etc/ssh/ssh_host_ed25519_key.pub
#+end_src #+end_src
- Add age public key to file:.sops.yaml - Add age public key to file:.sops.yaml
- Update keys - Update keys

884
flake.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,16 +2,21 @@
description = "Home Manager configuration of julian"; description = "Home Manager configuration of julian";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
systems.url = "github:nix-systems/default-linux"; systems.url = "github:nix-systems/default-linux";
nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-hardware.url = "github:nixos/nixos-hardware";
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
nix-colors.url = "github:misterio77/nix-colors"; nix-colors.url = "github:misterio77/nix-colors";
deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.url = "github:serokell/deploy-rs";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
sops-nix = { sops-nix = {
@@ -28,16 +33,12 @@
}; };
# Various flakes # Various flakes
alacritty-theme = {
url = "github:alacritty/alacritty-theme";
flake = false;
};
yazi-flavors = { yazi-flavors = {
url = "github:yazi-rs/flavors"; url = "github:yazi-rs/flavors";
flake = false; flake = false;
}; };
nixvim = { nixvim = {
url = "github:nix-community/nixvim"; url = "github:nix-community/nixvim/nixos-25.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-matlab = { nix-matlab = {
@@ -88,7 +89,7 @@
packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;}); packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;});
devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;}); devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;});
formatter = forEachSystem (pkgs: pkgs.alejandra); formatter = forEachSystem (pkgs: pkgs.alejandra); # nix fmt *
nixosConfigurations = { nixosConfigurations = {
# Main laptop # Main laptop
@@ -187,5 +188,15 @@
}; };
}; };
}; };
# substitutes: nixos-generate --flake .#pianonix -f sd-aarch64 --system aarch64-linux
pianonix-image = inputs.nixos-generators.nixosGenerate {
system = "aarch64-linux";
format = "sd-aarch64";
modules = [./hosts/pianonix];
specialArgs = {
inherit inputs outputs;
};
};
}; };
} }

View File

@@ -6,10 +6,13 @@
./features/direnv ./features/direnv
./features/topgrade ./features/topgrade
./features/neovim ./features/neovim
./features/kitty ./features/ghostty
./features/wezterm ./features/wezterm
./features/alacritty
./features/yazi ./features/yazi
./features/emacs ./features/emacs
./features/tmux
./features/qt-distrobox
./features/hyprland ./features/hyprland
@@ -20,7 +23,7 @@
hostName = "aspi"; hostName = "aspi";
is-nixos = true; is-nixos = true;
terminal = "kitty"; terminal = "alacritty";
# ------- ---------- # ------- ----------
# | eDP-1 | | HDMI-A-1 | # | eDP-1 | | HDMI-A-1 |

View File

@@ -1,3 +0,0 @@
import = [
"~/.config/alacritty/theme/themes/smoooooth.toml"
]

View File

@@ -1,15 +1,12 @@
{ {
lib, lib,
pkgs,
inputs,
config, config,
... ...
}: { }: {
home.packages = with pkgs; [alacritty]; programs.alacritty = {
enable = true;
home.file = { settings = {};
".config/alacritty/theme".source = "${inputs.alacritty-theme}"; theme = "smoooooth";
".config/alacritty/alacritty.toml".source = ./alacritty.toml;
}; };
home.sessionVariables.TERMINAL = lib.mkIf (config.terminal == "alacritty") "alacritty"; home.sessionVariables.TERMINAL = lib.mkIf (config.terminal == "alacritty") "alacritty";

View File

@@ -52,6 +52,14 @@ in {
shfmt shfmt
pyright pyright
clang-tools # c++ lsp etc clang-tools # c++ lsp etc
ccls # alternative c++ lsp
cmake
bear
cmake-language-server
# qt6.full # qt tools and libs including lsp
tinymist # typst lsp
ltex-ls # latex languagetool ltex-ls # latex languagetool
graphviz graphviz

View File

@@ -47,6 +47,10 @@ with lib; {
end end
nix shell $args nix shell $args
''; '';
fish_user_key_bindings = ''
bind ctrl-space 'zi; commandline -f repaint'
bind -M insert ctrl-space 'zi; commandline -f repaint'
'';
}; };
}; };
} }

View File

@@ -12,7 +12,7 @@ with lib; {
dejavu_fonts dejavu_fonts
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-emoji noto-fonts-color-emoji
liberation_ttf liberation_ttf
fira-code fira-code
fira-code-symbols fira-code-symbols

View File

@@ -0,0 +1,16 @@
{
lib,
config,
...
}: {
programs.ghostty = {
enable = true;
enableFishIntegration = true;
settings = {
theme = "catppuccin-mocha";
font-size = 12;
};
};
home.sessionVariables.TERMINAL = lib.mkIf (config.terminal == "ghostty") "ghostty";
}

View File

@@ -24,8 +24,10 @@ in {
}; };
cursorTheme = { cursorTheme = {
package = pkgs.apple-cursor; package = pkgs.apple-cursor;
name = "macOS-BigSur"; name = "macOS";
size = 24; size = 24;
}; };
}; };
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk];
} }

View File

@@ -24,7 +24,7 @@ in {
./zathura.nix ./zathura.nix
./waypipe.nix ./waypipe.nix
./hyprbars.nix # ./hyprbars.nix
]; ];
xdg.portal = { xdg.portal = {
@@ -40,15 +40,29 @@ in {
programs.imv.enable = true; # TODO: what is that programs.imv.enable = true; # TODO: what is that
home.packages = with pkgs; [ home.packages = with pkgs; [
# hyprpicker # TODO hyprpicker
# hyprcursor # TODO
brightnessctl brightnessctl
# grimblast
frajul.hyprshot-gui frajul.hyprshot-gui
frajul.wl-ocr frajul.wl-ocr
wf-recorder wf-recorder
wl-clipboard wl-clipboard
(pkgs.writeShellScriptBin "toggle-screen-mirroring" (
builtins.readFile ./toggle-screen-mirroring.sh
))
(pkgs.writeShellScriptBin "correct-workspace-locations" (
lib.concatStringsSep "\n" (
builtins.concatLists (
map (
monitor:
map (ws: "hyprctl dispatch moveworkspacetomonitor ${ws} ${monitor.name}") monitor.workspaces
)
config.monitors
)
)
))
]; ];
services.cliphist = { services.cliphist = {
@@ -141,11 +155,17 @@ in {
settings = { settings = {
"$mod" = "SUPER"; "$mod" = "SUPER";
# Environment variables programs like emacs have access to
env = "TERMINAL,${config.terminal}";
# Monitors # Monitors
monitor = ",preferred,auto,1"; monitor = ",preferred,auto,1";
# Autostart # Autostart
exec-once = ["firefox"]; exec-once = [
(lib.getExe pkgs.firefox)
(lib.getExe pkgs.waybar)
];
# Look and Feel # Look and Feel
general = { general = {
@@ -196,6 +216,7 @@ in {
exec = [ exec = [
"hyprctl setcursor ${config.gtk.cursorTheme.name} ${toString config.gtk.cursorTheme.size}" "hyprctl setcursor ${config.gtk.cursorTheme.name} ${toString config.gtk.cursorTheme.size}"
"correct-workspace-locations"
]; ];
misc = { misc = {
@@ -207,6 +228,10 @@ in {
vfr = true; # power saving vfr = true; # power saving
}; };
cursor = {
no_hardware_cursors = 1; # disable hardware cursors to fix tearing on kardorf
};
render = { render = {
# we do, in fact, want direct scanout # we do, in fact, want direct scanout
direct_scanout = true; direct_scanout = true;
@@ -223,7 +248,9 @@ in {
windowrulev2 = [ windowrulev2 = [
"suppressevent maximize, class:.*" "suppressevent maximize, class:.*"
"workspace 1, class:firefox" "workspace 1, class:firefox"
"workspace 8, class:Zotero"
"workspace 9, class:nheko" "workspace 9, class:nheko"
"workspace 9, class:discord"
"workspace 9, class:org.telegram.desktop" "workspace 9, class:org.telegram.desktop"
"workspace 10, class:thunderbird" "workspace 10, class:thunderbird"
"float, class:qalculate-gtk" "float, class:qalculate-gtk"
@@ -263,7 +290,7 @@ in {
# opening applications # opening applications
"$mod, D, exec, wofi --show drun,run" "$mod, D, exec, wofi --show drun,run"
"$mod, E, exec, pcmanfm" "$mod, E, exec, pcmanfm"
"$mod, Return, exec, kitty" "$mod, Return, exec, ${config.terminal}"
"$mod, B, exec, firefox" "$mod, B, exec, firefox"
"$mod, C, exec, qalculate-gtk" "$mod, C, exec, qalculate-gtk"
@@ -271,7 +298,9 @@ in {
"$mod SHIFT, E, exec, wlogout -p layer-shell" "$mod SHIFT, E, exec, wlogout -p layer-shell"
"$mod, Escape, exec, wlogout -p layer-shell" "$mod, Escape, exec, wlogout -p layer-shell"
"$mod SHIFT, R, exec, hyprctl reload" "$mod SHIFT, R, exec, hyprctl reload"
"$mod, Print, exec, hyprshot-gui"
", Print, exec, hyprshot-gui" ", Print, exec, hyprshot-gui"
"$mod, P, exec, toggle-screen-mirroring; correct-workspace-locations"
# "$mod SHIFT, E, exec, pkill Hyprland" # "$mod SHIFT, E, exec, pkill Hyprland"
# "$mod, G, togglegroup," # "$mod, G, togglegroup,"

View File

@@ -15,14 +15,16 @@ in {
services.mako = { services.mako = {
enable = true; enable = true;
# defaultTimeout = 5000; # milliseconds, can be overwritten by notification sender settings = {
# backgroundColor = "#${palette.base00}"; TODO fix defaultTimeout = "5000"; # milliseconds, can be overwritten by notification sender
# textColor = "#${palette.base05}"; backgroundColor = "#${palette.base00}";
# borderColor = "#${palette.base0D}"; textColor = "#${palette.base05}";
# progressColor = "over #${palette.base02}"; borderColor = "#${palette.base0D}";
# extraConfig = '' progressColor = "over #${palette.base02}";
# [urgency=high] extraConfig = ''
# border-color=#${palette.base09} [urgency=high]
# ''; border-color=#${palette.base09}
# '';
};
}; };
} }

View File

@@ -0,0 +1,67 @@
#! /usr/bin/env sh
# A hyprland script for a laptop-external-monitor setup, toggling between which is in use
# Launch at startup to make hyprland disable the internal monitor if an external monitor is detected and enabled
# Additionally it's called with a keybind to switch between a laptop monitor and an external display
# Ideally the conditional monitor behaviour was instead done directly in hyprland.conf, but I'm not sure whether that's possible
#
# Relevant info:
# - hyprctl monitors: identifies currently enabled monitors
# - hyprctl monitors all: identifies ALL connected monitors - including those not in use
#
# Suggested use:
# Add this line somewhere after the regular monitor configuration in hyprland.conf:
# exec = /path/to/hyprland-monitors-toggle.sh
# Add a keybind to run this script on demand:
# bind =,SomeKeyHere, exec, /path/to/hyprland-monitors-toggle.sh
#move_all_workspaces_to_monitor() {
# TARGET_MONITOR="$1"
# hyprctl workspaces | grep ^workspace | cut --delimiter ' ' --fields 3 | xargs -I '{}' hyprctl dispatch moveworkspacetomonitor '{}' "$TARGET_MONITOR"
# # Previous approach
# #hyprctl swapactiveworkspaces $EXTERNAL_MONITOR $INTERNAL_MONITOR
#}
# TODO: Detect these instead of hardcoding them
INTERNAL_MONITOR="eDP-1"
EXTERNAL_MONITOR="HDMI-A-1"
# NUM_MONITORS=$(hyprctl monitors all | grep --count Monitor)
# NUM_MONITORS_ACTIVE=$(hyprctl monitors | grep --count Monitor)
# Make sure all
# if [ "$NUM_MONITORS_ACTIVE" -eq 1 ]; then
# move_all_workspaces_to_monitor $INTERNAL_MONITOR
# exit
# fi
MIRROR_SETTING=$(hyprctl monitors all -j | jq -r '.[] | select(.name == "HDMI-A-1") | .mirrorOf')
# # For dynamically toggling which monitor is active later via a keybind
# if [ "$NUM_MONITORS" -gt 1 ]; then # Handling multiple monitors
# if hyprctl monitors | cut --delimiter ' ' --fields 2 | grep --quiet ^$EXTERNAL_MONITOR; then
# hyprctl keyword monitor $INTERNAL_MONITOR,preferred,0x0,1
# move_all_workspaces_to_monitor $INTERNAL_MONITOR
# hyprctl keyword monitor "$EXTERNAL_MONITOR, disable"
# else
# hyprctl keyword monitor $EXTERNAL_MONITOR,preferred,0x0,1
# move_all_workspaces_to_monitor $EXTERNAL_MONITOR
# hyprctl keyword monitor "$INTERNAL_MONITOR, disable"
# fi
# else # If the external monitor is disconnected without running this script first, it might become the case that no monitor is on - therefore turn on the laptop monitor!
# hyprctl keyword monitor $INTERNAL_MONITOR,preferred,0x0,1
# move_all_workspaces_to_monitor $INTERNAL_MONITOR
# fi
echo setting:
echo $MIRROR_SETTING
if [ "$MIRROR_SETTING" = "none" ]; then
echo "mirroring..."
hyprctl keyword monitor "$EXTERNAL_MONITOR, preferred, auto, 1, mirror, $INTERNAL_MONITOR"
else
hyprctl keyword monitor "$EXTERNAL_MONITOR, disable" # shortly disable monitor so waybar recognizes the new monitor again # TODO: find better solution
hyprctl keyword monitor "$EXTERNAL_MONITOR, preferred, auto, 1"
fi

View File

@@ -12,7 +12,14 @@
"modules-center": [], "modules-center": [],
"modules-right": ["idle_inhibitor", "disk", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"], "modules-right": ["idle_inhibitor", "custom/nixos-update", "disk", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"],
"custom/nixos-update": {
"exec": "frajul-auto-upgrade-status",
"return-type": "json",
"interval": 2,
"on-click-right": "frajul-auto-upgrade-toggle"
},
"hyprland/workspaces": { "hyprland/workspaces": {
"on-scroll-up": "hyprctl dispatch workspace m+1", "on-scroll-up": "hyprctl dispatch workspace m+1",
@@ -35,6 +42,7 @@
}, },
"idle_inhibitor": { "idle_inhibitor": {
"start-activated": true,
"format": "{icon}", "format": "{icon}",
"format-icons": { "format-icons": {
"activated": "", "activated": "",

View File

@@ -10,7 +10,7 @@
in { in {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; # systemd.enable = true;
settings.mainBar = builtins.fromJSON (builtins.readFile ./config.json); settings.mainBar = builtins.fromJSON (builtins.readFile ./config.json);
}; };

View File

@@ -142,8 +142,8 @@ bindsym $mod+Shift+9 move container to workspace number $ws9; workspace $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10; workspace $ws10 bindsym $mod+Shift+0 move container to workspace number $ws10; workspace $ws10
# Monitor config # Monitor config
set $monitor_left "DVI-D-0" set $monitor_left "DVI-D-1"
set $monitor_right "DVI-D-1" set $monitor_right "DVI-D-2"
workspace $ws1 output $monitor_left workspace $ws1 output $monitor_left
workspace $ws2 output $monitor_left workspace $ws2 output $monitor_left

View File

@@ -1,27 +0,0 @@
#!/bin/sh
start_if_not_running()
{
program=$1
pidof -sq $program
if [ "$?" -eq "1" ]; then
start_program $1
else
echo "$program is already running"
fi
}
start_program()
{
program=$1
echo "Starting $program..."
$program & > /dev/null
}
i3-msg 'workspace 9; append_layout ~/.config/i3/workspace-messaging.json'
start_program nheko
sleep 0.1
start_program telegram-desktop
sleep 0.1
start_program thunderbird
sleep 0.1

View File

@@ -1,20 +0,0 @@
#!/bin/sh
HDMI_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink"
LAPTOP_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink"
HDMI_ICON=$(pactl info | grep -q $HDMI_SINK && echo "checkbox")
LAPTOP_ICON=$(pactl info | grep -q $LAPTOP_SINK && echo "checkbox")
HDMI_VOLUME=$(pactl get-sink-volume $HDMI_SINK | head -n 1 | awk '{print $5}')
LAPTOP_VOLUME=$(pactl get-sink-volume $LAPTOP_SINK | head -n 1 | awk '{print $5}')
read -r -d '' CONF <<EOF
Open Pavucontrol,pavucontrol,pavucontrol
^sep()
HDMI - $HDMI_VOLUME,pactl set-default-sink $HDMI_SINK,$HDMI_ICON
Laptop - $LAPTOP_VOLUME,pactl set-default-sink $LAPTOP_SINK,$LAPTOP_ICON
EOF
echo "$CONF" | jgmenu --simple

View File

@@ -3,8 +3,9 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: { }:
imports = [inputs.nixvim.homeManagerModules.nixvim]; {
imports = [ inputs.nixvim.homeModules.nixvim ];
home.sessionVariables = { home.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
@@ -36,6 +37,8 @@
opts = { opts = {
number = false; number = false;
relativenumber = false; relativenumber = false;
ignorecase = true;
smartcase = true;
}; };
clipboard.register = "unnamedplus"; # Use system clipboard clipboard.register = "unnamedplus"; # Use system clipboard
@@ -49,7 +52,7 @@
key = "<leader><space>"; key = "<leader><space>";
} }
{ {
action = "<cmd>Telescope file_browser<cr>"; action = "<cmd>Telescope file_browser path=%:p:h<cr>";
key = "<leader>."; key = "<leader>.";
} }
{ {
@@ -76,6 +79,7 @@
neogit.enable = true; # like magit neogit.enable = true; # like magit
trouble.enable = true; trouble.enable = true;
web-devicons.enable = true; web-devicons.enable = true;
orgmode.enable = true; # org-mode support
# Shows file trees # Shows file trees
oil = { oil = {
@@ -89,9 +93,9 @@
conform-nvim = { conform-nvim = {
enable = true; enable = true;
settings.formatters_by_ft = with pkgs; { settings.formatters_by_ft = with pkgs; {
lua = ["stylua"]; lua = [ "stylua" ];
python = ["black"]; python = [ "black" ];
nix = ["nixfmt"]; nix = [ "nixfmt" ];
}; };
# extraOptions = { # extraOptions = {
# default_format_opts.lsp_format = "fallback"; # default_format_opts.lsp_format = "fallback";
@@ -103,9 +107,9 @@
enable = true; enable = true;
autoEnableSources = true; autoEnableSources = true;
settings.sources = [ settings.sources = [
{name = "nvim_lsp";} { name = "nvim_lsp"; }
{name = "path";} { name = "path"; }
{name = "buffer";} { name = "buffer"; }
]; ];
settings.mapping = { settings.mapping = {
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; "<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
@@ -140,17 +144,21 @@
}; };
lsp = { lsp = {
enable = true; enable = true; # includes lsp-config, default settings for the lsps
servers = { servers = {
rust_analyzer = { rust_analyzer = {
enable = true; enable = true;
installCargo = true; installCargo = true;
installRustc = true; installRustc = true;
}; };
nixd.enable = true; nixd.enable = true; # nix
pyright.enable = true; pyright.enable = true; # python
dockerls.enable = true; dockerls.enable = true; # docker
lua_ls.enable = true; lua_ls.enable = true; # lua
clangd.enable = true; # c, c++
dartls.enable = true; # dart, flutter
digestif.enable = true; # latex
tinymist.enable = true; # typst
}; };
}; };
}; };

View File

@@ -0,0 +1,22 @@
{
programs.distrobox = {
enable = true;
containers."qt-distrobox" = {
image = "debian:12.2";
exported_apps = "qtcreator";
enableSystemdUnit = false; # fails in creating and does not recreate. Do distrobox-assemble create --replace --file ~/.config/distrobox/containers.ini instead
additional_packages = [
"qtcreator"
"qt6-base-dev"
"qt6-wayland"
"qt6-tools-dev-tools"
"qt6-tools-dev"
"qt6-serialbus-dev"
"qt6-websockets-dev"
"libgl1-mesa-dev"
"build-essential"
"cmake"
];
};
};
}

View File

@@ -1,7 +1,7 @@
{pkgs, ...}: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
bat bat
du-dust # Like du tree but better dust # Like du tree but better
fd # better find fd # better find
fdupes # find and delete duplicate files fdupes # find and delete duplicate files
ffmpeg ffmpeg
@@ -24,7 +24,7 @@
p7zip # unzip 7zip archives p7zip # unzip 7zip archives
parted parted
pciutils # lspci pciutils # lspci
poppler_utils # Pdf utils including pdfimages poppler-utils # Pdf utils including pdfimages
libqalculate # Nice tui calculator (qalc) libqalculate # Nice tui calculator (qalc)
ripgrep # better grep ripgrep # better grep
rnr # renaming tool rnr # renaming tool
@@ -40,6 +40,7 @@
wireguard-tools # wg-quick wireguard-tools # wg-quick
xorg.xkill xorg.xkill
zip zip
dig
## My scripts ## My scripts
frajul.edit-config frajul.edit-config

View File

@@ -22,19 +22,21 @@
calibre # ebook manager and viewer calibre # ebook manager and viewer
# digikam # digikam
discord discord
discord-ptb # in case discord updates take their time
# dvdisaster # dvdisaster
# element-desktop # element-desktop
# rocketchat-desktop # rocketchat-desktop
thunderbird thunderbird
tdesktop # telegram telegram-desktop # telegram
# schildichat-desktop # not updated regularly # schildichat-desktop # not updated regularly
nheko nheko
evince # Simple pdf reader, good for focusing on document content evince # Simple pdf reader, good for focusing on document content
firefox firefox
vivaldi
# geogebra # geogebra
cheese cheese
handbrake handbrake
kitty # Terminal # kitty # Terminal, already available as feature
libnotify libnotify
libreoffice libreoffice
mate.engrampa mate.engrampa
@@ -46,10 +48,10 @@
qpdfview qpdfview
# qutebrowser # qutebrowser
# realvnc-vnc-viewer # realvnc-vnc-viewer
rpi-imager # make isos # rpi-imager # make isos
# rustdesk # rustdesk
tor-browser tor-browser
unstable.path-of-building # Path of Building rusty-path-of-building # Path of Building for poe1 and poe2
# frajul.pob-dev-version # Path of Building # frajul.pob-dev-version # Path of Building
vlc vlc
wineWowPackages.stable # 32-bit and 64-bit wine wineWowPackages.stable # 32-bit and 64-bit wine
@@ -61,8 +63,12 @@
zotero # Manage papers and other sources zotero # Manage papers and other sources
pdfpc # Present slides in pdf form pdfpc # Present slides in pdf form
networkmanager-openvpn
keepassxc
## My scripts ## My scripts
frajul.open-messaging frajul.open-messaging
frajul.xwacomcalibrate frajul.xwacomcalibrate
frajul.pob2-frajul
]; ];
} }

View File

@@ -9,7 +9,7 @@
clippy clippy
cntr # nix debugger cntr # nix debugger
conda conda
micromamba # a better, faster conda # micromamba # a better, faster conda
devcontainer # development container devcontainer # development container
devenv # devbox alternative devenv # devbox alternative
dbeaver-bin dbeaver-bin
@@ -21,16 +21,21 @@
unstable.zed-editor unstable.zed-editor
jdk jdk
julia-bin julia-bin
(texlive.combine { # (texlive.combine {
# for rendering latex in inkscape # # for rendering latex in inkscape
inherit # inherit
(texlive) # (texlive)
scheme-medium # scheme-medium
standalone # standalone
amsmath # amsmath
preview # preview
; # # needed for org mode export
}) # wrapfig
# capt-of
# biblatex
# ;
# })
vagrant
matlab # Using nix-matlab overlay defined in flake matlab # Using nix-matlab overlay defined in flake
maven maven
nodejs nodejs
@@ -58,6 +63,7 @@
## My scripts ## My scripts
frajul.deploy-to-pianopi frajul.deploy-to-pianopi
frajul.rtklib
(pkgs.writeShellScriptBin "matlab-rsp" '' (pkgs.writeShellScriptBin "matlab-rsp" ''
matlab -desktop -sd "/home/julian/git/uwa-channel-model" -softwareopengl matlab -desktop -sd "/home/julian/git/uwa-channel-model" -softwareopengl

View File

@@ -0,0 +1,10 @@
{
programs.tmux = {
enable = true;
clock24 = true;
keyMode = "vi";
customPaneNavigationAndResize = true; # use hjkl
mouse = true;
prefix = "C-Space"; # use instead of C-b
};
}

View File

@@ -9,8 +9,8 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
exiftool exiftool
unar # extract archives unar # extract archives
xdragon # dragndrop dragon-drop # dragndrop
poppler_utils # pdf preview poppler-utils # pdf preview
fd fd
ripgrep ripgrep
fzf fzf
@@ -26,7 +26,7 @@
programs.yazi.enable = true; programs.yazi.enable = true;
programs.yazi.enableFishIntegration = true; programs.yazi.enableFishIntegration = true;
programs.yazi.settings.manager = { programs.yazi.settings.manager = {
sort_by = "modified"; sort_by = "mtime";
sort_reverse = true; sort_reverse = true;
show_hidden = true; show_hidden = true;
}; };

View File

@@ -20,7 +20,7 @@
"flakes" "flakes"
"ca-derivations" "ca-derivations"
]; ];
# warn-dirty = false; # TODO: do I want it? also for systems warn-dirty = false; # TODO: do I want it? also for systems
}; };
}; };

View File

@@ -19,12 +19,13 @@
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://cache.nixos.org/" "https://cache.nixos.org/"
"https://hyprland.cachix.org" "https://hyprland.cachix.org"
"http://binarycache.julian-mutter.de" "https://devenv.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"binarycache.julian-mutter.de:oJ67uRFwRhNPKL58CHzy3QQLv38Kx7OA1K+6xlEPu7E=" "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
]; ];
trusted-users = [ trusted-users = [
@@ -39,5 +40,8 @@
]; ];
# nix.settings. # warn-dirty = false; # TODO: do I want this # nix.settings. # warn-dirty = false; # TODO: do I want this
#
# Ensure we can still build when missing-server is not accessible
fallback = true;
}; };
} }

View File

@@ -6,11 +6,14 @@
./features/direnv ./features/direnv
./features/topgrade ./features/topgrade
./features/neovim ./features/neovim
./features/kitty ./features/ghostty
./features/wezterm ./features/wezterm
./features/alacritty
./features/yazi ./features/yazi
./features/emacs ./features/emacs
./features/tmux
./features/qt-distrobox
./features/hyprland ./features/hyprland
# ./features/i3 # ./features/i3
@@ -21,7 +24,7 @@
hostName = "kardorf"; hostName = "kardorf";
is-nixos = true; is-nixos = true;
terminal = "kitty"; terminal = "alacritty";
# --------- --------- # --------- ---------
# | DVI-D-1 | | DVI-D-2 | # | DVI-D-1 | | DVI-D-2 |

View File

@@ -14,8 +14,8 @@
is-nixos = true; is-nixos = true;
terminal = "wezterm"; terminal = "wezterm";
services.syncthing.tray.enable = true; # services.syncthing.tray.enable = true;
services.syncthing.tray.command = "syncthingtray --wait"; # Wait for tray to become available # services.syncthing.tray.command = "syncthingtray --wait"; # Wait for tray to become available
home.packages = with pkgs; [ home.packages = with pkgs; [
music-reader music-reader
@@ -27,9 +27,34 @@
onboard onboard
]; ];
programs.firefox = {
enable = true;
profiles.default = {
isDefault = true;
settings = {
"browser.startup.homepage" = "https://sheets.julian-mutter.de";
"browser.startup.page" = 1; # 0=blank, 1=home page, 3=restore previous session
};
};
};
programs.chromium = {
enable = true;
# commandLineArgs = [
# "--homepage=https://sheets.julian-mutter.de"
# "--no-first-run"
# ];
};
# Autostart link # Autostart link
home.file = { home.file = {
".config/autostart/sheet-organizer.desktop".source = "${pkgs.sheet-organizer}/share/applications/sheet-organizer.desktop"; # ".config/autostart/sheet-organizer.desktop".source = "${pkgs.sheet-organizer}/share/applications/sheet-organizer.desktop";
".config/autostart/firefox.desktop".source = "${pkgs.firefox}/share/applications/firefox.desktop";
".config/autostart/onboard.desktop".source = "${pkgs.onboard}/share/applications/onboard.desktop";
# ".config/autostart/chromium.desktop".source = "${pkgs.chromium}/share/applications/chromium.desktop";
".config/sheet-organizer/config.toml".text = '' ".config/sheet-organizer/config.toml".text = ''
working_directory = "/home/julian/Klavier" working_directory = "/home/julian/Klavier"
''; '';

View File

@@ -13,12 +13,15 @@
../features/yazi ../features/yazi
../features/emacs ../features/emacs
../features/nix-helper ../features/nix-helper
../features/qt-distrobox
]; ];
hostName = "aspi"; hostName = "aspi";
is-nixos = false; is-nixos = false;
# terminal = "kitty"; # terminal = "kitty";
home.sessionPath = ["/snap/bin"];
home.packages = home.packages =
lib.lists.concatMap (packages-list-file: import packages-list-file {inherit pkgs;}) lib.lists.concatMap (packages-list-file: import packages-list-file {inherit pkgs;})
[ [

View File

@@ -5,7 +5,7 @@ with pkgs; [
dejavu_fonts dejavu_fonts
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-emoji noto-fonts-color-emoji
liberation_ttf liberation_ttf
fira-code fira-code
fira-code-symbols fira-code-symbols

View File

@@ -31,7 +31,7 @@ with pkgs; [
ffmpeg ffmpeg
julia-bin julia-bin
poppler_utils # Pdf utils including pdfimages poppler-utils # Pdf utils including pdfimages
sage sage
pkg-config # Often needed to build something pkg-config # Often needed to build something

View File

@@ -4,6 +4,9 @@
../common/global ../common/global
../common/users/julian ../common/users/julian
../common/users/yukari
../common/users/pob
../common/optional/binarycaches.nix
../common/optional/remote-builder.nix ../common/optional/remote-builder.nix
../common/optional/boot-efi.nix ../common/optional/boot-efi.nix
@@ -26,21 +29,30 @@
networking.hostName = "aspi"; networking.hostName = "aspi";
system.stateVersion = "24.05"; system.stateVersion = "24.05";
# networking.firewall.checkReversePath = false; # Makes wg interface with all ips work
modules = { modules = {
syncthing = { syncthing = {
enable = true; enable = true;
overrideSettings = false; overrideSettings = false;
}; };
frajulAutoUpgrade = {
enable = true;
flakePath = "/home/julian/.dotfiles";
};
}; };
programs.hyprland.enable = true;
services.desktopManager.plasma6.enable = true;
services.blueman.enable = true; services.blueman.enable = true;
services.upower.enable = true; services.upower.enable = true;
programs.steam.enable = true; programs.steam.enable = true;
# TODO: not working # TODO: not working
services.logind.lidSwitch = "lock"; # services.logind.lidSwitch = "lock";
services.logind.lidSwitchDocked = "lock"; # services.logind.lidSwitchDocked = "lock";
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;

View File

@@ -1,22 +1,39 @@
# sudo nixos-rebuild switch --flake .#builder --target-host root@192.168.3.118 # sudo nixos-rebuild switch --flake .#builder --target-host root@192.168.3.118
# or # or
# deploy .#builder # deploy .#builder
{config, ...}: { {
config,
pkgs,
...
}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../common/global ../common/global/fish.nix # fish for admin
../common/global/locale.nix
../common/global/nix.nix
../common/global/sops.nix
../common/global/root.nix
]; ];
networking.hostName = "builder"; networking.hostName = "builder";
system.stateVersion = "23.11"; system.stateVersion = "23.11";
networking.networkmanager.enable = true;
networking.nameservers = [
"192.168.3.252"
"172.30.20.10"
"1.1.1.1"
];
users.mutableUsers = false;
users.users.nix = { users.users.nix = {
isNormalUser = true; isNormalUser = true;
description = "Nix"; description = "Nix";
extraGroups = [ extraGroups = [
"networkmanager" "networkmanager"
"wheel" "wheel"
"docker"
]; ];
}; };
@@ -30,14 +47,33 @@
substituters = [ substituters = [
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://cache.nixos.org/" "https://cache.nixos.org/"
"https://hyprland.cachix.org"
"https://devenv.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
]; ];
trusted-public-keys = ["nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];
trusted-users = ["nix"]; trusted-users = ["nix"];
max-jobs = "auto"; max-jobs = "auto";
cores = 0; cores = 0;
# Ensure we can still build when missing-server is not accessible
fallback = true;
}; };
# system.autoUpgrade = {
# enable = true;
# flake = "git+https://gitlab.julian-mutter.de/julian/dotfiles";
# flags = [
# "--recreate-lock-file" # update lock file
# ];
# dates = "02:13";
# };
# optimize store by hardlinking store files # optimize store by hardlinking store files
nix.optimise.automatic = true; nix.optimise.automatic = true;
nix.optimise.dates = ["03:15"]; nix.optimise.dates = ["03:15"];
@@ -83,9 +119,28 @@
services.openssh = { services.openssh = {
enable = true; enable = true;
# require public key authentication for better security # require public key authentication for better security
settings.PasswordAuthentication = true; settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false; settings.KbdInteractiveAuthentication = false;
settings.PermitRootLogin = "yes"; settings.PermitRootLogin = "yes";
# Add older algorithms for jenkins ssh-agents-plugin to be compatible
settings.Macs = [
"hmac-sha2-512-etm@openssh.com"
"hmac-sha2-256-etm@openssh.com"
"umac-128-etm@openssh.com"
"hmac-sha2-512"
"hmac-sha2-256"
"umac-128@openssh.com"
];
settings.KexAlgorithms = [
"diffie-hellman-group-exchange-sha1"
"diffie-hellman-group14-sha1"
"mlkem768x25519-sha256"
"sntrup761x25519-sha512"
"sntrup761x25519-sha512@openssh.com"
"curve25519-sha256"
"curve25519-sha256@libssh.org"
"diffie-hellman-group-exchange-sha256"
];
}; };
users.users."root".openssh.authorizedKeys.keys = [ users.users."root".openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFjSZYdoF/51F+ykcBAYVCzCPTF5EEigWBL1APiR0h+H julian@aspi" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFjSZYdoF/51F+ykcBAYVCzCPTF5EEigWBL1APiR0h+H julian@aspi"
@@ -183,7 +238,16 @@
url = "https://gitlab.julian-mutter.de"; url = "https://gitlab.julian-mutter.de";
name = "builder"; name = "builder";
tokenFile = config.sops.secrets."gitea_token".path; tokenFile = config.sops.secrets."gitea_token".path;
labels = []; # use default labels labels = [
# provide a debian base with nodejs for actions
"debian-latest:docker://node:18-bullseye"
# fake the ubuntu name, because node provides no ubuntu builds
"ubuntu-latest:docker://node:18-bullseye"
# devenv
"devenv:docker://ghcr.io/cachix/devenv/devenv:latest"
# provide native execution on the host
"nixos:host"
];
}; };
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
@@ -241,4 +305,41 @@
}; };
}; };
}; };
services.gitlab-runner.enable = true;
# runner for everything else
#
sops.secrets."gitlab_runner_token".sopsFile = ./secrets.yaml;
services.gitlab-runner.services.default = {
# File should contain at least these two variables:
authenticationTokenConfigFile = config.sops.secrets."gitlab_runner_token".path;
dockerImage = "alpine:latest";
dockerVolumes = [
"/var/run/docker.sock:/var/run/docker.sock"
];
};
### Jenkins node
users.users.jenkins = {
createHome = true;
home = "/var/lib/jenkins";
group = "jenkins";
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ36sQhVz3kUEi8754G7r3rboihhG4iqFK/UvQm6SING jenkins@home"
];
packages = with pkgs; [
git
devenv
];
extraGroups = [
"docker"
];
};
users.groups.jenkins = {};
programs.java = {
enable = true;
package = pkgs.jdk21; # Same as jenkins version on home
};
} }

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,16 @@
{
inputs,
config,
...
}: {
system.hydraAutoUpgrade = {
# Only enable if not dirty
enable = inputs.self ? rev;
dates = "*:0/10"; # Every 10 minutes
instance = "http://hydra.julian-mutter.de";
project = "dotfiles";
jobset = "main";
job = "hosts.${config.networking.hostName}";
oldFlakeRef = "self";
};
}

View File

@@ -2,6 +2,8 @@
{ {
inputs, inputs,
outputs, outputs,
pkgs,
lib,
... ...
}: { }: {
imports = imports =
@@ -22,13 +24,26 @@
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
# Networking # Networking
networking.networkmanager.enable = true; networking.networkmanager = {
enable = true;
plugins = with pkgs; [
networkmanager-openconnect
];
};
services.resolved.enable = true; services.resolved.enable = true;
# MDNS Taken by avahi
services.resolved.extraConfig = ''
MulticastDNS=false
'';
programs.dconf.enable = true; networking.nameservers = lib.mkDefault [
"1.1.1.1"
"8.8.8.8"
];
# HM # HM module
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true; # hm module uses the pkgs of the nixos config
home-manager.backupFileExtension = "hm-backup"; # backup conflicting files. So hm activation never fails
home-manager.extraSpecialArgs = { home-manager.extraSpecialArgs = {
inherit inputs outputs; inherit inputs outputs;
}; };

View File

@@ -2,7 +2,8 @@
lib, lib,
outputs, outputs,
... ...
}: { }:
{
# Apply overlays # Apply overlays
nixpkgs = { nixpkgs = {
# TODO: apply this to hm and nixos without duplicate code # TODO: apply this to hm and nixos without duplicate code
@@ -18,7 +19,9 @@
}; };
}; };
nix.settings.auto-optimise-store = lib.mkDefault true; # optimize at every build, slows down builds
# better to do optimise.automatic for regular optimising
# nix.settings.auto-optimise-store = lib.mkDefault true;
nix.settings.experimental-features = [ nix.settings.experimental-features = [
"nix-command" "nix-command"
"flakes" "flakes"
@@ -26,31 +29,14 @@
]; ];
# warn-dirty = false; # warn-dirty = false;
# Setup binary caches
nix.settings = {
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
"https://hyprland.cachix.org"
"http://binarycache.julian-mutter.de"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"binarycache.julian-mutter.de:oJ67uRFwRhNPKL58CHzy3QQLv38Kx7OA1K+6xlEPu7E="
];
trusted-users = [
"root"
"@wheel"
]; # needed for devenv to add custom caches
};
nix.gc = { nix.gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
# Keep the last 3 generations options = "--delete-older-than 30d";
options = "--delete-older-than +3"; };
nix.optimise = {
automatic = true;
dates = [ "weekly" ]; # Optional; allows customizing optimisation schedule
}; };
programs.nix-ld.enable = true; programs.nix-ld.enable = true;

View File

@@ -13,7 +13,7 @@ in {
sshKeyPaths = map getKeyPath keys; sshKeyPaths = map getKeyPath keys;
# TODO: remove? only rely on ssh or pgp keys (e.g. ubikey like misterio is using!!!) # TODO: remove? only rely on ssh or pgp keys (e.g. ubikey like misterio is using!!!)
keyFile = "/home/julian/.config/sops/age/keys.txt"; # keyFile = "/home/julian/.config/sops/age/keys.txt";
# Generate key if none of the above worked. With this, building will still work, just without secrets # Generate key if none of the above worked. With this, building will still work, just without secrets
generateKey = false; # TODO: building should not work without secrets!? generateKey = false; # TODO: building should not work without secrets!?
}; };

View File

@@ -1,8 +1,14 @@
{pkgs, ...}: { {
pkgs,
lib,
...
}: {
# Make programs like nextcloud client access saved passwords # Make programs like nextcloud client access saved passwords
programs.seahorse.enable = true;
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
programs.seahorse.enable = true;
programs.ssh.askPassword = lib.mkForce "${pkgs.seahorse}/libexec/seahorse/ssh-askpass"; # Solve conflicting definition in seahorse and plasma6
# Make authentication work for e.g. gparted # Make authentication work for e.g. gparted
security.polkit.enable = true; security.polkit.enable = true;
systemd = { systemd = {

View File

@@ -3,7 +3,10 @@
services.avahi = { services.avahi = {
enable = true; enable = true;
nssmdns4 = true; nssmdns4 = true;
nssmdns6 = true;
publish.enable = true; publish.enable = true;
publish.addresses = true; publish.addresses = true;
ipv4 = true;
ipv6 = true;
}; };
} }

View File

@@ -0,0 +1,31 @@
{
lib,
outputs,
...
}: {
# Setup binary caches
nix.settings = {
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
"https://hyprland.cachix.org"
"http://binarycache.julian-mutter.de"
"https://devenv.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"binarycache.julian-mutter.de:oJ67uRFwRhNPKL58CHzy3QQLv38Kx7OA1K+6xlEPu7E="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
];
trusted-users = [
"root"
"@wheel"
]; # needed for devenv to add custom caches
# Ensure we can still build when missing-server is not accessible
fallback = true;
};
}

View File

@@ -1,26 +1,9 @@
{ {config, ...}: let
pkgs,
lib,
config,
...
}: let
homeCfgs = config.home-manager.users; homeCfgs = config.home-manager.users;
homeSharePaths = lib.mapAttrsToList (_: v: "${v.home.path}/share") homeCfgs;
vars = ''XDG_DATA_DIRS="$XDG_DATA_DIRS:${lib.concatStringsSep ":" homeSharePaths}" GTK_USE_PORTAL=0'';
julianCfg = homeCfgs.julian; julianCfg = homeCfgs.julian;
sway-kiosk = command: "${lib.getExe pkgs.sway} --unsupported-gpu --config ${pkgs.writeText "kiosk.config" ''
output * bg #000000 solid_color
xwayland disable
input "type:touchpad" {
tap enabled
}
exec '${vars} ${command}; ${pkgs.sway}/bin/swaymsg exit'
''}";
in { in {
users.extraUsers.greeter = { users.extraUsers.greeter = {
# For caching and such # For caching
home = "/tmp/greeter-home"; home = "/tmp/greeter-home";
createHome = true; createHome = true;
}; };
@@ -33,13 +16,22 @@ in {
cursorTheme = { cursorTheme = {
inherit (julianCfg.gtk.cursorTheme) name package; inherit (julianCfg.gtk.cursorTheme) name package;
}; };
cageArgs = [
"-s"
"-m"
"last"
]; # multimonitor use last monitor
# settings.background = { # settings.background = {
# path = julianCfg.wallpaper; # path = julianCfg.wallpaper;
# fit = "Cover"; # fit = "Cover";
# }; # TODO: fix # }; # TODO: fix
};
services.greetd = { # TODO: setting keyboard language does not work
enable = true; # settings = {
settings.default_session.command = sway-kiosk (lib.getExe config.programs.regreet.package); # env = {
# XKB_DEFAULT_LAYOUT = "de";
# # XKB_DEFAULT_VARIANT = "altgr-intl";
# };
# };
}; };
} }

View File

@@ -13,7 +13,7 @@ in {
PasswordAuthentication = false; PasswordAuthentication = false;
PermitRootLogin = "no"; PermitRootLogin = "no";
# TODO: what does this d # TODO: what does this do
# Let WAYLAND_DISPLAY be forwarded # Let WAYLAND_DISPLAY be forwarded
AcceptEnv = "WAYLAND_DISPLAY"; AcceptEnv = "WAYLAND_DISPLAY";
X11Forwarding = true; X11Forwarding = true;
@@ -34,7 +34,7 @@ in {
# publicKeyFile = ../../${hostname}/ssh_host_ed25519_key.pub; # publicKeyFile = ../../${hostname}/ssh_host_ed25519_key.pub;
# extraHostNames = # extraHostNames =
# [ # [
# "${hostname}.m7.rs" # # "${hostname}.m7.rs"
# ] # ]
# ++ # ++
# # Alias for localhost if it's the same host # # Alias for localhost if it's the same host

View File

@@ -1,7 +1,7 @@
{pkgs, ...}: { {pkgs, ...}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
shared-mime-info # extended mimetype support shared-mime-info # extended mimetype support
lxde.lxmenu-data # open with "Installed Applications" lxmenu-data # open with "Installed Applications"
pcmanfm pcmanfm
]; ];

View File

@@ -3,6 +3,7 @@
services.pulseaudio.enable = false; services.pulseaudio.enable = false;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
wireplumber.enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
@@ -14,6 +15,14 @@
"module.x11.bell" = false; "module.x11.bell" = false;
}; };
}; };
"10-increase-buffer" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.quantum" = 1024;
"default.clock.min-quantum" = 1024;
"default.clock.max-quantum" = 2048;
};
};
}; };
}; };
} }

View File

@@ -14,29 +14,38 @@ sops:
- recipient: age1ee5udznhadk6m7jtglu4709rep080yjyd2ukzdl8jma4mm92y3psv0slpg - recipient: age1ee5udznhadk6m7jtglu4709rep080yjyd2ukzdl8jma4mm92y3psv0slpg
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBTY3lFZlIyRnZOMzNQdnJ2 YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBualdnWmtBTThhZDFVdDRP
Z0xQQnY1eHFYekVMV3M0UE5hK2xkbStveFRnCncwVVduSEFFQkpwME5XQzF2Z0tK WHlMamk1MFhUYUwwa0hyQmpobGNocC9VR0ZVCmc3N1FjcUZCNUdTTm91OVpwZDhP
MnhFQ3ZZMk51aGJHUmJFbHA4d1dmdkEKLS0tIHBkVEhaZEY5ZGtYcXRkZzREa0xR bTNXekp2bDd3Tjh6a2ZVTVNTSW9RTU0KLS0tIGJpcUVHb2ZlODgvelhwQ0JFU3l5
eUNsNjE2VS9MTjNtYWluUjJhYXVuTmcKq175s9vx1tPVS+voO+HSkyaT+GbjC/Z+ WU5VanhYMTUvNklYazJxOXVveXhpM2cKCo+4FhhcbRylASEbQb9rAQUzEO1D+0AR
PyKVKyqFAJCRcNP2byaFgAHjXtDFZdipt/0lbw+4UfHrZGpn+9B59Q== 52Jzc9s9rSdypeBRE7SaSOI4eVnkEjPfyhNFvMdxiBzBj7GdocpmCw==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: age1q8lc5340gz5xw2f57nglrss68wv0j0hf36py2pdtrl6ky3yrq9qqk0njr4 - recipient: age1q8lc5340gz5xw2f57nglrss68wv0j0hf36py2pdtrl6ky3yrq9qqk0njr4
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByRmxCNUE4MTdZNWlOcmxX YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4STZpU0ZnRzVVOFFRUXZG
RmhDS2NpQ0hoWG83SDlIeVhXaFdxNE4yTUVzCkRxS3M5aU5mdWZkYnpNeC9YR3BX akcwS2Z5V3lmQzRTSGNHT2hDME5JMks2QTNNClpkZzNMc0wyRjVEaVlBRFlyNFhs
N1NEdzlyTm9YT3NQSnowWTZUc1FvYWsKLS0tICs2OVo2djNjUW0yOG41ZTJQeFFB M1pyeW1XdnZubnRxMzEzMFJoK0lkVVEKLS0tIENhRExzUWRWMUlObmhxazM5cU9y
djFENU5USG1QSnRVdlErN1h5bXJhYzQKPDvAHIMR/vT47zbeK3NsS+jSl4HSFRIA aDFyaDJackFoaEZOYWdTbWt0ODB1bm8Kg1VDAj5/i8ZbYxspIdXrI474YN5YkV4H
NbSKwTbEGn963metTh4HJItdWBAOyiCc3l1Ye49ms9JhYM8n4wHLRQ== 86maCRDfUxO5lvu4zBa9pOmFtJ2iuJ2MxDnmCSHTl+GOk8yyUT8JhA==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: age1hsmfz8fjxu83sax9lr487h8xr6cyge0apdq4zpge4c8jpcjj2cksj825ct - recipient: age1tguyu2yd5xv8rgjjl50cq6dq5rr7umqgv098dgre4u9wyj30ea7sexw62c
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBVeHJ3NmMzaTh0Zm13Vm1r YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAveE9NV2JCOW9odlN6Wmkw
RmNtMi9FYmJGUmxXeEppM3Fnazl1NTl3ajJjCjFrbXM4WGdOV05qckhkbjlSODZR WFEvU2pka3htV2FTTFlpc05ES2JjbGxTaFJZCjhYdG1sRVBFaEF3YjNkWEw3Ny8x
a0VuakllVTdOc2Uxd3BqRmtsN3NJdHcKLS0tIHRRMXFEcWNZOFE4dFJycGdGTzdP MlYyTjJBMHA2YVpHRkkwWW5hNDdrS1UKLS0tIFZXTFNVbkd6VFExc0dSVU4vd3JF
WittUTFFNU5kUWdGcncwdWRQSi9STTgK3GuwolsItCEt3Dh5Lycb8TjfaHTuV/JB ajlFY2pvWW13VGxOZ0hEc3dMbU9IeUUKNSf7ycj+1XHhsoghmY2iR1BwIySqfIOF
P2KSuVsbgjYuCJSknYmSZ+9gdTYC8cVqDnKo7HYFNrCDHZ0P4QwGSg== zawE+MQcQg0u+fy6Aik26eUGvQG3rya2Fx2+3VlAbKB+rbiP0fwsgg==
-----END AGE ENCRYPTED FILE-----
- recipient: age15lxw97z03q40xrdscnxqqugh5ky5aqrerg2t2rphkcqm6rnllurq8v98q5
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBxaTNJNkJ0RVJiYlRzcmlX
TmEweVdLaGpoVXMxZEFDU3dOZTJCRjdiNENBCkZ3bjJUNm1vcmY1ZUpZcEo4OGxa
UWJKSjNKL002UDhmTmJER2M0MjJ3aG8KLS0tIFMvZjBkOS83T3NDUE82M3kweVNw
VXhoN0VyWkVxMEJPQ3orVUNDK21rRU0KvnmuFxcCpP+LZg7v5jaStw9F0owVrQl9
AkIq7GUJh7xewLxcVZfiBRpXMhw/mM8LYnd2KGP8R/TfYg+v0//+5A==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2025-04-23T07:00:17Z" lastmodified: "2025-04-23T07:00:17Z"
mac: ENC[AES256_GCM,data:JgaTIRbzD0hs2o86xUlQrPN2cPXvsuTH/zKG5xbQIDaYcEvD/mkuVa3hfnYKrA91kWg2Y1DgEi9583+o6UCl/+ldY4ptu+xpnYfyQFdhM4rB+KoP/pDt8vQKQ3zAX8fpAkugCgTTbuvm3TfQ1nt98V8boyhCn4JHNC1T0j7ZtZI=,iv:G3YJOLeDWDKuANo2mxS2JAdrRaonD87CU9BpCZZrlRs=,tag:mcKIdP5cSQUwNL2tcv/o6g==,type:str] mac: ENC[AES256_GCM,data:JgaTIRbzD0hs2o86xUlQrPN2cPXvsuTH/zKG5xbQIDaYcEvD/mkuVa3hfnYKrA91kWg2Y1DgEi9583+o6UCl/+ldY4ptu+xpnYfyQFdhM4rB+KoP/pDt8vQKQ3zAX8fpAkugCgTTbuvm3TfQ1nt98V8boyhCn4JHNC1T0j7ZtZI=,iv:G3YJOLeDWDKuANo2mxS2JAdrRaonD87CU9BpCZZrlRs=,tag:mcKIdP5cSQUwNL2tcv/o6g==,type:str]

View File

@@ -17,12 +17,15 @@ in {
"networkmanager" "networkmanager"
"wheel" "wheel"
"audio" "audio"
"realtime"
"rtkit"
"network" "network"
"video" "video"
"podman" "podman"
"docker" "docker"
"git" "git"
"gamemode" "gamemode"
"dialout"
]; ];
openssh.authorizedKeys.keys = lib.splitString "\n" ( openssh.authorizedKeys.keys = lib.splitString "\n" (

View File

@@ -0,0 +1,28 @@
{
pkgs,
config,
...
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
users.mutableUsers = false;
users.users.pob = {
description = "A helper user to use another profile for some applications";
group = "pob";
isNormalUser = true;
shell = pkgs.fish;
extraGroups = ifTheyExist [
"networkmanager"
];
packages = with pkgs; [
firefox
wineWowPackages.stable # 32-bit and 64-bit wine
winetricks
];
};
users.groups.pob = {};
security.sudo.extraConfig = ''
julian ALL=(pob) NOPASSWD: ALL
'';
}

View File

@@ -0,0 +1,97 @@
{
pkgs,
config,
lib,
outputs,
...
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
users.mutableUsers = false;
users.users.yukari = {
description = "Yukari";
group = "yukari";
isNormalUser = true;
shell = pkgs.fish;
extraGroups = ifTheyExist [
"networkmanager"
"audio"
"network"
"video"
"podman"
"docker"
"git"
"gamemode"
];
createHome = true;
hashedPassword = "$y$j9T$rGuTL0rfiy7ht8L58BGCw0$fN.KwHjYlIitFEPHndKvV06ezgeWzP3/58o1kkviZwB";
packages = [pkgs.home-manager];
};
users.groups.yukari = {};
home-manager.users.yukari = {
imports =
[
../../../../homes/julian/features/fonts
../../../../homes/julian/features/suites/cli
]
++ (builtins.attrValues outputs.homeManagerModules);
home = {
username = lib.mkDefault "yukari";
homeDirectory = lib.mkDefault "/home/${config.home.username}";
stateVersion = lib.mkDefault "23.11";
sessionPath = ["$HOME/.local/bin"];
packages = with pkgs; [
arandr
calibre # ebook manager and viewer
# digikam
discord
discord-ptb # in case discord updates take their time
# dvdisaster
# element-desktop
# rocketchat-desktop
thunderbird
telegram-desktop # telegram
# schildichat-desktop # not updated regularly
nheko
evince # Simple pdf reader, good for focusing on document content
firefox
vivaldi
# geogebra
cheese
handbrake
# kitty # Terminal, already available as feature
libnotify
libreoffice
mate.engrampa
nomacs # Image viewer
kdePackages.okular # Pdf reader with many features, good for commenting documents
pavucontrol
qalculate-gtk # Nice gui calculator
qpdfview
# qutebrowser
# realvnc-vnc-viewer
# rustdesk
tor-browser
# frajul.pob-dev-version # Path of Building
vlc
wineWowPackages.stable # 32-bit and 64-bit wine
winetricks
xclip # x11 clipboard access from terminal
xfce.mousepad # simple text editor
xournalpp # Edit pdf files
zoom-us # Video conferencing
zotero # Manage papers and other sources
pdfpc # Present slides in pdf form
];
};
programs = {
home-manager.enable = true;
git.enable = true;
};
};
}

View File

@@ -1,22 +1,29 @@
{pkgs, ...}: { { pkgs, ... }:
{
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../common/global ../common/global
../common/users/julian ../common/users/julian
../common/users/wolfi ../common/users/wolfi
../common/optional/binarycaches.nix
# ../common/optional/xserver.nix
../common/optional/remote-builder.nix ../common/optional/remote-builder.nix
../common/optional/boot-efi.nix ../common/optional/boot-efi.nix
../common/optional/greetd.nix ../common/optional/greetd.nix
# ../common/optional/gdm.nix
# ../common/optional/i3.nix
../common/optional/authentication.nix ../common/optional/authentication.nix
../common/optional/pcmanfm.nix ../common/optional/pcmanfm.nix
../common/optional/pipewire.nix ../common/optional/pipewire.nix
../common/optional/virtualbox.nix
# ../common/optional/gdm.nix
# ../common/optional/i3.nix
../common/optional/openssh.nix
../common/optional/podman.nix ../common/optional/podman.nix
../common/optional/flatpak.nix ../common/optional/flatpak.nix
]; ];
@@ -27,15 +34,17 @@
# Not using the drivers leads to way better results # Not using the drivers leads to way better results
# services.xserver.videoDrivers = [ "nvidia" ]; # services.xserver.videoDrivers = [ "nvidia" ];
networking.networkmanager.insertNameservers = [ "192.168.3.252" ];
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
# services.xserver.desktopManager.xfce.enable = true; programs.hyprland.enable = true;
services.xserver.desktopManager.plasma6.enable = true; services.desktopManager.plasma6.enable = true;
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
services.printing.browsing = true; services.printing.browsing = true;
services.printing.drivers = with pkgs; [gutenprint]; services.printing.drivers = with pkgs; [ gutenprint ];
services.libinput.enable = true; services.libinput.enable = true;
} }

View File

@@ -80,9 +80,10 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470; # Use latest version of driver
# hardware.nvidia.modesetting.enable = true; # produces errors, display manager fails to start # hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
hardware.nvidia.modesetting.enable = true; # produces errors, display manager fails to start
# hardware.nvidia.nvidiaSettings = true; hardware.nvidia.nvidiaSettings = true;
hardware.nvidia.open = false; hardware.nvidia.open = false;
} }

View File

@@ -15,27 +15,74 @@
../common/global ../common/global
../common/users/julian ../common/users/julian
../common/optional/binarycaches.nix
../common/optional/pipewire.nix ../common/optional/pipewire.nix
../common/optional/remote-builder.nix ../common/optional/remote-builder.nix
../common/optional/pcmanfm.nix ../common/optional/pcmanfm.nix
../common/optional/redshift.nix ../common/optional/redshift.nix
../common/optional/authentication.nix ../common/optional/authentication.nix
../common/optional/avahi.nix
];
environment.systemPackages = [
(pkgs.python3.withPackages (p:
with p; [
numpy
pillow
flask
rpi-gpio
webcolors
psutil
mido
rtmidi-python
spidev
waitress
websockets
werkzeug
pkgs.frajul.rpi-ws281x-python
]))
]; ];
# disko.devices.disk.main.device = "/dev/mmcblk1"; # disko.devices.disk.main.device = "/dev/mmcblk1";
# networking.wireless.enable = true; # enabled by fish, disabling speeds up builds
# networking.wireless.environmentFile = config.sops.secrets."wifi/pianonix".path; documentation.man.generateCaches = false;
# networking.wireless.networks = {
# "@SSID@".psk = "@PSK@"; # networking.enableIPv6 = false; # This only leads to issues with avahi
# services.avahi.ipv6 = false;
hardware.raspberry-pi."4".bluetooth.enable = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true; # bluetooth gui
# raspberry pi specific
# systemd.services.btattach = {
# before = [ "bluetooth.service" ];
# after = [ "dev-ttyAMA0.device" ];
# wantedBy = [ "multi-user.target" ];
# serviceConfig = {
# ExecStart = "${pkgs.bluez}/bin/btattach -B /dev/ttyAMA0 -P bcm -S 3000000";
# };
# }; # };
# networking.wireless.enable = true;
# networking.wireless.secretsFile = config.sops.secrets."wifi/pianonix".path;
# networking.wireless.networks = {
# "SMARTments".pskRaw = "ext:PSK";
# };
# networking.networkmanager.enable = lib.mkForce false;
services.gnome.at-spi2-core.enable = true; # for onboard
networking.hostName = "pianonix"; networking.hostName = "pianonix";
system.stateVersion = "22.11"; system.stateVersion = "22.11";
sops.secrets."vnc-passwd" = { sops.secrets."vnc-passwd" = {
owner = config.users.users.julian.name; owner = config.users.users.julian.name;
sopsFile = ./vnc-passwd; sopsFile = ./secrets-vnc-passwd.bin;
format = "binary"; format = "binary";
}; };
sops.secrets."wifi/pianonix" = {}; sops.secrets."wifi/pianonix" = {};
@@ -44,6 +91,18 @@
# sops.secrets."syncthing/public-keys/aspi-nix" = { }; # sops.secrets."syncthing/public-keys/aspi-nix" = { };
# sops.secrets."syncthing/public-keys/pianonix" = { }; # sops.secrets."syncthing/public-keys/pianonix" = { };
sops.secrets."wg-config" = {
sopsFile = ./secrets-wg-config.bin;
format = "binary";
};
networking.wg-quick.interfaces = {
home = {
configFile = config.sops.secrets."wg-config".path;
autostart = true; # This interface is started on boot
};
};
modules = { modules = {
syncthing = { syncthing = {
enable = true; enable = true;
@@ -53,6 +112,7 @@
# Enable the Desktop Environment. # Enable the Desktop Environment.
# services.xserver.displayManager.lightdm.enable = true; # services.xserver.displayManager.lightdm.enable = true;
services.displayManager.defaultSession = "xfce";
services.displayManager.autoLogin = { services.displayManager.autoLogin = {
enable = true; enable = true;
user = "julian"; user = "julian";
@@ -72,10 +132,11 @@
}; };
}; };
boot.loader.timeout = 1; # Set boot loader timeout to 1s boot.loader.timeout = lib.mkForce 1; # Set boot loader timeout to 1s
# De-facto disable network manager, which is enabled by gnome # De-facto disable network manager, which is enabled by gnome
# networking.networkmanager.unmanaged = [ "*" ]; # networking.networkmanager.unmanaged = [ "*" ];
services.xserver.enable = true;
services.xserver.desktopManager = { services.xserver.desktopManager = {
xfce = { xfce = {
enable = true; enable = true;
@@ -128,7 +189,7 @@
}; };
}; };
networking.firewall.enable = true; networking.firewall.enable = false;
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
5900 # for vnc 5900 # for vnc
]; ];
@@ -155,4 +216,61 @@
# boot.loader.raspberryPi.firmwareConfig = '' # boot.loader.raspberryPi.firmwareConfig = ''
# dtparam=audio=on # dtparam=audio=on
# ''; # '';
## Enable SPI
hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = true;
hardware.deviceTree = {
enable = true;
filter = lib.mkForce "*-rpi-4*.dtb";
overlays = [
{
name = "spi";
dtboFile = ./spi0-0cs.dtbo;
}
];
};
users.groups.spi = {};
# services.udev.extraRules = ''
# SUBSYSTEM=="spidev", KERNEL=="spidev0.0", GROUP="spi", MODE="0660"
# '';
## Use GPIO as non-root
# Create gpio group
users.groups.gpio = {};
# Change permissions gpio devices
services.udev.extraRules = ''
SUBSYSTEM=="spidev", KERNEL=="spidev0.0", GROUP="spi", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", KERNEL=="gpiomem", GROUP="gpio",MODE="0660"
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", RUN+="${pkgs.bash}/bin/bash -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'"
SUBSYSTEM=="gpio", KERNEL=="gpio*", ACTION=="add",RUN+="${pkgs.bash}/bin/bash -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'"
'';
# Add user to group
users.users.julian.extraGroups = ["gpio"];
## My own Piano LED Visualizer
services.piano-led-visualizer.enable = true;
## Crude fix for avahi
systemd.timers.avahiRestart = {
description = "Restart avahi-daemon every 5 minutes";
wantedBy = ["timers.target"];
timerConfig = {
OnBootSec = "5min";
OnUnitActiveSec = "5min";
Unit = "avahiRestart.service";
};
};
systemd.services.avahiRestart = {
description = "Restart avahi-daemon service";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.systemd}/bin/systemctl restart avahi-daemon.service";
};
};
} }

View File

@@ -14,9 +14,16 @@
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
boot.kernelModules = []; boot.kernelModules = [];
boot.extraModulePackages = []; boot.extraModulePackages = [];
boot.kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
boot.blacklistedKernelModules = ["snd_bcm2835"]; # Disables sound, required for ws281x to work
# boot.supportedFilesystems = lib.mkForce [
# # remove zfs, since its incompatible with latest kernel
# "vfat"
# "ext4"
# ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4"; fsType = "ext4";
}; };

View File

@@ -0,0 +1,19 @@
{
"data": "ENC[AES256_GCM,data:13hToequR4A=,iv:U7a6mIOYanQjozPrL92edFrhdyuSJj14pqVa2tGE/zA=,tag:uyeE3dj7NTKPi0jNLkFMLA==,type:str]",
"sops": {
"age": [
{
"recipient": "age1ee5udznhadk6m7jtglu4709rep080yjyd2ukzdl8jma4mm92y3psv0slpg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBXWEFYNThYQkpuTW10MjNM\nU3pWYmE5UnBPUzhQSTltc3hXdk9EWkg5czI0CmxnK3FuYitGci9ndnRCZms4a0lD\nOWh4alF1MEtJUis5YVNyYXRLbVppNnMKLS0tIEQ5WVVIMzlIV0pnc2ZWMnc5bjE4\nR3lpbzJiRmljcWI4SWlOS2svZVBSYnMKYIfhDjNZPDxmws3Z3P55K7V/NHiukQ0u\n00Kk603U+1JhgfJBk0Y3tMo//vKCHQj87wtZoqDLEN7Gu+ZtHhkhow==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1tguyu2yd5xv8rgjjl50cq6dq5rr7umqgv098dgre4u9wyj30ea7sexw62c",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBjSVpBR1NPY0svSWNWYzFC\nZE1uTjZTRm9XM24wcXByajVDYUJ4Y3FmNUc0CkJMMXRtUE5mSjYwU25MYy9xNFlP\ndUNmYmJ5RVF0dG5LYjA4L1NnNEtCMVEKLS0tIFl0Slovd2NiWjg1VXJ1VDJwTWJQ\nTWFZeW1ZYisvenVycWYwZ1lkOXBaVVUKqGu6Q8IbiUAzazLKN95uAtmXJMPzx02u\nr/R8q7ugG8lX5pWX3H3P7vtBz57Oo3rWlRpUhN/4+PpijkJNUyr3XQ==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2024-12-01T16:14:57Z",
"mac": "ENC[AES256_GCM,data:zKz8OX1yi68Qn3X6HwdbgTCr/3ZVBh5Wz4KUACmWG3XhOEVi8uoDEdAxfKMDBqNzXLeDmxxTKj6TMLkk68ozDYJqu0OevVritnZqvBTr9VKGpMPBFN3DuaeqSZ6wjHGbce1iqO0kusnwopRbEWHmr/lZxiXTNgLPdN+p5Aszi54=,iv:resppfGPecKvKwqNwqecDBcXGhcTWSGZis8hf1jT0Us=,tag:V80P25Pr4HD9pUUrQHZSQg==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.8.1"
}
}

View File

@@ -0,0 +1,19 @@
{
"data": "ENC[AES256_GCM,data:SFc3K1hvBjeCS6ikLZl3vIPFJqsUrZZi9yO9tVuv14exKhOuK17HN/d+cYMtVxGwqQ/biFdXYdP8/sfTPwwZgd/wRLT2xRDMOg5ru7kj8sEhcOEYmrgYRLo3ImdWANFaxelWOmjEvzphTQ7guvXTo7BACUA9AygYa9Ou9bklYImWhOCsk8e9uz5afLZXscidiqUqqFuJNo3QGMDEAxFI2YC3OpLwEj5zlsI4AXEEHRVUxU1sVtspdolDaeiFIs/JW4jLu/2la6JyGJUluYXAThzL1LO39NA/MSNskMSedatz89vnCd9CP6Q3eT93vrUYAEY=,iv:e+tWIlHm4NH1w8AQAw6tvgCX9XOiroE1XmrSua3Bcg4=,tag:RwGpKtG9JzQ3TgcnzEV5Rg==,type:str]",
"sops": {
"age": [
{
"recipient": "age1ee5udznhadk6m7jtglu4709rep080yjyd2ukzdl8jma4mm92y3psv0slpg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBTYTFjRnpPVDAvQ0ZHZU0v\neEduOTVockFoZGhuMmZNd0w3bVFCVUQzUlI4CmZTaktOQWxrTDNpYXlPTm9SdlZZ\nN0dURmlHVFlHSjZpbkpGb09lTmVzWm8KLS0tIDhMWlFIRWFkQjcya0hjeUdUSklB\nbWlqNlVoR1BnWG9TM0RhWnI4a0J4YUEKGWIX77EVXYFVyA2u6CkF1cGfwd4Gq0Vb\nNqrlMUYEDZ5nO/eLWsAt2kj1/YFjkGw0iI02HLRHdxQ59vFyl3CS1Q==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1tguyu2yd5xv8rgjjl50cq6dq5rr7umqgv098dgre4u9wyj30ea7sexw62c",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBsNlZGdktzSGp0bzIyUjlR\nUU9LSXRrZTgxcEZwczhidWVOdGRnRFYrOVZZCmx3VzM4V2dsWmZpUWxNUG82MzU2\nT3dmQjRwdmRJbTJxVm9vQjJKU3JXSncKLS0tIFlhYy9uQW5aa1E0K3Q1RUFSQkZP\nR29sY3RCYVg5bGdqMU1uc0E3Szhmb0kKFzKHUVNDdHWfycb7xWeAyIVlC4ab7ivR\nVlfmbPAXq2THw/s4zk/ckfE5RP82a1aX4++XRa7fm5KXpI8vExjJ5A==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-10-14T06:56:31Z",
"mac": "ENC[AES256_GCM,data:DrcOET5U6veg0qhcBjQQ5neCdTUufMxhIz4ZQzvzd+YxKfAqaq8R1PW5VVlUjhDBaUH9i3J1Wj6X4E600uhayY0E9I5VqfO84hqlosfZWPiWPO8prK46Y7R3Ybdh9uvWQxiaSxy8KHXsdDgsBFLlmLe/QvsDSUv56rPofkm06vg=,iv:XBFP8ANpsszeXqQIE/v7+GmZGlFtxgE/EtgL/Cc3x+8=,tag:ZJgO+hLuwIatE55wo94RVw==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.11.0"
}
}

Binary file not shown.

View File

@@ -1,28 +0,0 @@
{
"data": "ENC[AES256_GCM,data:13hToequR4A=,iv:U7a6mIOYanQjozPrL92edFrhdyuSJj14pqVa2tGE/zA=,tag:uyeE3dj7NTKPi0jNLkFMLA==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age1ee5udznhadk6m7jtglu4709rep080yjyd2ukzdl8jma4mm92y3psv0slpg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWWUp5TU9kWTNpa0s5TFRC\nK1hoc0d0K3JQYWN3VVVWM2JvemtieGo2UGpVCit5MUcvZldBZkNNZ3ZWTWRtd0Zx\nT3I4aTdUcitPRmhhV0htZlhEYjhRakUKLS0tIEdmYUI4N1g1Nkp3YzdtaHJybVcz\neFNwUnd0Vyt2MTBpRTZlMzZnNHJGd1EKy/0zXv9CPf5k0ky7TBGY9GbcIeQyPk1L\nKmMCuWMLX0yTGqB3M3/UNdoc4L0q//7keUZH5PlkxJbnu6IN3fE5qg==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1q8lc5340gz5xw2f57nglrss68wv0j0hf36py2pdtrl6ky3yrq9qqk0njr4",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBMdy9tZlZtNFJPRFNUUUNI\nUWtPZmZOY1V5SHc5bTZOZVluTUV6N3dlQWprClVqK2tKNFlBWHdyNDF1Q0d2bi9z\naldTTDdWYzZ6WmgrNHlZSDlTSU9SbmsKLS0tIDJZM2Y4ZDVmZk54eTZLOTU4Ui9X\nR3l3WDkwRWUyakFLdGZXeDJxRUJsaHMK6hgZ1KYe9qx4tO7RervEAKGjNHg4mi0E\nxx3I9P8MFzPiCVKG5ZNxRx25y7H4bQSRRtxIlXIhqzf2+5Q6U7/Hrw==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1hsmfz8fjxu83sax9lr487h8xr6cyge0apdq4zpge4c8jpcjj2cksj825ct",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA2cUg4dUlCY0IwS3pPeTF5\nZTVkRTkzaVBYTmh0MmYyaHlOaFRHSnk5dWs4CmhvaTlSOTFDQzZmbHVudXpwQitV\nQjhRQWl3OHNLVGJYMm1ObVEyQmhxS0kKLS0tIDJsZnN4K2pUOEdIYVg4ZlQ5Ujhn\nNlpGL1hMVXd5cWR2YkdIVmJiblMzR1EKJYS51sKQ/tBV7dv88pOxJhzHQGckoF8q\nwIioVjs9sm4JBgQqSIbVhXwnKl05IUkyAgw6LfsbSJz3nKe7lmmRpg==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2024-12-01T16:14:57Z",
"mac": "ENC[AES256_GCM,data:zKz8OX1yi68Qn3X6HwdbgTCr/3ZVBh5Wz4KUACmWG3XhOEVi8uoDEdAxfKMDBqNzXLeDmxxTKj6TMLkk68ozDYJqu0OevVritnZqvBTr9VKGpMPBFN3DuaeqSZ6wjHGbce1iqO0kusnwopRbEWHmr/lZxiXTNgLPdN+p5Aszi54=,iv:resppfGPecKvKwqNwqecDBcXGhcTWSGZis8hf1jT0Us=,tag:V80P25Pr4HD9pUUrQHZSQg==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.8.1"
}
}

View File

@@ -1,9 +1,4 @@
{ {lib, ...}: {
config,
lib,
pkgs,
...
}: {
options.terminal = lib.mkOption { options.terminal = lib.mkOption {
type = lib.types.str; type = lib.types.str;
example = "alacritty"; example = "alacritty";

View File

@@ -1,4 +1,6 @@
{ {
# hydra-auto-upgrade = import ./hydra-auto-upgrade.nix; # hydra-auto-upgrade = import ./hydra-auto-upgrade.nix;
syncthing = import ./syncthing.nix; syncthing = import ./syncthing.nix;
frajulAutoUpgrade = import ./frajul-auto-upgrade.nix;
pianoLEDVisualizer = import ./piano-led-visualizer.nix;
} }

View File

@@ -0,0 +1,182 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.modules.frajulAutoUpgrade;
flagFile = "/var/lib/frajul-auto-upgrade/flag";
lockFile = "/var/lib/frajul-auto-upgrade/lock";
lastStatusFile = "/var/lib/frajul-auto-upgrade/last-status";
lastAttemptFile = "/var/lib/frajul-auto-upgrade/last-attempt";
in {
options.modules.frajulAutoUpgrade = {
enable = lib.mkEnableOption "NixOS auto-upgrade on boot";
user = lib.mkOption {
type = lib.types.str;
default = "root";
description = "User account to run the upgrade service as.";
};
flakePath = lib.mkOption {
type = lib.types.path;
description = "The path to your flake";
};
};
config = lib.mkIf cfg.enable {
security.sudo.extraConfig = ''
root ALL=(julian) NOPASSWD: ${pkgs.git}/bin/git -C "${cfg.flakePath}" commit -m *
'';
# Ensure the flag directory exists
systemd.tmpfiles.rules = [
"d /var/lib/frajul-auto-upgrade 0755 root root -"
"f ${flagFile} 0766 root root -"
"f ${lastStatusFile} 0644 root root -"
"f ${lastAttemptFile} 0644 root root -"
];
environment.systemPackages = [
(pkgs.writeShellScriptBin "frajul-auto-upgrade" ''
#!/bin/sh
FLAG_FILE="${flagFile}"
LOCK_FILE="${lockFile}"
LAST_STATUS_FILE="${lastStatusFile}"
LAST_ATTEMPT_FILE="${lastAttemptFile}"
TODAY=$(date +%Y-%m-%d)
if [ ! -f "$FLAG_FILE" ] || [ "$(cat "$FLAG_FILE")" != "enabled" ]; then
echo "Auto upgrade disabled. Exiting."
exit 0
fi
# Check if already attempted today
if [ -f "$LAST_ATTEMPT_FILE" ]; then
LAST_ATTEMPT_DATE=$(cut -d' ' -f1 "$LAST_ATTEMPT_FILE")
if [ "$LAST_ATTEMPT_DATE" = "$TODAY" ]; then
echo "Update already attempted today. Skipping."
exit 0
fi
fi
if [ -f "$LOCK_FILE" ]; then
echo "Already running"
exit 1
fi
echo $$ > "$LOCK_FILE"
trap 'rm -f "$LOCK_FILE"' EXIT
# Back up flake.lock
cp -f "${cfg.flakePath}/flake.lock" /var/lib/frajul-auto-upgrade/flake.lock.bak
# Try updating
if /run/current-system/sw/bin/nix flake update --flake "${cfg.flakePath}" && /run/current-system/sw/bin/nixos-rebuild switch --flake "${cfg.flakePath}" && ${pkgs.sudo}/bin/sudo -u julian git -C "${cfg.flakePath}" commit -m "Auto-update flake.lock" -- flake.lock; then
echo "success" > "$LAST_STATUS_FILE"
else
echo "failure" > "$LAST_STATUS_FILE"
# Restore flake.lock
cp -f /var/lib/frajul-auto-upgrade/flake.lock.bak "${cfg.flakePath}/flake.lock"
fi
# Write full timestamp
date '+%Y-%m-%d %H:%M:%S' > "$LAST_ATTEMPT_FILE"
'')
(pkgs.writeShellScriptBin "frajul-auto-upgrade-status" ''
#!/bin/sh
FLAG_FILE="${flagFile}"
LOCK_FILE="${lockFile}"
LAST_STATUS_FILE="${lastStatusFile}"
LAST_ATTEMPT_FILE="${lastAttemptFile}"
if [ -f "$LOCK_FILE" ]; then
ICON=" "
STATUS="running"
elif [ -f "$FLAG_FILE" ] && [ "$(cat "$FLAG_FILE")" == "enabled" ]; then
LAST_STATUS="unknown"
LAST_ATTEMPT="never"
if [ -f "$LAST_STATUS_FILE" ]; then
LAST_STATUS=$(cat "$LAST_STATUS_FILE")
fi
if [ -f "$LAST_ATTEMPT_FILE" ]; then
LAST_ATTEMPT=$(cat "$LAST_ATTEMPT_FILE")
fi
if [ "$LAST_STATUS" = "success" ]; then
ICON=""
elif [ "$LAST_STATUS" = "failure" ]; then
ICON=""
else
ICON=""
fi
STATUS="enabled (last attempt: $LAST_ATTEMPT, $LAST_STATUS)"
else
ICON=" "
STATUS="disabled"
fi
echo "{\"text\": \"$ICON\", \"tooltip\": \"NixOS Auto Update: $STATUS\"}"
'')
(pkgs.writeShellScriptBin "frajul-auto-upgrade-toggle" ''
#!/bin/sh
FLAG_FILE="${flagFile}"
LOCK_FILE="${lockFile}"
if [ ! -f "$FLAG_FILE" ] || [ "$(cat "$FLAG_FILE")" != "enabled" ]; then
echo "enabled" > "$FLAG_FILE"
else
echo "disabled" > "$FLAG_FILE"
if [ -f "$LOCK_FILE" ]; then
kill -TERM "$(cat "$LOCK_FILE")"
fi
fi
'')
];
# Fixes error: repository path '...' is not owned by current user
environment.etc."root/.gitconfig".text = ''
[safe]
directory = ${cfg.flakePath}
'';
systemd.services.frajul-auto-upgrade = {
description = "Frajul's NixOS Auto Upgrade";
after = ["network-online.target"];
wants = ["network-online.target"];
restartIfChanged = false; # Do not start service on nixos switch
path = with pkgs; [
coreutils
gnutar
xz.bin
gzip
gitMinimal
config.nix.package.out
config.programs.ssh.package
];
serviceConfig = {
Type = "oneshot";
User = cfg.user;
ExecStart = "/run/current-system/sw/bin/frajul-auto-upgrade";
};
};
systemd.timers.frajul-auto-upgrade = {
description = "Run Frajul's NixOS Auto Upgrade at boot";
wantedBy = ["timers.target"];
timerConfig = {
OnBootSec = "1min";
AccuracySec = "10s";
Unit = "frajul-auto-upgrade.service";
};
};
};
}

View File

@@ -0,0 +1,132 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.system.hydraAutoUpgrade;
in {
# Taken from Misterio
options = {
system.hydraAutoUpgrade = {
enable = lib.mkEnableOption "periodic hydra-based auto upgrade";
operation = lib.mkOption {
type = lib.types.enum [
"switch"
"boot"
];
default = "switch";
};
dates = lib.mkOption {
type = lib.types.str;
default = "04:40";
example = "daily";
};
instance = lib.mkOption {
type = lib.types.str;
example = "http://hydra.julian-mutter.de";
};
project = lib.mkOption {
type = lib.types.str;
example = "dotfiles";
};
jobset = lib.mkOption {
type = lib.types.str;
example = "main";
};
job = lib.mkOption {
type = lib.types.str;
default = config.networking.hostName;
};
oldFlakeRef = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
Current system's flake reference
If non-null, the service will only upgrade if the new config is newer
than this one's.
'';
};
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = cfg.enable -> !config.system.autoUpgrade.enable;
message = ''
hydraAutoUpgrade and autoUpgrade are mutually exclusive.
'';
}
];
systemd.services.nixos-upgrade = {
description = "NixOS Upgrade";
restartIfChanged = false;
unitConfig.X-StopOnRemoval = false;
serviceConfig.Type = "oneshot";
path = with pkgs; [
config.nix.package.out
config.programs.ssh.package
coreutils
curl
gitMinimal
gnutar
gzip
jq
nvd
];
script = let
buildUrl = "${cfg.instance}/job/${cfg.project}/${cfg.jobset}/${cfg.job}/latest";
in
(lib.optionalString (cfg.oldFlakeRef != null) ''
eval="$(curl -sLH 'accept: application/json' "${buildUrl}" | jq -r '.jobsetevals[0]')"
flake="$(curl -sLH 'accept: application/json' "${cfg.instance}/eval/$eval" | jq -r '.flake')"
echo "New flake: $flake" >&2
new="$(nix flake metadata "$flake" --json | jq -r '.lastModified')"
echo "Modified at: $(date -d @$new)" >&2
echo "Current flake: ${cfg.oldFlakeRef}" >&2
current="$(nix flake metadata "${cfg.oldFlakeRef}" --json | jq -r '.lastModified')"
echo "Modified at: $(date -d @$current)" >&2
if [ "$new" -le "$current" ]; then
echo "Skipping upgrade, not newer" >&2
exit 0
fi
'')
+ ''
profile="/nix/var/nix/profiles/system"
path="$(curl -sLH 'accept: application/json' ${buildUrl} | jq -r '.buildoutputs.out.path')"
if [ "$(readlink -f "$profile")" = "$path" ]; then
echo "Already up to date" >&2
exit 0
fi
echo "Building $path" >&2
nix build --no-link "$path"
echo "Comparing changes" >&2
nvd --color=always diff "$profile" "$path"
echo "Activating configuration" >&2
"$path/bin/switch-to-configuration" test
echo "Setting profile" >&2
nix build --no-link --profile "$profile" "$path"
echo "Adding to bootloader" >&2
"$path/bin/switch-to-configuration" boot
'';
startAt = cfg.dates;
after = ["network-online.target"];
wants = ["network-online.target"];
};
};
}

View File

@@ -0,0 +1,51 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.services.piano-led-visualizer;
in {
options.services.piano-led-visualizer = {
enable = lib.mkEnableOption "Enable Piano LED Visualizer";
user = lib.mkOption {
type = lib.types.str;
default = "plv";
description = "User to run the Piano LED Visualizer service.";
};
group = lib.mkOption {
type = lib.types.str;
default = "plv";
description = "Group to run the Piano LED Visualizer service.";
};
};
config = lib.mkIf cfg.enable {
users.users.${cfg.user} = {
isSystemUser = true;
group = cfg.group;
createHome = true;
home = "/home/${cfg.user}";
extraGroups = ["wheel" "gpio"];
};
users.groups.${cfg.group} = {};
systemd.services.piano-led-visualizer = {
description = "Piano LED Visualizer";
after = ["network-online.target"];
wants = ["network-online.target"];
wantedBy = ["multi-user.target"];
serviceConfig = {
WorkingDirectory = "/home/${cfg.user}/Piano-LED-Visualizer";
ExecStart = "${pkgs.frajul.piano-led-visualizer}/bin/piano-led-visualizer";
Restart = "always";
Type = "simple";
# User = cfg.user;
# Group = cfg.group;
};
};
};
}

View File

@@ -25,11 +25,11 @@
my-pkgs = final: prev: {frajul = import ../pkgs {pkgs = final;};}; my-pkgs = final: prev: {frajul = import ../pkgs {pkgs = final;};};
nixpkgs-stable-unstable = final: prev: { nixpkgs-stable-unstable = final: prev: {
unstable = import inputs.nixpkgs { unstable = import inputs.nixpkgs-unstable {
system = prev.system; system = prev.system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
stable = import inputs.nixpkgs-stable { stable = import inputs.nixpkgs {
system = prev.system; system = prev.system;
config.allowUnfree = true; config.allowUnfree = true;
}; };

View File

@@ -12,4 +12,9 @@
acer-battery-health-mode = pkgs.callPackage ./acer-battery-health-mode {}; acer-battery-health-mode = pkgs.callPackage ./acer-battery-health-mode {};
pob2 = pkgs.callPackage ./pob2 {}; pob2 = pkgs.callPackage ./pob2 {};
wl-ocr = pkgs.callPackage ./wl-ocr {}; wl-ocr = pkgs.callPackage ./wl-ocr {};
rtklib = pkgs.qt6Packages.callPackage ./rtklib {};
pob2-frajul = pkgs.callPackage ./pob2-frajul {};
rpi-ws281x-python = pkgs.callPackage ./rpi-ws281x-python {};
piano-led-visualizer = pkgs.callPackage ./piano-led-visualizer {};
} }

View File

@@ -3,7 +3,7 @@
nheko, nheko,
telegram-desktop, telegram-desktop,
thunderbird, thunderbird,
discord, discord, # TODO: discord not available for aarch64, this leads to flake evaluation for this arch fail.
}: }:
writeShellApplication { writeShellApplication {
name = "open-messaging"; name = "open-messaging";
@@ -20,7 +20,7 @@ writeShellApplication {
sleep 0.1 sleep 0.1
nheko & nheko &
sleep 0.1 sleep 0.1
telegram-desktop & Telegram &
sleep 0.1 sleep 0.1
discord & discord &
''; '';

View File

@@ -0,0 +1,63 @@
{
lib,
python3,
callPackage,
fetchFromGitHub,
...
}: let
pythonPackages = python3.pkgs;
rpi-ws281x-python = callPackage ../rpi-ws281x-python {inherit python3;};
in
pythonPackages.buildPythonApplication rec {
pname = "piano-led-visualizer";
version = "1.6";
src = fetchFromGitHub {
owner = "onlaj";
repo = "Piano-LED-Visualizer";
rev = "v${version}";
sha256 = "sha256-SkNNu2pqVG40HBZZYJMCCKiRj1h1QdkteaPR3Ek2P7I=";
};
patches = [
./fix-log-dir.patch
];
propagatedBuildInputs = with pythonPackages; [
setuptools
numpy
pillow
flask
rpi-gpio
webcolors
psutil
mido
rtmidi-python
spidev
waitress
websockets
werkzeug
rpi-ws281x-python
];
format = "setuptools";
preBuild = ''
cp ${./setup.py} setup.py
sed -i 's/PLACEHOLDER_VERSION/${version}/' setup.py
'';
postInstall = ''
mv -v $out/bin/visualizer.py $out/bin/piano-led-visualizer
'';
meta = with lib; {
description = "Piano LED Visualizer for Raspberry Pi";
homepage = "https://github.com/onlaj/Piano-LED-Visualizer";
license = licenses.gpl3;
maintainers = [];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,24 @@
diff --git a/lib/log_setup.py b/lib/log_setup.py
index 34f9156..e164d14 100644
--- a/lib/log_setup.py
+++ b/lib/log_setup.py
@@ -1,6 +1,7 @@
import logging
from logging.handlers import RotatingFileHandler
import sys
+import os
# Create a custom logger
logger = logging.getLogger("my_app")
@@ -10,7 +11,10 @@ logger.setLevel(logging.DEBUG)
# Create handlers
console_handler = logging.StreamHandler()
-file_handler = RotatingFileHandler('/home/Piano-LED-Visualizer/visualizer.log', maxBytes=500000, backupCount=10)
+
+log_path = os.path.expanduser('~/Piano-LED-Visualizer/visualizer.log')
+os.makedirs(os.path.dirname(log_path), exist_ok=True)
+file_handler = RotatingFileHandler(log_path, maxBytes=500000, backupCount=10)
# Set the level for handlers

View File

@@ -0,0 +1,24 @@
from setuptools import setup, find_packages
setup(
name="piano_led_visualizer",
version="PLACEHOLDER_VERSION",
py_modules=["visualizer"],
packages=find_packages(), # includes all packages with __init__.py
install_requires=[
"numpy",
"pillow",
"flask",
"rpi-gpio",
"webcolors",
"psutil",
"mido",
"rtmidi",
"spidev",
"waitress",
"websockets",
"werkzeug",
"rpi_ws281x",
],
scripts=["visualizer.py"],
)

View File

@@ -0,0 +1,16 @@
{
writeShellApplication,
xhost,
}:
writeShellApplication {
name = "pob2-frajul";
runtimeInputs = [
xhost
];
text = ''
xhost +
sudo -u pob -i sh /home/pob/pob2.sh
'';
}

View File

@@ -0,0 +1,37 @@
{
lib,
python3,
fetchFromGitHub,
pkgs,
}:
python3.pkgs.buildPythonPackage rec {
pname = "rpi-ws281x";
version = "5.0.0";
src = fetchFromGitHub {
owner = "rpi-ws281x";
repo = "rpi-ws281x-python";
rev = "v${version}";
sha256 = "sha256-CVPibDs1QLeXhtoEBw3JplKIIUpzahjgJKy8GVy99Wk=";
fetchSubmodules = true;
};
format = "setuptools";
propagatedBuildInputs = with python3.pkgs; [
setuptools
wheel
];
postUnpack = ''
sourceRoot="$sourceRoot/library"
'';
meta = with lib; {
description = "Python bindings for the rpi_ws281x C library";
homepage = "https://github.com/rpi-ws281x/rpi-ws281x-python";
license = licenses.mit;
maintainers = [];
platforms = platforms.linux;
};
}

40
pkgs/rtklib/default.nix Normal file
View File

@@ -0,0 +1,40 @@
{
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
qtbase,
wrapQtAppsHook,
qtserialport,
qttools,
...
}:
stdenv.mkDerivation rec {
pname = "RTKLIB";
version = "b34L";
src = fetchFromGitHub {
owner = "rtklibexplorer";
repo = "${pname}";
rev = "${version}";
hash = "sha256-bQcia3aRQNcZ55fvJViAxpo2Ev276HFTZ28SEXJD5Ds=";
};
nativeBuildInputs = [
cmake
pkg-config
wrapQtAppsHook
];
buildInputs = [
qtbase
qtserialport
qttools
];
cmakeFlags = [
"-DCMAKE_INSTALL_DATAROOTDIR=share"
];
doCheck = true;
}

View File

@@ -3,6 +3,9 @@
NIX_CONFIG = "extra-experimental-features = nix-command flakes ca-derivations"; NIX_CONFIG = "extra-experimental-features = nix-command flakes ca-derivations";
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
nix nix
deploy-rs # for deploy
nixos-generators # for nixos-generate -f iso --flake .#host
nh # nix helper for nice interfaces
home-manager home-manager
git git