Skip to content

Commit

Permalink
Merge pull request #5 from pub-solar/nix-dev
Browse files Browse the repository at this point in the history
dev: add flake and editorconfig
  • Loading branch information
teutat3s authored Aug 17, 2024
2 parents 1ad90b5 + 7e16e33 commit 01793d6
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 2

# Ignore diffs/patches
[*.{diff,patch}]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_size = unset
charset = unset
indent_style = unset
indent_size = unset

[{.*,secrets}/**]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset
indent_style = unset
indent_size = unset

[*.rom]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset
indent_style = unset
indent_size = unset

[*.py]
indent_size = 4

[*.md]
max_line_length = off
trim_trailing_whitespace = false

# Ignore diffs/patches
[*.{diff,patch}]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_size = unset
charset = unset
indent_style = unset
indent_size = unset

[{.*,secrets}/**]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset
indent_style = unset
indent_size = unset

[*.rom]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset
indent_style = unset
indent_size = unset

[*.py]
indent_size = 4

[*.md]
max_line_length = off
trim_trailing_whitespace = false
63 changes: 63 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
description = "Watson devenv";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

inputs.devshell.url = "github:numtide/devshell";
inputs.devshell.inputs.nixpkgs.follows = "nixpkgs";

outputs = {self, nixpkgs, systems, devshell }:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
# Nixpkgs instantiated for system types in nix-systems
nixpkgsFor = eachSystem (system:
import nixpkgs {
inherit system;
overlays = [
devshell.overlays.default
];
}
);
in
{
devShells = eachSystem (system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.devshell.mkShell {
# Add additional packages you'd like to be available in your devshell
# PATH here
devshell.packages = with pkgs; [
gnumake
virtualenv
];
};
});

packages = eachSystem (system:
let
pkgs = nixpkgsFor.${system};
in
{
});
};
}

0 comments on commit 01793d6

Please sign in to comment.