mutableUsers = false

This commit is contained in:
Gerg-L 2023-02-23 20:11:28 -05:00
parent 000915a375
commit 3befa64d21
4 changed files with 55 additions and 21 deletions

18
flake.lock generated
View file

@ -115,11 +115,11 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1677105795, "lastModified": 1677197206,
"narHash": "sha256-YA4uTUU0Dle90ecS7rDGHSeYiEyiUuyshm4Q+wku7b4=", "narHash": "sha256-genGpC2jF/va2iHZ7i4pVODvOd+823i4LPeuNpwCJdM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7cec24480ea3f10690f752775fa52d693eb5ad6f", "rev": "f9afd57302f342f7e72048ea77ed57aef61ffe48",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -180,11 +180,11 @@
"nixpkgs-regression": "nixpkgs-regression" "nixpkgs-regression": "nixpkgs-regression"
}, },
"locked": { "locked": {
"lastModified": 1677084200, "lastModified": 1677172394,
"narHash": "sha256-zDDFwMQktp1tjUHksSW7jB/4uLEmv7dl3/CDtq9kjMg=", "narHash": "sha256-SfiNwZ2nvCEpbH3fneFIZWp9lH3XFx4z+EjJ3rrxeJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nix", "repo": "nix",
"rev": "4a921ba43b8ea9a37763cd4bd4bc491928cc55c2", "rev": "b5bbf14b872c0accfae2373076fd1a25fae511ce",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -335,11 +335,11 @@
}, },
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1676998680, "lastModified": 1677075010,
"narHash": "sha256-61gxdL3bqHWnRSiYq+sKWbSX6tuwaRnYfPvhpRK011s=", "narHash": "sha256-X+UmR1AkdR//lPVcShmLy8p1n857IGf7y+cyCArp8bU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a3d745e701c337e65ef467d5a9400d9336a303a1", "rev": "c95bf18beba4290af25c60cbaaceea1110d0f727",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -39,10 +39,20 @@ inputs: {
networkmanager.enable = true; networkmanager.enable = true;
}; };
users = { users = {
users."${settings.username}" = { mutableUsers = false;
users = {
"${settings.username}" = {
useDefaultShell = true;
uid = 1000; uid = 1000;
isNormalUser = true; isNormalUser = true;
extraGroups = ["audio" "networkmanager"]; extraGroups = ["networkmanager" "audio"];
initialHashedPassword = "";
};
"root" = {
uid = 0;
home = "/root";
initialHashedPassword = "$6$KV00qSRKyx1hpZjX$kwzWN4UuQxHSFwA4vYtRTcYecQyR.Qelvvcr90ZfZ4y.LISUcx2PDHH9/7REwsoAHD./KlAnwlsm1hxeLoGpl/";
};
}; };
}; };
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;

View file

@ -73,10 +73,22 @@ inputs: {
bridges."bridge0".interfaces = ["eth0"]; bridges."bridge0".interfaces = ["eth0"];
}; };
#user managment #user managment
users.users."${settings.username}" = { users = {
mutableUsers = false;
users = {
"${settings.username}" = {
useDefaultShell = true;
uid = 1000; uid = 1000;
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel" "audio"]; extraGroups = ["wheel" "audio"];
initialHashedPassword = "$6$hgiDFHEMVEA39Snj$Huxf2a/yd/gSO2ZwntxI5Z65c1kCf35lvbkA61knP5i5NLPuIy4cybBBv9lnd24LVR9sfi9Tss96VQdsGCQhq1";
};
"root" = {
uid = 0;
home = "/root";
initialHashedPassword = "$6$KV00qSRKyx1hpZjX$kwzWN4UuQxHSFwA4vYtRTcYecQyR.Qelvvcr90ZfZ4y.LISUcx2PDHH9/7REwsoAHD./KlAnwlsm1hxeLoGpl/";
};
};
}; };
boot = { boot = {
initrd = { initrd = {

View file

@ -34,10 +34,22 @@ inputs: {
networkmanager.enable = true; networkmanager.enable = true;
}; };
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
users.users."${settings.username}" = { users = {
mutableUsers = false;
users = {
"${settings.username}" = {
useDefaultShell = true;
uid = 1000; uid = 1000;
isNormalUser = true; isNormalUser = true;
extraGroups = ["audio" "networkmanager"]; extraGroups = ["networkmanager" "audio"];
initialHashedPassword = "";
};
"root" = {
uid = 0;
home = "/root";
initialHashedPassword = "$6$KV00qSRKyx1hpZjX$kwzWN4UuQxHSFwA4vYtRTcYecQyR.Qelvvcr90ZfZ4y.LISUcx2PDHH9/7REwsoAHD./KlAnwlsm1hxeLoGpl/";
};
};
}; };
boot = { boot = {
initrd.availableKernelModules = ["xhci-pci" "ehci-pci" "ahci" "usbhid" "sd_mod" "sr_mod" "rtsx_usb_sdmmc"]; initrd.availableKernelModules = ["xhci-pci" "ehci-pci" "ahci" "usbhid" "sd_mod" "sr_mod" "rtsx_usb_sdmmc"];