From 2d697c079d74cfbbaf7bc25f3e4f1f0c01c2fdbc Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Mon, 2 Jun 2025 14:51:38 +0200 Subject: [PATCH 1/5] merge --- configuration.nix | 24 +++++++------- home-modules/chatterino.nix | 4 +-- home-modules/hyprland.nix | 62 +++++++++++++++++++++---------------- 3 files changed, 51 insertions(+), 39 deletions(-) diff --git a/configuration.nix b/configuration.nix index 6b3ffc9..1060df1 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,25 +4,22 @@ inputs.sops-nix.nixosModules.sops ./system-modules/adb.nix ./system-modules/auto-mount.nix - ./system-modules/calendar.nix - ./system-modules/hardware-configuration.nix - ./system-modules/fuse.nix - ./system-modules/games.nix - ./system-modules/nvidia.nix - ./system-modules/users.nix - ./system-modules/sound.nix - ./system-modules/fonts.nix - ./system-modules/boot.nix - ./system-modules/gc.nix ./system-modules/boot.nix + ./system-modules/boot.nix + ./system-modules/calendar.nix ./system-modules/dm.nix ./system-modules/docker.nix ./system-modules/fcitx5.nix ./system-modules/fonts.nix + ./system-modules/fonts.nix ./system-modules/fuse.nix + ./system-modules/fuse.nix + ./system-modules/games.nix + ./system-modules/gc.nix ./system-modules/gc.nix ./system-modules/gpg.nix ./system-modules/hardware-configuration.nix + ./system-modules/hardware-configuration.nix ./system-modules/health_reminder.nix ./system-modules/hsmw.nix ./system-modules/kanata.nix @@ -30,13 +27,17 @@ ./system-modules/networking.nix ./system-modules/nixd.nix ./system-modules/nvidia.nix + ./system-modules/nvidia.nix ./system-modules/ollama.nix ./system-modules/qmk.nix ./system-modules/scanning.nix ./system-modules/sops.nix ./system-modules/sound.nix + ./system-modules/sound.nix ./system-modules/sshd.nix ./system-modules/syncthing.nix + ./system-modules/tuda.nix + ./system-modules/users.nix ./system-modules/users.nix ./system-modules/virtualisation.nix ./system-modules/ydotool.nix @@ -58,7 +59,8 @@ ./system-modules/calendar-lec.nix ./system-modules/calendar-lr.nix ./system-modules/calendar-dicos.nix - ] else []); + ] else [ + ]); # Set your time zone. time.timeZone = "Europe/Berlin"; diff --git a/home-modules/chatterino.nix b/home-modules/chatterino.nix index 5853b2b..4f6e419 100644 --- a/home-modules/chatterino.nix +++ b/home-modules/chatterino.nix @@ -1,4 +1,4 @@ -{ config, pkgs, rice, user, secrets, ... }: +{ config, pkgs, hyper, rice, secrets, ... }: let channels = [ "Caedrel" @@ -193,7 +193,7 @@ in { "external": { "streamlink": { "quality": "", - "options": "--config /home/${user}/.config/streamlink/config" + "options": "--config /${hyper.home}/.config/streamlink/config" } } } diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index 83b34a8..4f5255c 100644 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -4,15 +4,27 @@ let transparency = builtins.toString rice.transparency; terminal = "ghostty"; terminal-exec = "ghostty --command="; - monitors = { + monitors = let + docked = false; + in { xps = { - main = { + main = if docked then { + name = "DP-5"; + resolution = "1920x1080"; + position = "1920x0"; + scale = "1.0"; + } else { name = "eDP-1"; resolution = "1920x1200"; position = "0x1080"; scale = "1.0"; }; - second = { + second = if docked then { + name = "DP-6"; + resolution = "1920x1080"; + position = "0x0"; + scale = "1.0"; + } else { name = "DP-3"; resolution = "1920x1080"; position = "0x0"; @@ -281,48 +293,46 @@ in { "rounding 0, floating:0, onworkspace:w[tv1]" "bordersize 0, floating:0, onworkspace:f[1]" "rounding 0, floating:0, onworkspace:f[1]" - ]; - windowrule = [ # "opacity ${transparency}, firefox" - "opacity ${transparency}, code-oss" - "opacity ${transparency}, VSCodium" - "opacity ${transparency}, Code" + "opacity ${transparency}, class:^(code-oss)$" + "opacity ${transparency}, class:^(VSCodium)$" + "opacity ${transparency}, class:^(Code)$" # "opacity ${transparency}, sent" - "opacity ${transparency}, neovide" - "opacity ${transparency}, obsidian" + "opacity ${transparency}, class:^(neovide)$" + "opacity ${transparency}, class:^(obsidian)$" # "opacity ${transparency}, zathura" # "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Alacritty" # "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), ${terminal}" - "opacity ${transparency}, discord" - "opacity ${transparency}, vesktop" - "opacity ${transparency}, Element" - "opacity ${transparency}, lutris" - "opacity ${transparency}, element" + "opacity ${transparency}, class:^(discord)$" + "opacity ${transparency}, class:^(vesktop)$" + "opacity ${transparency}, class:^(Element)$" + "opacity ${transparency}, class:^(lutris)$" + "opacity ${transparency}, class:^(element)$" # "opacity ${transparency}, ^([sS]potify)$" # "opacity ${transparency}, virt-manager" # "opacity ${transparency}, thunar" "opacity ${transparency}, title:^(wlogout)$" "opaque, title:^(GNU Image Manipulation Program)$" "float, title:^(Picture-in-Picture)$" - "float, title:^(Ibus-ui.*)$" - "float, ^(ibus-ui.*)$" - "float, ^(ibus-ui-gtk3)$" + # "float, class:^(Ibus-ui.*)$" + # "float, ^(ibus-ui.*)$" + # "float, ^(ibus-ui-gtk3)$" "float, title:^(Ibus-ui-gtk3)$" "pin, title:^(Picture-in-Picture)$" - "float, org.kde.polkit-kde-authentication-agent-1" + "float, class:^(org.kde.polkit-kde-authentication-agent-1)$" "float, title:^(wlogout)$" - "float, imv" + "float, class:^(imv)$" "float, title:^(Page Info — .*)$" "float, title:^(Compact folders)$" - "tile, sent" - "fullscreen, wlogout" - "fullscreen, sent" - "workspace 14, lutris" + "tile, class:^(sent)$" + "fullscreen, class:^(wlogout)$" + "fullscreen, class:^(sent)$" + "workspace 14, class:^(lutris)$" "workspace 100, title:^(Apex Legends)$" - "workspace 100, ^(cyberpunk2077.exe)$" + # "workspace 100, ^(cyberpunk2077.exe)$" "workspace 100, title:^(No Man.s Sky)$" - "workspace 100, gamescope" + "workspace 100, class:^(gamescope)$" ]; From 10e1941c5a0984f52d5cd6332dcdc618c1d73bcc Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Thu, 5 Jun 2025 20:34:31 +0200 Subject: [PATCH 2/5] nix-on-droid untested --- flake.nix | 28 ++++++++++++---------------- nix-on-droid.nix | 24 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 nix-on-droid.nix diff --git a/flake.nix b/flake.nix index 5f06978..a9b839d 100644 --- a/flake.nix +++ b/flake.nix @@ -41,8 +41,15 @@ latest = import nixpkgs-latest { inherit system config; }; version = "25.05"; }; + pkgs64 = let + system = "aarch64-linux"; + in import nixpkgs { inherit system config; } // { + unstable = import nixpkgs-unstable { inherit system config; }; + latest = import nixpkgs-latest { inherit system config; }; + version = "24.05"; + }; - nvidia-base = import ./flake-modules/nvidia.nix; + nvidia-base = import ./flake-modules/nvidia.nix; secrets = import ./git-crypt/secrets.nix; rice = import ./flake-modules/rice.nix pkgs; @@ -62,26 +69,15 @@ hyper = hyper-base // { inherit host; }; in { inherit pkgs inputs hyper rice; }; }; - make-nixondroid-system = host: nixpkgs.lib.nixosSystem { - inherit system; - modules = [ ./nix-on-droid.nix ]; - specialArgs = let - pkgs.version = "24.05"; - hyper = hyper-base // { - inherit host; - system = "aarch64-linux"; - home = assert 1 == 2; ""; - }; - in { inherit pkgs inputs hyper rice; }; - }; in { NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; }; NxNORTH = make-nixos-system "NxNORTH" { enable = true; prime = false; }; NxACE = make-nixos-system "NxACE" { enable = false; }; - NxWSL = make-nixos-wsl-system "NxWSL"; - - NxS23U = make-nixondroid-system "NxS23U"; + }; + nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration { + pkgs = pkgs64; + modules = [ ./nix-on-droid.nix ]; }; homeConfigurations = let diff --git a/nix-on-droid.nix b/nix-on-droid.nix new file mode 100644 index 0000000..11e44ca --- /dev/null +++ b/nix-on-droid.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +{ + # Simply install just the packages + environment.packages = with pkgs; [ + helix + git + lazygit + yazi + ]; + + # Backup etc files instead of failing to activate generation if a file already exists in /etc + environment.etcBackupExtension = ".bak"; + + # Read the changelog before changing this value + system.stateVersion = pkgs.version; + + # Set up nix for flakes + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + # Set your time zone + time.timeZone = "Europe/Berlin"; +} From e0b43bcbe58a6befad26716127e5217f0570c79e Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Fri, 6 Jun 2025 13:51:42 +0200 Subject: [PATCH 3/5] dysk --- home-modules/pkgs-list/shell.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home-modules/pkgs-list/shell.nix b/home-modules/pkgs-list/shell.nix index bd00f5c..77774ab 100644 --- a/home-modules/pkgs-list/shell.nix +++ b/home-modules/pkgs-list/shell.nix @@ -6,6 +6,7 @@ cmake dig du-dust + dysk exiftool eza ffmpeg From 68c749474ee2a0a698caeaa24842cc94f4caca29 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Fri, 6 Jun 2025 13:51:51 +0200 Subject: [PATCH 4/5] lr euma --- system-modules/calendar-lr.nix | 35 +++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/system-modules/calendar-lr.nix b/system-modules/calendar-lr.nix index bb707b2..6605ea8 100644 --- a/system-modules/calendar-lr.nix +++ b/system-modules/calendar-lr.nix @@ -25,25 +25,27 @@ import requests def filter_events(events): return [event for event in events if ("LR" in event.name) or ("TBD" in event.name)] -def fetch_and_save_ical_events(ical_url, save_path): +def fetch_and_save_ical_events(ical_urls, save_path): """ Fetch events from an iCal URL and save them as a single combined calendar. """ try: - # Fetch the iCal data - response = requests.get(ical_url) - response.raise_for_status() - - # Parse the iCal data - calendar = Calendar(response.text) - - # Adjust events - adjusted_events = filter_events(list(calendar.events)) - # Create a new combined calendar combined_calendar = Calendar() - for event in adjusted_events: - combined_calendar.events.add(event) + + for url in ical_urls: + # Fetch the iCal data + response = requests.get(url) + response.raise_for_status() + + # Parse the iCal data + calendar = Calendar(response.text) + + # Adjust events + adjusted_events = filter_events(list(calendar.events)) + + for event in adjusted_events: + combined_calendar.events.add(event) # Save the combined calendar to a single .ics file with open(save_path, 'w') as file: @@ -58,10 +60,13 @@ def fetch_and_save_ical_events(ical_url, save_path): if __name__ == "__main__": # Replace with your iCal URL and target file path - ICAL_URL = "https://zlypher.github.io/lol-events/cal/league-of-legends-nlc.ical" + ICAL_URLS = [ + "https://zlypher.github.io/lol-events/cal/league-of-legends-nlc.ical", + "https://zlypher.github.io/lol-events/cal/league-of-legends-emea-masters.ical" + ] SAVE_PATH = "${config.services.nginx.virtualHosts."${hyper.domain}".root}/lr.ics" - fetch_and_save_ical_events(ICAL_URL, SAVE_PATH) + fetch_and_save_ical_events(ICAL_URLS, SAVE_PATH) ''); in '' ${nx_cal_lr}/bin/nx_cal_lr From a8629627ea3f2bc1f97c087afca7eb806d770e91 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Fri, 6 Jun 2025 13:52:04 +0200 Subject: [PATCH 5/5] no printlastlog sshd --- system-modules/sshd.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/system-modules/sshd.nix b/system-modules/sshd.nix index 5566b3d..fbe42a1 100644 --- a/system-modules/sshd.nix +++ b/system-modules/sshd.nix @@ -16,6 +16,7 @@ ports = [ secrets.ssh.port ]; settings = { PasswordAuthentication = false; + PrintLastLog = false; }; }; }