https://github.com/sofianedjerbi/devflake
NixOs System Configuration
https://github.com/sofianedjerbi/devflake
Last synced: 2 months ago
JSON representation
NixOs System Configuration
- Host: GitHub
- URL: https://github.com/sofianedjerbi/devflake
- Owner: sofianedjerbi
- Created: 2025-02-22T02:47:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-10T05:41:57.000Z (about 1 year ago)
- Last Synced: 2025-04-10T06:36:36.576Z (about 1 year ago)
- Language: Nix
- Size: 3.48 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DevFlake: Multi-User NixOS Configuration
A modular NixOS configuration using flakes that supports multiple hosts and users.
## Quick Start
```bash
# Deploy to current host
sudo nixos-rebuild switch --flake .#hostname
# Update packages
nix flake update
# Add host/user
./setup.sh add-host hostname
./setup.sh add-user username
```
## Features
- Automatic discovery of hosts and users
- Common settings shared across machines
- Per-user configurations
- Modular structure for easy extension
## Project Structure
```
├── flake.nix # Main entry point
├── hosts/ # Host-specific configs
│ ├── _modules/ # Common host settings
│ └── hostname/ # Host configuration
├── users/ # User configs
│ ├── _modules/ # Common user settings
│ └── username/ # User configuration
├── modules/ # Shared modules
│ ├── desktop/ # Desktop environment modules
│ └── home/ # Home-manager modules
└── resources/ # Shared resources
```
## Adding Users to a Host
Edit the `enabledUsers` list in a host's config:
```nix
# hosts/hostname/default.nix
enabledUsers = [
"sofiane"
"newuser"
];
```
## Common Tasks
```bash
# Update specific input
nix flake lock --update-input nixpkgs
# Build Home Manager configuration
home-manager switch --flake .#username
# Deploy to specific host
./setup.sh deploy hostname
```
## Development
```bash
# Enter development shell
nix develop
```