fix sysusers in noninteractive case

This commit is contained in:
Jörg Thalheim 2024-08-02 08:20:52 +02:00 committed by mergify[bot]
parent 907bd49df1
commit 78065dbf9f
3 changed files with 21 additions and 10 deletions

View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixos-stable": { "nixos-stable": {
"locked": { "locked": {
"lastModified": 1721409541, "lastModified": 1722372011,
"narHash": "sha256-b6PLr0Ty7JPDBtJtjnYzlBf02bbH9alWMAgispMkTwk=", "narHash": "sha256-B2xRiC3NEJy/82ugtareBkRqEkPGpMyjaLxaR8LBxNs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0c53b6b8c2a3e46c68e04417e247bba660689c9d", "rev": "cf05eeada35e122770c5c14add958790fcfcbef5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -18,16 +18,16 @@
}, },
"nixos-unstable": { "nixos-unstable": {
"locked": { "locked": {
"lastModified": 1721571961, "lastModified": 1722586959,
"narHash": "sha256-jfF4gpRUpTBY2OxDB0FRySsgNGOiuDckEtu7YDQom3Y=", "narHash": "sha256-ME29JBcYm+oYtFXacHIQDC894guXjvm/2jCdRGIVOEY=",
"owner": "NixOS", "owner": "Mic92",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4cc8b29327bed3d52b40041f810f49734298af46", "rev": "73500c5f11587b262a43b4afb6b13618a48f3af9",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "Mic92",
"ref": "nixos-unstable-small", "ref": "iproute2-nix-community",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View file

@ -1,7 +1,9 @@
{ {
description = "NixOS images"; description = "NixOS images";
inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small"; #inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
# see https://github.com/NixOS/nixpkgs/pull/331699
inputs.nixos-unstable.url = "github:Mic92/nixpkgs/iproute2-nix-community";
inputs.nixos-stable.url = "github:NixOS/nixpkgs/nixos-24.05"; inputs.nixos-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
nixConfig.extra-substituters = [ "https://nix-community.cachix.org" ]; nixConfig.extra-substituters = [ "https://nix-community.cachix.org" ];

View file

@ -30,6 +30,15 @@
# prevents strace # prevents strace
environment.defaultPackages = lib.mkForce [ pkgs.rsync pkgs.parted pkgs.gptfdisk ]; environment.defaultPackages = lib.mkForce [ pkgs.rsync pkgs.parted pkgs.gptfdisk ];
# normal users are not allowed with sys-users
# see https://github.com/NixOS/nixpkgs/pull/328926
users.users.nixos = {
isSystemUser = true;
isNormalUser = lib.mkForce false;
};
users.users.nixos.group = "nixos";
users.groups.nixos = {};
# we are missing this from base.nix # we are missing this from base.nix
boot.supportedFilesystems = [ boot.supportedFilesystems = [
"btrfs" "btrfs"