Basic project template.

pull/3/head
Joshua Potter 2021-12-28 17:06:17 -05:00
parent 76a1646539
commit fff5d4183f
6 changed files with 93 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

19
.gitignore vendored Normal file
View File

@ -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

6
Cargo.toml Normal file
View File

@ -0,0 +1,6 @@
[package]
name = "homesync"
version = "0.1.0"
edition = "2021"
[dependencies]

43
flake.lock Normal file
View File

@ -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
}

21
flake.nix Normal file
View File

@ -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 ];
};
});
}

3
src/main.rs Normal file
View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}