From 12d42a0c3d7e767ea541c3d743bc8ab8489788ca Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Tue, 3 Jan 2023 00:32:32 -0500 Subject: [PATCH] split by hostname --- home/bin/packages/homebrew-casks.txt | 3 -- home/bin/packages/homebrew.txt | 23 -------- home/bin/packages/pip.txt | 3 -- hosts/_common/home.nix | 2 + {_ubuntu => hosts/blackbox-jr}/flake.lock | 12 ++--- {_ubuntu => hosts/blackbox-jr}/flake.nix | 8 ++- hosts/blackbox-jr/home-manager.nix | 1 + hosts/blackbox-jr/home.nix | 12 +++++ hosts/ts-tl-mbp/flake.nix | 26 +++++++++ hosts/ts-tl-mbp/home-manager.nix | 1 + hosts/ts-tl-mbp/home.nix | 12 +++++ hosts/x1carbon-ubuntu/default.nix | 4 ++ hosts/x1carbon-ubuntu/flake.lock | 64 +++++++++++++++++++++++ hosts/x1carbon-ubuntu/flake.nix | 36 +++++++++++++ hosts/x1carbon-ubuntu/home-manager.nix | 15 ++++++ hosts/x1carbon-ubuntu/home.nix | 12 +++++ rebuild-ubuntu.sh | 5 +- 17 files changed, 200 insertions(+), 39 deletions(-) delete mode 100644 home/bin/packages/homebrew-casks.txt delete mode 100644 home/bin/packages/homebrew.txt delete mode 100644 home/bin/packages/pip.txt rename {_ubuntu => hosts/blackbox-jr}/flake.lock (78%) rename {_ubuntu => hosts/blackbox-jr}/flake.nix (89%) create mode 100644 hosts/blackbox-jr/home.nix create mode 100644 hosts/ts-tl-mbp/flake.nix create mode 100644 hosts/ts-tl-mbp/home.nix create mode 100644 hosts/x1carbon-ubuntu/default.nix create mode 100644 hosts/x1carbon-ubuntu/flake.lock create mode 100644 hosts/x1carbon-ubuntu/flake.nix create mode 100644 hosts/x1carbon-ubuntu/home-manager.nix create mode 100644 hosts/x1carbon-ubuntu/home.nix diff --git a/home/bin/packages/homebrew-casks.txt b/home/bin/packages/homebrew-casks.txt deleted file mode 100644 index 0618a3e..0000000 --- a/home/bin/packages/homebrew-casks.txt +++ /dev/null @@ -1,3 +0,0 @@ -macvim -vagrant -virtualbox diff --git a/home/bin/packages/homebrew.txt b/home/bin/packages/homebrew.txt deleted file mode 100644 index fa2c3d7..0000000 --- a/home/bin/packages/homebrew.txt +++ /dev/null @@ -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 diff --git a/home/bin/packages/pip.txt b/home/bin/packages/pip.txt deleted file mode 100644 index 63e57ef..0000000 --- a/home/bin/packages/pip.txt +++ /dev/null @@ -1,3 +0,0 @@ -virtualenv -virtualenv-clone -virtualenvwrapper diff --git a/hosts/_common/home.nix b/hosts/_common/home.nix index 3dacabe..9a232b1 100644 --- a/hosts/_common/home.nix +++ b/hosts/_common/home.nix @@ -6,6 +6,7 @@ EDITOR = "nvim"; }; home.packages = with pkgs; [ + # Terminals bat ctags exa @@ -15,6 +16,7 @@ tree-sitter silver-searcher wget + ]; home.file = { diff --git a/_ubuntu/flake.lock b/hosts/blackbox-jr/flake.lock similarity index 78% rename from _ubuntu/flake.lock rename to hosts/blackbox-jr/flake.lock index b27be90..7e2d60f 100644 --- a/_ubuntu/flake.lock +++ b/hosts/blackbox-jr/flake.lock @@ -8,11 +8,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1672349765, - "narHash": "sha256-Ul3lSGglgHXhgU3YNqsNeTlRH1pqxbR64h+2hM+HtnM=", + "lastModified": 1672688183, + "narHash": "sha256-3sNEWKTg3XXVDnvzVatdyetiUQWL+ibJ1YkvxSk3PuM=", "owner": "nix-community", "repo": "home-manager", - "rev": "dd99675ee81fef051809bc87d67eb07f5ba022e8", + "rev": "c1a830c8fabb13f95f51ecf48552f0a794d8718a", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1672350804, - "narHash": "sha256-jo6zkiCabUBn3ObuKXHGqqORUMH27gYDIFFfLq5P4wg=", + "lastModified": 1672525397, + "narHash": "sha256-WASDnyxHKWVrEe0dIzkpH+jzKlCKAk0husv0f/9pyxg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "677ed08a50931e38382dbef01cba08a8f7eac8f6", + "rev": "8ba56d7c0d7490680f2d51ba46a141eca7c46afa", "type": "github" }, "original": { diff --git a/_ubuntu/flake.nix b/hosts/blackbox-jr/flake.nix similarity index 89% rename from _ubuntu/flake.nix rename to hosts/blackbox-jr/flake.nix index 0613005..01e3aa3 100644 --- a/_ubuntu/flake.nix +++ b/hosts/blackbox-jr/flake.nix @@ -15,9 +15,10 @@ homeConfigurations = { "tyrel" = home-manager.lib.homeManagerConfiguration { inherit pkgs; + modules = [ - ../hosts/blackbox-jr/default.nix - ../hosts/blackbox-jr/home-manager.nix + ./default.nix + ./home-manager.nix { home = { homeDirectory = "/home/tyrel"; @@ -26,7 +27,10 @@ }; } ]; + + }; }; }; } + diff --git a/hosts/blackbox-jr/home-manager.nix b/hosts/blackbox-jr/home-manager.nix index 7970ceb..e0af78a 100644 --- a/hosts/blackbox-jr/home-manager.nix +++ b/hosts/blackbox-jr/home-manager.nix @@ -2,6 +2,7 @@ { # Common Imports imports = [ + ./home.nix ../_common/home.nix ../_common/programs.nix ../_common/xdg.nix diff --git a/hosts/blackbox-jr/home.nix b/hosts/blackbox-jr/home.nix new file mode 100644 index 0000000..a57c409 --- /dev/null +++ b/hosts/blackbox-jr/home.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + home.stateVersion = "22.05"; + home.sessionVariables = { + }; + home.packages = with pkgs; [ + ]; + + home.file = { + }; + +} diff --git a/hosts/ts-tl-mbp/flake.nix b/hosts/ts-tl-mbp/flake.nix new file mode 100644 index 0000000..603ac00 --- /dev/null +++ b/hosts/ts-tl-mbp/flake.nix @@ -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 + ]; + }; + }; + +} diff --git a/hosts/ts-tl-mbp/home-manager.nix b/hosts/ts-tl-mbp/home-manager.nix index 9a704e4..8066883 100644 --- a/hosts/ts-tl-mbp/home-manager.nix +++ b/hosts/ts-tl-mbp/home-manager.nix @@ -5,6 +5,7 @@ home-manager.users.tyrel = { pkgs, ... }: { # Common Imports imports = [ + ./home.nix ../_common/home.nix ../_common/programs.nix ../_common/xdg.nix diff --git a/hosts/ts-tl-mbp/home.nix b/hosts/ts-tl-mbp/home.nix new file mode 100644 index 0000000..a57c409 --- /dev/null +++ b/hosts/ts-tl-mbp/home.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + home.stateVersion = "22.05"; + home.sessionVariables = { + }; + home.packages = with pkgs; [ + ]; + + home.file = { + }; + +} diff --git a/hosts/x1carbon-ubuntu/default.nix b/hosts/x1carbon-ubuntu/default.nix new file mode 100644 index 0000000..8c55841 --- /dev/null +++ b/hosts/x1carbon-ubuntu/default.nix @@ -0,0 +1,4 @@ +{ pkgs, config, lib, ... }: +{ + programs.zsh.enable = true; +} diff --git a/hosts/x1carbon-ubuntu/flake.lock b/hosts/x1carbon-ubuntu/flake.lock new file mode 100644 index 0000000..7e2d60f --- /dev/null +++ b/hosts/x1carbon-ubuntu/flake.lock @@ -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 +} diff --git a/hosts/x1carbon-ubuntu/flake.nix b/hosts/x1carbon-ubuntu/flake.nix new file mode 100644 index 0000000..01e3aa3 --- /dev/null +++ b/hosts/x1carbon-ubuntu/flake.nix @@ -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"; + }; + } + ]; + + + }; + }; + }; +} + diff --git a/hosts/x1carbon-ubuntu/home-manager.nix b/hosts/x1carbon-ubuntu/home-manager.nix new file mode 100644 index 0000000..e0af78a --- /dev/null +++ b/hosts/x1carbon-ubuntu/home-manager.nix @@ -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"; + }; + + +} diff --git a/hosts/x1carbon-ubuntu/home.nix b/hosts/x1carbon-ubuntu/home.nix new file mode 100644 index 0000000..a57c409 --- /dev/null +++ b/hosts/x1carbon-ubuntu/home.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + home.stateVersion = "22.05"; + home.sessionVariables = { + }; + home.packages = with pkgs; [ + ]; + + home.file = { + }; + +} diff --git a/rebuild-ubuntu.sh b/rebuild-ubuntu.sh index 7fd9899..e7672bd 100755 --- a/rebuild-ubuntu.sh +++ b/rebuild-ubuntu.sh @@ -1,6 +1,7 @@ #!/bin/bash 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 -home-manager switch --flake ./_ubuntu +nix run ./hosts/$hostname switch -vv +home-manager switch --flake ./hosts/$hostname