The Complete Computing Environment

CCE Nixos Core


Nix is a Tool for building Linux systems in a declarative idempotent method and is a good fit for the CCE, I think when moving past Fedora Linux.

(provide 'cce/nixos)
(use-package nix-mode)
(use-package nixpkgs-fmt)
(use-package nix-buffer)
(use-package nix-update)
(use-package company-nixos-options
  (nix-mode . (lambda ()
                (make-local-variable 'company-backends)
                (add-to-list 'company-backends 'company-nixos-options))))
(use-package nix-sandbox)
- name: /nix exists
    path: /nix
    state: directory
    owner: "{{local_account}}"
    group: "{{local_account}}"
  - nixos

- name: nix installed
    executable: /bin/bash
    cmd: "bash <(curl -L --no-daemon"
    creates: /nix/store/
  become: yes
  become_user: "{{local_account}}"
  - nixos

The Ansible Manages my Laptop until I deploy NixOS and adapt CCE for it.

if [ -e /home/rrix/.nix-profile/etc/profile.d/ ]; then . /home/rrix/.nix-profile/etc/profile.d/; fi 

nix and nixpkgs configuration for My NixOS configuration

{ ... }:

  # less nix crap
  nix.gc.automatic = true;
  nix.gc.dates = "23:30";
  nix.gc.options = "--delete-older-than 30d";
  nix.settings.trusted-users = ["rrix" "root" "@wheel"];

  # hahaha! yes
  nixpkgs.config = { allowUnfree = true; };