美文网首页
成为极客-02: 纯命令行打造函数式操作系统-NixOS

成为极客-02: 纯命令行打造函数式操作系统-NixOS

作者: larluo_罗浩 | 来源:发表于2018-10-16 02:44 被阅读830次

自从用了nixos,浑身充满了技术力量,无处安放。。。

nixos是个非常不一样的系统,用些来很多地方不太一样。。。
网上资料都是英文,为了让大家用上更开心的系统,本人决定花点时间整理一遍出来。。。

本章的内容主要分为以下几个部分:

  1. 下载并刻录nixos iso至usb设备
    a. 下载ISO镜像
    b. 刻录ISO镜像
  2. 一口气安装好nixos
    a. 命令行磁盘分区
    b. 命令行连接无线网络
    c. 命令行配置安装
  3. 代理上网及中文输入
    a. 无线网连接
    b. socks5代理连接
    c. http/https代理连接
    d. 添加中文输入法
  4. 安装常用软件
    x. chrome浏览器
    x. thunderbird邮箱
    x. evince pdf浏览器
    x. libroffice办公软件
    x. ImageMagick截图工具
    x. electronic-wechat微信
  5. 搭建nixos开发环境
    x. git及emacs
    x. java & clojure开发环境
    x. haskell开发环境
    x. c开发环境
    x. go开发环境
    x. python开发环境
    x. js开发环境
    x. 大数据开发环境

比较简单,大家随意看看。。。

一. 下载并刻录nixos iso至usb设备

a. 下载ISO镜像

官网的下载地址:
https://nixos.org/nixos/download.html
当前版本下载链接为18.09:
https://d3g5gsiof5omrk.cloudfront.net/nixos/18.09/nixos-18.09.776.6a3f5bcb061/nixos-graphical-18.09.776.6a3f5bcb061-x86_64-linux.iso

下载工具的话很多种,aria2c, wget或者迅雷都可以,自行选择。

b. 刻录ISO镜像

三步曲: 查找-卸载-刻录(MacOS系统上完成刻录)

larrys-MBP:iso larluo$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            120.5 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            Macintosh HD           +120.1 GB   disk1
                                 Logical Volume on disk0s2
                                 D52143CD-14E0-482C-B76D-5B992F459857
                                 Unencrypted

/dev/disk2 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        +24.3 MB    disk2
   1:        Apple_partition_map                         32.3 KB    disk2s1
   2:                  Apple_HFS Flash Player            24.2 MB    disk2s2

/dev/disk3 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        +23.7 MB    disk3
   1:        Apple_partition_map                         32.3 KB    disk3s1
   2:                  Apple_HFS Flash Player            23.7 MB    disk3s2

/dev/disk5 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.0 TB     disk5
   1:                       0xEF                         16.8 MB    disk5s2

larrys-MBP:iso larluo$ diskutil unmountDisk /dev/disk5
Unmount of all volumes on disk5 was successful

larrys-MBP:iso larluo$ sudo dd bs=1m if=nixos-graphical-18.09.776.6a3f5bcb061-x86_64-linux.iso of=/dev/rdisk5
Password:
1095+0 records in
1095+0 records out
1148190720 bytes transferred in 10.249299 secs (112026268 bytes/sec)

二. 一口气安装好nixos

a. 命令行磁盘分区

创建并格式化三个分区:

  1. 启动分区(512M) [UEFI ESP分区]
  2. 主分区(512M~-8G) [PRIMARY分区]
  3. 交换分区(8G~100%) [PRIMARY分区]
    注: 忽略/etc/fstab更新信息
[root@nixos:~]# parted /dev/sda -- mklabel gpt
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No?Yes
Information: You may need to update /etc/fstab

[root@nixos:~]# parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB
Information: You may need to update /etc/fstab

[root@nixos:~]# parted /dev/sda -- mkpart primary 512MiB -8GiB
Information: You may need to update /etc/fstab

[root@nixos:~]# parted /dev/sda -- mkpart primary linux-swap -8Gib 100%
Information: You may need to update /etc/fstab

[root@nixos:~]# parted /dev/sda -- set 1 boot on
Information: You may need to update /etc/fstab

[root@nixos:~]# mkfs.fat -F 32 -n boot /dev/sda1
mkfs.fat 4.1 (2017-01-24)
mkfs.fat: warning - low case labels might not work properly with DOS or windows

[root@nixos:~]# mkfs.ext4 -L nixos /dev/sda2
mke2fs 1.44.4 (18-Aug-2018)
Discarding device blocks: done
Creating filesystem with 122798678 4k blocks and 30703616 inodes
filesystem UUID: 7fdcab0f-9013-4a3d-9b5f-ba2dc9eef562
Superblock backups stored on blocks:
    23768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
    10240000
Writing superblocks and filesystem accounting information: done

[root@nixos:~]# mkswap -L swap /dev/sda3
mishap: /dev/sda3: warning: wiping old fat signature.
Setting up swap space version 1, size = 8GiB (8589910016 bytes)
LABEL=swap, UUID=887c3424-377a-487a-a093-6c7db6d60e9

[root@nixos:~]# parted -l
Model: ATA SAMSUNG MZNLN512 (scsi)
Disk /dev/sda: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: got
Disk Flags:

Number Start  End   Size   File system     Name    Flags
1    1049kB   327MB 536MB  fat32           ESP     boot, esp
2    537MB    504GB 503GB  ext4            primary
3    504GB    512GB 8590MB linux-swap(v1)  primary

b. 命令行连接无线网络

[root@nixos:~]# nmcli device wifi rescan

[root@nixos:~]# nmcli device wifi list
SSID    MODE  CHAN RATE      SIGNAL  BARS SECURITY
hl03863 Infra 1    117Mbit/s 87      **** WPA2

[root@nixos:~]# nmcli device wifi connect hl03863 password @hl03863
Device 'wlp7sp' successfully activated with '9f34949f-38bb-4233-8465-158cefdb3d96'.

[root@nixos:~]# ping www.baidu.com
PING www.a.shifen.com (61.135.169.125) 56(84) bytes of data.
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=1 ttl=53 time=43.9 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=2 ttl=53 time=44.8 ms
^C
--- www.a.shifen.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2ms
rtt min/avg/max/mdev = 43.903/44.343/44.784/0.488 ms

c. 命令行配置安装

mount主要用于hardware-configuration.nix自动生成文件目录配置

