From c4fd1a37c1936df2f77994345d944dadd54a4531 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 2 Dec 2024 23:41:00 +0100 Subject: [PATCH 1/9] chore: remove a lot of bloat :) --- modules/home/packages.nix | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/modules/home/packages.nix b/modules/home/packages.nix index ba5e29e..b9c4459 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -14,27 +14,18 @@ lm_sensors # Show sensor outputs, i.e. temperatures yubikey-touch-detector # Display notification when YubiKey requires a headpat bitwarden-cli # Use Bitwarden as a CLI secrets manager - gajim # XMPP client - nheko # Matrix client - linuxKernel.packages.linux_hardened.v4l2loopback # Use A7ii as webcam # wikit # Wikipedia summaries from the terminal, not added to Nix yet # reader # Firefox reader mode but in the terminal, not added to Nix yet vimv # edit filenames in batch with $EDITOR pastel # generate, analyze, convert and manipulate colors glow # Render Markdown from the terminal htmlq # jq but for HTML - lemmeknow # Identify anything android-tools # ADB/Fastboot eva # Calculator - tofi # drun type launcher - # termpdfpy # Read PDFs from the terminal, errors out for now - anki-bin # Learn languages + anki-bin # Flashcards vimv # Bulk rename - audacity # Record audio stuff obs-studio # Record video stuff exiftool # Read exif data from CLI - pinta # "Paint.NET-like editor" - kdenlive # Video editor translate-shell # Google Translate but in the CLI wireguard-tools # VPN connections openresolv # required for wireguard-tools @@ -60,12 +51,10 @@ gitleaks # TODO: adds pre-commit hook libreoffice xfce.thunar - prismlauncher lunar-client - jdk ripgrep yt-dlp - wineWowPackages.wayland + # wineWowPackages.wayland # element-desktop # wayland version is very laggy for me spotify thunderbird From b0ba1ebcffa00fdab363b724c0cc80d727e8e6c2 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Thu, 5 Dec 2024 11:33:35 +0100 Subject: [PATCH 2/9] feat: adds spotify_player --- modules/home/packages.nix | 1 + modules/home/zsh.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/home/packages.nix b/modules/home/packages.nix index b9c4459..9db97e6 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -57,6 +57,7 @@ # wineWowPackages.wayland # element-desktop # wayland version is very laggy for me spotify + spotify_player thunderbird neofetch nodejs_22 diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix index c5c3108..d63ffa0 100644 --- a/modules/home/zsh.nix +++ b/modules/home/zsh.nix @@ -152,6 +152,7 @@ # ]; shellAliases = { + spt = "spotify_player"; convert = "magick"; ls = "eza -lh --git"; la = "eza -A --git"; From 4d55ad66c5d086ba7abfeb8e1c0f346618852304 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sat, 7 Dec 2024 12:21:49 +0100 Subject: [PATCH 3/9] feat: remove cursor as it was offset --- modules/home/hyprland/config.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/home/hyprland/config.nix b/modules/home/hyprland/config.nix index eddf93e..1a074ab 100644 --- a/modules/home/hyprland/config.nix +++ b/modules/home/hyprland/config.nix @@ -28,18 +28,18 @@ color = "black"; }; }; - cursorTheme = { - name = "Bibata-Modern-Ice"; - package = pkgs.bibata-cursors; - size = 24; - }; + # cursorTheme = { + # name = "Bibata-Modern-Ice"; + # package = pkgs.bibata-cursors; + # size = 24; + # }; }; - home.pointerCursor = { - name = "Bibata-Modern-Ice"; - package = pkgs.bibata-cursors; - size = 24; - }; + # home.pointerCursor = { + # name = "Bibata-Modern-Ice"; + # package = pkgs.bibata-cursors; + # size = 24; + # }; # gtk = { # enable = true; From 894aa39d84f23aa8f138db82a07d974c0020023a Mon Sep 17 00:00:00 2001 From: Ahwx Date: Fri, 13 Dec 2024 16:32:07 +0100 Subject: [PATCH 4/9] fix: open element/swaync-client panel with keybinds --- modules/home/hyprland/config.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/hyprland/config.nix b/modules/home/hyprland/config.nix index 1a074ab..0f4a72c 100644 --- a/modules/home/hyprland/config.nix +++ b/modules/home/hyprland/config.nix @@ -228,8 +228,10 @@ "$mainMod SHIFT, F, exec, firefox" "$mainMod SHIFT, W, exec, wdisplays" "$mainMod SHIFT, T, exec, thunderbird" + "$mainMod SHIFT, E, exec, element-desktop" "$mainMod SHIFT, P, exec, pavucontrol-qt" "$mainMod SHIFT, N ,exec, notes" # should be added by scripts/custom packages + "$mainMod, N,exec, swaync-client -t" # screenshot "SUPER SHIFT, S, exec, grimblast --notify --cursor save area ~/Pictures/$(date +'%Y-%m-%d-At-%Ih%Mm%Ss').png" From 0f207dab5b6c6da8198555704532dbbea60644a8 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Fri, 13 Dec 2024 16:32:18 +0100 Subject: [PATCH 5/9] feat: adds hyprsunset and hyprspace --- modules/home/hyprland/hyprland.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/home/hyprland/hyprland.nix b/modules/home/hyprland/hyprland.nix index e4ea538..5cbe8bf 100644 --- a/modules/home/hyprland/hyprland.nix +++ b/modules/home/hyprland/hyprland.nix @@ -11,6 +11,7 @@ glib wayland direnv + inputs.hyprsunset.packages.${pkgs.system}.hyprsunset ]; # systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ]; wayland.windowManager.hyprland = { @@ -22,7 +23,7 @@ # enableNvidiaPatches = false; systemd.enable = true; plugins = [ - # inputs.Hyprspace.packages.${pkgs.system}.Hyprspace + inputs.Hyprspace.packages.${pkgs.system}.Hyprspace inputs.Hyswipe.packages.${pkgs.system}.Hyswipe ]; }; From 241f53891d3de3462a75ee507160680edcd4afea Mon Sep 17 00:00:00 2001 From: Ahwx Date: Fri, 13 Dec 2024 16:32:27 +0100 Subject: [PATCH 6/9] chore: add/remove packages --- modules/home/packages.nix | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/modules/home/packages.nix b/modules/home/packages.nix index 9db97e6..2d14049 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -5,10 +5,8 @@ bandwhich # Terminal bandwidth utilization tool powertop element-desktop # Nheko is kinda shit so sadly this has to happen - yewtube # Play YouTube videos via the terminal iamb # In-terminal-Matrix-messaging signal-desktop # Since the bridge is broken :( - socat # Required for `hyprland-smart-borders` tesseract # Screen grabbing text from images/PDFs/etc pixcat # Display images in the terminal lm_sensors # Show sensor outputs, i.e. temperatures @@ -17,22 +15,18 @@ # wikit # Wikipedia summaries from the terminal, not added to Nix yet # reader # Firefox reader mode but in the terminal, not added to Nix yet vimv # edit filenames in batch with $EDITOR - pastel # generate, analyze, convert and manipulate colors + # pastel # generate, analyze, convert and manipulate colors glow # Render Markdown from the terminal - htmlq # jq but for HTML + # htmlq # jq but for HTML android-tools # ADB/Fastboot eva # Calculator anki-bin # Flashcards - vimv # Bulk rename obs-studio # Record video stuff exiftool # Read exif data from CLI translate-shell # Google Translate but in the CLI wireguard-tools # VPN connections openresolv # required for wireguard-tools - prusa-slicer - blender progress - epy zip ripdrag pwgen @@ -57,7 +51,7 @@ # wineWowPackages.wayland # element-desktop # wayland version is very laggy for me spotify - spotify_player + spotify-player thunderbird neofetch nodejs_22 @@ -73,7 +67,6 @@ ffmpeg killall libnotify - man-pages # extra man pages mpv # video player openssl pamixer # pulseaudio command line mixer From 298a1027f78f5a17416d317a5cf0bd4c64f8f444 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Fri, 13 Dec 2024 16:32:51 +0100 Subject: [PATCH 7/9] feat: adds hyprsunset --- flake.lock | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++--- flake.nix | 1 + 2 files changed, 138 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index bc6e6e7..2007db9 100644 --- a/flake.lock +++ b/flake.lock @@ -288,7 +288,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1726560853, @@ -564,6 +564,31 @@ "type": "github" } }, + "hyprland-protocols_2": { + "inputs": { + "nixpkgs": [ + "hyprsunset", + "nixpkgs" + ], + "systems": [ + "hyprsunset", + "systems" + ] + }, + "locked": { + "lastModified": 1728345020, + "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "a7c183800e74f337753de186522b9017a07a8cee", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, "hyprlang": { "inputs": { "hyprutils": [ @@ -614,6 +639,28 @@ "type": "github" } }, + "hyprsunset": { + "inputs": { + "hyprland-protocols": "hyprland-protocols_2", + "hyprutils": "hyprutils_3", + "hyprwayland-scanner": "hyprwayland-scanner_3", + "nixpkgs": "nixpkgs_5", + "systems": "systems_6" + }, + "locked": { + "lastModified": 1731163989, + "narHash": "sha256-+M6/ZLT2g6l2JCBBQSNMp8oqXPMMUckWTNhHSXzvlXE=", + "owner": "hyprwm", + "repo": "hyprsunset", + "rev": "adaae9d2adac611151224b054f59db8cb0976779", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprsunset", + "type": "github" + } + }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -664,6 +711,31 @@ "type": "github" } }, + "hyprutils_3": { + "inputs": { + "nixpkgs": [ + "hyprsunset", + "nixpkgs" + ], + "systems": [ + "hyprsunset", + "systems" + ] + }, + "locked": { + "lastModified": 1727300645, + "narHash": "sha256-OvAtVLaSRPnbXzOwlR1fVqCXR7i+ICRX3aPMCdIiv+c=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "3f5293432b6dc6a99f26aca2eba3876d2660665c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, "hyprwayland-scanner": { "inputs": { "nixpkgs": [ @@ -714,6 +786,31 @@ "type": "github" } }, + "hyprwayland-scanner_3": { + "inputs": { + "nixpkgs": [ + "hyprsunset", + "nixpkgs" + ], + "systems": [ + "hyprsunset", + "systems" + ] + }, + "locked": { + "lastModified": 1726874836, + "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -739,7 +836,7 @@ "nix-gaming": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "umu": "umu" }, "locked": { @@ -876,6 +973,22 @@ } }, "nixpkgs_5": { + "locked": { + "lastModified": 1728241625, + "narHash": "sha256-yumd4fBc/hi8a9QgA9IT8vlQuLZ2oqhkJXHPKxH/tRw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c31898adf5a8ed202ce5bea9f347b1c6871f32d1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1731890469, "narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=", @@ -891,7 +1004,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1732758367, "narHash": "sha256-RzaI1RO0UXqLjydtz3GAXSTzHkpb/lLD1JD8a0W4Wpo=", @@ -907,7 +1020,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1728492678, "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", @@ -923,7 +1036,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1728492678, "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", @@ -942,7 +1055,7 @@ "nixvim": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "nixvim": "nixvim_2" }, "locked": { @@ -967,7 +1080,7 @@ "git-hooks": "git-hooks", "home-manager": "home-manager_3", "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "nuschtosSearch": "nuschtosSearch", "treefmt-nix": "treefmt-nix" }, @@ -1058,9 +1171,10 @@ "hypr-contrib": "hypr-contrib", "hyprland": "hyprland", "hyprpicker": "hyprpicker", + "hyprsunset": "hyprsunset", "nix-gaming": "nix-gaming", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "nixvim": "nixvim", "nur": "nur" } @@ -1158,6 +1272,21 @@ } }, "systems_6": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_7": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", diff --git a/flake.nix b/flake.nix index 10d08da..0aff0fb 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,7 @@ }; hypr-contrib.url = "github:hyprwm/contrib"; hyprpicker.url = "github:hyprwm/hyprpicker"; + hyprsunset.url = "github:hyprwm/hyprsunset"; Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; # Hyprspace uses latest Hyprland. We declare this to keep them in sync. From c802f8a41024ca57a34fee0babb76e104cda2d20 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Thu, 19 Dec 2024 01:32:23 +0100 Subject: [PATCH 8/9] feat: add `ichiyo` (x230) --- flake.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flake.nix b/flake.nix index 0aff0fb..f6a4b21 100644 --- a/flake.nix +++ b/flake.nix @@ -60,6 +60,14 @@ ]; specialArgs = { host="sakura"; inherit self inputs username ; }; }; + ichiyo = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + (import ./hosts/ichiyo) + agenix.nixosModules.default + ]; + specialArgs = { host="sakura"; inherit self inputs username ; }; + }; violet = nixpkgs.lib.nixosSystem { inherit system; modules = [ From 7da48159dc95e4991d1af5c4c5ddbdf7ff55632e Mon Sep 17 00:00:00 2001 From: Ahwx Date: Thu, 19 Dec 2024 15:39:23 +0100 Subject: [PATCH 9/9] feat: adds configuration for ichiyo --- hosts/ichiyo/default.nix | 36 +++++++++++++++++++++++++ hosts/ichiyo/hardware-configuration.nix | 36 +++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 hosts/ichiyo/default.nix create mode 100644 hosts/ichiyo/hardware-configuration.nix diff --git a/hosts/ichiyo/default.nix b/hosts/ichiyo/default.nix new file mode 100644 index 0000000..c38c5e8 --- /dev/null +++ b/hosts/ichiyo/default.nix @@ -0,0 +1,36 @@ +{ lib, inputs, pkgs, config, ... }: +{ + imports = [ + ./hardware-configuration.nix + ./../../modules/core + ]; + + powerManagement = { + enable = true; + # powertop.enable = true; + cpuFreqGovernor = lib.mkDefault "ondemand"; + }; + + liv.laptop.enable = true; + + # Bootloader stuff + boot.loader.grub.enable = lib.mkForce true; + boot.loader.grub.device = lib.mkForce "/dev/sda"; + boot.loader.grub.useOSProber = lib.mkForce true; + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; + }; + boot.loader.grub.enableCryptodisk = lib.mkForce true; + boot.initrd.luks.devices."luks-729500c5-557b-45c8-ab3f-5c365db28284".keyFile = lib.mkForce "/crypto_keyfile.bin"; + + networking.hostName = "ichiyo"; + + boot = { + extraModulePackages = with config.boot.kernelPackages; + [ + acpi_call + cpupower + ] + ++ [pkgs.cpupower-gui]; + }; +} diff --git a/hosts/ichiyo/hardware-configuration.nix b/hosts/ichiyo/hardware-configuration.nix new file mode 100644 index 0000000..96cba70 --- /dev/null +++ b/hosts/ichiyo/hardware-configuration.nix @@ -0,0 +1,36 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/348a526e-113e-4b62-b54e-b0bf9ad101a2"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-729500c5-557b-45c8-ab3f-5c365db28284".device = "/dev/disk/by-uuid/729500c5-557b-45c8-ab3f-5c365db28284"; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wwp0s20u4i6.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}