nix flake
This commit is contained in:
parent
f95fe9d877
commit
a10c5ce08a
6 changed files with 42 additions and 2 deletions
4
etc/nix/nix.conf
Normal file
4
etc/nix/nix.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
build-users-group = nixbld
|
||||
|
||||
extra-platforms = aarch64-linux
|
||||
extra-experimental-features = nix-command flakes
|
25
flake.nix
Normal file
25
flake.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
flakePkg = ref: (builtins.getFlake ref).packages.${system}.default;
|
||||
in
|
||||
{
|
||||
# Local user nix env
|
||||
packages.mzte-nix = pkgs.symlinkJoin {
|
||||
name = "mzte-nix";
|
||||
paths = [
|
||||
pkgs.nixpkgs-fmt
|
||||
pkgs.nix-output-monitor
|
||||
pkgs.nix-du
|
||||
(flakePkg "github:oxalica/nil")
|
||||
(flakePkg "github:nix-community/zon2nix")
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
1
scripts/mzteinit/.gitignore
vendored
1
scripts/mzteinit/.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
zig-cache/
|
||||
zig-out/
|
||||
flake.lock
|
||||
|
|
|
@ -134,7 +134,7 @@ pub fn populateEnvironment(env: *std.process.EnvMap) !bool {
|
|||
var b = delimitedWriter(bufstream.writer(), ':');
|
||||
|
||||
for ([_][]const u8{
|
||||
".nix-profile/bin",
|
||||
".local/mzte-nix/bin",
|
||||
".mix/escripts",
|
||||
".cargo/bin",
|
||||
".local/bin",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"setup/common.rkt")
|
||||
|
||||
;; Valid verbs
|
||||
(define verbs '(install-scripts install-plugins install-lsps-paru setup-nvim-config confgen))
|
||||
(define verbs '(install-scripts install-plugins install-lsps-paru setup-nvim-config setup-nix confgen))
|
||||
|
||||
(define verb
|
||||
(command-line #:program "setup.rkt"
|
||||
|
@ -47,6 +47,9 @@
|
|||
['setup-nvim-config
|
||||
(local-require "setup/commands/setup-nvim-config.rkt")
|
||||
(run)]
|
||||
['setup-nix
|
||||
(local-require "setup/commands/setup-nix.rkt")
|
||||
(run)]
|
||||
['confgen
|
||||
(local-require "setup/commands/confgen.rkt")
|
||||
(run)])
|
||||
|
|
7
setup/commands/setup-nix.rkt
Normal file
7
setup/commands/setup-nix.rkt
Normal file
|
@ -0,0 +1,7 @@
|
|||
#lang racket
|
||||
(require "../common.rkt")
|
||||
(provide run)
|
||||
|
||||
(define (run)
|
||||
(define out (build-path (find-system-path 'home-dir) ".local" "mzte-nix"))
|
||||
(cmd "nix" "build" ".#mzte-nix" "--impure" "--no-write-lock-file" "--out-link" out))
|
Loading…
Reference in a new issue