[root@nixos:~]# mkdir -p /mnt/boot
[root@nixos:~]# mount /dev/disk/by-label/nixos /mnt
[root@nixos:~]# mount /dev/disk/by-label/boot /mnt/boot
[root@nixos:~]# nixos-generate-config --root /mnt
writing /mnt/etc/nixos/configuration.nix...
writing /mnt/etc/nixos/hardware-configuration.nix...

[root@nixos:~] cat /mnt/etc/nixos/hardware-configuration.nix | grep -E -v '^\s+#'
{ config, pkgs, ... } :

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];

  nixpkgs.config.allowUnsupportedSystem = true; 
  nixpkgs.config.allowBroken = true; 
  nixpkgs.config.allowUnfree = true;

  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "nixos-larluo"; # Define your hostname.
  networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.

  virtualisation.docker.enable = true ;

  i18n = {
    consoleFont = "Lat2-Terminus16";
    consoleKeyMap = "us";
    defaultLocale = "en_US.UTF-8";
    supportedLocales = [ "en_US.UTF-8/UTF-8"
                         "zh_CN.UTF-8/UTF-8"
                         "zh_CN/GB2312"
                         "zh_CN.GBK/GBK"
                         "zh_CN.GB18030/GB18030"
                         "zh_TW.UTF-8/UTF-8"
                         "zh_TW/BIG5" ];
  };
  i18n.inputMethod = {
    enabled = "fcitx" ;
    fcitx.engines = with pkgs.fcitx-engines; [ rime ] ;
  };

  time.timeZone = "Asia/Shanghai" ;

  environment.systemPackages = with pkgs; [
    wget vim
  ];



  services.openssh.enable = true;

  sound.enable = true;
  hardware.pulseaudio.enable = true;

  services.xserver.enable = true;
  services.xserver.layout = "us";
  services.xserver.xkbOptions = "eurosign:e";

  services.xserver.libinput.enable = true;

  services.xserver.displayManager.sddm.enable = true;
  services.xserver.desktopManager.plasma5.enable = true;

  services.privoxy.enable = true ;
  services.privoxy.listenAddress = "0.0.0.0:8118" ;
  services.privoxy.extraConfig = ''
    forward-socks5 / 0.0.0.0:1080 .
  '' ;

  users.extraUsers.larluo = {
    isNormalUser = true ;
    home = "/home/larluo" ;
    hashedPassword = "{LARLUO_PASSWD}" ;
    extraGroups = ["wheel" "networkmanager" "docker" ] ;
  };

  fonts = {
    fontconfig.enable = true;
    enableFontDir = true;
    enableGhostscriptFonts = true;
    fonts = with pkgs; [
      noto-fonts
      noto-fonts-cjk
      noto-fonts-emoji
      wqy_microhei
      wqy_zenhei
    ];
  };


  system.stateVersion = "18.09"; # Did you read the comment?


}



[root@nixos:~] sed -i -e "s|{LARLUO_PASSWD}|${mkpasswd -m sha-512 ******)|" /mnt/etc/nixos/configuration.nix

[root@nixos:~] nixos-install && reboot

大功告成,相当简单

三. 配置网络代理及中文输入法

a. 无线网连接

[larluo@nixos-larluo:~]$ wpa_passphrase 'hl03863' '@hl03863' | sudo tee -a  /etc/wpa_supplicant.conf
network={
        ssid="hl03863"
        #psk="@hl03863"
        psk=2bf4950c9cbffda0ad36655ebc9c3f5bfeb8d660ca644f889cb5aa68b5451f4c
}

[larluo@nixos-larluo:~]$ sudo systemctl restart wpa_supplicant

[larluo@nixos-larluo:~]$ ping www.baidu.com
PING www.a.shifen.com (61.135.169.125) 56(84) bytes of data.
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=1 ttl=53 time=43.9 ms
64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=2 ttl=53 time=44.8 ms
^C
--- www.a.shifen.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2ms
rtt min/avg/max/mdev = 43.903/44.343/44.784/0.488 ms

b. socks5代理连接
安装showsocks客户端以及proxychains

[larluo@nixos-larluo:~/my-env]$ nix-env -i shadowsocks-libev
installing 'shadowsocks-libev-3.2.0'
these paths will be fetched (0.96 MiB download, 5.03 MiB unpacked):
  /nix/store/1wbc6xkdc4259kpmf1dgjcy8ddifxbj1-mbedtls-2.12.0
  /nix/store/4yg7ybi2p5ryb65p258z8f1n5j6cd0l5-shadowsocks-libev-3.2.0
  /nix/store/5kl4kani4y3203pzvapsv3grnpaw0vr2-c-ares-1.14.0
  /nix/store/8dxq8vfyikvs21gxhgvnc19ivk8iwhm3-libev-4.24
copying path '/nix/store/5kl4kani4y3203pzvapsv3grnpaw0vr2-c-ares-1.14.0' from 'https://cache.nixos.org'...
copying path '/nix/store/8dxq8vfyikvs21gxhgvnc19ivk8iwhm3-libev-4.24' from 'https://cache.nixos.org'...
copying path '/nix/store/1wbc6xkdc4259kpmf1dgjcy8ddifxbj1-mbedtls-2.12.0' from 'https://cache.nixos.org'...
copying path '/nix/store/4yg7ybi2p5ryb65p258z8f1n5j6cd0l5-shadowsocks-libev-3.2.0' from 'https://cache.nixos.org'...
building '/nix/store/cw5fv5bxvm4ayd5jg6kvg9dgkp6yaq1z-user-environment.drv'...
created 488 symlinks in user environment

[larluo@nixos-larluo:~/my-env]$ ss-local -s hk2.wormholex.online -p 13173 -k **** -m aes-256-cfb  -b 0.0.0.0 -l 1080 -v
 2018-10-16 09:31:16 INFO: initializing ciphers... aes-256-cfb

[larluo@nixos-larluo:~/my-env]$ curl -L --socks5 127.0.0.1:1080 www.google.com
curl: (52) Empty reply from server

[larluo@nixos-larluo:~/my-env]$ nix-env -i proxychains
installing 'proxychains-4.2.0'
these paths will be fetched (0.01 MiB download, 0.05 MiB unpacked):
  /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0
copying path '/nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0' from 'https://cache.nixos.org'...
building '/nix/store/fnpjl7dzxpgcn1pvrip3z24rqdbbs6r8-user-environment.drv'...
created 492 symlinks in user environment

[larluo@nixos-larluo:~/my-env]$ mkdir -p ~/.proxychains

