diff --git a/_ubuntu/flake.lock b/_ubuntu/flake.lock new file mode 100644 index 0000000..f59a4fc --- /dev/null +++ b/_ubuntu/flake.lock @@ -0,0 +1,85 @@ +{ + "nodes": { + "darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1598257228, + "narHash": "sha256-HyaM+tAZfpwhYgvQduCqrooLIHWoRi4VqbGvDnuwZSY=", + "owner": "lnl7", + "repo": "nix", + "rev": "2530cc68272b176841f8cf2ec0da1c88a13d9137", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1672349765, + "narHash": "sha256-Ul3lSGglgHXhgU3YNqsNeTlRH1pqxbR64h+2hM+HtnM=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "dd99675ee81fef051809bc87d67eb07f5ba022e8", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1672350804, + "narHash": "sha256-jo6zkiCabUBn3ObuKXHGqqORUMH27gYDIFFfLq5P4wg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "677ed08a50931e38382dbef01cba08a8f7eac8f6", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "darwin": "darwin", + "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/_ubuntu/flake.nix b/_ubuntu/flake.nix index 58af5f9..192c4b1 100644 --- a/_ubuntu/flake.nix +++ b/_ubuntu/flake.nix @@ -2,14 +2,14 @@ description = "Tyrel Nix"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-22.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; darwin.url = "github:lnl7/nix"; darwin.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, home-manager, darwin }: { - defaultPackage.x86_64 = home-manager.defaultPackage.x86_64; + defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux; homeConfigurations = { "tyrel" = home-manager.lib.homeManagerConfiguration { @@ -17,7 +17,8 @@ homeDirectory = "/home/tyrel"; username = "tyrel"; configuration.imports = [ - ../hosts/ts-tl-mbp/home-manager.nix + ../hosts/blackbox-jr/default.nix + ../hosts/blackbox-jr/home-manager.nix ]; }; }; diff --git a/hosts/_common/home-manager.nix b/hosts/_common/home-manager.nix new file mode 100644 index 0000000..764b434 --- /dev/null +++ b/hosts/_common/home-manager.nix @@ -0,0 +1,85 @@ +{ pkgs, ... }: +{ + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.tyrel = { pkgs, ... }: { + programs.home-manager.enable = true; + home.stateVersion = "22.05"; + home.sessionVariables = { + PAGER = "less -R"; + EDITOR = "nvim"; + XDG_CONFIG_HOME = "/Users/tyrel/.config"; + }; + + home.packages = with pkgs; [ + bat + ctags + exa + fzf + ripgrep + wget + ]; + + programs.tmux = { + enable = true; + }; + home.file = { + ".tmux.conf" = { + source = ../../home/tmux.conf; + recursive = true; + }; + }; + + programs.git = { + enable = true; + includes = [ + { path = "~/code/tyrel.dev/dotfiles/home/gitconfig"; } + ]; + aliases = { + ap = "add -p"; + }; + extraConfig = { + pull.ff = "only"; + }; + }; + + programs.neovim = { + enable = true; + }; + programs.fish = { + enable = true; + }; + + + + programs.htop = { + enable = true; + }; + #xdg.configFile = { + # "htop" = { + # source = ../../home/config/htop; + # recursive = true; + # }; + #}; + + + + # XDG CONFIGS + xdg.configFile = { + "nvim" = { + source = ../../home/config/nvim; + recursive = true; + }; + "fish" = { + source = ../../home/config/fish; + recursive = true; + }; + "karabiner" = { + source = ../../home/config/karabiner; + recursive = true; + }; + }; + + }; # -- HomeManager + +} diff --git a/hosts/blackbox-jr/default.nix b/hosts/blackbox-jr/default.nix new file mode 100644 index 0000000..ac03ce6 --- /dev/null +++ b/hosts/blackbox-jr/default.nix @@ -0,0 +1,5 @@ +{ pkgs, config, lib, ... }: +{ + services.nix-daemon.enable = true; + programs.zsh.enable = true; +} diff --git a/rebuild-ubuntu.sh b/rebuild-ubuntu.sh index 7046719..377ae25 100755 --- a/rebuild-ubuntu.sh +++ b/rebuild-ubuntu.sh @@ -1,4 +1,4 @@ #!/bin/bash git add . # YOLO -nix-build ./_ubuntu +nix build ./_ubuntu --extra-experimental-features "nix-command flakes"