Skip to content

Commit

Permalink
Switch to flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonringer committed Sep 8, 2021
1 parent 9b1020c commit 228b7c4
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 10 deletions.
76 changes: 76 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions flake.nix
@@ -0,0 +1,34 @@
{
description = "Home-manager configuration";

inputs = {
utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager.url = "github:nix-community/home-manager";
};

outputs = { self, home-manager, nixpkgs, utils }:
let
localOverlay = _: _: { };

pkgsForSystem = system: import nixpkgs {
overlays = [
localOverlay
];
inherit system;
};
in utils.lib.eachSystem [ "x86_64-linux" ] (system: rec {
legacyPackages = pkgsForSystem system;
}) // {
# non-system suffixed items should go here
overlay = localOverlay;
nixosModules.home = import ./home.nix; # attr set or list
homeConfigurations.jon = home-manager.lib.homeManagerConfiguration {
system = "x86_64-linux";
configuration = import ./home.nix;
homeDirectory = "/home/jon";
username = "jon";
};
inherit home-manager;
};
}
16 changes: 7 additions & 9 deletions home.nix
Expand Up @@ -71,38 +71,36 @@ in
enable = true;
forwardAgent = true;
extraConfig = ''
Include ~/.ssh/config.d/*
Host build
HostName 10.0.0.21
Port 22
User root
IdentitiesOnly yes
IdentityFile /home/jon/.ssh/id_rsa
User root
Host external
HostName 73.157.50.82
Port 2222
IdentityFile /home/jon/.ssh/id_rsa
User jon
ForwardAgent yes
RemoteForward /run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra
IdentitiesOnly yes
IdentityFile /home/jon/.ssh/id_rsa
Host server
HostName 10.0.0.21
Port 22
User jon
IdentitiesOnly yes
IdentityFile /home/jon/.ssh/id_rsa
User jon
Host pi
HostName 10.0.0.220
Port 22
User jon
IdentitiesOnly yes
IdentityFile /home/jon/.ssh/id_rsa
User jon
Host *
ForwardAgent yes
IdentitiesOnly yes
GSSAPIAuthentication no
RemoteForward /run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra
'';
Expand Down
2 changes: 1 addition & 1 deletion vim.nix
Expand Up @@ -63,7 +63,7 @@ pkgs:
vim-toml

# sql
sql-nvim
sqlite-lua
];

extraPackages = with pkgs; [
Expand Down

0 comments on commit 228b7c4

Please sign in to comment.