[larluo@nixos-larluo:~/my-env]$ cat ~/.proxychains/proxychains.conf 
strict_chain
proxy_dns 
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000
localnet 127.0.0.0/255.0.0.0
quiet_mode

[ProxyList]
socks5  127.0.0.1 1080

[larluo@nixos-larluo:~/my-env]$ proxychains4 curl www.google.com
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.com.hk/url?sa=p&amp;hl=zh-CN&amp;pref=hkredirect&amp;pval=yes&amp;q=http://www.google.com.hk/%3Fgws_rd%3Dcr&amp;ust=1539654127108066&amp;usg=AOvVaw2IC8Yg_R9CxjMH4Ob3T5de">here</A>.
</BODY></HTML>

c. http/https代理连接
添加privoxy后台服务转换socks5代理至http/https协议.

[larluo@nixos-larluo:~/my-env]$ cat /etc/nixos/configuration.nix
...
...
  services.privoxy.enable = true ;
  services.privoxy.listenAddress = "0.0.0.0:8118" ;
  services.privoxy.extraConfig = ''
    forward-socks5 / 0.0.0.0:1080 .
  '' ;
...
...

[larluo@nixos-larluo:~/my-env]$ sudo nixos-rebuild switch
building Nix...
building the system configuration...
NOT restarting the following changed units: systemd-fsck@dev-disk-by\x2duuid-9BA4\x2d18FE.service
activating the configuration...
setting up /etc...
reloading user units for larluo...
setting up tmpfiles
reloading the following units: dbus.service
restarting the following units: polkit.service
the following new units were started: privoxy.service

[larluo@nixos-larluo:~/my-env]$ curl www.google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.com.hk/url?sa=p&amp;hl=zh-CN&amp;pref=hkredirect&amp;pval=yes&amp;q=http://www.google.com.hk/%3Fgws_rd%3Dcr&amp;ust=1539654967800281&amp;usg=AOvVaw1YzCBU5M0fuEUpG0W-aTnQ">here</A>.
</BODY></HTML>

运行chromium --proxy-server=http://127.0.0.1:8118 后打开浏览器即可

nixos.png
youtube.png

d. 添加中文输入法
直接 通过配置菜单添加输入法即可


a.png

四. 安装常用软件

=> chrome浏览器

[larluo@nixos-larluo:~]$ proxychains4 nix-env -i chromium
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
installing 'chromium-69.0.3497.81'
these paths will be fetched (70.31 MiB download, 318.33 MiB unpacked):
  /nix/store/csx1i4jy7zc0vja9gr5gzp3bxsa6wn5h-chromium-69.0.3497.81-sandbox
  /nix/store/hicxzm057pvmbmgysmnadazcal14az4m-snappy-1.1.7
  /nix/store/k4cmikyvmxc8n6c89dcbi7x5k07wv6p3-chromium-69.0.3497.81
  /nix/store/mws7gnljn7h96mh77zl1w5d33zxdjqdm-chromium-69.0.3497.81-sandbox
  /nix/store/myd0rj6ippbc445qf1apm5pbq7scqv6n-chromium-69.0.3497.81
  /nix/store/zdixxwrrqglw7xg6kyqdhsk2ss31fkxr-minizip-1.2.11
copying path '/nix/store/mws7gnljn7h96mh77zl1w5d33zxdjqdm-chromium-69.0.3497.81-sandbox' from 'https://cache.nixos.org'...
copying path '/nix/store/hicxzm057pvmbmgysmnadazcal14az4m-snappy-1.1.7' from 'https://cache.nixos.org'...
copying path '/nix/store/zdixxwrrqglw7xg6kyqdhsk2ss31fkxr-minizip-1.2.11' from 'https://cache.nixos.org'...
copying path '/nix/store/csx1i4jy7zc0vja9gr5gzp3bxsa6wn5h-chromium-69.0.3497.81-sandbox' from 'https://cache.nixos.org'...
copying path '/nix/store/myd0rj6ippbc445qf1apm5pbq7scqv6n-chromium-69.0.3497.81' from 'https://cache.nixos.org'...
copying path '/nix/store/k4cmikyvmxc8n6c89dcbi7x5k07wv6p3-chromium-69.0.3497.81' from 'https://cache.nixos.org'...
building '/nix/store/id69prsw0cw0v094fvisiivnay8zyin4-user-environment.drv'...
created 2 symlinks in user environment

=> thunderbird邮箱

[larluo@nixos-larluo:~/my-env]$ proxychains4 nix-env -i thunderbird
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
installing 'thunderbird-60.2.1'
these paths will be fetched (200.45 MiB download, 1030.06 MiB unpacked):
  /nix/store/39gshz16a0ddi397s5a0asjn6497kxny-llvm-5.0.2-lib
  /nix/store/3qmlkci9qbflj03zg8c4f49gm2xjfkjd-clang-5.0.2-lib
  /nix/store/3rdz8wkmhd7jaywsl1zj65r7qbpr8w9f-expand-response-params
  /nix/store/4sshlz57va57v02qsiv9vsb40gmfiqiw-compiler-rt-5.0.2-dev
  /nix/store/6i92qc2zb0079wffnz4kzd41h1mzafxd-thunderbird-60.2.1
  /nix/store/6r3ibciwdp7h566ln0srz7bl8sn25dyb-clang-wrapper-5.0.2
  /nix/store/h1mvn0bmd4i8090ivl3xmq10cqnr16c6-hook
  /nix/store/n5a8v7vz4vv054vdigc5bl5qlm4ja8wy-ncurses-6.1-dev
  /nix/store/vknrja4x1j1ywih5vk5kizw1r5a0qpys-clang-5.0.2
  /nix/store/x9f7rg717583azw0my670151410lj8fr-llvm-5.0.2
  /nix/store/y29f2h5pwy5n7g8mbq1dqcjl7vs6r5ky-compiler-rt-5.0.2
