diff --git a/.sops.yaml b/.sops.yaml index c23ca17..4ea7b81 100755 --- a/.sops.yaml +++ b/.sops.yaml @@ -73,3 +73,14 @@ creation_rules: - *pi5 - *admin - *jallen-nas + - path_regex: mac-secrets/[^/]+\.(yaml|json|env|ini)$ + key_groups: + - age: + - *matt + - *matt_pi5 + - *desktop + - *pi5 + - *admin + - *jallen-nas + - *matt_macbook-pro + - *macbook-pro diff --git a/hosts/mac-nixos/hyprland-settings.nix b/hosts/mac-nixos/hyprland-settings.nix index d396564..1568358 100644 --- a/hosts/mac-nixos/hyprland-settings.nix +++ b/hosts/mac-nixos/hyprland-settings.nix @@ -5,10 +5,19 @@ in wallpaper = [ "eDP-1, /run/wallpaper.jpg" ]; + monitor = [ - "eDP-1,3456x2234@60.00000,0x0,1.0,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98" + "eDP-1,3456x2234@60.00000,0x0,1.25,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98" ]; + # monitorv2 = { + # output = "eDP-1"; + # mode = "3456x2234@60.00000"; + # position = "0x0"; + # scale = "1.25"; + # #bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98" + # }; + workspace = [ "name:firefox, monitor:eDP-1, default:false, special, class:(.*firefox.*)" "name:discord, monitor:eDP-1, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)" diff --git a/hosts/mac-nixos/networking.nix b/hosts/mac-nixos/networking.nix index 8c177a3..f9039f8 100644 --- a/hosts/mac-nixos/networking.nix +++ b/hosts/mac-nixos/networking.nix @@ -33,5 +33,12 @@ }; settings.connectivity.uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt"; }; + + # orca + firewall.extraCommands = '' + iptables -I INPUT -m pkttype --pkt-type multicast -j ACCEPT + iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT + iptables -I INPUT -p udp -m udp --match multiport --dports 1990,2021 -j ACCEPT + ''; }; } \ No newline at end of file diff --git a/hosts/mac-nixos/sops.nix b/hosts/mac-nixos/sops.nix new file mode 100644 index 0000000..753b1a5 --- /dev/null +++ b/hosts/mac-nixos/sops.nix @@ -0,0 +1,70 @@ +{ config, ... }: +let + user = "matt"; +in +{ + # Permission modes are in octal representation (same as chmod), + # the digits represent: user|group|others + # 7 - full (rwx) + # 6 - read and write (rw-) + # 5 - read and execute (r-x) + # 4 - read only (r--) + # 3 - write and execute (-wx) + # 2 - write only (-w-) + # 1 - execute only (--x) + # 0 - none (---) + # Either a user id or group name representation of the secret owner + # It is recommended to get the user name from `config.users.users..name` to avoid misconfiguration + # Either the group id or group name representation of the secret group + # It is recommended to get the group name from `config.users.users..group` to avoid misconfiguration + sops = { + defaultSopsFile = ../../secrets/secrets.yaml; + age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + + # ------------------------------ + # Secrets + # ------------------------------ + secrets = { + "wifi" = { + sopsFile = ../../secrets/secrets.yaml; + }; + + # ------------------------------ + # SSH keys + # ------------------------------ + # "ssh-keys-public/desktop-nixos" = { + # sopsFile = ../../secrets/secrets.yaml; + # mode = "0644"; + # owner = config.users.users."${user}".name; + # group = config.users.users."${user}".group; + # restartUnits = [ "sshd.service" ]; + # }; + # "ssh-keys-private/desktop-nixos" = { + # sopsFile = ../../secrets/secrets.yaml; + # mode = "0600"; + # owner = config.users.users."${user}".name; + # group = config.users.users."${user}".group; + # restartUnits = [ "sshd.service" ]; + # }; + # "ssh-keys-public/desktop-nixos-root" = { + # sopsFile = ../../secrets/secrets.yaml; + # path = "/root/.ssh/id_ed25519.pub"; + # mode = "0600"; + # restartUnits = [ "sshd.service" ]; + # }; + # "ssh-keys-private/desktop-nixos-root" = { + # sopsFile = ../../secrets/secrets.yaml; + # path = "/root/.ssh/id_ed25519"; + # mode = "0600"; + # restartUnits = [ "sshd.service" ]; + # }; + }; + + # ------------------------------ + # Templates + # ------------------------------ + templates = { + # ... + }; + }; +} diff --git a/modules/desktop-environments/hyprland/config/hypr/default.nix b/modules/desktop-environments/hyprland/config/hypr/default.nix index 206da7d..e9c29c8 100755 --- a/modules/desktop-environments/hyprland/config/hypr/default.nix +++ b/modules/desktop-environments/hyprland/config/hypr/default.nix @@ -123,7 +123,8 @@ in "$mod, XF86MonBrightnessDown, exec, brightnessctl -d kbd_backlight set 10%-" ]; - monitor = hyprlandSettings.monitor; + monitor = hyprlandSettings.monitor or [ ]; + monitorv2 = hyprlandSettings.monitorv2 or { }; render = { cm_fs_passthrough = 1; @@ -293,6 +294,8 @@ in debug = { full_cm_proto = true; + disable_logs = true; + disable_scale_checks = true; }; }; @@ -303,6 +306,6 @@ in exec-once = xhost +SI:localuser:root exec-once = nwg-look -a exec-once = nwg-dock-hyprland -d - '' + hyprlandSettings.extraConfig; + '' + hyprlandSettings.extraConfig or ''''; }; }