From 895a6011a08cba5921230f3c0e5807ac74d2ffb8 Mon Sep 17 00:00:00 2001 From: Remy Moll Date: Fri, 5 Dec 2025 17:20:44 +0100 Subject: [PATCH] moore tiling --- flake.lock | 157 +++++++----------- flake.nix | 7 +- hosts/macbook-pro/configuration.nix | 2 - hosts/macbook-pro/default.nix | 2 +- modules/home-manager/code.nix | 10 +- .../macos-tiling/default.nix | 0 modules/home-manager/macos-tiling/tiling.nix | 48 ++++++ modules/home-manager/work/aliases.nix | 11 ++ modules/home-manager/work/default.nix | 1 + modules/home-manager/work/kluster.nix | 7 +- modules/nixos/macos-tiling/tiling.nix | 41 ----- users/remy_macos/default.nix | 18 +- 12 files changed, 147 insertions(+), 157 deletions(-) rename modules/{nixos => home-manager}/macos-tiling/default.nix (100%) create mode 100644 modules/home-manager/macos-tiling/tiling.nix create mode 100644 modules/home-manager/work/aliases.nix delete mode 100644 modules/nixos/macos-tiling/tiling.nix diff --git a/flake.lock b/flake.lock index 0fdaf5a..81fc2e2 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1762356719, - "narHash": "sha256-qwd/xdoOya1m8FENle+4hWnydCtlXUWLAW/Auk6WL7s=", + "lastModified": 1764370710, + "narHash": "sha256-7iZklFmziy6Vn5ZFy9mvTSuFopp3kJNuPxL5QAvtmFQ=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "6d0b3567584691bf9d8fedb5d0093309e2f979c7", + "rev": "561ae7fbe1ca15dfd908262ec815bf21a13eef63", "type": "github" }, "original": { @@ -125,11 +125,11 @@ ] }, "locked": { - "lastModified": 1763522195, - "narHash": "sha256-QW/SKfUN5nT8J1EIvtpNaGf886+BBp2vCvs/ZuMo0VE=", + "lastModified": 1764741581, + "narHash": "sha256-CbeO9Ie4Ecf8TsQWBJCrOenFmESC8XOSJ0UY69/ZTCw=", "owner": "AvengeMedia", "repo": "DankMaterialShell", - "rev": "dfdaa82245302d40ac1aa4c0d60728b4397dde61", + "rev": "0ea0602aecf5ec6814988c61d4d43ff36c613f18", "type": "github" }, "original": { @@ -159,26 +159,6 @@ "type": "github" } }, - "dms-cli": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1763078370, - "narHash": "sha256-wsYqJlLdRSlJpRE0tIuuPMU6aOyhMdV237rEG/enUxY=", - "owner": "AvengeMedia", - "repo": "danklinux", - "rev": "7a083a0d6d087d41d0bc5077d03e662e1417ce3c", - "type": "github" - }, - "original": { - "owner": "AvengeMedia", - "repo": "danklinux", - "type": "github" - } - }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -198,11 +178,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", "owner": "edolstra", "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", "type": "github" }, "original": { @@ -333,11 +313,11 @@ ] }, "locked": { - "lastModified": 1763416652, - "narHash": "sha256-8EBEEvtzQ11LCxpQHMNEBQAGtQiCu/pqP9zSovDSbNM=", + "lastModified": 1764736867, + "narHash": "sha256-Q/+03EAvtzCbhGXv7yLsYh+pXIzLUgibpQKxo5CI2bk=", "owner": "nix-community", "repo": "home-manager", - "rev": "ea164b7c9ccdc2321379c2ff78fd4317b4c41312", + "rev": "bcc7afa1d873ead5932fbb4d42f1916a9627c084", "type": "github" }, "original": { @@ -412,11 +392,11 @@ ] }, "locked": { - "lastModified": 1762462052, - "narHash": "sha256-6roLYzcDf4V38RUMSqycsOwAnqfodL6BmhRkUtwIgdA=", + "lastModified": 1763733840, + "narHash": "sha256-JnET78yl5RvpGuDQy3rCycOCkiKoLr5DN1fPhRNNMco=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "ffc999d980c7b3bca85d3ebd0a9fbadf984a8162", + "rev": "8f1bec691b2d198c60cccabca7a94add2df4ed1a", "type": "github" }, "original": { @@ -441,11 +421,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1763540034, - "narHash": "sha256-TogNk567BTZib1XiYheW04ELxNB2bhee6G4SgphRqmA=", + "lastModified": 1764725443, + "narHash": "sha256-A2UyZwPSHSdNfvW17J5GhxIo1TS0Z0rYv+Xgdp+w5wc=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "fbb31503f1b69402eeda81ba75a547c862c88bf2", + "rev": "3cf0280b11f370c11e6839275e547779a33f4a19", "type": "github" }, "original": { @@ -487,11 +467,11 @@ ] }, "locked": { - "lastModified": 1762755186, - "narHash": "sha256-ZjjETUHtoEhVN7JI1Cbt3p/KcXpK8ZQaPHx7UkG1OgA=", + "lastModified": 1764616927, + "narHash": "sha256-wRT0MKkpPo11ijSX3KeMN+EQWnpSeUlRtyF3pFLtlRU=", "owner": "hyprwm", "repo": "hyprland-guiutils", - "rev": "66356e20a8ed348aa49c1b9ceace786e224225b3", + "rev": "25cedbfdc5b3ea391d8307c9a5bea315e5df3c52", "type": "github" }, "original": { @@ -541,11 +521,11 @@ ] }, "locked": { - "lastModified": 1763254292, - "narHash": "sha256-JNgz3Fz2KMzkT7aR72wsgu/xNeJB//LSmdilh8Z/Zao=", + "lastModified": 1764612430, + "narHash": "sha256-54ltTSbI6W+qYGMchAgCR6QnC1kOdKXN6X6pJhOWxFg=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "deea98d5b61d066bdc7a68163edd2c4bd28d3a6b", + "rev": "0d00dc118981531aa731150b6ea551ef037acddd", "type": "github" }, "original": { @@ -593,11 +573,11 @@ ] }, "locked": { - "lastModified": 1762463729, - "narHash": "sha256-2fYkU/mdz8WKY3dkDPlE/j6hTxIwqultsx4gMMsMns0=", + "lastModified": 1764592794, + "narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=", "owner": "hyprwm", "repo": "hyprtoolkit", - "rev": "88483bdee5329ec985f0c8f834c519cd18cfe532", + "rev": "5cfe0743f0e608e1462972303778d8a0859ee63e", "type": "github" }, "original": { @@ -618,11 +598,11 @@ ] }, "locked": { - "lastModified": 1763323331, - "narHash": "sha256-+Z0OfCo1MS8/aIutSAW5aJR9zTae1wz9kcJYMgpwN6M=", + "lastModified": 1764637132, + "narHash": "sha256-vSyiKCzSY48kA3v39GFu6qgRfigjKCU/9k1KTK475gg=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "0c6411851cc779d551edc89b83966696201611aa", + "rev": "2f2413801beee37303913fc3c964bbe92252a963", "type": "github" }, "original": { @@ -643,11 +623,11 @@ ] }, "locked": { - "lastModified": 1755184602, - "narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=", + "lastModified": 1763640274, + "narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d", + "rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671", "type": "github" }, "original": { @@ -723,11 +703,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1763517711, - "narHash": "sha256-uY0Vr7ene4VlHyeZRHRNvT4WRwakAr8JShwmNEg7JB0=", + "lastModified": 1764727495, + "narHash": "sha256-sAxuKAnUf8CWsaW6TquDsdDDK4WA4cFNJi/NoccibOw=", "owner": "nix-community", "repo": "nix4vscode", - "rev": "ce4507078be02de77c001ca498657436ec815a35", + "rev": "97019369dd7847a198267a4d4ea8a9d3daf66f6a", "type": "github" }, "original": { @@ -738,11 +718,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1763283776, - "narHash": "sha256-Y7TDFPK4GlqrKrivOcsHG8xSGqQx3A6c+i7novT85Uk=", + "lastModified": 1764517877, + "narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "50a96edd8d0db6cc8db57dab6bb6d6ee1f3dc49a", + "rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c", "type": "github" }, "original": { @@ -754,11 +734,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1763421233, - "narHash": "sha256-Stk9ZYRkGrnnpyJ4eqt9eQtdFWRRIvMxpNRf4sIegnw=", + "lastModified": 1764517877, + "narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "89c2b2330e733d6cdb5eae7b899326930c2c0648", + "rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c", "type": "github" }, "original": { @@ -802,11 +782,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1762111121, - "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", + "lastModified": 1764517877, + "narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "89c2b2330e733d6cdb5eae7b899326930c2c0648", + "rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c", "type": "github" }, "original": { @@ -851,11 +831,11 @@ ] }, "locked": { - "lastModified": 1763319842, - "narHash": "sha256-YG19IyrTdnVn0l3DvcUYm85u3PaqBt6tI6VvolcuHnA=", + "lastModified": 1763988335, + "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "7275fa67fbbb75891c16d9dee7d88e58aea2d761", + "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", "type": "github" }, "original": { @@ -867,7 +847,6 @@ "root": { "inputs": { "dankMaterialShell": "dankMaterialShell", - "dms-cli": "dms-cli", "home-manager": "home-manager", "hyprland": "hyprland", "mac-app-util": "mac-app-util", @@ -878,7 +857,6 @@ "nixpkgs-unstable": "nixpkgs-unstable", "sops-nix": "sops-nix", "stylix": "stylix", - "watt": "watt", "zen-browser": "zen-browser" } }, @@ -889,11 +867,11 @@ ] }, "locked": { - "lastModified": 1763509310, - "narHash": "sha256-s2WzTAD3vJtPACBCZXezNUMTG/wC6SFsU9DxazB9wDI=", + "lastModified": 1764483358, + "narHash": "sha256-EyyvCzXoHrbL467YSsQBTWWg4sR96MH1sPpKoSOelB4=", "owner": "Mic92", "repo": "sops-nix", - "rev": "3ee33c0ed7c5aa61b4e10484d2ebdbdc98afb03e", + "rev": "5aca6ff67264321d47856a2ed183729271107c9c", "type": "github" }, "original": { @@ -923,11 +901,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1763497248, - "narHash": "sha256-OGP6MYc+lVkLVQOTS6ORszDcCnZm7kDOGpFBdDoLd0k=", + "lastModified": 1764722003, + "narHash": "sha256-s+rXjTHsjC39zcFFq8UkQPdpy/uzdhQU+RGvehYJQm0=", "owner": "nix-community", "repo": "stylix", - "rev": "f19ac46f6aa26188b2020ed40066a5b832be9c53", + "rev": "ddc49fd564a599474d6587df25553cbfd7325ece", "type": "github" }, "original": { @@ -1096,27 +1074,6 @@ "type": "github" } }, - "watt": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1749377316, - "narHash": "sha256-hw3rL4rlIlYJMTeE7DlQ3lRhQDJURAhE+PC/NT4VAAQ=", - "owner": "NotAShelf", - "repo": "watt", - "rev": "154724c7b1bd49654ea55df719e1eb3219ec2000", - "type": "github" - }, - "original": { - "owner": "NotAShelf", - "ref": "v0.3.2", - "repo": "watt", - "type": "github" - } - }, "xdph": { "inputs": { "hyprland-protocols": [ @@ -1166,11 +1123,11 @@ ] }, "locked": { - "lastModified": 1763521945, - "narHash": "sha256-Zcrafbe4niRJMbzaVOwg7+iedJhwBFttre2DpyCC6qA=", + "lastModified": 1764736168, + "narHash": "sha256-CQcj/oWKH4zN8Xkc1RglX+uOJTW1fwNWvMQWRXRlEys=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "24d7381b9231c23daceec5d372cc28e877f7785d", + "rev": "df63ce4f706567e6efa083ba63d5e7792bf70ffa", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c5bd3a1..cd8c75d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "Nix config entry point"; # since secrets live in a submodule, enable submodules by default - # inputs.self.submodules = true; + inputs.self.submodules = true; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -34,14 +34,9 @@ }; # quickshell - dms-cli = { - url = "github:AvengeMedia/danklinux"; - inputs.nixpkgs.follows = "nixpkgs"; - }; dankMaterialShell = { url = "github:AvengeMedia/DankMaterialShell"; inputs.nixpkgs.follows = "nixpkgs"; - inputs.dms-cli.follows = "dms-cli"; }; nix4vscode = { diff --git a/hosts/macbook-pro/configuration.nix b/hosts/macbook-pro/configuration.nix index 65d7785..a66edf8 100644 --- a/hosts/macbook-pro/configuration.nix +++ b/hosts/macbook-pro/configuration.nix @@ -6,10 +6,8 @@ }; system.primaryUser = "remy"; - environment.systemPackages = [ pkgs.git ]; # required because git is hardcoded into mac nix.enable=false; nixpkgs.config.allowUnfree = true; - # nixpkgs.config.allowUnsupportedSystem = true; security.pam.services.sudo_local.touchIdAuth = true; # Necessary for using flakes on this system. diff --git a/hosts/macbook-pro/default.nix b/hosts/macbook-pro/default.nix index a58fdd6..ccae284 100644 --- a/hosts/macbook-pro/default.nix +++ b/hosts/macbook-pro/default.nix @@ -10,6 +10,6 @@ # Merge the configuration and hardware configuration imports = [ ./configuration.nix - ../../modules/nixos/macos-tiling + # ../../modules/nixos/macos-tiling ]; } diff --git a/modules/home-manager/code.nix b/modules/home-manager/code.nix index 7731d61..d27fec5 100644 --- a/modules/home-manager/code.nix +++ b/modules/home-manager/code.nix @@ -114,7 +114,6 @@ in # Flutter and co "dart-code.flutter" "dart-code.dart-code" - ]; keybindings = baseKeybindings; @@ -177,5 +176,14 @@ in }; }; }; + + profiles.cloud = { + extensions = baseExtensions ++ pkgs.nix4vscode.forVscode [ + "Tim-Koehler.helm-intellisense" + "HashiCorp.terraform" + ]; + keybindings = baseKeybindings; + userSettings = baseSettings; + }; }; } diff --git a/modules/nixos/macos-tiling/default.nix b/modules/home-manager/macos-tiling/default.nix similarity index 100% rename from modules/nixos/macos-tiling/default.nix rename to modules/home-manager/macos-tiling/default.nix diff --git a/modules/home-manager/macos-tiling/tiling.nix b/modules/home-manager/macos-tiling/tiling.nix new file mode 100644 index 0000000..9a61fdc --- /dev/null +++ b/modules/home-manager/macos-tiling/tiling.nix @@ -0,0 +1,48 @@ +{pkgs, ...}: { + home.packages = [ + pkgs.scroll-reverser + ]; + programs.aerospace = { + enable = true; + + launchd.enable = true; + + settings = { + gaps = { + outer.left = 4; + outer.bottom = 4; + outer.top = 4; + outer.right = 4; + + inner.vertical = 2; + inner.horizontal = 2; + }; + + mode.main.binding = { + alt-enter = ''exec-and-forget osascript -e ' + tell application "Terminal" + do script + activate + end tell' + ''; + + alt-f = "fullscreen"; + + alt-h = "focus left"; + alt-j = "focus down"; + alt-k = "focus up"; + alt-l = "focus right"; + + alt-1 = "workspace 1"; + alt-2 = "workspace 2"; + alt-3 = "workspace 3"; + + alt-shift-1 = "move-node-to-workspace 1"; + alt-shift-2 = "move-node-to-workspace 2"; + alt-shift-3 = "move-node-to-workspace 3"; + + alt-tab = "workspace-back-and-forth"; + }; + }; + }; +} diff --git a/modules/home-manager/work/aliases.nix b/modules/home-manager/work/aliases.nix new file mode 100644 index 0000000..71df09f --- /dev/null +++ b/modules/home-manager/work/aliases.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: +{ + # Add aliases for the various environments in aws so that their contexts can be easily switched + programs.fish.shellAliases = { + cdev = "aws-vault exec dev --"; + cstage = "aws-vault exec stage --"; + cprod = "aws-vault exec prod --"; + clogs = "aws-vault exec logs --"; + cshared = "aws-vault exec shared --"; + }; +} diff --git a/modules/home-manager/work/default.nix b/modules/home-manager/work/default.nix index 0fdb412..d8dc575 100644 --- a/modules/home-manager/work/default.nix +++ b/modules/home-manager/work/default.nix @@ -11,6 +11,7 @@ in }; imports = [ + ./aliases.nix ./cryptography.nix ./kluster.nix ]; diff --git a/modules/home-manager/work/kluster.nix b/modules/home-manager/work/kluster.nix index ce40c79..30a697a 100644 --- a/modules/home-manager/work/kluster.nix +++ b/modules/home-manager/work/kluster.nix @@ -2,8 +2,13 @@ { home.packages = [ pkgs.kubernetes-helm - pkgs.awscli + pkgs.awscli2 pkgs.aws-vault pkgs.k9s + + # some parsers + pkgs.ripgrep + pkgs.jq + pkgs.yq ]; } diff --git a/modules/nixos/macos-tiling/tiling.nix b/modules/nixos/macos-tiling/tiling.nix deleted file mode 100644 index fa46dd5..0000000 --- a/modules/nixos/macos-tiling/tiling.nix +++ /dev/null @@ -1,41 +0,0 @@ -{pkgs, ...}: { - environment.systemPackages = with pkgs; [ - yabai - skhd - ]; - environment.variables.EDITOR = "code"; - - - # skhd service and config - services.skhd = { - enable = true; - skhdConfig = '' - # toggle window split type - alt - e : yabai -m window --toggle split - - # rotate tree - alt - r : yabai -m space --rotate 90 - ''; - }; - - # yabai service and config - services.yabai = { - enable = true; - package = pkgs.yabai; - enableScriptingAddition = true; - config = { - focus_follows_mouse = "autoraise"; - window_placement = "second_child"; - window_shadow = "on"; - window_opacity = "off"; - }; - extraConfig = '' - sudo yabai --load-sa - yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" - yabai -m space 1 --label i - yabai -m space 2 --label ii - yabai -m space 3 --label iii - yabai -m space 4 --label iv - ''; - }; -} diff --git a/users/remy_macos/default.nix b/users/remy_macos/default.nix index a4d1635..1d8eb59 100644 --- a/users/remy_macos/default.nix +++ b/users/remy_macos/default.nix @@ -4,12 +4,19 @@ with lib.hm.gvariant; config = { home.stateVersion = "24.05"; programs.git = { - enable = true; - settings = { - user.name = "Remy Moll"; - user.email = "remy.moll@artidis.com"; + enable = true; + settings = { + user.name = "Remy Moll"; + user.email = "remy.moll@artidis.com"; + }; + }; + + # on macos we don't set the default shell to fish as it breaks some things + # instead we just tell the terminal to run fish as the first command + # this means that the first thing fish should do is to clear the screen + programs.fish = { + interactiveShellInit = "clear"; }; - }; }; @@ -24,6 +31,7 @@ with lib.hm.gvariant; ../../modules/home-manager/fish.nix ../../modules/home-manager/kubectl.nix + ../../modules/home-manager/macos-tiling ../../modules/home-manager/nh.nix ../../modules/home-manager/work ];