copying path '/nix/store/3qmlkci9qbflj03zg8c4f49gm2xjfkjd-clang-5.0.2-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/y29f2h5pwy5n7g8mbq1dqcjl7vs6r5ky-compiler-rt-5.0.2' from 'https://cache.nixos.org'...
copying path '/nix/store/3rdz8wkmhd7jaywsl1zj65r7qbpr8w9f-expand-response-params' from 'https://cache.nixos.org'...
copying path '/nix/store/h1mvn0bmd4i8090ivl3xmq10cqnr16c6-hook' from 'https://cache.nixos.org'...
copying path '/nix/store/39gshz16a0ddi397s5a0asjn6497kxny-llvm-5.0.2-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/n5a8v7vz4vv054vdigc5bl5qlm4ja8wy-ncurses-6.1-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/4sshlz57va57v02qsiv9vsb40gmfiqiw-compiler-rt-5.0.2-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/x9f7rg717583azw0my670151410lj8fr-llvm-5.0.2' from 'https://cache.nixos.org'...
copying path '/nix/store/vknrja4x1j1ywih5vk5kizw1r5a0qpys-clang-5.0.2' from 'https://cache.nixos.org'...
copying path '/nix/store/6r3ibciwdp7h566ln0srz7bl8sn25dyb-clang-wrapper-5.0.2' from 'https://cache.nixos.org'...
copying path '/nix/store/6i92qc2zb0079wffnz4kzd41h1mzafxd-thunderbird-60.2.1' from 'https://cache.nixos.org'...
building '/nix/store/1f31j3lk74w0hysaqp8vdnvcxdrg3ics-user-environment.drv'...
created 792 symlinks in user environment

=> evince pdf浏览器

[larluo@nixos-larluo:~/my-env]$ proxychains4 nix-env -i evince
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
installing 'evince-3.28.2'
these paths will be fetched (25.20 MiB download, 66.78 MiB unpacked):
  /nix/store/1lv5fip3jji2j0mdzigdc4571f5ff8j7-jbig2dec-0.14
  /nix/store/420wz0n3fw9ngg2kv4zdwjh8q5ncrvnx-djvulibre-3.5.27
  /nix/store/bimpz9k325r4ychgxqscd107b6sxi0h2-ijs-9.24
  /nix/store/bna6qz4frm646k8ixwzdn6j69ndnjcg7-ghostscript-9.24
  /nix/store/f74rfjbnlk2yg9fdj4q0wr6rzryyjx81-libspectre-0.2.7
  /nix/store/m3c8i9rb3k36x4kvapsg7bs911xicks9-poppler-glib-0.67.0
  /nix/store/v568ysj3hs6pazqkih03am5zqi7fq0pp-evince-3.28.2
  /nix/store/vq2355c7dr8nbz2ms4jb4z6zp8szwwbd-ghostscript-fonts
copying path '/nix/store/420wz0n3fw9ngg2kv4zdwjh8q5ncrvnx-djvulibre-3.5.27' from 'https://cache.nixos.org'...
copying path '/nix/store/vq2355c7dr8nbz2ms4jb4z6zp8szwwbd-ghostscript-fonts' from 'https://cache.nixos.org'...
copying path '/nix/store/m3c8i9rb3k36x4kvapsg7bs911xicks9-poppler-glib-0.67.0' from 'https://cache.nixos.org'...
copying path '/nix/store/bimpz9k325r4ychgxqscd107b6sxi0h2-ijs-9.24' from 'https://cache.nixos.org'...
copying path '/nix/store/1lv5fip3jji2j0mdzigdc4571f5ff8j7-jbig2dec-0.14' from 'https://cache.nixos.org'...
copying path '/nix/store/bna6qz4frm646k8ixwzdn6j69ndnjcg7-ghostscript-9.24' from 'https://cache.nixos.org'...
copying path '/nix/store/f74rfjbnlk2yg9fdj4q0wr6rzryyjx81-libspectre-0.2.7' from 'https://cache.nixos.org'...
copying path '/nix/store/v568ysj3hs6pazqkih03am5zqi7fq0pp-evince-3.28.2' from 'https://cache.nixos.org'...
building '/nix/store/4h6fjycvsy067i7ns0c9snz08rgdqs5j-user-environment.drv'...
created 1102 symlinks in user environment

=> libroffice办公软件

[larluo@nixos-larluo:~/my-env]$ proxychains4 nix-env -i libreoffice
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
installing 'libreoffice-5.4.7.2'
these paths will be fetched (168.57 MiB download, 653.89 MiB unpacked):
  /nix/store/4y7yrfc7qcp7w1spafxjpngfb0x7mjha-openjdk-8u181b13
  /nix/store/5ybf6lngdih0pr019ag4hbp4djcsl4ah-openjdk-8u181b13-jre
  /nix/store/974d2b1i7pksp0c70jgvj0fv99famrb1-libvisio-0.1.6
  /nix/store/9d584vzz1a3j3s3z07brnz75psgzbnrn-gcc-5.5.0-lib
  /nix/store/ajv96hh6w3jx86bcd7x0zlnlj5pgfnhr-libzmf-0.0.2
  /nix/store/aqhk8hd88n9afqrycanvfjhwk6mz731f-neon-0.30.2
  /nix/store/bkv3dnpdlr87wkmc0ypkybjskw09ah6d-hook
  /nix/store/c9j76xmlwyx1fhw49wg1vdil9y0l8zx4-librevenge-0.0.4
  /nix/store/cxh0wfffy3dc742liwz1krykq1az9ixr-libabw-0.1.2
  /nix/store/fzsc7l86jxnzpw7g0jg78vdqyv3m4hbv-libwps-0.4.10
  /nix/store/g02dcmjvgj69zi76sdbbs2ji9sa85iz1-liblangtag-0.6.1
  /nix/store/gyf8yigf4l0f4zqvw2ndpwgmgslqyx4k-clucene-core-2.3.3.4
  /nix/store/hfk6kn93li0kkaq52jnn3z7zbbkqccrx-redland-1.0.17
  /nix/store/ifgxmm314fjw0znxkrvdz2gsc3ypivng-poppler-glib-0.61.0
  /nix/store/k0yiqs8fw65pqxdvgq0044y6imlkl0sp-rasqal-0.9.33
  /nix/store/krx9sfh43x5c0isv670h7l81y4834q4g-libreoffice-5.4.7.2
  /nix/store/l60m3fywaq5z190f70rssnkx956a32xl-libwpg-0.3.2
  /nix/store/n161lwn87hbjymcsz7zrdhg7jsjhs9zz-libodfgen-0.1.7
  /nix/store/nz8pmb9gpywihya85hkyks179j6sbg15-libcmis-0.5.0
  /nix/store/rb4m5bj0ds1wy4fc53yry4401wlqkmyq-libe-book-0.1.3
  /nix/store/swfrwj4d65fd38al177kwmh59cjiynxz-mythes-1.2.4
  /nix/store/vjd9iq4205zj4vj7wggx54jnrrdl3pwc-libmwaw-0.3.14
  /nix/store/wikf3fjh6sr032fn1zvc6pplh1apamgy-CoinMP-1.8.3
  /nix/store/x0hlprymv016lv0lgy5956fmv03bsiqa-libcdr-0.1.4
  /nix/store/xqvhckdcs39gmfrixgiqdpkfpni23pmf-libreoffice-5.4.7.2
  /nix/store/yf9lkwq8i2nc2bbk6bpi1l0h4ndlfphs-raptor2-2.0.15
  /nix/store/zk6xpq0bdri8z93la91sp53in983biqy-libexttextcat-3.4.5
  /nix/store/zlnywymq706chkaz6pk59dxppsa5hjcg-libwpd-0.10.0
