nix: lazy way to add groups

This commit is contained in:
js0ny 2025-10-29 02:21:42 +00:00
parent 2b3fb09642
commit c58013738a
9 changed files with 17 additions and 79 deletions

View file

@ -0,0 +1,3 @@
git:
paging:
- pager: delta --dark --paging=never

View file

@ -1,49 +0,0 @@
{
"nodes": {
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1751313918,
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
"type": "github"
},
"original": {
"owner": "nix-darwin",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1753934836,
"narHash": "sha256-G06FmIBj0I5bMW1Q8hAEIl5N7IHMK7+Ta4KA+BmneDA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8679b16e11becd487b45d568358ddf9d5640d860",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,21 +0,0 @@
{
description = "My macOS Flake config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, nix-darwin, ... }: {
darwinConfigurations."zen" = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
./hosts/macbook/default.nix
./hosts/macbook/brew.nix
./hosts/macbook/system.nix
];
};
};
}

View file

@ -1 +0,0 @@
/home/js0ny/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules

View file

@ -30,9 +30,6 @@
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [
"wheel" "wheel"
"docker"
"libvirtd"
"dialout"
]; # Enable sudo for the user. ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJToUo2jT3qt7eHIME9e1awabZZVmtKhbxwVz9BMSM2d js0ny@zephyrus" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJToUo2jT3qt7eHIME9e1awabZZVmtKhbxwVz9BMSM2d js0ny@zephyrus"

View file

@ -5,5 +5,4 @@
korganizer korganizer
kdepim-addons kdepim-addons
]; ];
services.xserver.desktopManager.cinnamon.enable = true;
} }

View file

@ -1,6 +1,9 @@
{...}: { {config, ...}: {
# Xilinx Artix-7 Basys 3 # Xilinx Artix-7 Basys 3
services.udev.extraRules = '' services.udev.extraRules = ''
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0660", GROUP="dialout", SYMLINK+="basys3" ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0660", GROUP="dialout", SYMLINK+="basys3"
''; '';
users.users.${config.var.username} = {
extraGroups = ["dialout"];
};
} }

View file

@ -1,4 +1,8 @@
{pkgs, ...}: { {
pkgs,
config,
...
}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
virt-manager virt-manager
dnsmasq dnsmasq
@ -13,7 +17,7 @@
swtpm.enable = true; swtpm.enable = true;
}; };
}; };
users.users.js0ny = { users.users.${config.var.username} = {
extraGroups = ["libvirtd"]; extraGroups = ["libvirtd"];
}; };
networking.firewall.trustedInterfaces = ["virbr0"]; networking.firewall.trustedInterfaces = ["virbr0"];

View file

@ -1,8 +1,11 @@
{pkgs, ...}: { {config, ...}: {
virtualisation = { virtualisation = {
docker.enable = true; docker.enable = true;
podman.enable = true; podman.enable = true;
}; };
users.users.${config.var.username} = {
extraGroups = ["docker" "podman"];
};
# systemd.services.docker = { # systemd.services.docker = {
# serviceConfig = { # serviceConfig = {