split by hostname

This commit is contained in:
Tyrel Souza 2023-01-03 00:32:32 -05:00
parent c5ad3662d4
commit 12d42a0c3d
17 changed files with 200 additions and 39 deletions

View File

@ -1,3 +0,0 @@
macvim
vagrant
virtualbox

View File

@ -1,23 +0,0 @@
ack
awscli
cli53
gawk
git
gnu-sed
graphviz
homebrew/versions/gnupg21
htop-osx
mariadb@10.1
mtr
nmap
openssl
packer
python
reattach-to-user-namespace
terraform
tmux
vim
watch
wget
zsh-completions
diff-so-fancy

View File

@ -1,3 +0,0 @@
virtualenv
virtualenv-clone
virtualenvwrapper

View File

@ -6,6 +6,7 @@
EDITOR = "nvim"; EDITOR = "nvim";
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
# Terminals
bat bat
ctags ctags
exa exa
@ -15,6 +16,7 @@
tree-sitter tree-sitter
silver-searcher silver-searcher
wget wget
]; ];
home.file = { home.file = {

View File

@ -8,11 +8,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1672349765, "lastModified": 1672688183,
"narHash": "sha256-Ul3lSGglgHXhgU3YNqsNeTlRH1pqxbR64h+2hM+HtnM=", "narHash": "sha256-3sNEWKTg3XXVDnvzVatdyetiUQWL+ibJ1YkvxSk3PuM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "dd99675ee81fef051809bc87d67eb07f5ba022e8", "rev": "c1a830c8fabb13f95f51ecf48552f0a794d8718a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -23,11 +23,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1672350804, "lastModified": 1672525397,
"narHash": "sha256-jo6zkiCabUBn3ObuKXHGqqORUMH27gYDIFFfLq5P4wg=", "narHash": "sha256-WASDnyxHKWVrEe0dIzkpH+jzKlCKAk0husv0f/9pyxg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "677ed08a50931e38382dbef01cba08a8f7eac8f6", "rev": "8ba56d7c0d7490680f2d51ba46a141eca7c46afa",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -15,9 +15,10 @@
homeConfigurations = { homeConfigurations = {
"tyrel" = home-manager.lib.homeManagerConfiguration { "tyrel" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = [ modules = [
../hosts/blackbox-jr/default.nix ./default.nix
../hosts/blackbox-jr/home-manager.nix ./home-manager.nix
{ {
home = { home = {
homeDirectory = "/home/tyrel"; homeDirectory = "/home/tyrel";
@ -26,7 +27,10 @@
}; };
} }
]; ];
}; };
}; };
}; };
} }

View File

@ -2,6 +2,7 @@
{ {
# Common Imports # Common Imports
imports = [ imports = [
./home.nix
../_common/home.nix ../_common/home.nix
../_common/programs.nix ../_common/programs.nix
../_common/xdg.nix ../_common/xdg.nix

View File

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
home.stateVersion = "22.05";
home.sessionVariables = {
};
home.packages = with pkgs; [
];
home.file = {
};
}

26
hosts/ts-tl-mbp/flake.nix Normal file
View File

@ -0,0 +1,26 @@
{
description = "Tyrel Nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-22.11-darwin";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, darwin }: {
defaultPackage.x86_64-darwin = home-manager.defaultPackage.x86_64-darwin;
darwinConfigurations."ts-tl-mbp" = darwin.lib.darwinSystem {
system = "x86_64-darwin";
modules = [
home-manager.darwinModules.home-manager
./default.nix
./home-manager.nix
./brew.nix
../hosts/_common/fonts.nix
];
};
};
}

View File

@ -5,6 +5,7 @@
home-manager.users.tyrel = { pkgs, ... }: { home-manager.users.tyrel = { pkgs, ... }: {
# Common Imports # Common Imports
imports = [ imports = [
./home.nix
../_common/home.nix ../_common/home.nix
../_common/programs.nix ../_common/programs.nix
../_common/xdg.nix ../_common/xdg.nix

12
hosts/ts-tl-mbp/home.nix Normal file
View File

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
home.stateVersion = "22.05";
home.sessionVariables = {
};
home.packages = with pkgs; [
];
home.file = {
};
}

View File

@ -0,0 +1,4 @@
{ pkgs, config, lib, ... }:
{
programs.zsh.enable = true;
}

View File

@ -0,0 +1,64 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1672688183,
"narHash": "sha256-3sNEWKTg3XXVDnvzVatdyetiUQWL+ibJ1YkvxSk3PuM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c1a830c8fabb13f95f51ecf48552f0a794d8718a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1672525397,
"narHash": "sha256-WASDnyxHKWVrEe0dIzkpH+jzKlCKAk0husv0f/9pyxg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8ba56d7c0d7490680f2d51ba46a141eca7c46afa",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -0,0 +1,36 @@
{
description = "Tyrel Nix";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager } :
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
homeConfigurations = {
"tyrel" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./default.nix
./home-manager.nix
{
home = {
homeDirectory = "/home/tyrel";
username = "tyrel";
stateVersion = "22.05";
};
}
];
};
};
};
}

View File

@ -0,0 +1,15 @@
{ pkgs, ... }:
{
# Common Imports
imports = [
./home.nix
../_common/home.nix
../_common/programs.nix
../_common/xdg.nix
];
home.sessionVariables = {
XDG_CONFIG_HOME = "/home/tyrel/.config";
};
}

View File

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
home.stateVersion = "22.05";
home.sessionVariables = {
};
home.packages = with pkgs; [
];
home.file = {
};
}

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/tyrel/channels/nixpkgs:/nix/var/nix/profiles/per-user/tyrel/channels NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/tyrel/channels/nixpkgs:/nix/var/nix/profiles/per-user/tyrel/channels
hostname=$(hostname)
nix run ./_ubuntu switch -vv nix run ./hosts/$hostname switch -vv
home-manager switch --flake ./_ubuntu home-manager switch --flake ./hosts/$hostname