copying path '/nix/store/wikf3fjh6sr032fn1zvc6pplh1apamgy-CoinMP-1.8.3' from 'https://cache.nixos.org'...
copying path '/nix/store/gyf8yigf4l0f4zqvw2ndpwgmgslqyx4k-clucene-core-2.3.3.4' from 'https://cache.nixos.org'...
copying path '/nix/store/9d584vzz1a3j3s3z07brnz75psgzbnrn-gcc-5.5.0-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/bkv3dnpdlr87wkmc0ypkybjskw09ah6d-hook' from 'https://cache.nixos.org'...
copying path '/nix/store/nz8pmb9gpywihya85hkyks179j6sbg15-libcmis-0.5.0' from 'https://cache.nixos.org'...
copying path '/nix/store/zk6xpq0bdri8z93la91sp53in983biqy-libexttextcat-3.4.5' from 'https://cache.nixos.org'...
copying path '/nix/store/c9j76xmlwyx1fhw49wg1vdil9y0l8zx4-librevenge-0.0.4' from 'https://cache.nixos.org'...
copying path '/nix/store/swfrwj4d65fd38al177kwmh59cjiynxz-mythes-1.2.4' from 'https://cache.nixos.org'...
copying path '/nix/store/g02dcmjvgj69zi76sdbbs2ji9sa85iz1-liblangtag-0.6.1' from 'https://cache.nixos.org'...
copying path '/nix/store/aqhk8hd88n9afqrycanvfjhwk6mz731f-neon-0.30.2' from 'https://cache.nixos.org'...
copying path '/nix/store/cxh0wfffy3dc742liwz1krykq1az9ixr-libabw-0.1.2' from 'https://cache.nixos.org'...
copying path '/nix/store/x0hlprymv016lv0lgy5956fmv03bsiqa-libcdr-0.1.4' from 'https://cache.nixos.org'...
copying path '/nix/store/vjd9iq4205zj4vj7wggx54jnrrdl3pwc-libmwaw-0.3.14' from 'https://cache.nixos.org'...
copying path '/nix/store/n161lwn87hbjymcsz7zrdhg7jsjhs9zz-libodfgen-0.1.7' from 'https://cache.nixos.org'...
copying path '/nix/store/974d2b1i7pksp0c70jgvj0fv99famrb1-libvisio-0.1.6' from 'https://cache.nixos.org'...
copying path '/nix/store/zlnywymq706chkaz6pk59dxppsa5hjcg-libwpd-0.10.0' from 'https://cache.nixos.org'...
copying path '/nix/store/fzsc7l86jxnzpw7g0jg78vdqyv3m4hbv-libwps-0.4.10' from 'https://cache.nixos.org'...
copying path '/nix/store/ajv96hh6w3jx86bcd7x0zlnlj5pgfnhr-libzmf-0.0.2' from 'https://cache.nixos.org'...
copying path '/nix/store/rb4m5bj0ds1wy4fc53yry4401wlqkmyq-libe-book-0.1.3' from 'https://cache.nixos.org'...
copying path '/nix/store/5ybf6lngdih0pr019ag4hbp4djcsl4ah-openjdk-8u181b13-jre' from 'https://cache.nixos.org'...
copying path '/nix/store/ifgxmm314fjw0znxkrvdz2gsc3ypivng-poppler-glib-0.61.0' from 'https://cache.nixos.org'...
copying path '/nix/store/yf9lkwq8i2nc2bbk6bpi1l0h4ndlfphs-raptor2-2.0.15' from 'https://cache.nixos.org'...
copying path '/nix/store/l60m3fywaq5z190f70rssnkx956a32xl-libwpg-0.3.2' from 'https://cache.nixos.org'...
copying path '/nix/store/k0yiqs8fw65pqxdvgq0044y6imlkl0sp-rasqal-0.9.33' from 'https://cache.nixos.org'...
copying path '/nix/store/hfk6kn93li0kkaq52jnn3z7zbbkqccrx-redland-1.0.17' from 'https://cache.nixos.org'...
copying path '/nix/store/4y7yrfc7qcp7w1spafxjpngfb0x7mjha-openjdk-8u181b13' from 'https://cache.nixos.org'...
copying path '/nix/store/krx9sfh43x5c0isv670h7l81y4834q4g-libreoffice-5.4.7.2' from 'https://cache.nixos.org'...
copying path '/nix/store/xqvhckdcs39gmfrixgiqdpkfpni23pmf-libreoffice-5.4.7.2' from 'https://cache.nixos.org'...
building '/nix/store/9qhcfrga3qgziwzsl0b3cx3y0pdf68x8-user-environment.drv'...
created 655 symlinks in user environment

=> ImageMagick截图工具

[larluo@nixos-larluo:~/my-env]$ proxychains4 nix-env -i imagemagick
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
warning: there are multiple derivations named 'imagemagick-6.9.9-34'; using the first one
installing 'imagemagick-6.9.9-34'
these paths will be fetched (4.92 MiB download, 13.48 MiB unpacked):
  /nix/store/26v5ll17wflfhbrnpsz7c65hqh291c67-openexr-2.3.0-bin
  /nix/store/2j72yfcbzv43jgw4hkv1ijkmyr7hvr58-libheif-1.3.2
  /nix/store/3a6qs58r3lvkpsacvkknsrrf2hmbncdb-imagemagick-6.9.9-34-dev
  /nix/store/3zrna59pam7h43250jxildzxgfwqa3h0-lcms2-2.9-bin
  /nix/store/5454q1bjggl2i3d89f2j950gld4zhj5b-openjpeg-2.3.0-dev
  /nix/store/c7ifrv200znd02l831izbhznxxm51jz4-imagemagick-6.9.9-34-doc
  /nix/store/kr0djjvisbh2n1444i8fs9cv43v96m5d-fftw-double-3.3.8-dev
  /nix/store/l6rmk2jz24gd6mafxrm82pkkry2x25qz-ilmbase-2.3.0-dev
  /nix/store/lw72l8j4chl1yg7a657q49zas7hpgzsz-lcms2-2.9-dev
  /nix/store/mjck4z73by11m2r9q5xixy6762lj66n0-librsvg-2.42.4-dev
  /nix/store/v5nv7b7mw7bp0d6bbpq4n8vbms96295i-libXt-1.1.5-dev
  /nix/store/zp54j6smf4qsylgq548injjh2nsqhx9z-openexr-2.3.0-dev
