diff --git a/flake.nix b/flake.nix index 61f08f9..b79a44c 100644 --- a/flake.nix +++ b/flake.nix @@ -202,6 +202,15 @@ nixos-raspberrypi.lib.inject-overlays ]; }; + + # ###################################################### + # Mac # + # ###################################################### + macbook-pro-nixos = { + modules = with inputs; [ + nixos-apple-silicon.nixosModules.default + ]; + }; }; overlays = with inputs; [ nix-vscode-extensions.overlays.default ]; diff --git a/homes/aarch64-darwin/mattjallen@mac/default.nix b/homes/aarch64-darwin/mattjallen@macbook-pro/default.nix similarity index 100% rename from homes/aarch64-darwin/mattjallen@mac/default.nix rename to homes/aarch64-darwin/mattjallen@macbook-pro/default.nix diff --git a/homes/aarch64-linux/matt@mac-nixos/default.nix b/homes/aarch64-linux/matt@mac-nixos/default.nix deleted file mode 100755 index b7916e3..0000000 --- a/homes/aarch64-linux/matt@mac-nixos/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ pkgs, ... }: -let - shellAliases = { - update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3"; - update-switch = "sudo nixos-rebuild switch --max-jobs 10 --build-host admin@10.0.1.3"; - update-flake = "nix flake update mac-nixpkgs mac-nixos-apple-silicon mac-home-manager mac-impermanence mac-sops-nix --flake /etc/nixos"; - update-nas = "nixos-rebuild switch --use-remote-sudo --target-host admin@10.0.1.3 --build-host admin@10.0.1.3 --flake ~/nix-config#jallen-nas"; - }; -in -{ - - home.username = "matt"; - home.homeDirectory = "/home/matt"; - home.stateVersion = "23.11"; - - home.packages = with pkgs; [ - iw - iwd - orca-slicer - vscodium - ]; - - programs = { - password-store.enable = true; - - zsh.shellAliases = shellAliases; - }; -} diff --git a/homes/aarch64-linux/matt@macbook-pro-nixos/default.nix b/homes/aarch64-linux/matt@macbook-pro-nixos/default.nix new file mode 100755 index 0000000..895fa8d --- /dev/null +++ b/homes/aarch64-linux/matt@macbook-pro-nixos/default.nix @@ -0,0 +1,134 @@ +{ pkgs, lib, ... }: +let + theme = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix"); + shellAliases = { + update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3"; + update-switch = "sudo nixos-rebuild switch --max-jobs 10 --build-host admin@10.0.1.3"; + update-flake = "nix flake update mac-nixpkgs mac-nixos-apple-silicon mac-home-manager mac-impermanence mac-sops-nix --flake /etc/nixos"; + update-nas = "nixos-rebuild switch --use-remote-sudo --target-host admin@10.0.1.3 --build-host admin@10.0.1.3 --flake ~/nix-config#jallen-nas"; + }; + fontName = "JetBrainsMono NFM"; + fontPackage = pkgs.nerd-fonts.jetbrains-mono; + # Displays + display = { + input = "eDP-1"; + resolution = "3456x2234"; + refreshRate = "60.00000"; + }; +in +{ + + home.username = "matt"; + home.homeDirectory = "/home/matt"; + home.stateVersion = "23.11"; + + mjallen = { + desktop.hyprland = { + enable = true; + primaryDisplay = "eDP-1"; + + wallpaper = [ + "${display.input}, /run/wallpaper.jpg" + ]; + + monitor = [ + "${display.input},${display.resolution}@${display.refreshRate},0x0,1.25,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98" + ]; + + workspace = [ + "name:firefox, monitor:${display.input}, default:false, special, class:(.*firefox.*)" + "name:discord, monitor:${display.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)" + "name:steam, monitor:${display.input}, default:false, special, class:(.*[Ss]team.*)" + ]; + + + windowRule = [ + "size 2160 3356, tag:horizonrdp" + ]; + defaultApps = { + browser = pkgs.firefox; + }; + }; + programs = { + btop.enable = true; + kitty = { + enable = true; + font = { + name = fontName; + package = fontPackage; + }; + }; + mako = { + enable = true; + fontName = fontName; + }; + nwg-dock.enable = true; + nwg-drawer.enable = true; + nwg-panel = { + enable = true; + defaultApps = { + browser = pkgs.firefox; + }; + }; + waybar = { + enable = true; + + layer = "bottom"; + + modules-right = [ + "tray" + "temperature" + "temperature#gpu" + "keyboard-state#capslock" + "keyboard-state#numlock" + "wireplumber#sink" + "bluetooth" + "network" + "idle_inhibitor" + "clock" + "battery" + "custom/weather" + ]; + + extraModules = { + "custom/lights" = { + tooltip = false; + exec = "waybar-hass --get_light light.living_room_lights"; + interval = "once"; + format = "{text}";#"󱉓"; + on-click = "waybar-hass --toggle_light light.living_room_lights"; + return-type = "json"; + }; + }; + + extraModulesStyle = '' + #custom-lights { + color: ${theme.frost.nord8}; + background-color: ${theme.polarNight.nord0}; + ${theme.defaultOpacity} + ${theme.borderLeft} + } + + #custom-lights:hover { + background: ${theme.polarNight.nord3}; + } + ''; + }; + wlogout.enable = true; + wofi.enable = true; + }; + }; + + home.packages = with pkgs; [ + iw + iwd + orca-slicer + vscodium + ]; + + programs = { + password-store.enable = true; + + zsh.shellAliases = shellAliases; + }; +} diff --git a/modules/home/desktop/hyprland/default.nix b/modules/home/desktop/hyprland/default.nix index 0417198..78503ac 100755 --- a/modules/home/desktop/hyprland/default.nix +++ b/modules/home/desktop/hyprland/default.nix @@ -145,7 +145,7 @@ in "$mod, XF86MonBrightnessDown, exec, brightnessctl -d kbd_backlight set 10%-" ]; - monitor = cfg.monitor or [ ]; + monitor = cfg.monitor; monitorv2 = cfg.monitorv2 or { }; render = { diff --git a/modules/home/desktop/hyprland/options.nix b/modules/home/desktop/hyprland/options.nix index 15f2217..7972745 100644 --- a/modules/home/desktop/hyprland/options.nix +++ b/modules/home/desktop/hyprland/options.nix @@ -20,7 +20,7 @@ with lib; default = "3840x2160"; }; - refreshRate = mkOptions { + refreshRate = mkOption { type = types.str; default = "240.00000"; }; @@ -37,7 +37,7 @@ with lib; default = "3840x2160"; }; - refreshRate = mkOptions { + refreshRate = mkOption { type = types.str; default = "240.00000"; }; @@ -99,7 +99,7 @@ with lib; terminal = mkOption { type = types.package; default = pkgs.kitty; }; office = mkOption { type = types.package; default = pkgs.onlyoffice-bin_latest; }; video = mkOption { type = types.package; default = pkgs.vlc; }; - imageViewer = mkOption { type = types.package; default = pkgs.gnome-photos; }; + imageViewer = mkOption { type = types.package; default = pkgs.nomacs; }; }; }; description = "Default applications used across the system."; diff --git a/modules/home/desktop/hyprland/packages.nix b/modules/home/desktop/hyprland/packages.nix index c888173..eefc1f3 100644 --- a/modules/home/desktop/hyprland/packages.nix +++ b/modules/home/desktop/hyprland/packages.nix @@ -37,6 +37,7 @@ in nautilus networkmanagerapplet nm-tray + nomacs nwg-look overskride pamixer diff --git a/modules/home/desktop/hyprland/services/hypridle/default.nix b/modules/home/desktop/hyprland/services/hypridle/default.nix index f26d2db..0b21a61 100644 --- a/modules/home/desktop/hyprland/services/hypridle/default.nix +++ b/modules/home/desktop/hyprland/services/hypridle/default.nix @@ -7,7 +7,7 @@ in config = lib.mkIf cfg.enable { services.hypridle = { - enable = true; + enable = false; settings = { general = { before_sleep_cmd = "loginctl lock-session"; # lock before suspend. @@ -38,4 +38,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/modules/home/desktop/hyprland/services/hyprpaper/default.nix b/modules/home/desktop/hyprland/services/hyprpaper/default.nix index 71b0f3a..8d2d0d2 100644 --- a/modules/home/desktop/hyprland/services/hyprpaper/default.nix +++ b/modules/home/desktop/hyprland/services/hyprpaper/default.nix @@ -10,7 +10,7 @@ in enable = true; settings = { preload = [ "/run/wallpaper.jpg" ]; - wallpaper = "/run/wallpaper.jpg"; + wallpaper = ",/run/wallpaper.jpg"; splash = false; }; }; diff --git a/modules/home/home/default.nix b/modules/home/home/default.nix index 3bc2343..6574fe3 100644 --- a/modules/home/home/default.nix +++ b/modules/home/home/default.nix @@ -103,5 +103,9 @@ services = { nextcloud-client.enable = lib.mkDefault true; pass-secret-service.enable = lib.mkDefault true; + kdeconnect = { + enable = true; + indicator = true; + }; }; } diff --git a/modules/home/programs/waybar/default.nix b/modules/home/programs/waybar/default.nix index b5b2892..65dc7fb 100755 --- a/modules/home/programs/waybar/default.nix +++ b/modules/home/programs/waybar/default.nix @@ -371,8 +371,8 @@ in ${defaultOpacity} ${defaultBorderRadius} ${defaultCenterOptions} - margin-left: 4rem - margin-right: 4rem + margin-left: 4rem; + margin-right: 4rem; } /* make window module transparent when no windows present */ diff --git a/modules/nixos/desktop/hyprland/default.nix b/modules/nixos/desktop/hyprland/default.nix index 560c90a..b6f124b 100755 --- a/modules/nixos/desktop/hyprland/default.nix +++ b/modules/nixos/desktop/hyprland/default.nix @@ -109,7 +109,7 @@ in ]; script = '' bing-wallpaper - ${pkgs.hyprland}/bin/hyprctl hyprpaper reload ,/run/wallpaper + ${pkgs.hyprland}/bin/hyprctl hyprpaper reload ,/run/wallpaper.jpg ''; serviceConfig = { Type = "oneshot"; diff --git a/modules/nixos/desktop/hyprland/settings.nix b/modules/nixos/desktop/hyprland/settings.nix index 7ed19c7..ec3cb54 100644 --- a/modules/nixos/desktop/hyprland/settings.nix +++ b/modules/nixos/desktop/hyprland/settings.nix @@ -101,7 +101,7 @@ in terminal = pkgs.kitty; office = pkgs.onlyoffice-bin_latest; video = pkgs.vlc; - imageViewer = pkgs.gnome-photos; + imageViewer = pkgs.nomacs; }; theme = nord; diff --git a/modules/nixos/network/default.nix b/modules/nixos/network/default.nix index 2465f6e..6df1817 100644 --- a/modules/nixos/network/default.nix +++ b/modules/nixos/network/default.nix @@ -40,81 +40,90 @@ in networking = { hostName = lib.mkForce cfg.hostName; - # Enable Network Manager - networkmanager = { - enable = true; - wifi.powersave = lib.mkDefault false; - settings.connectivity.uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt"; - ensureProfiles = { - environmentFiles = [ - config.sops.secrets.wifi.path - ]; + # Enable Network Manager + networkmanager = { + enable = true; + wifi.powersave = lib.mkDefault false; + settings.connectivity.uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt"; + ensureProfiles = { + environmentFiles = [ + config.sops.secrets.wifi.path + ]; - profiles = { - "Joey's Jungle 6G" = { - connection = { - id = "Joey's Jungle 6G"; - type = "wifi"; + profiles = { + "Joey's Jungle 6G" = { + connection = { + id = "Joey's Jungle 6G"; + type = "wifi"; + }; + ipv4 = if (cfg.ipv4.method == "auto") + then + { + method = "auto"; + } + else + { + address1 = cfg.ipv4.address; + dns = cfg.ipv4.dns; + gateway = cfg.ipv4.gateway; + method = "manual"; + }; + ipv6 = { + addr-gen-mode = "stable-privacy"; + method = "auto"; + }; + wifi = { + mode = "infrastructure"; + ssid = "Joey's Jungle 6G"; + }; + wifi-security = { + key-mgmt = "sae"; + psk = "$PSK"; + }; }; - ipv4 = if (cfg.ipv4.method == "auto") - then - { - method = "auto"; - } - else - { - address1 = cfg.ipv4.address; - dns = cfg.ipv4.dns; - gateway = cfg.ipv4.gateway; - method = "manual"; - }; - ipv6 = { - addr-gen-mode = "stable-privacy"; - method = "auto"; - }; - wifi = { - mode = "infrastructure"; - ssid = "Joey's Jungle 6G"; - }; - wifi-security = { - key-mgmt = "sae"; - psk = "$PSK"; - }; - }; - "Joey's Jungle 5G" = { - connection = { - id = "Joey's Jungle 5G"; - type = "wifi"; - }; - ipv4 = if (cfg.ipv4.method == "auto") - then - { - method = "auto"; - } - else - { - address1 = cfg.ipv4.address; - dns = cfg.ipv4.dns; - gateway = cfg.ipv4.gateway; - method = "manual"; - }; - ipv6 = { - addr-gen-mode = "stable-privacy"; - method = "auto"; - }; - wifi = { - mode = "infrastructure"; - ssid = "Joey's Jungle 5G"; - }; - wifi-security = { - key-mgmt = "sae"; - psk = "$PSK"; + "Joey's Jungle 5G" = { + connection = { + id = "Joey's Jungle 5G"; + type = "wifi"; + }; + ipv4 = if (cfg.ipv4.method == "auto") + then + { + method = "auto"; + } + else + { + address1 = cfg.ipv4.address; + dns = cfg.ipv4.dns; + gateway = cfg.ipv4.gateway; + method = "manual"; + }; + ipv6 = { + addr-gen-mode = "stable-privacy"; + method = "auto"; + }; + wifi = { + mode = "infrastructure"; + ssid = "Joey's Jungle 5G"; + }; + wifi-security = { + key-mgmt = "sae"; + psk = "$PSK"; + }; }; }; }; }; - }; + firewall = { + allowedTCPPortRanges = [ + { + from = 1714; + to = 1764; + } + ]; + allowedUDPPortRanges = config.networking.firewall.allowedTCPPortRanges; + }; }; }; } \ No newline at end of file diff --git a/systems/aarch64-darwin/mac/default.nix b/systems/aarch64-darwin/macbook-pro/default.nix similarity index 100% rename from systems/aarch64-darwin/mac/default.nix rename to systems/aarch64-darwin/macbook-pro/default.nix diff --git a/systems/aarch64-darwin/mac/homebrew.nix b/systems/aarch64-darwin/macbook-pro/homebrew.nix similarity index 100% rename from systems/aarch64-darwin/mac/homebrew.nix rename to systems/aarch64-darwin/macbook-pro/homebrew.nix diff --git a/systems/aarch64-darwin/mac/nix.nix b/systems/aarch64-darwin/macbook-pro/nix.nix similarity index 100% rename from systems/aarch64-darwin/mac/nix.nix rename to systems/aarch64-darwin/macbook-pro/nix.nix diff --git a/systems/aarch64-darwin/mac/programs.nix b/systems/aarch64-darwin/macbook-pro/programs.nix similarity index 100% rename from systems/aarch64-darwin/mac/programs.nix rename to systems/aarch64-darwin/macbook-pro/programs.nix diff --git a/systems/aarch64-darwin/mac/system.nix b/systems/aarch64-darwin/macbook-pro/system.nix similarity index 100% rename from systems/aarch64-darwin/mac/system.nix rename to systems/aarch64-darwin/macbook-pro/system.nix diff --git a/systems/aarch64-darwin/mac/trampoline-apps/default.nix b/systems/aarch64-darwin/macbook-pro/trampoline-apps/default.nix similarity index 100% rename from systems/aarch64-darwin/mac/trampoline-apps/default.nix rename to systems/aarch64-darwin/macbook-pro/trampoline-apps/default.nix diff --git a/systems/aarch64-darwin/mac/trampoline-apps/lib-bash/trampoline-apps.sh b/systems/aarch64-darwin/macbook-pro/trampoline-apps/lib-bash/trampoline-apps.sh similarity index 100% rename from systems/aarch64-darwin/mac/trampoline-apps/lib-bash/trampoline-apps.sh rename to systems/aarch64-darwin/macbook-pro/trampoline-apps/lib-bash/trampoline-apps.sh diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/boot-m1n1/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/boot-m1n1/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/boot-m1n1/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/boot-m1n1/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/kernel/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/kernel/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/kernel/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/kernel/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/mesa/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/mesa/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/mesa/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/mesa/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/peripheral-firmware/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/peripheral-firmware/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/peripheral-firmware/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/peripheral-firmware/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/sound/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/sound/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/modules/sound/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/modules/sound/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/alsa-ucm-conf-asahi/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/alsa-ucm-conf-asahi/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/alsa-ucm-conf-asahi/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/alsa-ucm-conf-asahi/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/asahi-audio/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/asahi-audio/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/asahi-audio/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/asahi-audio/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/asahi-fwextract/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/asahi-fwextract/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/asahi-fwextract/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/asahi-fwextract/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/linux-asahi/config b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/linux-asahi/config similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/linux-asahi/config rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/linux-asahi/config diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/linux-asahi/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/linux-asahi/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/linux-asahi/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/linux-asahi/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/m1n1/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/m1n1/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/m1n1/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/m1n1/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/mesa-asahi-edge/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/mesa-asahi-edge/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/mesa-asahi-edge/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/mesa-asahi-edge/default.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/mesa-asahi-edge/opencl.patch b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/mesa-asahi-edge/opencl.patch similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/mesa-asahi-edge/opencl.patch rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/mesa-asahi-edge/opencl.patch diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/overlay.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/overlay.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/overlay.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/overlay.nix diff --git a/systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/uboot-asahi/default.nix b/systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/uboot-asahi/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/apple-silicon-support/packages/uboot-asahi/default.nix rename to systems/aarch64-linux/macbook-pro-nixos/apple-silicon-support/packages/uboot-asahi/default.nix diff --git a/systems/aarch64-linux/mac-nixos/boot.nix b/systems/aarch64-linux/macbook-pro-nixos/boot.nix similarity index 95% rename from systems/aarch64-linux/mac-nixos/boot.nix rename to systems/aarch64-linux/macbook-pro-nixos/boot.nix index 3dc0a35..1078196 100644 --- a/systems/aarch64-linux/mac-nixos/boot.nix +++ b/systems/aarch64-linux/macbook-pro-nixos/boot.nix @@ -4,7 +4,7 @@ boot = { loader = { systemd-boot = { - enable = true; + enable = lib.mkForce true; configurationLimit = 15; consoleMode = lib.mkDefault "max"; }; diff --git a/systems/aarch64-linux/mac-nixos/configuration.nix b/systems/aarch64-linux/macbook-pro-nixos/default.nix similarity index 53% rename from systems/aarch64-linux/mac-nixos/configuration.nix rename to systems/aarch64-linux/macbook-pro-nixos/default.nix index 7d47459..b8b797f 100755 --- a/systems/aarch64-linux/mac-nixos/configuration.nix +++ b/systems/aarch64-linux/macbook-pro-nixos/default.nix @@ -2,9 +2,15 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ pkgs, lib, ... }: +{ pkgs, lib, namespace, ... }: let plasma = false; + # Displays + display = { + input = "eDP-1"; + resolution = "3456x2234"; + refreshRate = "60.00000"; + }; in { imports = [ @@ -21,9 +27,43 @@ in setupAsahiSound = true; }; - hardware.graphics.enable32Bit = lib.mkForce false; + ${namespace} = { + desktop = { + hyprland = { + enable = true; + primaryDisplay = "eDP-1"; + + display1 = { + input = "eDP-1"; + resolution = "3456x2234"; + refreshRate = "60.00000"; + }; + + wallpaper = [ + "${display.input}, /run/wallpaper.jpg" + ]; + + monitor = [ + "${display.input},${display.resolution}@${display.refreshRate},0x0,1.25,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98" + ]; + + workspace = [ + "name:firefox, monitor:${display.input}, default:false, special, class:(.*firefox.*)" + "name:discord, monitor:${display.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)" + "name:steam, monitor:${display.input}, default:false, special, class:(.*[Ss]team.*)" + ]; + + + windowRule = [ + "size 2160 3356, tag:horizonrdp" + ]; + }; + }; + network = { + hostName = "macbook-pro-nixos"; + }; + }; - nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnsupportedSystem = true; # Define a user account. Don't forget to set a password with ‘passwd’. @@ -59,12 +99,20 @@ in # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ + aria + asahi-bless + asahi-btsync + asahi-nvram + asahi-wifisync + cabextract micro + unzip vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget ]; environment.sessionVariables = { DBX_CONTAINER_MANAGER = "podman"; + GSK_RENDERER = "opengl"; }; } diff --git a/systems/aarch64-linux/mac-nixos/firmware/all_firmware.tar.gz b/systems/aarch64-linux/macbook-pro-nixos/firmware/all_firmware.tar.gz similarity index 100% rename from systems/aarch64-linux/mac-nixos/firmware/all_firmware.tar.gz rename to systems/aarch64-linux/macbook-pro-nixos/firmware/all_firmware.tar.gz diff --git a/systems/aarch64-linux/mac-nixos/firmware/kernelcache.release.mac14j b/systems/aarch64-linux/macbook-pro-nixos/firmware/kernelcache.release.mac14j similarity index 100% rename from systems/aarch64-linux/mac-nixos/firmware/kernelcache.release.mac14j rename to systems/aarch64-linux/macbook-pro-nixos/firmware/kernelcache.release.mac14j diff --git a/systems/aarch64-linux/mac-nixos/hardware-configuration.nix b/systems/aarch64-linux/macbook-pro-nixos/hardware-configuration.nix similarity index 95% rename from systems/aarch64-linux/mac-nixos/hardware-configuration.nix rename to systems/aarch64-linux/macbook-pro-nixos/hardware-configuration.nix index c0cc3fe..3584b11 100644 --- a/systems/aarch64-linux/mac-nixos/hardware-configuration.nix +++ b/systems/aarch64-linux/macbook-pro-nixos/hardware-configuration.nix @@ -60,12 +60,12 @@ options = [ "fmask=0022" "dmask=0022" ]; }; - swapDevices = [ - { - device = "/tmp/swapfile"; - randomEncryption.enable = true; - } - ]; + # swapDevices = [ + # { + # device = "/tmp/swapfile"; + # randomEncryption.enable = true; + # } + # ]; # 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 diff --git a/systems/aarch64-linux/mac-nixos/hyprland-settings.nix b/systems/aarch64-linux/macbook-pro-nixos/hyprland-settings.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/hyprland-settings.nix rename to systems/aarch64-linux/macbook-pro-nixos/hyprland-settings.nix diff --git a/systems/aarch64-linux/mac-nixos/networking.nix b/systems/aarch64-linux/macbook-pro-nixos/networking.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/networking.nix rename to systems/aarch64-linux/macbook-pro-nixos/networking.nix diff --git a/systems/aarch64-linux/mac-nixos/omnissa.nix b/systems/aarch64-linux/macbook-pro-nixos/omnissa.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/omnissa.nix rename to systems/aarch64-linux/macbook-pro-nixos/omnissa.nix diff --git a/systems/aarch64-linux/mac-nixos/services.nix b/systems/aarch64-linux/macbook-pro-nixos/services.nix similarity index 79% rename from systems/aarch64-linux/mac-nixos/services.nix rename to systems/aarch64-linux/macbook-pro-nixos/services.nix index 19d90ad..c7d03d3 100644 --- a/systems/aarch64-linux/mac-nixos/services.nix +++ b/systems/aarch64-linux/macbook-pro-nixos/services.nix @@ -8,19 +8,18 @@ charger = { # see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors # preferred governor - governor = "performance"; + governor = "schedutil"; # minimum cpu frequency (in kHz) # example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000 + # Available: 912 MHz, 1284 MHz, 1752 MHz, 2004 MHz, 2256 MHz, 2424 MHz + # 702000 948000 1188000 1452000 1704000 1968000 2208000 2400000 2568000 2724000 2868000 3000000 3132000 3264000 # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html # to use this feature, uncomment the following line and set the value accordingly - # scaling_min_freq = 800000 - - # maximum cpu frequency (in kHz) - # example: for 1GHz = 1000 MHz = 1000000 kHz -> scaling_max_freq = 1000000 - # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html - # to use this feature, uncomment the following line and set the value accordingly - # scaling_max_freq = 1000000 + scaling_min_freq = 912000; + scaling_max_freq = 2424000; + # scaling_min_freq = 702000; + # scaling_max_freq = 1968000; # turbo boost setting. possible values: always, auto, never turbo = "auto"; @@ -29,19 +28,16 @@ battery = { # see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors # preferred governor - governor = "schedutil"; + governor = "powersave"; # minimum cpu frequency (in kHz) # example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000 + # Available: 912 MHz, 1284 MHz, 1752 MHz, 2004 MHz, 2256 MHz, 2424 MHz + # 702000 948000 1188000 1452000 1704000 1968000 2208000 2400000 2568000 2724000 2868000 3000000 3132000 3264000 # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html # to use this feature, uncomment the following line and set the value accordingly - # scaling_min_freq = 800000 - - # maximum cpu frequency (in kHz) - # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html - # example: for 1GHz = 1000 MHz = 1000000 kHz -> scaling_max_freq = 1000000 - # to use this feature, uncomment the following line and set the value accordingly - # scaling_max_freq = 1000000 + scaling_min_freq = 912000; + scaling_max_freq = 2004000; # turbo boost setting (always, auto, or never) turbo = "auto"; @@ -81,7 +77,7 @@ gvfs.enable = true; keyd = { - enable = true; + enable = false; keyboards = { default = { ids = [ "*" ]; diff --git a/systems/aarch64-linux/mac-nixos/sops.nix b/systems/aarch64-linux/macbook-pro-nixos/sops.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/sops.nix rename to systems/aarch64-linux/macbook-pro-nixos/sops.nix