Giter Site home page Giter Site logo

gorgeos's Introduction

built with nix

Profiles:

  • OS: NixOS
  • Window Manager:
    • Hyprland
  • Shell::
    • ZSH
  • Terminal::
    • Kitty
  • Editor:
    • Neovim
    • Visual Studio Code
  • Shell:
    • Nodejs

๐Ÿ“ฆ Repository Contents

  • Flake: configurations for code formatting, and pre-commit hooks.
  • Home: Home-Manager configurations.
  • Hosts: Configurations specific to individual hosts.
  • Lib: Personal library and utilities.
  • Modules: Shared system-wide modules.
  • pkgs: Customized and additional packages.
  • shells Shell templates to reuse

๐Ÿ”จ Install

After boot to Nix installation.

[Optional] Connect wifi

systemctl start wpa_supplicant
wpa_cli
scan
add_network
set_network 0 ssid "wifi-name"
set_network 0 psk "wifi-password"
enable_network 0
save_config
reconnect

Then CTRL-D to exit.

Clone repo

nix-shell -p git
git clone https://ducnguyen96/gorgeos

Disk partioning and mounting

Customize host and home

Host

You can cp hosts/e14g2 to your own host for example:

cp -r hosts/e14g2 hosts/8570w

Then generate your hardware config

nixos-generate-config --root /mnt

Copy the hardware config to your host

cp /mnt/etc/nixos/hardware-configuration.nix hosts/8570w

Add your host to the flake [!NOTE]: Replace user below with your user home-manager.users.<your-user>.imports = ...

hosts/default.nix

{
  homeImports,
  inputs,
  self,
  themes,
  ...
}: let
  inherit (inputs.nixpkgs.lib) nixosSystem;

  modules = "${self}/modules/system";
  hardware = modules + "/hardware";
  profiles = "${self}/hosts/profiles";

  specialArgs = {inherit inputs self themes;};
in {
  flake.nixosConfigurations = {
    8570w = nixosSystem {
      inherit specialArgs;

      modules = [
        ./8570w

        "${modules}/config"
        "${modules}/programs"
        "${modules}/security"
        "${modules}/services"
        "${modules}/virtualization/docker.nix"
        "${hardware}/bluetooth.nix"
        "${hardware}/intel.nix"
        "${hardware}/amd.nix"
        "${profiles}/hyprland"

        {
          home-manager = {
            users.duc.imports = homeImports."duc@hyprland";
            extraSpecialArgs = specialArgs;
          };
        }
      ];
    };
  };
}

Replace the user in:

Home

You can modify the existing profile or add a new profile as follow:

touch home/profiles/new-profile.nix

Add the profile to the flex

home/default.nix

flake = {
  homeConfigurations = withSystem "x86_64-linux" ({pkgs, ...}: {
    "duc@hyprland" = homeManagerConfiguration {
        inherit pkgs;
        modules = homeImports."duc@hyprland";
      };
    "new-profile" = homeManagerConfiguration {
      inherit pkgs;
    };
  });
};

Then you can use the profile for your host hosts/default.nix

8570w = nixosSystem {
  modules =
    [
      ./8570w
      ../modules/hardware/audio
      ../modules/hardware/gpu/intel.nix
      self.nixosModules.hyprland
      {home-manager.users.<your-user>.imports = homeImports."new-profile";}
    ];
};

nixos-install

After updating host and home as you like you can install the whole thing with

8570w here is your host

nixos-install --flake .#8570w

It will take a while. Then after that you can reboot.

Daily usages

Rebuild

# note that rebuild script assume your flake is in the same directory as this repo which is ~/Documents/Code/gorgeos
rebuild

Delete system old generations

sudo nix-collect-garbage -d

Delete home old generations

nix-collect-garbage -d

gorgeos's People

Contributors

ducnguyen96 avatar

Stargazers

jakedao avatar Minh Le avatar  avatar  avatar  avatar Zubayr Ali avatar

Watchers

 avatar

Forkers

siryoussef

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.