copying path '/nix/store/c7ifrv200znd02l831izbhznxxm51jz4-imagemagick-6.9.9-34-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/kr0djjvisbh2n1444i8fs9cv43v96m5d-fftw-double-3.3.8-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/l6rmk2jz24gd6mafxrm82pkkry2x25qz-ilmbase-2.3.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/v5nv7b7mw7bp0d6bbpq4n8vbms96295i-libXt-1.1.5-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/2j72yfcbzv43jgw4hkv1ijkmyr7hvr58-libheif-1.3.2' from 'https://cache.nixos.org'...
copying path '/nix/store/mjck4z73by11m2r9q5xixy6762lj66n0-librsvg-2.42.4-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/3zrna59pam7h43250jxildzxgfwqa3h0-lcms2-2.9-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/26v5ll17wflfhbrnpsz7c65hqh291c67-openexr-2.3.0-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/lw72l8j4chl1yg7a657q49zas7hpgzsz-lcms2-2.9-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/zp54j6smf4qsylgq548injjh2nsqhx9z-openexr-2.3.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/5454q1bjggl2i3d89f2j950gld4zhj5b-openjpeg-2.3.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/3a6qs58r3lvkpsacvkknsrrf2hmbncdb-imagemagick-6.9.9-34-dev' from 'https://cache.nixos.org'...
building '/nix/store/2nglxi543p78wgkly9padyrjizlvgg5r-user-environment.drv'...
created 697 symlinks in user environment

=> electronic-wechat微信

五. 搭建nixos开发环境

=> git及emacs

[larluo@nixos-larluo:~]$ proxychains4 nix-env -i git
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
warning: there are multiple derivations named 'git-2.18.1'; using the first one
installing 'git-2.18.1'
these paths will be fetched (11.25 MiB download, 66.76 MiB unpacked):
  /nix/store/41hq062j75klw558jjxk1yvwq919j8di-perl5.28.0-IO-Socket-SSL-2.059
  /nix/store/4dsqrvag0r9cb23kh0ga7a9qzi4r75vb-utf8proc-2.2.0
  /nix/store/9z32r9maz3gc9lypsn3xkykixbsjj9lb-perl5.28.0-Net-SSLeay-1.85
  /nix/store/f93v6rcr7f0b7szcn5l393878k88ni6y-perl5.28.0-libnet-3.11
  /nix/store/g905249s0fxwixg28ljc4zby3cg67xiv-perl5.28.0-TermReadKey-2.37
  /nix/store/gjgbvznq9yf6xm769f02fn26azjlicil-git-2.18.1-gitweb
  /nix/store/h8f37196bln401b93rjfjdab5bjkw4x0-perl5.28.0-Authen-SASL-2.16
  /nix/store/jwg00srfrhbp2jwjdcaq1idmkmhgg455-apr-1.6.3
  /nix/store/pay7xbyp76hp6kcp6achl24dd9dinp8z-tcl-8.6.6
  /nix/store/r818wr8ngwlq5vwimr7sbq8fm2w7jj1a-apr-util-1.6.1
  /nix/store/ryyxx8flklgk8l72ncz9fl86v5bjjn89-serf-1.3.9
  /nix/store/s9pqvqg9x486nvapb3w1r8agyvcacdrc-libsecret-0.18.5-dev
  /nix/store/vk696jijdlrjnyx88dcc83qm99snz1zz-subversion-1.10.2
  /nix/store/vpgdq8dsfspa85l5wmgp3k30w8wpdkvl-tk-8.6.6
  /nix/store/vxqz4jjp5kdzyy4idmmwrj53b3ylv130-perl5.28.0-Net-SMTP-SSL-1.04
  /nix/store/xbj45sahi35kgsirhvgrkky9v2skif5q-git-2.18.1
copying path '/nix/store/f93v6rcr7f0b7szcn5l393878k88ni6y-perl5.28.0-libnet-3.11' from 'https://cache.nixos.org'...
copying path '/nix/store/h8f37196bln401b93rjfjdab5bjkw4x0-perl5.28.0-Authen-SASL-2.16' from 'https://cache.nixos.org'...
copying path '/nix/store/jwg00srfrhbp2jwjdcaq1idmkmhgg455-apr-1.6.3' from 'https://cache.nixos.org'...
copying path '/nix/store/s9pqvqg9x486nvapb3w1r8agyvcacdrc-libsecret-0.18.5-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/9z32r9maz3gc9lypsn3xkykixbsjj9lb-perl5.28.0-Net-SSLeay-1.85' from 'https://cache.nixos.org'...
copying path '/nix/store/g905249s0fxwixg28ljc4zby3cg67xiv-perl5.28.0-TermReadKey-2.37' from 'https://cache.nixos.org'...
copying path '/nix/store/pay7xbyp76hp6kcp6achl24dd9dinp8z-tcl-8.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/4dsqrvag0r9cb23kh0ga7a9qzi4r75vb-utf8proc-2.2.0' from 'https://cache.nixos.org'...
copying path '/nix/store/41hq062j75klw558jjxk1yvwq919j8di-perl5.28.0-IO-Socket-SSL-2.059' from 'https://cache.nixos.org'...
copying path '/nix/store/r818wr8ngwlq5vwimr7sbq8fm2w7jj1a-apr-util-1.6.1' from 'https://cache.nixos.org'...
copying path '/nix/store/vxqz4jjp5kdzyy4idmmwrj53b3ylv130-perl5.28.0-Net-SMTP-SSL-1.04' from 'https://cache.nixos.org'...
copying path '/nix/store/vpgdq8dsfspa85l5wmgp3k30w8wpdkvl-tk-8.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/ryyxx8flklgk8l72ncz9fl86v5bjjn89-serf-1.3.9' from 'https://cache.nixos.org'...
copying path '/nix/store/vk696jijdlrjnyx88dcc83qm99snz1zz-subversion-1.10.2' from 'https://cache.nixos.org'...
copying path '/nix/store/xbj45sahi35kgsirhvgrkky9v2skif5q-git-2.18.1' from 'https://cache.nixos.org'...
copying path '/nix/store/gjgbvznq9yf6xm769f02fn26azjlicil-git-2.18.1-gitweb' from 'https://cache.nixos.org'...
building '/nix/store/f2fvyxj3vr8akvd0d461fdx2mp8a1h8l-user-environment.drv'...
created 372 symlinks in user environment

