The Complete Computing Environment

CCE Nixos Core

LifeTechEmacsTopicsArcology

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
  :hook
  (nix-mode . (lambda ()
                (make-local-variable 'company-backends)
                (add-to-list 'company-backends 'company-nixos-options))))
(use-package nix-sandbox)
- name: /nix exists
  file:
    path: /nix
    state: directory
    owner: "{{local_account}}"
    group: "{{local_account}}"
  tags:
  - nixos

- name: nix installed
  shell:
    executable: /bin/bash
    cmd: "bash <(curl -L https://nixos.org/nix/install) --no-daemon"
    creates: /nix/store/
  become: yes
  become_user: "{{local_account}}"
  tags:
  - nixos

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

if [ -e /home/rrix/.nix-profile/etc/profile.d/nix.sh ]; then . /home/rrix/.nix-profile/etc/profile.d/nix.sh; 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; };
}