diff --git a/.drone.yml b/.drone.yml index 71ac972..4b69e8e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,9 +7,6 @@ platform: os: linux arch: amd64 -clone: - depth: 1 - steps: - name: Show flake info @@ -22,49 +19,18 @@ steps: commands: - nix --experimental-features "nix-command flakes" flake check --show-trace -- name: Build aida +- name: Build lisa commands: - - nix build -v '.#nixosConfigurations.aida.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" + - nix build -v '.#nixosConfigurations.lisa.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" -# - name: Build arm-server -# commands: -# - nix build -v '.#nixosConfigurations.arm-server.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" +- name: Build newton + commands: + - nix build -v '.#nixosConfigurations.newton.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" -- name: Build deke +- name: Build macintosh commands: - - nix build -v '.#nixosConfigurations.deke.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" + - nix build -v '.#nixosConfigurations.macintosh.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" -- name: Build enoch - commands: - - nix build -v '.#nixosConfigurations.enoch.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - -- name: Build flint - commands: - - nix build -v '.#nixosConfigurations.flint.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - -- name: Build kora - commands: - - nix build -v '.#nixosConfigurations.kora.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - -- name: Build simmons - commands: - - nix build -v '.#nixosConfigurations.simmons.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - -- name: Build snowflake - commands: - - nix build -v '.#nixosConfigurations.snowflake.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - -- name: Build the-hub - commands: - - nix build -v '.#nixosConfigurations.the-hub.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - -- name: Build the-bus - commands: - - nix build -v '.#nixosConfigurations.the-bus.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - -- name: Build water-on-fire - commands: - - nix build -v '.#nixosConfigurations.water-on-fire.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" trigger: branch: @@ -73,237 +39,3 @@ trigger: - push - pull_request ---- -kind: pipeline -type: exec -name: Build flake apps - -platform: - os: linux - arch: amd64 - -clone: - depth: 1 - -steps: - -# - name: Build darknet -# commands: -# - nix build .#darknet - -- name: Build owncast - commands: - - nix build .#owncast - -- name: Build plexRaw - commands: - - nix build .#plexRaw - -- name: Build tautulli - commands: - - nix build .#tautulli - -trigger: - branch: - - main - event: - - push - - ---- -kind: pipeline -type: exec -name: build flake update - -platform: - os: linux - arch: amd64 - -clone: - depth: 1 - -steps: - -- name: create result-old files - commands: - - nix build -v '.#nixosConfigurations.aida.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result aida-old -# - nix build -v '.#nixosConfigurations.arm-server.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" -# - mv result arm-server-old - - nix build -v '.#nixosConfigurations.deke.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result deke-old - - nix build -v '.#nixosConfigurations.flint.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result flint-old - - nix build -v '.#nixosConfigurations.enoch.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result enoch-old - - nix build -v '.#nixosConfigurations.kora.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result kora-old - - nix build -v '.#nixosConfigurations.simmons.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result simmons-old - - nix build -v '.#nixosConfigurations.snowflake.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result snowflake-old - - nix build -v '.#nixosConfigurations.the-hub.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result the-hub-old - - nix build -v '.#nixosConfigurations.the-bus.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result the-bus-old - - nix build -v '.#nixosConfigurations.water-on-fire.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result water-on-fire-old - -- name: flake update - commands: - - nix --experimental-features "nix-command flakes" flake update --inputs-from nixpkgs - -- name: Show git diff - commands: - - git diff - -- name: Show flake info - commands: - - nix --experimental-features "nix-command flakes" flake show - - nix --experimental-features "nix-command flakes" flake metadata - - nix --experimental-features "nix-command flakes" flake check - -- name: Run flake checks - commands: - - nix --experimental-features "nix-command flakes" flake check --show-trace - -- name: Build aida - commands: - - nix build -v '.#nixosConfigurations.aida.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result aida-new - -# - name: Build arm-server -# commands: -# - nix build -v '.#nixosConfigurations.arm-server.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" -# - mv result arm-server-new - -- name: Build deke - commands: - - nix build -v '.#nixosConfigurations.deke.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result deke-new - -- name: Build enoch - commands: - - nix build -v '.#nixosConfigurations.enoch.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result enoch-new - -- name: Build flint - commands: - - nix build -v '.#nixosConfigurations.flint.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result flint-new - -- name: Build kora - commands: - - nix build -v '.#nixosConfigurations.kora.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result kora-new - -- name: Build simmons - commands: - - nix build -v '.#nixosConfigurations.simmons.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result simmons-new - -- name: Build snowflake - commands: - - nix build -v '.#nixosConfigurations.snowflake.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result snowflake-new - -- name: Build the-hub - commands: - - nix build -v '.#nixosConfigurations.the-hub.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result the-hub-new - -- name: Build the-bus - commands: - - nix build -v '.#nixosConfigurations.the-bus.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result the-bus-new - -- name: Build water-on-fire - commands: - - nix build -v '.#nixosConfigurations.water-on-fire.config.system.build.toplevel' --option binary-caches "https://cache.nixos.org" - - mv result water-on-fire-new - -# - name: Build darknet -# commands: -# - nix build .#darknet - -- name: Build owncast - commands: - - nix build .#owncast - -- name: Build plexRaw - commands: - - nix build .#plexRaw - -- name: Build tautulli - commands: - - nix build .#tautulli - -- name: Print report - commands: - - echo "aida:" && nix store diff-closures $(readlink -f aida-old) $(readlink -f aida-new) -# - echo "arm-server:" && nix store diff-closures $(readlink -f arm-server-old) $(readlink -f arm-server-new) - - echo "deke:" && nix store diff-closures $(readlink -f deke-old) $(readlink -f deke-new) - - echo "enoch:" && nix store diff-closures $(readlink -f enoch-old) $(readlink -f enoch-new) - - echo "flint:" && nix store diff-closures $(readlink -f flint-old) $(readlink -f flint-new) - - echo "kora:" && nix store diff-closures $(readlink -f kora-old) $(readlink -f kora-new) - - echo "simmons:" && nix store diff-closures $(readlink -f simmons-old) $(readlink -f simmons-new) - - echo "snowflake:" && nix store diff-closures $(readlink -f snowflake-old) $(readlink -f snowflake-new) - - echo "the-hub:" && nix store diff-closures $(readlink -f the-hub-old) $(readlink -f the-hub-new) - - echo "the-bus:" && nix store diff-closures $(readlink -f the-bus-old) $(readlink -f the-bus-new) - - echo "water-on-fire:" && nix store diff-closures $(readlink -f water-on-fire-old) $(readlink -f water-on-fire-new) - -trigger: - branch: - - main - event: - - pull_request - - cron - ---- -kind: pipeline -name: push flake update -type: docker - -steps: -- name: Update flake.lock - image: nixpkgs/nix-flakes - commands: - - nix flake update --inputs-from nixpkgs - - nix flake show - - nix flake metadata - - nix flake check - - nix flake check --show-trace - environment: - NIX_PATH: nixpkgs=channel:nixos-unstable - -- name: Push updated flake.lock - image: appleboy/drone-git-push - settings: - branch: update-flake - remote: git@github.com:MayNiklas/nixos.git - force: true - commit: true - force: true - commit_message: "❄️ Update flake.lock" - ssh_key: - from_secret: deploy_key - -- name: notify on failure - image: drillster/drone-email - settings: - username: apikey - from: - from_secret: email_from - host: - from_secret: email_host - password: - from_secret: email_password - when: - status: - - failure - -trigger: - branch: - - main - event: - - cron diff --git a/README.md b/README.md index 3d2f6c0..b13a735 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# My NixOS Configurations ❄ +# My NixOS Configurations ❄ + +[![Build Status](https://ci.julienmalka.me/api/badges/JulienMalka/nix-config/status.svg?ref=refs/heads/main)](https://ci.julienmalka.me/JulienMalka/nix-config) This repository contains the configurations of my machines using NixOS. @@ -29,6 +31,6 @@ This configuration defines a number of custom NixOS and home-manager modules. Th Secrets are stored in the secrets folder. They are decrypted upon system activation using the host ssh key. -### Inspiration +### Inspirations This project is freely inspired by some really cool projects, including MayNiklas/nixos, pinox/nixos and ncfavier/config. diff --git a/flake.nix b/flake.nix index acbaf97..ab63e41 100644 --- a/flake.nix +++ b/flake.nix @@ -23,7 +23,7 @@ sops-nix = { url = "github:Mic92/sops-nix"; }; - + }; outputs = { self, home-manager, nixpkgs, unstable, sops-nix, neovim-nightly-overlay, nur, ... }@inputs: @@ -39,10 +39,6 @@ }) (builtins.attrNames (builtins.readDir ./modules))); - nixosConfigurations = builtins.mapAttrs (name: value: (mkMachine name value self.nixosModules)) (importConfig ./machines); - hydraJobs = (nixpkgs.lib.mapAttrs' (name: config: - nixpkgs.lib.nameValuePair "nixos-${name}" - config.config.system.build.toplevel) self.nixosConfigurations); - + nixosConfigurations = builtins.mapAttrs (name: value: (mkMachine name value self.nixosModules)) (importConfig ./machines); }; } diff --git a/machines/newton/default.nix b/machines/newton/default.nix index 4aec8c7..5dd49e4 100644 --- a/machines/newton/default.nix +++ b/machines/newton/default.nix @@ -20,7 +20,7 @@ in }; zfs-mails.enable = true; hydra = { - enable = true; + enable = false; nginx = { enable = true; subdomain = "hydra";