1
Fork 0
Modular NixOS configuration.
Find a file
caem f217128dcc
Add some security enhancements at the cost of perf
Currently experimenting with whether or not it's worth running ClamAV.
Realistically speaking, I probably don't need it, all my executables are
sourced from nixpkgs and should be malware free. I don't even know if it
scans the store or anything. I'm just going to leave it here and forget
about it and maybe sometime in the future it saves me from something idk.
2024-07-09 14:01:37 +02:00
assets Update screnshot 2024-06-24 01:16:45 +02:00
machines/workstation The sex update 2024-07-06 01:23:37 +02:00
packages Add some security enhancements at the cost of perf 2024-07-09 14:01:37 +02:00
users Opt-in state for opentabletdriver 2024-07-07 23:25:27 +02:00
.gitattributes Mark the vendored ags configuration files as such 2024-05-30 19:46:24 +02:00
.gitignore Replace legacy configuration with the new 2024-04-04 01:41:19 +02:00
flake.lock Update flake.lock 2024-07-09 14:01:19 +02:00
flake.nix Migrate away from stylix and gruvbox 2024-06-23 14:41:07 +02:00
non-nixos-install.sh Fix install script for non-nixos 2024-06-06 16:28:28 +02:00
README.md Add packages and media keys to hyprland 2024-06-25 01:28:34 +02:00

nixos-system-config

My NixOS configuration.

About

This is the NixOS configuration that I daily drive on my system. Feel free to use, modify and share this configuration to your heart's content, no attribution required.

Screenshots

Wallpaper.

Screeenshot

Layout

├── assets                              ; Images used by the config and repo
│   └── wallpaper.png
├── flake.lock
├── flake.nix                           ; Entry point
├── machines                            ; Machine specific configuration
│   └── workstation
│       ├── configuration.nix
│       ├── hardware-configuration.nix  ; Modified hardware configuration
│       └── persist.nix                 ; Impermanence configuration
├── packages                            ; Sets of packages to install and configure
│   ├── sets
│   │   ├── games.nix
│   │   └── ...
│   └── wm                              ; Package sets and basic config for WM and DE
│       ├── hyprland.nix
│       └── ...
├── README.md
├── secrets                             ; Git ignored folder to store confidentials
│   └── hu
│       └── pass                        ; Hashed password file for user
└── users
    └── hu                              ; User specific configuration
        ├── packages                    ; Package configurations
        │   ├── firefox.nix             ; Configurations can be for NixOS or home-manager
        │   ├── ...
        │   └── zsh
        │       ├── config              ; Non-nix package config directory
        │       │   └── conf.d
        │       ├── zsh-home.nix        ; For home-manager
        │       └── zsh.nix             ; For NixOS
        ├── persist.nix                 ; Impermanence configuration for the user
        └── user.nix

Installing

NixOS

This configuration uses impermanence with btrfs snapshots so you'll have to partition your system in a certain way.

First you'll need this partition layout, assuming you're installing on nvme0n1.

DEVICE              FILESYSTEM      PURPOSE
/dev/nvme0n1
├─/dev/nvme0n1p1    vfat            EFI partition
└─/dev/nvme0n1p2    btrfs           Partition to house all the subvolumes

Inside of the btrfs root volume we're going to need 2 subvolumes.

SUBVOLUME           MOUNT           PURPOSE
root                /               Impermanent data
nix                 /nix            Permanent data

You'll also need to create a read-only snapshot of the root subvolume and call it root-blank.

After you've mounted all the subvolumes and EFI partition (/boot) in /mnt clone this repository in to /mnt/nix/config. Adjust all the block ids of the partitions in hardware-configuration.nix and create a hashed password using mkpasswd and store it in the secrets/{user} directory as pass.

Finally, in the config directory run nixos-install --flake '.#', reboot and you're done.

Non-NixOS

Run the non-nixos-install.sh script. It will install both home-manager and nix. Your user is assumed to be called "i". You need to replace every instance of it in case you want to use a different username.