From 2340270d813b43b96f4c441bdcbdc3a4bed92096 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 22:55:28 +0200 Subject: [PATCH] All the option are with us now --- .drone.yml | 49 ++++++++++++++++++++++++++++++- flake.nix | 2 +- modules/audio/default.nix | 10 ++++--- profiles/audio/default.nix | 6 ++++ profiles/core/default.nix | 6 ---- profiles/full-install/default.nix | 15 ++++++++++ 6 files changed, 76 insertions(+), 12 deletions(-) create mode 100644 profiles/audio/default.nix create mode 100644 profiles/full-install/default.nix diff --git a/.drone.yml b/.drone.yml index be74152..fdd5844 100644 --- a/.drone.yml +++ b/.drone.yml @@ -106,8 +106,55 @@ steps: - nix -Lv develop -c echo OK - nix -Lv develop --command bud --help +--- +kind: pipeline +type: docker +name: Publish ISO + +steps: + - name: "Build ISO" + image: nixpkgs/nix-flakes:nixos-21.05 + volumes: + - name: nix-store + path: /nix/store + when: + event: + - push + branch: + - main + commands: + - echo "" >> /etc/nix/nix.conf + - echo "system-features = nixos-test benchmark big-parallel kvm recursive-nix" >> /etc/nix/nix.conf + - echo "substituters = https://nrdxp.cachix.org https://nix-community.cachix.org https://cache.nixos.org" >> /etc/nix/nix.conf + - echo "trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" >> /etc/nix/nix.conf + - nix-shell + - bud build bootstrap bootstrapIso + + - name: "Publish ISO" + image: appleboy/drone-scp + volumes: + - name: nix-store + path: /nix/store + settings: + host: + from_secret: ssh_host + user: + from_secret: ssh_user + port: + from_secret: ssh_port + key: + from_secret: ssh_key + target: /var/www/pub.solar + source: + - result/iso/*.iso + +volumes: + - name: nix-store + host: + path: "/var/nix/build-store" + --- kind: signature -hmac: 36b824020f2bafbb46bc0b4087296e82db41677a3b5b85c7851b90322492343c +hmac: a1c4dfbb3185a6185cc80622b0d78ff50a45c208fcbed963dbca894c8f47c6b3 ... diff --git a/flake.nix b/flake.nix index 70ed129..9f18369 100644 --- a/flake.nix +++ b/flake.nix @@ -129,7 +129,7 @@ }; suites = with profiles; rec { base = [ core users.pub-solar users.root ]; - pubsolaros = [ core installed base-user users.root ]; + pubsolaros = [ core full-install base-user users.root ]; anonymous = [ pubsolaros users.pub-solar ]; }; }; diff --git a/modules/audio/default.nix b/modules/audio/default.nix index ce8c2f3..68b3c19 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -8,6 +8,8 @@ in { options.pub-solar.audio = { enable = mkEnableOption "Life in highs and lows"; + mopidy.enable = mkEnableOption "Life with mopidy"; + bluetooth.enable = mkEnableOption "Life with bluetooth"; }; config = mkIf cfg.enable { @@ -36,7 +38,7 @@ in config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json); # Bluetooth configuration for pipewire - media-session.config.bluez-monitor.rules = [ + media-session.config.bluez-monitor.rules = mkIf cfg.bluetooth.enable [ { # Matches all cards matches = [{ "device.name" = "~bluez_card.*"; }]; @@ -63,10 +65,10 @@ in }; # Enable bluetooth - hardware.bluetooth.enable = true; - services.blueman.enable = true; + hardware.bluetooth.enable = mkIf cfg.bluetooth.enable true; + services.blueman.enable = mkIf cfg.bluetooth.enable true; # Enable audio server & client - services.mopidy = import ./mopidy.nix pkgs; + services.mopidy = mkIf cfg.mopidy.enable ((import ./mopidy.nix) pkgs); }; } diff --git a/profiles/audio/default.nix b/profiles/audio/default.nix new file mode 100644 index 0000000..22b64af --- /dev/null +++ b/profiles/audio/default.nix @@ -0,0 +1,6 @@ +{ self, config, lib, pkgs, ... }: +let inherit (lib) fileContents; +in +{ + pub-solar.audio.enable = true; +} diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 07a0532..b77baf5 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -9,11 +9,6 @@ in pub-solar.audio.enable = true; pub-solar.crypto.enable = true; pub-solar.devops.enable = true; - pub-solar.docker.enable = true; - pub-solar.nextcloud.enable = true; - pub-solar.office.enable = true; - # pub-solar.printing.enable = true; # this is enabled automatically if office is enabled - pub-solar.printing.enable = true; nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; @@ -30,7 +25,6 @@ in git git-lfs git-bug - git-crypt wget openssl openssh diff --git a/profiles/full-install/default.nix b/profiles/full-install/default.nix new file mode 100644 index 0000000..ba13655 --- /dev/null +++ b/profiles/full-install/default.nix @@ -0,0 +1,15 @@ +{ self, config, lib, pkgs, ... }: +let inherit (lib) fileContents; +in +{ + imports = [ ../cachix ]; + + config = { + pub-solar.audio.mopidy.enable = true; + pub-solar.audio.bluetooth.enable = true; + pub-solar.docker.enable = true; + pub-solar.nextcloud.enable = true; + pub-solar.office.enable = true; + # pub-solar.printing.enable = true; # this is enabled automatically if office is enabled + }; +}