Giter Club home page Giter Club logo

nixos's Introduction

NixOS Configurations

Clone this Repo and replace /etc/nixos/configuration.nix with a symlink to the configuration in this repo.

git clone [email protected]:elberfeld/nixos.git
ln -s /home/{username}/{git path}/{configfile}.nix /etc/nixos/configuration.nix 

Setup Nix-Chanels

nix-channel --remove nixos
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update

Clone with SSH Key from Yubikey

The folowing extensions in configuration.nix are needed

services.yubikey-agent.enable = true;

Usage in WSL (preparation)

  1. Insatllation Guide: https://nix-community.github.io/NixOS-WSL/install.html

  2. Use this command for import (Windows CMD), so the VHD is stored in %USERPROFILE%\NixOS\

wsl --import NixOS %USERPROFILE%\NixOS\ %USERPROFILE%\Downloads\nixos-wsl.tar.gz --version 2
  1. Confugure and Update Nix-Channels

  2. Switch the defult user in configuration.nix and run nixos-rebuild boot (do not use switch!)

  wsl.defaultUser = "chris";

  environment.systemPackages = with pkgs; [
    git
    nano
    socat
    wget
  ];

  users.users.chris = {
    
    isNormalUser = true;
    initialPassword = "Pass@word1+";
    
    extraGroups = [ 
      "networkmanager"
      "wheel"
    ];

  };

  1. Force WSL to shotdown and relogin
wsl --shutdown
  1. Manually load SSH Key from wincryptsshagent in windows and clone git Repo
export SSH_AUTH_SOCK=/tmp/wincrypt-hv.sock
ss -lnx | grep -q $SSH_AUTH_SOCK
if [ $? -ne 0 ]; then
        rm -f $SSH_AUTH_SOCK
  (setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork SOCKET-CONNECT:40:0:x0000x33332222x02000000x00000000 >/dev/null 2>&1)
fi
ssh-add -l

nixos's People

Contributors

elberfeld avatar

Watchers

 avatar  avatar

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.