[larluo@nixos-larluo:~]$ proxychains4 nix-env -i emacs
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
installing 'emacs-26.1'
these paths will be fetched (42.51 MiB download, 152.12 MiB unpacked):
  /nix/store/llk4irv6aajfd2hgn3ss3np9dn4wsb0j-m17n-lib-1.8.0
  /nix/store/pzxrmcy75qpw3qncwha1wziy6182x538-emacs-26.1
  /nix/store/qg8rjxc6kldzv2fc1rsjb982ycwls1bn-libotf-0.9.16
  /nix/store/xfpfpzxw4nldpy2vp165p28xa06g2c9w-m17n-db-1.8.0
  /nix/store/yzq4c2z3i4nj2wxyjxh1brih4kxbdcf5-libungif-4.1.4
copying path '/nix/store/yzq4c2z3i4nj2wxyjxh1brih4kxbdcf5-libungif-4.1.4' from 'https://cache.nixos.org'...
copying path '/nix/store/qg8rjxc6kldzv2fc1rsjb982ycwls1bn-libotf-0.9.16' from 'https://cache.nixos.org'...
copying path '/nix/store/xfpfpzxw4nldpy2vp165p28xa06g2c9w-m17n-db-1.8.0' from 'https://cache.nixos.org'...
copying path '/nix/store/llk4irv6aajfd2hgn3ss3np9dn4wsb0j-m17n-lib-1.8.0' from 'https://cache.nixos.org'...
copying path '/nix/store/pzxrmcy75qpw3qncwha1wziy6182x538-emacs-26.1' from 'https://cache.nixos.org'...
building '/nix/store/ydb4g2qf7121iy5si4k28hmixnzcb6z0-user-environment.drv'...
created 469 symlinks in user environment

=> java & clojure开发环境

[larluo@nixos-larluo:~/my-env]$ proxychains4 nix-env -i openjdk
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
warning: there are multiple derivations named 'openjdk-10.0.2-b13'; using the first one
installing 'openjdk-10.0.2-b13'
these paths will be fetched (193.74 MiB download, 457.07 MiB unpacked):
  /nix/store/d7l94960i8iqi68g5m8rpirqzzr3hvl9-openjdk-10.0.2-b13-jre
  /nix/store/vr8g4g33x74sr30xvcpx1sangd7rd9n2-openjdk-10.0.2-b13
copying path '/nix/store/d7l94960i8iqi68g5m8rpirqzzr3hvl9-openjdk-10.0.2-b13-jre' from 'https://cache.nixos.org'...
copying path '/nix/store/vr8g4g33x74sr30xvcpx1sangd7rd9n2-openjdk-10.0.2-b13' from 'https://cache.nixos.org'...
building '/nix/store/xcym9bdss03r05zdcgk74hrzq3rkyilm-user-environment.drv'...
created 785 symlinks in user environment

[larluo@nixos-larluo:~/my-env]$ proxychains4 nix-env -i apache-maven
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
installing 'apache-maven-3.5.4'
these paths will be fetched (8.15 MiB download, 10.27 MiB unpacked):
  /nix/store/8ldwgz4lgip2vmy6q8x1gh4ykqmd0as7-apache-maven-3.5.4
copying path '/nix/store/8ldwgz4lgip2vmy6q8x1gh4ykqmd0as7-apache-maven-3.5.4' from 'https://cache.nixos.org'...
building '/nix/store/npsj9aj3nhgiflcpd7fal40q8d81mxx3-user-environment.drv'...
created 1104 symlinks in user environment

[larluo@nixos-larluo:~/my-env]$ proxychains4 nix-env -i leiningen
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
installing 'leiningen-2.8.1'
these paths will be fetched (11.43 MiB download, 13.19 MiB unpacked):
  /nix/store/5gy44j1x1hw8l1gxl65xn1gcmy3a3sy5-gnupg1compat-2.2.9
  /nix/store/apq3pf7b1qi53ddvpm91w0mwy7r2hj60-rlwrap-0.43
  /nix/store/j0dh9vhbw99mgdw0ygmmcdq7zhp79big-leiningen-2.8.1
copying path '/nix/store/5gy44j1x1hw8l1gxl65xn1gcmy3a3sy5-gnupg1compat-2.2.9' from 'https://cache.nixos.org'...
copying path '/nix/store/apq3pf7b1qi53ddvpm91w0mwy7r2hj60-rlwrap-0.43' from 'https://cache.nixos.org'...
copying path '/nix/store/j0dh9vhbw99mgdw0ygmmcdq7zhp79big-leiningen-2.8.1' from 'https://cache.nixos.org'...
building '/nix/store/w0vnlaz5ig2h4glahdbyy1van35662iy-user-environment.drv'...
created 787 symlinks in user environment

[larluo@nixos-larluo:~/my-env]$ proxychains4 lein repl
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
Retrieving org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.pom from central
Retrieving org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from central
Retrieving org/sonatype/oss/oss-parent/7/oss-parent-7.pom from central
Retrieving clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.pom from clojars
Retrieving org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.jar from central
Retrieving clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.jar from clojars
nREPL server started on port 40561 on host 127.0.0.1 - nrepl://127.0.0.1:40561
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
OpenJDK 64-Bit Server VM 1.8.0_181-13
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> (println "hello, world")
hello, world
nil
user=> exit
Bye for now!

=> haskell开发环境

[larluo@nixos-larluo:~/my-env]$ proxychains4 nix-env -i stack
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
installing 'stack-1.7.1'
these paths will be fetched (3.50 MiB download, 24.44 MiB unpacked):
  /nix/store/gpxm40niav8ar3qxg90fsqnhq2a5pny9-stack-1.7.1
