Skip to content

Commit

Permalink
reject docker, embrace nix build
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Sep 19, 2024
1 parent 91fc68c commit 6eaaa32
Show file tree
Hide file tree
Showing 50 changed files with 163 additions and 62 deletions.
Empty file added .gitattribute
Empty file.
58 changes: 0 additions & 58 deletions .github/workflows/build.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# nohup
nohup.out
4 changes: 0 additions & 4 deletions Dockerfile

This file was deleted.

20 changes: 20 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ pkgs ? let
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
nixpkgs = fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
};
in
import nixpkgs { overlays = [ ]; }
, ...
}: pkgs.stdenv.mkDerivation rec {
pname = "gate";
version = "0.1.0";

src = ./src;

installPhase = ''
mkdir -p $out/www
ls -la ./
'';
}
78 changes: 78 additions & 0 deletions flake.lock

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

40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
description = "Kolyma's Homepage";

# inputs are other flakes you use within your own flake, dependencies
# for your flake, etc.
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";

# You can access packages and modules from different nixpkgs revs
# at the same time. Here's an working example:
# nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Also see the 'unstable-packages' overlay at 'overlays/home.nix'.

# Flake utils for eachSystem
flake-utils.url = "github:numtide/flake-utils";
};

outputs =
{ nixpkgs
, flake-utils
, ...
}: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
# Nixpkgs packages for the current system
{
# Formatter for your nix files, available through 'nix fmt'
# Other options beside 'alejandra' include 'nixpkgs-fmt'
formatter = pkgs.nixpkgs-fmt;

# Development shells
devShells.default = import ./shell.nix { inherit pkgs; };

# Output packages
packages.default = pkgs.callPackage ./. { };
});

}
22 changes: 22 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ pkgs ? let
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
nixpkgs = fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
};
in
import nixpkgs { overlays = [ ]; }
, ...
}: pkgs.stdenv.mkDerivation {
name = "gate";

nativeBuildInputs = with pkgs; [
nix
nil
nixd
nixpkgs-fmt
git
];

NIX_CONFIG = "extra-experimental-features = nix-command flakes";
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6eaaa32

Please sign in to comment.