GithubHelp home page GithubHelp logo

icy-thought / snowflake Goto Github PK

View Code? Open in Web Editor NEW
170.0 3.0 10.0 209.52 MB

A repository which contains my current Nix (flake-based) setup!

License: GNU Affero General Public License v3.0

Nix 71.40% Python 8.15% Lua 2.85% Haskell 10.23% CSS 5.61% SCSS 0.83% Common Lisp 0.80% NewLisp 0.12%
nixos nix-flakes xmonad neovim rofi taffybar qtile wezterm sioyek catppuccin

snowflake's Introduction

Snowflake

Stars Issues Size

Table of Contents

Desktop Preview

XMonad

XMonad

Emacs

Emacs

Neovim

Neovim

Introduction

A hamerspace containing a declarative NixOS environment consisting of many hand-crafted configurations, ranging from: Kitty, Alacritty, Doom-Emacs, Zathura to many other applications which can be found in the ./home directory.

Warning

This repository, similar to other dotfile/configuration repositories, is subjected to change. The reader ought to read through the commit history before blindly cloning, fetching or updating the necessary files required to power up their NixOS environment!

In this README I will attempt to explain how to replicate my NixOS setup or achieve similar feats. If you find this guide not as useful as it was designed to be, do submit an issue requesting a change for the specific sections you found to be confusing. Or submit a push request (PR) to this repository and hopefully we can produce better results together!

Throughout my Nix journey, I've came across two interesting projects and among those projects are Nix-Flakes and Home-Manager. (Both projects will be introduced later in this README.) These projects have been setup in such manner that allows its users to carefully tune their system environments to their liking!

Note

This project is still in its early stages! Henceforth one should familiarize themselves with the Risks that comes with the usage of such experimental features.

Getting Started

NixOS Installer

As of 22.05 the NixOS ISO comes equipped with a well-developed installer that reduces the "complexity" of installing NixOS on your device! Therefore manual intervention should not be required for a minimal installation.

Prepare System Environment for Nix-Flake

Don't forget to append the following lines of code to your /etc/nixos/configuration.nix:

nix.package = pkgs.nixUnstable;
nix.extraOptions = ''
  experimental-features = nix-command flakes
'';

Nix-Flake: Beginning of a Journey

1. Cloning Snowflake

git clone --depth 1 https://github.com/Icy-Thought/Snowflake.git

2. Creating hosts/deviceX Directory

cd snowflake && cp -r templates/hosts/desktop hosts/deviceX

where deviceX is the name you'd like to give to your host device. This name will later be used when installing/updating your new NixOS setup.

3. Replace hardware.nix with hardware-configuration.nix

Suggestion: before replacing hardware.nix with your hardware-configuration.nix:

  1. view the file and see what you'd like to retain
  2. rename the file (backup)
  3. add your Nix generated hardware configuration .nix file
  4. paste your desired configurations in your new file

OTHERWISE, proceed by executing the command below.

cp /etc/nixos/hardware-configuration.nix deviceX/hardware.nix

4. Replacing Necessary Configuration Entries

1. Snowflake Directory

Warning

As of now, my snowflake directory is expected to be placed inside ~/Workspace/public/snowflake/. And for your configuration to work properly you are expected to place the directory in that exact location!

Modify snowflake.dir to point to the location where you are keeping the snowflake repository:

dir = mkOpt path (findFirst pathExists (toString ../.) [
"${config.user.home}/git/icy-thought/snowflake"
"/etc/snowflake"
]);

2. Remove Redundant CPU Setting

For the sake of making things quicker (not the wisest choice), I have added both Intel and AMD CPU settings in the hardware.nix template. Therefore you ought to remove the one not being used.

There might be other configurations that you need to add to your hardware.nix file, therefore it is the wisest choice to always look (grep hardware.) in the NixOS Manual.

hardware.cpu.amd.updateMicrocode = true;
hardware.cpu.intel.updateMicrocode = true;

3. Hide Your File-system From Nautilus & Dolphin

Note

By default, Nautilus & Dolphin does not hide system partitions from mounted devices category.

I have chosen to hide those partitions from the mounted devices category of the mentioned file managers. I have also added several kernel parameters and other device-specific configurations for my setup in this repository. (check hosts/deviceX)

What you are required to edit is:

  1. fileSystems entries in default.nix.
  2. The specific parts which you wish to exclude from your setup, such as: kernel parameters, modules to disable, packages to be installed among other configurations.

(Example): hiding /boot from Nautilus mounted devices.

fileSystems."/boot" = {
  device = "/dev/disk/by-label/BOOT";
  fsType = "vfat";
  options = [ "x-gvfs-hide" ]; # For hiding boot partition entry in Nautilus.
};

