https://github.com/misumisumi/nixos-desktop-config
My nixos and home-manager configrations
https://github.com/misumisumi/nixos-desktop-config
chezmoi dotfiles home-manager nix nixos
Last synced: 6 months ago
JSON representation
My nixos and home-manager configrations
- Host: GitHub
- URL: https://github.com/misumisumi/nixos-desktop-config
- Owner: misumisumi
- Created: 2022-10-31T14:24:04.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-11T19:10:58.000Z (6 months ago)
- Last Synced: 2025-04-11T20:25:24.887Z (6 months ago)
- Topics: chezmoi, dotfiles, home-manager, nix, nixos
- Language: Nix
- Homepage:
- Size: 54.3 MB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README-ja.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# misumisumi' NixOS & nix-darwin System Configuration & Home-Manager Configuration Flake
nix の世界へようこそ!!
これは[misumisumi](https://github.com/misumisumi)のNixOSおよびhome-managerの設定です。
## 説明
- このリポジトリは[Nix Flakes](https://nixos.wiki/wiki/Flakes)によって管理されています。
- デスクトップ環境、CLI環境で試用することができます。
- DE: Qtile or GNOME
- スタンドアローン[home-manager](https://github.com/nix-community/home-manager)のサポート
- 複数カラースキームのサポート
- [chezmoi](./chezmoi)による非nix環境・マルチプラットフォームでの宣言的な環境構築
- `chezmoi`以下のファイルを`nix`が読み込むため設定が重複しない (一部除く)```shell
├── apps
│ ├── color-theme # color themes
│ ├── system # system wide application configurations (NixOS options)
│ └── user # user wide application configurations (home-manager options)
│ ├── cli # settings of cli app
│ ├── core # apps required for the minimum user environment
│ ├── desktop # settings of desktop app
│ ├── presets # environment presets
│ └── shell # bash and zsh settings
├── chezmoi # dotfiles structure for chezmoi
├── machines # settings for each my machines
├── modules # my custom nixosModules and homeManagerModules
├── patches # patch of package
├── settings # common system settings
│ ├── system # system wide
│ └── user # user wide
├── sops # secrets
└── users # settings for each users
```## Module Usage
詳細は[./machines/default.nix](./machines/home-manager.nix)または[./machines/home-manager.nix](./machines/home-manager.nix)を参照
```nix
{
inputs = {
dotfiles.url = "github:misumisumi/nixos-desktop-config"
# ...
};
# ...
# import nixosModules by inputs.dotfiles.nixosModules.
# import homeManageModules by inputs.dotfiles.homeManagerModules.
outputs = inputs@{...}: {
homeConfigurations = {
myenv = inputs.home-manager.lib.homeManagerConfiguration {
...
extraSpecialArgs = {
hostname = "nixos";
user = "hogehoge";
homeDirectory = "";
schemes = [
"presets/large"
];
colorTheme = "tokyonight-moon"
inherit inputs;
};
...
};
};
};
}
```## Installation Guide
> [!WARNING]
> 自分の環境で動くことに主眼を置いてメンテナンスしています。
> `liveimg-*`及びスタンドアローン`home-manager`は十分にテストされていません。### NixOS
1. `nix`環境の構築
- Container from [DockerHub (nixos/nix)](https://hub.docker.com/r/nixos/nix/tags)
- Install nix package manager from [official guide](https://nixos.org/download)
- Launch VM using [official iso](https://nixos.org/download)2. ネットワーク接続の確認
- run `ip -c a and ping 8.8.8.8`
- wireless settings use `nmcli` or `wpa_supplicant`3. インストール
- リポジトリをcloneした場合は`--flake .#`に読み替える
#### Bootable External Disk
```sh
# 1. Create key file for luks
echo > /tmp/luks.key# 2. Edit `device` in machines/liveimg/filesystem
# 3. Check flake name (liveimg-cli-* or liveimg--*, *-iso is for ISO creation, not use here)
# 4. Format disk and mount to `/mnt`
# "liveimg-cli" for CLI env, "liveimg-" for Desktop Environment
nix run nixpkgs#disko -- -m disko --flake "github:misumisumi/nixos-desktop-config#"# Install NixOS to `/mnt`
nixos-install --no-root-passwd --flake "github:misumisumi/nixos-desktop-config#"
```#### Create LiveCD
```sh
# 1. Check flake name (liveimg-*-iso)
# 2. Create .iso file (build takes a long time)
nix run nixpkgs#nixos-generators -- --format iso -o result --flake github:misumisumi/nixos-desktop-config## Write iso to device
dd if=result/iso/*.iso of=/dev/sdX status=progress
```#### スタンドアローンhome-manager
1. Setup home-manager
- See [home-manager official manual](https://nix-community.github.io/home-manager/index.xhtml#sec-install-standalone)
2. Switch to config
```sh
# Flace name is or -
# For , `small` is CLI env, `medium` is CLI with texlive, and `huge` is GUI env.
# is managed by home-manager, so choose something other than the user's default
# no `-` does not include shell.
home-manager switch --flake github:misumisumi/nixos-desktop-config#small-zsh
```## Appendix
### System Compornents
- Common Compornents
| | Linux (GNOME) | Linux (Qtile) |
| :-----------: | :--------------------------: | :--------------------------: |
| window system | Wayland or X11 | X11 |
| Shell | Zsh | Zsh |
| Terminal | Wezterm | Wezterm |
| Editor | Neovim | Neovim |
| Browser | Vivaldi & Firefox | Vivaldi & Firefox |
| Input Method | Fcitx5+mozc & skk | Fcitx5 & skk |
| Launcher | Rofi | Rofi |
| Theme | catppuccin, nord, tokyonight | catppuccin, nord, tokyonight |
| System Font | Noto Fonts CJK | Noto Fonts CJK |### Gallery
catppuccin-macchiato

nord

tokyonight-moon
