diff --git a/home/ssh/tyrel-micropc.pub b/home/ssh/tyrel-micropc.pub new file mode 100644 index 0000000..8d43686 --- /dev/null +++ b/home/ssh/tyrel-micropc.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMaa6hZpIi7B6hsyA7EDBZjkGe0y4+EQD1kvVRickbka tyrel@tyrel-MicroPC diff --git a/hosts/tyrel-MicroPC/default.nix b/hosts/tyrel-MicroPC/default.nix new file mode 100644 index 0000000..8c55841 --- /dev/null +++ b/hosts/tyrel-MicroPC/default.nix @@ -0,0 +1,4 @@ +{ pkgs, config, lib, ... }: +{ + programs.zsh.enable = true; +} diff --git a/hosts/tyrel-MicroPC/flake.lock b/hosts/tyrel-MicroPC/flake.lock new file mode 100644 index 0000000..7e2d60f --- /dev/null +++ b/hosts/tyrel-MicroPC/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/tyrel-MicroPC/flake.nix b/hosts/tyrel-MicroPC/flake.nix new file mode 100644 index 0000000..01e3aa3 --- /dev/null +++ b/hosts/tyrel-MicroPC/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/tyrel-MicroPC/home-manager.nix b/hosts/tyrel-MicroPC/home-manager.nix new file mode 100644 index 0000000..e0af78a --- /dev/null +++ b/hosts/tyrel-MicroPC/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/tyrel-MicroPC/home.nix b/hosts/tyrel-MicroPC/home.nix new file mode 100644 index 0000000..a57c409 --- /dev/null +++ b/hosts/tyrel-MicroPC/home.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + home.stateVersion = "22.05"; + home.sessionVariables = { + }; + home.packages = with pkgs; [ + ]; + + home.file = { + }; + +} diff --git a/justfile b/justfile index 35b6393..e580f1f 100644 --- a/justfile +++ b/justfile @@ -3,6 +3,16 @@ # Naive check if /Users or /home for home. OS := if "${HOME}" =~ '/U.*' { "macos" } else { "ubuntu" } HOSTNAME := `hostname| sed 's/.local//'` +NIXPATH := "nixpkgs=/nix/var/nix/profiles/per-user/tyrel/channels/nixpkgs:/nix/var/nix/profiles/per-user/tyrel/channels" + +setup: + just setup-{{OS}} + +setup-ubuntu: + NIX_PATH={{NIXPATH}} nix-channel --add https://nixos.org/channels/nixos-22.11 nixos + NIX_PATH={{NIXPATH}} nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager + NIX_PATH={{NIXPATH}} nix-channel --update + NIX_PATH={{NIXPATH}} nix-shell '' -A install git-add: git add . @@ -30,5 +40,5 @@ rebuild-macos: ./result/sw/bin/darwin-rebuild switch --flake ./hosts/{{HOSTNAME}} rebuild-ubuntu: - NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/tyrel/channels/nixpkgs:/nix/var/nix/profiles/per-user/tyrel/channels nix run ./hosts/{{HOSTNAME}} switch -vv - NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/tyrel/channels/nixpkgs:/nix/var/nix/profiles/per-user/tyrel/channels home-manager switch --flake ./hosts/{{HOSTNAME}} + NIX_PATH={{NIXPATH}} nix run ./hosts/{{HOSTNAME}} switch -vv + NIX_PATH={{NIXPATH}} home-manager switch --flake ./hosts/{{HOSTNAME}}