Compare commits

121 Commits

Author SHA1 Message Date
Gitea Actions
b8170a30b8 Update flake.lock 2025-04-28 2026-01-25 00:30:46 +00:00
Gitea Actions
c26da372de Update flake.lock 2025-04-27 2026-01-25 00:30:46 +00:00
Gitea Actions
8b0d7b452a Update flake.lock 2025-04-26 2026-01-25 00:30:46 +00:00
Gitea Actions
029714bbfd Update flake.lock 2025-04-25 2026-01-25 00:30:46 +00:00
Gitea Actions
dfc2c3a951 Update flake.lock 2025-04-24 2026-01-25 00:30:46 +00:00
Gitea Actions
63f53c6e27 Update flake.lock 2025-04-23 2026-01-25 00:30:46 +00:00
Gitea Actions
a07593b8e2 Update flake.lock 2025-04-22 2026-01-25 00:30:46 +00:00
Gitea Actions
59c99c954b Update flake.lock 2025-04-21 2026-01-25 00:30:46 +00:00
Gitea Actions
a8b61d236f Update flake.lock 2025-04-20 2026-01-25 00:30:46 +00:00
Gitea Actions
c7a317cfd2 Update flake.lock 2025-04-19 2026-01-25 00:30:46 +00:00
Gitea Actions
000e7d5ed8 Update flake.lock 2025-04-18 2026-01-25 00:30:46 +00:00
Gitea Actions
2a65e9f610 Update flake.lock 2025-04-17 2026-01-25 00:30:46 +00:00
Gitea Actions
376000b090 Update flake.lock 2025-04-16 2026-01-25 00:30:46 +00:00
Gitea Actions
23c449dae7 Update flake.lock 2025-04-15 2026-01-25 00:30:46 +00:00
Gitea Actions
91ad673f27 Update flake.lock 2025-04-14 2026-01-25 00:30:46 +00:00
Gitea Actions
4638c81857 Update flake.lock 2025-04-13 2026-01-25 00:30:46 +00:00
Gitea Actions
34858dd3c3 Update flake.lock 2025-04-12 2026-01-25 00:30:46 +00:00
Gitea Actions
61747e47c1 Update flake.lock 2025-04-11 2026-01-25 00:30:46 +00:00
Gitea Actions
9e105f4e08 Update flake.lock 2025-04-10 2026-01-25 00:30:46 +00:00
Gitea Actions
774659a259 Update flake.lock 2025-04-09 2026-01-25 00:30:46 +00:00
Gitea Actions
3675ec2fba Update flake.lock 2025-04-08 2026-01-25 00:30:46 +00:00
Gitea Actions
08478865d5 Update flake.lock 2025-04-07 2026-01-25 00:30:46 +00:00
Gitea Actions
15e9f8764d Update flake.lock 2025-04-06 2026-01-25 00:30:46 +00:00
Gitea Actions
ae1b6e2de0 Update flake.lock 2025-04-05 2026-01-25 00:30:46 +00:00
Gitea Actions
177c8ac20b Update flake.lock 2025-04-04 2026-01-25 00:30:46 +00:00
Gitea Actions
c2d46096fb Update flake.lock 2025-04-03 2026-01-25 00:30:46 +00:00
Gitea Actions
e75adc4eee Update flake.lock 2025-04-02 2026-01-25 00:30:46 +00:00
Gitea Actions
50b240a1df Update flake.lock 2025-04-01 2026-01-25 00:30:46 +00:00
Gitea Actions
8c8140fc8f Update flake.lock 2025-03-31 2026-01-25 00:30:46 +00:00
Gitea Actions
55b07d9fc2 Update flake.lock 2025-03-30 2026-01-25 00:30:46 +00:00
Gitea Actions
610001326e Update flake.lock 2025-03-29 2026-01-25 00:30:46 +00:00
Gitea Actions
7a8dc89e20 Update flake.lock 2025-03-28 2026-01-25 00:30:46 +00:00
Gitea Actions
1caecebd3b Update flake.lock 2025-03-27 2026-01-25 00:30:46 +00:00
Gitea Actions
716200ee80 Update flake.lock 2025-03-26 2026-01-25 00:30:46 +00:00
Gitea Actions
ffe813fd77 Update flake.lock 2025-03-25 2026-01-25 00:30:46 +00:00
Gitea Actions
1afef0ff13 Update flake.lock 2025-03-24 2026-01-25 00:30:46 +00:00
Gitea Actions
5a941ab974 Update flake.lock 2025-03-23 2026-01-25 00:30:46 +00:00
af54219f5f Install element-desktop too
Some checks failed
Update Nix Flake / update-flake (push) Failing after 18s
2026-01-24 16:37:09 +01:00
b6f59055d8 Fix quickstart.nix 2026-01-24 16:36:04 +01:00
cb990c0cd4 Switch to element-desktop 2026-01-24 16:35:54 +01:00
c896e02bf1 Allow unfree packages with "run" and "shell" commands
Some checks failed
Update Nix Flake / update-flake (push) Failing after 16s
2026-01-22 06:56:06 +01:00
c1e031efa9 Fix "systems deprecated" warning
Some checks failed
Update Nix Flake / update-flake (push) Failing after 49s
2026-01-20 21:01:05 +01:00
19f213ca8c development: install opencode 2026-01-20 20:40:09 +01:00
a0ebb3f259 builder: add ollama and ui 2026-01-20 20:39:32 +01:00
3a994a3b8d Add more packages to quickstart configuration 2026-01-20 20:39:03 +01:00
3b4c0e4a63 Clean up configs 2026-01-20 20:38:53 +01:00
b15dd4ce86 move zoxide from yazi to fish config 2026-01-20 20:38:32 +01:00
db5514062c Update readme 2026-01-20 20:24:25 +01:00
7b500ee994 Make v3ms07 a generic quickstart configuration 2026-01-20 20:24:06 +01:00
07eb4664f9 Update flake 2026-01-20 20:04:32 +01:00
872f80e92c Remove non-working packages 2026-01-20 20:02:48 +01:00
562f873f97 hyprland: adapt keyboard shortcuts 2026-01-20 20:02:32 +01:00
2f5868fcca Add config for v3ms07 2026-01-20 20:02:01 +01:00
e1c1f6e104 emacs: install latex for org mode previews
Some checks failed
Update Nix Flake / update-flake (push) Failing after 14s
2026-01-06 12:10:16 +01:00
3bdf73557b desktop: remove vivaldi 2026-01-06 12:04:16 +01:00
bb9988245a hyprland: add submaps for common open commands 2026-01-06 12:04:05 +01:00
713f5bfe8c update flake 2026-01-06 12:03:55 +01:00
c26f4ccd9a kardorf: install steam
Some checks failed
Update Nix Flake / update-flake (push) Failing after 14s
2025-12-29 06:21:10 +01:00
d84bfd4628 use network manager dns instead of resolved
Some checks failed
Update Nix Flake / update-flake (push) Failing after 12s
2025-12-24 06:48:22 +01:00
fb6ac408e1 format code 2025-12-24 06:47:56 +01:00
f01b079931 emacs: add ltex-ls-plus language server 2025-12-24 06:47:43 +01:00
78990e6414 fix typst-languagetool installation typo
Some checks failed
Update Nix Flake / update-flake (push) Failing after 12s
2025-12-18 10:37:10 +01:00
cef602d758 update flake 2025-12-18 10:37:00 +01:00
368e741211 add typst-languagetool package 2025-12-18 10:36:21 +01: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
59 changed files with 1761 additions and 288 deletions

