Integrate Nix

This commit is contained in:
Jacob Hrbek 2024-02-10 16:45:38 +00:00
parent 8344b693ef
commit 123b6bee5f
Signed by untrusted user who does not match committer: kreyren
GPG Key ID: 667F0DAFAF09BA2B
10 changed files with 62 additions and 1 deletions

6
.envrc Normal file

@ -0,0 +1,6 @@
#!/usr/bin/env sh
# shellcheck shell=sh # POSIX
# This file is used to provide directory-oriented environment variables and integrations
use flake

2
.gitignore vendored

@ -1,3 +1,5 @@
*.fcstd1 *.fcstd1
*.FCStd1 *.FCStd1
*.stl *.stl
*.FCBak
.direnv/

@ -1,3 +1,3 @@
Krey's fork of base48's large CNC Krey's fork of base48's large CNC
![cnc](cnc.png "cnc desk") ![cnc](./img/introduction.png "View of the CNC model")

Binary file not shown.

BIN
cnc.FCStd

Binary file not shown.

53
flake.nix Normal file

@ -0,0 +1,53 @@
{
description = "Kreyren's Infrastructure Management With NiXium";
inputs = {
# Release inputs
nixpkgs-legacy.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
# # nixpkgs.url = "git+file:///home/raptor/src/nixpkgs";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
nixpkgs-staging.url = "github:nixos/nixpkgs/staging";
};
outputs = inputs @ { self, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.flake-root.flakeModule
inputs.mission-control.flakeModule
];
systems = [ "x86_64-linux" "aarch64-linux" "riscv64-linux" ];
perSystem = { system, config, ... }: {
# FIXME-QA(Krey): Move this to a separate file somehow?
# FIXME-QA(Krey): Figure out how to shorten the `inputs.nixpkgs-unstable.legacyPackages.${system}` ?
## _module.args.nixpkgs = inputs.nixpkgs-unstable.legacyPackages.${system};
## _module.args.nixpkgs = import inputs.nixpkgs { inherit system; };
mission-control.scripts = {
freecad = {
description = "FreeCAD (fully integrated)";
category = "Integrated Editors";
exec = "${inputs.nixpkgs.legacyPackages.${system}.freecad}/bin/freecad ./default.FCStd";
};
};
devShells.default = inputs.nixpkgs.legacyPackages.${system}.mkShell {
name = "NiXium-devshell";
nativeBuildInputs = [
inputs.nixpkgs.legacyPackages.${system}.bashInteractive # For terminal
inputs.nixpkgs.legacyPackages.${system}.nil # Needed for linting
inputs.nixpkgs.legacyPackages.${system}.nixpkgs-fmt # Nixpkgs formatter
inputs.nixpkgs.legacyPackages.${system}.git # Working with the codebase
inputs.nixpkgs.legacyPackages.${system}.fira-code # For liquratures in code editors
];
inputsFrom = [ config.mission-control.devShell ];
# Environmental Variables
#RULES = "./secrets/secrets.nix"; # For ragenix to know where secrets are
};
formatter = inputs.nixpkgs.nixpkgs-fmt;
};
};
}

Before

Width:  |  Height:  |  Size: 237 KiB

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.