diff --git a/flake.lock b/flake.lock index 73790a3..0792446 100644 --- a/flake.lock +++ b/flake.lock @@ -108,11 +108,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1751418294, - "narHash": "sha256-9uNvQpop5vZiDD/zIacpXKLAiFV1TfkDGks39tcRKgg=", + "lastModified": 1751909516, + "narHash": "sha256-MMhscNXWOig2UzkWJkBoNGp0piO+0mln37HFGPkQV58=", "owner": "cachix", "repo": "devenv", - "rev": "ea17286a36947f6702ce21a18677006dc1e01ffd", + "rev": "36e4cf7d6cb89862e69efce4e5c147ac2e4d38f9", "type": "github" }, "original": { @@ -128,11 +128,11 @@ ] }, "locked": { - "lastModified": 1750903843, - "narHash": "sha256-Ng9+f0H5/dW+mq/XOKvB9uwvGbsuiiO6HrPdAcVglCs=", + "lastModified": 1751854533, + "narHash": "sha256-U/OQFplExOR1jazZY4KkaQkJqOl59xlh21HP9mI79Vc=", "owner": "nix-community", "repo": "disko", - "rev": "83c4da299c1d7d300f8c6fd3a72ac46cb0d59aae", + "rev": "16b74a1e304197248a1bc663280f2548dbfcae3c", "type": "github" }, "original": { @@ -189,21 +189,6 @@ "type": "github" } }, - "flake-compat_3": { - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -288,32 +273,6 @@ "type": "github" } }, - "git-hooks_2": { - "inputs": { - "flake-compat": [ - "stylix", - "flake-compat" - ], - "gitignore": "gitignore_3", - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1747372754, - "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -356,28 +315,6 @@ "type": "github" } }, - "gitignore_3": { - "inputs": { - "nixpkgs": [ - "stylix", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "gnome-shell": { "flake": false, "locked": { @@ -417,32 +354,11 @@ ] }, "locked": { - "lastModified": 1751429452, - "narHash": "sha256-4s5vRtaqdNhVBnbOWOzBNKrRa0ShQTLoEPjJp3joeNI=", + "lastModified": 1751824240, + "narHash": "sha256-aDDC0CHTlL7QDKWWhdbEgVPK6KwWt+ca0QkmHYZxMzI=", "owner": "nix-community", "repo": "home-manager", - "rev": "df12269039dcf752600b1bcc176bacf2786ec384", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1748737919, - "narHash": "sha256-5kvBbLYdp+n7Ftanjcs6Nv+UO6sBhelp6MIGJ9nWmjQ=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "5675a9686851d9626560052a032c4e14e533c1fa", + "rev": "fd9e55f5fac45a26f6169310afca64d56b681935", "type": "github" }, "original": { @@ -513,11 +429,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1751442248, - "narHash": "sha256-QkgZ6tZPAqIqtxC7h0mIygAZokyGTIjD1LR/HLhEihc=", + "lastModified": 1751935943, + "narHash": "sha256-ORn5MaLrkUBEKWneV/R+3IafbC7G8UTfHDjXnM9RKqQ=", "owner": "nix-community", "repo": "nix4vscode", - "rev": "d3755d463dccef454020c61ce9775face4f55e51", + "rev": "8186db71ab2a9b73d73fa20fc32e5601f26ba593", "type": "github" }, "original": { @@ -592,11 +508,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1751271578, - "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", + "lastModified": 1751792365, + "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", + "rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb", "type": "github" }, "original": { @@ -606,6 +522,22 @@ "type": "github" } }, + "nixpkgs-void-editor": { + "locked": { + "lastModified": 1746035195, + "narHash": "sha256-9eVYmsLuKY0Q9U5fB4bgZyjSJjjJYSUdh4A2BieLECc=", + "owner": "jskrzypek", + "repo": "nixpkgs", + "rev": "cc7e0513e30c8b08753a004bbb221202a01cb408", + "type": "github" + }, + "original": { + "owner": "jskrzypek", + "ref": "void-editor", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1746807397, @@ -624,11 +556,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1751271578, - "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", + "lastModified": 1751792365, + "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", + "rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb", "type": "github" }, "original": { @@ -699,6 +631,7 @@ "nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable": "nixpkgs-unstable", + "nixpkgs-void-editor": "nixpkgs-void-editor", "pre-commit-hooks": "pre-commit-hooks", "stylix": "stylix", "zen-browser": "zen-browser" @@ -711,11 +644,8 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_3", "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks_2", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_2", "nixpkgs": [ "nixpkgs" ], @@ -728,11 +658,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1751405764, - "narHash": "sha256-romzrDMOWMPZioeChZnrugwaUSpROfkWClHhWHuRnRQ=", + "lastModified": 1751914048, + "narHash": "sha256-xHO3xlw35tCC0f3pN3osPNjgwwwAgusTuZk5iC8oDiE=", "owner": "danth", "repo": "stylix", - "rev": "5b257989a8337dddc22aa04a70d3665d0384abef", + "rev": "bf0ef81c8fcc30c32db9dab32d379f8d9db835e4", "type": "github" }, "original": { @@ -885,11 +815,11 @@ ] }, "locked": { - "lastModified": 1751440815, - "narHash": "sha256-cBEcG90ahVVPMKEHiyn13KT7cxpcEwSOqrLhgz5/M9k=", + "lastModified": 1751930356, + "narHash": "sha256-xiG5vY4KhrIfUGb/MyPXaDiatFJ0mQngook01X4VwHg=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "a37c444f51b3e7df8ea3333c57a4154c6b09dc39", + "rev": "06c1a125bfa2002e9d84ebf655271c6f06ab1f38", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 26c2461..9ed4124 100644 --- a/flake.nix +++ b/flake.nix @@ -119,6 +119,7 @@ # See also 'stable-packages' and 'unstable-packages' overlays at 'overlays/default.nix" nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-void-editor.url = "github:jskrzypek/nixpkgs/void-editor"; hardware.url = "github:nixos/nixos-hardware"; home-manager = { diff --git a/home/panotaka/common/core/shell/aider.nix b/home/panotaka/common/core/shell/aider.nix new file mode 100644 index 0000000..5558a43 --- /dev/null +++ b/home/panotaka/common/core/shell/aider.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + aider-chat-full + ]; +} diff --git a/home/panotaka/common/core/shell/default.nix b/home/panotaka/common/core/shell/default.nix index 28bdf6e..3e90ef6 100644 --- a/home/panotaka/common/core/shell/default.nix +++ b/home/panotaka/common/core/shell/default.nix @@ -1,6 +1,7 @@ # FIXME(starter): customize your bash preferences here { imports = [ + ./aider.nix ./atuin.nix ./autojump.nix ./bash.nix @@ -11,6 +12,7 @@ ./direnv.nix ./eza.nix ./fish.nix + ./lazydocker.nix ./lazygit.nix ./rip.nix ./tldr.nix diff --git a/home/panotaka/common/core/shell/lazydocker.nix b/home/panotaka/common/core/shell/lazydocker.nix new file mode 100644 index 0000000..88d5ece --- /dev/null +++ b/home/panotaka/common/core/shell/lazydocker.nix @@ -0,0 +1,7 @@ +{ + programs.lazydocker.enable = true; + + home.shellAliases = { + ldocker = "lazydocker"; + }; +} diff --git a/home/panotaka/common/optional/coding/vscode/default.nix b/home/panotaka/common/optional/coding/vscode/default.nix index 8b3a0cd..da4b429 100644 --- a/home/panotaka/common/optional/coding/vscode/default.nix +++ b/home/panotaka/common/optional/coding/vscode/default.nix @@ -20,6 +20,7 @@ ## Code Completion "continue.continue" "rooveterinaryinc.roo-cline" + #"saoudrizwan.claude-dev" ## Development Environment "ms-toolsai.jupyter" @@ -61,6 +62,10 @@ ]; # Settings userSettings = { + "telemetry.feedback.enabled" = false; + "telemetry.telemetryLevel" = "off"; + "github.copilot.enableTelemetry" = false; + "editor.linkedEditing" = true; "editor.inlineSuggest.enabled" = true; "continue.enableTabAutocomplete" = true; diff --git a/home/panotaka/common/optional/desktops/default.nix b/home/panotaka/common/optional/desktops/default.nix index 8363bb3..83edf83 100644 --- a/home/panotaka/common/optional/desktops/default.nix +++ b/home/panotaka/common/optional/desktops/default.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { imports = [ # Packages with custom configs go here @@ -7,8 +6,7 @@ #./fonts.nix ./gtk.nix ]; - home.packages = [ - pkgs.pavucontrol # gui for pulseaudio server and volume controls - pkgs.galculator # gtk based calculator + home.packages = with pkgs; [ + gnome-software ]; } diff --git a/home/panotaka/common/optional/desktops/gtk.nix b/home/panotaka/common/optional/desktops/gtk.nix index a8547ac..6e9acdd 100644 --- a/home/panotaka/common/optional/desktops/gtk.nix +++ b/home/panotaka/common/optional/desktops/gtk.nix @@ -1,14 +1,64 @@ { pkgs, + lib, ... -}: +}: { + dconf.settings = { + "org/gnome/desktop/interface".color-scheme = lib.mkForce "prefer-dark"; + "org/gnome/mutter".experimental-features = ["variable-refresh-rate" "scale-monitor-framebuffer"]; -{ - gtk = { - enable = true; - iconTheme = { - name = "elementary-Xfce-dark"; - package = pkgs.elementary-xfce-icon-theme; + "org/gnome/shell" = { + disable-user-extensions = false; + + # `gnome-extensions list` for a list + enabled-extensions = [ + #"gjsosk@vishram1123.com" + "gsconnect@andyholmes.github.io" + "screen-rotate@shyzus.github.io" + "dash-to-dock@micxgx.gmail.com" + "launch-new-instance@gnome-shell-extensions.gcampax.github.com" + #"power-profile-switcher@eliapasquali.github.io" + #"tilingshell@ferrarodomenico.com" + #"pop-shell@system76.com" + ]; }; - }; + }; + + # Extensions + home.packages = with pkgs; [ + gnomeExtensions.gsconnect + #gnomeExtensions.screen-rotate + gnomeExtensions.dash-to-dock + gnomeExtensions.launch-new-instance + #gnomeExtensions.pop-shell + #gnomeExtensions.power-profile-switcher + #gnomeExtensions.gjs-osk -- Disabled due to issue with read only file system + + apostrophe + collision + contrast + curtail + drawing + eyedropper + fragments + gnome-decoder + gnome-extension-manager + gnome-graphs + gnome-obfuscate + identity + impression + lorem + metadata-cleaner + mission-center + paper-clip + parabolic + pika-backup + #pitivi + pods + ptyxis + tangram + textpieces + video-trimmer + alpaca + ]; } diff --git a/home/panotaka/common/optional/productivity/default.nix b/home/panotaka/common/optional/productivity/default.nix index b65ce35..5c65b03 100644 --- a/home/panotaka/common/optional/productivity/default.nix +++ b/home/panotaka/common/optional/productivity/default.nix @@ -1,5 +1,6 @@ {pkgs, ...}: { imports = [ + ./lmstudio.nix ./obsidian.nix ]; diff --git a/home/panotaka/common/optional/productivity/lmstudio.nix b/home/panotaka/common/optional/productivity/lmstudio.nix new file mode 100644 index 0000000..c41124a --- /dev/null +++ b/home/panotaka/common/optional/productivity/lmstudio.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + home.packages = builtins.attrValues { + inherit + (pkgs) + lmstudio + ; + }; +} diff --git a/hosts/common/core/ssh.nix b/hosts/common/core/ssh.nix index 56bcc45..090ff24 100644 --- a/hosts/common/core/ssh.nix +++ b/hosts/common/core/ssh.nix @@ -2,10 +2,9 @@ lib, pkgs, ... -}: -{ +}: { programs.ssh = lib.optionalAttrs pkgs.stdenv.isLinux { - startAgent = true; + startAgent = false; enableAskPassword = true; - }; + }; } diff --git a/hosts/common/optional/flatpak.nix b/hosts/common/optional/flatpak.nix new file mode 100644 index 0000000..a35c9b2 --- /dev/null +++ b/hosts/common/optional/flatpak.nix @@ -0,0 +1,11 @@ +# NOTE(starter): This is just a basic enabling of the XFCE windows manager for simplicity +{pkgs, ...}: { + services.flatpak.enable = true; + systemd.services.flatpak-repo = { + wantedBy = ["multi-user.target"]; + path = [pkgs.flatpak]; + script = '' + flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + ''; + }; +} diff --git a/hosts/common/optional/gdm.nix b/hosts/common/optional/gdm.nix new file mode 100644 index 0000000..9aef0c8 --- /dev/null +++ b/hosts/common/optional/gdm.nix @@ -0,0 +1,7 @@ +# NOTE(starter): This is just a basic enabling of the XFCE windows manager for simplicity +{ + services.displayManager = { + gdm.enable = true; + gdm.wayland = true; + }; +} diff --git a/hosts/common/optional/gnome.nix b/hosts/common/optional/gnome.nix new file mode 100644 index 0000000..d99a23d --- /dev/null +++ b/hosts/common/optional/gnome.nix @@ -0,0 +1,29 @@ +{pkgs, ...}: { + services.desktopManager.gnome.enable = true; + #environment.sessionVariables.GTK_USE_PORTAL = "1"; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + + environment.gnome.excludePackages = with pkgs; [ + atomix # puzzle game + cheese # webcam tool + epiphany # web browser + evince # document viewer + geary # email reader + gedit # text editor + gnome-characters + gnome-shell-extensions + gnome-music + gnome-photos + gnome-terminal + gnome-tour + hitori # sudoku game + iagno # go game + tali # poker game + totem # video player + ]; + + environment.systemPackages = with pkgs; [ + gnomeExtensions.appindicator + gsettings-desktop-schemas + ]; +} diff --git a/hosts/common/optional/services/docker.nix b/hosts/common/optional/services/docker.nix new file mode 100644 index 0000000..f67fff2 --- /dev/null +++ b/hosts/common/optional/services/docker.nix @@ -0,0 +1,8 @@ +# Enable bluetooth +{ + pkgs, + lib, + ... +}: { + virtualisation.docker.enable = true; +} diff --git a/hosts/common/optional/services/ollama.nix b/hosts/common/optional/services/ollama.nix index 631748b..1a8e6df 100644 --- a/hosts/common/optional/services/ollama.nix +++ b/hosts/common/optional/services/ollama.nix @@ -8,6 +8,7 @@ enable = true; environmentVariables = { OLLAMA_INTEL_GPU = "1"; + OLLAMA_ORIGINS = "moz-extension://*"; }; loadModels = [ ]; diff --git a/hosts/common/optional/theming/themes/tokyonight/default.nix b/hosts/common/optional/theming/themes/tokyonight/default.nix index d219dfa..bef51bc 100644 --- a/hosts/common/optional/theming/themes/tokyonight/default.nix +++ b/hosts/common/optional/theming/themes/tokyonight/default.nix @@ -39,4 +39,19 @@ in { terminal = 10; }; }; + + home-manager.sharedModules = [ + { + programs.vscode = { + extensions = pkgs.nix4vscode.forVscode [ + "huytd.tokyo-city" + "vscode-icons-team.vscode-icons" + ]; + userSettings = { + "workbench.colorTheme" = "Tokyo City Darker"; + "workbench.iconTheme" = "vscode-icons"; + }; + }; + } + ]; } diff --git a/hosts/nixos/Bellerophon/default.nix b/hosts/nixos/Bellerophon/default.nix index a6226e5..df3efe8 100644 --- a/hosts/nixos/Bellerophon/default.nix +++ b/hosts/nixos/Bellerophon/default.nix @@ -8,6 +8,7 @@ { inputs, lib, + pkgs, ... }: { imports = lib.flatten [ @@ -15,11 +16,13 @@ # ========== Hardware ========== # inputs.nixos-hardware.nixosModules.common-cpu-intel + inputs.nixos-hardware.nixosModules.common-gpu-intel inputs.nixos-hardware.nixosModules.common-hidpi inputs.nixos-hardware.nixosModules.common-pc-laptop inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd ./hardware-configuration.nix + ./duo-configuration.nix # # ========== Disk Layout ========== @@ -67,9 +70,11 @@ #"hosts/common/optional/services/openssh.nix" # allow remote SSH access "hosts/common/optional/services/bluetooth.nix" "hosts/common/optional/services/ollama.nix" + "hosts/common/optional/services/docker.nix" "hosts/common/optional/audio.nix" # pipewire and cli controls - "hosts/common/optional/kde.nix" - "hosts/common/optional/sddm.nix" + "hosts/common/optional/gnome.nix" + "hosts/common/optional/gdm.nix" + "hosts/common/optional/flatpak.nix" "hosts/common/optional/thermal-management.nix" # Theming @@ -110,6 +115,9 @@ hardware.graphics = { enable = true; + extraPackages = with pkgs; [ + vpl-gpu-rt # or intel-media-sdk for QSV + ]; }; # https://wiki.nixos.org/wiki/FAQ/When_do_I_update_stateVersion system.stateVersion = "24.11"; diff --git a/hosts/nixos/Bellerophon/duo-configuration.nix b/hosts/nixos/Bellerophon/duo-configuration.nix new file mode 100644 index 0000000..b2f3694 --- /dev/null +++ b/hosts/nixos/Bellerophon/duo-configuration.nix @@ -0,0 +1,61 @@ +{pkgs, ...}: let + # Clone the repository + duoRepo = builtins.fetchGit { + url = "https://github.com/alesya-h/zenbook-duo-2024-ux8406ma-linux"; + # Specify a specific commit or branch if needed + rev = "2b8be1840f38f92e6626da7a442245b74ed0715f"; # Uncomment this line to specify a branch or commit + }; + + # Path to the duo script + duoScript = "${duoRepo}/duo"; + + # Read and modify the script content + modifiedScriptContent = + builtins.replaceStrings [ + "#!/usr/bin/env bash" + "prefered_resolution=\"2880x1800@120.000\"" + ] [ + "#!${pkgs.bash}/bin/bash" + "prefered_resolution=\"2880x1800@120.000+vrr\"" + ] (builtins.readFile duoScript); + + # Write the modifications to a patched duo file + patchedDuoScript = pkgs.writeShellScript "patched-duo" modifiedScriptContent; +in { + systemd.services.watchBacklight = { + description = "synchronize screen brightness"; + wantedBy = ["default.target"]; + path = [pkgs.inotify-tools pkgs.sudo]; + serviceConfig = { + ExecStart = "${patchedDuoScript} watch-backlight"; + Restart = "always"; + RestartSec = 5; + }; + }; + + systemd.user.services.watchDisplays = { + description = "set screens on keyboard event"; + wantedBy = ["default.target"]; + after = ["graphical-session.target"]; + + path = [pkgs.gnome-monitor-config pkgs.usbutils pkgs.inotify-tools]; + serviceConfig = { + preStart = "${patchedDuoScript} normal"; + ExecStart = "${patchedDuoScript} watch-displays"; + Restart = "always"; + RestartSec = 5; + }; + }; + + systemd.user.services.watchRotation = { + description = "rotate screens"; + wantedBy = ["default.target"]; + after = ["graphical-session.target"]; + path = [pkgs.gnome-monitor-config pkgs.iio-sensor-proxy]; + serviceConfig = { + ExecStart = "${patchedDuoScript} watch-rotation"; + Restart = "always"; + RestartSec = 5; + }; + }; +}