From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id QIiuKSUIjmVJEwAAkFu2QA (envelope-from ) for ; Fri, 29 Dec 2023 00:43:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aEBSIyUIjmU5EQAAqHPOHw (envelope-from ) for ; Fri, 29 Dec 2023 00:43:33 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=pTUrFxIB; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=riseup.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1703807013; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FZEOItUUzAN1g0tWaHXB+cP2vU97xspzrRmA/k7J5Ok=; b=nJ99KETUuaGSpG8WjP/Byl5BFCXXVJmN34EmQCJvHqntsdyUNVoybUQUvaY7ETOMCcghm2 vgzusKbazc4slMNxikZYCxCaleYvvYfqwo4c15Wmswzoe29ASOANuAfH11+juRwzWxe1BK 6eHDyUs36b/hf8z9YJZEOfFnGGfyYP+dEhttnDRArOzjF7ilBeBmp18oCMyh/YdhxFgvdz yr1hLTvh1ZFfdloc48KDrs5hS0nBuB8WxT5DOaWiHBMMbpAb5smIOxh+hxzsRmB/E1fIJ/ D5ovHOWJYG8EfkTIWhXwHb7CynBpl5BRPLtP+zA0L0N9JXomCYyZ4Xw+xe7Glw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=pTUrFxIB; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=riseup.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703807013; a=rsa-sha256; cv=none; b=dK9XYLYwXpQngebZMHn+TmGOEQvTc/CFBaPba3Qca8cOh+gA/StYFrhLWHlPFTvOKWxFdW XyWUhVgQKwlUvu09uBBtOXBUO8i57mYt5O4Kqexl0u/RxvN/wQTWJms80QqNzKkzwHqDt9 6DIuI9OmneJcGmz2ivKvFZV+LpVHM3NhHqHvIjEDH5XdChoNizOQ+U0indGdxRcOHUTzZx cFIhDItilU/tKFG/2M8m8I9H485QnHnFnubZztFT94QIdlCcmZFAVJXN2WdPq0BYmq7pJ6 m507LZPBThIG5Ug/OVGHgaaUb1OG56Odij+AYMdR0QV80Us+HV6gSVp/ChUcZA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6E33727EC1 for ; Fri, 29 Dec 2023 00:43:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJ01l-0001DX-L1; Thu, 28 Dec 2023 18:43:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJ01i-0001D6-SE for help-guix@gnu.org; Thu, 28 Dec 2023 18:42:58 -0500 Received: from mx0.riseup.net ([198.252.153.6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJ01f-0003b1-Si for help-guix@gnu.org; Thu, 28 Dec 2023 18:42:58 -0500 Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4T1Q6k2zr4z9shp; Thu, 28 Dec 2023 23:42:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1703806974; bh=hlsAVH8BNYo3KLgABJxMLg22T+Ku1NXdnVIY00g8A5U=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=pTUrFxIBDr2KaWfnx4+rKcw4DzFcnNAavSDq1yH54KnlwAN4rCDrR2+bC+KoYAt0M 0ba3Ft3ss7+9SPSPH2tx13J4e6Of3Ru4Guk5BxT8GSB9IEnR+u7UDX/I/6IzDqn1hD 70wikW7QKmi3UYnFmJsbrDYccmPNUKsQIEAmlF6k= X-Riseup-User-ID: 18B3301D892CBE5CE3EAC38D149EB190E42407A3115D5224EF3881513D068FD8 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4T1Q6j4xjFzJnGc; Thu, 28 Dec 2023 23:42:53 +0000 (UTC) References: <532f5b62-c5c3-4aa5-867e-ebe2dbecc848@benwr.net> From: Csepp To: Ben Weinstein-Raun Cc: help-guix@gnu.org Subject: Re: Shepherd user services that run on startup? Date: Fri, 29 Dec 2023 00:42:21 +0100 In-reply-to: <532f5b62-c5c3-4aa5-867e-ebe2dbecc848@benwr.net> Message-ID: <87r0j5nbba.fsf@riseup.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=198.252.153.6; envelope-from=raingloom@riseup.net; helo=mx0.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.86 X-Spam-Score: -6.86 X-Migadu-Queue-Id: 6E33727EC1 X-Migadu-Scanner: mx10.migadu.com X-TUID: eUgJwZuNA7Jz Ben Weinstein-Raun writes: > Hello! I'm fairly new to using Guix System, and I have a lot of questions. > > One is: Is it possible to run a shepherd user service at system start, > rather than at login? > > My guess is that this is at least possible, by defining a system-level > service that starts a shepherd for each user. Would that work? > > Anyone have tips on how to go about building this, if so? Especially: > What's the easiest way to ensure that a guix service knows the list of > users-with-login-shells on the system? And easiest way to run a > `shepherd` instance as each such user on startup? I'm working on writing > a service definition, but as this is my first from-scratch service (guix > or shepherd), and one of my first lisp projects since reading SICP 15 > years ago, it's slow going (even with the reference manual and source > code of other services). > > > And, of course, is there a simpler way? > > > (I also asked this question on the r/guix subreddit, but haven't heard > anything yet, and figured I'd ask here too) Not a direct answer, but this seems similar to systemd's linger functionality, that might be worth taking a look at.