Compare commits
10 Commits
07fb5656f2
...
91c775a6c3
| Author | SHA1 | Date | |
|---|---|---|---|
| 91c775a6c3 | |||
| a6c4cc7922 | |||
| dc47722b8b | |||
| 6215127089 | |||
| dccdcd4f18 | |||
| e7ab8c10d8 | |||
| e6188adc0d | |||
| c567ca5c3f | |||
| 447cd2954d | |||
| 9e59e32d0e |
@@ -2,4 +2,5 @@ result
|
||||
.#*
|
||||
*.qcow2
|
||||
.direnv
|
||||
.agent-shell
|
||||
|
||||
|
||||
@@ -4,90 +4,83 @@ This is a NixOS/Nix flake-based configuration repository using home-manager for
|
||||
|
||||
## Build Commands
|
||||
|
||||
### Evaluating Configuration
|
||||
### Evaluating
|
||||
```bash
|
||||
# Evaluate system config (Lauretta laptop)
|
||||
nix eval .#nixosConfigurations.lauretta.config.system.build.toplevel
|
||||
|
||||
# Evaluate flake info
|
||||
nix flake show
|
||||
|
||||
# Evaluate all outputs
|
||||
nix eval . --apply 'x: x'
|
||||
```
|
||||
|
||||
### Building
|
||||
```bash
|
||||
# Build VM
|
||||
nix build .#nixosConfigurations.vm.config.system.build.vm
|
||||
# Or with submodules
|
||||
# VM (with submodules for azos-core)
|
||||
nix build '.?submodules=1#nixosConfigurations.vm.config.system.build.vm'
|
||||
|
||||
# Build formatter (alejandra)
|
||||
# Formatter
|
||||
nix build .#formatter.x86_64-linux
|
||||
```
|
||||
|
||||
### Deploying
|
||||
```bash
|
||||
# Switch to new config (Lauretta)
|
||||
# Rebuild the azos environment for lauretta (this machine) — use this when asked to "rebuild"
|
||||
sudo nixos-rebuild switch --flake '.?submodules=1#lauretta'
|
||||
|
||||
# Update flake inputs
|
||||
nix flake update
|
||||
|
||||
# Update specific input
|
||||
nix flake lock --update-input azos-core
|
||||
nix flake update # Update all inputs
|
||||
nix flake lock --update-input X # Update specific input
|
||||
```
|
||||
|
||||
### Nix REPL
|
||||
> **Note**: When the user asks to "rebuild", they mean rebuilding the lauretta environment with the command above — NOT building the VM.
|
||||
|
||||
### Dev Shell & REPL
|
||||
```bash
|
||||
nix develop .#shells.x86_64-linux.default
|
||||
nix repl
|
||||
:lf .
|
||||
# Then explore with:
|
||||
inputs.nixpkgs.lib
|
||||
```
|
||||
|
||||
### Dev Shell
|
||||
### Ad-hoc Commands
|
||||
If an executable doesn't exist on the system, run it ad-hoc with:
|
||||
```bash
|
||||
nix develop .#shells.x86_64-linux.debugTexShell
|
||||
```
|
||||
|
||||
### Garbage Collection
|
||||
```bash
|
||||
sudo nix-collect-garbage --delete-old
|
||||
nix shell nixpkgs#<package> --command <cmd> <args>
|
||||
```
|
||||
|
||||
## Linting/Formatting
|
||||
|
||||
This project uses [alejandra](https://github.comkamadorama/alejandra) as the formatter.
|
||||
|
||||
Uses [alejandra](https://github.com/kamadorama/alejandra):
|
||||
```bash
|
||||
# Format all Nix files
|
||||
nix fmt
|
||||
|
||||
# Or use alejandra directly
|
||||
nix fmt # Format all Nix files
|
||||
alejandra .
|
||||
```
|
||||
|
||||
There are no automated tests in this repository. VM testing is manual:
|
||||
## Testing
|
||||
|
||||
Manual VM testing:
|
||||
```bash
|
||||
# Build and run VM
|
||||
nix build .#nixosConfigurations.vm.config.system.build.vm
|
||||
nix build '.?submodules=1#nixosConfigurations.vm.config.system.build.vm'
|
||||
./result/bin/run-nixos-vm
|
||||
```
|
||||
|
||||
## Emacs Debugging
|
||||
|
||||
When adding or debugging Emacs functionality, you can interact with the running Emacs session via `emacsclient` (with user permission):
|
||||
|
||||
```bash
|
||||
# Create and switch to a buffer
|
||||
emacsclient -c -e '(switch-to-buffer (get-buffer-create "test"))'
|
||||
|
||||
# Evaluate arbitrary Elisp
|
||||
emacsclient -e '(message "hello")'
|
||||
```
|
||||
|
||||
## Code Style Guidelines
|
||||
|
||||
### File Organization
|
||||
|
||||
- **Home-manager modules**: `modules/home-manager/<name>.nix`
|
||||
- **NixOS modules**: `modules/nixos/<name>.nix`
|
||||
- **Imports**: All modules are imported in `modules/home-manager/default.nix` and `modules/nixos/default.nix`
|
||||
- **Import sorting**: Alphabetical order in default.nix files
|
||||
- **Imports**: All modules in `modules/home-manager/default.nix` and `modules/nixos/default.nix` (alphabetical order)
|
||||
- **Home config**: `home-manager/home.nix` - main home-manager user config
|
||||
- **Custom packages**: `pkgs/` - custom package definitions
|
||||
- **Overlays**: `overlays/` - package overlays (addpkgs, modifications, unstable-packages)
|
||||
|
||||
### Nix Module Structure
|
||||
|
||||
Follow this template for home-manager modules:
|
||||
### Nix Module Template
|
||||
|
||||
```nix
|
||||
{
|
||||
@@ -106,95 +99,92 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
<package1>
|
||||
<package2>
|
||||
];
|
||||
home.packages = with pkgs; [ pkg1 pkg2 ];
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
### Naming Conventions
|
||||
- Option paths: `config.azos.<module-name>.<option>`
|
||||
- Enable option: `enable` (bool), default `true`
|
||||
- Module names: kebab-case (`libreoffice.nix`, `git-config.nix`)
|
||||
- Option names: may differ from filename (e.g., `git.nix` uses `azos.git-config`)
|
||||
- Variables: kebab-case (`isEnabled`)
|
||||
|
||||
- **Option paths**: `config.azos.<module-name>.<option>`
|
||||
- **Enable option**: Always `enable` (bool), default `true`
|
||||
- **Module names**: kebab-case (e.g., `libreoffice.nix`, `git-config.nix`)
|
||||
- **Variable names**: kebab-case in let bindings (e.g., `isEnabled`)
|
||||
|
||||
### Formatting Rules
|
||||
|
||||
- **Indentation**: 2 spaces
|
||||
- **Let bindings**: Multi-line format with `isEnabled` on its own line
|
||||
```nix
|
||||
let
|
||||
isEnabled =
|
||||
config.azos.module.enable;
|
||||
in
|
||||
```
|
||||
- **Imports**: Sorted alphabetically in default.nix
|
||||
- **Packages**: Use `with pkgs;` block for package lists
|
||||
### Formatting
|
||||
- Indentation: 2 spaces
|
||||
- Let bindings: multi-line with `isEnabled` on its own line
|
||||
- Packages: Use `with pkgs; [ ... ]` syntax
|
||||
|
||||
### Imports
|
||||
|
||||
- Always include `{...}` for module args even if unused
|
||||
- Standard module args: `lib, config, pkgs, ...`
|
||||
- Always include `{...}` for module args
|
||||
- Standard args: `lib, config, pkgs, ...`
|
||||
- NixOS config args: `inputs, outputs, lib, config, pkgs, ...`
|
||||
- Use `./relative/path.nix` for local imports
|
||||
|
||||
### Adding New Modules
|
||||
|
||||
1. Create file in appropriate directory (`modules/home-manager/` or `modules/nixos/`)
|
||||
2. Add import to `modules/<type>/default.nix` in alphabetical order
|
||||
3. Use the standard module template above
|
||||
4. Run `nix fmt` to format
|
||||
|
||||
### Option Patterns
|
||||
- Boolean enable: `lib.mkOption { default = true; example = true; type = lib.types.bool; }`
|
||||
- Conditional config: `lib.mkIf isEnabled { ... }`
|
||||
- User-overridable: `lib.mkDefault`
|
||||
- Force value: `lib.mkForce` (sparingly)
|
||||
|
||||
- **Boolean enable**: Always use `lib.mkOption` with `default = true`, `type = lib.types.bool`
|
||||
- **Conditional config**: Always use `lib.mkIf isEnabled` wrapper
|
||||
- **Package lists**: Use `with pkgs; [ ... ]` syntax
|
||||
### Home-Manager vs NixOS
|
||||
- Home-manager: `home.packages`, `home.file`, `programs.<program>`
|
||||
- NixOS: `config.services`, `environment.systemPackages`
|
||||
|
||||
### Error Handling
|
||||
### Suites System
|
||||
Modules are organized into suites (defined in `azos-core/`):
|
||||
- `azos.suites.base` - Base packages and config
|
||||
- `azos.suites.editor` - Editor tools
|
||||
- `azos.suites.dev` - Development tools
|
||||
- `azos.suites.station` - Desktop applications
|
||||
- `azos.suites.exwm` - EXWM window manager
|
||||
- Enable in `home-manager/home.nix` with `azos.suites.<name>.enable = true;`
|
||||
|
||||
- Use `lib.mkIf` for conditional configuration rather than if-then-else
|
||||
- Use `lib.mkDefault` for values that can be overridden by users
|
||||
- Use `lib.mkForce` sparingly for values that must not be overridden
|
||||
### Specializations
|
||||
NixOS supports specializations for alternative configurations:
|
||||
```nix
|
||||
specialisation = {
|
||||
hyprland = {
|
||||
configuration = {
|
||||
home-manager.users.aner = {pkgs, ...}: {
|
||||
azos.suites.exwm.enable = lib.mkForce false;
|
||||
azos.suites.hyprland.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
### Home-Manager Specific
|
||||
## Adding New Modules
|
||||
|
||||
- Config goes under `home` attribute (e.g., `home.packages`, `home.file`, `home.sessionVariables`)
|
||||
- Use `programs.<program>` for program configurations
|
||||
- Use `services.<service>` for system services
|
||||
|
||||
### NixOS Specific
|
||||
|
||||
- Config goes under `config` directly (e.g., `services`, `environment.systemPackages`)
|
||||
- Use `environment.systemPackages` for system-wide packages
|
||||
- Use `users.users.<name>` for user configuration
|
||||
1. Create file in `modules/home-manager/` or `modules/nixos/`
|
||||
2. Add import to `modules/<type>/default.nix` (alphabetical)
|
||||
3. Use module template above
|
||||
4. Run `nix fmt`
|
||||
|
||||
## Key Files
|
||||
|
||||
- `flake.nix`: Main flake definition, defines systems, overlays, modules
|
||||
- `modules/home-manager/default.nix`: Home-manager module imports
|
||||
- `modules/nixos/default.nix`: NixOS module imports
|
||||
- `nixos/configuration.nix`: Lauretta laptop configuration
|
||||
- `nixos/configuration-vm.nix`: Test VM configuration
|
||||
- `overlays/`: Custom package overlays
|
||||
- `pkgs/`: Custom packages
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `flake.nix` | Main flake, defines systems, overlays |
|
||||
| `modules/home-manager/default.nix` | Home-manager imports |
|
||||
| `modules/nixos/default.nix` | NixOS imports |
|
||||
| `home-manager/home.nix` | User home-manager config, enables suites |
|
||||
| `nixos/configuration.nix` | Lauretta laptop config |
|
||||
| `nixos/configuration-vm.nix` | Test VM config |
|
||||
| `overlays/` | Custom package overlays |
|
||||
| `pkgs/` | Custom packages |
|
||||
| `azos-core/` | Shared modules (submodule) |
|
||||
|
||||
## Common Tasks
|
||||
|
||||
### Add new package to system
|
||||
1. Create or edit module in `modules/nixos/`
|
||||
2. Add to `environment.systemPackages = with pkgs; [ pkg ]`
|
||||
**Add system package**: Edit NixOS module, add to `environment.systemPackages = with pkgs; [ pkg ]`
|
||||
|
||||
### Add new home-manager package
|
||||
1. Create or edit module in `modules/home-manager/`
|
||||
2. Add to `home.packages = with pkgs; [ pkg ]`
|
||||
**Add home-manager package**: Edit module, add to `home.packages = with pkgs; [ pkg ]`
|
||||
|
||||
### Add new system service
|
||||
1. Edit appropriate NixOS module
|
||||
2. Add service config under `services.<service>`
|
||||
**Add system service**: Edit NixOS module, add under `services.<service>`
|
||||
|
||||
### Test changes locally
|
||||
1. Build VM: `nix build .#nixosConfigurations.vm.config.system.build.vm`
|
||||
2. Run VM: `./result/bin/run-nixos-vm`
|
||||
**Add custom package**: Create file in `pkgs/`, add to `pkgs/default.nix`, use via overlay
|
||||
|
||||
**Access unstable packages**: Use `pkgs.unstable.<package>` (via unstable-packages overlay)
|
||||
|
||||
+1
-1
Submodule azos-core updated: 1fad02b20f...3d1cbc3323
Generated
+110
-27
@@ -3,7 +3,8 @@
|
||||
"azos-core": {
|
||||
"inputs": {
|
||||
"cabata": "cabata",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nix-search-cli": "nix-search-cli",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"path": "./azos-core",
|
||||
@@ -35,6 +36,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": [
|
||||
@@ -57,6 +74,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1676283394,
|
||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -64,30 +96,30 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772020340,
|
||||
"narHash": "sha256-aqBl3GNpCadMoJ/hVkWTijM1Aeilc278MjM+LA3jK6g=",
|
||||
"lastModified": 1774647770,
|
||||
"narHash": "sha256-UNNi14XiqRWWjO8ykbFwA5wRwx7EscsC+GItOVpuGjc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "36e38ca0d9afe4c55405fdf22179a5212243eecc",
|
||||
"rev": "02371c05a04a2876cf92e2d67a259e8f87399068",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.11",
|
||||
"ref": "master",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"musnix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1767232402,
|
||||
"narHash": "sha256-li+h6crnhc5Zqs+M6pn7D7M0W9M63ECNennDjRgzioE=",
|
||||
"lastModified": 1773185476,
|
||||
"narHash": "sha256-COuJkFg669oalmEN3T61gD3gM9SfUsiGvDS9pCOphZY=",
|
||||
"owner": "musnix",
|
||||
"repo": "musnix",
|
||||
"rev": "d65f98e0b1f792365f1705653d7b2d266ceeff6e",
|
||||
"rev": "739e2a1f94c87d5f4c8b880a12480185cf0d7620",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -96,13 +128,49 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-filter": {
|
||||
"locked": {
|
||||
"lastModified": 1710156097,
|
||||
"narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=",
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"rev": "3342559a24e85fc164b295c3444e8a139924675b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-search-cli": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nix-filter": "nix-filter",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762187737,
|
||||
"narHash": "sha256-NGL9jj4y16+d0Es7aK1oxqAimZn7sdJDAxVkcY3CTcg=",
|
||||
"owner": "peterldowns",
|
||||
"repo": "nix-search-cli",
|
||||
"rev": "ab0d5156c1e3b383c250ff273639cd3dea6de2d9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "peterldowns",
|
||||
"repo": "nix-search-cli",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1771969195,
|
||||
"narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=",
|
||||
"lastModified": 1774567711,
|
||||
"narHash": "sha256-uVlOHBvt6Vc/iYNJXLPa4c3cLXwMllOCVfAaLAcphIo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e",
|
||||
"rev": "3f6f874dfc34d386d10e434c48ad966c4832243e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -128,11 +196,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1771848320,
|
||||
"narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
|
||||
"lastModified": 1774386573,
|
||||
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fc6539b481e1d2569f25f8799236694180c0993",
|
||||
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -144,11 +212,26 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1771923393,
|
||||
"narHash": "sha256-Fy0+UXELv9hOE8WjYhJt8fMDLYTU2Dqn3cX4BwoGBos=",
|
||||
"lastModified": 1761752004,
|
||||
"narHash": "sha256-z83uhYagfW6ZnH5Svvaxx6O0a305sBLGCCJZBJnMD9w=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ddf56acbeb53825b79b82c13a657806774bfd137",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1774273680,
|
||||
"narHash": "sha256-a++tZ1RQsDb1I0NHrFwdGuRlR5TORvCEUksM459wKUA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ea7f1f06811ce7fcc81d6c6fd4213150c23edcf2",
|
||||
"rev": "fdc7b8f7b30fdbedec91b71ed82f36e1637483ed",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -156,13 +239,13 @@
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1766902085,
|
||||
"narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=",
|
||||
"lastModified": 1772198003,
|
||||
"narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4",
|
||||
"rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -172,13 +255,13 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1773476965,
|
||||
"narHash": "sha256-Laaj25PvGeoP5SPhMfMGxvWqM6ZjZ6LdUeEhP6b3czY=",
|
||||
"lastModified": 1774273680,
|
||||
"narHash": "sha256-a++tZ1RQsDb1I0NHrFwdGuRlR5TORvCEUksM459wKUA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f82ce7af0b79ac154b12e27ed800aeb97413723c",
|
||||
"rev": "fdc7b8f7b30fdbedec91b71ed82f36e1637483ed",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -194,7 +277,7 @@
|
||||
"home-manager": "home-manager",
|
||||
"musnix": "musnix",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
# Follow corresponding `release` branch from Home Manager
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
||||
@@ -5,17 +5,15 @@
|
||||
...
|
||||
}: let
|
||||
isEnabled =
|
||||
config.azos.chromium.enable;
|
||||
config.azos.claude.enable;
|
||||
in {
|
||||
options.azos.chromium.enable = lib.mkOption {
|
||||
options.azos.claude.enable = lib.mkOption {
|
||||
default = true;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
chromium
|
||||
];
|
||||
home.packages = with pkgs; [claude-code claude-agent-acp];
|
||||
};
|
||||
}
|
||||
@@ -1,26 +1,22 @@
|
||||
{
|
||||
imports = [
|
||||
./zoom.nix
|
||||
./ytdl.nix
|
||||
./mail.nix
|
||||
./encryption.nix
|
||||
./kubernetes.nix
|
||||
./git.nix
|
||||
./mpris-proxy.nix
|
||||
./qutebrowser-config.nix
|
||||
./audio.nix
|
||||
./reaper.nix
|
||||
./discord.nix
|
||||
./spotify.nix
|
||||
./claude.nix
|
||||
./encryption.nix
|
||||
./git.nix
|
||||
./hfsprogs.nix
|
||||
./headphones-whmx4000.nix
|
||||
./deluge.nix
|
||||
./lauretta-emacs.nix
|
||||
./gimp.nix
|
||||
# ./printing.nix
|
||||
./libreoffice.nix
|
||||
./chromium.nix
|
||||
./hyprland-suite.nix
|
||||
# ./gnuradio.nix
|
||||
./kubernetes.nix
|
||||
./lauretta-emacs.nix
|
||||
./mail.nix
|
||||
./mpris-proxy.nix
|
||||
./opencode.nix
|
||||
# ./printing.nix
|
||||
# ./gnuradio.nix
|
||||
./qutebrowser-config.nix
|
||||
./reaper.nix
|
||||
./snx-rs.nix
|
||||
./ytdl.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
isEnabled =
|
||||
config.azos.deluged.enable;
|
||||
in {
|
||||
options.azos.deluged.enable = lib.mkOption {
|
||||
default = true;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
deluged
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
isEnabled =
|
||||
config.azos.discord.enable;
|
||||
in {
|
||||
options.azos.discord.enable = lib.mkOption {
|
||||
default = true;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
discord
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -33,7 +33,6 @@ in {
|
||||
email = "aner@zakobar.com";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
home.file.".config/pass-git-helper/git-pass-mapping.ini".source =
|
||||
./pass-git-mapping.ini;
|
||||
|
||||
Executable → Regular
+3
-4
@@ -5,17 +5,16 @@
|
||||
...
|
||||
}: let
|
||||
isEnabled =
|
||||
config.azos.gimp.enable;
|
||||
config.azos.hfsprogs.enable;
|
||||
in {
|
||||
options.azos.gimp.enable = lib.mkOption {
|
||||
options.azos.hfsprogs.enable = lib.mkOption {
|
||||
default = true;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
gimp3
|
||||
hfsprogs
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -54,6 +54,5 @@ in {
|
||||
# StandardError = "journal";
|
||||
# };
|
||||
# };
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,5 +17,7 @@ in {
|
||||
|
||||
#Base emacs suite definition
|
||||
azos.emacs.pkgs = [pkgs.azos-emacs-lauretta];
|
||||
|
||||
home.packages = with pkgs; [pkgs.nix-search-cli];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
isEnabled =
|
||||
config.azos.libreoffice.enable;
|
||||
in {
|
||||
options.azos.libreoffice.enable = lib.mkOption {
|
||||
default = true;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
libreoffice
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -14,8 +14,6 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
opencode
|
||||
];
|
||||
programs.opencode.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ config.load_autoconfig(True)
|
||||
#Also using this https://github.com/miseran/tabs_are_windows/blob/main/config.py
|
||||
|
||||
c.tabs.show = 'never'
|
||||
c.session.default_name = ''
|
||||
c.auto_save.interval = 0
|
||||
c.tabs.tabs_are_windows = True
|
||||
c.window.title_format = 'qute: {private}{host}{perc}{title_sep}{current_title}'
|
||||
|
||||
@@ -26,12 +28,8 @@ c.url.searchengines = {
|
||||
|
||||
#Youtube stuff from DT.
|
||||
#Added media-title to MPV and youtube-dl with exwm process to track progress.
|
||||
config.bind('M', 'hint links spawn mpv --title=\'${media-title}\' {hint-url}')
|
||||
config.bind('Z',
|
||||
'hint links spawn emacsclient -e "(start-process '\
|
||||
'\\"youtube-dl {hint-url}\\" \\"youtube-dl {hint-url}\\" '\
|
||||
'\\"youtube-dl\\" \\"-o\\" \\"~/downloads/%(title)s.%(ext)s\\" '\
|
||||
'\\"{hint-url}\\" \\"--newline\\")"')
|
||||
config.bind('M', 'hint links spawn mpv --title="${media-title}" {hint-url}')
|
||||
config.bind('Z', 'hint links spawn emacsclient -e "(start-process \\"youtube-dl {hint-url}\\" \\"youtube-dl {hint-url}\\" \\"youtube-dl\\" \\"-o\\" \\"~/downloads/%(title)s.%(ext)s\\" \\"{hint-url}\\" \\"--newline\\")"')
|
||||
|
||||
config.bind('xb', 'config-cycle statusbar.show always in-mode')
|
||||
c.statusbar.show = 'in-mode'
|
||||
@@ -44,7 +42,7 @@ c.downloads.location.prompt = False
|
||||
|
||||
c.editor.command = ['emacsclient', '-e', '(find-file "{}")']
|
||||
|
||||
monospace = "10pt 'LiberationMono'"
|
||||
monospace = "10pt 'DejaVu Sans Mono'"
|
||||
c.fonts.completion.category = f"bold{monospace}"
|
||||
c.fonts.completion.entry = monospace
|
||||
c.fonts.debug_console = monospace
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
isEnabled =
|
||||
config.azos.snx-rs.enable;
|
||||
cfg = config.azos.snx-rs;
|
||||
in {
|
||||
options.azos.snx-rs = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
server = lib.mkOption {
|
||||
default = "vpn.bgu.ac.il";
|
||||
type = lib.types.str;
|
||||
description = "VPN server address";
|
||||
};
|
||||
username = lib.mkOption {
|
||||
default = "anerz@vpn";
|
||||
type = lib.types.str;
|
||||
description = "VPN username";
|
||||
};
|
||||
loginType = lib.mkOption {
|
||||
default = "vpn";
|
||||
type = lib.types.str;
|
||||
description = "Login type (e.g., vpn, vpn_Microsoft_Authenticator)";
|
||||
};
|
||||
ignoreServerCert = lib.mkOption {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
description = "Ignore server certificate validation";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
snx-rs
|
||||
(pkgs.writeShellScriptBin "snx-connect" ''
|
||||
#!/bin/sh
|
||||
sudo ${pkgs.snx-rs}/bin/snx-rs -m command &
|
||||
sleep 1
|
||||
${pkgs.snx-rs}/bin/snxctl connect
|
||||
'')
|
||||
(pkgs.writeShellScriptBin "snx-disconnect" ''
|
||||
#!/bin/sh
|
||||
${pkgs.snx-rs}/bin/snxctl disconnect
|
||||
pkill -x snx-rs 2>/dev/null || true
|
||||
'')
|
||||
];
|
||||
|
||||
home.file.".config/snx-rs/snx-rs.conf" = {
|
||||
text = ''
|
||||
server ${cfg.server}
|
||||
username ${cfg.username}
|
||||
login-type ${cfg.loginType}
|
||||
ignore-server-cert ${lib.boolToString cfg.ignoreServerCert}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
isEnabled =
|
||||
config.azos.spotify.enable;
|
||||
in {
|
||||
options.azos.spotify.enable = lib.mkOption {
|
||||
default = true;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
spotify
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}: let
|
||||
isEnabled =
|
||||
config.azos.discord.enable;
|
||||
config.azos.ytdl.enable;
|
||||
in {
|
||||
options.azos.ytdl.enable = lib.mkOption {
|
||||
default = true;
|
||||
|
||||
Executable → Regular
+3
-5
@@ -5,17 +5,15 @@
|
||||
...
|
||||
}: let
|
||||
isEnabled =
|
||||
config.azos.zoom.enable;
|
||||
config.azos.binfmt.enable;
|
||||
in {
|
||||
options.azos.zoom.enable = lib.mkOption {
|
||||
options.azos.binfmt.enable = lib.mkOption {
|
||||
default = true;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
zoom-us
|
||||
];
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
};
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
imports = [./audio.nix ./bluetooth.nix ./steam.nix ./virtualization.nix ];
|
||||
imports = [./audio.nix ./binfmt.nix ./bluetooth.nix ./steam.nix ./virtualization.nix];
|
||||
}
|
||||
|
||||
@@ -33,10 +33,8 @@ in {
|
||||
virt-viewer # Spice/VNC client that virt‑manager calls under the hood
|
||||
];
|
||||
|
||||
|
||||
services.spice-vdagentd.enable = true; # makes copy‑paste & auto‑resize work in Spice windows
|
||||
networking.firewall.allowedTCPPorts = [5900 5901]; # Spice ports (adjust if you expose elsewhere)
|
||||
networking.firewall.allowedUDPPorts = [5900 5901];
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -105,7 +105,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
orgTrivialBuild,
|
||||
epkgs,
|
||||
pkgs,
|
||||
} : orgTrivialBuild {
|
||||
}:
|
||||
orgTrivialBuild {
|
||||
pname = "azos-emacs-lauretta";
|
||||
version = "0.1.6";
|
||||
src = ./elisp/azos-emacs-lauretta.org;
|
||||
|
||||
@@ -26,21 +26,13 @@
|
||||
:stream t
|
||||
:key "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"
|
||||
:models '(openai/gpt-oss-120b)))
|
||||
;; This is where I would update agents if I had them
|
||||
;; (setq gptel-agent-dirs '("/home/aner/.agents"))
|
||||
;; (gptel-agent-update)
|
||||
#+end_src
|
||||
|
||||
(use-package agent-shell
|
||||
:ensure t
|
||||
:ensure-system-package
|
||||
:config
|
||||
;; Evil state-specific RET behavior: insert mode = newline, normal mode = send
|
||||
(evil-define-key 'insert agent-shell-mode-map (kbd "RET") #'newline)
|
||||
(evil-define-key 'normal agent-shell-mode-map (kbd "RET") #'comint-send-input)
|
||||
(add-hook 'diff-mode-hook
|
||||
(lambda ()
|
||||
(when (string-match-p "\\*agent-shell-diff\\*" (buffer-name))
|
||||
(evil-emacs-state)))))
|
||||
** Agent Shell
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq agent-shell-opencode-default-model-id "opencode/big-pickle")
|
||||
;; (setq agent-shell-preferred-agent-config (agent-shell-opencode-make-agent-config))
|
||||
#+end_src
|
||||
|
||||
** Headphones
|
||||
@@ -67,6 +59,75 @@
|
||||
(azos/audio/enable-tab-display))
|
||||
#+end_src
|
||||
|
||||
** Nixpkgs Search
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun azos/nixpkgs-parse-json-lines (str)
|
||||
"Parse JSON Lines format (one JSON object per line) from STR."
|
||||
(mapcar (lambda (line)
|
||||
(and (not (string-empty-p line))
|
||||
(string-match "^{" line)
|
||||
(condition-case nil
|
||||
(json-parse-string line)
|
||||
(error nil))))
|
||||
(split-string (string-trim str) "\n" t)))
|
||||
|
||||
(defun azos/nixpkgs-g (key hash)
|
||||
"Get KEY from HASH table."
|
||||
(when (hash-table-p hash)
|
||||
(gethash key hash)))
|
||||
|
||||
(defun azos/nixpkgs-search ()
|
||||
"Search for a nixpkgs package and show its info."
|
||||
(interactive)
|
||||
(let* ((pattern (read-string "Search pattern: "))
|
||||
(json-output (shell-command-to-string
|
||||
(format "nix-search --json --max-results 50 '%s'" pattern)))
|
||||
(results (and json-output
|
||||
(not (string-empty-p json-output))
|
||||
(azos/nixpkgs-parse-json-lines json-output)))
|
||||
(packages (delq nil (mapcar (lambda (item)
|
||||
(let ((pname (azos/nixpkgs-g "package_pname" item)))
|
||||
(when pname
|
||||
(cons pname item))))
|
||||
results))))
|
||||
(if packages
|
||||
(let* ((selected (completing-read "Package: " (mapcar #'car packages) nil t))
|
||||
(package-data (cdr (assoc-string selected packages))))
|
||||
(let ((buf (get-buffer-create "*nixpkgs-package-info*")))
|
||||
(with-current-buffer buf
|
||||
(erase-buffer)
|
||||
(if package-data
|
||||
(progn
|
||||
(insert (format "Package: %s\n\n" selected))
|
||||
(insert (format "Version: %s\n" (or (azos/nixpkgs-g "package_pversion" package-data) "unknown")))
|
||||
(insert (format "Attr: %s\n" (or (azos/nixpkgs-g "package_attr_name" package-data) "unknown")))
|
||||
(insert (format "\nDescription: %s\n"
|
||||
(or (azos/nixpkgs-g "package_description" package-data) "none")))
|
||||
(let ((programs (azos/nixpkgs-g "package_programs" package-data)))
|
||||
(when (vectorp programs)
|
||||
(insert (format "\nPrograms: %s\n"
|
||||
(mapconcat #'identity (append programs nil) " ")))))
|
||||
(let ((homepage (let ((h (azos/nixpkgs-g "package_homepage" package-data)))
|
||||
(when (vectorp h) (aref h 0)))))
|
||||
(when homepage
|
||||
(insert (format "\nHomepage: %s\n" homepage))))
|
||||
(let ((licenses (azos/nixpkgs-g "package_license" package-data)))
|
||||
(when (vectorp licenses)
|
||||
(insert (format "\nLicense: %s\n"
|
||||
(mapconcat (lambda (l)
|
||||
(or (azos/nixpkgs-g "fullName" l) ""))
|
||||
(append licenses nil) ", ")))))
|
||||
(insert (format "Package: %s\n\n" selected)
|
||||
"\nNo additional info available.")))
|
||||
(goto-char (point-min)))
|
||||
(display-buffer buf)))
|
||||
(message "No packages found matching '%s'" pattern))))
|
||||
|
||||
(define-key azos/global-minor-mode/open-keymap
|
||||
(kbd "n") 'azos/nixpkgs-search)
|
||||
#+end_src
|
||||
|
||||
* Provide
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{pkgs} @ args:
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
alejandra
|
||||
(pkgs.writeShellScriptBin
|
||||
"azos-lauretta-update"
|
||||
"sudo nixos-rebuild switch --flake .#lauretta")
|
||||
|
||||
Reference in New Issue
Block a user