diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a6e5da --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +# direnv +*.sw? +.direnv +.gopath +/direnv +/direnv.test +/dist +/test/config +/test/data +/test/scenarios/inherited/.envrc + +# Rust +**/*.rs.bk +*.pdb +debug/ +target/ +# Creating an executable. Leave the lock here: +# https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..13c8503 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "homesync" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..9375a7d --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1640572776, + "narHash": "sha256-pWMTubBy1Ep31iuQ5lEKW2mjSHWEvcbvy9uHVch2764=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d887ac7aee92e8fc54dde9060d60d927afae9d69", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-21.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..2b1e673 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + description = "Project for syncing various home-system configuration files."; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell = with pkgs; mkShell { + buildInputs = [ + cargo + rustc + ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + }; + }); +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}