copying path '/nix/store/gpxm40niav8ar3qxg90fsqnhq2a5pny9-stack-1.7.1' from 'https://cache.nixos.org'...
building '/nix/store/7b4m829rc0gskp1maq0xm0znjh1hcwfs-user-environment.drv'...
created 789 symlinks in user environment

[larluo@nixos-larluo:~/my-env]$ proxychains4 stack repl
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
Note: Enabling Nix integration, as it is required under NixOS
Downloaded lts-12.13 build plan.    
these paths will be fetched (122.49 MiB download, 1684.64 MiB unpacked):
  /nix/store/3dm45p4sgba9g8lk6pza40sl2rhnzghx-git-2.18.1
  /nix/store/78yiqfgzz2b32pn391najl1k1jqch2hf-glibc-locales-2.27
  /nix/store/9ls123vy8ng6dqw29jvgd7lysn381kma-ghc-8.4.3-doc
  /nix/store/kic17fw8wil74k04kzh3dha43izrr9j3-bash-interactive-4.4-p23-dev
  /nix/store/n5i1zdpmk2b1s3z96649xh8f9kr3g96s-ghc-8.4.3
copying path '/nix/store/78yiqfgzz2b32pn391najl1k1jqch2hf-glibc-locales-2.27' from 'https://cache.nixos.org'...
copying path '/nix/store/kic17fw8wil74k04kzh3dha43izrr9j3-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/3dm45p4sgba9g8lk6pza40sl2rhnzghx-git-2.18.1' from 'https://cache.nixos.org'...
copying path '/nix/store/9ls123vy8ng6dqw29jvgd7lysn381kma-ghc-8.4.3-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/n5i1zdpmk2b1s3z96649xh8f9kr3g96s-ghc-8.4.3' from 'https://cache.nixos.org'...
Note: Enabling Nix integration, as it is required under NixOS
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/                                 
Downloading root                                                                                 
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/                                 
Downloading timestamp                                                                            
Downloading snapshot                                                                             
Downloading mirrors                                                                              
Cannot update index (no local copy)                                                              
Downloading index                                                                                
Updated package index downloaded                                                                 
Update complete                                                                                  
Populated index cache.    

Note: No local targets specified, so a plain ghci will be started with no package hiding or package options.
      
      If you want to use package hiding and options, then you can try one of the following:
      
      * If you want to start a different project configuration than /home/larluo/.stack/global-project/stack.yaml, then you can use stack init to create a new stack.yaml
        for the packages in the current directory. 
        
      * If you want to use the project configuration at /home/larluo/.stack/global-project/stack.yaml, then you can add to its 'packages' field.
      
Configuring GHCi with the following packages: 
GHCi, version 8.4.3: http://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /run/user/1000/haskell-stack-ghci/2a3bbd58/ghci-script
Prelude> putStrLn "hello, world"
hello, world
Prelude> :quit
Leaving GHCi.

=> c开发环境

=> go开发环境

=> python开发环境

=> js开发环境

[larluo@nixos-larluo:~/my-env]$ proxychains4 nix-env -i nodejs
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
installing 'nodejs-8.11.4'
these paths will be fetched (10.07 MiB download, 50.23 MiB unpacked):
  /nix/store/08xiyq3dhrjyq1ab9arfrpc46fdfi2s1-nodejs-8.11.4
  /nix/store/8zixz3gkqdlhnra5n0dhigzkfqzn3daf-libuv-1.21.0
copying path '/nix/store/8zixz3gkqdlhnra5n0dhigzkfqzn3daf-libuv-1.21.0' from 'https://cache.nixos.org'...
copying path '/nix/store/08xiyq3dhrjyq1ab9arfrpc46fdfi2s1-nodejs-8.11.4' from 'https://cache.nixos.org'...
building '/nix/store/n5p1vsm3y0c7g28zd7ws5f107b3pyvlf-user-environment.drv'...
created 1115 symlinks in user environment

[larluo@nixos-larluo:~/my-env]$ proxychains4 nix-env -f '<nixpkgs>' -iA nodePackages.node2nix
[proxychains] config file found: /home/larluo/.proxychains/proxychains.conf
[proxychains] preloading /nix/store/3li08ycawivkb7p4x1y5p3xnq7ryrykm-proxychains-4.2.0/lib/libproxychains4.so
installing 'node-node2nix-1.6.0'
building '/nix/store/5najkg9r1mjxnrml83ri4k3n3q9was43-user-environment.drv'...
created 1134 symlinks in user environment


=> 大数据开发环境

相关文章

  • 成为极客-02: 纯命令行打造函数式操作系统-NixOS

    自从用了nixos,浑身充满了技术力量,无处安放。。。 nixos是个非常不一样的系统,用些来很多地方不太一样。。...

  • Clojure学习笔记(三)——函数式编程

    函数式编程的理念 函数式编程使得代码的编写、阅读、测试和重用都更容易了。 纯函数 函数式程序构建于纯函数之上。纯函...

  • 函数式编程(二)

    纯函数 函数式编程中的函数,指的就是纯函数,这也是整个函数式编程的核心纯函数:相同的输入永远会得到相同的输出,而且...

  • [极客技术]常用小工具整理

    操作系统: nixos/redox/arch/gentoo软件包管理: nix容器化: docker进程管理: s...

  • Python进阶笔记

    文|Seraph 函数式编程 1 纯函数式编程:不需要变量、没有副作用、测试简单2 Python不是纯函数式编程(...

  • 安全管理:数字世界的守护

    第106篇 极客时间《许式伟的架构课》课程笔记。 病毒与木马 实模式的操作系统 以微软DOS系统为代表,操作系统进...

  • 前端基础—带你理解什么是函数式编程

    框架总览 ? 引言 ? 什么是函数式编程? ? 函数是纯函数? 什么是纯函数? 函数的副作用? 使用纯函数的优点?...

  • 函数式编程(二)—— 纯函数

    目录 纯函数纯函数的概念Lodash——纯函数的代表体验Lodash纯函数的好处可缓存可测试并行处理副作用【函数式...

  • 5.纯函数

    理解JavaScript纯函数 函数式编程中有一个非常重要的概念叫纯函数,JavaScript符合函数式编程的范式...

  • 纯函数

    Function VS Procedures 这里的纯函数指的是在函数式编程里面的纯函数。要理解好纯函数这个概念,...

网友评论

      本文标题:成为极客-02: 纯命令行打造函数式操作系统-NixOS

      本文链接:https://www.haomeiwen.com/subject/tjdqzftx.html