Warning

Make sure to replace /dev/disk/by-uuid/xyz (or partuuid) with /dev/disk/by-label/X, where X follows the label you have chosen to name your partitions with during your partition setup.

5. Installing Nix-Flake System

Note

Before rebuilding our NixOS system with our new device configurations, we ought to make our flake.nix aware of our new device directory (deviceX). Otherwise you'll run into #25!

git add ./hosts/deviceX/*

After completing your setup, there remains one command to be executed (device = directory name of your device placed inside hosts, which in this case is deviceX:

nixos-rebuild switch --use-remote-sudo --flake .#deviceX --impure";
reboot

Congratulations! 🎉

You have successful installed your/my personally hand-crafted/replicated Nix-Flake environment. I hope it suits your needs, if not then you are always welcome to propose changes or fork the project and customize the repository to your heart's content!

Useful Links

  • NixOS Manual: A manual for the newcomer to read and understand different parts of the NixOS distribution.
  • Home-Manager: Helps you manage your ~/home related configurations.
  • Nix Pills: A series written to familiarize the user with the Nix programming language.
  • Nixpkgs Unstable: A manual which introduces the Nix-language to people unfamiliar with the wonders of this language.
  • Nix Flake MVP: A written Nix guide by edolstra.
  • A Tour of Nix: a beautifully crafted introduction into the Nix programming language.

Special Thanks

snowflake's People

Contributors

colonelpanic8 avatar icy-thought avatar maralorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

snowflake's Issues

[TODO] EWW Config

Current issues:

  1. Non-existing configuration!

Solutions?

  1. Write a personal configuration to match something similar to the famous configurations out there... or perform the upgrades on the pre-existing waybar config.

[TODO] Hyprland Conf

Hyprland issues:

  1. No display-manager would start on rebuild.
  2. Config keybindings remains to be completed.
  3. Wayland settings in modules.themes + disable x11 related settings.
  4. Waybar ought to be fixed or replaced with Taffybar. (if wayland support has been added)
  5. Replace xkb with KMonad after package == fixed.

[TODO] XMonad Conf

Merging XMonad and moving progress tracking to an issue instead.

Current issues:

  1. Config remains to be written to a stable state.
  2. Taffybar -> rewrite after new version release to prevent rebuilding.
    a. Expand Taffybar configuration to something similar to EWW configs.

Switching to DevOS (NixOS config architecture)

Hey! I really like the configuration that you have put together!
I think the structure was taken from a very old version of DevOS ;)
You should check the updated version, they have helping tools to manage the config and a lot of other cool stuff. And for people using DevOS, we can easily take some parts of your config independently 😁
Have fun!

instructions unclear at the end

Hello, I was trying to setup your dots on NixOS unstable but I keep having trouble with the ending command, It says

After completing your setup, there remains one command to be executed (device = folder name of your device placed inside hosts, which in this case is X:

when in the command, the device is never mentioned, I could just be dumb, and I don't know if this is the place for help, but I don't know where else to put it.

I also might be stupid to say that when running the command, it throws me this error;

error: syntax error, unexpected end of file

       at /nix/store/iwxphjd3klhhvprixy5qf2vz4nhdbic1-source/modules/networking/wgConnect/akkadianVPN.nix:1:1:

<̙{c3ȚOZR8hг,f<.uઢ/OezՕH,gտKRrHG\6@p;Z?_hR?iؓpȉEf6Rv0[p3SVn$[Α5c$#8;왆ǤU!m)8ř_YΨQ0 A7aO'K d,b
                                                                                                        | ^
            2| 3drS9Ȱ3f)ɞ+=xjb~_Hv?z)h	Btagl'h]uoG7;UVuH)0Eըa=Ht" &4Zhf[:qv幛_V/h!k2gIi:6\x&8p"R$6ċ.kôa|\GjN|, bޫQmNHR|rml^
                                                                                                                           q<H%Sr@>o=W6ZF.Z|s;Ff	&Oqr1+eFĂK/ܝT<\b\yeolž5!bv3J쿲 L{IU;
                                                                                                                                                                                            5HU^(3oE-*|vXNtmɺ|RYf.]"TeX_pѐSf6.L,

I ran nix-collect-garbage but it still gave me this error and to be honest, I'm completely out of ideas

Flake does not provide attribute error

Using the final command and replacing '.#conf-name' with '.#{my-device-name}' gets the error:

flake 'git+file:///root/Snowflake does not provide attribute 'packages.x86_64-linux.nixosConfigurations."{my-device-name}".config.system.build.nixos-rebuild'.... and more

I'm really new to this.. but I loved your setup.. so wanted to replicate it.
I'm sorry if this was a noob mistake that could've been solved easily.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.