mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-09-11 12:49:18 +03:00
templates.flake: add contents of simple.nix
This commit is contained in:
parent
fc955520dd
commit
f532e43f7e
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -159,7 +159,7 @@ jobs:
|
||||
|
||||
pushd /tmp/test-nix-darwin-submodules
|
||||
/usr/bin/sed -i.bak \
|
||||
'\#modules = \[#s#darwin.darwinModules.simple#./simple.nix#' \
|
||||
'\#modules = \[#s#configuration#configuration ./simple.nix#' \
|
||||
./flake.nix
|
||||
/usr/bin/sed -i.bak \
|
||||
's#pkgs.vim#pkgs."${import ./submodule-test/hello.nix}"#' \
|
||||
@ -241,7 +241,7 @@ jobs:
|
||||
|
||||
pushd /tmp/test-nix-darwin-submodules
|
||||
/usr/bin/sed -i.bak \
|
||||
'\#modules = \[#s#darwin.darwinModules.simple#./simple.nix#' \
|
||||
'\#modules = \[#s#configuration#configuration ./simple.nix#' \
|
||||
./flake.nix
|
||||
/usr/bin/sed -i.bak \
|
||||
's#pkgs.vim#pkgs."${import ./submodule-test/hello.nix}"#' \
|
||||
|
@ -10,18 +10,33 @@
|
||||
outputs = { self, darwin, nixpkgs }:
|
||||
let
|
||||
configuration = { pkgs, ... }: {
|
||||
nix.package = pkgs.nixVersions.stable;
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages =
|
||||
[ pkgs.vim
|
||||
];
|
||||
|
||||
# FIXME: for github actions, this shouldn't be in the example.
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
# nix.package = pkgs.nix;
|
||||
|
||||
# Necessary for using flakes on this system.
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
# programs.fish.enable = true;
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 4;
|
||||
};
|
||||
in
|
||||
{
|
||||
# Build darwin flake using:
|
||||
# $ darwin-rebuild build --flake ./modules/examples#simple \
|
||||
# --override-input darwin .
|
||||
# $ darwin-rebuild build --flake .#simple
|
||||
darwinConfigurations."simple" = darwin.lib.darwinSystem {
|
||||
modules = [ configuration darwin.darwinModules.simple ];
|
||||
modules = [ configuration ];
|
||||
system = "x86_64-darwin";
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user