home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit bab0fcf1705ea5b9321ddc84371c423d211b5330
parent 51dace49d6353ea7b65fb4f6ae4ab24cf081eb27
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Wed,  1 Jul 2020 18:56:13 +0200

Revert "nix-darwin: experimenting with it…"

This reverts commit f6852d81ea2b1f70226c411deb267876af506499.

Diffstat:
Mdefault.nix | 20++++++--------------
Mhosts.nix | 7+++----
Mnix/default.nix | 1-
Mnix/sources.json | 12------------
Dsystems/honshu.nix | 10----------
5 files changed, 9 insertions(+), 41 deletions(-)

diff --git a/default.nix b/default.nix @@ -2,7 +2,6 @@ , lib ? sources.lib , pkgs ? sources.pkgs { } , pkgs-unstable ? sources.pkgs-unstable { } -, pkgs-darwin ? sources.nix-darwin , nixpkgs ? sources.nixpkgs { } }: with builtins; with lib; @@ -11,21 +10,20 @@ let mkNixOS: make a nixos system build with the given name and cfg. cfg is an attributeSet: - - arch is architecture (darwin is a special one) - - channel is the "channel" to use (nixos stable, nixos unstable, …) - - vm is whether it is a vm, or not + - arch is architecture + - type is weither we want to use nixos (stable) or nixos-unstable Example: hokkaido = { arch = "x86_64-linux"; }; - naruhodo = { arch = "x86_64-linux"; channel = "unstable"; }; + honshu = { arch = "x86_64-linux"; type = "unstable"; }; */ mkNixOS = name: cfg: let configuration = ./systems + "/${name}.nix"; system = cfg.arch; - # If channel == unstable, use nixos-unstable (pkgs-unstable) otherwise use nixos (pkgs) + # If type == unstable, use nixos-unstable (pkgs-unstable) otherwise use nixos (pkgs) p = - if cfg ? channel && cfg.channel == "unstable" + if cfg ? type && cfg.type == "unstable" then pkgs-unstable else pkgs; # If vm == true, build a VM, otherwise build the system @@ -33,15 +31,9 @@ let main = if cfg ? vm && cfg.vm then nixos.vm - else - if system == "x86_64-darwin" - then (import (pkgs.darwin.path) { inherit nixpkgs configuration; }).system - else nixos.config.system.build; + else nixos.config.system.build; in main; - /* - mkSystem: make a system build with the given name and cfg. - */ mkSystem = name: cfg: if cfg ? vm && cfg.vm then (mkNixOS name cfg) diff --git a/hosts.nix b/hosts.nix @@ -1,11 +1,10 @@ { - hokkaido = { arch = "x86_64-linux"; channel = "unstable"; }; - wakasu = { arch = "x86_64-linux"; channel = "unstable"; }; + hokkaido = { arch = "x86_64-linux"; type = "unstable"; }; + wakasu = { arch = "x86_64-linux"; type = "unstable"; }; kerkouane = { arch = "x86_64-linux"; }; okinawa = { arch = "x86_64-linux"; }; sakhalin = { arch = "x86_64-linux"; }; - honshu = { arch = "x86_64-darwin"; channel = "unstable"; }; # Test VM - foo = { arch = "x86_64-linux"; channel = "unstable"; vm = true; }; + foo = { arch = "x86_64-linux"; type = "unstable"; vm = true; }; # mypi = { arch = "aarch64-linux" }; } diff --git a/nix/default.nix b/nix/default.nix @@ -12,5 +12,4 @@ rec { gitignore = import sources.gitignore; nixos-hardware = import sources.nixos-hardware; nur = import sources.NUR; - nix-darwin = import sources.nix-darwin; } diff --git a/nix/sources.json b/nix/sources.json @@ -59,18 +59,6 @@ "url": "https://github.com/nmattia/niv/archive/f73bf8d584148677b01859677a63191c31911eae.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, - "nix-darwin": { - "branch": "master", - "description": "nix modules for darwin", - "homepage": "", - "owner": "LnL7", - "repo": "nix-darwin", - "rev": "47fe6db9c9cd22c4ba57df3281f98f454880bea7", - "sha256": "198lxy1q7z6cmlyxd0rigrabjab4i49w2dk3xqm3bs4y0s0qimwy", - "type": "tarball", - "url": "https://github.com/LnL7/nix-darwin/archive/47fe6db9c9cd22c4ba57df3281f98f454880bea7.tar.gz", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" - }, "nixos": { "branch": "nixos-20.03", "description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to", diff --git a/systems/honshu.nix b/systems/honshu.nix @@ -1,10 +0,0 @@ -{ config, pkgs, ... }: - -{ - environment.systemPackages = with pkgs; [ - htop - vim - ]; - - programs.zsh.enable = true; -}