diff --git a/containers/wine.nix b/containers/wine.nix index 04f967ad..2faf18de 100644 --- a/containers/wine.nix +++ b/containers/wine.nix @@ -16,12 +16,14 @@ in { modules.desktop.graphical = true; - networking.nat.forwardPorts = singleton { - destination = "192.168.100.49:${sakayaPort}"; - sourcePort = sakayaPort; - }; + networking = { + nat.forwardPorts = singleton { + destination = "192.168.100.49:${sakayaPort}"; + sourcePort = sakayaPort; + }; - networking.firewall.allowedTCPPorts = [ sakayaPort ]; + firewall.allowedTCPPorts = [ sakayaPort ]; + }; systemd.services.sakaya = { enable = true; @@ -40,15 +42,17 @@ in wantedBy = [ "multi-user.target" ]; }; - environment.systemPackages = - (with pkgs; [ - wineWowPackages.waylandFull - winetricks - ]) - ++ [ sakaya ]; + environment = { + systemPackages = + (with pkgs; [ + wineWowPackages.waylandFull + winetricks + ]) + ++ [ sakaya ]; - environment.sessionVariables = { - LC_ALL = "ja_JP.UTF-8"; - TZ = "Asia/Tokyo"; + sessionVariables = { + LC_ALL = "ja_JP.UTF-8"; + TZ = "Asia/Tokyo"; + }; }; } diff --git a/flake.nix b/flake.nix index 7e8f794e..43104d8c 100644 --- a/flake.nix +++ b/flake.nix @@ -113,8 +113,10 @@ }; }; - formatter.x86_64-linux = x86_64-linux.nixfmt-rfc-style; - formatter.aarch64-linux = aarch64-linux.nixfmt-rfc-style; + formatter = { + x86_64-linux = x86_64-linux.nixfmt-rfc-style; + aarch64-linux = aarch64-linux.nixfmt-rfc-style; + }; } // (listToAttrs ( map (attributeName: { diff --git a/home/alacritty.nix b/home/alacritty.nix index d116ae18..2442f680 100644 --- a/home/alacritty.nix +++ b/home/alacritty.nix @@ -3,9 +3,9 @@ enable = true; settings = { - window = { - padding.x = 10; - padding.y = 10; + window.padding = { + x = 10; + y = 10; }; mouse.hide_when_typing = true; diff --git a/home/eww.nix b/home/eww.nix index 53678260..328583dd 100644 --- a/home/eww.nix +++ b/home/eww.nix @@ -17,55 +17,57 @@ in { home.packages = with pkgs; [ eww ]; - xdg.configFile."eww/eww.yuck".text = # yuck - '' - (defwidget icons [] - (box :orientation "h" :spacing 32 - (icon :img "default-user-home" :exec "${homeDirectory}") - (icon :img "default-folder-download" :exec "${download}") - (icon :img "default-folder-documents" :exec "${documents}") - (icon :img "default-folder-music" :exec "${music}") - (icon :img "default-folder-pictures" :exec "${pictures}") - (icon :img "default-folder-video" :exec "${videos}"))) + xdg.configFile = { + "eww/eww.yuck".text = # yuck + '' + (defwidget icons [] + (box :orientation "h" :spacing 32 + (icon :img "default-user-home" :exec "${homeDirectory}") + (icon :img "default-folder-download" :exec "${download}") + (icon :img "default-folder-documents" :exec "${documents}") + (icon :img "default-folder-music" :exec "${music}") + (icon :img "default-folder-pictures" :exec "${pictures}") + (icon :img "default-folder-video" :exec "${videos}"))) - (defwidget icon [img exec] - (eventbox :cursor "pointer" :onclick "lnch thunar ''${exec}" :tooltip "''${exec}" - (image :path "${fluent-icons}/''${img}.png" :image-width 128))) + (defwidget icon [img exec] + (eventbox :cursor "pointer" :onclick "lnch thunar ''${exec}" :tooltip "''${exec}" + (image :path "${fluent-icons}/''${img}.png" :image-width 128))) - (defwindow desktop-icons - :monitor 0 - :geometry (geometry :x "32px" :anchor "bottom center" - :y "8px") - :stacking "bg" - (icons)) + (defwindow desktop-icons + :monitor 0 + :geometry (geometry :x "32px" :anchor "bottom center" + :y "8px") + :stacking "bg" + (icons)) - (defpoll time :interval "1s" - "date '+%H:%M'") + (defpoll time :interval "1s" + "date '+%H:%M'") - (defwindow overlay - :monitor 0 - :geometry (geometry :y "4px" :x "8px" :anchor "bottom right") - :stacking "fg" - time) - ''; + (defwindow overlay + :monitor 0 + :geometry (geometry :y "4px" :x "8px" :anchor "bottom right") + :stacking "fg" + time) + ''; - xdg.configFile."eww/eww.scss".text = # scss - '' - img { - all: unset; - } + "eww/eww.scss".text = # scss + '' + img { + all: unset; + } - .desktop-icons { - all: unset; - } + .desktop-icons { + all: unset; + } - .overlay { - background: transparent; - color: ${base05}; - font-weight: bold; - text-shadow: 0 0 0.075em ${base00}; - font-size: 32px; - opacity: 0.4; - } - ''; + .overlay { + background: transparent; + color: ${base05}; + font-weight: bold; + text-shadow: 0 0 0.075em ${base00}; + font-size: 32px; + opacity: 0.4; + } + ''; + }; } diff --git a/home/hyprland.nix b/home/hyprland.nix index eb17e725..e4841a05 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -392,40 +392,40 @@ in }; }; - services.hypridle = { - enable = true; - - settings = { - general = { - lock_cmd = "pidof hyprlock || hyprlock"; - before_sleep_cmd = "loginctl lock-session"; - after_sleep_cmd = "hyprctl dispatch dpms on"; - }; - - listener = [ - { - timeout = 150; - on-timeout = "brightnessctl set 0 --save && brightnessctl --device=tpacpi::kbd_backlight set 0 --save"; - on-resume = "brightnessctl --restore && brightnessctl --device=tpacpi::kbd_backlight --restore"; - } - { - timeout = 300; - on-timeout = "loginctl lock-session"; - } - { - timeout = 380; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; - } - { - timeout = 1800; - on-timeout = "systemctl suspend"; - } - ]; - }; - }; - services = { + hypridle = { + enable = true; + + settings = { + general = { + lock_cmd = "pidof hyprlock || hyprlock"; + before_sleep_cmd = "loginctl lock-session"; + after_sleep_cmd = "hyprctl dispatch dpms on"; + }; + + listener = [ + { + timeout = 150; + on-timeout = "brightnessctl set 0 --save && brightnessctl --device=tpacpi::kbd_backlight set 0 --save"; + on-resume = "brightnessctl --restore && brightnessctl --device=tpacpi::kbd_backlight --restore"; + } + { + timeout = 300; + on-timeout = "loginctl lock-session"; + } + { + timeout = 380; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + { + timeout = 1800; + on-timeout = "systemctl suspend"; + } + ]; + }; + }; + batsignal.enable = true; hyprpaper.enable = mkForce false; }; diff --git a/home/qutebrowser.nix b/home/qutebrowser.nix index e363e709..b7e650e4 100644 --- a/home/qutebrowser.nix +++ b/home/qutebrowser.nix @@ -66,8 +66,11 @@ in }; downloads = { - location.directory = download; - location.prompt = false; + location = { + directory = download; + prompt = false; + }; + position = "bottom"; remove_finished = 5000; }; diff --git a/hosts/laptop/hardware-configuration.nix b/hosts/laptop/hardware-configuration.nix index 91afa75d..d4c104e7 100644 --- a/hosts/laptop/hardware-configuration.nix +++ b/hosts/laptop/hardware-configuration.nix @@ -10,6 +10,8 @@ boot = { initrd = { + luks.devices."root".device = "/dev/disk/by-label/nixos-luks"; + availableKernelModules = [ "nvme" "xhci_pci" @@ -24,16 +26,16 @@ extraModulePackages = [ ]; }; - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "btrfs"; - }; + fileSystems = { + "/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "btrfs"; + }; - boot.initrd.luks.devices."root".device = "/dev/disk/by-label/nixos-luks"; - - fileSystems."/boot" = { - device = "/dev/disk/by-label/boot"; - fsType = "vfat"; + "/boot" = { + device = "/dev/disk/by-label/boot"; + fsType = "vfat"; + }; }; swapDevices = [ ]; diff --git a/hosts/phone/configuration.nix b/hosts/phone/configuration.nix index b81b96f0..1f908636 100644 --- a/hosts/phone/configuration.nix +++ b/hosts/phone/configuration.nix @@ -51,30 +51,32 @@ in config = { programs.man.generateCaches = mkForce false; - xdg.desktopEntries = { - htop = no; - fish = no; - nvim = no; - yazi = no; - gcdemu = no; - mullvad-vpn = no; - nixos-manual = no; - image-analyzer = no; - activate-linux = no; + xdg = { + desktopEntries = { + htop = no; + fish = no; + nvim = no; + yazi = no; + gcdemu = no; + mullvad-vpn = no; + nixos-manual = no; + image-analyzer = no; + activate-linux = no; - "org.gnome.Extensions" = no; - "org.pwmt.zathura" = no; - "org.gnome.eog" = no; - "org.gnome.Settings" = no; - "org.sigxcpu.Livi" = no; - }; + "org.gnome.Extensions" = no; + "org.pwmt.zathura" = no; + "org.gnome.eog" = no; + "org.gnome.Settings" = no; + "org.sigxcpu.Livi" = no; + }; - xdg.userDirs = { - download = mkForce null; - documents = mkForce null; - music = mkForce null; - pictures = mkForce null; - videos = mkForce null; + userDirs = { + download = mkForce null; + documents = mkForce null; + music = mkForce null; + pictures = mkForce null; + videos = mkForce null; + }; }; dconf.settings = { diff --git a/modules/hardware.nix b/modules/hardware.nix index 12be9102..cbcdc8e2 100644 --- a/modules/hardware.nix +++ b/modules/hardware.nix @@ -72,22 +72,24 @@ in }; }; - environment.systemPackages = mkIf mouseSettings [ piper ]; + environment = { + systemPackages = mkIf mouseSettings [ piper ]; - environment.etc.${dualFunctionKeysConfig}.text = toJSON { - TIMING = [ - { TAP_MILLISEC = 1000; } - { DOUBLE_TAP_MILLISEC = 0; } - { SYNTHETIC_KEYS_PAUSE_MILLISEC = 0; } - ]; + etc.${dualFunctionKeysConfig}.text = toJSON { + TIMING = [ + { TAP_MILLISEC = 1000; } + { DOUBLE_TAP_MILLISEC = 0; } + { SYNTHETIC_KEYS_PAUSE_MILLISEC = 0; } + ]; - MAPPINGS = [ - { - KEY = "KEY_CAPSLOCK"; - TAP = "KEY_ESC"; - HOLD = "KEY_LEFTCTRL"; - } - ]; + MAPPINGS = [ + { + KEY = "KEY_CAPSLOCK"; + TAP = "KEY_ESC"; + HOLD = "KEY_LEFTCTRL"; + } + ]; + }; }; }; } diff --git a/specializations/dwm.nix b/specializations/dwm.nix index ddb681ef..4c9e9476 100644 --- a/specializations/dwm.nix +++ b/specializations/dwm.nix @@ -5,57 +5,59 @@ let in { home-manager.sharedModules = singleton { - services.picom = rec { - enable = true; - backend = "glx"; + services = { + picom = rec { + enable = true; + backend = "glx"; - vSync = true; - fade = true; - shadow = true; + vSync = true; + fade = true; + shadow = true; - fadeDelta = 5; + fadeDelta = 5; - fadeExclude = [ - "window_type = 'menu'" - "window_type = 'dropdown_menu'" - "window_type = 'popup_menu'" - "window_type = 'tooltip'" - ]; + fadeExclude = [ + "window_type = 'menu'" + "window_type = 'dropdown_menu'" + "window_type = 'popup_menu'" + "window_type = 'tooltip'" + ]; - shadowExclude = fadeExclude; + shadowExclude = fadeExclude; - settings = { - blur = { - method = "dual_kawase"; - size = 10; + settings = { + blur = { + method = "dual_kawase"; + size = 10; + }; }; }; - }; - services.dunst = { - enable = true; + dunst = { + enable = true; - iconTheme = { - package = pkgs.papirus-icon-theme; - name = "Papirus"; - }; + iconTheme = { + package = pkgs.papirus-icon-theme; + name = "Papirus"; + }; - settings = { - global = { - geometry = "1870x5-25+45"; - width = 350; - separator_height = 5; - padding = 24; - horizontal_padding = 24; - frame_width = 3; - idle_threshold = 120; - alignment = "center"; - word_wrap = "yes"; - transparency = 5; - format = "%s: %b"; - markup = "full"; - min_icon_size = 32; - max_icon_size = 128; + settings = { + global = { + geometry = "1870x5-25+45"; + width = 350; + separator_height = 5; + padding = 24; + horizontal_padding = 24; + frame_width = 3; + idle_threshold = 120; + alignment = "center"; + word_wrap = "yes"; + transparency = 5; + format = "%s: %b"; + markup = "full"; + min_icon_size = 32; + max_icon_size = 128; + }; }; }; }; diff --git a/specializations/gnome.nix b/specializations/gnome.nix index 9f263e0f..782d1fea 100644 --- a/specializations/gnome.nix +++ b/specializations/gnome.nix @@ -19,6 +19,8 @@ in enable = true; user = username; }; + + greetd.enable = lib.mkForce false; }; systemd.services = { @@ -33,5 +35,4 @@ in hardware.pulseaudio.enable = false; programs.hyprland.enable = lib.mkForce false; - services.greetd.enable = lib.mkForce false; } diff --git a/specializations/plasma.nix b/specializations/plasma.nix index 62bbc679..a83f976b 100644 --- a/specializations/plasma.nix +++ b/specializations/plasma.nix @@ -13,9 +13,11 @@ in user = username; }; }; - }; - services.desktopManager.plasma6.enable = true; + desktopManager.plasma6.enable = true; + + greetd.enable = lib.mkForce false; + }; systemd.services = { "getty@tty1".enable = false; @@ -23,5 +25,4 @@ in }; programs.hyprland.enable = lib.mkForce false; - services.greetd.enable = lib.mkForce false; }