1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 16:27:03 +00:00

Merge pull request #536 from DeterminateSystems/runcommand

Fix nix-darwin with recent nixpkgs
This commit is contained in:
Domen Kožar 2022-09-26 00:06:28 +02:00 committed by GitHub
commit 95ba7e548d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 26 deletions

View file

@ -10,7 +10,7 @@
outputs = { self, darwin, nixpkgs }: outputs = { self, darwin, nixpkgs }:
let let
configuration = { pkgs, ... }: { configuration = { pkgs, ... }: {
nix.package = pkgs.nixFlakes; nix.package = pkgs.nixVersions.stable;
# FIXME: for github actions, this shouldn't be in the example. # FIXME: for github actions, this shouldn't be in the example.
services.nix-daemon.enable = true; services.nix-daemon.enable = true;

View file

@ -34,7 +34,8 @@
system.keyboard.remapCapsLockToControl = true; system.keyboard.remapCapsLockToControl = true;
environment.systemPackages = environment.systemPackages =
[ config.programs.vim.package [
config.programs.vim.package
pkgs.awscli pkgs.awscli
pkgs.brotli pkgs.brotli
@ -144,13 +145,18 @@
# programs.vim.enable = true; # programs.vim.enable = true;
# programs.vim.enableSensible = true; # programs.vim.enableSensible = true;
programs.vim.package = pkgs.neovim.override { programs.vim.package = pkgs.neovim.override {
configure = { configure = {
packages.darwin.start = with pkgs.vimPlugins; [ packages.darwin.start = with pkgs.vimPlugins; [
vim-sensible vim-surround ReplaceWithRegister vim-sensible
polyglot fzfWrapper ale deoplete-nvim vim-surround
]; ReplaceWithRegister
polyglot
fzfWrapper
ale
deoplete-nvim
];
customRC = '' customRC = ''
set completeopt=menuone set completeopt=menuone
set encoding=utf-8 set encoding=utf-8
set hlsearch set hlsearch
@ -302,7 +308,7 @@
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (self: super: {
darwin-zsh-completions = super.runCommandNoCC "darwin-zsh-completions-0.0.0" darwin-zsh-completions = super.runCommand "darwin-zsh-completions-0.0.0"
{ preferLocalBuild = true; } { preferLocalBuild = true; }
'' ''
mkdir -p $out/share/zsh/site-functions mkdir -p $out/share/zsh/site-functions

View file

@ -24,7 +24,7 @@ in
fonts.fonts = mkOption { fonts.fonts = mkOption {
type = types.listOf types.path; type = types.listOf types.path;
default = []; default = [ ];
example = literalExpression "[ pkgs.dejavu_fonts ]"; example = literalExpression "[ pkgs.dejavu_fonts ]";
description = "List of fonts to install."; description = "List of fonts to install.";
}; };
@ -32,7 +32,7 @@ in
config = { config = {
system.build.fonts = pkgs.runCommandNoCC "fonts" system.build.fonts = pkgs.runCommand "fonts"
{ paths = cfg.fonts; preferLocalBuild = true; } { paths = cfg.fonts; preferLocalBuild = true; }
'' ''
mkdir -p $out/Library/Fonts mkdir -p $out/Library/Fonts

View file

@ -12,7 +12,7 @@ let
profile = mkOption { profile = mkOption {
type = types.lines; type = types.lines;
internal = true; internal = true;
apply = text: pkgs.runCommandNoCC "sandbox.sb" {} '' apply = text: pkgs.runCommand "sandbox.sb" { } ''
for f in $(< ${config.closure}/store-paths); do for f in $(< ${config.closure}/store-paths); do
storePaths+="(subpath \"$f\")" storePaths+="(subpath \"$f\")"
done done
@ -25,20 +25,20 @@ let
closure = mkOption { closure = mkOption {
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [ ];
apply = paths: pkgs.closureInfo { rootPaths = paths; }; apply = paths: pkgs.closureInfo { rootPaths = paths; };
description = "List of store paths to make accessible."; description = "List of store paths to make accessible.";
}; };
readablePaths = mkOption { readablePaths = mkOption {
type = types.listOf types.path; type = types.listOf types.path;
default = []; default = [ ];
description = "List of paths that should be read-only inside the sandbox."; description = "List of paths that should be read-only inside the sandbox.";
}; };
writablePaths = mkOption { writablePaths = mkOption {
type = types.listOf types.path; type = types.listOf types.path;
default = []; default = [ ];
description = "List of paths that should be read/write inside the sandbox."; description = "List of paths that should be read/write inside the sandbox.";
}; };
@ -132,11 +132,10 @@ in
options = { options = {
security.sandbox.profiles = mkOption { security.sandbox.profiles = mkOption {
type = types.attrsOf (types.submodule profile); type = types.attrsOf (types.submodule profile);
default = {}; default = { };
description = "Definition of sandbox profiles."; description = "Definition of sandbox profiles.";
}; };
}; };
config = { config = { };
};
} }

View file

@ -21,7 +21,7 @@ in
environment.etc = mkOption { environment.etc = mkOption {
type = types.attrsOf (types.submodule text); type = types.attrsOf (types.submodule text);
default = {}; default = { };
description = '' description = ''
Set of files that have to be linked in <filename>/etc</filename>. Set of files that have to be linked in <filename>/etc</filename>.
''; '';
@ -31,7 +31,7 @@ in
config = { config = {
system.build.etc = pkgs.runCommandNoCC "etc" system.build.etc = pkgs.runCommand "etc"
{ preferLocalBuild = true; } { preferLocalBuild = true; }
'' ''
mkdir -p $out/etc mkdir -p $out/etc

View file

@ -58,7 +58,7 @@ in
environment.launchAgents = mkOption { environment.launchAgents = mkOption {
type = types.attrsOf (types.submodule text); type = types.attrsOf (types.submodule text);
default = {}; default = { };
description = '' description = ''
Set of files that have to be linked in <filename>/Library/LaunchAgents</filename>. Set of files that have to be linked in <filename>/Library/LaunchAgents</filename>.
''; '';
@ -66,7 +66,7 @@ in
environment.launchDaemons = mkOption { environment.launchDaemons = mkOption {
type = types.attrsOf (types.submodule text); type = types.attrsOf (types.submodule text);
default = {}; default = { };
description = '' description = ''
Set of files that have to be linked in <filename>/Library/LaunchDaemons</filename>. Set of files that have to be linked in <filename>/Library/LaunchDaemons</filename>.
''; '';
@ -74,7 +74,7 @@ in
environment.userLaunchAgents = mkOption { environment.userLaunchAgents = mkOption {
type = types.attrsOf (types.submodule text); type = types.attrsOf (types.submodule text);
default = {}; default = { };
description = '' description = ''
Set of files that have to be linked in <filename>~/Library/LaunchAgents</filename>. Set of files that have to be linked in <filename>~/Library/LaunchAgents</filename>.
''; '';
@ -84,7 +84,7 @@ in
config = { config = {
system.build.launchd = pkgs.runCommandNoCC "launchd" system.build.launchd = pkgs.runCommand "launchd"
{ preferLocalBuild = true; } { preferLocalBuild = true; }
'' ''
mkdir -p $out/Library/LaunchAgents $out/Library/LaunchDaemons $out/user/Library/LaunchAgents mkdir -p $out/Library/LaunchAgents $out/Library/LaunchDaemons $out/user/Library/LaunchAgents

View file

@ -11,7 +11,7 @@ in
system.patches = mkOption { system.patches = mkOption {
type = types.listOf types.path; type = types.listOf types.path;
default = []; default = [ ];
example = literalExpression '' example = literalExpression ''
[ [
(pkgs.writeText "bashrc.patch" '''' (pkgs.writeText "bashrc.patch" ''''
@ -42,7 +42,7 @@ in
config = { config = {
system.build.patches = pkgs.runCommandNoCC "patches" system.build.patches = pkgs.runCommand "patches"
{ preferLocalBuild = true; } { preferLocalBuild = true; }
'' ''
mkdir -p $out/patches mkdir -p $out/patches