Many changes by GLM

This commit is contained in:
2026-03-28 15:43:14 +03:00
parent e6188adc0d
commit e7ab8c10d8
29 changed files with 342 additions and 246 deletions
+38 -3
View File
@@ -28,7 +28,7 @@ nix flake lock --update-input X # Update specific input
### Dev Shell & REPL ### Dev Shell & REPL
```bash ```bash
nix develop .#shells.x86_64-linux.debugTexShell nix develop .#shells.x86_64-linux.default
nix repl nix repl
:lf . :lf .
``` ```
@@ -45,7 +45,7 @@ alejandra .
Manual VM testing: Manual VM testing:
```bash ```bash
nix build .#nixosConfigurations.vm.config.system.build.vm nix build '.?submodules=1#nixosConfigurations.vm.config.system.build.vm'
./result/bin/run-nixos-vm ./result/bin/run-nixos-vm
``` ```
@@ -55,6 +55,9 @@ nix build .#nixosConfigurations.vm.config.system.build.vm
- **Home-manager modules**: `modules/home-manager/<name>.nix` - **Home-manager modules**: `modules/home-manager/<name>.nix`
- **NixOS modules**: `modules/nixos/<name>.nix` - **NixOS modules**: `modules/nixos/<name>.nix`
- **Imports**: All modules in `modules/home-manager/default.nix` and `modules/nixos/default.nix` (alphabetical order) - **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 Template ### Nix Module Template
@@ -70,6 +73,7 @@ nix build .#nixosConfigurations.vm.config.system.build.vm
in { in {
options.azos.<module-name>.enable = lib.mkOption { options.azos.<module-name>.enable = lib.mkOption {
default = true; default = true;
example = true;
type = lib.types.bool; type = lib.types.bool;
}; };
@@ -83,6 +87,7 @@ in {
- Option paths: `config.azos.<module-name>.<option>` - Option paths: `config.azos.<module-name>.<option>`
- Enable option: `enable` (bool), default `true` - Enable option: `enable` (bool), default `true`
- Module names: kebab-case (`libreoffice.nix`, `git-config.nix`) - 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`) - Variables: kebab-case (`isEnabled`)
### Formatting ### Formatting
@@ -93,10 +98,11 @@ in {
### Imports ### Imports
- Always include `{...}` for module args - Always include `{...}` for module args
- Standard args: `lib, config, pkgs, ...` - Standard args: `lib, config, pkgs, ...`
- NixOS config args: `inputs, outputs, lib, config, pkgs, ...`
- Use `./relative/path.nix` for local imports - Use `./relative/path.nix` for local imports
### Option Patterns ### Option Patterns
- Boolean enable: `lib.mkOption { default = true; type = lib.types.bool; }` - Boolean enable: `lib.mkOption { default = true; example = true; type = lib.types.bool; }`
- Conditional config: `lib.mkIf isEnabled { ... }` - Conditional config: `lib.mkIf isEnabled { ... }`
- User-overridable: `lib.mkDefault` - User-overridable: `lib.mkDefault`
- Force value: `lib.mkForce` (sparingly) - Force value: `lib.mkForce` (sparingly)
@@ -105,6 +111,30 @@ in {
- Home-manager: `home.packages`, `home.file`, `programs.<program>` - Home-manager: `home.packages`, `home.file`, `programs.<program>`
- NixOS: `config.services`, `environment.systemPackages` - NixOS: `config.services`, `environment.systemPackages`
### 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;`
### 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;
};
};
};
};
```
## Adding New Modules ## Adding New Modules
1. Create file in `modules/home-manager/` or `modules/nixos/` 1. Create file in `modules/home-manager/` or `modules/nixos/`
@@ -119,6 +149,7 @@ in {
| `flake.nix` | Main flake, defines systems, overlays | | `flake.nix` | Main flake, defines systems, overlays |
| `modules/home-manager/default.nix` | Home-manager imports | | `modules/home-manager/default.nix` | Home-manager imports |
| `modules/nixos/default.nix` | NixOS 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.nix` | Lauretta laptop config |
| `nixos/configuration-vm.nix` | Test VM config | | `nixos/configuration-vm.nix` | Test VM config |
| `overlays/` | Custom package overlays | | `overlays/` | Custom package overlays |
@@ -132,3 +163,7 @@ in {
**Add home-manager package**: Edit module, add to `home.packages = with pkgs; [ pkg ]` **Add home-manager package**: Edit module, add to `home.packages = with pkgs; [ pkg ]`
**Add system service**: Edit NixOS module, add under `services.<service>` **Add system service**: Edit NixOS module, add under `services.<service>`
**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)
Generated
+103 -20
View File
@@ -3,7 +3,8 @@
"azos-core": { "azos-core": {
"inputs": { "inputs": {
"cabata": "cabata", "cabata": "cabata",
"nixpkgs": "nixpkgs_2" "nix-search-cli": "nix-search-cli",
"nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"path": "./azos-core", "path": "./azos-core",
@@ -35,6 +36,22 @@
"type": "github" "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": { "flake-utils": {
"inputs": { "inputs": {
"systems": [ "systems": [
@@ -57,6 +74,21 @@
"type": "github" "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": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -64,11 +96,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773264488, "lastModified": 1774559029,
"narHash": "sha256-rK0507bDuWBrZo+0zts9bCs/+RRUEHuvFE5DHWPxX/Q=", "narHash": "sha256-deix7yg3j6AhjMPnFDCmWB3f83LsajaaULP5HH2j34k=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "5c0f63f8d55040a7eed69df7e3fcdd15dfb5a04c", "rev": "a0bb0d11514f92b639514220114ac8063c72d0a3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -80,7 +112,7 @@
}, },
"musnix": { "musnix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1773185476, "lastModified": 1773185476,
@@ -96,13 +128,49 @@
"type": "github" "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": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1773533765, "lastModified": 1774567711,
"narHash": "sha256-qonGfS2lzCgCl59Zl63jF6dIRRpvW3AJooBGMaXjHiY=", "narHash": "sha256-uVlOHBvt6Vc/iYNJXLPa4c3cLXwMllOCVfAaLAcphIo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "f8e82243fd601afb9f59ad230958bd073795cbfe", "rev": "3f6f874dfc34d386d10e434c48ad966c4832243e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -128,11 +196,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1773389992, "lastModified": 1774386573,
"narHash": "sha256-wvfdLLWJ2I9oEpDd9PfMA8osfIZicoQ5MT1jIwNs9Tk=", "narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c06b4ae3d6599a672a6210b7021d699c351eebda", "rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -144,11 +212,26 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1773507054, "lastModified": 1761752004,
"narHash": "sha256-Q8U5VXgrcxmCxPtCCJCIZkcAX3FCZwGh1GNVIXxMND0=", "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", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e80236013dc8b77aa49ca90e7a12d86f5d8d64c9", "rev": "fdc7b8f7b30fdbedec91b71ed82f36e1637483ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -156,7 +239,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1772198003, "lastModified": 1772198003,
"narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=", "narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=",
@@ -172,13 +255,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1773507054, "lastModified": 1774273680,
"narHash": "sha256-Q8U5VXgrcxmCxPtCCJCIZkcAX3FCZwGh1GNVIXxMND0=", "narHash": "sha256-a++tZ1RQsDb1I0NHrFwdGuRlR5TORvCEUksM459wKUA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e80236013dc8b77aa49ca90e7a12d86f5d8d64c9", "rev": "fdc7b8f7b30fdbedec91b71ed82f36e1637483ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -194,7 +277,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"musnix": "musnix", "musnix": "musnix",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"nixpkgs-unstable": "nixpkgs-unstable" "nixpkgs-unstable": "nixpkgs-unstable"
} }
}, },
+1 -1
View File
@@ -73,6 +73,6 @@
#TODO this is probably unsupported #TODO this is probably unsupported
#TODO the devshells do not know of the new packages. #TODO the devshells do not know of the new packages.
devShells = forAllSystems (system: ((import ./shells) {pkgs = nixpkgs.legacyPackages.${system}; })); devShells = forAllSystems (system: ((import ./shells) {pkgs = nixpkgs.legacyPackages.${system};}));
}; };
} }
-21
View File
@@ -1,21 +0,0 @@
{
lib,
config,
pkgs,
...
}: let
isEnabled =
config.azos.chromium.enable;
in {
options.azos.chromium.enable = lib.mkOption {
default = true;
example = true;
type = lib.types.bool;
};
config = lib.mkIf isEnabled {
home.packages = with pkgs; [
chromium
];
};
}
+12 -18
View File
@@ -1,26 +1,20 @@
{ {
imports = [ imports = [
./zoom.nix
./ytdl.nix
./mail.nix
./encryption.nix
./kubernetes.nix
./git.nix
./mpris-proxy.nix
./qutebrowser-config.nix
./audio.nix ./audio.nix
./reaper.nix ./encryption.nix
./discord.nix ./git.nix
./spotify.nix
./headphones-whmx4000.nix ./headphones-whmx4000.nix
./deluge.nix
./lauretta-emacs.nix
./gimp.nix
# ./printing.nix
./libreoffice.nix
./chromium.nix
./hyprland-suite.nix ./hyprland-suite.nix
# ./gnuradio.nix ./kubernetes.nix
./lauretta-emacs.nix
./mail.nix
./mpris-proxy.nix
./opencode.nix ./opencode.nix
# ./printing.nix
# ./gnuradio.nix
./qutebrowser-config.nix
./reaper.nix
./snx-rs.nix
./ytdl.nix
]; ];
} }
-21
View File
@@ -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
];
};
}
-21
View File
@@ -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
];
};
}
-21
View File
@@ -1,21 +0,0 @@
{
lib,
config,
pkgs,
...
}: let
isEnabled =
config.azos.gimp.enable;
in {
options.azos.gimp.enable = lib.mkOption {
default = true;
example = true;
type = lib.types.bool;
};
config = lib.mkIf isEnabled {
home.packages = with pkgs; [
gimp3
];
};
}
+3 -4
View File
@@ -26,14 +26,13 @@ in {
settings = { settings = {
extraConfig = { extraConfig = {
credential.helper = "!pass-git-helper $@"; credential.helper = "!pass-git-helper $@";
}; };
user = { user = {
name = "Aner Zakobar"; name = "Aner Zakobar";
email = "aner@zakobar.com"; email = "aner@zakobar.com";
}; };
}; };
}; };
home.file.".config/pass-git-helper/git-pass-mapping.ini".source = home.file.".config/pass-git-helper/git-pass-mapping.ini".source =
./pass-git-mapping.ini; ./pass-git-mapping.ini;
+2 -2
View File
@@ -15,9 +15,9 @@ in {
config = lib.mkIf isEnabled { config = lib.mkIf isEnabled {
home.packages = with pkgs; [ home.packages = with pkgs; [
( pkgs.writeShellScriptBin (pkgs.writeShellScriptBin
"azos-connect-headphones-whmx4000" "azos-connect-headphones-whmx4000"
"echo \"connect AC:80:0A:AF:E1:C2\" | bluetoothctl" ) "echo \"connect AC:80:0A:AF:E1:C2\" | bluetoothctl")
]; ];
}; };
} }
+9 -10
View File
@@ -18,15 +18,15 @@ in {
#TODO shutdown reboot commands #TODO shutdown reboot commands
config = lib.mkIf isEnabled { config = lib.mkIf isEnabled {
home.packages = with pkgs; [ home.packages = with pkgs; [
hyprland hyprland
waybar # status bar waybar # status bar
wofi # application launcher wofi # application launcher
kitty kitty
grim # screenshot utility grim # screenshot utility
slurp # region selector slurp # region selector
swappy # screenshot editor swappy # screenshot editor
networkmanagerapplet networkmanagerapplet
xwayland xwayland
]; ];
azos.emacs.enabledSuites = ["azos-emacs-hyprland"]; azos.emacs.enabledSuites = ["azos-emacs-hyprland"];
@@ -54,6 +54,5 @@ in {
# StandardError = "journal"; # StandardError = "journal";
# }; # };
# }; # };
}; };
} }
+2
View File
@@ -17,5 +17,7 @@ in {
#Base emacs suite definition #Base emacs suite definition
azos.emacs.pkgs = [pkgs.azos-emacs-lauretta]; azos.emacs.pkgs = [pkgs.azos-emacs-lauretta];
home.packages = with pkgs; [pkgs.nix-search-cli];
}; };
} }
-21
View File
@@ -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
];
};
}
+1 -3
View File
@@ -14,8 +14,6 @@ in {
}; };
config = lib.mkIf isEnabled { config = lib.mkIf isEnabled {
home.packages = with pkgs; [ programs.opencode.enable = true;
opencode
];
}; };
} }
+63
View File
@@ -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-name = ${cfg.server}
user-name = ${cfg.username}
login-type = ${cfg.loginType}
ignore-server-cert = ${lib.boolToString cfg.ignoreServerCert}
'';
};
};
}
-21
View File
@@ -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
];
};
}
+1 -1
View File
@@ -5,7 +5,7 @@
... ...
}: let }: let
isEnabled = isEnabled =
config.azos.discord.enable; config.azos.ytdl.enable;
in { in {
options.azos.ytdl.enable = lib.mkOption { options.azos.ytdl.enable = lib.mkOption {
default = true; default = true;
-21
View File
@@ -1,21 +0,0 @@
{
lib,
config,
pkgs,
...
}: let
isEnabled =
config.azos.zoom.enable;
in {
options.azos.zoom.enable = lib.mkOption {
default = true;
example = true;
type = lib.types.bool;
};
config = lib.mkIf isEnabled {
home.packages = with pkgs; [
zoom-us
];
};
}
+4 -4
View File
@@ -17,12 +17,12 @@ in {
services = { services = {
pipewire = { pipewire = {
enable = true; enable = true;
audio.enable = true; audio.enable = true;
pulse.enable = true; pulse.enable = true;
alsa = { alsa = {
enable = true; enable = true;
support32Bit = true; support32Bit = true;
}; };
jack.enable = true; jack.enable = true;
}; };
}; };
+1 -1
View File
@@ -1,3 +1,3 @@
{ {
imports = [./audio.nix ./bluetooth.nix ./steam.nix ./virtualization.nix ]; imports = [./audio.nix ./bluetooth.nix ./steam.nix ./virtualization.nix];
} }
+9 -11
View File
@@ -15,28 +15,26 @@ in {
config = lib.mkIf isEnabled { config = lib.mkIf isEnabled {
virtualisation.libvirtd = { virtualisation.libvirtd = {
enable = true; # start / run libvirtd as a system service enable = true; # start / run libvirtd as a system service
# optional: expose the default NAT network (virbr0) libvirtd creates it # optional: expose the default NAT network (virbr0) libvirtd creates it
# automatically when the daemon is on, but we make sure the bridge is # automatically when the daemon is on, but we make sure the bridge is
# allowed through the firewall. # allowed through the firewall.
qemu = { qemu = {
swtpm.enable = true; # (optional) enable software TPM for guests swtpm.enable = true; # (optional) enable software TPM for guests
}; };
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# QEMU (KVMaccelerated) # QEMU (KVMaccelerated)
qemu_kvm # same as pkgs.qemu (but with KVM support explicitly enabled) qemu_kvm # same as pkgs.qemu (but with KVM support explicitly enabled)
# CLI utilities # CLI utilities
libvirt # provides virsh, virt-install, virt-manager (cli bits) libvirt # provides virsh, virt-install, virt-manager (cli bits)
# GUI frontend # GUI frontend
virt-manager # graphical manager (uses libvirt + spice) virt-manager # graphical manager (uses libvirt + spice)
virt-viewer # Spice/VNC client that virtmanager calls under the hood virt-viewer # Spice/VNC client that virtmanager calls under the hood
]; ];
services.spice-vdagentd.enable = true; # makes copypaste & autoresize work in Spice windows
services.spice-vdagentd.enable = true; # makes copypaste & autoresize work in Spice windows networking.firewall.allowedTCPPorts = [5900 5901]; # Spice ports (adjust if you expose elsewhere)
networking.firewall.allowedTCPPorts = [ 5900 5901 ]; # Spice ports (adjust if you expose elsewhere) networking.firewall.allowedUDPPorts = [5900 5901];
networking.firewall.allowedUDPPorts = [ 5900 5901 ];
}; };
} }
+1 -1
View File
@@ -86,7 +86,7 @@
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect # TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
]; ];
# TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc) # TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc)
extraGroups = ["wheel" "libvirtd" ]; extraGroups = ["wheel" "libvirtd"];
}; };
}; };
+1 -2
View File
@@ -97,7 +97,7 @@
hyprland = { hyprland = {
configuration = { configuration = {
# Override homemanager options for this specialization # Override homemanager options for this specialization
home-manager.users.aner = { pkgs, ... }: { home-manager.users.aner = {pkgs, ...}: {
azos.suites.exwm.enable = lib.mkForce false; azos.suites.exwm.enable = lib.mkForce false;
azos.suites.hyprland.enable = true; azos.suites.hyprland.enable = true;
}; };
@@ -105,7 +105,6 @@
}; };
}; };
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
+1 -1
View File
@@ -17,7 +17,7 @@
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" ={ fileSystems."/" = {
device = "/dev/disk/by-uuid/d28f6c1d-f7ec-44a1-a59b-a598c7f136f7"; device = "/dev/disk/by-uuid/d28f6c1d-f7ec-44a1-a59b-a598c7f136f7";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=@"]; options = ["subvol=@"];
+2 -1
View File
@@ -2,7 +2,8 @@
orgTrivialBuild, orgTrivialBuild,
epkgs, epkgs,
pkgs, pkgs,
} : orgTrivialBuild { }:
orgTrivialBuild {
pname = "azos-emacs-lauretta"; pname = "azos-emacs-lauretta";
version = "0.1.6"; version = "0.1.6";
src = ./elisp/azos-emacs-lauretta.org; src = ./elisp/azos-emacs-lauretta.org;
+71
View File
@@ -1,3 +1,4 @@
#+title: Aner's Emacs Lauretta Configuration #+title: Aner's Emacs Lauretta Configuration
#+property: header-args :results silent #+property: header-args :results silent
@@ -31,6 +32,7 @@
** Agent Shell ** Agent Shell
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq agent-shell-opencode-default-model-id "opencode/glm-5")
(setq agent-shell-preferred-agent-config (agent-shell-opencode-make-agent-config)) (setq agent-shell-preferred-agent-config (agent-shell-opencode-make-agent-config))
#+end_src #+end_src
@@ -58,6 +60,75 @@
(azos/audio/enable-tab-display)) (azos/audio/enable-tab-display))
#+end_src #+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 * Provide
#+begin_src emacs-lisp #+begin_src emacs-lisp
+14 -13
View File
@@ -1,14 +1,15 @@
{pkgs} @ args: {pkgs} @ args:
pkgs.mkShell { pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
( pkgs.writeShellScriptBin alejandra
"azos-lauretta-update" (pkgs.writeShellScriptBin
"sudo nixos-rebuild switch --flake .#lauretta" ) "azos-lauretta-update"
( pkgs.writeShellScriptBin "sudo nixos-rebuild switch --flake .#lauretta")
"azos-update-azos-core" (pkgs.writeShellScriptBin
"nix flake update azos-core" ) "azos-update-azos-core"
( pkgs.writeShellScriptBin "nix flake update azos-core")
"azos-update" (pkgs.writeShellScriptBin
"nix flake update" ) "azos-update"
]; "nix flake update")
} ];
}