From 2950d3d8dcf76e741b650a9d42038cfed475e87a Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Fri, 14 Oct 2022 14:17:50 +0200 Subject: [PATCH 1/6] Added giulioMac user config --- flake.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 0446be6..e1bc4ab 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,9 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-unstable.url = "github:NixOS/nixpkgs/master"; home-manager = { - url = "github:rycee/home-manager/release-22.05"; + url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; vim-extra-plugins.url = "github:m15a/nixpkgs-vim-extra-plugins"; @@ -71,5 +71,9 @@ users = [ ]; }; }; + homeConfigurations.giulioMac = utilsDarwin.user.mkHMUser { + name = "giulio"; + roles = [ "ssh" ]; + }; }; } From 318bfda3b63987b2d777119da85326d252b5936d Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Fri, 14 Oct 2022 14:18:57 +0200 Subject: [PATCH 2/6] Update lock --- flake.lock | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/flake.lock b/flake.lock index 8b5738e..a067c43 100644 --- a/flake.lock +++ b/flake.lock @@ -35,30 +35,30 @@ "inputs": { "nixpkgs": [ "nixpkgs" - ] + ], + "utils": "utils" }, "locked": { - "lastModified": 1665475263, - "narHash": "sha256-T4at7d+KsQNWh5rfjvOtQCaIMWjSDlSgQZKvxb+LcEY=", - "owner": "rycee", + "lastModified": 1665655007, + "narHash": "sha256-34ZMJlgqJb73RY/gJz8B4cjdM5ukas2crMYQpmyRGeQ=", + "owner": "nix-community", "repo": "home-manager", - "rev": "17208be516fc36e2ab0ceb064d931e90eb88b2a3", + "rev": "8cbc6500dfca22d907054f68c564019b3b6cf295", "type": "github" }, "original": { - "owner": "rycee", - "ref": "release-22.05", + "owner": "nix-community", "repo": "home-manager", "type": "github" } }, "nixos-unstable": { "locked": { - "lastModified": 1665672983, - "narHash": "sha256-V7Va7CRKmQRy95xSdlga5nV7q3/PusZwNAF/leb5PcU=", + "lastModified": 1665746835, + "narHash": "sha256-XpfvzR5wl6wTUaGQBx98i/yvxOrDKhibD1Tfl2GwHuY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bb2fb1524795f2d720cd13a2eb4d35d3a7a0d888", + "rev": "5e66f427c661955f08d55f654e82bab1b1a7abc1", "type": "github" }, "original": { @@ -70,16 +70,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1665596265, - "narHash": "sha256-H7Ku1SF+7zDEqw8QOyEDA5blMJQW9MvdfgB+K3KJNLw=", + "lastModified": 1665643254, + "narHash": "sha256-IBVWNJxGCsshwh62eRfR6+ry3bSXmulB3VQRzLQo3hk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9234f5a17e1a7820b5e91ecd4ff0de449e293383", + "rev": "ba187fbdc5e35322c7dff556ef2c47bddfd6e8d7", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.05", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -108,6 +108,21 @@ "vim-extra-plugins": "vim-extra-plugins" } }, + "utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "vim-extra-plugins": { "inputs": { "flake-compat": "flake-compat", From 548107f7afa98a186ad08fccf97b1ffa920a8cf7 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Fri, 14 Oct 2022 14:49:36 +0200 Subject: [PATCH 3/6] Add macOS specific SSH config --- roles/home/ssh.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/home/ssh.nix b/roles/home/ssh.nix index a625ef3..66d1f72 100644 --- a/roles/home/ssh.nix +++ b/roles/home/ssh.nix @@ -1,3 +1,5 @@ +{ lib, pkgs, ... }: + { programs.ssh = { enable = true; @@ -166,6 +168,9 @@ extraConfig = '' IdentitiesOnly yes ServerAliveInterval 3600 + '' + lib.optionalString pkgs.stdenv.isDarwin '' + UseKeychain yes + TCPKeepAlive no ''; }; } From 8bee241a075bc7163396cea3350fc9edeae4d091 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Fri, 14 Oct 2022 14:52:48 +0200 Subject: [PATCH 4/6] Save SSH keys when on darwin --- roles/home/ssh.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/home/ssh.nix b/roles/home/ssh.nix index 66d1f72..2b11afa 100644 --- a/roles/home/ssh.nix +++ b/roles/home/ssh.nix @@ -169,6 +169,7 @@ IdentitiesOnly yes ServerAliveInterval 3600 '' + lib.optionalString pkgs.stdenv.isDarwin '' + AddKeysToAgent yes UseKeychain yes TCPKeepAlive no ''; From 8773a28f8974c84df559f0aa107a76e89490a265 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Mon, 14 Nov 2022 12:27:38 +0100 Subject: [PATCH 5/6] flake, neovim: Removed vim-extra-plugins --- flake.nix | 4 +--- roles/home/neovim.nix | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index e1bc4ab..171f733 100644 --- a/flake.nix +++ b/flake.nix @@ -6,11 +6,10 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - vim-extra-plugins.url = "github:m15a/nixpkgs-vim-extra-plugins"; }; outputs = - inputs@{ self, nixpkgs, nixos-unstable, home-manager, vim-extra-plugins }: + inputs@{ self, nixpkgs, nixos-unstable, home-manager }: let x64System = "x86_64-linux"; darwinSystem = "aarch64-darwin"; @@ -22,7 +21,6 @@ config.allowUnfree = true; overlays = [ (final: prev: { inherit unstable; }) - vim-extra-plugins.overlays.default ]; }; diff --git a/roles/home/neovim.nix b/roles/home/neovim.nix index 3132572..1a784ca 100644 --- a/roles/home/neovim.nix +++ b/roles/home/neovim.nix @@ -41,8 +41,6 @@ (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) nvim-treesitter-textobjects minimap-vim - - pkgs.vimExtraPlugins.leap-nvim ]; extraConfig = '' From cb440990c42d5fe374898b1785a1027ff70c0aac Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Mon, 14 Nov 2022 12:32:58 +0100 Subject: [PATCH 6/6] ssh: Add UCSB robbins server --- roles/home/ssh.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/home/ssh.nix b/roles/home/ssh.nix index 2b11afa..23bac5a 100644 --- a/roles/home/ssh.nix +++ b/roles/home/ssh.nix @@ -10,7 +10,12 @@ user = "root"; identityFile = "~/.ssh/architectproxy"; }; - + + "192.35.222.32" = { + user = "giulio"; + identityFile = "~/.ssh/gitlab-ucsb"; + }; + "tommy.devs.giugl.io" = { user = "giulio"; identityFile = "~/.ssh/tommypc";