From c2c9a65fc4403c200621693681ebd11e5b2051f5 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 14:21:11 +0200 Subject: [PATCH 1/4] devos: move common overlays to sharedOverlays for fup passthrough See: https://github.com/divnix/digga/commit/89d9b3ea97decc70598e1c26f0cf963edec8d0dd --- flake.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 7d43b67c..5bb7a948 100644 --- a/flake.nix +++ b/flake.nix @@ -73,11 +73,7 @@ channels = { nixos = { imports = [ (digga.lib.importOverlays ./overlays) ]; - overlays = [ - nur.overlay - agenix.overlay - ./pkgs/default.nix - ]; + overlays = [ ]; }; latest = { }; }; @@ -91,6 +87,10 @@ our = self.lib; }); }) + nur.overlay + agenix.overlay + + (import ./pkgs) ]; nixos = { From bf581d1e9c19df13ff30ab7c0ff8330cefdd3626 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 14:23:37 +0200 Subject: [PATCH 2/4] nix-dram: remove nix-dram as default nix binary nix-dram as default nix binary isn't worth the maintenance work anymore, CI builds started failing because of it: https://ci.b12f.io/pub-solar/os/533/1/2 Automatic builds still happen each night and can be checked in our fork of nix-dram: https://github.com/pub-solar/nix-dram/actions Users of nix-dram can continue to use it via devshells or nix run github:dramforever/nix-dram -- --version --- flake.nix | 7 +------ modules/x-os/nix.nix | 2 -- overlays/overrides.nix | 1 + profiles/dram/default.nix | 5 ----- shell/devos.nix | 2 +- 5 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 profiles/dram/default.nix diff --git a/flake.nix b/flake.nix index 5bb7a948..4ed511d5 100644 --- a/flake.nix +++ b/flake.nix @@ -42,10 +42,6 @@ nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-generators.url = "github:nix-community/nixos-generators"; - - # PubSolarOS additions - nix-dram.url = "github:dramforever/nix-dram"; - nix-dram.inputs.nixpkgs.follows = "latest"; }; outputs = @@ -59,7 +55,6 @@ , agenix , nvfetcher , deploy - , nix-dram , ... } @ inputs: digga.lib.mkFlake @@ -120,7 +115,7 @@ suites = with profiles; rec { base = [ core users.pub-solar users.root ]; iso = base ++ [ base-user graphical pub-solar-iso ]; - pubsolaros = [ core dram full-install base-user users.root ]; + pubsolaros = [ core full-install base-user users.root ]; anonymous = [ pubsolaros users.pub-solar ]; }; }; diff --git a/modules/x-os/nix.nix b/modules/x-os/nix.nix index 56b677da..38b70cfc 100644 --- a/modules/x-os/nix.nix +++ b/modules/x-os/nix.nix @@ -18,8 +18,6 @@ keep-outputs = true keep-derivations = true fallback = true - # used by nix-dram - default-flake = flake:nixpkgs ''; }; } diff --git a/overlays/overrides.nix b/overlays/overrides.nix index df75736d..fd0b836f 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -13,6 +13,7 @@ channels: final: prev: { signal-desktop starship deploy-rs + nix tdesktop arduino diff --git a/profiles/dram/default.nix b/profiles/dram/default.nix deleted file mode 100644 index 0b7fc3ee..00000000 --- a/profiles/dram/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ self, config, lib, pkgs, inputs, ... }: - -{ - nix.package = inputs.nix-dram.packages.${pkgs.system}.nix-dram; -} diff --git a/shell/devos.nix b/shell/devos.nix index f799ca03..2198052f 100644 --- a/shell/devos.nix +++ b/shell/devos.nix @@ -34,7 +34,7 @@ in ''); commands = with pkgs; [ - (devos nixUnstable) + (devos nix) (devos agenix) { category = "devos"; From 9d25b3ee9b3c4a6198c20361ebb488260cf4b92e Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 14:24:53 +0200 Subject: [PATCH 3/4] Fix build of rnix-lsp for nix verion 2.10+ This fix didn't land in a released tag of rnix-lsp yet. Build it from the master branch until next release Upstream PR: https://github.com/nix-community/rnix-lsp/pull/94 Also bump flake.lock --- flake.lock | 45 ++++--------------------------------------- overlays/rnix-lsp.nix | 18 +++++++++++++++++ 2 files changed, 22 insertions(+), 41 deletions(-) create mode 100644 overlays/rnix-lsp.nix diff --git a/flake.lock b/flake.lock index f6a8edfc..2e4bdbcd 100644 --- a/flake.lock +++ b/flake.lock @@ -314,21 +314,6 @@ } }, "flake-utils_4": { - "locked": { - "lastModified": 1656928814, - "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { "locked": { "lastModified": 1649676176, "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", @@ -416,27 +401,6 @@ "type": "github" } }, - "nix-dram": { - "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": [ - "latest" - ] - }, - "locked": { - "lastModified": 1660180791, - "narHash": "sha256-oPO+keK4S9daL9ubU51hZ+QOWVSMbZ56F20iFI9Px3s=", - "owner": "dramforever", - "repo": "nix-dram", - "rev": "ae7f0b7c5d39eec5941fe21e9f202106bdea9ac2", - "type": "github" - }, - "original": { - "owner": "dramforever", - "repo": "nix-dram", - "type": "github" - } - }, "nixlib": { "locked": { "lastModified": 1636849918, @@ -489,11 +453,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1660291411, - "narHash": "sha256-9UfJMJeCl+T/DrOJMd1vLCoV8U3V7f9Qrv/QyH0Nn28=", + "lastModified": 1660407119, + "narHash": "sha256-04lWO0pDbhAXFdL4v2VzzwgxrZ5IefKn+TmZPiPeKxg=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "78f56d8ec2c67a1f80f2de649ca9aadc284f65b6", + "rev": "12620020f76b1b5d2b0e6fbbda831ed4f5fe56e1", "type": "github" }, "original": { @@ -565,7 +529,7 @@ "nvfetcher": { "inputs": { "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_4", "nixpkgs": [ "nixos" ] @@ -621,7 +585,6 @@ "home": "home", "latest": "latest_2", "naersk": "naersk", - "nix-dram": "nix-dram", "nixos": "nixos", "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", diff --git a/overlays/rnix-lsp.nix b/overlays/rnix-lsp.nix new file mode 100644 index 00000000..62c0f2b0 --- /dev/null +++ b/overlays/rnix-lsp.nix @@ -0,0 +1,18 @@ +final: prev: { + rnix-lsp = prev.rnix-lsp.overrideAttrs (oldAttrs: rec { + version = "unstable-2022-07-28"; + + src = prev.fetchFromGitHub { + owner = "nix-community"; + repo = "rnix-lsp"; + rev = "ff18e04551a39ccdab0ff9c83926db3807b23478"; + sha256 = "sha256-4OIpATLdPQvryyhRQPELeqNYC0n6PCyjD6LCPdwOztc="; + }; + + cargoDeps = oldAttrs.cargoDeps.overrideAttrs (prev.lib.const { + name = "rnix-lsp-vendor.tar.gz"; + inherit src; + outputHash = "sha256-SroynaHaFpvKlMSEagoGQhZcY7A0tE4xTbUXYFcneo8="; + }); + }); +} From c43b96c4d5f61cf07aa1a83b2cf753f0e95a3276 Mon Sep 17 00:00:00 2001 From: hensoko Date: Sun, 14 Aug 2022 13:54:19 +0000 Subject: [PATCH 4/4] Fix core module (#116) Co-authored-by: Hendrik Sokolowski Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/116 Reviewed-by: teutat3s --- hosts/bootstrap.nix | 1 - modules/core/default.nix | 17 ++++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hosts/bootstrap.nix b/hosts/bootstrap.nix index acadc449..541ca6fb 100644 --- a/hosts/bootstrap.nix +++ b/hosts/bootstrap.nix @@ -6,7 +6,6 @@ # interface that has the local link to the target machine imports = [ # profiles.networking - profiles.core profiles.users.root # make sure to configure ssh keys profiles.users.pub-solar profiles.base-user diff --git a/modules/core/default.nix b/modules/core/default.nix index 8aec7846..c7457c1b 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ config, lib, ... }: with lib; let @@ -10,18 +10,12 @@ in ./boot.nix ./fonts.nix ./i18n.nix - ./modules.nix ./networking.nix ./nix.nix ./packages.nix ./services.nix ]; - pub-solar.terminal-life.enable = true; - pub-solar.audio.enable = lib.mkIf (!cfg.lite) true; - pub-solar.crypto.enable = lib.mkIf (!cfg.lite) true; - pub-solar.devops.enable = lib.mkIf (!cfg.lite) true; - options.pub-solar.core = { lite = mkOption { description = '' @@ -31,4 +25,13 @@ in type = types.bool; }; }; + + config = { + pub-solar = { + terminal-life.enable = true; + audio.enable = lib.mkIf (!cfg.lite) true; + crypto.enable = lib.mkIf (!cfg.lite) true; + devops.enable = lib.mkIf (!cfg.lite) true; + }; + }; }