numtide / system-manager Goto Github PK
View Code? Open in Web Editor NEWManage system config using nix on any distro
License: MIT License
Manage system config using nix on any distro
License: MIT License
Is your feature request related to a problem? Please describe.
Currently, I have to configure and maintain every printer setup on its own.
Describe the solution you'd like
Being able to use the printer setup workflow from NixOS in KaOS (and other distributions.)
Describe alternatives you've considered
Using the drivers and configuration of the host distribution.
This would not come with the typical advantages of NixOS.
Additional context
I think cooperation's often have tons of printer, often different models,
and on different kinds of operating systems. This could help, to unify the configuration of them.
Is your feature request related to a problem? Please describe.
I'd love to contribute to support for ArchLinux. What would it take for me to implement this?
Describe the solution you'd like
ArchLinux support for /etc files and systemd services (both system level and user level)
Describe alternatives you've considered
NixOS itself. I tried to love it but couldn't make it happen.
Additional context
It looks like NixOS and Ubuntu are only supported right now. I'd like to contribute to this project to get Arch as a fully supported distro. What would I need to do to add this? Where should I start?
Is your feature request related to a problem? Please describe.
I'm trying to use system-manager on debian server, however it is not supported currently.
Describe the solution you'd like
Since ubuntu is supported and debian is similiar to it imo, maybe we can add support for it without much effort (maybe just relax the assertion)
Describe alternatives you've considered
Additional context
Is your feature request related to a problem? Please describe.
Some packages I use are licensed with unfree license. In a regular nixos, there area multiple ways to allow those, but this utility allows none of them.
Describe the solution you'd like
Some setting to allow unfree packages to be evaluated.
Describe alternatives you've considered
I tried setting NIXPKGS_ALLOW_UNFREE=1
and using --impure
, I specified { allowUnfree = true; }
in ~/.config/nixpkgs/config.nix
, neither worked
Describe the bug
I tried setting up a system-manager flake where I consume another flake that exposes a custom package and a corresponding nixosModule
with a systemd
service. In the system-manager
flake I could successfully consume the nixosModule
, however the package required for the service could not be found in pkgs
. I guess this might be related to no mention of overlays
when evaluating nixpkgs.legacyPackages
in
Line 20 in af43744
Expected behavior
Being able to set nixpkgs.overlays
.
Is your feature request related to a problem? Please describe.
I was trying to adapt nixos modules for system-manager and noticed that many of them have hard-coded /run/current-system/sw
; see e.g.
One must modify /run/current-system -> /run/system-manager
in order to port such modules.
Describe the solution you'd like
Since /run/current-system
is not used in a generic non-NixOS system I believe we can simply re-use the path.
Describe alternatives you've considered
/run/current-system -> /run/system-manager
module by module./run/current-system -> /run/system-manager
when profiles are activated.Additional context
I am not sure if it's safe to do this. It feels safe to me since system-manager
should only be used on non-NixOS so there will not be conflicts. But I don't know.
Aside from manually browsing through /nix/var/nix/profiles/system-manager-profiles/
, is there a way to view prior generations of the system-manager profile? I tried using the nix profile --profile <path>
command, but was unsuccessful. This would also be helpful when cleaning out older generations since running nix-collect-garbage --delete-old
doesn't seem to detect system-manager profiles.
Something like the equivalent of nix profile history
and nix profile wipe-history
would be nice.
Is your feature request related to a problem? Please describe.
It would be nice to have a single source to manage a system, including installed software.
Describe the solution you'd like
environment.systemPackages
works well and obviously would improve compatibility with NixOS modules.
Describe alternatives you've considered
Managing software via nix profile
.
Additional context
Inspired by this Ansible playbook step:
- name: setup user
hosts: new_droplet
gather_facts: false
tasks:
- name: Ensure user "debian" exists
ansible.builtin.user:
name: debian
shell: /bin/bash
groups: sudo
create_home: true
home: /home/debian
append: yes
password: "{{ 'foobar123' | password_hash('sha512') }}"
- name: add ssh key
ansible.posix.authorized_key:
user: debian
state: present
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/user_module.html
https://docs.ansible.com/ansible/latest/collections/ansible/posix/authorized_key_module.html
https://nixpkgs-manual-sphinx-markedown-example.netlify.app/configuration/user-mgmt.xml.html
Is your feature request related to a problem? Please describe.
I understand that package environments are constructed in /run/system-manager/sw
and system $PATH
is prepended accordingly, as implemented in #17. However, in most (if not all) FHS compliant systems /usr/local
is already in $PATH
, and is a standard place to put local binaries ("local" in the sense that it's not managed by the distro's package manager).
Describe the solution you'd like
I would like the possibility to:
/run/system-manager/sw
as-is; even if we use /usr/local
, the directory /run/system-manager/sw
is great to visualize the changes made by system-manager
$PATH
; maybe this is already possible with environment.etc."profile.d/system-manager-path.sh".enable = false
?/run/system-manager/sw
into /usr/local
following FHS, like what has been done already for /etc
.Describe alternatives you've considered
Just live with /run/system-manager/sw
and a prepended $PATH
.
Additional context
None for now, other than: thank you for providing this wonderful module! 😄
Describe the bug
This is not a bug but rather a question on usage.
My question is where to put the specific settings for a unit file. For example, I am trying to re-create the systemd service that is created when Tailscale is installed with apt
.
On Ubuntu 24.04, sudo apt install tailscale
creates the following unit file:
/etc/systemd/system/multi-user.target.wants/tailscaled.service
[Unit]
Description=Tailscale node agent
Documentation=https://tailscale.com/kb/
Wants=network-pre.target
After=network-pre.target NetworkManager.service systemd-resolved.service
[Service]
EnvironmentFile=/etc/default/tailscaled
ExecStart=/usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port=${PORT} $FLAGS
ExecStopPost=/usr/sbin/tailscaled --cleanup
Restart=on-failure
RuntimeDirectory=tailscale
RuntimeDirectoryMode=0755
StateDirectory=tailscale
StateDirectoryMode=0700
CacheDirectory=tailscale
CacheDirectoryMode=0750
Type=notify
[Install]
WantedBy=multi-user.target
My System-Manager default.nix
file looks like this so far, but I'm not sure how to add the rest:
{ config, lib, pkgs, ... }:
{
config = {
nixpkgs.hostPlatform = "x86_64-linux";
environment = {
etc = {
# What goes here?
};
systemPackages = [
pkgs.hello
pkgs.tailscale
];
};
systemd.services = {
tailscaled = {
enable = true;
description = "Tailscale node agent";
documentation = "https://tailscale.com/kb/";
wants = [ "network-pre.target" ];
after = [
"network-pre.target"
"NetworkManager.service"
"systemd-resolved.service"
];
serviceConfig = {
Type = "notify";
};
wantedBy = [ "multi-user.target" ];
};
};
};
}
Where would I add (and what is the syntax for) the following parts of the unit file?
EnvironmentFile=/etc/default/tailscaled
ExecStart=/usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port=${PORT} $FLAGS
ExecStopPost=/usr/sbin/tailscaled --cleanup
Restart=on-failure
RuntimeDirectory=tailscale
RuntimeDirectoryMode=0755
StateDirectory=tailscale
StateDirectoryMode=0700
CacheDirectory=tailscale
CacheDirectoryMode=0750
I tried looking through the source code of system-manager to get some hints but to be honest I'm struggling to find them.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Would like some help or documentation on where each setting goes.
System information
Ubuntu 24.04
Additional context
I will also create an issue to suggest a discussion section for the repo so these kinds of questions don't clutter up the "Issues" section.
Can this tool have better documentation please. I have no idea how to use this tool
Describe the bug
I'm trying to use nix-sops
to handle some secrets, but I can't make it.
To Reproduce
systemConfigs =
let makeSystemConfig = inputs.system-manager.lib.makeSystemConfig;
in {
"minami" = makeSystemConfig {
modules = [ ./system/minami inputs.sops-nix.nixosModules.sops ];
extraSpecialArgs = { inherit inputs; };
};
};
In system/minami/default.nix
{
imports = [ ./other-modules ];
sops = {
age.sshKeyPaths = [ "/etc/ssh/nix-sops" ];
secrets = {
secret = {
sopsFile = ./secrets/secret.json;
format = "json";
};
};
};
config = {
nixpkgs.hostPlatform = "x86_64-linux";
# other config
};
}
nix repl --extra-experimental-features 'flakes repl-flake' flake.nix --show-trace
nix-repl> systemConfigs.minami
error:
… while evaluating the attribute 'minami'
at /nix/store/n2xvix786b3v8sni332pikjq3j8r3ygw-source/flake.nix:89:9:
88| makeSystemConfig { modules = [ ./system/marushiru.nix ]; };
89| "minami" = makeSystemConfig {
| ^
90| modules = [ ./system/minami inputs.sops-nix.nixosModules.sops ];
… from call site
at /nix/store/n2xvix786b3v8sni332pikjq3j8r3ygw-source/flake.nix:89:20:
88| makeSystemConfig { modules = [ ./system/marushiru.nix ]; };
89| "minami" = makeSystemConfig {
| ^
90| modules = [ ./system/minami inputs.sops-nix.nixosModules.sops ];
… while calling 'makeSystemConfig'
at /nix/store/ncibdc9d87f9ysfvjkaiqpmwxgiayl05-source/nix/lib.nix:17:5:
16| makeSystemConfig =
17| { modules
| ^
18| , extraSpecialArgs ? { }
… from call site
at /nix/store/ncibdc9d87f9ysfvjkaiqpmwxgiayl05-source/nix/lib.nix:92:5:
91| in
92| returnIfNoAssertions toplevel;
| ^
93|
… while calling 'returnIfNoAssertions'
at /nix/store/ncibdc9d87f9ysfvjkaiqpmwxgiayl05-source/nix/lib.nix:46:30:
45|
46| returnIfNoAssertions = drv:
| ^
47| let
… from call site
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:242:28:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while calling 'mapAttrsRecursiveCond'
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/attrsets.nix:1167:5:
1166| f:
1167| set:
| ^
1168| let
… from call site
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:234:33:
233| ({ inherit lib options config specialArgs; } // specialArgs);
234| in mergeModules prefix (reverseList collected);
| ^
235|
… while calling 'reverseList'
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/lists.nix:1068:17:
1067| */
1068| reverseList = xs:
| ^
1069| let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;
… from call site
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:229:25:
228| merged =
229| let collected = collectModules
| ^
230| class
… while calling anonymous lambda
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:445:37:
444|
445| in modulesPath: initialModules: args:
| ^
446| filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
… from call site
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:446:7:
445| in modulesPath: initialModules: args:
446| filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
| ^
447|
… while calling 'filterModules'
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:413:36:
412| # modules recursively. It returns the final list of unique-by-key modules
413| filterModules = modulesPath: { disabled, modules }:
| ^
414| let
… while calling anonymous lambda
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:439:31:
438| disabledKeys = concatMap ({ file, disabled }: map (moduleKey file) disabled) disabled;
439| keyFilter = filter (attrs: ! elem attrs.key disabledKeys);
| ^
440| in map (attrs: attrs.module) (builtins.genericClosure {
… from call site
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:400:22:
399| let
400| module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
| ^
401| collectedImports = collectStructuredModules module._file module.key module.imports args;
… while calling anonymous lambda
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:365:11:
364| else
365| m: m;
| ^
366|
… from call site
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:400:35:
399| let
400| module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
| ^
401| collectedImports = collectStructuredModules module._file module.key module.imports args;
… while calling 'loadModule'
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:336:53:
335| # Like unifyModuleSyntax, but also imports paths and calls functions if necessary
336| loadModule = args: fallbackFile: fallbackKey: m:
| ^
337| if isFunction m then
… from call site
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:354:14:
353| throw "Module imports can't be nested lists. Perhaps you meant to remove one level of lists? Definitions: ${showDefs defs}"
354| else unifyModuleSyntax (toString m) (toString m) (applyModuleArgsIfFunction (toString m) (import m) args);
| ^
355|
… while calling 'unifyModuleSyntax'
at /nix/store/j10523yhkcc34478azkgcl70yzcx6j2j-source/lib/modules.nix:454:34:
453| of ‘options’, ‘config’ and ‘imports’ attributes. */
454| unifyModuleSyntax = file: key: m:
| ^
455| let
error: Module `/nix/store/n2xvix786b3v8sni332pikjq3j8r3ygw-source/system/minami' has an unsupported attribute `sops'. This is caused by introducing a top-level `config' or `options' attribute. Add configuration attributes immediately on the top level instead, or move all of them (namely: sops) into the explicit `config' attribute.
Expected behavior
The configure can be built normally.
System information
latest system-manager and nix-sops
Ubuntu 22.04
Additional context
It seems that system-manager cannot use nixos modules. I'm wondering if the home-manager module can be used.
Describe the bug
--show-trace
or other nix flags don't get passed to nix and error instead
To Reproduce
Steps to reproduce the behavior:
sudo system-manager --nix-option --show-trace build --flake .
error: unexpected argument '--show-trace' found
Usage: system-manager [OPTIONS] <COMMAND>
For more information, try '--help'.
Expected behavior
Pass the flag to nix, as it claims to do.
System information
system-manager 0.1.0
Additional context
Tried both with and without --nix-option
.
Additionally, the documentation isn't consistent about where flags go (i.e. before vs after the subcommand), so I assume its position doesn't matter.
Wasn't able to identify the nix build
command that's being run based on the source code, if you can provide that, I'll just use that instead.
Is your feature request related to a problem? Please describe.
When creating a large folder symlink its useful to create symlink of individual files present in the source. As such if we want to for example use environment.etc."".source = ./etc
, we won't be able to do it.
Describe the solution you'd like
Add environment.etc."file".recursive = mkEnableOption "";
Describe alternatives you've considered
-
Additional context
-
Describe the bug
errors on anything other than nixos and ubuntu.
To Reproduce
Steps to reproduce the behavior:
try running on any distro other than nixos or ubuntu.
Expected behavior
for it to be able to work on other distros.
System information
Alpine linux, Void linux, Gentoo. All on latest stable nix.
Additional context
The README opening paragraph states "on any linux distro" yet this fails if you are not on nixos or ubuntu?
Is there a reason for the failure? my config is just writing a file to /etc - no services (I do not use systemd).
Also, the paragraph states "for non-nixos systems" yet the above failure states that nixos is supported?
My Hydra instance is building the result of makeSystemConfig
, like so:
flakeInputs.system-manager.lib.makeSystemConfig {
modules = [
baseModule
./modules
] ++ extraModules;
}
However, when I go to actually install this on one of my target systems, it looks like it still needs to build a bunch of things:
01:03:43 copying path '/nix/store/vhvfgfixbp1q1q5yqss39h3230j3hb7w-robotDev-2.30.0-20230712023201-0.sh' from 'http://hydra.clearpath.ai:5000/'...
01:03:45 building '/nix/store/06jly110gh63fgmnz3b8jg6mdby55bfy-activate.drv'...
01:03:48 building '/nix/store/9yk55y5ywvm4ihnllfa2kcz158bmbfbg-builder.pl.drv'...
01:03:52 building '/nix/store/jmx5dkbvrd4p6z9xn6yxcnrnbb9jbriz-builder.pl.drv'...
01:03:54 building '/nix/store/i7ah0mcva5wvkcrf0bvpza4q65i0p7r8-deactivate.drv'...
01:03:57 building '/nix/store/a97kva6ardhyzplljx9pvxijyds606bj-preActivationAssertions.drv'...
01:03:59 building '/nix/store/mvc0axk2nfrdrbqbxc5ry7hdr60437hj-prepopulate.drv'...
01:04:00 building '/nix/store/5ijd2yyn6qyjvrpyspqjv4zrwb4m8q0m-register-profile.drv'...
01:04:02 building '/nix/store/vazjsbn21z58v238103ayy95zf32d3p5-ros-nix-setup-ros1.bash-etc-link.drv'...
01:04:04 building '/nix/store/rlfmdqgxs8sg1n86qzcv1wf94cn43b36-ros-nix-setup-ros2.bash-etc-link.drv'...
01:04:06 building '/nix/store/3z7lb6ciixgiksif2nywd5kl0j79pwdx-udev-rules.d-80-robot-common-cfg.rules-etc-link.drv'...
01:04:07 building '/nix/store/wxyqvzxz7rl64r52nqksd9jvykv00xmm-unit-robot.target.drv'...
01:04:08 building '/nix/store/fjv50lmjgajmfldahlnk1lqdcs8gj4hy-unit-script-robot-ros-start.drv'...
01:04:09 building '/nix/store/w239377jh8gyyn2mwkjrqqyfslf6hqjg-unit-script-robot-ros2-start.drv'...
01:04:10 building '/nix/store/gasd4y7bclrc6h4cmlk6hcl0halkjhl5-unit-robot-ros.service.drv'...
01:04:11 building '/nix/store/6ij0b16n2646rs1a6rpjzk0i8mvrqyp3-unit-robot-ros2.service.drv'...
01:04:12 building '/nix/store/4hrnaibkyrzsi68nia8iyhsynfhnazv1-unit-script-robot-start.drv'...
01:04:13 building '/nix/store/lf613hgk32lqpdq97sb4nhkhqz3x8303-unit-system-manager.target.drv'...
01:04:14 building '/nix/store/fqdc3wnvlzd8l380r8j95ds0v4vvkqmp-unit-robot.service.drv'...
01:04:14 building '/nix/store/zsvnyyz7kmcyznffjfgr53xjsx1kbasv-services.drv'...
01:04:15 building '/nix/store/8x25abpsxysb1wm4197aplfys6wjbzad-system-manager-units.drv'...
01:04:16 building '/nix/store/kf9aqzmgwsmv1scvgllqs1bjdzpkgsy7-systemd-system-etc-link.drv'...
01:04:16 building '/nix/store/9nxjgslqfqbqysclh35lq7awd1yqy3s9-etc-static-env.drv'...
01:04:17 building '/nix/store/xb4fqgcsh9f3ns1khw7sf2x2yxf1v16w-etcFiles.drv'...
01:04:18 building '/nix/store/zqm29xfjzppv32j8hxa35a2issc712nv-system-manager.drv'...
01:04:18 [2023-07-12T05:04:18Z INFO system_manager::register] Built system-manager profile /nix/store/1c91fcifykjxpcgxwpb8i7hi0zc60km0-system-manager
01:04:18 [2023-07-12T05:04:18Z INFO system_manager::register] Creating new generation from /nix/store/1c91fcifykjxpcgxwpb8i7hi0zc60km0-system-manager
This prevents me from using --max-jobs 0
in this context to prohibit unwanted building (and the pulling of buildInputs) in other areas. Is there some other attribute or passthru I can point Hydra at that will include everything needed for the final deployment?
Is your feature request related to a problem? Please describe.
Currently, its not really clear, how to combine home-manager with system-manager.
I hope for some form of template, that showcases how to integrate the two.
Describe the solution you'd like
Standards are important. From my limited experience, it seems like combining system-manager with home-manager seems to be best done via a Flake.
Considering both can describe packages (eg, have some overlap) I think its save to say, its sensible to find a standard solution, to combine the two projects.
Describe alternatives you've considered
Running them side by side?
Additional context
I think its worth considering, to ship system-manager with home-manager integrated by default.
People who are looking for one, probably also look for the other. Also, system-manager aims to provide the NixOS experience on non-NixOS.
I think combining the two projects in an elegant way goes a long way towards that.
Thank you very much ❤️
Describe the bug
➤ nix run --show-trace 'github:numtide/system-manager' -- switch --flake '.'
[2024-03-08T16:52:33Z INFO system_manager::register] Trying flake URI: .#systemConfigs.elite-nix-os...
warning: Git tree '/home/user/Desktop/app-t' is dirty
[2024-03-08T16:52:34Z INFO system_manager::register] Attribute .#systemConfigs.elite-nix-os not found in flake.
[2024-03-08T16:52:34Z INFO system_manager::register] Trying flake URI: .#systemConfigs.default...
warning: Git tree '/home/user/Desktop/app-t' is dirty
[2024-03-08T16:52:35Z INFO system_manager::register] Success, using .#systemConfigs.default
[2024-03-08T16:52:35Z INFO system_manager::register] Building new system-manager generation...
[2024-03-08T16:52:35Z INFO system_manager::register] Running nix build...
warning: Git tree '/home/user/Desktop/app-t' is dirty
error:
… while evaluating a branch condition
at /nix/store/qayms4j0abdhx9jpzwwz1y9d6mhkqzjv-source/nix/lib.nix:50:9:
49| in
50| if failedAssertions != [ ]
| ^
51| then throw "\nFailed assertions:\n${lib.concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}"
… while calling the 'map' builtin
at /nix/store/qayms4j0abdhx9jpzwwz1y9d6mhkqzjv-source/nix/lib.nix:48:30:
47| let
48| failedAssertions = map (x: x.message) (lib.filter (x: !x.assertion) config.assertions);
| ^
49| in
(stack trace truncated; use '--show-trace' to show the full trace)
error: getting status of '/nix/store/jp2kw74bigwv1npgi02n22hqm7dj7r6f-source/compat.nix': No such file or directory
[2024-03-08T16:52:35Z ERROR system_manager] Nix build failed, see console output for details.
To Reproduce
Steps to reproduce the behavior:
{
description = "app";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
system-manager = {
url = "github:numtide/system-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-compat, system-manager } @inputs:
{
systemConfigs.default = system-manager.lib.makeSystemConfig {
modules = [
({ nixosModulesPath, config, pkgs, lib, ... }:
{
imports = [
"${nixosModulesPath}/services/web-servers/apache-httpd"
./compat.nix
];
nixpkgs.hostPlatform = "x86_64-linux";
services.httpd = {
enable = true;
enablePHP = true;
user = "www-data";
group = "www-data";
phpPackage = pkgs.php83;
virtualHosts."localhost" = {
documentRoot = "/srv/www";
};
};
})
];
};
};
}
Expected behavior
A running apache server with php
System information
Linux elite-nix-os 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 1 12:35:11 UTC 2024 x86_64 GNU/Linux
Additional context
Wanted to try running php apache
Is your feature request related to a problem? Please describe.
I have a question about usage but it is not a bug report nor a feature request, and so it probably does not belong as an issue.
Describe the solution you'd like
It might be a good idea to add a "Discussions" section to the repo for Q&A, usage discussions, etc.
Describe alternatives you've considered
The alternative is to create an issue when questions arise.
Additional context
For lack of anywhere else to ask, I created issue #88 with a question on usage.
Describe the bug
Every time I run system-manager switch --flake .
I get kicked out of my desktop environment.
Looks like system-manager
is restarting sysinit.target
which is booting me out of my desktop environment.
System information
aaron@inspiron-5765 ~> cat /etc/os-release
PRETTY_NAME="Ubuntu 22.10"
NAME="Ubuntu"
VERSION_ID="22.10"
VERSION="22.10 (Kinetic Kudu)"
VERSION_CODENAME=kinetic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=kinetic
LOGO=ubuntu-logo
Additional context
Logs from system-manager switch
:
[2023-04-07T16:25:13Z INFO system_manager::generate] Trying flake URI: .#systemConfigs.inspiron-5765...
[2023-04-07T16:25:13Z INFO system_manager::generate] Attribute .#systemConfigs.inspiron-5765 not found in flake.
[2023-04-07T16:25:13Z INFO system_manager::generate] Trying flake URI: .#systemConfigs.default...
[2023-04-07T16:25:13Z INFO system_manager::generate] Success, using .#systemConfigs.default
[2023-04-07T16:25:13Z INFO system_manager::generate] Building new system-manager generation...
[2023-04-07T16:25:13Z INFO system_manager::generate] Running nix build...
warning: Git tree '/home/aaron/nixos' is dirty
[2023-04-07T16:25:13Z INFO system_manager::generate] Build system-manager profile /nix/store/09qp4fsq00sp7imd4licp7wwr0hamqab-system-manager
[2023-04-07T16:25:13Z INFO system_manager::generate] Creating new generation from /nix/store/09qp4fsq00sp7imd4licp7wwr0hamqab-system-manager
[2023-04-07T16:25:13Z INFO system_manager::generate] Registering GC root...
[2023-04-07T16:25:13Z INFO system_manager] Creating symlink: /nix/var/nix/gcroots/system-manager-current -> /nix/store/09qp4fsq00sp7imd4licp7wwr0hamqab-system-manager
[2023-04-07T16:25:13Z INFO system_manager::generate] Done
[2023-04-07T16:25:13Z INFO system_manager::activate] Activating system-manager profile: /nix/store/09qp4fsq00sp7imd4licp7wwr0hamqab-system-manager
[2023-04-07T16:25:13Z INFO system_manager::activate] Running pre-activation assertions...
Evaluating pre-activation assertion osVersion...
All pre-activation assertions succeeded.
[2023-04-07T16:25:13Z INFO system_manager::activate] Activating etc files...
[2023-04-07T16:25:13Z INFO system_manager::activate::etc_files] Reading etc file definitions...
[2023-04-07T16:25:13Z INFO system_manager::activate::etc_files] Creating /etc entries in /etc
[2023-04-07T16:25:13Z INFO system_manager::activate::etc_files::etc_tree] Reading state info from /var/lib/system-manager/state/etc-files.json
[2023-04-07T16:25:13Z INFO system_manager] Creating symlink: /etc/.system-manager-static -> /nix/store/gsz8nng1gxm1xwnhz3l7wi8clny6zm8a-etc-static-env
[2023-04-07T16:25:13Z INFO system_manager::activate::etc_files] Entering into directory...
[2023-04-07T16:25:13Z INFO system_manager::activate::etc_files] Entering into directory...
[2023-04-07T16:25:13Z INFO system_manager::activate::etc_files::etc_tree] Writing state info into file: /var/lib/system-manager/state/etc-files.json
[2023-04-07T16:25:13Z INFO system_manager::activate::etc_files] Done
[2023-04-07T16:25:13Z INFO system_manager::activate] Activating systemd services...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Reading state info from /var/lib/system-manager/state/services.json
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Reading new service definitions...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Writing state info into file: /var/lib/system-manager/state/services.json
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Reloading the systemd daemon...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit cryptsetup.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit veritysetup.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit sysinit.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit swap.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit network-online.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit local-fs.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit basic.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit remote-fs.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit graphical.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit sockets.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit getty.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit integritysetup.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit multi-user.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit paths.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit bluetooth.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit sound.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit timers.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::activate::services] Unit slices.target: restarting...
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (0/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (1/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (2/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (3/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (3/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (3/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (3/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (3/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (3/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (3/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (3/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (4/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (4/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (5/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (6/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (6/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (6/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (7/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (7/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (8/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (8/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (9/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (10/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (10/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (11/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (11/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (11/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (12/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (12/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (12/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (12/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (12/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (12/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (12/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (12/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (12/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (12/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (13/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (13/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (14/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (14/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (15/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (16/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (16/18)
[2023-04-07T16:25:13Z INFO system_manager::systemd] Waiting for jobs to finish... (16/18)
[2023-04-07T16:25:14Z INFO system_manager::systemd] Waiting for jobs to finish... (16/18)
[2023-04-07T16:25:14Z INFO system_manager::systemd] Waiting for jobs to finish... (17/18)
[2023-04-07T16:25:14Z INFO system_manager::systemd] All jobs finished.
[2023-04-07T16:25:14Z INFO system_manager::activate::services] Done
Thanks for this awesome project! 🚀
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.