diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..deddd4f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# secretfile filter=git-crypt diff=git-crypt +# *.key filter=git-crypt diff=git-crypt +secrets/** filter=git-crypt diff=git-crypt diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f590877 --- /dev/null +++ b/flake.nix @@ -0,0 +1,63 @@ +{ + description = "tacocat's nix configuration"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + helix = { + url = "github:helix-editor/helix/master"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + # pass in the urls defined above + # the @ syntax stores the arguments in the inputs variable + outputs = inputs @ { + self, + nixpkgs, + home-manager, + }: let + system = "x86_64-linux"; + pkgs = inputs.nixpkgs.legacyPackages.${system}; + in { + # nixosConfigurations: define options for different systems + # desktop + nixosConfigurations."BICEP" = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + ./hosts/BICEP/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.users."tacocat" = ./users/tacocat/home.nix; + } + ]; + }; + + # laptop + nixosConfigurations."JWST" = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + ./hosts/JWST/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.users."tacocat" = ./users/tacocat/home.nix; + } + ]; + }; + + #homeConfigurations: define options for different users + homeConfigurations."tacocat" = inputs.home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ + ]; + }; + + #outputs home-manager activation package for use on non-NixOS, i think? + packages.${system}."tacocat" = self.homeConfigurations."tacocat".activationPackage; + }; +} diff --git a/secrets/secret.txt b/secrets/secret.txt new file mode 100644 index 0000000..7e53232 Binary files /dev/null and b/secrets/secret.txt differ diff --git a/users/tacocat/home.nix b/users/tacocat/home.nix new file mode 100644 index 0000000..369948d --- /dev/null +++ b/users/tacocat/home.nix @@ -0,0 +1,64 @@ +{pkgs, ...}: { + home = { + username = "tacocat"; + homeDirectory = "/home/tacocat"; + stateVersion = "23.11"; + sessionVariables = { + EDITOR = "hx"; + BAT_THEME = "ansi"; + DOTNET_ROOT = "$HOME/.dotnet"; + }; + sessionPath = [ + "$HOME/.local/bin" + "$HOME/.dotnet" + ]; + shellAliases = { + ls = "eza"; + la = "eza -la"; + l = "eza -l"; + cat = "bat"; + please = "sudo !!"; + gaa = "git add ."; + gcm = "git commit -m"; + gpom = "git push -u origin main"; + }; + packages = with pkgs; [ + wineWowPackages.unstable + eza + bat + comic-mono + maple-mono + pandoc + jdk20 + pdftk + ]; + }; + + fonts.fontconfig.enable = true; + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + # ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + # home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + # }; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +}