From fa246cd520aa2f2b369e8cb60a926f4d3844f942 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 13 Mar 2022 10:55:05 +0100 Subject: rebuild-machines: machines flake --- accounts/gkleen@sif/default.nix | 5 +++-- installer/default.nix | 2 -- system-profiles/rebuild-machines/default.nix | 12 ++++++------ user-profiles/core.nix | 5 ++--- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 4322278e..7c75af98 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -292,11 +292,12 @@ in { google-play-music-desktop-player qt5ct playerctl evince thunderbird wrappedZulip zoom-us steam steam-run wireshark virt-manager rclone cached-nix-shell xournal xmonad worktime - fira-code-symbols libreoffice xournalpp - wrappedChrome nixos-shell virt-viewer freerdp gnome-icon-theme + fira-code-symbols libreoffice xournalpp wrappedChrome + nixos-shell virt-viewer freerdp gnome-icon-theme paper-icon-theme sshpassSecret weechat helvum wrappedElementDesktop matrix-synapse-tools.synadm wrappedRocketChatDesktop + flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs ]; file = { diff --git a/installer/default.nix b/installer/default.nix index ad0c3849..bf09c8d8 100644 --- a/installer/default.nix +++ b/installer/default.nix @@ -28,7 +28,5 @@ ]; zramSwap.enable = true; - - home-manager.enableSystemd = true; }; } diff --git a/system-profiles/rebuild-machines/default.nix b/system-profiles/rebuild-machines/default.nix index fe9a5f14..e434d2e4 100644 --- a/system-profiles/rebuild-machines/default.nix +++ b/system-profiles/rebuild-machines/default.nix @@ -68,7 +68,7 @@ in { }; }; }; - default = { flake.url = "git+ssh://${cfg.repoHost}/nixos?ref=flakes"; flakeOutput = hostName; }; + default = { flake = { type = "git"; url = "ssh://${cfg.repoHost}/nixos"; ref = "flakes"; } flakeOutput = hostName; }; description = '' The Flake URI of the NixOS configuration to build. ''; @@ -122,15 +122,15 @@ in { } ]; - sops.secrets = lib.mkIf (!(isNull cfg.sopsConfig)) { + sops.secrets = mkIf (!(isNull cfg.sopsConfig)) { "${cfg.sopsName}" = { sopsFile = cfg.repoPrivkey; } // cfg.sopsConfig; }; - environment.systemPackages = [ rebuildScript ]; + environment.systemPackages = [rebuildScript]; - systemd.services."rebuild-${hostName}" = lib.mkIf (cfg.period != null) { + systemd.services."rebuild-${hostName}" = mkIf (cfg.period != null) { description = "Upgrade System on Next Boot"; requisite = [ "network.target" ]; after = [ "network.target" ]; @@ -144,7 +144,7 @@ in { }; }; - systemd.timers."rebuild-${hostName}" = lib.mkIf (cfg.period != null) { + systemd.timers."rebuild-${hostName}" = mkIf (cfg.period != null) { wantedBy = [ "timers.target" ]; timerConfig = { OnCalendar = cfg.period; @@ -152,7 +152,7 @@ in { }; }; - nix.registry = lib.mkIf (cfg.flake != null) { + nix.registry = mkIf (cfg.flake != null) { ${cfg.flake.name} = { exact = false; to = cfg.flake.flake; diff --git a/user-profiles/core.nix b/user-profiles/core.nix index cf5db3b6..29891d12 100644 --- a/user-profiles/core.nix +++ b/user-profiles/core.nix @@ -10,12 +10,11 @@ manual.manpages.enable = true; home.stateVersion = "20.09"; systemd.user.startServices = "sd-switch"; - }; }; - systemd.services."home-manager-${utils.escapeSystemdPath userName}" = lib.mkIf config.home-manager.enableSystemd { - enable = false; # deploy with deploy-rs + systemd.services."home-manager-${utils.escapeSystemdPath userName}" = lib.mkIf (!config.home-manager.enableSystemd) { + restartIfChanged = false; # only run once on startup, deploy to running system with deploy-rs }; }; } -- cgit v1.2.3