literate-config

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

commit 33e66b2830f851a4a2940bf3ea806fa9bff7a44d
parent a839b93a523f0f5e69e606b5c42ded84851ea0b0
Author: Crazazy <crazazy@tilde.cafe>
Date:   Sun,  6 Feb 2022 16:41:24 +0100

don't tangle into nixos.nix

Diffstat:
Mnixos.org | 35+++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/nixos.org b/nixos.org @@ -1,6 +1,5 @@ #+TITLE:Nixos Config #+AUTHOR: Crazazy -#+PROPERTY: header-args :tangle yes :noweb yes :results silent #+HTML_HEAD: <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/latex.css@1.6.0/style.min.css" integrity="sha256-Ncz7wrwMhIHPJupOT4BWvsCDbduC61SmpMasJCmvPB8=" crossorigin="anonymous"> #+HTML_HEAD:<style>body { max-width : 120ch; }</style> #+OPTIONS: ^:nil p:t @@ -31,12 +30,12 @@ stuff ** Hardware Normal nixos installation comes with a hardware-configuration file. we are not going to add the contents of that file here ourself, but instead add it as an external module. This is the only place where we'll do this - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no ./hardware-configuration.nix #+end_src ** personal stuff First, some personal stuff, so that I can tel people my computer is mine - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { options.mainUser = with lib; mkOption { type = types.str; @@ -46,7 +45,7 @@ stuff #+end_src and then the actual info: - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { mainUser = "erik"; networking.hostName = "RACEMONSTER"; @@ -55,7 +54,7 @@ stuff #+end_src ** Main user config This sets up a (secret) default password for the main user and also sets some default groups - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { users.mutableUsers = false; # Define a user account. Don't forget to set a password with ‘passwd’. @@ -69,7 +68,7 @@ stuff #+end_src ** Init system nixos is started with systemd-boot, since we don't run any other distros - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -77,7 +76,7 @@ stuff #+end_src ** nixpkgs setup not much info here right now. emacs itself now refers to emacsng - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { nix.package = pkgs.nixFlakes; nixpkgs.config.allowUnfree = true; @@ -91,7 +90,7 @@ stuff *** cachix Cachix and other substitute servers allow you to not have to compile things as much as you are supposed to We will create a small module for cachix before we put in the rest declaratively - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { options.nix.cacheAttrs = with lib; mkOption { type = with types; attrsOf str; @@ -105,7 +104,7 @@ stuff } #+end_src With the config in hand, we can now quickly and easily declare our substitute servers - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { nix.cacheAttrs = { "https://crazazy.cachix.org" = "crazazy.cachix.org-1:3KaIHK26pkvd5palJH5A4Re1Hn2+GDV+aXYnftMYAm4="; @@ -123,7 +122,7 @@ stuff *** The config This part is quite advanced. It makes entries for filesystems and then makes a systemd service to re-assign generated temporary directories to the owner of the home folder - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { options = with lib; { homeBinds = mkOption { @@ -154,7 +153,7 @@ stuff #+end_src *** The binds These are the binds themselves, they change frequently - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { homeBinds = [ ".config/keybase" @@ -176,7 +175,7 @@ stuff I don't acutally literally live in the terminal. So we have to implement some xorg and other stuff *** Basics Enable printing, sound and a good keyboard, along with x11 itself - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { # Enable CUPS to print documents. services.printing.enable = true; @@ -196,7 +195,7 @@ stuff #+end_src *** XFCE I have decided to be lazy and not install a fancy window manager or whatever into the system. Thats headache - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { services.xserver.displayManager.lightdm.enable = true; services.xserver.desktopManager.xfce.enable = true; @@ -204,7 +203,7 @@ stuff #+end_src ** Networking Some default network settings for my laptop - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { networking.networkmanager.enable = true; # Enables wireless support via wpa_supplicant. networking.useDHCP = false; @@ -215,7 +214,7 @@ stuff ** packages *** Core packages These are the normal packages that I use for core maintenance - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { environment.systemPackages = with pkgs; [ gitFull @@ -228,7 +227,7 @@ stuff #+end_src *** Steam I like to play videogames sometimes, however steam also requires a little more special attention - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { imports = [ nurModules.repos.crazazy.modules.private.steam-config @@ -240,7 +239,7 @@ stuff #+end_src *** Emacs Emacs needs to be integrated into the rest of the system. We are going to do that via a emacs daemon - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { services.emacs = { package = import ./emacs.nix; @@ -250,7 +249,7 @@ stuff #+end_src *** QEMU & frens I also sometimes run qemu vms. The qemu's manager will be libvirtd, but not sure if I will even use that - #+begin_src nix :noweb-ref nixos-config + #+begin_src nix :noweb-ref nixos-config :tangle no { virtualisation.libvirtd.enable = true; }