View File

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

View File

@@ -1,7 +1,12 @@
#+title: My dotfiles
My dotfiles for which I am using =nix=.
The structure is managed by [[https://snowfall.org/guides/lib/quickstart/][Snowfall lib]]
* Quick start for home-manger only (no need to pull this repo)
- Install nix using the https://github.com/DeterminateSystems/nix-installer
- Then run
#+begin_src shell
nix run nixpkgs#home-manager -- switch --flake git+https://gitlab.julian-mutter.de/julian/dotfiles.git#julian@quickstart
#+end_src
- Done
* Machine selection
=home-manager= automatically searches for =user= or =user@hostname= config in the flake, so specify one of those or you will have to manually specify them:
@@ -24,7 +29,7 @@ sops edit secrets/secrets.yaml
** Authorize new device
- Generate public key from ssh -> Private age key generation not needed
#+begin_src sh
ssh-to-age < /etc/ssh/ssh_host_ed25519_key
ssh-to-age < /etc/ssh/ssh_host_ed25519_key.pub
#+end_src
- Add age public key to file:.sops.yaml
- Update keys

842
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";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
systems.url = "github:nix-systems/default-linux";
nixos-hardware.url = "github:nixos/nixos-hardware";
impermanence.url = "github:nix-community/impermanence";
nix-colors.url = "github:misterio77/nix-colors";
deploy-rs.url = "github:serokell/deploy-rs";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
@@ -33,7 +38,7 @@
flake = false;
};
nixvim = {
url = "github:nix-community/nixvim";
url = "github:nix-community/nixvim/nixos-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-matlab = {
@@ -84,7 +89,7 @@
packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;});
devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;});
formatter = forEachSystem (pkgs: pkgs.alejandra);
formatter = forEachSystem (pkgs: pkgs.alejandra); # nix fmt *
nixosConfigurations = {
# Main laptop
@@ -95,12 +100,12 @@
};
};
# Piano raspberry pi
pianonix = lib.nixosSystem {
modules = [./hosts/pianonix];
specialArgs = {
inherit inputs outputs;
};
};
# pianonix = lib.nixosSystem {
# modules = [./hosts/pianonix];
# specialArgs = {
# inherit inputs outputs;
# };
# };
kardorf = lib.nixosSystem {
modules = [./hosts/kardorf];
specialArgs = {
@@ -129,16 +134,16 @@
};
};
# Media server (RPi)
"julian@pianonix" = lib.homeManagerConfiguration {
modules = [
./homes/julian/pianonix.nix
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
# "julian@pianonix" = lib.homeManagerConfiguration {
# modules = [
# ./homes/julian/pianonix.nix
# ./homes/julian/hm-standalone-config.nix
# ];
# pkgs = pkgsFor.aarch64-linux;
# extraSpecialArgs = {
# inherit inputs outputs;
# };
# };
"julian@kardorf" = lib.homeManagerConfiguration {
modules = [
./homes/julian/kardorf.nix
@@ -159,19 +164,29 @@
inherit inputs outputs;
};
};
"julian@quickstart" = lib.homeManagerConfiguration {
modules = [
./homes/julian/quickstart.nix
./homes/julian/hm-standalone-config.nix
];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
};
# deploy-rs node configuration
deploy.nodes = {
pianonix = {
hostname = "pianonix.local";
profiles.system = {
sshUser = "root";
user = "root";
path = inputs.deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.pianonix;
confirmTimeout = 90; # default: 30s; raspberrypi takes a little longer restarting services
};
};
# pianonix = {
# hostname = "pianonix.local";
# profiles.system = {
# sshUser = "root";
# user = "root";
# path = inputs.deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.pianonix;
# confirmTimeout = 90; # default: 30s; raspberrypi takes a little longer restarting services
# };
# };
builder = {
hostname = "builder.julian-mutter.de";
@@ -183,5 +198,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

@@ -11,6 +11,8 @@
./features/alacritty
./features/yazi
./features/emacs
./features/tmux
./features/qt-distrobox
./features/hyprland

View File

@@ -52,6 +52,14 @@ in {
shfmt
pyright
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
graphviz
@@ -59,6 +67,27 @@ in {
# neocmakelsp # cmake
emacs-all-the-icons-fonts
frajul.typst-languagetool
ltex-ls-plus
(texlive.combine {
inherit
(texlive)
scheme-basic
# for rendering latex in inkscape
standalone
amsmath
preview
# needed for org mode preview
dvisvgm
dvipng # for preview and export as html
wrapfig
# amsmath
ulem
hyperref
capt-of
;
})
]
++ lib.optional config.is-nixos emacs;

View File

@@ -27,6 +27,11 @@ with lib; {
enableFishIntegration = true;
};
programs.zoxide = {
enable = true;
enableFishIntegration = true;
};
programs.fish = {
enable = true;
@@ -38,14 +43,18 @@ with lib; {
cd $argv
'';
run = ''
nix run nixpkgs#"$argv[1]" -- $argv[2..-1]
nix run --impure nixpkgs#"$argv[1]" -- $argv[2..-1]
'';
shell = ''
set args
for arg in $argv
set args $args nixpkgs#$arg
end
nix shell $args
nix shell --impure $args
'';
fish_user_key_bindings = ''
bind ctrl-space 'zi; commandline -f repaint'
bind -M insert ctrl-space 'zi; commandline -f repaint'
'';
};
};

View File

@@ -1,7 +1,6 @@
{
lib,
pkgs,
config,
...
}:
with lib; {
@@ -12,7 +11,7 @@ with lib; {
dejavu_fonts
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
noto-fonts-color-emoji
liberation_ttf
fira-code
fira-code-symbols

View File

@@ -24,7 +24,7 @@ in {
./zathura.nix
./waypipe.nix
./hyprbars.nix
# ./hyprbars.nix
];
xdg.portal = {
@@ -152,6 +152,37 @@ in {
# hyprlandPlugins.hyprbars
];
submaps = {
"resize".settings = {
binde = [
", right, resizeactive, 20"
", left, resizeactive, -20 0"
", up, resizeactive, 0 -20"
", down, resizeactive, 0 20"
", l, resizeactive, 20"
", h, resizeactive, -20 0"
", k, resizeactive, 0 -20"
", j, resizeactive, 0 20"
];
bind = [
", q, submap, reset"
", escape, submap, reset"
", catchall, submap, reset" # make any other keypress cancel the submap
];
};
"open, reset".settings = {
bind = [
", e, exec, emacs"
", m, exec, open-messaging"
", b, exec, firefox"
", catchall, submap, reset" # make any other keypress cancel the submap
];
};
};
settings = {
"$mod" = "SUPER";
@@ -228,6 +259,10 @@ in {
vfr = true; # power saving
};
cursor = {
no_hardware_cursors = 1; # disable hardware cursors to fix tearing on kardorf
};
render = {
# we do, in fact, want direct scanout
direct_scanout = true;
@@ -244,7 +279,10 @@ in {
windowrulev2 = [
"suppressevent maximize, class:.*"
"workspace 1, class:firefox"
"workspace 8, class:Zotero"
"workspace 9, class:nheko"
"workspace 9, class:Element"
"workspace 9, class:discord"
"workspace 9, class:org.telegram.desktop"
"workspace 10, class:thunderbird"
"float, class:qalculate-gtk"
@@ -274,12 +312,18 @@ in {
bind =
[
# compositor commands
"$mod, Space, focuswindow, floating"
"$mod SHIFT, Space, togglefloating,"
#
#
"$mod, R, submap, resize"
"$mod, O, submap, open"
#
"$mod, SPACE, focuswindow, floating"
"$mod SHIFT, SPACE, togglefloating,"
"$mod, F, fullscreen,"
"$mod, X, killactive,"
"$mod, O, togglesplit," # dwindle
"$mod, -, togglesplit," # dwindle
# opening applications
"$mod, D, exec, wofi --show drun,run"

View File

@@ -1,10 +1,9 @@
{
lib,
pkgs,
inputs,
...
}: {
imports = [inputs.nixvim.homeManagerModules.nixvim];
imports = [inputs.nixvim.homeModules.nixvim];
home.sessionVariables = {
EDITOR = "nvim";
@@ -36,6 +35,8 @@
opts = {
number = false;
relativenumber = false;
ignorecase = true;
smartcase = true;
};
clipboard.register = "unnamedplus"; # Use system clipboard
@@ -76,6 +77,7 @@
neogit.enable = true; # like magit
trouble.enable = true;
web-devicons.enable = true;
orgmode.enable = true; # org-mode support
# Shows file trees
oil = {
@@ -88,7 +90,7 @@
# Code formatting
conform-nvim = {
enable = true;
settings.formatters_by_ft = with pkgs; {
settings.formatters_by_ft = {
lua = ["stylua"];
python = ["black"];
nix = ["nixfmt"];

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, ...}: {
home.packages = with pkgs; [
bat
du-dust # Like du tree but better
dust # Like du tree but better
fd # better find
fdupes # find and delete duplicate files
ffmpeg
@@ -24,7 +24,7 @@
p7zip # unzip 7zip archives
parted
pciutils # lspci
poppler_utils # Pdf utils including pdfimages
poppler-utils # Pdf utils including pdfimages
libqalculate # Nice tui calculator (qalc)
ripgrep # better grep
rnr # renaming tool

View File

@@ -22,13 +22,15 @@
calibre # ebook manager and viewer
# digikam
discord
discord-ptb # in case discord updates take their time
# dvdisaster
# element-desktop
# rocketchat-desktop
thunderbird
tdesktop # telegram
telegram-desktop # telegram
# schildichat-desktop # not updated regularly
nheko
element-desktop
evince # Simple pdf reader, good for focusing on document content
firefox
# geogebra
@@ -46,10 +48,10 @@
qpdfview
# qutebrowser
# realvnc-vnc-viewer
rpi-imager # make isos
# rpi-imager # make isos
# rustdesk
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
vlc
wineWowPackages.stable # 32-bit and 64-bit wine
@@ -61,8 +63,12 @@
zotero # Manage papers and other sources
pdfpc # Present slides in pdf form
networkmanager-openvpn
keepassxc
## My scripts
frajul.open-messaging
frajul.xwacomcalibrate
frajul.pob2-frajul
];
}

View File

@@ -1,4 +1,9 @@
{pkgs, ...}: {
programs.opencode = {
enable = true;
package = pkgs.unstable.opencode;
};
home.packages = with pkgs; [
watchexec # Run command when any file in current dir changes
android-tools # adb
@@ -9,7 +14,7 @@
clippy
cntr # nix debugger
conda
micromamba # a better, faster conda
# micromamba # a better, faster conda
devcontainer # development container
devenv # devbox alternative
dbeaver-bin
@@ -21,20 +26,21 @@
unstable.zed-editor
jdk
julia-bin
(texlive.combine {
# for rendering latex in inkscape
inherit
(texlive)
scheme-medium
standalone
amsmath
preview
# needed for org mode export
wrapfig
capt-of
biblatex
;
})
# (texlive.combine {
# # for rendering latex in inkscape
# inherit
# (texlive)
# scheme-medium
# standalone
# amsmath
# preview
# # needed for org mode export
# wrapfig
# capt-of
# biblatex
# ;
# })
vagrant
matlab # Using nix-matlab overlay defined in flake
maven
nodejs

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

@@ -3,14 +3,11 @@
inputs,
...
}: {
programs.zoxide.enable = true;
programs.zoxide.enableFishIntegration = true;
home.packages = with pkgs; [
exiftool
unar # extract archives
xdragon # dragndrop
poppler_utils # pdf preview
dragon-drop # dragndrop
poppler-utils # pdf preview
fd
ripgrep
fzf

View File

@@ -24,6 +24,11 @@
};
};
# To allow unfree with 'nix run'
xdg.configFile."nixpkgs/config.nix".text = ''
{ allowUnfree = true; }
'';
colorscheme.name = "catppuccin-mocha";
# systemd.user.startServices = "sd-switch"; # TODO: what is this

View File

@@ -19,12 +19,13 @@
"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 = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"binarycache.julian-mutter.de:oJ67uRFwRhNPKL58CHzy3QQLv38Kx7OA1K+6xlEPu7E="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
];
trusted-users = [

View File

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

View File

@@ -14,8 +14,8 @@
is-nixos = true;
terminal = "wezterm";
services.syncthing.tray.enable = true;
services.syncthing.tray.command = "syncthingtray --wait"; # Wait for tray to become available
# services.syncthing.tray.enable = true;
# services.syncthing.tray.command = "syncthingtray --wait"; # Wait for tray to become available
home.packages = with pkgs; [
music-reader
@@ -27,9 +27,34 @@
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
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 = ''
working_directory = "/home/julian/Klavier"
'';

View File

@@ -0,0 +1,32 @@
# Quick configuration for setting up basic things on a standalone home-manager device
# If you want to adapt it to a specific device, copy this file with the correct hostname
{pkgs, ...}: {
imports = [
./global
./features/fish
./features/direnv
./features/neovim
./features/yazi
./features/emacs
./features/nix-helper
./features/tmux
];
is-nixos = false;
home.sessionPath = ["/snap/bin"];
# Essential packages
home.packages = with pkgs; [
bat
dust
fd
ripgrep
fzf
lazygit
mc
tree
wget
];
}

View File

@@ -13,6 +13,7 @@
../features/yazi
../features/emacs
../features/nix-helper
../features/qt-distrobox
];
hostName = "aspi";

View File

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

View File

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

View File

@@ -5,6 +5,7 @@
../common/global
../common/users/julian
../common/users/yukari
../common/users/pob
../common/optional/binarycaches.nix
../common/optional/remote-builder.nix
@@ -28,6 +29,8 @@
networking.hostName = "aspi";
system.stateVersion = "24.05";
# networking.firewall.checkReversePath = false; # Makes wg interface with all ips work
modules = {
syncthing = {
enable = true;
@@ -39,6 +42,7 @@
};
};
programs.hyprland.enable = true;
services.desktopManager.plasma6.enable = true;
services.blueman.enable = true;
@@ -47,8 +51,8 @@
programs.steam.enable = true;
# TODO: not working
services.logind.lidSwitch = "lock";
services.logind.lidSwitchDocked = "lock";
# services.logind.lidSwitch = "lock";
# services.logind.lidSwitchDocked = "lock";
programs.kdeconnect.enable = true;

View File

@@ -1,16 +1,32 @@
# sudo nixos-rebuild switch --flake .#builder --target-host root@192.168.3.118
# or
# deploy .#builder
{config, ...}: {
{
config,
pkgs,
...
}: {
imports = [
./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";
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 = {
isNormalUser = true;
description = "Nix";
@@ -32,10 +48,13 @@
"https://nix-community.cachix.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-users = ["nix"];
@@ -46,14 +65,14 @@
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";
};
# 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
nix.optimise.automatic = true;
@@ -82,10 +101,17 @@
};
# Ollama used by open-webui as llm backend
# services.ollama = {
# enable = true;
# # acceleration = "rocm";
# };
services.ollama = {
enable = true;
# acceleration = "rocm";
openFirewall = true;
};
services.nextjs-ollama-llm-ui = {
enable = true;
hostname = "192.168.3.118";
port = 3001;
};
# services.open-webui = {
# enable = true;
# port = 8080;
@@ -95,14 +121,34 @@
networking.firewall.allowedTCPPorts = [
80
3001 # ollama-ui
];
services.openssh = {
enable = true;
# require public key authentication for better security
settings.PasswordAuthentication = true;
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
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 = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFjSZYdoF/51F+ykcBAYVCzCPTF5EEigWBL1APiR0h+H julian@aspi"
@@ -200,7 +246,16 @@
url = "https://gitlab.julian-mutter.de";
name = "builder";
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;
@@ -271,4 +326,28 @@
"/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

@@ -3,6 +3,7 @@
inputs,
outputs,
pkgs,
lib,
...
}: {
imports =
@@ -29,12 +30,17 @@
networkmanager-openconnect
];
};
services.resolved.enable = true;
services.resolved.enable = false;
# MDNS Taken by avahi
# networking.networkmanager.dns = "none";
networking.nameservers = lib.mkDefault [
"1.1.1.1"
"8.8.8.8"
];
programs.dconf.enable = true;
# HM
home-manager.useGlobalPkgs = true;
# HM module
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 = {
inherit inputs outputs;
};

View File

@@ -18,7 +18,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-command"
"flakes"
@@ -29,8 +31,11 @@
nix.gc = {
automatic = true;
dates = "weekly";
# Keep the last 3 generations
options = "--delete-older-than +3";
options = "--delete-older-than 30d";
};
nix.optimise = {
automatic = true;
dates = ["weekly"]; # Optional; allows customizing optimisation schedule
};
programs.nix-ld.enable = true;

View File

@@ -13,7 +13,7 @@ in {
sshKeyPaths = map getKeyPath keys;
# 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
generateKey = false; # TODO: building should not work without secrets!?
};

View File

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

View File

@@ -10,11 +10,14 @@
"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 = [

View File

@@ -1,26 +1,9 @@
{
pkgs,
lib,
config,
...
}: let
{config, ...}: let
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;
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 {
users.extraUsers.greeter = {
# For caching and such
# For caching
home = "/tmp/greeter-home";
createHome = true;
};
@@ -33,13 +16,22 @@ in {
cursorTheme = {
inherit (julianCfg.gtk.cursorTheme) name package;
};
cageArgs = [
"-s"
"-m"
"last"
]; # multimonitor use last monitor
# settings.background = {
# path = julianCfg.wallpaper;
# fit = "Cover";
# }; # TODO: fix
};
services.greetd = {
enable = true;
settings.default_session.command = sway-kiosk (lib.getExe config.programs.regreet.package);
# TODO: setting keyboard language does not work
# settings = {
# env = {
# XKB_DEFAULT_LAYOUT = "de";
# # XKB_DEFAULT_VARIANT = "altgr-intl";
# };
# };
};
}

View File

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

View File

@@ -3,6 +3,7 @@
services.pulseaudio.enable = false;
services.pipewire = {
enable = true;
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
@@ -14,6 +15,14 @@
"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,38 +14,38 @@ sops:
- recipient: age1ee5udznhadk6m7jtglu4709rep080yjyd2ukzdl8jma4mm92y3psv0slpg
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBxV2IzcEZ6eGYxbXAvaEta
c3RLbmZubnVEL1EwSlNNY3ZNbkVSUXN5ZDBZClRTYWwzbHhDK1VsMzVVL0VMVzZF
SEQ0ZHVMdytrY0xXUEppQkpNZEZ3VFkKLS0tIG95ZkJLWTZBWWpIOEQ4bHpBNWEx
QXVpMTNSNzU1dTBPYjlsc1BvNHZ3dDgKMHrT9DCC5W6UwC1Mfq6YCwkvZtDs3I7j
vKlnanFp8hMMyYONRVlkvh+vOGQdbgXco4Z5nr02LQDu6Rwm4jSp9g==
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBualdnWmtBTThhZDFVdDRP
WHlMamk1MFhUYUwwa0hyQmpobGNocC9VR0ZVCmc3N1FjcUZCNUdTTm91OVpwZDhP
bTNXekp2bDd3Tjh6a2ZVTVNTSW9RTU0KLS0tIGJpcUVHb2ZlODgvelhwQ0JFU3l5
WU5VanhYMTUvNklYazJxOXVveXhpM2cKCo+4FhhcbRylASEbQb9rAQUzEO1D+0AR
52Jzc9s9rSdypeBRE7SaSOI4eVnkEjPfyhNFvMdxiBzBj7GdocpmCw==
-----END AGE ENCRYPTED FILE-----
- recipient: age1q8lc5340gz5xw2f57nglrss68wv0j0hf36py2pdtrl6ky3yrq9qqk0njr4
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKTnpqclVmVHR3M1ZvMDZ0
eEtrbnhpTW5uZlhOYWFxbktxcTJ3bXZISkhzClpud2tNVzUvT2N2SkRadWk5aVpE
S2VkTFlIVUhFclA0WEh5cEp0Qjg3ejgKLS0tIDNXY0lpKys4Q3NBRFcya2RoSG1F
YW0raHlNekdWT3p0WHpGMk9xMmgzWFUKCue4GvgmH3nJBa7ny7rqft5MuSWHqAsP
5HnaAudL+rh2j1swm635QUrf9UnpUznE5NSOGrQDmA6RCBypNM4rsw==
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4STZpU0ZnRzVVOFFRUXZG
akcwS2Z5V3lmQzRTSGNHT2hDME5JMks2QTNNClpkZzNMc0wyRjVEaVlBRFlyNFhs
M1pyeW1XdnZubnRxMzEzMFJoK0lkVVEKLS0tIENhRExzUWRWMUlObmhxazM5cU9y
aDFyaDJackFoaEZOYWdTbWt0ODB1bm8Kg1VDAj5/i8ZbYxspIdXrI474YN5YkV4H
86maCRDfUxO5lvu4zBa9pOmFtJ2iuJ2MxDnmCSHTl+GOk8yyUT8JhA==
-----END AGE ENCRYPTED FILE-----
- recipient: age1hsmfz8fjxu83sax9lr487h8xr6cyge0apdq4zpge4c8jpcjj2cksj825ct
- recipient: age1tguyu2yd5xv8rgjjl50cq6dq5rr7umqgv098dgre4u9wyj30ea7sexw62c
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBESlZOeHY0T01ra0gwMS8z
R3c1eW45WVkyeTBuRlFMRngrb2NFL1hkcmhRCitwZ3lweXM0di9EdEdQZmF4ZUZr
M1hqNkM3Q1Jrb09Kb2M0ZkhTcFZPYkkKLS0tIHpCTEFCV0JlRzQwK3hndDJ4aHVC
S1o0QVlXSVl0dmlpWUQ3ZXdqUU5maTgKY4UJPx37CU5OUgkqYWlz9+0rA+dQkrH9
+/kTT/2qZ2Op67WKtlas7arC7BjU8uygM208q+nr48Lic5n1fMtnXA==
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAveE9NV2JCOW9odlN6Wmkw
WFEvU2pka3htV2FTTFlpc05ES2JjbGxTaFJZCjhYdG1sRVBFaEF3YjNkWEw3Ny8x
MlYyTjJBMHA2YVpHRkkwWW5hNDdrS1UKLS0tIFZXTFNVbkd6VFExc0dSVU4vd3JF
ajlFY2pvWW13VGxOZ0hEc3dMbU9IeUUKNSf7ycj+1XHhsoghmY2iR1BwIySqfIOF
zawE+MQcQg0u+fy6Aik26eUGvQG3rya2Fx2+3VlAbKB+rbiP0fwsgg==
-----END AGE ENCRYPTED FILE-----
- recipient: age15lxw97z03q40xrdscnxqqugh5ky5aqrerg2t2rphkcqm6rnllurq8v98q5
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAvYkdwSy9vc0lEWXJIdWRw
VmJ2NStaZDVxaG1LNU1NQlErdElPdkQvY3pjCkJyL1BRR2w1dmpqYnk5Tys3eHpX
c0FJdzA1bU5GWWhrUWhOK1Jqa2lTaU0KLS0tIDMzMEQwL3I0ckVyYWFubU9VNlAr
NlBud3VHczNnMm5wOGhHdEoxTG5CNDgK4s7cFGvUCeztjjIAWtMW7TUqFP+YEQIg
So5A7DGxVsUcqarTUPazpIBBlO4n9zj79Qe+eQd6ti0EZG6sYX6+2Q==
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBxaTNJNkJ0RVJiYlRzcmlX
TmEweVdLaGpoVXMxZEFDU3dOZTJCRjdiNENBCkZ3bjJUNm1vcmY1ZUpZcEo4OGxa
UWJKSjNKL002UDhmTmJER2M0MjJ3aG8KLS0tIFMvZjBkOS83T3NDUE82M3kweVNw
VXhoN0VyWkVxMEJPQ3orVUNDK21rRU0KvnmuFxcCpP+LZg7v5jaStw9F0owVrQl9
AkIq7GUJh7xewLxcVZfiBRpXMhw/mM8LYnd2KGP8R/TfYg+v0//+5A==
-----END AGE ENCRYPTED FILE-----
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]

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

@@ -55,7 +55,7 @@ in {
# element-desktop
# rocketchat-desktop
thunderbird
tdesktop # telegram
telegram-desktop # telegram
# schildichat-desktop # not updated regularly
nheko
evince # Simple pdf reader, good for focusing on document content
@@ -71,15 +71,12 @@ in {
nomacs # Image viewer
kdePackages.okular # Pdf reader with many features, good for commenting documents
pavucontrol
pdfsam-basic # Split, merge, etc for pdfs
qalculate-gtk # Nice gui calculator
qpdfview
# qutebrowser
# realvnc-vnc-viewer
rpi-imager # make isos
# rustdesk
tor-browser
unstable.path-of-building # Path of Building
# frajul.pob-dev-version # Path of Building
vlc
wineWowPackages.stable # 32-bit and 64-bit wine

View File

@@ -7,21 +7,22 @@
../common/users/wolfi
../common/optional/binarycaches.nix
../common/optional/xserver.nix
# ../common/optional/xserver.nix
../common/optional/remote-builder.nix
../common/optional/boot-efi.nix
# ../common/optional/greetd.nix
../common/optional/gdm.nix
../common/optional/i3.nix
../common/optional/openssh.nix
../common/optional/greetd.nix
../common/optional/authentication.nix
../common/optional/pcmanfm.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/flatpak.nix
];
@@ -32,8 +33,12 @@
# Not using the drivers leads to way better results
# services.xserver.videoDrivers = [ "nvidia" ];
programs.kdeconnect.enable = true;
networking.networkmanager.insertNameservers = ["192.168.3.252"];
programs.kdeconnect.enable = true;
programs.steam.enable = true;
programs.hyprland.enable = true;
services.desktopManager.plasma6.enable = true;
# Enable CUPS to print documents.

View File

@@ -22,21 +22,67 @@
../common/optional/pcmanfm.nix
../common/optional/redshift.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";
# networking.wireless.enable = true;
# networking.wireless.environmentFile = config.sops.secrets."wifi/pianonix".path;
# networking.wireless.networks = {
# "@SSID@".psk = "@PSK@";
# enabled by fish, disabling speeds up builds
documentation.man.generateCaches = false;
# 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";
system.stateVersion = "22.11";
sops.secrets."vnc-passwd" = {
owner = config.users.users.julian.name;
sopsFile = ./vnc-passwd;
sopsFile = ./secrets-vnc-passwd.bin;
format = "binary";
};
sops.secrets."wifi/pianonix" = {};
@@ -45,6 +91,18 @@
# sops.secrets."syncthing/public-keys/aspi-nix" = { };
# 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 = {
syncthing = {
enable = true;
@@ -54,6 +112,7 @@
# Enable the Desktop Environment.
# services.xserver.displayManager.lightdm.enable = true;
services.displayManager.defaultSession = "xfce";
services.displayManager.autoLogin = {
enable = true;
user = "julian";
@@ -73,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
# networking.networkmanager.unmanaged = [ "*" ];
services.xserver.enable = true;
services.xserver.desktopManager = {
xfce = {
enable = true;
@@ -129,7 +189,7 @@
};
};
networking.firewall.enable = true;
networking.firewall.enable = false;
networking.firewall.allowedTCPPorts = [
5900 # for vnc
];
@@ -156,4 +216,61 @@
# boot.loader.raspberryPi.firmwareConfig = ''
# 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.kernelModules = [];
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."/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
device = "/dev/disk/by-label/NIXOS_SD";
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

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

View File

@@ -27,6 +27,10 @@ in {
};
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 -"
@@ -67,11 +71,16 @@ in {
echo $$ > "$LOCK_FILE"
trap 'rm -f "$LOCK_FILE"' EXIT
if /run/current-system/sw/bin/nix flake update --flake "${cfg.flakePath}" && /run/current-system/sw/bin/nixos-rebuild switch --flake "${cfg.flakePath}"; then
# 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"
git -C "${cfg.flakePath}" restore flake.lock
# Restore flake.lock
cp -f /var/lib/frajul-auto-upgrade/flake.lock.bak "${cfg.flakePath}/flake.lock"
fi
# Write full timestamp

View File

@@ -11,7 +11,10 @@ in {
system.hydraAutoUpgrade = {
enable = lib.mkEnableOption "periodic hydra-based auto upgrade";
operation = lib.mkOption {
type = lib.types.enum ["switch" "boot"];
type = lib.types.enum [
"switch"
"boot"
];
default = "switch";
};
dates = lib.mkOption {

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

@@ -2,19 +2,19 @@
# For every flake input, aliases 'pkgs.inputs.${flake}' to
# 'inputs.${flake}.packages.${pkgs.system}' or
# 'inputs.${flake}.legacyPackages.${pkgs.system}'
flake-inputs = final: _: {
inputs =
builtins.mapAttrs (
_: flake: let
legacyPackages = (flake.legacyPackages or {}).${final.system} or {};
packages = (flake.packages or {}).${final.system} or {};
in
if legacyPackages != {}
then legacyPackages
else packages
)
inputs;
};
# flake-inputs = final: _: {
# inputs =
# builtins.mapAttrs (
# _: flake: let
# legacyPackages = (flake.legacyPackages or {}).${final.system} or {};
# packages = (flake.packages or {}).${final.system} or {};
# in
# if legacyPackages != {}
# then legacyPackages
# else packages
# )
# inputs;
# };
input-flake-packages = final: prev: {
sheet-organizer = inputs.sheet-organizer.packages.${prev.system}.default; # TODO: change sheet-organizer package output
@@ -25,12 +25,12 @@
my-pkgs = final: prev: {frajul = import ../pkgs {pkgs = final;};};
nixpkgs-stable-unstable = final: prev: {
unstable = import inputs.nixpkgs {
system = prev.system;
unstable = import inputs.nixpkgs-unstable {
system = prev.stdenv.hostPlatform.system;
config.allowUnfree = true;
};
stable = import inputs.nixpkgs-stable {
system = prev.system;
stable = import inputs.nixpkgs {
system = prev.stdenv.hostPlatform.system;
config.allowUnfree = true;
};
};

View File

@@ -13,4 +13,9 @@
pob2 = pkgs.callPackage ./pob2 {};
wl-ocr = pkgs.callPackage ./wl-ocr {};
rtklib = pkgs.qt6Packages.callPackage ./rtklib {};
typst-languagetool = pkgs.callPackage ./typst-languagetool {};
pob2-frajul = pkgs.callPackage ./pob2-frajul {};
# rpi-ws281x-python = pkgs.callPackage ./rpi-ws281x-python {};
# piano-led-visualizer = pkgs.callPackage ./piano-led-visualizer {};
}

View File

@@ -1,6 +1,6 @@
{
writeShellApplication,
nheko,
element-desktop,
telegram-desktop,
thunderbird,
discord, # TODO: discord not available for aarch64, this leads to flake evaluation for this arch fail.
@@ -9,7 +9,7 @@ writeShellApplication {
name = "open-messaging";
runtimeInputs = [
nheko
element-desktop
telegram-desktop
thunderbird
discord
@@ -18,7 +18,7 @@ writeShellApplication {
text = ''
thunderbird &
sleep 0.1
nheko &
element-desktop &
sleep 0.1
Telegram &
sleep 0.1

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;
};
}

View File

@@ -0,0 +1,27 @@
{
rustPlatform,
fetchFromGitHub,
openssl,
pkg-config,
...
}:
rustPlatform.buildRustPackage {
pname = "typst-languagetool";
version = "0.1.0";
src = fetchFromGitHub {
owner = "antonWetzel";
repo = "typst-languagetool";
rev = "b667a7ed94c8d671b23dd4ec018c58039277f0d6";
sha256 = "sha256-sxE8mQW/bH58oZzamjxTQIcSjQh4FaYvrYfNJrnm8Io=";
};
cargoHash = "sha256-80Dfpy2MB7ty841azRwBtA7hhO/yUXh2N4cvtrgTd2g=";
buildFeatures = ["server"];
cargoBuildFlags = "-p cli";
# optional dependencies
buildInputs = [openssl];
nativeBuildInputs = [pkg-config];
}

View File

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