diff --git a/flake.lock b/flake.lock index 938e28d..8d558ab 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1783856661, - "narHash": "sha256-ZGP04e+Q6WyQJGA9ZvI5CL6+heGQldbAG9U1T9NGvmU=", + "lastModified": 1784011430, + "narHash": "sha256-lDebytrYdd47IBLwvNOD+6AGeoqZ78CIKlp70hzW280=", "owner": "nixos", "repo": "nixpkgs", - "rev": "569d578509928497eddc3fdbf94a799027050be4", + "rev": "8eeec934ae0dbeca3d7868c059568a65c08b2fc3", "type": "github" }, "original": { @@ -39,11 +39,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1783776592, - "narHash": "sha256-UgCQzxeWI75XM8G+hPrPh+MKzEPjG3SpAj7dtqSbksA=", + "lastModified": 1784007870, + "narHash": "sha256-djcLt/JJphyNt4eDY9XTly+/WbCK5lqWq9lSgCmJkkQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e7a3ca8092b61ff85b6a45bf863ea2b2d6a661b3", + "rev": "18b9261cb3294b6d2a06d03f96872827b8fe2698", "type": "github" }, "original": { diff --git a/nixos.html b/nixos.html index 820c30f..38b1051 100644 --- a/nixos.html +++ b/nixos.html @@ -43,34 +43,7 @@ body{min-width:200px;max-width:780px;margin:0 auto;padding:30px;font-family:Inte

asnev's NixOS configuration

-

1. table of contents

- -


-

- -
-

2. introduction

+

1. introduction

welcome! this page is the literate configuration for my NixOS setup. here, declarations are set to configure my (currently) only host system, phostron, a ThinkPad L14 Gen 1, to use flakes, Home Manager, a global nixpkgs-unstable @@ -96,7 +69,7 @@ out there!

-

3. limitations

+

2. limitations

this is a simple configuration. i don't have immediate plans in declaratively configuring absolutely everything there is on my system. as someone who still has many things to learn about Nix(OS), my current rationale is to configure @@ -133,12 +106,12 @@ flake-enabled NixOS system is present and ready to go.

-

4. flake structure

+

3. flake structure

we'll outline a basic flake for the system(s)...

-{flake.nix 4} +{flake.nix 3}
 {
   description = "asnev's NixOS configuration";
@@ -163,7 +136,7 @@ flake-enabled NixOS system is present and ready to go.
     home-manager,
     ...
   }: {
-    {flake-modules, 4}
+    {flake-modules, 3}
   };
 }
 
@@ -177,13 +150,13 @@ one NixOS module, so it is structured thusly:

-{flake-modules 4} +{flake-modules 3}
 nixosConfigurations.phostron = nixpkgs.lib.nixosSystem {
   specialArgs = {inherit inputs;};
   modules = [
-    {phostron-configuration, 6}
-    {coyote-configuration, 8}
+    {phostron-configuration, 5}
+    {coyote-configuration, 7}
   ];
 };
 
@@ -197,7 +170,7 @@ nixosConfigurations.phostron = nixpkgs.lib.nixosSystem {

-

5. global NixOS options

+

4. global NixOS options

before getting into the host-specific configurations, here we set options that get applied to all NixOS systems, regardless of machine. we'll start by declaring the initial attribute set arguments, which will soon be a familiar @@ -205,22 +178,22 @@ pattern here...

-{nixos-configuration 5} +{nixos-configuration 4}
 ({ config, lib, pkgs, inputs, ... }: {
-  {nixos-configuration-contents, 5}
+  {nixos-configuration-contents, 4}
 })
 
-

Used in section 6

+

Used in section 5

...then we set Nix-related declarations since we'd like to declare the system to use flakes, and, to utilise Lix,

-{nixos-configuration-contents 5} +{nixos-configuration-contents 4}
 nix.settings.experimental-features = ["nix-command" "flakes"];
 nix.settings.auto-optimise-store = true;
@@ -236,7 +209,7 @@ Home Manager. plus, some additional tweaks for Lix.
 

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 nixpkgs.config.allowUnfree = true;
 nixpkgs.overlays = [
@@ -265,7 +238,7 @@ on.
 

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 boot = {
   loader.systemd-boot.enable = true;
@@ -286,7 +259,7 @@ boot = {
 

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 time.timeZone = "Asia/Jakarta";
 i18n.defaultLocale = "en_GB.UTF-8";
@@ -299,7 +272,7 @@ i18n.defaultLocale = "en_GB.UTF-8";
 

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 services = {
   fwupd.enable = true;
@@ -323,7 +296,7 @@ services = {
 

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 security.rtkit.enable = true;
 
@@ -336,7 +309,7 @@ packages!

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 environment.systemPackages = with pkgs; [
   nh alejandra literate
@@ -361,7 +334,7 @@ globally maybe?)
 

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 environment.shellAliases = {
   l = "eza --grid --all";
@@ -380,10 +353,10 @@ environment.shellAliases = {
 

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 programs = {
-  {nixos-configuration-programs-contents, 5}
+  {nixos-configuration-programs-contents, 4}
 };
 
@@ -397,11 +370,11 @@ programs = {

yes, the lambda (λ) as a terminal prompt character absolutely counts towards -style points. (joke) +style points.

-{nixos-configuration-programs-contents 5} +{nixos-configuration-programs-contents 4}
 fish.enable = true;
 
@@ -434,7 +407,7 @@ if they existed there, but they don't, so, oh well.
 

-{nixos-configuration-programs-contents 5} += +{nixos-configuration-programs-contents 4} +=
 obs-studio.enableVirtualCamera = true;
 ssh.startAgent = true;
@@ -449,7 +422,7 @@ repository, hence the sparse libraries pkgs list, lol.
 

-{nixos-configuration-programs-contents 5} += +{nixos-configuration-programs-contents 4} +=
 nix-ld.enable = true;
 nix-ld.libraries = with pkgs; [
@@ -465,7 +438,7 @@ nix-ld.libraries = with pkgs; [
 

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 fonts.packages = with pkgs; [
   # GUI fonts
@@ -485,7 +458,7 @@ fonts.packages = with pkgs; [
 

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 fonts.fontconfig.antialias = true;
 fonts.fontconfig.subpixel.rgba = "rgb";
@@ -499,7 +472,7 @@ they're here so here they are.
 

-{nixos-configuration-contents 5} += +{nixos-configuration-contents 4} +=
 xdg.portal.enable = true;
 xdg.portal.config.common.default = ["gtk"];
@@ -515,20 +488,20 @@ xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-wlr];
 

-

6. host configuration: phostron

+

5. host configuration: phostron

we make sure that we load in the global options we've set, alongside a choice of one's preferred graphical interface.

-{phostron-configuration 6} +{phostron-configuration 5}
-{nixos-configuration, 5}
-{kde-plasma-configuration, 7}
+{nixos-configuration, 4}
+{kde-plasma-configuration, 6}
 
-

Used in section 4

+

Used in section 3

then we may start with configuring the machine specifically. with the NixOS installer's automatically generated hardware-configuration.nix file, our job @@ -536,23 +509,23 @@ is basically half done here.

-{phostron-configuration 6} += +{phostron-configuration 5} +=
 ({ config, lib, pkgs, modulesPath, ... }: {
-  {phostron-hardware-configuration-contents, 6}
-  {phostron-configuration-contents, 6}
+  {phostron-hardware-configuration-contents, 5}
+  {phostron-configuration-contents, 5}
 })
 
-

Used in section 4

+

Used in section 3

i'll copy over said file verbatim (excluding the pre-generated comment blurb at the beginning of the file).

-{phostron-hardware-configuration-contents 6} +{phostron-hardware-configuration-contents 5}
 imports = [(modulesPath + "/installer/scan/not-detected.nix")];
 
@@ -585,7 +558,7 @@ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistrib
 

-{phostron-configuration-contents 6} +{phostron-configuration-contents 5}
 system.stateVersion = "26.05"; # I didn't read the comment. :)
 
@@ -596,7 +569,7 @@ networking.firewall.enable = true;
 hardware.bluetooth.enable = true;
 hardware.bluetooth.powerOnBoot = false;
 
-

Added to in section 7

+

Added to in section 6

@@ -604,13 +577,13 @@ hardware.bluetooth.powerOnBoot = false;

-

7. desktop configuration: KDE Plasma

+

6. desktop configuration: KDE Plasma

let's bring ourselves to the 90s with a proper graphical user interface! and have some additional apps to boot.

-{kde-plasma-configuration 7} +{kde-plasma-configuration 6}
 ({pkgs, ...}: {
   services.displayManager.sddm.enable = true;
@@ -621,35 +594,35 @@ have some additional apps to boot.
 
-

Used in section 6

+

Used in section 5

"Discover? Where we're going... we don't need Discover."

-{kde-plasma-configuration 7} += +{kde-plasma-configuration 6} +=
   environment.plasma6.excludePackages = [pkgs.kdePackages.discover];
 })
 
-

Used in section 6

+

Used in section 5

i've set some additional options in how i'd like SDDM to look for phostron specifically.

-{phostron-configuration-contents 6} += +{phostron-configuration-contents 5} +=
 services.displayManager.sddm.settings.Theme.Font = "Inter";
 services.displayManager.sddm.settings.Theme.CursorSize = 18;
 
-

Used in section 6

+

Used in section 5

(TODO: consider adding the plasma-manager flake module in the future?)

@@ -657,7 +630,7 @@ services.displayManager.sddm.settings.Theme.CursorSize = 18;

-

8. user configuration: coyote

+

7. user configuration: coyote

that's me. :3c

not just NixOS options, but also any other modules loaded into the system via @@ -665,24 +638,24 @@ the flake, like Home Manager, as seen later.

-{coyote-configuration 8} +{coyote-configuration 7}
 ({ pkgs, config, ... }: let
-  {coyote-configuration-variables, 8}
+  {coyote-configuration-variables, 7}
 in {
-  {coyote-configuration-contents, 8}
+  {coyote-configuration-contents, 7}
 })
 
-

Added to in section 9

+

Added to in section 8

-

Used in section 4

+

Used in section 3

let's get the user-specific NixOS options out of the way. basic user management stuff and setting the default shell of choice.

-{coyote-configuration-variables 8} +{coyote-configuration-variables 7}
 USER_ID = 1000;
 
@@ -692,7 +665,7 @@ USER_ID = 1000;
-{coyote-configuration-contents 8} +{coyote-configuration-contents 7}
 users.users.coyote = {
   isNormalUser = true;
@@ -713,7 +686,7 @@ can't remember--i think i stole this from GitHub somewhere...

-{coyote-configuration-variables 8} += +{coyote-configuration-variables 7} +=
 KEY_FILE = "id_ed25519";
 
@@ -723,7 +696,7 @@ KEY_FILE = "id_ed25519";
-{coyote-configuration-contents 8} += +{coyote-configuration-contents 7} +=
 environment.sessionVariables.SSH_AUTH_SOCK = "/run/user/${builtins.toString USER_ID}/ssh-agent";
 
@@ -749,7 +722,7 @@ systemd.user.services.ssh-add-key = {
 

-

9. Home Manager configuration: coyote

+

8. Home Manager configuration: coyote

let's get into the fun fun stuff, yaeh.

not forgetting to set the flake module for it first though. as mentioned in the @@ -757,7 +730,7 @@ beginning, my preference is to have it loaded as a NixOS module.

-{coyote-configuration 8} += +{coyote-configuration 7} +=
 home-manager.nixosModules.home-manager
 {
@@ -766,25 +739,25 @@ home-manager.nixosModules.home-manager
   home-manager.extraSpecialArgs = {inherit inputs;};
   home-manager.users.coyote.imports = [
     ({ pkgs, config, lib, inputs, ... }: {
-      {coyote-home-manager-configuration, 9}
+      {coyote-home-manager-configuration, 8}
     })
   ];
 }
 
-

Used in section 4

+

Used in section 3

the basic contents structure is as follows. a separate section for programmes should make it easier for including more software configurations in the future.

-{coyote-home-manager-configuration 9} +{coyote-home-manager-configuration 8}
-{coyote-home-manager-configuration-contents, 9}
+{coyote-home-manager-configuration-contents, 8}
 programs = {
-  {coyote-home-manager-programs, 9}
+  {coyote-home-manager-programs, 8}
 };
 
@@ -795,7 +768,7 @@ programs = {

-{coyote-home-manager-configuration-contents 9} +{coyote-home-manager-configuration-contents 8}
 home.stateVersion = "26.05"; # Nope, didn't read the comment either.
 home.username = "coyote";
@@ -810,7 +783,7 @@ home.shell.enableShellIntegration = true;
 

-{coyote-home-manager-configuration-contents 9} += +{coyote-home-manager-configuration-contents 8} +=
 home.packages = with pkgs; [
   # TUI
@@ -841,11 +814,11 @@ bunch of others.
 

-{coyote-home-manager-programs 9} +{coyote-home-manager-programs 8}
-{coyote-home-manager-programs-general, 9}
-{coyote-home-manager-programs-vim, 9}
-{coyote-home-manager-programs-fastfetch, 9}
+{coyote-home-manager-programs-general, 8}
+{coyote-home-manager-programs-vim, 8}
+{coyote-home-manager-programs-fastfetch, 8}
 
@@ -856,7 +829,7 @@ LibreWolf profiles.)

-{coyote-home-manager-programs-general 9} +{coyote-home-manager-programs-general 8}
 tmux = {
   enable = true;
@@ -914,7 +887,7 @@ obs-studio.plugins = with pkgs.obs-studio-plugins; [
 

-{coyote-home-manager-programs-vim 9} +{coyote-home-manager-programs-vim 8}
 vim.enable = true;
 vim.packageConfigurable = pkgs.unstable.vim-full;
@@ -942,10 +915,10 @@ in
 

-{coyote-home-manager-programs-vim 9} += +{coyote-home-manager-programs-vim 8} +=
 vim.extraConfig = ''
-  {coyote-home-manager-programs-vim-vimrc, 9}
+  {coyote-home-manager-programs-vim-vimrc, 8}
 '';
 
@@ -957,7 +930,7 @@ options,

-{coyote-home-manager-programs-vim-vimrc 9} +{coyote-home-manager-programs-vim-vimrc 8}
 set nocompatible
 set encoding=utf-8
@@ -1000,7 +973,7 @@ set smartcase
 

-{coyote-home-manager-programs-vim-vimrc 9} += +{coyote-home-manager-programs-vim-vimrc 8} +=
 inoremap <C-l> λ
 
@@ -1012,7 +985,7 @@ inoremap <C-l> λ

-{coyote-home-manager-programs-vim-vimrc 9} += +{coyote-home-manager-programs-vim-vimrc 8} +=
 set termguicolors
 set background=dark
@@ -1027,7 +1000,7 @@ let g:terminal_ansi_colors = ['#282828', '#cc241d', '#98971a', '#d79921', '#4585
 

-{coyote-home-manager-programs-vim-vimrc 9} += +{coyote-home-manager-programs-vim-vimrc 8} +=
 let g:rainbow_active = 1
 
@@ -1045,7 +1018,7 @@ dotfiles generation into ~/.vim/after/ftplugin/.

-{coyote-home-manager-configuration-contents 9} += +{coyote-home-manager-configuration-contents 8} +=
 home.file = let
 mkVimAfterFtplugin = content: langs:
@@ -1063,7 +1036,7 @@ mkVimAfterFtplugin = content: langs:
 

-{coyote-home-manager-configuration-contents 9} += +{coyote-home-manager-configuration-contents 8} +=
 tab2Vim = ''
   setlocal expandtab
@@ -1105,7 +1078,7 @@ the .vim files get generated automatically!
 

-{coyote-home-manager-configuration-contents 9} += +{coyote-home-manager-configuration-contents 8} +=
 in
   lib.mkMerge [
@@ -1127,7 +1100,7 @@ one of the preset settings but with a minified distro logo.
 

-{coyote-home-manager-programs-fastfetch 9} +{coyote-home-manager-programs-fastfetch 8}
 fastfetch.enable = true;
 fastfetch.settings = {
@@ -1165,13 +1138,13 @@ fastfetch.settings = {
 

-

10. licence

+

9. licence

this configuration is provided under the MIT licence, a copy of which can be read below.

-{LICENSE 10} +{LICENSE 9}
 MIT License
 
diff --git a/nixos.lit b/nixos.lit
index 8c8ec94..f00bc68 100644
--- a/nixos.lit
+++ b/nixos.lit
@@ -4,21 +4,6 @@
 
 @title asnev's NixOS configuration
 
-@s table of contents
-
-- [table of contents](#1:1)
-- [introduction](#1:2)
-- [limitations](#1:3)
-- [flake structure](#1:4)
-- [global NixOS options](#1:5)
-- [host configuration: phostron](#1:6)
-- [desktop configuration: KDE Plasma](#1:7)
-- [user configuration: coyote](#1:8)
-- [Home Manager configuration: coyote](#1:9)
-- [licence](#1:10)
-
-
- @s introduction welcome! this page is the literate configuration for my NixOS setup. here, @@ -270,7 +255,7 @@ nothing much here, starting with a few options to prettify the terminal a bit. > --[0atman](https://youtu.be/rWMQ-g2QDsI?t=117) yes, the lambda (λ) as a terminal prompt character absolutely counts towards -style points. (joke) +style points. --- nixos-configuration-programs-contents fish.enable = true;