From 956ace75b0cb9e8c6dd646a66b80e7850db41331 Mon Sep 17 00:00:00 2001 From: Roman Lubij Date: Sun, 1 Mar 2026 08:19:46 +0100 Subject: [PATCH] Implement home-manager --- Justfile | 17 +++ common/hardware-configuration.nix | 1 + common/modules/attic.nix | 1 + common/modules/default.nix | 5 +- common/modules/gnome.nix | 2 +- common/modules/home/dconf/apps.nix | 31 ++++ common/modules/home/dconf/default.nix | 17 +++ common/modules/home/dconf/extensions.nix | 163 ++++++++++++++++++++++ common/modules/home/dconf/gnome.nix | 103 ++++++++++++++ common/modules/home/default.nix | 13 ++ common/modules/home/starship.nix | 115 +++++++++++++++ common/modules/home/zsh.nix | 91 ++++++++++++ common/modules/packages.nix | 10 +- common/modules/services.nix | 2 +- common/modules/vm.nix | 23 +++ desktop/modules/default.nix | 4 +- desktop/modules/home/dconf/apps.nix | 7 + desktop/modules/home/dconf/default.nix | 11 ++ desktop/modules/home/dconf/extensions.nix | 7 + desktop/modules/home/dconf/gnome.nix | 27 ++++ desktop/modules/home/default.nix | 9 ++ flake.lock | 39 ++++-- flake.nix | 33 +++++ laptop/modules/default.nix | 4 +- laptop/modules/home/dconf/apps.nix | 7 + laptop/modules/home/dconf/default.nix | 11 ++ laptop/modules/home/dconf/extensions.nix | 7 + laptop/modules/home/dconf/gnome.nix | 15 ++ laptop/modules/home/default.nix | 9 ++ laptop/modules/programs.nix | 1 + laptop/modules/services.nix | 1 + 31 files changed, 764 insertions(+), 22 deletions(-) create mode 100644 Justfile create mode 100644 common/modules/home/dconf/apps.nix create mode 100644 common/modules/home/dconf/default.nix create mode 100644 common/modules/home/dconf/extensions.nix create mode 100644 common/modules/home/dconf/gnome.nix create mode 100644 common/modules/home/default.nix create mode 100644 common/modules/home/starship.nix create mode 100644 common/modules/home/zsh.nix create mode 100644 common/modules/vm.nix create mode 100644 desktop/modules/home/dconf/apps.nix create mode 100644 desktop/modules/home/dconf/default.nix create mode 100644 desktop/modules/home/dconf/extensions.nix create mode 100644 desktop/modules/home/dconf/gnome.nix create mode 100644 desktop/modules/home/default.nix create mode 100644 laptop/modules/home/dconf/apps.nix create mode 100644 laptop/modules/home/dconf/default.nix create mode 100644 laptop/modules/home/dconf/extensions.nix create mode 100644 laptop/modules/home/dconf/gnome.nix create mode 100644 laptop/modules/home/default.nix diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..76b2b89 --- /dev/null +++ b/Justfile @@ -0,0 +1,17 @@ +vm-desktop: + nix build .#nixosConfigurations.epiquev2.config.system.build.vm + ./result/bin/run-epiquev2-vm + +vm-laptop: + nix build .#nixosConfigurations.dalaptop.config.system.build.vm + ./result/bin/run-dalaptop-vm + +clean: + rm -rf result + rm -rf *.qcow2 + +switch: + nh os switch + +help: + @just --list \ No newline at end of file diff --git a/common/hardware-configuration.nix b/common/hardware-configuration.nix index 44b6cc0..ef0b38d 100644 --- a/common/hardware-configuration.nix +++ b/common/hardware-configuration.nix @@ -2,6 +2,7 @@ pkgs, ... }: + { boot = { kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest; diff --git a/common/modules/attic.nix b/common/modules/attic.nix index 8a9a5c2..95d631f 100644 --- a/common/modules/attic.nix +++ b/common/modules/attic.nix @@ -1,6 +1,7 @@ { ... }: + { nix.settings = { substituters = [ diff --git a/common/modules/default.nix b/common/modules/default.nix index e755721..cec6d20 100644 --- a/common/modules/default.nix +++ b/common/modules/default.nix @@ -1,4 +1,6 @@ -{ ... }: +{ + ... +}: { imports = [ @@ -9,5 +11,6 @@ ./packages.nix ./programs.nix ./services.nix + ./vm.nix ]; } diff --git a/common/modules/gnome.nix b/common/modules/gnome.nix index e67533f..f57ff89 100644 --- a/common/modules/gnome.nix +++ b/common/modules/gnome.nix @@ -29,10 +29,10 @@ appindicator blur-my-shell bluetooth-quick-connect + caffeine bubblemail color-picker dash-to-dock - # favorites-to-applications-grid middle-click-to-close-in-overview undecorate user-themes diff --git a/common/modules/home/dconf/apps.nix b/common/modules/home/dconf/apps.nix new file mode 100644 index 0000000..b49bc7f --- /dev/null +++ b/common/modules/home/dconf/apps.nix @@ -0,0 +1,31 @@ +{ + ... +}: + +{ + dconf.settings = { + "org/virt-manager/virt-manager/connections" = { + autoconnect = [ "qemu:///system" ]; + uris = [ "qemu:///system" ]; + }; + + "org/gnome/Console" = { + custom-font = "FiraCode Nerd Font Mono 10"; + use-system-font = false; + }; + + "org/gnome/TextEditor" = { + custom-font = "Fira Code weight=450 11"; + use-system-font = false; + }; + + "org/gnome/nautilus/preferences" = { + default-folder-viewer = "icon-view"; + migrated-gtk-settings = true; + recursive-search = "always"; + search-filter-time-type = "last_modified"; + show-directory-item-counts = "always"; + show-image-thumbnails = "always"; + }; + }; +} diff --git a/common/modules/home/dconf/default.nix b/common/modules/home/dconf/default.nix new file mode 100644 index 0000000..42e7708 --- /dev/null +++ b/common/modules/home/dconf/default.nix @@ -0,0 +1,17 @@ +{ + ... +}: + +{ + imports = [ + ./apps.nix + ./extensions.nix + ./gnome.nix + ]; + + dconf.settings = { + "system/locale" = { + region = "cs_CZ.UTF-8"; + }; + }; +} diff --git a/common/modules/home/dconf/extensions.nix b/common/modules/home/dconf/extensions.nix new file mode 100644 index 0000000..c143689 --- /dev/null +++ b/common/modules/home/dconf/extensions.nix @@ -0,0 +1,163 @@ +{ + lib, + ... +}: + +{ + dconf.settings = { + "org/gnome/shell/extensions/user-theme" = { + name = "Flat-Remix-Darkest-fullPanel"; + }; + + "org/gnome/shell/extensions/thanatophobia" = { + year = 2004; + month = 11; + day = 23; + hour = 12; + minute = 0; + sex = 1; + expectancy = 74.11; + rounding = 7; + country = "CZE"; + countdown = 0; + }; + + "org/gnome/shell/extensions/appindicator" = { + icon-brightness = 0.0; + icon-contrast = 0.0; + icon-opacity = 240; + icon-saturation = 0.0; + icon-size = 0; + legacy-tray-enabled = true; + }; + + "org/gnome/shell/extensions/dash-to-dock" = { + apply-custom-theme = false; + autohide-in-fullscreen = false; + background-color = "rgb(0,0,0)"; + background-opacity = 0.8; + click-action = "skip"; + custom-background-color = true; + custom-theme-shrink = true; + customize-alphas = true; + dash-max-icon-size = 28; + dock-fixed = false; + dock-position = "BOTTOM"; + extend-height = false; + height-fraction = 0.9; + hide-tooltip = false; + intellihide-mode = "ALL_WINDOWS"; + isolate-workspaces = true; + max-alpha = 0.6; + middle-click-action = "launch"; + min-alpha = 0.10; + preferred-monitor = -2; + preview-size-scale = 0.5; + running-indicator-style = "DOTS"; + scroll-action = "cycle-windows"; + shift-click-action = "minimize"; + shift-middle-click-action = "launch"; + show-apps-at-top = true; + show-mounts-network = true; + transparency-mode = "DYNAMIC"; + }; + + "org/gnome/shell/extensions/bluetooth-quick-connect" = { + show-battery-value-on = true; + }; + + "org/gnome/shell/extensions/blur-my-shell" = { + settings-version = 2; + pipelines = lib.hm.gvariant.mkValue '' + { + 'pipeline_default': { + 'name': <'Default'>, + 'effects': <[ + { + 'type': <'native_static_gaussian_blur'>, + 'id': <'effect_27049338116840'>, + 'params': <@a{sv} {}> + }, + { + 'type': <'noise'>, + 'id': <'effect_90950561821691'>, + 'params': <{'lightness': <0.64>, 'noise': <0.25>}> + } + ]> + }, + 'pipeline_default_rounded': { + 'name': <'Default rounded'>, + 'effects': <[ + { + 'type': <'native_static_gaussian_blur'>, + 'id': <'effect_000000000001'>, + 'params': <{'radius': <30>, 'brightness': <0.6>}> + }, + { + 'type': <'corner'>, + 'id': <'effect_000000000002'>, + 'params': <{'radius': <24>}> + } + ]> + } + } + ''; + }; + + "org/gnome/shell/extensions/blur-my-shell/appfolder" = { + brightness = 0.6; + sigma = 30; + }; + + "org/gnome/shell/extensions/blur-my-shell/applications" = { + blur = false; + brightness = 1.0; + opacity = 217; + whitelist = [ "org.gnome.Console" ]; + }; + + "org/gnome/shell/extensions/blur-my-shell/coverflow-alt-tab" = { + blur = false; + pipeline = "pipeline_default"; + }; + + "org/gnome/shell/extensions/blur-my-shell/dash-to-dock" = { + blur = false; + brightness = 0.6; + pipeline = "pipeline_default_rounded"; + sigma = 30; + static-blur = false; + style-dash-to-dock = 0; + }; + + "org/gnome/shell/extensions/blur-my-shell/lockscreen" = { + pipeline = "pipeline_default"; + }; + + "org/gnome/shell/extensions/blur-my-shell/overview" = { + pipeline = "pipeline_default"; + style-components = 2; + }; + + "org/gnome/shell/extensions/blur-my-shell/panel" = { + brightness = 0.6; + force-light-text = false; + pipeline = "pipeline_default"; + sigma = 30; + static-blur = false; + }; + + "org/gnome/shell/extensions/blur-my-shell/screenshot" = { + pipeline = "pipeline_default"; + }; + + "org/gnome/shell/extensions/blur-my-shell/window-list" = { + brightness = 0.6; + sigma = 30; + }; + + "org/gnome/shell/ectensions/bubblemail" = { + newest-first = true; + }; + }; +} diff --git a/common/modules/home/dconf/gnome.nix b/common/modules/home/dconf/gnome.nix new file mode 100644 index 0000000..29e8443 --- /dev/null +++ b/common/modules/home/dconf/gnome.nix @@ -0,0 +1,103 @@ +{ + lib, + ... +}: + +{ + dconf.settings = { + "org/gnome/desktop/interface" = { + accent-color = "red"; + clock-format = "24h"; + clock-show-seconds = true; + color-scheme = "prefer-dark"; + cursor-size = 24; + cursor-theme = "Bibata-Modern-Classic"; + font-antialiasing = "grayscale"; + font-hinting = "slight"; + gtk-theme = "Flat-Remix-GTK-Red-Darkest"; + icon-theme = "Papirus-Dark"; + show-battery-percentage = true; + toolkit-accessibility = true; + overlay-scrolling = true; + }; + + "org/gnome/desktop/peripherals/mouse" = { + accel-profile = "flat"; + natural-scroll = false; + }; + + "org/gnome/desktop/peripherals/keyboard" = { + numlock-state = true; + }; + + "org/gnome/desktop/background" = { + picture-options = "zoom"; + picture-uri = "file:///home/jax/.config/background"; + picture-uri-dark = "file:///home/jax/.config/background"; + }; + + "org/gnome/desktop/wm/keybindings" = { + move-to-workspace-left = [ "Left" ]; + move-to-workspace-right = [ "Right" ]; + switch-to-workspace-left = [ "Left" ]; + switch-to-workspace-right = [ "Right" ]; + switch-windows = [ "Tab" ]; + switch-windows-backward = [ "Tab" ]; + toggle-fullscreen = [ "F11" ]; + }; + + "org/gnome/desktop/wm/preferences" = { + button-layout = "appmenu:minimize,close"; + }; + + "org/gnome/settings-daemon/plugins/media-keys" = { + custom-keybindings = lib.mkBefore [ + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" + ]; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { + binding = "t"; + command = "kgx"; + name = "Terminal"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { + binding = "e"; + command = "nautilus"; + name = "Filus Managus"; + }; + + "org/gnome/mutter" = { + attach-modal-dialogs = false; + experimental-features = [ + "scale-monitor-framebuffer" + "variable-refresh-rate" + "xwayland-native-scaling" + ]; + }; + + "org/gnome/shell" = { + disable-user-extensions = false; + favorite-apps = [ + "vesktop.desktop" + "org.gnome.Nautilus.desktop" + "steam.desktop" + "firefox.desktop" + "org.telegram.desktop.desktop" + "org.gnome.Console.desktop" + "io.missioncenter.MissionCenter.desktop" + "tidal-hifi.desktop" + ]; + }; + + "org/gnome/desktop/datetime" = { + automatic-timezone = true; + }; + + "org/gnome/system/location" = { + enabled = false; + }; + }; +} diff --git a/common/modules/home/default.nix b/common/modules/home/default.nix new file mode 100644 index 0000000..108e444 --- /dev/null +++ b/common/modules/home/default.nix @@ -0,0 +1,13 @@ +{ + ... +}: + +{ + imports = [ + ./dconf + ./starship.nix + ./zsh.nix + ]; + + home.stateVersion = "25.05"; +} diff --git a/common/modules/home/starship.nix b/common/modules/home/starship.nix new file mode 100644 index 0000000..6dc8f95 --- /dev/null +++ b/common/modules/home/starship.nix @@ -0,0 +1,115 @@ +{ + lib, + ... +}: + +{ + programs.starship = { + enable = true; + settings = { + format = lib.concatStrings [ + "\${custom.ssh_status}" + "\${custom.distrobox}" + "\${nix_shell}" + "$python" + "[░▒▓](#FFFFFF)" + "[ 🐺 ](bg:#FFFFFF fg:#1E91D6)" + "[](bg:#0072BB fg:#FFFFFF)" + "$directory" + "[](fg:#0072BB bg:#E18335)" + "$git_branch" + "$git_status" + "[](fg:#E18335 bg:#061A40)" + "\${custom.android}" + "$nodejs" + "$rust" + "$golang" + "$php" + "[](fg:#061A40 bg:#1D2F51)" + "$time" + "[ ](fg:#1D2F51)" + "\n$character" + ]; + + directory = { + style = "fg:#e3e5e5 bg:#0072BB"; + format = "[ $path ]($style)"; + truncation_length = 3; + truncation_symbol = "…/"; + substitutions = { + "Documents" = "󰈙 "; + "Downloads" = " "; + "Music" = " "; + "Pictures" = " "; + }; + }; + + git_branch = { + symbol = ""; + style = "bg:#E18335"; + format = "[[ $symbol $branch ](fg:#0072BB bg:#E18335)]($style)"; + }; + + git_status = { + style = "bg:#E18335"; + format = "[[($all_status$ahead_behind )](fg:#0072BB bg:#E18335)]($style)"; + }; + + nodejs = { + symbol = ""; + style = "bg:#061A40"; + format = "[[ $symbol ($version) ](fg:#0072BB bg:#061A40)]($style)"; + }; + + rust = { + symbol = ""; + style = "bg:#061A40"; + format = "[[ $symbol ($version) ](fg:#0072BB bg:#061A40)]($style)"; + }; + + golang = { + symbol = ""; + style = "bg:#061A40"; + format = "[[ $symbol ($version) ](fg:#0072BB bg:#061A40)]($style)"; + }; + + php = { + symbol = ""; + style = "bg:#061A40"; + format = "[[ $symbol ($version) ](fg:#0072BB bg:#061A40)]($style)"; + }; + + time = { + disabled = false; + time_format = "%R"; + style = "bg:#1D2F51"; + format = "[[  $time ](fg:#a0a9cb bg:#1D2F51)]($style)"; + }; + + nix_shell = { + disabled = false; + impure_msg = "[impure shell](bold red)"; + pure_msg = "[pure shell](bold green)"; + unknown_msg = "[unknown shell](bold yellow)"; + format = "via [☃️ $state( \($name\))](bold blue) "; + }; + + custom.android = { + description = "Show label when inside Android FHS env"; + when = "test -n \"$IN_ANDROID_ENV\""; + symbol = "🤖 "; + style = "fg:green bg:#061A40"; + format = "[ $symbol Android ]($style)"; + }; + + custom.distrobox = { + description = "Indicate when inside a Distrobox container"; + when = "printenv CONTAINER_ID"; + command = "printenv CONTAINER_ID"; + format = "[$symbol$output]($style) "; + symbol = "📦 "; + style = "bold purple"; + }; + }; + }; +} diff --git a/common/modules/home/zsh.nix b/common/modules/home/zsh.nix new file mode 100644 index 0000000..f5117e6 --- /dev/null +++ b/common/modules/home/zsh.nix @@ -0,0 +1,91 @@ +{ + ... +}: + +{ + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + oh-my-zsh = { + enable = true; + theme = "robbyrussell"; + plugins = [ + "git" + "docker" + "docker-compose" + "sudo" + "vscode" + "z" + "colorize" + ]; + }; + + shellAliases = { + adbauto = "adbauto_"; + adbpair = "adbpair_"; + }; + + sessionVariables = { + LIBVIRT_DEFAULT_URI = "qemu:///system"; + ZSH_AUTOSUGGEST_STRATEGY = [ + "history" + "completion" + ]; + }; + + initContent = '' + # Completion Styling + zstyle ':completion:*' list-colors "''${(s.:.)LS_COLORS}" + zstyle ':completion:*:(scp|rsync):*' tag-order ' hosts:-ipaddr:ip\ address hosts:-host:host files' + zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost ip6-localhost broadcasthost + zstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*' + zstyle ':completion:*' matcher-list "" 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+l:|?=** r:|?=**' + + # Path Management + export PATH="$HOME/.local/bin:/usr/local/LinkServer/:$PATH" + + # Dart Completion + [[ -f /home/jax/.dart-cli-completion/zsh-config.zsh ]] && . /home/jax/.dart-cli-completion/zsh-config.zsh || true + + adbauto_() { + local PORT=$(avahi-browse -rt _adb-tls-connect._tcp -p | grep '^=' | cut -d';' -f8,9 | head -n 1 | sed 's/;/ /' | awk '{print $2}') + local IP=$(avahi-browse -rt _adb-tls-connect._tcp -p | grep '^=' | cut -d';' -f8,9 | head -n 1 | sed 's/;/ /' | awk '{print $1}') + if [ -z "$PORT" ]; then + echo "No Wireless ADB service found. Is Wireless Debugging on?" + else + echo "Connecting to $IP:$PORT..." + adb connect $IP:$PORT + fi + } + + adbpair_() { + echo "Looking for Android pairing service..." + local SERVICE=$(avahi-browse -rt _adb-tls-pairing._tcp -p | grep '^=' | head -n 1) + if [ -z "$SERVICE" ]; then + echo "Error: Pairing service not found. Make sure 'Pair device with pairing code' is open on your phone." + return 1 + fi + local IP=$(echo "$SERVICE" | cut -d';' -f8) + local PORT=$(echo "$SERVICE" | cut -d';' -f9) + echo "Found device at $IP:$PORT" + adb pair "$IP:$PORT" + } + + if ! command -v starship >/dev/null 2>&1; then + if [[ -f "/home/jax/.cargo/bin/starship" ]]; then + eval "$(/home/jax/.cargo/bin/starship init zsh)" + fi + fi + + # Your specific Android environment override + if [[ -n "$IN_ANDROID_ENV" ]]; then + eval "$(starship init zsh)" + fi + ''; + }; + + programs.starship.enable = true; +} diff --git a/common/modules/packages.nix b/common/modules/packages.nix index 755be7c..212a2ec 100644 --- a/common/modules/packages.nix +++ b/common/modules/packages.nix @@ -36,7 +36,7 @@ environment.systemPackages = with pkgs; [ abootimg android-tools - # anki + anki appstream aspell aspellDicts.cs @@ -92,9 +92,8 @@ iotop jetbrains.clion jq + just killall - kooha - # krita libgsf libnotify libreoffice-fresh @@ -134,7 +133,6 @@ screen seafile-client smartmontools - starship sushi telegram-desktop testdisk @@ -162,10 +160,6 @@ yt-dlp zip zram-generator - zsh-autosuggestions - zsh-completions - zsh-history-substring-search - zsh-syntax-highlighting zstd zulu zulu8 diff --git a/common/modules/services.nix b/common/modules/services.nix index 8b51f48..e59894b 100644 --- a/common/modules/services.nix +++ b/common/modules/services.nix @@ -69,7 +69,7 @@ btrfs = { autoScrub = { - enable = true; + enable = (lib.any (fs: fs.fsType == "btrfs") (lib.attrValues config.fileSystems)); interval = "monthly"; }; }; diff --git a/common/modules/vm.nix b/common/modules/vm.nix new file mode 100644 index 0000000..6290fed --- /dev/null +++ b/common/modules/vm.nix @@ -0,0 +1,23 @@ +{ + lib, + ... +}: + +{ + virtualisation.vmVariant = { + virtualisation.memorySize = 8192; + + virtualisation.cores = 4; + virtualisation.qemu.options = [ + "-device virtio-vga-gl" + "-display gtk,gl=on" + "-cpu host" + ]; + + users.users.jax.password = "nixos"; + services.displayManager.autoLogin = { + enable = true; + user = "jax"; + }; + }; +} diff --git a/desktop/modules/default.nix b/desktop/modules/default.nix index 025c1ef..0562aad 100644 --- a/desktop/modules/default.nix +++ b/desktop/modules/default.nix @@ -1,4 +1,6 @@ -{ ... }: +{ + ... +}: { imports = [ diff --git a/desktop/modules/home/dconf/apps.nix b/desktop/modules/home/dconf/apps.nix new file mode 100644 index 0000000..2821d62 --- /dev/null +++ b/desktop/modules/home/dconf/apps.nix @@ -0,0 +1,7 @@ +{ + ... +}: + +{ + dconf.settings = { }; +} diff --git a/desktop/modules/home/dconf/default.nix b/desktop/modules/home/dconf/default.nix new file mode 100644 index 0000000..568c199 --- /dev/null +++ b/desktop/modules/home/dconf/default.nix @@ -0,0 +1,11 @@ +{ + ... +}: + +{ + imports = [ + ./apps.nix + ./extensions.nix + ./gnome.nix + ]; +} diff --git a/desktop/modules/home/dconf/extensions.nix b/desktop/modules/home/dconf/extensions.nix new file mode 100644 index 0000000..2821d62 --- /dev/null +++ b/desktop/modules/home/dconf/extensions.nix @@ -0,0 +1,7 @@ +{ + ... +}: + +{ + dconf.settings = { }; +} diff --git a/desktop/modules/home/dconf/gnome.nix b/desktop/modules/home/dconf/gnome.nix new file mode 100644 index 0000000..d9c8b9c --- /dev/null +++ b/desktop/modules/home/dconf/gnome.nix @@ -0,0 +1,27 @@ +{ + lib, + ... +}: + +{ + dconf.settings = { + "org/gnome/settings-daemon/plugins/media-keys" = { + custom-keybindings = lib.mkAfter [ + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/" + ]; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = { + binding = "Home"; + command = "ddcutil setvcp 10 + 10"; + name = "Bright Up"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = { + binding = "End"; + command = "ddcutil setvcp 10 - 10"; + name = "Bright Down"; + }; + }; +} diff --git a/desktop/modules/home/default.nix b/desktop/modules/home/default.nix new file mode 100644 index 0000000..95836fe --- /dev/null +++ b/desktop/modules/home/default.nix @@ -0,0 +1,9 @@ +{ + ... +}: + +{ + imports = [ + ./dconf + ]; +} diff --git a/flake.lock b/flake.lock index 0c36933..6a14a33 100644 --- a/flake.lock +++ b/flake.lock @@ -88,6 +88,26 @@ "type": "github" } }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772330611, + "narHash": "sha256-UZjPc/d5XRxvjDbk4veAO4XFdvx6BUum2l40V688Xq8=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "58fd7ff0eec2cda43e705c4c0585729ec471d400", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "naersk": { "inputs": { "fenix": "fenix", @@ -127,11 +147,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1771848320, - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "lastModified": 1772198003, + "narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61", "type": "github" }, "original": { @@ -143,11 +163,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1771848320, - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "lastModified": 1772198003, + "narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61", "type": "github" }, "original": { @@ -159,11 +179,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1772239479, - "narHash": "sha256-/l1kqmrtK8X3RnM9ayl5g3ZK5dU7C8zRxe+DmQz4V+s=", + "lastModified": 1772312179, + "narHash": "sha256-6wrHqFXefzvxopkb80vg3ePRy9jwB6FVcwgTqS2BnC0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f5b24530896e3b8867f25e6fa45f3945dcffb6f9", + "rev": "2fda184255d09ea80e9ac0352d97f12ac1500a33", "type": "github" }, "original": { @@ -177,6 +197,7 @@ "inputs": { "czkawka-master": "czkawka-master", "fet": "fet", + "home-manager": "home-manager", "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs_3" } diff --git a/flake.nix b/flake.nix index 8b205a4..df657bf 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,11 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; nix-flatpak.url = "github:gmodena/nix-flatpak"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + czkawka-master.url = "path:./common/flakes/czkawka-master"; fet.url = "path:./common/flakes/fet"; }; @@ -11,6 +16,7 @@ self, nixpkgs, nix-flatpak, + home-manager, ... }@inputs: let @@ -25,6 +31,20 @@ ./common ./desktop nix-flatpak.nixosModules.nix-flatpak + + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.jax = { + imports = [ + ./common/modules/home + ./desktop/modules/home + ]; + }; + }; + } ]; }; @@ -35,6 +55,19 @@ ./common ./laptop nix-flatpak.nixosModules.nix-flatpak + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.jax = { + imports = [ + ./common/modules/home + ./laptop/modules/home + ]; + }; + }; + } ]; }; }; diff --git a/laptop/modules/default.nix b/laptop/modules/default.nix index ed55473..dbc452d 100644 --- a/laptop/modules/default.nix +++ b/laptop/modules/default.nix @@ -1,4 +1,6 @@ -{ ... }: +{ + ... +}: { imports = [ diff --git a/laptop/modules/home/dconf/apps.nix b/laptop/modules/home/dconf/apps.nix new file mode 100644 index 0000000..2821d62 --- /dev/null +++ b/laptop/modules/home/dconf/apps.nix @@ -0,0 +1,7 @@ +{ + ... +}: + +{ + dconf.settings = { }; +} diff --git a/laptop/modules/home/dconf/default.nix b/laptop/modules/home/dconf/default.nix new file mode 100644 index 0000000..568c199 --- /dev/null +++ b/laptop/modules/home/dconf/default.nix @@ -0,0 +1,11 @@ +{ + ... +}: + +{ + imports = [ + ./apps.nix + ./extensions.nix + ./gnome.nix + ]; +} diff --git a/laptop/modules/home/dconf/extensions.nix b/laptop/modules/home/dconf/extensions.nix new file mode 100644 index 0000000..2821d62 --- /dev/null +++ b/laptop/modules/home/dconf/extensions.nix @@ -0,0 +1,7 @@ +{ + ... +}: + +{ + dconf.settings = { }; +} diff --git a/laptop/modules/home/dconf/gnome.nix b/laptop/modules/home/dconf/gnome.nix new file mode 100644 index 0000000..803026d --- /dev/null +++ b/laptop/modules/home/dconf/gnome.nix @@ -0,0 +1,15 @@ +{ + ... + +}: + +{ + dconf.settings = { + "org/gnome/desktop/peripherals/touchpad" = { + click-method = "areas"; + disable-while-typing = true; + speed = 0.19548872180451138; + two-finger-scrolling-enabled = true; + }; + }; +} diff --git a/laptop/modules/home/default.nix b/laptop/modules/home/default.nix new file mode 100644 index 0000000..95836fe --- /dev/null +++ b/laptop/modules/home/default.nix @@ -0,0 +1,9 @@ +{ + ... +}: + +{ + imports = [ + ./dconf + ]; +} diff --git a/laptop/modules/programs.nix b/laptop/modules/programs.nix index 0d7a220..3fbf6ac 100644 --- a/laptop/modules/programs.nix +++ b/laptop/modules/programs.nix @@ -1,6 +1,7 @@ { ... }: + { } diff --git a/laptop/modules/services.nix b/laptop/modules/services.nix index 8098129..2cdb594 100644 --- a/laptop/modules/services.nix +++ b/laptop/modules/services.nix @@ -2,6 +2,7 @@ pkgs, ... }: + { services.thermald.enable = true; services.power-profiles-daemon.enable = false;