From 578f05b4f16e2aed4a1a862e764c981081aff72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Wed, 12 Jan 2022 17:39:16 +0100 Subject: [PATCH 001/118] Always hibernate --- .../config/config.d/custom-keybindings.conf | 4 +--- modules/sway/swayidle.service.nix | 8 +++----- pkgs/default.nix | 1 - pkgs/swaylock-bg.nix | 20 ------------------- 4 files changed, 4 insertions(+), 29 deletions(-) delete mode 100644 pkgs/swaylock-bg.nix diff --git a/modules/sway/config/config.d/custom-keybindings.conf b/modules/sway/config/config.d/custom-keybindings.conf index 6218d900..46fae96d 100644 --- a/modules/sway/config/config.d/custom-keybindings.conf +++ b/modules/sway/config/config.d/custom-keybindings.conf @@ -33,12 +33,10 @@ set $menu exec alacritty --class launcher -e env TERMINAL_COMMAND="alacritty -e" bindsym $mod+Space exec $menu # Set shut down, restart and locking features -set $mode_system (l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown +set $mode_system (e)xit, (h)ibernate, (r)eboot, (Shift+s)hutdown bindsym $mod+0 mode "$mode_system" mode "$mode_system" { - bindsym l exec swaylock-bg, mode "default" bindsym e exec swaymsg exit, mode "default" - bindsym s exec systemctl suspend, mode "default" bindsym h exec systemctl hibernate, mode "default" bindsym r exec systemctl reboot, mode "default" bindsym Shift+s exec systemctl poweroff, mode "default" diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index 597a8779..549f153f 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -9,12 +9,10 @@ pkgs: }; Service = { Type = "simple"; - Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin:${pkgs.swaylock}/bin:${pkgs.swaylock-bg}/bin"; + Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin"; ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ - timeout 600 'swaylock-bg' \ - timeout 900 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock-bg' + timeout 300 'swaymsg "output * dpms off"' \ + timeout 600 'systemctl hibernate' \ ''; }; Install = { diff --git a/pkgs/default.nix b/pkgs/default.nix index 312e685f..d8a86fd7 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -12,7 +12,6 @@ with final; { s = writeShellScriptBin "s" (import ./s.nix final); sway-launcher = writeScriptBin "sway-launcher" (import ./sway-launcher.nix final); sway-service = writeShellScriptBin "sway-service" (import ./sway-service.nix final); - swaylock-bg = writeScriptBin "swaylock-bg" (import ./swaylock-bg.nix final); toggle-kbd-layout = writeShellScriptBin "toggle-kbd-layout" (import ./toggle-kbd-layout.nix final); uhk-agent = import ./uhk-agent.nix final; wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final); diff --git a/pkgs/swaylock-bg.nix b/pkgs/swaylock-bg.nix deleted file mode 100644 index b55c32ae..00000000 --- a/pkgs/swaylock-bg.nix +++ /dev/null @@ -1,20 +0,0 @@ -self: with self; '' - # Dependencies: - # swaylock - - # Make sure we aren't running twice - RUNNING=$(ps -A | grep swaylock | wc -l) - if [ $RUNNING -ne 0 ]; then - exit 0 - fi - - IMAGE=$XDG_CONFIG_HOME/wallpaper.jpg - LOCKARGS="" - - for OUTPUT in `${sway}/bin/swaymsg -t get_outputs | jq -r '.[].name'` - do - LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}" - IMAGES="''${IMAGES} ''${IMAGE}" - done - exec ${swaylock}/bin/swaylock $LOCKARGS -'' -- 2.44.1 From d2f8a2d837904cecc978bbc3b5a77026e73b9bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 30 Apr 2022 23:56:02 +0200 Subject: [PATCH 002/118] Remove swaylock-bg from install list --- modules/sway/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/sway/default.nix b/modules/sway/default.nix index 83f407e4..88426536 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -75,7 +75,6 @@ in xsettingsd ydotool - swaylock-bg sway-launcher import-gtk-settings s -- 2.44.1 From 4b828cd91f8063047efcfce3c453465300c6e527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 1 May 2022 17:04:29 +0200 Subject: [PATCH 003/118] Shorten time until hibernate --- modules/sway/swayidle.service.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index 549f153f..61f32591 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -11,8 +11,8 @@ pkgs: Type = "simple"; Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin"; ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ - timeout 300 'swaymsg "output * dpms off"' \ - timeout 600 'systemctl hibernate' \ + timeout 150 'swaymsg "output * dpms off"' \ + timeout 300 'systemctl hibernate' \ ''; }; Install = { -- 2.44.1 From 0c4987ede101bd0348e599409626e74314f43ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 1 May 2022 17:29:21 +0200 Subject: [PATCH 004/118] Add resume device --- .../config/config.d/custom-keybindings.conf | 2 +- modules/x-os/boot.nix | 24 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/modules/sway/config/config.d/custom-keybindings.conf b/modules/sway/config/config.d/custom-keybindings.conf index 157ae8ee..172b7e53 100644 --- a/modules/sway/config/config.d/custom-keybindings.conf +++ b/modules/sway/config/config.d/custom-keybindings.conf @@ -23,7 +23,7 @@ bindsym $mod+F5 exec $term -e 'mocp -C $XDG_CONFIG_DIR/mocp/config' bindsym $mod+Shift+m exec mu bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf -# Screenshofts +# Screenshots bindsym $mod+Ctrl+p exec grim -g "$(slurp -d -b \#ffffff11)" ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png bindsym $mod+Shift+p exec grim ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png bindsym $mod+Ctrl+f exec "( pkill flameshot || true && flameshot & ) && ( sleep 0.5s && flameshot gui )" diff --git a/modules/x-os/boot.nix b/modules/x-os/boot.nix index 0633bec4..268f1547 100644 --- a/modules/x-os/boot.nix +++ b/modules/x-os/boot.nix @@ -10,18 +10,22 @@ in description = "Feature flag for iso builds"; }; config = { - # Enable plymouth for better experience of booting - boot.plymouth.enable = true; + boot = { + # Enable plymouth for better experience of booting + plymouth.enable = true; - # Mount / luks device in initrd - # Allow fstrim to work on it. - # The ! makes this enabled by default - boot.initrd = mkIf (!cfg.iso-options.enable) { - luks.devices."cryptroot" = { - allowDiscards = true; + # Mount / luks device in initrd + # Allow fstrim to work on it. + # The ! makes this enabled by default + initrd = mkIf (!cfg.iso-options.enable) { + luks.devices."cryptroot" = { + allowDiscards = true; + }; }; - }; - boot.loader.systemd-boot.enable = true; + resumeDevice = "/swapfile"; + + loader.systemd-boot.enable = true; + }; }; } -- 2.44.1 From 6817fb3d5f29eb5d533cb53ae25da9003554f403 Mon Sep 17 00:00:00 2001 From: vlalentim Date: Sat, 13 Aug 2022 20:05:51 +0200 Subject: [PATCH 005/118] Theme change for fzf --- pkgs/sway-launcher.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sway-launcher.nix b/pkgs/sway-launcher.nix index afa09d07..57c7afe4 100644 --- a/pkgs/sway-launcher.nix +++ b/pkgs/sway-launcher.nix @@ -23,7 +23,7 @@ self: with self; '' # search command list command_str=$(printf "%s\n" "''${command_history}" "''${command_list}" | \ sed -E 's/^[0-9]+ (.+)$/\1/' | \ - fzf --exact --no-extended --print-query --no-sort | \ + fzf --color=16 --exact --no-extended --print-query --no-sort | \ tail -n1) || exit 1 if [ "$command_str" = "" ]; then -- 2.44.1 From 70980fba28528f1ae2a0bfccf3193e7806ca83ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 13 Aug 2022 20:15:22 +0200 Subject: [PATCH 006/118] Fix droppie config --- flake.nix | 1 + hosts/droppie/configuration.nix | 11 +++++++++-- hosts/droppie/droppie.nix | 12 ++++++++++++ hosts/droppie/hardware-configuration.nix | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index c67df6f3..6b151818 100644 --- a/flake.nix +++ b/flake.nix @@ -146,6 +146,7 @@ users = { pub-solar = { suites, ... }: { imports = suites.base; }; ben = { suites, ... }: { imports = suites.base; }; + yule = { suites, ... }: { imports = suites.base; }; }; # digga.lib.importers.rakeLeaves ./users/hm; }; diff --git a/hosts/droppie/configuration.nix b/hosts/droppie/configuration.nix index e392cfe5..bf1d4873 100644 --- a/hosts/droppie/configuration.nix +++ b/hosts/droppie/configuration.nix @@ -2,8 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: - +{ config, pkgs, lib, ... }: { imports = [ @@ -11,6 +10,14 @@ ./hardware-configuration.nix ]; + boot.loader.systemd-boot.enable = lib.mkForce false; + boot.loader.grub = { + enable = true; + efiSupport = true; + device = "nodev"; + }; + boot.loader.efi.canTouchEfiVariables = true; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index 346f2988..1286ea8a 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -13,5 +13,17 @@ in hardware.cpu.intel.updateMicrocode = true; pub-solar.x-os.disk-encryption-active = false; + + security.sudo.extraRules = [ + { + users = [ "${psCfg.user.name}" ]; + commands = [ + { + command = "ALL"; + options = [ "NOPASSWD" ]; + } + ]; + } + ]; }; } diff --git a/hosts/droppie/hardware-configuration.nix b/hosts/droppie/hardware-configuration.nix index 9c1fa078..3c63750d 100644 --- a/hosts/droppie/hardware-configuration.nix +++ b/hosts/droppie/hardware-configuration.nix @@ -47,6 +47,7 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true; + networking.interfaces.enp2s0f1.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -- 2.44.1 From ded0dd7d15b2ef6bc71df7e62b4a0c3d4042a7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 13 Aug 2022 20:16:35 +0200 Subject: [PATCH 007/118] Change pub-solar.user.publicKeys to an actual key string list --- modules/user/default.nix | 2 +- profiles/base-user/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/user/default.nix b/modules/user/default.nix index 2fd5958e..7c869380 100644 --- a/modules/user/default.nix +++ b/modules/user/default.nix @@ -23,7 +23,7 @@ in }; publicKeys = mkOption { description = "User SSH public keys"; - type = types.listOf types.path; + type = types.listOf types.str; default = [ ]; }; fullName = mkOption { diff --git a/profiles/base-user/default.nix b/profiles/base-user/default.nix index 9ff21c8e..374dca40 100644 --- a/profiles/base-user/default.nix +++ b/profiles/base-user/default.nix @@ -25,7 +25,7 @@ in ]; initialHashedPassword = if psCfg.user.password != null then psCfg.user.password else ""; shell = pkgs.zsh; - openssh.authorizedKeys.keyFiles = if psCfg.user.publicKeys != null then psCfg.user.publicKeys else [ ]; + openssh.authorizedKeys.keys = if psCfg.user.publicKeys != null then psCfg.user.publicKeys else [ ]; }; }; } -- 2.44.1 From 669ab6b6ba9bef503043e8798efc4e030826e376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 13 Aug 2022 20:17:00 +0200 Subject: [PATCH 008/118] Open SSH on the network by default, but don't allow password authentication --- profiles/core/default.nix | 3 ++- profiles/iot/default.nix | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 profiles/iot/default.nix diff --git a/profiles/core/default.nix b/profiles/core/default.nix index f3136372..d146bfb1 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -117,7 +117,8 @@ in # For rage encryption, all hosts need a ssh key pair services.openssh = { enable = true; - openFirewall = lib.mkDefault false; + openFirewall = lib.mkDefault true; + passwordAuthentication = false; }; # Service that makes Out of Memory Killer more effective diff --git a/profiles/iot/default.nix b/profiles/iot/default.nix new file mode 100644 index 00000000..185a9ce0 --- /dev/null +++ b/profiles/iot/default.nix @@ -0,0 +1,8 @@ +{ self, config, lib, pkgs, ... }: +let inherit (lib) fileContents; +in +{ + pub-solar.graphical.enable = false; + pub-solar.x-os.localProxyService.enable = false; + pub-solar.sway.enable = false; +} -- 2.44.1 From 616b7af85820608efe796dabb2de014b050af87d Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 13 Aug 2022 21:50:23 +0200 Subject: [PATCH 009/118] devos: include upstream commits https://github.com/divnix/digga/commit/780620d8659fdcb04d4952a2607ce363e0d3a3be https://github.com/divnix/digga/commit/e6b14d39d6d2e0a0544dbc50c7cc235acb2bc123 https://github.com/divnix/digga/commit/dd51f64bc5ff2a2127237805d9dcd6bd7ffebfed --- overlays/overrides.nix | 1 + shell/devos.nix | 28 +++++++++++++++++++--------- shell/hooks/pre-commit.sh | 7 +++++-- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/overlays/overrides.nix b/overlays/overrides.nix index df75736d..6c9e8e71 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -8,6 +8,7 @@ channels: final: prev: { discord element-desktop rage + nix-index nixpkgs-fmt qutebrowser signal-desktop diff --git a/shell/devos.nix b/shell/devos.nix index f799ca03..b7c6f108 100644 --- a/shell/devos.nix +++ b/shell/devos.nix @@ -1,12 +1,22 @@ -{ pkgs, extraModulesPath, inputs, ... }: +{ pkgs, extraModulesPath, inputs, lib, ... }: let + inherit (pkgs) + agenix + cachix + editorconfig-checker + mdbook + nixUnstable + nixpkgs-fmt + nvfetcher + ; + hooks = import ./hooks; pkgWithCategory = category: package: { inherit package category; }; + devos = pkgWithCategory "devos"; linter = pkgWithCategory "linter"; docs = pkgWithCategory "docs"; - devos = pkgWithCategory "devos"; in { @@ -44,15 +54,15 @@ in } (linter nixpkgs-fmt) (linter editorconfig-checker) - # (docs python3Packages.grip) too many deps + (docs mdbook) + ] + ++ lib.optionals (!pkgs.stdenv.buildPlatform.isi686) [ + (devos cachix) + ] + ++ lib.optionals (pkgs.stdenv.hostPlatform.isLinux && !pkgs.stdenv.buildPlatform.isDarwin) [ + (devos inputs.nixos-generators.defaultPackage.${pkgs.system}) (devos deploy-rs) ] - ++ lib.optional - (system != "i686-linux") - (devos cachix) - ++ lib.optional - (system != "aarch64-darwin") - (devos inputs.nixos-generators.defaultPackage.${pkgs.system}) ; } diff --git a/shell/hooks/pre-commit.sh b/shell/hooks/pre-commit.sh index 985d3b40..a7fa9083 100755 --- a/shell/hooks/pre-commit.sh +++ b/shell/hooks/pre-commit.sh @@ -14,13 +14,16 @@ nix_files=($($diff -- '*.nix')) all_files=($($diff)) # Format staged nix files. -if [[ -n "${nix_files[@]}" ]]; then +if (( ${#nix_files[@]} != 0 )); then nixpkgs-fmt "${nix_files[@]}" \ && git add "${nix_files[@]}" fi # check editorconfig -editorconfig-checker -- "${all_files[@]}" +if (( ${#all_files[@]} != 0 )); then + editorconfig-checker -- "${all_files[@]}" +fi + if [[ $? != '0' ]]; then printf "%b\n" \ "\nCode is not aligned with .editorconfig" \ -- 2.44.1 From 0b229a771e846893e759cd4102172e60a541d439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 13 Aug 2022 20:38:41 +0200 Subject: [PATCH 010/118] Barebones ci-runner module This adds a barebones CI-runner module with the following option: `pub-solar.ci-runner.enable` If enabled, this will start a systemd service on boot that runs `drone-runner-exec`. The configuration expects you to have a file called `secrets/drone-runner-exec-config` handled by agenix that gets put into `/run/agenix/drone-runner-exec-config` and is owned by root. This file should contain a configuration similar to the following: ``` CLIENT_DRONE_RPC_PROTO=https CLIENT_DRONE_RPC_HOST=drone.company.com CLIENT_DRONE_RPC_SECRET=super-duper-secret ``` --- modules/ci-runner/default.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 modules/ci-runner/default.nix diff --git a/modules/ci-runner/default.nix b/modules/ci-runner/default.nix new file mode 100644 index 00000000..28325b14 --- /dev/null +++ b/modules/ci-runner/default.nix @@ -0,0 +1,35 @@ +{ lib, config, pkgs, self, ... }: +with lib; +let + psCfg = config.pub-solar; + cfg = config.pub-solar.ci-runner; +in +{ + options.pub-solar.ci-runner = { + enable = mkEnableOption "Enables a systemd service that runs drone-ci-runner"; + }; + + config = mkIf cfg.enable { + systemd.services.ci-runner = { + enable = true; + + description = "CI runner for the PubSolarOS repository that can run test VM instances with KVM."; + + serviceConfig = { + Type = "simple"; + Restart = "always"; + }; + + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" "libvirtd.service" ]; + + script = ''${pkgs.drone-runner-exec}/bin/drone-runner-exec daemon /run/agenix/drone-runner-exec-config''; + }; + + age.secrets."drone-runner-exec-config" = { + file = "${self}/secrets/drone-runner-exec-config"; + mode = "700"; + owner = "root"; + }; + }; +} -- 2.44.1 From e3d76f1999d0512cc4f8f4e8032858000665c3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 13 Aug 2022 22:31:30 +0200 Subject: [PATCH 011/118] Move ci-runner to user and add git, virsh and nix to path --- modules/ci-runner/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ci-runner/default.nix b/modules/ci-runner/default.nix index 28325b14..4db42286 100644 --- a/modules/ci-runner/default.nix +++ b/modules/ci-runner/default.nix @@ -10,7 +10,7 @@ in }; config = mkIf cfg.enable { - systemd.services.ci-runner = { + systemd.user.services.ci-runner = { enable = true; description = "CI runner for the PubSolarOS repository that can run test VM instances with KVM."; @@ -20,6 +20,8 @@ in Restart = "always"; }; + path = "${pkgs.git}/bin:${pkgs.nix}/bin:${pkgs.libvirt}/bin"; + wantedBy = [ "multi-user.target" ]; after = [ "network.target" "libvirtd.service" ]; @@ -29,7 +31,7 @@ in age.secrets."drone-runner-exec-config" = { file = "${self}/secrets/drone-runner-exec-config"; mode = "700"; - owner = "root"; + owner = psCfg.user.name; }; }; } -- 2.44.1 From 18e9b4a009a5de26bc29f3ff88afc642d4cc691e Mon Sep 17 00:00:00 2001 From: hensoko Date: Sat, 13 Aug 2022 20:35:43 +0000 Subject: [PATCH 012/118] feature/restructure-core-profile (#109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hendrik Sokolowski Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/109 Reviewed-by: Benjamin Bädorf Reviewed-by: teutat3s --- flake.nix | 5 +- modules/x-os/boot.nix | 6 +++ modules/x-os/default.nix | 3 ++ modules/x-os/fonts.nix | 12 +++++ modules/x-os/nix.nix | 25 ++++++++++ modules/x-os/services.nix | 13 +++++ profiles/core/default.nix | 56 ---------------------- profiles/core/starship.toml | 95 ------------------------------------- profiles/dram/default.nix | 5 ++ 9 files changed, 66 insertions(+), 154 deletions(-) create mode 100644 modules/x-os/fonts.nix create mode 100644 modules/x-os/nix.nix create mode 100644 modules/x-os/services.nix delete mode 100644 profiles/core/starship.toml create mode 100644 profiles/dram/default.nix diff --git a/flake.nix b/flake.nix index f18df6df..7d43b67c 100644 --- a/flake.nix +++ b/flake.nix @@ -120,7 +120,7 @@ suites = with profiles; rec { base = [ core users.pub-solar users.root ]; iso = base ++ [ base-user graphical pub-solar-iso ]; - pubsolaros = [ core full-install base-user users.root ]; + pubsolaros = [ core dram full-install base-user users.root ]; anonymous = [ pubsolaros users.pub-solar ]; }; }; @@ -145,6 +145,5 @@ homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { }; - } - ; + }; } diff --git a/modules/x-os/boot.nix b/modules/x-os/boot.nix index 0ee29b84..dd788d26 100644 --- a/modules/x-os/boot.nix +++ b/modules/x-os/boot.nix @@ -28,5 +28,11 @@ in }; boot.loader.systemd-boot.enable = true; + + # Use latest LTS linux kernel by default + boot.kernelPackages = pkgs.linuxPackages_5_15; + + # Support ntfs drives + boot.supportedFilesystems = [ "ntfs" ]; }; } diff --git a/modules/x-os/default.nix b/modules/x-os/default.nix index 6276bf5f..0fd734f3 100644 --- a/modules/x-os/default.nix +++ b/modules/x-os/default.nix @@ -1,7 +1,10 @@ { ... }: { imports = [ ./boot.nix + ./fonts.nix ./i18n.nix ./networking.nix + ./nix.nix + ./services.nix ]; } diff --git a/modules/x-os/fonts.nix b/modules/x-os/fonts.nix new file mode 100644 index 00000000..979ffc68 --- /dev/null +++ b/modules/x-os/fonts.nix @@ -0,0 +1,12 @@ +{ config, pkgs, lib, ... }: + +{ + fonts = { + fonts = with pkgs; [ powerline-fonts dejavu_fonts ]; + fontconfig.defaultFonts = { + monospace = [ "DejaVu Sans Mono for Powerline" ]; + sansSerif = [ "DejaVu Sans" ]; + }; + }; +} + diff --git a/modules/x-os/nix.nix b/modules/x-os/nix.nix new file mode 100644 index 00000000..56b677da --- /dev/null +++ b/modules/x-os/nix.nix @@ -0,0 +1,25 @@ +{ config, pkgs, lib, inputs, ... }: + +{ + nix = { + # Improve nix store disk usage + autoOptimiseStore = true; + gc.automatic = true; + optimise.automatic = true; + # Prevents impurities in builds + useSandbox = true; + # give root and @wheel special privileges with nix + trustedUsers = [ "root" "@wheel" ]; + # This is just a representation of the nix default + systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; + # Generally useful nix option defaults + extraOptions = '' + min-free = 536870912 + keep-outputs = true + keep-derivations = true + fallback = true + # used by nix-dram + default-flake = flake:nixpkgs + ''; + }; +} diff --git a/modules/x-os/services.nix b/modules/x-os/services.nix new file mode 100644 index 00000000..98a058a3 --- /dev/null +++ b/modules/x-os/services.nix @@ -0,0 +1,13 @@ +{ config, pkgs, lib, ... }: + +{ + + # For rage encryption, all hosts need a ssh key pair + services.openssh = { + enable = true; + openFirewall = lib.mkDefault false; + }; + + # Service that makes Out of Memory Killer more effective + services.earlyoom.enable = true; +} diff --git a/profiles/core/default.nix b/profiles/core/default.nix index f3136372..b35fb673 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -11,11 +11,7 @@ in pub-solar.crypto.enable = true; pub-solar.devops.enable = true; - # This is just a representation of the nix default - nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; - environment = { - systemPackages = with pkgs; [ # Core unix utility packages coreutils-full @@ -75,57 +71,5 @@ in neofetch ]; }; - - fonts = { - fonts = with pkgs; [ powerline-fonts dejavu_fonts ]; - - fontconfig.defaultFonts = { - - monospace = [ "DejaVu Sans Mono for Powerline" ]; - - sansSerif = [ "DejaVu Sans" ]; - - }; - }; - - nix = { - # use nix-dram, a patched nix command, see: https://github.com/dramforever/nix-dram - package = inputs.nix-dram.packages.${pkgs.system}.nix-dram; - - # Improve nix store disk usage - autoOptimiseStore = true; - gc.automatic = true; - optimise.automatic = true; - - # Prevents impurities in builds - useSandbox = true; - - # give root and @wheel special privileges with nix - trustedUsers = [ "root" "@wheel" ]; - - # Generally useful nix option defaults - extraOptions = '' - min-free = 536870912 - keep-outputs = true - keep-derivations = true - fallback = true - # used by nix-dram - default-flake = flake:nixpkgs - ''; - }; - - # For rage encryption, all hosts need a ssh key pair - services.openssh = { - enable = true; - openFirewall = lib.mkDefault false; - }; - - # Service that makes Out of Memory Killer more effective - services.earlyoom.enable = true; - - # Use latest LTS linux kernel by default - boot.kernelPackages = pkgs.linuxPackages_5_15; - - boot.supportedFilesystems = [ "ntfs" ]; }; } diff --git a/profiles/core/starship.toml b/profiles/core/starship.toml deleted file mode 100644 index 6ed366b5..00000000 --- a/profiles/core/starship.toml +++ /dev/null @@ -1,95 +0,0 @@ -[aws] -symbol = " " - -[character] -success_symbol = "[❯](bold purple)" -vicmd_symbol = "[❮](bold purple)" - -[battery] -full_symbol = "" -charging_symbol = "" -discharging_symbol = "" - -[conda] -symbol = " " - -[directory] -style = "cyan" -read_only = " 🔒" - -[docker] -symbol = " " - -[elixir] -symbol = " " - -[elm] -symbol = " " - -[git_branch] -format = "[$symbol$branch]($style) " -symbol = " " -style = "bold dimmed white" - -[git_status] -format = '([「$all_status$ahead_behind」]($style) )' -conflicted = "⚠️" -ahead = "⟫${count} " -behind = "⟪${count}" -diverged = "🔀 " -untracked = "📁 " -stashed = "↪ " -modified = "𝚫 " -staged = "✔ " -renamed = "⇆ " -deleted = "✘ " -style = "bold bright-white" - -[golang] -symbol = " " - -[haskell] -symbol = " " - -[hg_branch] -symbol = " " - -[java] -symbol = " " - -[julia] -symbol = " " - -[memory_usage] -symbol = " " -disabled = false - -[nim] -symbol = " " - -[nix_shell] -format = '[$symbol$state]($style) ' -symbol = " " -pure_msg = "λ" -impure_msg = "⎔" - -[nodejs] -symbol = " " - -[package] -symbol = " " - -[php] -symbol = " " - -[python] -symbol = " " - -[ruby] -symbol = " " - -[rust] -symbol = " " - -[status] -disabled = false diff --git a/profiles/dram/default.nix b/profiles/dram/default.nix new file mode 100644 index 00000000..0b7fc3ee --- /dev/null +++ b/profiles/dram/default.nix @@ -0,0 +1,5 @@ +{ self, config, lib, pkgs, inputs, ... }: + +{ + nix.package = inputs.nix-dram.packages.${pkgs.system}.nix-dram; +} -- 2.44.1 From dc1e707925c25e96d4e1d83da9f4b86aa902f547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 13 Aug 2022 22:31:30 +0200 Subject: [PATCH 013/118] Move ci-runner to user and add git, virsh and nix to path --- modules/ci-runner/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ci-runner/default.nix b/modules/ci-runner/default.nix index 28325b14..4db42286 100644 --- a/modules/ci-runner/default.nix +++ b/modules/ci-runner/default.nix @@ -10,7 +10,7 @@ in }; config = mkIf cfg.enable { - systemd.services.ci-runner = { + systemd.user.services.ci-runner = { enable = true; description = "CI runner for the PubSolarOS repository that can run test VM instances with KVM."; @@ -20,6 +20,8 @@ in Restart = "always"; }; + path = "${pkgs.git}/bin:${pkgs.nix}/bin:${pkgs.libvirt}/bin"; + wantedBy = [ "multi-user.target" ]; after = [ "network.target" "libvirtd.service" ]; @@ -29,7 +31,7 @@ in age.secrets."drone-runner-exec-config" = { file = "${self}/secrets/drone-runner-exec-config"; mode = "700"; - owner = "root"; + owner = psCfg.user.name; }; }; } -- 2.44.1 From 4cdeb7e5c87df2d1f390ff40c572f76e03147faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 12:47:20 +0200 Subject: [PATCH 014/118] Use public keys of biolimo and pihole --- users/ben/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/users/ben/default.nix b/users/ben/default.nix index 106a973e..cc23c376 100644 --- a/users/ben/default.nix +++ b/users/ben/default.nix @@ -23,12 +23,10 @@ in fullName = "Benjamin Bädorf"; email = "hello@benjaminbaedorf.eu"; gpgKeyId = "4406E80E13CD656C"; - #publicKeys = [ - # "ssh-rsa AAAhAB3NzaC1yc2EAAAADAQABAAACAQCmXpOU6vzQiVSSYCoxHYv7wDxC63Qg3dxlAMR6AOzwIABCU5PFFNcO0NWYms/YR7MOViorl+19LCLRABar9JgHU1n+uqxKV6eGph3OPeMp5sN8LAh7C9N+TZj8iJzBxQ3ch+Z/LdmLRwYNJ7KSUI+gwGK6xRS3+z1022Y4P0G0sx7IeCBl4lealQEIIF10ZOfj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vaMl6V6x/QuDuehEPoM/3wBx9o22nf+QVbk7S1PC8EdT/K5vskn4/pfR7mDCyQOq1hB4w4Oyn0dsfX pi@ssrtc" + ]; }; paperless.enable = true; -- 2.44.1 From 2a2148fe75c18c9b264a077b775abf171d420433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 12:57:05 +0200 Subject: [PATCH 015/118] Update user authentication methods --- users/ben/default.nix | 1 + users/yule/default.nix | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/users/ben/default.nix b/users/ben/default.nix index cc23c376..8ec4665d 100644 --- a/users/ben/default.nix +++ b/users/ben/default.nix @@ -26,6 +26,7 @@ in publicKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDDoYNvXWunQYFORRjcYH1F98+zr20U79ROh+gmaC7AY/x3yf4y8uyMayF56VgQLVNwgEchT5t4dNb9qo2+1oUnjiKrKAVfQMN6WMMMEr4F4WT784uvBx5Uo6vmhgAa+xoo62c4TV2Uf49ZiPd+zAApBHW1F/whPtunPF28Wfr9g+ozSidhnAr+3nkfJh331tz9s+wgQ39AFzFWftQ60Guulpfj8SaVyxyv/yZZAuFpXNzN0Cz4fWBIWFOsib6Z8y+SlUCzSzOguZ7FygHjwlvOxoISsASAuf0OfUKHxVshiL5F5AX1ddmUgXbUKUTp/3Iunr74pfOQC8TXzZHqhrlFzYDmK5J9E6eADSpgx++bCCaHycl73BWeertCBZSHBXeb3Db9HX+mxwpfP3alVAt4ZqQb3YD/VB7XGDvHbmLn+wSfecO2qA9PxiA0yX7e2BZLN9r3G3bRNSk0GpnYM0i84FE9IipiKKnWVjj7J0UPQmz7rzAn2Lki1CnX9PDdxZneqTxgpBomHJt4H+vXMw13scA4xxEDBvfS5KkjbEJqWLbfklCoER6nV3NPLZ6CBl0Xe/VQBSkqEuUEIXih/oa8emDOGUODNF75ck5NJmKiGg6AFZoeiDa7PZMIxhhOq4vsR2Ty43rztUJ0CMX7iSIk3Eql7kqNdvrJaJ7z0GBsiw== ben@biolimo" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmiF8ndGhnx2YAWbPDq14fftAwcJ0xnjJIVTotI12OO4SPX/SwH5Yp8C8Kf002qN9FbFmaONzq3s8TYpej13JubhfsQywNuFKZuZvJeHzmOwxsANW86RVrWT0WZmYx9a/a1TF9rPQpibDVt60wX8yLdExaJc5F1SvIIuyz1kxYpz36wItfR6hcwoLGh1emFCmfCpebJmp3hsrMDTTtTW/YNhyeSZW74ckyvZyjCYtRCJ8uF0ZmOSKRdillv4Ztg8MsUubGn+vaMl6V6x/QuDuehEPoM/3wBx9o22nf+QVbk7S1PC8EdT/K5vskn4/pfR7mDCyQOq1hB4w4Oyn0dsfX pi@ssrtc" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDwyNsGCMuyI9x2IxYEbYIL6oYsEfe1wqhHaRxSnK9oc10ge1LJni5o7g6XgryoQpCD9YenImcCxwkKblmlLQ2327uoVC2PUo07li1uT0eIPk0TQoxwp6besFs7/LEzZlgWQsc3gkEXmjk/E0mu0U6z2fkqciJ/ZxWYt9fLP6jBG47U9878rSaZ7k7Ilv6oRA3suArH189k1nerk/tonS4EWXeHZxHh/Eu0tqwmxN/6+g2GicYn6b+MbFQVdQAkctqT5Yz9USm9UKzbaAuZ799u0dJzagHm9JJZOr8r11ENtAkY9kAzRzm3u/ACiSdVzyLdjAK6m0dIPhp3OhedzuHiI6/wRll60tYtQTH1XwUpVbtir3+DT+jwZgO1zH3yL4iNh79kuUo+UEg1ZmGkSZRzSS2vb5qr0J5aSJmCd5sNB7a01PTtSlQPOqSF9PB+UmcLDF7JoKFub0KT/gRZ5neZkXTYQ/Y05qtaaFVlOVISijnm+sLUvKBv6OW8oYXIHBk= ben@chocolatebar"; ]; }; diff --git a/users/yule/default.nix b/users/yule/default.nix index 7f57a686..85b1b036 100644 --- a/users/yule/default.nix +++ b/users/yule/default.nix @@ -13,15 +13,14 @@ in user = { name = "yule"; description = "b12f"; - password = "$6$LO2YoaHwuRQhUoSz$iHw9avM887eJg9cIty2nmG4Ibkol3YpviEhYpivVQP31VrnihFz/6LyugxD7X4VmXx9nxvcYIZnN90rlGxwjT."; + password = "$y$j9T$kN1mEvhgjQ1g.9oF9/m6n/$5RMpIWdwSOMG5vUTW2N9tGCn6/NsXouMNn5VGnIA6lB"; fullName = "Benjamin Bädorf"; email = "hello@benjaminbaedorf.eu"; gpgKeyId = "4406E80E13CD656C"; publicKeys = [ - "ssh-rsa AAAhAB3NzaC1yc2EAAAADAQABAAACAQCmXpOU6vzQiVSSYCoxHYv7wDxC63Qg3dxlAMR6AOzwIABCU5PFFNcO0NWYms/YR7MOViorl+19LCLRABar9JgHU1n+uqxKV6eGph3OPeMp5sN8LAh7C9N+TZj8iJzBxQ3ch+Z/LdmLRwYNJ7KSUI+gwGK6xRS3+z1022Y4P0G0sx7IeCBl4lealQEIIF10ZOfjUdBcLQar7XTc5AxyGKnHCerXHRtccCoadLQujk0AvPXbv3Ma4JwX9X++AnCWRWakqS5UInu2tGuZ/6Hrjd2a9AKWjTaBVDcbYqCvY4XVuMj2/A2bCceFBaoi41apybSk26FSFTU4qiEUNQ6lxeOwG4+1NCXyHe2bGI4VyoxinDYa8vLLzXIRfTRA0qoGfCweXNeWPf0jMqASkUKaSOH5Ot7O5ps34r0j9pWzavDid8QeKJPyhxKuF1a5G4iBEZ0O9vuti60dPSjJPci9oTxbune2/jb7Sa0yO06DtLFJ2ncr5f70s/BDxKk4XIwQLy+KsvzlQEGdY8yA6xv28bOGxL3sQ0HE2pDTsvIbAisVOKzdJeolStL9MM5W8Hg0r/KkGj2bg0TfoRp1xHV9hjKkvJrsQ6okaPvNFeZq0HXzPhWMOVQ+/46z80uaQ1ByRLr3FTwuWJ7F/73ndfxiq6bDE4z2Ji0vOjeWJm6HCxTdGw== hello@benjaminbaedorf.com" - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQ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uoVC2PUo07li1uT0eIPk0TQoxwp6besFs7/LEzZlgWQsc3gkEXmjk/E0mu0U6z2fkqciJ/ZxWYt9fLP6jBG47U9878rSaZ7k7Ilv6oRA3suArH189k1nerk/tonS4EWXeHZxHh/Eu0tqwmxN/6+g2GicYn6b+MbFQVdQAkctqT5Yz9USm9UKzbaAuZ799u0dJzagHm9JJZOr8r11ENtAkY9kAzRzm3u/ACiSdVzyLdjAK6m0dIPhp3OhedzuHiI6/wRll60tYtQTH1XwUpVbtir3+DT+jwZgO1zH3yL4iNh79kuUo+UEg1ZmGkSZRzSS2vb5qr0J5aSJmCd5sNB7a01PTtSlQPOqSF9PB+UmcLDF7JoKFub0KT/gRZ5neZkXTYQ/Y05qtaaFVlOVISijnm+sLUvKBv6OW8oYXIHBk= ben@chocolatebar" ]; }; }; -- 2.44.1 From b1d8a0490cac69a3b9e42b4af3345551b0164442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 13:03:08 +0200 Subject: [PATCH 016/118] Fix typo --- users/ben/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/ben/default.nix b/users/ben/default.nix index 8ec4665d..f35dc74a 100644 --- a/users/ben/default.nix +++ b/users/ben/default.nix @@ -26,7 +26,7 @@ in publicKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDDoYNvXWunQYFORRjcYH1F98+zr20U79ROh+gmaC7AY/x3yf4y8uyMayF56VgQLVNwgEchT5t4dNb9qo2+1oUnjiKrKAVfQMN6WMMMEr4F4WT784uvBx5Uo6vmhgAa+xoo62c4TV2Uf49ZiPd+zAApBHW1F/whPtunPF28Wfr9g+ozSidhnAr+3nkfJh331tz9s+wgQ39AFzFWftQ60Guulpfj8SaVyxyv/yZZAuFpXNzN0Cz4fWBIWFOsib6Z8y+SlUCzSzOguZ7FygHjwlvOxoISsASAuf0OfUKHxVshiL5F5AX1ddmUgXbUKU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zagHm9JJZOr8r11ENtAkY9kAzRzm3u/ACiSdVzyLdjAK6m0dIPhp3OhedzuHiI6/wRll60tYtQTH1XwUpVbtir3+DT+jwZgO1zH3yL4iNh79kuUo+UEg1ZmGkSZRzSS2vb5qr0J5aSJmCd5sNB7a01PTtSlQPOqSF9PB+UmcLDF7JoKFub0KT/gRZ5neZkXTYQ/Y05qtaaFVlOVISijnm+sLUvKBv6OW8oYXIHBk= ben@chocolatebar"; + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDwyNsGCMuyI9x2IxYEbYIL6oYsEfe1wqhHaRxSnK9oc10ge1LJni5o7g6XgryoQpCD9YenImcCxwkKblmlLQ2327uoVC2PUo07li1uT0eIPk0TQoxwp6besFs7/LEzZlgWQsc3gkEXmjk/E0mu0U6z2fkqciJ/ZxWYt9fLP6jBG47U9878rSaZ7k7Ilv6oRA3suArH189k1nerk/tonS4EWXeHZxHh/Eu0tqwmxN/6+g2GicYn6b+MbFQVdQAkctqT5Yz9USm9UKzbaAuZ799u0dJzagHm9JJZOr8r11ENtAkY9kAzRzm3u/ACiSdVzyLdjAK6m0dIPhp3OhedzuHiI6/wRll60tYtQTH1XwUpVbtir3+DT+jwZgO1zH3yL4iNh79kuUo+UEg1ZmGkSZRzSS2vb5qr0J5aSJmCd5sNB7a01PTtSlQPOqSF9PB+UmcLDF7JoKFub0KT/gRZ5neZkXTYQ/Y05qtaaFVlOVISijnm+sLUvKBv6OW8oYXIHBk= ben@chocolatebar" ]; }; -- 2.44.1 From 9031dacbb54bad963aa611583df26eeac7296cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 14:11:10 +0200 Subject: [PATCH 017/118] Add AGPLv3 License --- LICENSE.md | 660 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 660 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..cba6f6a1 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,660 @@ +### GNU AFFERO GENERAL PUBLIC LICENSE + +Version 3, 19 November 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +### Preamble + +The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains +free software for all its users. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + +A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + +The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + +An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing +under this license. + +The precise terms and conditions for copying, distribution and +modification follow. + +### TERMS AND CONDITIONS + +#### 0. Definitions. + +"This License" refers to version 3 of the GNU Affero General Public +License. + +"Copyright" also means copyright-like laws that apply to other kinds +of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of +an exact copy. The resulting work is called a "modified version" of +the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based +on the Program. + +To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user +through a computer network, with no transfer of a copy, is not +conveying. + +An interactive user interface displays "Appropriate Legal Notices" to +the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +#### 1. Source Code. + +The "source code" for a work means the preferred form of the work for +making modifications to it. "Object code" means any non-source form of +a work. + +A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can +regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same +work. + +#### 2. Basic Permissions. + +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, +without conditions so long as your license otherwise remains in force. +You may convey covered works to others for the sole purpose of having +them make modifications exclusively for you, or provide you with +facilities for running those works, provided that you comply with the +terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for +you must do so exclusively on your behalf, under your direction and +control, on terms that prohibit them from making any copies of your +copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the +conditions stated below. Sublicensing is not allowed; section 10 makes +it unnecessary. + +#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such +circumvention is effected by exercising rights under this License with +respect to the covered work, and you disclaim any intention to limit +operation or modification of the work as a means of enforcing, against +the work's users, your or third parties' legal rights to forbid +circumvention of technological measures. + +#### 4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +#### 5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these +conditions: + +- a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- b) The work must carry prominent notices stating that it is + released under this License and any conditions added under + section 7. This requirement modifies the requirement in section 4 + to "keep intact all notices". +- c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +#### 6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of +sections 4 and 5, provided that you also convey the machine-readable +Corresponding Source under the terms of this License, in one of these +ways: + +- a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the Corresponding + Source from a network server at no charge. +- c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- e) Convey the object code using peer-to-peer transmission, + provided you inform other peers where the object code and + Corresponding Source of the work are being offered to the general + public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, +family, or household purposes, or (2) anything designed or sold for +incorporation into a dwelling. In determining whether a product is a +consumer product, doubtful cases shall be resolved in favor of +coverage. For a particular product received by a particular user, +"normally used" refers to a typical or common use of that class of +product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected +to use, the product. A product is a consumer product regardless of +whether the product has substantial commercial, industrial or +non-consumer uses, unless such uses represent the only significant +mode of use of the product. + +"Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to +install and execute modified versions of a covered work in that User +Product from a modified version of its Corresponding Source. The +information must suffice to ensure that the continued functioning of +the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or +updates for a work that has been modified or installed by the +recipient, or for the User Product in which it has been modified or +installed. Access to a network may be denied when the modification +itself materially and adversely affects the operation of the network +or violates the rules and protocols for communication across the +network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +#### 7. Additional Terms. + +"Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders +of that material) supplement the terms of this License with terms: + +- a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- c) Prohibiting misrepresentation of the origin of that material, + or requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- d) Limiting the use for publicity purposes of names of licensors + or authors of the material; or +- e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions + of it) with contractual assumptions of liability to the recipient, + for any liability that these contractual assumptions directly + impose on those licensors and authors. + +All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; the +above requirements apply either way. + +#### 8. Termination. + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +#### 9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run +a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +#### 10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +#### 11. Patents. + +A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned +or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is "discriminatory" if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on +the non-exercise of one or more of the rights that are specifically +granted under this License. You may not convey a covered work if you +are a party to an arrangement with a third party that is in the +business of distributing software, under which you make payment to the +third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties +who would receive the covered work from you, a discriminatory patent +license (a) in connection with copies of the covered work conveyed by +you (or copies made from those copies), or (b) primarily for and in +connection with specific products or compilations that contain the +covered work, unless you entered into that arrangement, or that patent +license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +#### 12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under +this License and any other pertinent obligations, then as a +consequence you may not convey it at all. For example, if you agree to +terms that obligate you to collect a royalty for further conveying +from those to whom you convey the Program, the only way you could +satisfy both those terms and this License would be to refrain entirely +from conveying the Program. + +#### 13. Remote Network Interaction; Use with the GNU General Public License. + +Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your +version supports such interaction) an opportunity to receive the +Corresponding Source of your version by providing access to the +Corresponding Source from a network server at no charge, through some +standard or customary means of facilitating copying of software. This +Corresponding Source shall include the Corresponding Source for any +work covered by version 3 of the GNU General Public License that is +incorporated pursuant to the following paragraph. + +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + +#### 14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions +of the GNU Affero General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever +published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions +of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +#### 15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT +WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + +#### 16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR +CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT +NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR +LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM +TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +#### 17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +### How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + +To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively state +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper +mail. + +If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for +the specific requirements. + +You should also get your employer (if you work as a programmer) or +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. For more information on this, and how to apply and follow +the GNU AGPL, see . -- 2.44.1 From b3a4ae5bbcbec4b2a955a77bb9b823c6fefa678d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 14:14:17 +0200 Subject: [PATCH 018/118] Our first real readme --- README.md | 131 +++++++++++++++++------------------------------------- 1 file changed, 41 insertions(+), 90 deletions(-) diff --git a/README.md b/README.md index e2a83eb9..f655075c 100644 --- a/README.md +++ b/README.md @@ -1,95 +1,46 @@ -[![NixOS](https://img.shields.io/badge/NixOS-unstable-blue.svg?style=flat&logo=NixOS&logoColor=white)](https://nixos.org) -[![MIT License](https://img.shields.io/github/license/divnix/devos)][mit] -[![Chat](https://img.shields.io/matrix/devos:nixos.org.svg?label=%23devos%3Anixos.org&logo=matrix&server_fqdn=matrix.org)][matrix] +# PubSolarOS -> #### ⚠ Advisory ⚠ -> DevOS requires the [flakes][flakes] feature available via an _experimental_ -> branch of [nix][nix]. Until nix 2.4 is released, this project -> should be considered unstable. +Welcome to PubSolarOS, a very opiniated Linux (NixOS) distribution for the nerdy. -### Why? -Make an awesome template for NixOS users, with consideration for common tools like [home-manager][home-manager], -[devshell][devshell], and [more](./doc/integrations). +We're creating this distribution for our own personal use and fun, but +take pride in our craft. As of 14.08.22 it's running on 14 physical devices, +both `x86_64` and `ARM`. -### No. Why _flakes_? -Flakes are a part of an explicit push to improve [Nix's UX](https://github.com/NixOS/nix/blob/master/doc/manual/src/contributing/cli-guideline.md), and have become an integral part of that effort. +At its core, it's a NixOS installation running our configuration. The UX +decisions and the way the project is structured are what make it +_PubSolarOS_: -They also make [Nix expressions](https://nixos.org/manual/nix/unstable/expressions/expression-syntax.html) easier to distribute and reuse with convient [flake references](https://github.com/NixOS/nix/blob/master/src/nix/flake.md#flake-references) for building or using packages, modules, and whole systems. +* Reproducibility is king, and the future is with declarative and functional + programming. Even if Nix does not turn out to be the end-all-be-all of + reproducible package management (Guix looks good), it has a plethora + of packages, a very active and helpful community, and very solid + software engineering practices. +* Because reproducibility is king, we're using nix flakes for locking flake + dependencies. [Digga](https://github.com/divnix/digga) is our flake + utility library, made by the wonderful people of the Divnix community. +* Physical devices are not shared anymore nowadays. Only seldomly will you + find shared devices that need more than one user account. For this + reason, only one user (excluding `root`) is assumed. +* Keyboard navigation wins where it matters; ergonomics, programmability, + efficiency, and speed. We use a tiling window manager (`sway`) and + prioritize cli-based solutions where sensible. The editor is `neovim` + configured to be just as opiniated as the operating system it is a part + of. For mailing, `neomutt` is the default, but we're more divided on + that part. +* We like new and shiny things, so we've moved to Wayland and pipewire. +* SICHERHEIT is written in capital letters at pub.solar, so we have first- + class disk-encryption support. Currently in the works is a paranoid + mode where the device can only hibernate (no more sleep or lockscreen) + so your data is locked any time you leave the device. +* Free software is better. If we can avoid it, nonfree software is avoided. + By default, `allowUnfree` is `false` so we don't ship non-free software + in a basic PubSolarOS ISO. However, nothing prevents you from using + as much non-free software as you like. +* Automation is better. The reproducibility of nix feels so much more + powerful once you're deploying your new configuration from your laptop + to all your other devices with one command. We've automated CI (WIP). +* Community is important. We just like working on this together, and it + feels really good to see our progress at the end of a + [hakken.irl](https://pub.solar/hakken) session. -## Getting Started -Check out the [guide](https://devos.divnix.com/start) to get up and running. -Also, have a look at [_flake.nix_](./flake.nix). If anything is not immediately -discoverable via "[`digga`][digga]'s [`mkFlake`][mk-flake], -please file a bug report. - -### Status: Beta -Although this project has already matured quite a bit, especially through -recent outfactoring of [`digga`][digga], a fair amount of api polishing is still -expected. There are unstable versions (0._x_._x_) to help users keep track -of changes and progress, and a [`develop`](https://github.com/divnix/devos/tree/develop) branch for the brave 😜 - -## In the Wild -* @Pacman99: [Personal](https://gitlab.com/coffeetables/lower), [Server](https://gitlab.com/coffeetables/myrdd) -* [@danielphan2003](https://github.com/danielphan2003/flk) and make sure to also check out [devos-ext-lib][devos-ext-lib] -* [PubSolarOS](https://git.sr.ht/~b12f/pub-solar-os) - -## Shoulders -This work does not reinvent the wheel. It stands on the [shoulders of the -following giants][giants]: - -### :onion: — like the layers of an onion -- [`divnix/digga`][digga] -- [`gytis-ivaskevicius/flake-utils-plus`][fup] -- [`numtide/flake-utils`][fu] - -### :family: — like family -- [`numtide/devshell`][devshell] -- [`serokell/deploy-rs`][deploy] -- [`berberman/nvfetcher`][nvfetcher] -- [`NixOS/nixpkgs`][nixpkgs] - -:heart: - -## Inspiration & Art -- [hlissner/dotfiles][dotfiles] -- [nix-user-chroot](https://github.com/nix-community/nix-user-chroot) -- [Nickel](https://github.com/tweag/nickel) -- [Awesome Nix](https://github.com/nix-community/awesome-nix) -- [devshell](https://github.com/numtide/devshell) - -## Divnix -The divnix org is an open space that spontaneously formed out of "the Nix". -It is really just a place where otherwise unrelated people work -together and get stuff done. - -It's a place to stop "geeking out in isolation" (or within company boundaries). -A place to experiment, learn together, and iterate quickly on best practices. -That's what it is. - -It might eventually become a non-profit if that's not too complicated or, if those -goals are sufficiently upstreamed into "the Nix", dissolved. - -# License -DevOS is licensed under the [MIT License][mit]. - -[community]: https://github.com/divnix/devos/tree/community -[core]: https://github.com/divnix/devos -[deploy]: https://github.com/serokell/deploy-rs -[devshell]: https://github.com/numtide/devshell -[digga]: https://github.com/divnix/digga -[dotfiles]: https://github.com/hlissner/dotfiles -[flake-doc]: https://github.com/NixOS/nix/blob/master/src/nix/flake.md -[flakes]: https://nixos.wiki/wiki/Flakes -[fu]: https://github.com/numtide/flake-utils -[fup]: https://github.com/gytis-ivaskevicius/flake-utils-plus -[giants]: https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants -[home-manager]: https://nix-community.github.io/home-manager -[mit]: https://mit-license.org -[mk-flake]: https://github.com/divnix/digga/tree/main/src/mkFlake -[nix]: https://nixos.org/manual/nix/stable -[nixos]: https://nixos.org/manual/nixos/stable -[nixpkgs]: https://github.com/NixOS/nixpkgs -[nvfetcher]: https://github.com/berberman/nvfetcher -[please]: https://github.com/nrdxp/devos/tree/nrd -[matrix]: https://matrix.to/#/#devos:nixos.org -[devos-ext-lib]: https://github.com/divnix/devos-ext-lib +To get started, take a look at the quick start guide in our docs. -- 2.44.1 From 552b2ee53e5103284b0e2de77d1c446e94b33452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 14:15:02 +0200 Subject: [PATCH 019/118] Remove nonfree software This commit removes the default, global `allowUnfree = true;` setting and removes nonfree packages where I could find them. Tested by building the `PubSolarOS` host once. --- flake.nix | 4 +++- modules/graphical/default.nix | 25 +++++++++++++------------ modules/printing/default.nix | 4 ---- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/flake.nix b/flake.nix index f18df6df..d6be04da 100644 --- a/flake.nix +++ b/flake.nix @@ -66,7 +66,9 @@ { inherit self inputs; - channelsConfig = { allowUnfree = true; }; + channelsConfig = { + # allowUnfree = true; + }; supportedSystems = [ "x86_64-linux" "aarch64-linux" ]; diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index 0bb9781c..a506c2ef 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -5,17 +5,19 @@ let cfg = config.pub-solar.graphical; yamlFormat = pkgs.formats.yaml { }; recursiveMerge = attrList: - let f = attrPath: - zipAttrsWith (n: values: - if tail values == [ ] - then head values - else if all isList values - then unique (concatLists values) - else if all isAttrs values - then f (attrPath ++ [ n ]) values - else last values - ); - in f [ ] attrList; + let + f = attrPath: + zipAttrsWith (n: values: + if tail values == [ ] + then head values + else if all isList values + then unique (concatLists values) + else if all isAttrs values + then f (attrPath ++ [ n ]) values + else last values + ); + in + f [ ] attrList; in { options.pub-solar.graphical = { @@ -77,7 +79,6 @@ in fonts.enableDefaultFonts = true; fonts.fonts = with pkgs; [ - corefonts fira-code fira-code-symbols google-fonts diff --git a/modules/printing/default.nix b/modules/printing/default.nix index ea9ce166..4688c842 100644 --- a/modules/printing/default.nix +++ b/modules/printing/default.nix @@ -21,10 +21,6 @@ in services.printing.defaultShared = false; services.printing.drivers = [ pkgs.gutenprint - pkgs.brgenml1lpr - pkgs.brgenml1cupswrapper - pkgs.brlaser - pkgs.cups-brother-hl3140cw ]; hardware.sane = { enable = true; -- 2.44.1 From c2c9a65fc4403c200621693681ebd11e5b2051f5 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 14:21:11 +0200 Subject: [PATCH 020/118] 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 = { -- 2.44.1 From 2f9225457c566fb6bd52653e3f5dfcb837e16d89 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 14:40:44 +0200 Subject: [PATCH 021/118] readme: ARM -> aarch64 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f655075c..18b1aebf 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Welcome to PubSolarOS, a very opiniated Linux (NixOS) distribution for the nerdy We're creating this distribution for our own personal use and fun, but take pride in our craft. As of 14.08.22 it's running on 14 physical devices, -both `x86_64` and `ARM`. +both `x86_64` and `aarch64`. At its core, it's a NixOS installation running our configuration. The UX decisions and the way the project is structured are what make it -- 2.44.1 From 99d5e53ec8ef2e48f575922721726e7519568380 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 14:41:20 +0200 Subject: [PATCH 022/118] readme: add link to https://ci.b12f.io --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 18b1aebf..31e84212 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ _PubSolarOS_: as much non-free software as you like. * Automation is better. The reproducibility of nix feels so much more powerful once you're deploying your new configuration from your laptop - to all your other devices with one command. We've automated CI (WIP). + to all your other devices with one command. [We have an automated CI using drone](https://ci.b12f.io/pub-solar/os). * Community is important. We just like working on this together, and it feels really good to see our progress at the end of a [hakken.irl](https://pub.solar/hakken) session. -- 2.44.1 From 4190818304cc2e2f23c97f9fc42eea1fd92dfee3 Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Sat, 13 Aug 2022 22:59:05 +0200 Subject: [PATCH 023/118] Rework of x-os module / core profile * move core settings to x-os * add option to only install a lite core * rename x-os module to core * remove core profile from flake.nix --- flake.nix | 4 +- modules/{x-os => core}/boot.nix | 6 +-- modules/core/default.nix | 30 +++++++++++ modules/{x-os => core}/fonts.nix | 0 modules/{x-os => core}/i18n.nix | 0 modules/core/modules.nix | 11 ++++ modules/{x-os => core}/networking.nix | 4 +- modules/{x-os => core}/nix.nix | 0 modules/core/packages.nix | 76 +++++++++++++++++++++++++++ modules/{x-os => core}/services.nix | 1 - modules/x-os/default.nix | 10 ---- profiles/core/default.nix | 75 -------------------------- profiles/pub-solar-iso/default.nix | 2 +- 13 files changed, 125 insertions(+), 94 deletions(-) rename modules/{x-os => core}/boot.nix (85%) create mode 100644 modules/core/default.nix rename modules/{x-os => core}/fonts.nix (100%) rename modules/{x-os => core}/i18n.nix (100%) create mode 100644 modules/core/modules.nix rename modules/{x-os => core}/networking.nix (95%) rename modules/{x-os => core}/nix.nix (100%) create mode 100644 modules/core/packages.nix rename modules/{x-os => core}/services.nix (99%) delete mode 100644 modules/x-os/default.nix delete mode 100644 profiles/core/default.nix diff --git a/flake.nix b/flake.nix index 7d43b67c..0c8a1c92 100644 --- a/flake.nix +++ b/flake.nix @@ -118,9 +118,9 @@ users = digga.lib.rakeLeaves ./users; }; suites = with profiles; rec { - base = [ core users.pub-solar users.root ]; + base = [ users.pub-solar users.root ]; iso = base ++ [ base-user graphical pub-solar-iso ]; - pubsolaros = [ core dram full-install base-user users.root ]; + pubsolaros = [ dram full-install base-user users.root ]; anonymous = [ pubsolaros users.pub-solar ]; }; }; diff --git a/modules/x-os/boot.nix b/modules/core/boot.nix similarity index 85% rename from modules/x-os/boot.nix rename to modules/core/boot.nix index dd788d26..9e9af88e 100644 --- a/modules/x-os/boot.nix +++ b/modules/core/boot.nix @@ -1,15 +1,15 @@ { config, pkgs, lib, ... }: with lib; let - cfg = config.pub-solar.x-os; + cfg = config.pub-solar.core; in { - options.pub-solar.x-os.iso-options.enable = mkOption { + options.pub-solar.core.iso-options.enable = mkOption { type = types.bool; default = false; description = "Feature flag for iso builds"; }; - options.pub-solar.x-os.disk-encryption-active = mkOption { + options.pub-solar.core.disk-encryption-active = mkOption { type = types.bool; default = true; description = "Whether it should be assumed that there is a cryptroot device"; diff --git a/modules/core/default.nix b/modules/core/default.nix new file mode 100644 index 00000000..dae70e79 --- /dev/null +++ b/modules/core/default.nix @@ -0,0 +1,30 @@ +{ lib, ... }: + +with lib; +let + psCfg = config.pub-solar; + cfg = config.pub-solar.core; +in +{ + imports = [ + ./boot.nix + ./fonts.nix + ./i18n.nix + ./modules.nix + ./networking.nix + ./nix.nix + ./packages.nix + ./services.nix + ]; + + options.pub-solar.core = { + lite-core-active = mkOption { + description = '' + Whether the node should run as a server or agent. + Note that the server, by default, also runs as an agent. + ''; + default = false; + type = types.bool; + }; + }; +} diff --git a/modules/x-os/fonts.nix b/modules/core/fonts.nix similarity index 100% rename from modules/x-os/fonts.nix rename to modules/core/fonts.nix diff --git a/modules/x-os/i18n.nix b/modules/core/i18n.nix similarity index 100% rename from modules/x-os/i18n.nix rename to modules/core/i18n.nix diff --git a/modules/core/modules.nix b/modules/core/modules.nix new file mode 100644 index 00000000..b55281eb --- /dev/null +++ b/modules/core/modules.nix @@ -0,0 +1,11 @@ +{ config, pkgs, lib, ... }: +with lib; +let + cfg = config.pub-solar.core; +in +{ + pub-solar.terminal-life.enable = lib.mkIf (!cfg.lite-core-active) true; + pub-solar.audio.enable = lib.mkIf (!cfg.lite-core-active) true; + pub-solar.crypto.enable = lib.mkIf (!cfg.lite-core-active) true; + pub-solar.devops.enable = lib.mkIf (!cfg.lite-core-active) true; +} diff --git a/modules/x-os/networking.nix b/modules/core/networking.nix similarity index 95% rename from modules/x-os/networking.nix rename to modules/core/networking.nix index 347fe750..ce3248d8 100644 --- a/modules/x-os/networking.nix +++ b/modules/core/networking.nix @@ -2,10 +2,10 @@ with lib; -let cfg = config.pub-solar.x-os; +let cfg = config.pub-solar.core; in { - options.pub-solar.x-os = { + options.pub-solar.core = { binaryCaches = mkOption { type = types.listOf types.str; default = [ ]; diff --git a/modules/x-os/nix.nix b/modules/core/nix.nix similarity index 100% rename from modules/x-os/nix.nix rename to modules/core/nix.nix diff --git a/modules/core/packages.nix b/modules/core/packages.nix new file mode 100644 index 00000000..07263245 --- /dev/null +++ b/modules/core/packages.nix @@ -0,0 +1,76 @@ +{ config, pkgs, lib, ... }: + +with lib; +let + psCfg = config.pub-solar; + cfg = config.pub-solar.core; +in +{ + environment = { + systemPackages = with pkgs; [ + # Core unix utility packages + coreutils-full + dnsutils + inetutils + progress + pciutils + usbutils + + wget + openssl + openssh + curl + htop + lsof + psmisc + file + ] + + ++ lib.optionals (!cfg.lite-core-active) [ + mtr + + gitFull + git-lfs + git-bug + + xdg-utils + sysfsutils + renameutils + nfs-utils + moreutils + mailutils + keyutils + input-utils + elfutils + binutils + dateutils + diffutils + findutils + exfat + + + # zippit + zip + unzip + + # Modern modern utilities + p7zip + croc + jq + + # Nix specific utilities + niv + manix + nix-index + nix-tree + nixpkgs-review + # Build broken, python2.7-PyJWT-2.0.1.drv' failed + #nixops + psos + nvd + + # Fun + neofetch + ]; + }; +} diff --git a/modules/x-os/services.nix b/modules/core/services.nix similarity index 99% rename from modules/x-os/services.nix rename to modules/core/services.nix index 98a058a3..61ba6ea0 100644 --- a/modules/x-os/services.nix +++ b/modules/core/services.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, ... }: { - # For rage encryption, all hosts need a ssh key pair services.openssh = { enable = true; diff --git a/modules/x-os/default.nix b/modules/x-os/default.nix deleted file mode 100644 index 0fd734f3..00000000 --- a/modules/x-os/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: { - imports = [ - ./boot.nix - ./fonts.nix - ./i18n.nix - ./networking.nix - ./nix.nix - ./services.nix - ]; -} diff --git a/profiles/core/default.nix b/profiles/core/default.nix deleted file mode 100644 index b35fb673..00000000 --- a/profiles/core/default.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ self, config, lib, pkgs, inputs, ... }: -let inherit (lib) fileContents; -in -{ - # Sets nrdxp.cachix.org binary cache which just speeds up some builds - imports = [ ../cachix ]; - - config = { - pub-solar.terminal-life.enable = true; - pub-solar.audio.enable = true; - pub-solar.crypto.enable = true; - pub-solar.devops.enable = true; - - environment = { - systemPackages = with pkgs; [ - # Core unix utility packages - coreutils-full - progress - dnsutils - inetutils - mtr - pciutils - usbutils - gitFull - git-lfs - git-bug - wget - openssl - openssh - curl - htop - lsof - psmisc - xdg-utils - sysfsutils - renameutils - nfs-utils - moreutils - mailutils - keyutils - input-utils - elfutils - binutils - dateutils - diffutils - findutils - exfat - file - - # zippit - zip - unzip - - # Modern modern utilities - p7zip - croc - jq - - # Nix specific utilities - niv - manix - nix-index - nix-tree - nixpkgs-review - # Build broken, python2.7-PyJWT-2.0.1.drv' failed - #nixops - psos - nvd - - # Fun - neofetch - ]; - }; - }; -} diff --git a/profiles/pub-solar-iso/default.nix b/profiles/pub-solar-iso/default.nix index 24b5e1b3..4aa8c6fd 100644 --- a/profiles/pub-solar-iso/default.nix +++ b/profiles/pub-solar-iso/default.nix @@ -6,6 +6,6 @@ in config = { pub-solar.graphical.wayland.software-renderer.enable = true; pub-solar.sway.terminal = "foot"; - pub-solar.x-os.iso-options.enable = true; + pub-solar.core.iso-options.enable = true; }; } -- 2.44.1 From 7785744d73b8a60ae8376ddb1e9bcce7fe0daf6b Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Sun, 14 Aug 2022 15:11:01 +0200 Subject: [PATCH 024/118] Move some packages from full to default set, move options for modules to default.nix --- modules/core/default.nix | 10 +++++++--- modules/core/modules.nix | 11 ----------- modules/core/packages.nix | 21 ++++++++++----------- 3 files changed, 17 insertions(+), 25 deletions(-) delete mode 100644 modules/core/modules.nix diff --git a/modules/core/default.nix b/modules/core/default.nix index dae70e79..8aec7846 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -17,11 +17,15 @@ in ./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-core-active = mkOption { + lite = mkOption { description = '' - Whether the node should run as a server or agent. - Note that the server, by default, also runs as an agent. + Enable a lite edition of core with less default modules and a reduced package set. ''; default = false; type = types.bool; diff --git a/modules/core/modules.nix b/modules/core/modules.nix deleted file mode 100644 index b55281eb..00000000 --- a/modules/core/modules.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, pkgs, lib, ... }: -with lib; -let - cfg = config.pub-solar.core; -in -{ - pub-solar.terminal-life.enable = lib.mkIf (!cfg.lite-core-active) true; - pub-solar.audio.enable = lib.mkIf (!cfg.lite-core-active) true; - pub-solar.crypto.enable = lib.mkIf (!cfg.lite-core-active) true; - pub-solar.devops.enable = lib.mkIf (!cfg.lite-core-active) true; -} diff --git a/modules/core/packages.nix b/modules/core/packages.nix index 07263245..f6867816 100644 --- a/modules/core/packages.nix +++ b/modules/core/packages.nix @@ -24,9 +24,18 @@ in lsof psmisc file + + # zippit + zip + unzip + + # Modern modern utilities + p7zip + croc + jq ] - ++ lib.optionals (!cfg.lite-core-active) [ + ++ lib.optionals (!cfg.lite) [ mtr gitFull @@ -48,16 +57,6 @@ in findutils exfat - - # zippit - zip - unzip - - # Modern modern utilities - p7zip - croc - jq - # Nix specific utilities niv manix -- 2.44.1 From bf581d1e9c19df13ff30ab7c0ff8330cefdd3626 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 14:23:37 +0200 Subject: [PATCH 025/118] 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"; -- 2.44.1 From 9d25b3ee9b3c4a6198c20361ebb488260cf4b92e Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 14:24:53 +0200 Subject: [PATCH 026/118] 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="; + }); + }); +} -- 2.44.1 From c43b96c4d5f61cf07aa1a83b2cf753f0e95a3276 Mon Sep 17 00:00:00 2001 From: hensoko Date: Sun, 14 Aug 2022 13:54:19 +0000 Subject: [PATCH 027/118] 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; + }; + }; } -- 2.44.1 From 4c0991c7e1a7670526ec2331c0def1a5ae46e918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 17:10:30 +0200 Subject: [PATCH 028/118] Put always hibernate behind a flag Hibernation is now a core option: ``` pub-solar.core.hibernation.enable = true; ``` And there's a paranoia mode, that keeps the disk encrypted as much as possible by enabling hibernation and removing the options for sleep, screen locking. Idle locking now hibernates, and it does it on very short notice. --- modules/core/boot.nix | 10 ++++- modules/paranoia/default.nix | 24 +++++++++++ .../config/config.d/custom-keybindings.conf | 19 --------- .../sway/config/config.d/mode_system.conf.nix | 21 ++++++++++ modules/sway/default.nix | 40 ++++++++++--------- modules/sway/gammastep.service.nix | 2 +- modules/sway/libinput-gestures.service.nix | 2 +- modules/sway/mako.service.nix | 2 +- modules/sway/sway-session.target.nix | 2 +- modules/sway/sway.service.nix | 2 +- modules/sway/swayidle.service.nix | 15 +++++-- modules/sway/waybar.service.nix | 2 +- modules/sway/xsettingsd.service.nix | 2 +- modules/sway/ydotool.service.nix | 2 +- pkgs/default.nix | 1 + pkgs/swaylock-bg.nix | 20 ++++++++++ 16 files changed, 115 insertions(+), 51 deletions(-) create mode 100644 modules/paranoia/default.nix create mode 100644 modules/sway/config/config.d/mode_system.conf.nix create mode 100644 pkgs/swaylock-bg.nix diff --git a/modules/core/boot.nix b/modules/core/boot.nix index 99b6d76c..6f93fabf 100644 --- a/modules/core/boot.nix +++ b/modules/core/boot.nix @@ -16,6 +16,14 @@ in description = "Whether it should be assumed that there is a cryptroot device"; }; + options.pub-solar.core.hibernation = { + enable = mkOption { + type = types.bool; + default = false; + description = "Whether the device can hibernate. This creates a swapfile at /swapfile."; + }; + }; + config = { boot = { # Enable plymouth for better experience of booting @@ -30,7 +38,7 @@ in }; }; - resumeDevice = "/swapfile"; + resumeDevice = mkIf cfg.core.hibernation.enable "/swapfile"; loader.systemd-boot.enable = true; diff --git a/modules/paranoia/default.nix b/modules/paranoia/default.nix new file mode 100644 index 00000000..ec530fc3 --- /dev/null +++ b/modules/paranoia/default.nix @@ -0,0 +1,24 @@ +{ config, lib, ... }: + +with lib; +let + psCfg = config.pub-solar; + cfg = config.pub-solar.paranoia; +in +{ + options.pub-solar.paranoia = { + enable = mkOption { + description = '' + Only offer hibernation instead of screen locking and sleeping. This only makes sense + if your hard drive is encrypted, and ensures that the contents of your drive are + encrypted if you are not actively using the device. + ''; + default = false; + type = types.bool; + }; + }; + + config = mkIf cfg.enable { + pub-solar.core.allow-hibernation = true; + }; +} diff --git a/modules/sway/config/config.d/custom-keybindings.conf b/modules/sway/config/config.d/custom-keybindings.conf index fdeac97a..659a4660 100644 --- a/modules/sway/config/config.d/custom-keybindings.conf +++ b/modules/sway/config/config.d/custom-keybindings.conf @@ -31,22 +31,3 @@ bindsym $mod+Ctrl+f exec "( pkill flameshot || true && flameshot & ) && ( sleep # Launcher set $menu exec alacritty --class launcher -e env TERMINAL_COMMAND="alacritty -e" sway-launcher bindsym $mod+Space exec $menu - -# Set shut down, restart and locking features -set $mode_system (e)xit, (h)ibernate, (r)eboot, (Shift+s)hutdown -bindsym $mod+0 mode "$mode_system" -mode "$mode_system" { - bindsym e exec swaymsg exit, mode "default" -#======= - bindsym l exec swaylock-bg, mode "default" - bindsym e exec systemctl --user stop graphical-session.target, mode "default" - bindsym s exec systemctl suspend, mode "default" -#>>>>>>> main - bindsym h exec systemctl hibernate, mode "default" - bindsym r exec systemctl reboot, mode "default" - bindsym Shift+s exec systemctl poweroff, mode "default" - - # exit system mode: "Enter" or "Escape" - bindsym Return mode "default" - bindsym Escape mode "default" -} diff --git a/modules/sway/config/config.d/mode_system.conf.nix b/modules/sway/config/config.d/mode_system.conf.nix new file mode 100644 index 00000000..ef11a461 --- /dev/null +++ b/modules/sway/config/config.d/mode_system.conf.nix @@ -0,0 +1,21 @@ +{ psCfg, ... }: '' +# Set shut down, restart and locking features +set $mode_system (e)xit, (h)ibernate, (r)eboot, (Shift+s)hutdown +bindsym $mod+0 mode "$mode_system" +mode "$mode_system" { + bindsym e exec swaymsg exit, mode "default" +'' + (if !psCfg.core.allow-hibernation then '' + bindsym h exec systemctl hibernate, mode "default" +'' else "") + + (if !psCfg.paranoia.enable then '' + bindsym l exec swaylock-bg, mode "default" + bindsym s exec systemctl suspend, mode "default" +'' else "") + '' + bindsym r exec systemctl reboot, mode "default" + bindsym Shift+s exec systemctl poweroff, mode "default" + + # exit system mode: "Enter" or "Escape" + bindsym Return mode "default" + bindsym Escape mode "default" +} +'' diff --git a/modules/sway/default.nix b/modules/sway/default.nix index 59b6ff09..2872a3b3 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -2,25 +2,26 @@ with lib; let psCfg = config.pub-solar; - cfg = config.pub-solar.sway; in { options.pub-solar.sway = { enable = mkEnableOption "Life in boxes"; - }; - options.pub-solar.sway.terminal = mkOption { - type = types.nullOr types.str; - default = "alacritty"; - description = "Choose sway's default terminal"; - }; - options.pub-solar.sway.v4l2loopback.enable = mkOption { - type = types.bool; - default = true; - description = "WebCam streaming tool"; + + terminal = mkOption { + type = types.nullOr types.str; + default = "alacritty"; + description = "Choose sway's default terminal"; + }; + + v4l2loopback.enable = mkOption { + type = types.bool; + default = true; + description = "WebCam streaming tool"; + }; }; - config = mkIf cfg.enable (mkMerge [ - (mkIf (cfg.v4l2loopback.enable) { + config = mkIf psCfg.sway.enable (mkMerge [ + (mkIf (psCfg.sway.v4l2loopback.enable) { boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; boot.kernelModules = [ "v4l2loopback" ]; boot.extraModprobeConfig = '' @@ -84,18 +85,19 @@ in programs.waybar.enable = true; #programs.waybar.systemd.enable = true; - systemd.user.services.mako = import ./mako.service.nix pkgs; - systemd.user.services.sway = import ./sway.service.nix pkgs; - systemd.user.services.swayidle = import ./swayidle.service.nix pkgs; - systemd.user.services.xsettingsd = import ./xsettingsd.service.nix pkgs; - systemd.user.services.waybar = import ./waybar.service.nix pkgs; - systemd.user.targets.sway-session = import ./sway-session.target.nix pkgs; + systemd.user.services.mako = import ./mako.service.nix { inherit pkgs psCfg; }; + systemd.user.services.sway = import ./sway.service.nix { inherit pkgs psCfg; }; + systemd.user.services.swayidle = import ./swayidle.service.nix { inherit pkgs psCfg; }; + systemd.user.services.xsettingsd = import ./xsettingsd.service.nix { inherit pkgs psCfg; }; + systemd.user.services.waybar = import ./waybar.service.nix { inherit pkgs psCfg; }; + systemd.user.targets.sway-session = import ./sway-session.target.nix { inherit pkgs psCfg; }; xdg.configFile."sway/config".text = import ./config/config.nix { inherit config pkgs; }; xdg.configFile."sway/config.d/colorscheme.conf".source = ./config/config.d/colorscheme.conf; xdg.configFile."sway/config.d/theme.conf".source = ./config/config.d/theme.conf; xdg.configFile."sway/config.d/gaps.conf".source = ./config/config.d/gaps.conf; xdg.configFile."sway/config.d/custom-keybindings.conf".source = ./config/config.d/custom-keybindings.conf; + xdg.configFile."sway/config.d/mode_system.conf".text = import ./config/config.d/mode_system.config.nix { inherit psCfg; }; xdg.configFile."sway/config.d/applications.conf".source = ./config/config.d/applications.conf; xdg.configFile."sway/config.d/systemd.conf".source = ./config/config.d/systemd.conf; }; diff --git a/modules/sway/gammastep.service.nix b/modules/sway/gammastep.service.nix index f59edf02..3960d1ae 100644 --- a/modules/sway/gammastep.service.nix +++ b/modules/sway/gammastep.service.nix @@ -1,4 +1,4 @@ -pkgs: +{ pkgs, ... }: { Unit = { Description = "set color temperature of display according to time of day"; diff --git a/modules/sway/libinput-gestures.service.nix b/modules/sway/libinput-gestures.service.nix index c4c860da..798d10d6 100644 --- a/modules/sway/libinput-gestures.service.nix +++ b/modules/sway/libinput-gestures.service.nix @@ -1,4 +1,4 @@ -pkgs: +{ pkgs, ... }: { Unit = { Description = "Actions gestures on your touchpad using libinput"; diff --git a/modules/sway/mako.service.nix b/modules/sway/mako.service.nix index 190b986d..b155e148 100644 --- a/modules/sway/mako.service.nix +++ b/modules/sway/mako.service.nix @@ -1,4 +1,4 @@ -pkgs: +{ pkgs, ... }: { Unit = { Description = "Lightweight Wayland notification daemon"; diff --git a/modules/sway/sway-session.target.nix b/modules/sway/sway-session.target.nix index 3eb4d24c..7b25376a 100644 --- a/modules/sway/sway-session.target.nix +++ b/modules/sway/sway-session.target.nix @@ -1,4 +1,4 @@ -pkgs: +{ pkgs, ... }: { Unit = { Description = "sway compositor session"; diff --git a/modules/sway/sway.service.nix b/modules/sway/sway.service.nix index 95efc3e6..0d0d782c 100644 --- a/modules/sway/sway.service.nix +++ b/modules/sway/sway.service.nix @@ -1,4 +1,4 @@ -pkgs: +{ pkgs, ... }: { Unit = { Description = "sway - SirCmpwn's Wayland window manager"; diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index 61f32591..3b87c610 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -1,4 +1,4 @@ -pkgs: +{ pkgs, psCfg, ... }: { Unit = { Description = "Idle manager for Wayland"; @@ -10,9 +10,16 @@ pkgs: Service = { Type = "simple"; Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin"; - ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ - timeout 150 'swaymsg "output * dpms off"' \ - timeout 300 'systemctl hibernate' \ + ExecStart = if psCfg.paranoia.enable then '' + ${pkgs.swayidle}/bin/swayidle -w \ + timeout 120 'swaymsg "output * dpms off"' \ + timeout 150 'systemctl hibernate' \ + '' else '' + ${pkgs.swayidle}/bin/swayidle -w \ + timeout 600 'swaylock-bg' \ + timeout 900 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep 'swaylock-bg' ''; }; Install = { diff --git a/modules/sway/waybar.service.nix b/modules/sway/waybar.service.nix index ee5e8938..98b8ed35 100644 --- a/modules/sway/waybar.service.nix +++ b/modules/sway/waybar.service.nix @@ -1,4 +1,4 @@ -pkgs: +{ pkgs, ... }: { Unit = { Description = "Highly customizable Wayland bar for Sway and Wlroots based compositors."; diff --git a/modules/sway/xsettingsd.service.nix b/modules/sway/xsettingsd.service.nix index 0d729cb2..db3e842c 100644 --- a/modules/sway/xsettingsd.service.nix +++ b/modules/sway/xsettingsd.service.nix @@ -1,4 +1,4 @@ -pkgs: +{ pkgs, ... }: { Unit = { Description = "X Settings Daemon"; diff --git a/modules/sway/ydotool.service.nix b/modules/sway/ydotool.service.nix index d53bfcd7..24b64432 100644 --- a/modules/sway/ydotool.service.nix +++ b/modules/sway/ydotool.service.nix @@ -1,4 +1,4 @@ -pkgs: +{ pkgs, ... }: { Unit = { Description = "ydotool - Generic command-line automation tool (no X!)"; diff --git a/pkgs/default.nix b/pkgs/default.nix index 1b04f378..28e513b7 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -12,6 +12,7 @@ with final; { s = writeShellScriptBin "s" (import ./s.nix final); sway-launcher = writeScriptBin "sway-launcher" (import ./sway-launcher.nix final); sway-service = writeShellScriptBin "sway-service" (import ./sway-service.nix final); + swaylock-bg = writeShellScriptBin "swaylock-bg" (import ./swaylock-bg.nix final); toggle-kbd-layout = writeShellScriptBin "toggle-kbd-layout" (import ./toggle-kbd-layout.nix final); uhk-agent = import ./uhk-agent.nix final; wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final); diff --git a/pkgs/swaylock-bg.nix b/pkgs/swaylock-bg.nix new file mode 100644 index 00000000..b55c32ae --- /dev/null +++ b/pkgs/swaylock-bg.nix @@ -0,0 +1,20 @@ +self: with self; '' + # Dependencies: + # swaylock + + # Make sure we aren't running twice + RUNNING=$(ps -A | grep swaylock | wc -l) + if [ $RUNNING -ne 0 ]; then + exit 0 + fi + + IMAGE=$XDG_CONFIG_HOME/wallpaper.jpg + LOCKARGS="" + + for OUTPUT in `${sway}/bin/swaymsg -t get_outputs | jq -r '.[].name'` + do + LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}" + IMAGES="''${IMAGES} ''${IMAGE}" + done + exec ${swaylock}/bin/swaylock $LOCKARGS +'' -- 2.44.1 From 762e78677b39b722dbd12990025d9d3b5e943df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 17:15:50 +0200 Subject: [PATCH 029/118] Fix hibernation enabling in paranoia mode --- modules/paranoia/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/paranoia/default.nix b/modules/paranoia/default.nix index ec530fc3..19c470ad 100644 --- a/modules/paranoia/default.nix +++ b/modules/paranoia/default.nix @@ -19,6 +19,6 @@ in }; config = mkIf cfg.enable { - pub-solar.core.allow-hibernation = true; + pub-solar.core.hibernate.enable = true; }; } -- 2.44.1 From 1c015508e1f38551977e36ade2c3b21697cc8521 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 13 Aug 2022 21:34:46 +0200 Subject: [PATCH 030/118] tree: remove bud and all mentions of it Include upstream update doc updates --- doc/CONTRIBUTING.md | 17 +-- doc/SUMMARY.md | 11 +- doc/api-reference-channels.md | 91 +++++++++++++ doc/api-reference-devshell.md | 72 +++++++++++ doc/api-reference-home.md | 119 +++++++++++++++++ doc/api-reference-nixos.md | 234 ++++++++++++++++++++++++++++++++++ doc/api-reference.md | 80 ++++++++++++ doc/bud/get.md | 10 -- doc/bud/index.md | 24 ---- doc/concepts/users.md | 13 +- doc/start/bootstrapping.md | 102 --------------- doc/start/from-nixos.md | 51 -------- doc/start/index.md | 37 ++++-- doc/start/iso.md | 40 ++++-- flake.lock | 128 ++----------------- flake.nix | 6 - hosts/bootstrap.nix | 2 +- shell/default.nix | 1 - 18 files changed, 678 insertions(+), 360 deletions(-) create mode 100755 doc/api-reference-channels.md create mode 100755 doc/api-reference-devshell.md create mode 100755 doc/api-reference-home.md create mode 100755 doc/api-reference-nixos.md create mode 100755 doc/api-reference.md delete mode 100644 doc/bud/get.md delete mode 100644 doc/bud/index.md delete mode 100644 doc/start/bootstrapping.md delete mode 100644 doc/start/from-nixos.md diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index 86f5dd70..e3af7e20 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -1,18 +1,13 @@ -# Pull Requests - -## TL;DR; +# TL;DR; - **Target Branch**: `main` -- **Merge Policy**: [`bors`][bors] is always right (→ `bors try`) -- **Docs**: every changeset is expected to contain doc updates +- **Merge Policy**: green check: merge away. yellow circle: have patience. red x: try again. +- **Docs**: every change set is expected to contain doc updates - **Commit Msg**: be a poet! Comprehensive and explanatory commit messages should cover the motivation and use case in an easily understandable manner even when read after a few months. -- **Test Driven Development**: please default to test driven development where possible. +- **Test Driven Development**: please default to test driven development you can + make use of the `./examples` & `./e2e` and wire test up in the devshell. ### Within the Devshell (`nix develop`) - **Hooks**: please `git commit` within the devshell -- **Fail Early**: please run from within the devshell on your local machine: - - `nix flake check` - -[bors]: https://bors.tech - +- **Fail Early**: please run `check-all` from within the devshell on your local machine diff --git a/doc/SUMMARY.md b/doc/SUMMARY.md index 1d7bafe9..09d2d626 100644 --- a/doc/SUMMARY.md +++ b/doc/SUMMARY.md @@ -3,8 +3,6 @@ - [Introduction](../README.md) - [Quick Start](./start/index.md) - [ISO](./start/iso.md) - - [Bootstrapping](./start/bootstrapping.md) - - [From NixOS](./start/from-nixos.md) - [Key Concepts](./concepts/index.md) - [Hosts](./concepts/hosts.md) - [Overrides](./concepts/overrides.md) @@ -18,11 +16,16 @@ - [Concerns]() - [Secrets](./secrets.md) - [Tests](./tests.md) -- [Helper Script – `bud`](./bud/index.md) - - [get](./bud/get.md) - [Integrations](./integrations/index.md) - [Cachix](./integrations/cachix.md) - [Deploy RS](./integrations/deploy.md) - [NvFetcher](./integrations/nvfetcher.md) - [Hercules CI](./integrations/hercules.md) +- [API Reference](./api-reference.md) + - [Channels](./api-reference-channels.md) + - [Home](./api-reference-home.md) + - [Devshell](./api-reference-devshell.md) + - [NixOS](./api-reference-nixos.md) +- [Library Reference]() - [Contributing](./CONTRIBUTING.md) + diff --git a/doc/api-reference-channels.md b/doc/api-reference-channels.md new file mode 100755 index 00000000..533e6e91 --- /dev/null +++ b/doc/api-reference-channels.md @@ -0,0 +1,91 @@ +# Channels API Container +Configure your channels that you can use throughout your configurations. + +> #### ⚠ Gotcha ⚠ +> Devshell & (non-host-specific) Home-Manager `pkgs` instances are rendered off the +> `nixos.hostDefaults.channelName` (default) channel. + + +## channels +nixpkgs channels to create + + +*_Type_*: +attribute set of submodules or path convertible to it + + +*_Default_* +``` +{} +``` + + + + +## channels.\.config +nixpkgs config for this channel + + +*_Type_*: +attribute set or path convertible to it + + +*_Default_* +``` +{} +``` + + + + +## channels.\.input +nixpkgs flake input to use for this channel + + +*_Type_*: +nix flake + + +*_Default_* +``` +"self.inputs." +``` + + + + +## channels.\.overlays +overlays to apply to this channel +these will get exported under the 'overlays' flake output +as \/\ and any overlay pulled from \ +will be filtered out + + +*_Type_*: +list of valid Nixpkgs overlay or path convertible to its or anything convertible to it or path convertible to it + + +*_Default_* +``` +[] +``` + + + + +## channels.\.patches +patches to apply to this channel + + +*_Type_*: +list of paths + + +*_Default_* +``` +[] +``` + + + + diff --git a/doc/api-reference-devshell.md b/doc/api-reference-devshell.md new file mode 100755 index 00000000..28f18087 --- /dev/null +++ b/doc/api-reference-devshell.md @@ -0,0 +1,72 @@ +# Devshell API Container +Configure your devshell module collections of your environment. + + +## devshell +Modules to include in your DevOS shell. the `modules` argument +will be exported under the `devshellModules` output + + +*_Type_*: +submodule or path convertible to it + + +*_Default_* +``` +{} +``` + + + + +## devshell.exportedModules +modules to include in all hosts and export to devshellModules output + + +*_Type_*: +list of valid module or path convertible to its or anything convertible to it + + +*_Default_* +``` +[] +``` + + + + +## devshell.externalModules +The `externalModules` option has been removed. +Any modules that should be exported should be defined with the `exportedModules` +option and all other modules should just go into the `modules` option. + + +*_Type_*: +list of valid modules or anything convertible to it + + +*_Default_* +``` +[] +``` + + + + +## devshell.modules +modules to include that won't be exported +meant importing modules from external flakes + + +*_Type_*: +list of valid modules or anything convertible to it or path convertible to it + + +*_Default_* +``` +[] +``` + + + + diff --git a/doc/api-reference-home.md b/doc/api-reference-home.md new file mode 100755 index 00000000..0ab62f36 --- /dev/null +++ b/doc/api-reference-home.md @@ -0,0 +1,119 @@ +# Home-Manager API Container +Configure your home manager modules, profiles & suites. + + +## home +hosts, modules, suites, and profiles for home-manager + + +*_Type_*: +submodule or path convertible to it + + +*_Default_* +``` +{} +``` + + + + +## home.exportedModules +modules to include in all hosts and export to homeModules output + + +*_Type_*: +list of valid modules or anything convertible to it or path convertible to it + + +*_Default_* +``` +[] +``` + + + + +## home.externalModules +The `externalModules` option has been removed. +Any modules that should be exported should be defined with the `exportedModules` +option and all other modules should just go into the `modules` option. + + +*_Type_*: +list of valid modules or anything convertible to it + + +*_Default_* +``` +[] +``` + + + + +## home.importables +Packages of paths to be passed to modules as `specialArgs`. + + +*_Type_*: +attribute set + + +*_Default_* +``` +{} +``` + + + + +## home.importables.suites +collections of profiles + + +*_Type_*: +null or attribute set of list of paths or anything convertible to its or path convertible to it + + +*_Default_* +``` +null +``` + + + + +## home.modules +modules to include that won't be exported +meant importing modules from external flakes + + +*_Type_*: +list of valid modules or anything convertible to it or path convertible to it + + +*_Default_* +``` +[] +``` + + + + +## home.users +HM users that can be deployed portably without a host. + + +*_Type_*: +attribute set of HM user configs + + +*_Default_* +``` +{} +``` + + + + diff --git a/doc/api-reference-nixos.md b/doc/api-reference-nixos.md new file mode 100755 index 00000000..7428b161 --- /dev/null +++ b/doc/api-reference-nixos.md @@ -0,0 +1,234 @@ +# NixOS API Container +Configure your nixos modules, profiles & suites. + + +## nixos +hosts, modules, suites, and profiles for NixOS + + +*_Type_*: +submodule or path convertible to it + + +*_Default_* +``` +{} +``` + + + + +## nixos.hostDefaults +Defaults for all hosts. +the modules passed under hostDefaults will be exported +to the 'nixosModules' flake output. +They will also be added to all hosts. + + +*_Type_*: +submodule + + +*_Default_* +``` +{} +``` + + + + +## nixos.hostDefaults.channelName +Channel this host should follow + + +*_Type_*: +channel defined in `channels` + + + + + + +## nixos.hostDefaults.exportedModules +modules to include in all hosts and export to nixosModules output + + +*_Type_*: +list of valid modules or anything convertible to it or path convertible to it + + +*_Default_* +``` +[] +``` + + + + +## nixos.hostDefaults.externalModules +The `externalModules` option has been removed. +Any modules that should be exported should be defined with the `exportedModules` +option and all other modules should just go into the `modules` option. + + +*_Type_*: +list of valid modules or anything convertible to it + + +*_Default_* +``` +[] +``` + + + + +## nixos.hostDefaults.modules +modules to include that won't be exported +meant importing modules from external flakes + + +*_Type_*: +list of valid modules or anything convertible to it or path convertible to it + + +*_Default_* +``` +[] +``` + + + + +## nixos.hostDefaults.system +system for this host + + +*_Type_*: +null or system defined in `supportedSystems` + + +*_Default_* +``` +null +``` + + + + +## nixos.hosts +configurations to include in the nixosConfigurations output + + +*_Type_*: +attribute set of submodules + + +*_Default_* +``` +{} +``` + + + + +## nixos.hosts.\.channelName +Channel this host should follow + + +*_Type_*: +null or channel defined in `channels` + + +*_Default_* +``` +null +``` + + + + +## nixos.hosts.\.modules +modules to include + + +*_Type_*: +list of valid modules or anything convertible to it or path convertible to it + + +*_Default_* +``` +[] +``` + + + + +## nixos.hosts.\.system +system for this host + + +*_Type_*: +null or system defined in `supportedSystems` + + +*_Default_* +``` +null +``` + + + + +## nixos.hosts.\.tests +tests to run + + +*_Type_*: +list of valid NixOS test or path convertible to its or anything convertible to it + + +*_Default_* +``` +[] +``` + + +*_Example_* +``` +{"_type":"literalExpression","text":"[\n {\n name = \"testname1\";\n machine = { ... };\n testScript = ''\n # ...\n '';\n }\n ({ corutils, writers, ... }: {\n name = \"testname2\";\n machine = { ... };\n testScript = ''\n # ...\n '';\n })\n ./path/to/test.nix\n];\n"} +``` + + +## nixos.importables +Packages of paths to be passed to modules as `specialArgs`. + + +*_Type_*: +attribute set + + +*_Default_* +``` +{} +``` + + + + +## nixos.importables.suites +collections of profiles + + +*_Type_*: +null or attribute set of list of paths or anything convertible to its or path convertible to it + + +*_Default_* +``` +null +``` + + + + diff --git a/doc/api-reference.md b/doc/api-reference.md new file mode 100755 index 00000000..47eb1284 --- /dev/null +++ b/doc/api-reference.md @@ -0,0 +1,80 @@ +# Top Level API +`digga`'s top level API. API Containers are documented in their respective sub-chapter: + +- [Channels](./api-reference-channels.md) +- [Home](./api-reference-home.md) +- [Devshell](./api-reference-devshell.md) +- [NixOS](./api-reference-nixos.md) +- [Darwin](./api-reference-darwin.md) + +## channelsConfig +nixpkgs config for all channels + + +*_Type_*: +attribute set or path convertible to it + + +*_Default_* +``` +{} +``` + + + + +## inputs +The flake's inputs + +*_Type_*: +attribute set of nix flakes + + + + + + +## outputsBuilder +builder for flake system-spaced outputs +The builder gets passed an attrset of all channels + + +*_Type_*: +function that evaluates to a(n) attribute set or path convertible to it + + +*_Default_* +``` +"channels: { }" +``` + + + + +## self +The flake to create the DevOS outputs for + +*_Type_*: +nix flake + + + + + + +## supportedSystems +The systems supported by this flake + + +*_Type_*: +list of strings + + +*_Default_* +``` +["aarch64-linux","aarch64-darwin","i686-linux","x86_64-darwin","x86_64-linux"] +``` + + + + diff --git a/doc/bud/get.md b/doc/bud/get.md deleted file mode 100644 index 12263df0..00000000 --- a/doc/bud/get.md +++ /dev/null @@ -1,10 +0,0 @@ -# get -The `get` subcommand is useful for getting a bare copy of devos without the -git history. - -## Usage -```sh -bud get DEST-DIR -``` - -If DEST-DIR is ommitted, it defaults to _./devos_. diff --git a/doc/bud/index.md b/doc/bud/index.md deleted file mode 100644 index 7b985792..00000000 --- a/doc/bud/index.md +++ /dev/null @@ -1,24 +0,0 @@ -# [`bud`][bud] command -The template incudes a convenient script for managing your system called [`bud`][bud]. - -It is a portable and highly composable system control tool that work anywhere on your host -or in the flake's devshell. - -Although it comes with some predefined standard helpers, -it is very extensible and you are encouraged to write your own script snippets -to ease your workflows. An example is the bud module for a `get` command that -comes included with `devos`. - -While writing scripts you can convenientely access smart environment variables -that can tell the current architecture, user or host name, among others, regardless -wether you invoke `bud` within the devshell or as the system-wide installed `bud`. - -For details, please review the [bud repo][bud]. - -## Usage -```sh -bud help -``` - - -[bud]: https://github.com/divnix/bud diff --git a/doc/concepts/users.md b/doc/concepts/users.md index b2a6c2a3..b3454244 100644 --- a/doc/concepts/users.md +++ b/doc/concepts/users.md @@ -49,19 +49,18 @@ argument that gets passed to your home-manager users. ## External Usage You can easily use the defined home-manager configurations outside of NixOS -using the `homeConfigurations` flake output. The [bud](../bud/index.md) helper -script makes this even easier. +using the `homeConfigurations` flake output. -This is great for keeping your environment consistent across Unix systems, -including OSX. +This is great for keeping your environment consistent across Unix-like systems, +including macOS. ### From within the projects devshell: ```sh -# builds the nixos user defined in the NixOS host -bud home NixOS nixos +# builds the pub-solar user defined in the PubSolarOS host +nix build '.#homeConfigurations."pub-solar@PubSolarOS".activationPackage' # build and activate -bud home NixOS nixos switch +nix build '.#homeConfigurations."pub-solar@PubSolarOS".activationPackage' && ./result/activate && unlink result ``` ### Manually from outside the project: diff --git a/doc/start/bootstrapping.md b/doc/start/bootstrapping.md deleted file mode 100644 index b8a0ad04..00000000 --- a/doc/start/bootstrapping.md +++ /dev/null @@ -1,102 +0,0 @@ -# Bootstrapping - -This will help you boostrap a bare host with the help of the -[bespoke iso](./iso.md) live installer. - -_Note: nothing prevents you from remotely executing the boostrapping -process. See below._ - -Once your target host has booted into the live iso, you need to partition -and format your disk according to the [official manual][manual]. - -## Mount partitions - -Then properly mount the formatted partitions at `/mnt`, so that you can -install your system to those new partitions. - -Mount `nixos` partition to `/mnt` and — for UEFI — `boot` -partition to `/mnt/boot`: - -```console -$ mount /dev/disk/by-label/nixos /mnt -$ mkdir -p /mnt/boot && mount /dev/disk/by-label/boot /mnt/boot # UEFI only -$ swapon /dev/disk/by-label/swap -``` - -Add some extra space to the store. In the iso, it's running on a tmpfs -off your RAM: -```console -$ mkdir -p /mnt/tmpstore/{work,store} -$ mount -t overlay overlay -olowerdir=/nix/store,upperdir=/mnt/tmpstore/store,workdir=/mnt/tmpstore/work /nix/store -``` - -## Install - -Install off of a copy of devos from the time the iso was built: - -```console -$ cd /iso/devos -$ nixos-install --flake .#NixOS -``` - -## Notes of interest - -### Remote access to the live installer - -The iso live installer comes preconfigured with a network configuration -which announces it's hostname via [MulticastDNS][mDNS] as `hostname.local`, -that is `bootstrap.local` in the [iso example](./iso). - -In the rare case that [MulticastDNS][mDNS] is not availabe or turned off -in your network, there is a static link-local IPv6 address configured to -`fe80::47`(mnemonic from the letter's position in the english alphabet: -`n=14 i=9 x=24; 47 = n+i+x`). - -Provided that you have added your public key to the authorized keys of the -`root` user _(hint: [`deploy-rs`](../integrations/deploy.md) needs passwordless -sudo access)_: - -```nix -{ ... }: -{ - users.users.root.openssh.authorizedKeys.keyFiles = [ - ../secrets/path/to/key.pub - ]; -} -``` - -You can then ssh into the live installer through one of the -following options: - -```console -ssh root@bootstrap.local - -ssh root@fe80::47%eno1 # where eno1 is your network interface on which you are linked to the target -``` - -_Note: the [static link-local IPv6 address][staticLLA] and [MulticastDNS][mDNS] is only -configured on the live installer. If you wish to enable [MulticastDNS][mDNS] -for your environment, you ought to configure that in a regular [profile](../concepts/profiles.md)._ - -### EUI-64 LLA & Host Identity - -The iso's IPv6 Link Local Address (LLA) is configured with a static 64-bit Extended -Unique Identifiers (EUI-64) that is derived from the host interface's Message -Authentication Code (MAC) address. - -After a little while (a few seconds), you can remotely discover this unique and host -specific address over [NDP][NDP] for example with: - -```console -ip -6 neigh show # also shows fe80::47 -``` - -***This LLA is stable for the host, unless you need to swap that particular network card.*** -Under this reservation, though, you may use this EUI-64 to wire up a specific -(cryptographic) host identity. - - -[manual]: https://nixos.org/manual/nixos/stable/index.html#sec-installation-partitioning -[mDNS]: https://en.wikipedia.org/wiki/Multicast_DNS -[NDP]: https://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol -[staticLLA]: https://tools.ietf.org/html/rfc7404 diff --git a/doc/start/from-nixos.md b/doc/start/from-nixos.md deleted file mode 100644 index 3e8c84d6..00000000 --- a/doc/start/from-nixos.md +++ /dev/null @@ -1,51 +0,0 @@ -# From NixOS - -## Generate Configuration -Assuming you're happy with your existing partition layout, you can generate a -basic NixOS configuration for your system using: -```sh -bud up -``` - -This will make a new file `hosts/up-$(hostname).nix`, which you can edit to -your liking. - -You must then add a host to `nixos.hosts` in flake.nix: -```nix -{ - nixos.hosts = { - modules = hosts/NixOS.nix; - }; -} -``` - -Make sure your `i18n.defaultLocale` and `time.timeZone` are set properly for -your region. Keep in mind that `networking.hostName` will be automatically -set to the name of your host; - -Now might be a good time to read the docs on [suites](../concepts/suites.md) and -[profiles](../concepts/profiles.md) and add or create any that you need. - -> ##### _Note:_ -> While the `up` sub-command is provided as a convenience to quickly set up and -> install a "fresh" NixOS system on current hardware, committing these files is -> discouraged. -> -> They are placed in the git staging area automatically because they would be -> invisible to the flake otherwise, but it is best to move what you need from -> them directly into a host module of your own making, and commit that instead. -# Installation - -Once you're ready to deploy `hosts/my-host.nix`: -```sh -bud my-host switch -``` - - -This calls `nixos-rebuild` with sudo to build and install your configuration. - -> ##### _Notes:_ -> - Instead of `switch`, you can pass `build`, `test`, `boot`, etc just as with -> `nixos-rebuild`. - - diff --git a/doc/start/index.md b/doc/start/index.md index 2cd14d9a..9650ba05 100644 --- a/doc/start/index.md +++ b/doc/start/index.md @@ -2,25 +2,35 @@ The only dependency is nix, so make sure you have it [installed][install-nix]. ## Get the Template -Here is a snippet that will get you the template without the git history: +If you currently don't have flakes setup, you can utilize the digga shell to pull the template: ```sh -nix-shell -p cachix --run "cachix use nrdxp" - -nix-shell https://github.com/divnix/devos/archive/main.tar.gz -A shell \ - --run "bud get main" - -cd devos - -nix-shell +nix-shell "https://github.com/divnix/digga/archive/main.tar.gz" \ + --run "nix flake init -t github:divnix/digga" +``` +If you already have flakes support, you can directly pull the template: +```sh +nix flake init -t github:divnix/digga +``` +Then make sure to create the git repository: +```sh git init git add . git commit -m init ``` -This will place you in a new folder named `devos` with git initialized, and a -nix-shell that provides all the dependencies, including the unstable nix -version required. +To drop into a nix-shell, if you don't have flakes setup, use the digga shell to create a `flake.lock`: +```sh +nix-shell "https://github.com/divnix/digga/archive/main.tar.gz" \ + --run "nix flake lock" +``` +Or if you do have flakes support, just run: +```sh +nix flake lock +``` + +Finally, run `nix-shell` to get to an interactive shell with all the dependencies, including the unstable nix +version required. You can run `menu` to confirm that you are using digga (expected output includes [docs], [general commands], [linter], etc.). In addition, the [binary cache](../integrations/cachix.md) is added for faster deployment. @@ -33,9 +43,8 @@ In addition, the [binary cache](../integrations/cachix.md) is added for faster d > you can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"` ## Next Steps: + - [Make installable ISO](./iso.md) -- [Bootstrap Host](./bootstrapping.md) -- [Already on NixOS](./from-nixos.md) [install-nix]: https://nixos.org/manual/nix/stable/#sect-multi-user-installation diff --git a/doc/start/iso.md b/doc/start/iso.md index 76af1c6e..b8fa6659 100644 --- a/doc/start/iso.md +++ b/doc/start/iso.md @@ -1,22 +1,36 @@ -# ISO +# Installation Media + +This project leverages [nix-community/nixos-generators][nixos-generators] for +building machine images. In most cases, you'll probably want to use the +`install-iso` format. + +Making an installable ISO for `hosts/bootstrap.nix` is as simple as: -Making and writing an installable iso for `hosts/bootstrap.nix` is as simple as: ```sh -bud build bootstrap bootstrapIso -sudo -E $(which bud) burn +nix run github:nix-community/nixos-generators -- \ + --format install-iso \ + --flake '.#bootstrap' ``` -This works for any host. +Then "burn" the ISO to your USB stick (or CD-R if you like!) following the +[instructions in the NixOS manual][burn] (or using your preferred USB burner). -## ISO image nix store & cache +You can also swap out the `--format` for [any of the others][formats] supported +by nixos-generators. -The iso image holds the store to the live environment and _also_ acts as a binary cache -to the installer. To considerably speed up things, the image already includes all flake -`inputs` as well as the `devshell` closures. +Continue by following the usual installation instructions in the NixOS manual. -While you _could_ provision any machine with a single stick, a custom-made iso for -the host you want to install DevOS to, maximises those local cache hits. +## ISO Nix Store and Cache -For hosts that don't differ too much, a single usb stick might be ok, whereas when -there are bigger differences, a custom-made usb stick will be considerably faster. +The ISO image holds the Nix store for the live environment and _also_ acts as a +binary cache to the installer. To considerably speed things up, the image +already includes all flake `inputs` as well as the `devshell` closures. +While you _could_ provision any NixOS machine with the same USB stick, an ISO +custom-made for your target host will maximise those local cache hits. For hosts +that don't differ too much, a single USB stick might be ok, whereas when there +are bigger differences, a custom-made USB stick will be considerably faster. + +[nixos-generators]: https://github.com/nix-community/nixos-generators +[burn]: https://nixos.org/manual/nixos/stable/index.html#sec-booting-from-usb +[formats]: https://github.com/nix-community/nixos-generators/tree/master/formats diff --git a/flake.lock b/flake.lock index 2e4bdbcd..857bb989 100644 --- a/flake.lock +++ b/flake.lock @@ -20,26 +20,6 @@ "type": "github" } }, - "beautysh": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "poetry2nix": "poetry2nix" - }, - "locked": { - "lastModified": 1641830469, - "narHash": "sha256-uhDmgNP/biOWe4FtOa6c2xZnREH+NP9rdrMm0LccRUk=", - "owner": "lovesegfault", - "repo": "beautysh", - "rev": "e85d9736927c0fcf2abb05cb3a2d8d9b4502a2eb", - "type": "github" - }, - "original": { - "owner": "lovesegfault", - "repo": "beautysh", - "type": "github" - } - }, "blank": { "locked": { "lastModified": 1625557891, @@ -55,31 +35,6 @@ "type": "github" } }, - "bud": { - "inputs": { - "beautysh": "beautysh", - "devshell": [ - "digga", - "devshell" - ], - "nixpkgs": [ - "nixos" - ] - }, - "locked": { - "lastModified": 1654190822, - "narHash": "sha256-B8z3stYaULNDBBjzJHrFHGgiJHrLqhBkxH+9u5iBP7E=", - "owner": "divnix", - "repo": "bud", - "rev": "0ff3e4e4b8791ea4d827bf5bfcac28cef060f209", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "bud", - "type": "github" - } - }, "darwin": { "inputs": { "nixpkgs": [ @@ -145,7 +100,7 @@ }, "devshell": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nixpkgs": [ "digga", "nixpkgs" @@ -251,11 +206,11 @@ }, "flake-utils": { "locked": { - "lastModified": 1631561581, - "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", + "lastModified": 1642700792, + "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", "owner": "numtide", "repo": "flake-utils", - "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", + "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", "type": "github" }, "original": { @@ -266,7 +221,7 @@ }, "flake-utils-plus": { "inputs": { - "flake-utils": "flake-utils_3" + "flake-utils": "flake-utils_2" }, "locked": { "lastModified": 1654029967, @@ -284,21 +239,6 @@ } }, "flake-utils_2": { - "locked": { - "lastModified": 1642700792, - "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { "locked": { "lastModified": 1644229661, "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", @@ -313,7 +253,7 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_3": { "locked": { "lastModified": 1649676176, "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", @@ -435,7 +375,7 @@ "nixos-generators": { "inputs": { "nixlib": "nixlib", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1657748715, @@ -468,16 +408,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1633971123, - "narHash": "sha256-WmI4NbH1IPGFWVkuBkKoYgOnxgwSfWDgdZplJlQ93vA=", + "lastModified": 1637186689, + "narHash": "sha256-NU7BhgnwA/3ibmCeSzFK6xGi+Bari9mPfn+4cBmyEjw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e4ef597edfd8a0ba5f12362932fc9b1dd01a0aef", + "rev": "7fad01d9d5a3f82081c00fb57918d64145dc904c", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable-small", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -498,22 +438,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1637186689, - "narHash": "sha256-NU7BhgnwA/3ibmCeSzFK6xGi+Bari9mPfn+4cBmyEjw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7fad01d9d5a3f82081c00fb57918d64145dc904c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "locked": { "lastModified": 0, @@ -529,7 +453,7 @@ "nvfetcher": { "inputs": { "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixos" ] @@ -548,37 +472,9 @@ "type": "github" } }, - "poetry2nix": { - "inputs": { - "flake-utils": [ - "bud", - "beautysh", - "flake-utils" - ], - "nixpkgs": [ - "bud", - "beautysh", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1633382856, - "narHash": "sha256-hYlet806M9xJj4yxf0g5fhDT2IEUVIMAl7sqIeZ8DUM=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "705cbfa10e3d9bfed2e59e0256844ae3704dbd7e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "poetry2nix", - "type": "github" - } - }, "root": { "inputs": { "agenix": "agenix", - "bud": "bud", "darwin": "darwin", "deploy": "deploy", "digga": "digga", diff --git a/flake.nix b/flake.nix index 85e05602..bf050b2e 100644 --- a/flake.nix +++ b/flake.nix @@ -17,10 +17,6 @@ digga.inputs.home-manager.follows = "home"; digga.inputs.deploy.follows = "deploy"; - bud.url = "github:divnix/bud"; - bud.inputs.nixpkgs.follows = "nixos"; - bud.inputs.devshell.follows = "digga/devshell"; - home.url = "github:nix-community/home-manager/release-22.05"; home.inputs.nixpkgs.follows = "nixos"; @@ -47,7 +43,6 @@ outputs = { self , digga - , bud , nixos , home , nixos-hardware @@ -101,7 +96,6 @@ digga.nixosModules.nixConfig home.nixosModules.home-manager agenix.nixosModules.age - bud.nixosModules.bud ]; }; diff --git a/hosts/bootstrap.nix b/hosts/bootstrap.nix index 541ca6fb..ba509911 100644 --- a/hosts/bootstrap.nix +++ b/hosts/bootstrap.nix @@ -1,6 +1,6 @@ { profiles, ... }: { - # build with: `bud build bootstrap bootstrapIso` + # build with: `nix build '.#nixosConfigurations.bootstrap.config.system.build.bootstrapIso'` # reachable on the local link via ssh root@fe80::47%eno1 # where 'eno1' is replaced by your own machine's network # interface that has the local link to the target machine diff --git a/shell/default.nix b/shell/default.nix index d22b3af4..597a2d2d 100644 --- a/shell/default.nix +++ b/shell/default.nix @@ -1,7 +1,6 @@ { self, inputs, ... }: { modules = with inputs; [ - bud.devshellModules.bud ]; exportedModules = [ ./devos.nix -- 2.44.1 From b42f7b72ad5a7c8b72bbd93039e8addb2a95a6d2 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 12:31:53 +0200 Subject: [PATCH 031/118] Remove bud from CI, too --- .drone.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 23805095..f54bd8f9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -106,7 +106,6 @@ steps: - nix $$NIX_FLAGS flake check - nix $$NIX_FLAGS build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel" - nix $$NIX_FLAGS develop --command echo OK - - nix $$NIX_FLAGS develop --command bud --help --- kind: pipeline @@ -122,8 +121,8 @@ steps: commands: - | nix --print-build-logs --verbose \ - develop --command \ - bud build bootstrap bootstrapIso + build \ + '.#nixosConfigurations.bootstrap.config.system.build.bootstrapIso' - cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/ - name: "Publish ISO" @@ -158,6 +157,6 @@ volumes: --- kind: signature -hmac: bdbefb07b97dc8efc44d8eb36ee4d1bb89eec3b7255b49929e126e86a4b4a788 +hmac: da951ba8ede88996728acfb47846e01880eb0e3b91f66e47848d6c1cc727c5d9 ... -- 2.44.1 From cb5c75b1cc37e9272422bf45ecd3e6353abb0cd2 Mon Sep 17 00:00:00 2001 From: hensoko Date: Sun, 14 Aug 2022 15:17:35 +0000 Subject: [PATCH 032/118] feature/terminal-life-lite-mode (#117) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/117 Reviewed-by: Benjamin Bädorf --- modules/core/default.nix | 6 +++++- modules/terminal-life/default.nix | 8 ++++++++ modules/terminal-life/nvim/default.nix | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/core/default.nix b/modules/core/default.nix index c7457c1b..7b168268 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -28,10 +28,14 @@ in 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; + + terminal-life = { + enable = true; + lite = cfg.lite; + }; }; }; } diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 8ecb9919..6bd0312f 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -7,6 +7,14 @@ in { options.pub-solar.terminal-life = { enable = mkEnableOption "Life in black and white"; + + lite = mkOption { + description = '' + Enable a lite edition of terminal-life with less modules and a reduced package set. + ''; + default = false; + type = types.bool; + }; }; config = mkIf cfg.enable { diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index 1d6645ff..bc06943b 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: let psCfg = config.pub-solar; + cfg = config.pub-solar.terminal-life; xdg = config.home-manager.users."${psCfg.user.name}".xdg; preview-file = pkgs.writeShellScriptBin "preview-file" (import ./preview-file.nix pkgs); @@ -76,7 +77,7 @@ in withRuby = true; withPython3 = true; - extraPackages = with pkgs; [ + extraPackages = with pkgs; lib.mkIf (!cfg.lite) [ ccls gopls nodejs -- 2.44.1 From ca4262b84f341b97cd4a179bde3740d42bc61052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 17:20:09 +0200 Subject: [PATCH 033/118] Fix hibernation enabling in paranoia mode --- modules/paranoia/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/paranoia/default.nix b/modules/paranoia/default.nix index 19c470ad..bb319767 100644 --- a/modules/paranoia/default.nix +++ b/modules/paranoia/default.nix @@ -19,6 +19,6 @@ in }; config = mkIf cfg.enable { - pub-solar.core.hibernate.enable = true; + pub-solar.core.hibernation.enable = true; }; } -- 2.44.1 From 6a09979aa56c5cee5b55b8b40d1d97bb89a17a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 17:51:01 +0200 Subject: [PATCH 034/118] Update droppie for x-os rename --- hosts/droppie/droppie.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index 1286ea8a..47be886c 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -12,7 +12,7 @@ in config = { hardware.cpu.intel.updateMicrocode = true; - pub-solar.x-os.disk-encryption-active = false; + pub-solar.core.disk-encryption-active = false; security.sudo.extraRules = [ { -- 2.44.1 From dec9e54872064606f3857277ed2f1239eea5411e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 17:51:41 +0200 Subject: [PATCH 035/118] Allow unfree on my branch --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 573deadc..85a39ba6 100644 --- a/flake.nix +++ b/flake.nix @@ -58,7 +58,7 @@ inherit self inputs; channelsConfig = { - # allowUnfree = true; + allowUnfree = true; }; supportedSystems = [ "x86_64-linux" "aarch64-linux" ]; -- 2.44.1 From 043178172b96ad23ef9c62bd406c43652b342bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 18:03:32 +0200 Subject: [PATCH 036/118] Improve help and screen recording keybindings in sway This commit shuffles around some sway keybindings and improves the screen recording experience by adding a small wrapper around `slurp` and `wf-recorder` conveniently called `record-screen`. * `$mod+F5` now reload the sway configuration, * `$mod+Ctrl+r` starts a screen recording (to stop it, go to workspace 7 and kill the process), * `record-screen` and the firefox sharing indicator are both on workspace 7 now, making it the "trash" workspace, * `$mod+F1` and `$mod+Shift+h` now open Firefox with the docs of our repository availabe under `help.local`. * To not infuriate `qMasterPassword` users, that is now available under `$mod+Shift+m` instead of `$mod+F1`. --- doc/book.toml | 2 +- modules/core/networking.nix | 16 ++++++++---- .../sway/config/config.d/applications.conf | 11 +++++--- .../config/config.d/custom-keybindings.conf | 15 +++++++---- modules/sway/config/config.nix | 2 +- modules/sway/default.nix | 1 + pkgs/default.nix | 2 ++ pkgs/psos-docs.nix | 26 +++++++++++++++++++ pkgs/psos.nix | 4 +++ pkgs/record-screen.nix | 10 +++++++ 10 files changed, 74 insertions(+), 15 deletions(-) create mode 100644 pkgs/psos-docs.nix create mode 100644 pkgs/record-screen.nix diff --git a/doc/book.toml b/doc/book.toml index 373d26fd..f9dca6a3 100644 --- a/doc/book.toml +++ b/doc/book.toml @@ -3,4 +3,4 @@ authors = ["Timothy DeHerrera"] language = "en" multilingual = false src = "." -title = "devos docs" +title = "PubSolarOS documentation" diff --git a/modules/core/networking.nix b/modules/core/networking.nix index ce3248d8..95db64e3 100644 --- a/modules/core/networking.nix +++ b/modules/core/networking.nix @@ -34,20 +34,26 @@ in # These entries get added to /etc/hosts networking.hosts = { - "127.0.0.1" = [ "cups.local" ]; + "127.0.0.1" = [ "cups.local" "help.local" "caddy.local" ]; }; # Caddy reverse proxy for local services like cups services.caddy = { enable = true; globalConfig = '' + default_bind 127.0.0.1 auto_https off ''; extraConfig = '' - cups.local:80 - bind 127.0.0.1 - request_header Host localhost:631 - reverse_proxy unix//run/cups/cups.sock + cups.local:80 { + request_header Host localhost:631 + reverse_proxy unix//run/cups/cups.sock + } + + help.local:80 { + root * ${pkgs.psos-docs}/lib/html + file_server + } ''; }; }; diff --git a/modules/sway/config/config.d/applications.conf b/modules/sway/config/config.d/applications.conf index 3bab265d..00eecef3 100644 --- a/modules/sway/config/config.d/applications.conf +++ b/modules/sway/config/config.d/applications.conf @@ -14,8 +14,9 @@ assign [app_id="telegramdesktop"] $ws4 # Launcher for_window [app_id="launcher" title="Alacritty"] floating enable, border pixel 10, sticky enable +for_window [app_id="pavucontrol"] floating enable, border pixel 10, sticky enable + # Floating menus -for_window [app_id="pavucontrol"] floating enable for_window [app_id="blueman-manager"] floating enable # Open specific applications in floating mode @@ -60,10 +61,14 @@ for_window [window_type="dialog"] floating enable for_window [window_type="menu"] floating enable for_window [title="About Mozilla Firefox"] floating enable for_window [title="Password Required - Mozilla Firefox"] floating enable -for_window [title="Firefox — Sharing Indicator"] move to workspace $ws7, floating enable -no_focus [title="Firefox — Sharing Indicator"] for_window [title="Extension: (Open in Browser)*"] floating enable +# Technical media stuff happens on ws7 +for_window [app_id="screen-recorder" title="Alacritty"] move to workspace $ws7, floating disable +no_focus [app_id="screen-recorder"] +for_window [title="Firefox — Sharing Indicator"] move to workspace $ws7, floating disable +no_focus [title="Firefox — Sharing Indicator"] + # qMasterPassword floating menu for_window [title="qMasterPassword"] focus for_window [title="qMasterPassword"] floating enable diff --git a/modules/sway/config/config.d/custom-keybindings.conf b/modules/sway/config/config.d/custom-keybindings.conf index bb452ddc..39a0353e 100644 --- a/modules/sway/config/config.d/custom-keybindings.conf +++ b/modules/sway/config/config.d/custom-keybindings.conf @@ -13,21 +13,26 @@ bindsym $mod+Ctrl+m exec pavucontrol ################################################################################################ # Quickstart application shortcuts -bindsym $mod+F1 exec qMasterPassword +bindsym $mod+F1 exec psos help +bindsym $mod+Shift+h exec psos help + bindsym $mod+F2 exec firefox + bindsym $mod+F3 exec $term -e vifm bindsym $mod+Shift+F3 exec gksu $term -e vifm + bindsym $mod+F4 exec nautilus -w bindsym $mod+Shift+F4 exec signal-desktop --use-tray-icon -bindsym $mod+F5 exec $term -e 'mocp -C $XDG_CONFIG_DIR/mocp/config' -bindsym $mod+Shift+m exec mu -bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf -# Screenshofts +bindsym $mod+Shift+m exec qMasterPassword + +# Screenshots and screen recordings bindsym $mod+Ctrl+p exec grim -g "$(slurp -d -b \#ffffff11)" ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png bindsym $mod+Shift+p exec grim ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png bindsym $mod+Ctrl+f exec "( pkill flameshot || true && flameshot & ) && ( sleep 0.5s && flameshot gui )" +bindsym $mod+Ctrl+r exec record-screen + # Launcher set $menu exec alacritty --class launcher -e env TERMINAL_COMMAND="alacritty -e" sway-launcher bindsym $mod+Space exec $menu diff --git a/modules/sway/config/config.nix b/modules/sway/config/config.nix index 8e21ec02..2375d616 100644 --- a/modules/sway/config/config.nix +++ b/modules/sway/config/config.nix @@ -50,7 +50,7 @@ floating_modifier $mod normal # Reload the configuration file - bindsym $mod+Ctrl+r reload + bindsym $mod+F5 reload # # Moving around: diff --git a/modules/sway/default.nix b/modules/sway/default.nix index 35013dd2..b8abb402 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -77,6 +77,7 @@ in swaylock-bg sway-launcher + record-screen import-gtk-settings s wcwd diff --git a/pkgs/default.nix b/pkgs/default.nix index ecac30a3..6d392772 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -9,6 +9,7 @@ with final; { mopidy-jellyfin = import ./mopidy-jellyfin.nix final; mu = writeShellScriptBin "mu" (import ./mu.nix final); psos = writeShellScriptBin "psos" (import ./psos.nix final); + psos-docs = import ./psos-docs.nix final; s = writeShellScriptBin "s" (import ./s.nix final); sway-launcher = writeScriptBin "sway-launcher" (import ./sway-launcher.nix final); sway-service = writeShellScriptBin "sway-service" (import ./sway-service.nix final); @@ -17,6 +18,7 @@ with final; { uhk-agent = import ./uhk-agent.nix final; wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final); drone-docker-runner = writeShellScriptBin "drone-docker-runner" (import ./drone-docker-runner.nix final); + record-screen = writeShellScriptBin "record-screen" (import ./record-screen.nix final); # ps-fixes } diff --git a/pkgs/psos-docs.nix b/pkgs/psos-docs.nix new file mode 100644 index 00000000..112e39bc --- /dev/null +++ b/pkgs/psos-docs.nix @@ -0,0 +1,26 @@ +self: with self; +stdenv.mkDerivation rec { + pname = "psos-docs"; + version = "0.0.1"; + buildInputs = [ + mdbook + mdbook-pdf + ]; + + src = ../docs/..; # wut + + phases = [ "buildPhase" "installPhase" ]; + + buildPhase = '' + cp -r $src/doc ./doc + cp $src/README.md ./README.md + chmod ug+w -R . + ls -la . + mdbook build doc + ''; + + installPhase = '' + mkdir -p $out/lib/ + cp -r doc/book $out/lib/html + ''; +} diff --git a/pkgs/psos.nix b/pkgs/psos.nix index a60bad6d..eb050bfb 100644 --- a/pkgs/psos.nix +++ b/pkgs/psos.nix @@ -14,6 +14,10 @@ self: with self; '' shift; exec nixos-option -I nixpkgs=/etc/nixos/lib/compat $@ ;; + help) + shift; + exec xdg-open http://help.local/ + ;; *) if [[ "$@" != "" ]]; then echo "Unknown command: psos $@" diff --git a/pkgs/record-screen.nix b/pkgs/record-screen.nix new file mode 100644 index 00000000..d8d7f4a3 --- /dev/null +++ b/pkgs/record-screen.nix @@ -0,0 +1,10 @@ +self: with self; '' + mkdir -p "$HOME/Videos/Screenrecordings" + GEOMETRY="$(slurp -d -b \#ffffff11)" + RESOLUTION="$(echo $GEOMETRY | awk '{print $2}')" + FILE_LOCATION="$HOME/Videos/Screenrecordings/$(${coreutils}/bin/date +%Y%m%d_%Hh%Mm%Ss)_$RESOLUTION.mp4" + echo "Recording $GEOMETRY into $FILE_LOCATION" + ${alacritty}/bin/alacritty \ + --class screen-recorder \ + -e ${wf-recorder}/bin/wf-recorder -g "$GEOMETRY" -f "$FILE_LOCATION" +'' -- 2.44.1 From aabe96a3357e35056f7f5a68f023d10ec820ecfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 18:11:25 +0200 Subject: [PATCH 037/118] Fix hibernation config --- modules/core/boot.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/boot.nix b/modules/core/boot.nix index 6f93fabf..1512289c 100644 --- a/modules/core/boot.nix +++ b/modules/core/boot.nix @@ -38,7 +38,7 @@ in }; }; - resumeDevice = mkIf cfg.core.hibernation.enable "/swapfile"; + resumeDevice = mkIf cfg.hibernation.enable "/swapfile"; loader.systemd-boot.enable = true; -- 2.44.1 From c6d78a6ff947152fa5385c6a5246fbd1bd00b91c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 19:23:58 +0200 Subject: [PATCH 038/118] Always keep openssh port open --- modules/core/services.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/core/services.nix b/modules/core/services.nix index 61ba6ea0..ebe3cf70 100644 --- a/modules/core/services.nix +++ b/modules/core/services.nix @@ -4,7 +4,8 @@ # For rage encryption, all hosts need a ssh key pair services.openssh = { enable = true; - openFirewall = lib.mkDefault false; + openFirewall = lib.mkDefault true; + passwordAuthentication = false; }; # Service that makes Out of Memory Killer more effective -- 2.44.1 From 3883f30b74a12f2abbf8729d21a89001a4b3317d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 19:24:12 +0200 Subject: [PATCH 039/118] Use correct sshUser for droppie deployments --- flake.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 85a39ba6..9e0a8209 100644 --- a/flake.nix +++ b/flake.nix @@ -146,7 +146,9 @@ homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { - droppie = { }; + droppie = { + sshUser = "yule"; + }; }; }; } -- 2.44.1 From ba6dfdcf533c690333b4fc31e76a41d722b0ff8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 19:48:45 +0200 Subject: [PATCH 040/118] Fix sway mode_system config import --- modules/sway/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sway/default.nix b/modules/sway/default.nix index 469e5cfb..dd0e6055 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -98,7 +98,7 @@ in xdg.configFile."sway/config.d/theme.conf".source = ./config/config.d/theme.conf; xdg.configFile."sway/config.d/gaps.conf".source = ./config/config.d/gaps.conf; xdg.configFile."sway/config.d/custom-keybindings.conf".source = ./config/config.d/custom-keybindings.conf; - xdg.configFile."sway/config.d/mode_system.conf".text = import ./config/config.d/mode_system.config.nix { inherit psCfg; }; + xdg.configFile."sway/config.d/mode_system.conf".text = import ./config/config.d/mode_system.conf.nix { inherit psCfg; }; xdg.configFile."sway/config.d/applications.conf".source = ./config/config.d/applications.conf; xdg.configFile."sway/config.d/systemd.conf".source = ./config/config.d/systemd.conf; }; -- 2.44.1 From 46992c46d6521dd74c81a937ad1c1465578cbe30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 19:59:01 +0200 Subject: [PATCH 041/118] Add parameter for swapfile offset --- modules/core/boot.nix | 21 +++++++++++- .../sway/config/config.d/mode_system.conf.nix | 32 +++++++++---------- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/modules/core/boot.nix b/modules/core/boot.nix index 1512289c..9df859e2 100644 --- a/modules/core/boot.nix +++ b/modules/core/boot.nix @@ -22,6 +22,18 @@ in default = false; description = "Whether the device can hibernate. This creates a swapfile at /swapfile."; }; + + resumeDevice = mkOption { + type = types.str; + default = "/swapfile"; + description = "The location of the hibernation resume swap file."; + }; + + resumeOffset = mkOption { + type = types.nullOr types.number; + default = null; + description = "The swap file offset. Can be found by running `filefrag -v $swap_file_location`. See https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file"; + }; }; config = { @@ -38,7 +50,14 @@ in }; }; - resumeDevice = mkIf cfg.hibernation.enable "/swapfile"; + + resumeDevice = mkIf cfg.hibernation.enable cfg.hibernation.resumeDevice; + kernelParams = mkIf cfg.hibernation.enable [ + "resume=${cfg.hibernation.resumeDevice}" + ] ++ ( + if (cfg.hibernation.resumeOffset == null) then builtins.abort "config.pub-solar.hibernation.resumeOffset has to be set if config.pub-solar.hibernation.enable is true." + else [ "resume_offset=${cfg.hibernation.resumeOffset}" ] + ); loader.systemd-boot.enable = true; diff --git a/modules/sway/config/config.d/mode_system.conf.nix b/modules/sway/config/config.d/mode_system.conf.nix index ef11a461..c505a9f5 100644 --- a/modules/sway/config/config.d/mode_system.conf.nix +++ b/modules/sway/config/config.d/mode_system.conf.nix @@ -1,21 +1,21 @@ { psCfg, ... }: '' -# Set shut down, restart and locking features -set $mode_system (e)xit, (h)ibernate, (r)eboot, (Shift+s)hutdown -bindsym $mod+0 mode "$mode_system" -mode "$mode_system" { - bindsym e exec swaymsg exit, mode "default" -'' + (if !psCfg.core.allow-hibernation then '' - bindsym h exec systemctl hibernate, mode "default" + # Set shut down, restart and locking features + set $mode_system (e)xit, (h)ibernate, (r)eboot, (Shift+s)hutdown + bindsym $mod+0 mode "$mode_system" + mode "$mode_system" { + bindsym e exec swaymsg exit, mode "default" +'' + (if !psCfg.core.hibernation.enable then '' + bindsym h exec systemctl hibernate, mode "default" '' else "") - + (if !psCfg.paranoia.enable then '' - bindsym l exec swaylock-bg, mode "default" - bindsym s exec systemctl suspend, mode "default" ++ (if !psCfg.paranoia.enable then '' + bindsym l exec swaylock-bg, mode "default" + bindsym s exec systemctl suspend, mode "default" '' else "") + '' - bindsym r exec systemctl reboot, mode "default" - bindsym Shift+s exec systemctl poweroff, mode "default" + bindsym r exec systemctl reboot, mode "default" + bindsym Shift+s exec systemctl poweroff, mode "default" - # exit system mode: "Enter" or "Escape" - bindsym Return mode "default" - bindsym Escape mode "default" -} + # exit system mode: "Enter" or "Escape" + bindsym Return mode "default" + bindsym Escape mode "default" + } '' -- 2.44.1 From f9b7c9e3c9181debb9ad6fe944a4bf94a4d0e0cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 20:09:38 +0200 Subject: [PATCH 042/118] Fix build --- modules/core/boot.nix | 29 --------------------------- modules/core/default.nix | 1 + modules/core/hibernation.nix | 38 ++++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 29 deletions(-) create mode 100644 modules/core/hibernation.nix diff --git a/modules/core/boot.nix b/modules/core/boot.nix index 9df859e2..10f67dc4 100644 --- a/modules/core/boot.nix +++ b/modules/core/boot.nix @@ -16,26 +16,6 @@ in description = "Whether it should be assumed that there is a cryptroot device"; }; - options.pub-solar.core.hibernation = { - enable = mkOption { - type = types.bool; - default = false; - description = "Whether the device can hibernate. This creates a swapfile at /swapfile."; - }; - - resumeDevice = mkOption { - type = types.str; - default = "/swapfile"; - description = "The location of the hibernation resume swap file."; - }; - - resumeOffset = mkOption { - type = types.nullOr types.number; - default = null; - description = "The swap file offset. Can be found by running `filefrag -v $swap_file_location`. See https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file"; - }; - }; - config = { boot = { # Enable plymouth for better experience of booting @@ -50,15 +30,6 @@ in }; }; - - resumeDevice = mkIf cfg.hibernation.enable cfg.hibernation.resumeDevice; - kernelParams = mkIf cfg.hibernation.enable [ - "resume=${cfg.hibernation.resumeDevice}" - ] ++ ( - if (cfg.hibernation.resumeOffset == null) then builtins.abort "config.pub-solar.hibernation.resumeOffset has to be set if config.pub-solar.hibernation.enable is true." - else [ "resume_offset=${cfg.hibernation.resumeOffset}" ] - ); - loader.systemd-boot.enable = true; # Use latest LTS linux kernel by default diff --git a/modules/core/default.nix b/modules/core/default.nix index 7b168268..80ca4926 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -8,6 +8,7 @@ in { imports = [ ./boot.nix + ./hibernation.nix ./fonts.nix ./i18n.nix ./networking.nix diff --git a/modules/core/hibernation.nix b/modules/core/hibernation.nix new file mode 100644 index 00000000..c0e912f1 --- /dev/null +++ b/modules/core/hibernation.nix @@ -0,0 +1,38 @@ +{ config, pkgs, lib, ... }: +with lib; +let + cfg = config.pub-solar.core.hibernation; +in +{ + options.pub-solar.core.hibernation = { + enable = mkOption { + type = types.bool; + default = false; + description = "Whether the device can hibernate. This creates a swapfile at /swapfile."; + }; + + resumeDevice = mkOption { + type = types.str; + default = "/swapfile"; + description = "The location of the hibernation resume swap file."; + }; + + resumeOffset = mkOption { + type = types.nullOr types.int; + default = null; + description = "The swap file offset. Can be found by running `filefrag -v $swap_file_location`. See https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file"; + }; + }; + + config = { + boot = mkIf cfg.enable { + resumeDevice = cfg.resumeDevice; + kernelParams = [ + "resume=${cfg.resumeDevice}" + ] ++ ( + if (cfg.resumeOffset == null && cfg.enable) then builtins.abort "config.pub-solar.resumeOffset has to be set if config.pub-solar.enable is true." + else [ "resume_offset=${cfg.resumeOffset}" ] + ); + }; + }; +} -- 2.44.1 From acab42eaef298b20f2de801cab03458bffe76ad7 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 20:11:10 +0200 Subject: [PATCH 043/118] Add ssh-tunnel systemd unit to enable backups from IPv4-only to IPv6-only host --- hosts/droppie/droppie.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index 47be886c..8918cde2 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -25,5 +25,18 @@ in ]; } ]; + + systemd.user.services.ssh-tunnel-cloud-pub-solar = { + unitConfig = { + Description = "Reverse SSH connection to enable backups from IPv4-only to IPv6-only host"; + After = [ "network.target" ]; + }; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.openssh}/bin/ssh -vvv -g -N -T -o 'ServerAliveInterval 10' -o 'ExitOnForwardFailure yes' -R 127.0.0.1:22022:localhost:22 cloud.pub.solar"; + Restart = "always"; + RestartSec = "5s"; + }; + }; }; } -- 2.44.1 From 2ca921b4a3ada5c4eda5908da88ce3776cfe3292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 20:24:50 +0200 Subject: [PATCH 044/118] Fix path in drone runner exec --- modules/ci-runner/default.nix | 6 +++++- pkgs/drone-docker-runner.nix | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/ci-runner/default.nix b/modules/ci-runner/default.nix index 4db42286..1460ab16 100644 --- a/modules/ci-runner/default.nix +++ b/modules/ci-runner/default.nix @@ -20,7 +20,11 @@ in Restart = "always"; }; - path = "${pkgs.git}/bin:${pkgs.nix}/bin:${pkgs.libvirt}/bin"; + path = [ + pkgs.git + pkgs.nix + pkgs.libvirt + ]; wantedBy = [ "multi-user.target" ]; after = [ "network.target" "libvirtd.service" ]; diff --git a/pkgs/drone-docker-runner.nix b/pkgs/drone-docker-runner.nix index cf6dc802..25de349f 100644 --- a/pkgs/drone-docker-runner.nix +++ b/pkgs/drone-docker-runner.nix @@ -6,7 +6,7 @@ self: with self; '' --env=DRONE_RPC_PROTO=$DRONE_RPC_PROTO \ --env=DRONE_RPC_HOST=$DRONE_RPC_HOST \ --env=DRONE_RPC_SECRET=$(${self.libsecret}/bin/secret-tool lookup drone rpc-secret) \ - --env=DRONE_RUNNER_CAPACITY=4 \ + --env=DRONE_RUNNER_CAPACITY=8 \ --env=DRONE_RUNNER_NAME=$(${self.inetutils}/bin/hostname) \ --publish=30010:30010 \ --restart=always \ -- 2.44.1 From 9f886ce51fa7237d3a774ae31594ff44bfc83874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 20:25:12 +0200 Subject: [PATCH 045/118] Working drone-exec-runner --- hosts/chocolatebar/chocolatebar.nix | 1 + secrets/drone-runner-exec-config | Bin 0 -> 2535 bytes secrets/secrets.nix | 2 ++ users/ben/home.nix | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 secrets/drone-runner-exec-config diff --git a/hosts/chocolatebar/chocolatebar.nix b/hosts/chocolatebar/chocolatebar.nix index eb6efd77..a61e4c9d 100644 --- a/hosts/chocolatebar/chocolatebar.nix +++ b/hosts/chocolatebar/chocolatebar.nix @@ -37,6 +37,7 @@ in owner = psCfg.user.name; }; pub-solar.sway.vnc.enable = true; + pub-solar.ci-runner.enable = true; home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable { "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; diff --git a/secrets/drone-runner-exec-config b/secrets/drone-runner-exec-config new file mode 100644 index 0000000000000000000000000000000000000000..0b7e2e90f9870e3a7e0d2c45b6afe91bfe3c335e GIT binary patch literal 2535 zcmXw)NeCnd6^4ZvBb5->@sNX#9>h?NU29jBprO{TrMvc}t0HQ3cWvFZuicef2#6xV z1wD9B5fMBHA!uACn2=!1ArOtrB@kmYIT$dWjHnT34s&~#_x{8CKK?L?u0`d(z0`eH zm7l2EWHG|PwNGE|y7XGxg;!4kXF)U|>V_0J#;nnj92#qMSQUa&d0vTT@}~9rbs1My z5z_l3eUiZJm^)=kxGKE{k>x^FQs4+{aEM#M*|eLKhx`j!$0v0Xy5Q8Tt4SYQXV}T- zxTsqh-4h&mtfR!A)Nm0DQ@h>+3?Z-2J6@PIWCN01jA$ytod$bd5xd&o#M^U~pfkME zRdg(Bn!e!6Ehgb7C(7bJ;d`JFr~wvv@t96kgid&R#E&Fohf9{WRyj@+5W^f77F+O~ zm}jfNmjw10TJb2OWlHf&fPnXmj(F8L6oS4`g;Rt>rya&Q+Te42kFi7`PACMGXNbvF z`-G=mJ+J4*L5uPQg^9qzgik5Bw3SnqUSP=&Q70D$#4!^#q|mKK?N@F{=n8sL*^MaR z0xcc4Z8HY$4%+YK7GT_NJbB6Lh$zf}fDT55f=Br!IT59tq2kCiZOtnlVQw#iJu9W< z?{l&t?IK|DN=O0C)`W;u9D*qQ{j$8Vzc0I)y+9Z%(WRj9pm2g=t<*e zLUHn~sRFD!K^LgbH3Rc6Mmw-6*v~q%WM*jXm(h7=6dS8fHoZyl87OQirDr=zPyDmH z*JYmr;B+AtCr+oz^AMaD1BQoagH`A{cCsT+q(K&x-dt}h0lUR-z1%T1_E?KBsN>j3an!IpeKXwLRezQ z{BesYDUO3ZH!C=$`-G?hn7m|oP}N9?IT@IgYh&JE){vg$G|Vu))Xljt=)j6tLoSaj zLY)t`oa3izwXcJXJpnP-Y@omcK z>{N=jO1?qc3>az&p+)>s7!=<^zMVUEIbbbB*jR)4^8%Y?aLKOO!R zcQ^s8)C!oP(Aff|H(Is}s(NrVQf*B(CW17URS`X|(YcP3TO8lA24O=|Nv?|JC=_RO z7I`-|ms=LCje;*l2IUU1CArv0Vu#w(S10tQHIs(qi(#_(l@}mfvkIWp@Dx}j*O23F zBQ(*Y&9};Ta&g;vk6(9Jw*?35Ho%J9b$O<#}4oBTDu$Nc&bmN;roeEX62% z%HgKI&k&d9#yyGydDrh)cvqU4^<*q7vK+@$mA4(0mqQ40)u@7paTJk2 zF459h1w$d8b3lYpI}}z2Sp~r@oKMXf#B-`cyvqudgypgBm(gPOwxpfVdk5U8#72Yk zJzUB2Xp;^BL_t_}zAvxw5WaNY+AR2~(kV+w{Gg9w&C1XmI#I@O&N78}g|eociDjjE zHd<1Z96(B)2;RmL)^Wmepv56R>?f=}+i`j1T~o`7bcjN6kDr^@Yo~JE5CpH{eOB`WgmFvwkIF_{L4?heEY9nedE~=z5D%N zd-b8G?t7{G^4-L1SNgl!>(BiBmA`H8yYd0sJ$?TN)bOSy-|-dfXNQk|`w9HR?|kx= zJKuZd`5*nVedvYTZcoPU`R1P6o|vC^U24J*B<=X zz51;mzUQC+z4y7-{}BE9Ge7y% literal 0 HcmV?d00001 diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 65b6ed99..dbd43e37 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -42,5 +42,7 @@ in "vnc-cert-chocolatebar.pem".publicKeys = chocolatebarKeys; "vnc-key-chocolatebar.pem".publicKeys = chocolatebarKeys; + "drone-runner-exec-config".publicKeys = allKeys; + "mopidy.conf".publicKeys = allKeys; } diff --git a/users/ben/home.nix b/users/ben/home.nix index 0aff38a7..2298431d 100644 --- a/users/ben/home.nix +++ b/users/ben/home.nix @@ -97,7 +97,7 @@ in mode = "700"; owner = "mopidy"; }; - services.mopidy.extraConfigFiles = [ "/run/secrets/mopidy.conf" ]; + services.mopidy.extraConfigFiles = [ "/run/agenix/mopidy.conf" ]; programs.ssh.extraConfig = " PubkeyAcceptedKeyTypes +ssh-rsa -- 2.44.1 From c5362c045313d983bd571ef4dd6fd5d48d53f31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 20:24:50 +0200 Subject: [PATCH 046/118] Fix path in drone runner exec --- modules/ci-runner/default.nix | 6 +++++- pkgs/drone-docker-runner.nix | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/ci-runner/default.nix b/modules/ci-runner/default.nix index 4db42286..1460ab16 100644 --- a/modules/ci-runner/default.nix +++ b/modules/ci-runner/default.nix @@ -20,7 +20,11 @@ in Restart = "always"; }; - path = "${pkgs.git}/bin:${pkgs.nix}/bin:${pkgs.libvirt}/bin"; + path = [ + pkgs.git + pkgs.nix + pkgs.libvirt + ]; wantedBy = [ "multi-user.target" ]; after = [ "network.target" "libvirtd.service" ]; diff --git a/pkgs/drone-docker-runner.nix b/pkgs/drone-docker-runner.nix index 7d098536..e1773d5a 100644 --- a/pkgs/drone-docker-runner.nix +++ b/pkgs/drone-docker-runner.nix @@ -6,7 +6,7 @@ self: with self; '' --env=DRONE_RPC_PROTO=$DRONE_RPC_PROTO \ --env=DRONE_RPC_HOST=$DRONE_RPC_HOST \ --env=DRONE_RPC_SECRET=$(${self.libsecret}/bin/secret-tool lookup drone rpc-secret) \ - --env=DRONE_RUNNER_CAPACITY=4 \ + --env=DRONE_RUNNER_CAPACITY=8 \ --env=DRONE_RUNNER_NAME=$(${self.inetutils}/bin/hostname) \ --publish=3000:3000 \ --restart=always \ -- 2.44.1 From 14ba7010615ddd723474bb5844ff686f42bfaabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 20:28:18 +0200 Subject: [PATCH 047/118] Don't use libvirt in ci-runner --- modules/ci-runner/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/ci-runner/default.nix b/modules/ci-runner/default.nix index 1460ab16..0e78e55e 100644 --- a/modules/ci-runner/default.nix +++ b/modules/ci-runner/default.nix @@ -23,11 +23,10 @@ in path = [ pkgs.git pkgs.nix - pkgs.libvirt ]; wantedBy = [ "multi-user.target" ]; - after = [ "network.target" "libvirtd.service" ]; + after = [ "network.target" ]; script = ''${pkgs.drone-runner-exec}/bin/drone-runner-exec daemon /run/agenix/drone-runner-exec-config''; }; -- 2.44.1 From 1ea4523bd1be9365649acdf4e676bfe2d40e2b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 14 Aug 2022 20:29:38 +0200 Subject: [PATCH 048/118] Fix droppie backup ssh service and build --- hosts/droppie/droppie.nix | 2 +- pkgs/default.nix | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index 8918cde2..b828d748 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -33,7 +33,7 @@ in }; serviceConfig = { Type = "simple"; - ExecStart = "${pkgs.openssh}/bin/ssh -vvv -g -N -T -o 'ServerAliveInterval 10' -o 'ExitOnForwardFailure yes' -R 127.0.0.1:22022:localhost:22 cloud.pub.solar"; + ExecStart = "${pkgs.openssh}/bin/ssh -vvv -g -N -T -o 'ServerAliveInterval 10' -o 'ExitOnForwardFailure yes' -R 127.0.0.1:22022:localhost:22 root@cloud.pub.solar"; Restart = "always"; RestartSec = "5s"; }; diff --git a/pkgs/default.nix b/pkgs/default.nix index 6e70e217..d308f64e 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -19,9 +19,5 @@ with final; { wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final); drone-docker-runner = writeShellScriptBin "drone-docker-runner" (import ./drone-docker-runner.nix final); record-screen = writeShellScriptBin "record-screen" (import ./record-screen.nix final); - - # ps-fixes - scan2paperless = writeShellScriptBin "scan2paperless" (import ./scan2paperless.nix final); - drone-docker-runner = writeShellScriptBin "drone-docker-runner" (import ./drone-docker-runner.nix final); } -- 2.44.1 From 116f9301c4fe9510d709cac3f5c1914917c01391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 18 Aug 2022 11:54:02 +0200 Subject: [PATCH 049/118] Don't hand over USB devices --- hosts/chocolatebar/virtualisation/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/chocolatebar/virtualisation/default.nix b/hosts/chocolatebar/virtualisation/default.nix index bea0d381..730e5a99 100644 --- a/hosts/chocolatebar/virtualisation/default.nix +++ b/hosts/chocolatebar/virtualisation/default.nix @@ -6,7 +6,7 @@ let createService = import ./create-service.nix; isolateGPU = "rx550x"; - handOverUSBDevices = true; + handOverUSBDevices = false; isolateAnyGPU = isolateGPU != null; in -- 2.44.1 From 284ae0366a9ac506d328bd9319d1536408196837 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 23 Aug 2022 17:03:34 +0200 Subject: [PATCH 050/118] droppie: fix missing systemd wantedBy without this, the systemd service does not start after a reboot --- hosts/droppie/droppie.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index b828d748..0e2fadf3 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -37,6 +37,7 @@ in Restart = "always"; RestartSec = "5s"; }; + wantedBy = [ "multi-user.target" ]; }; }; } -- 2.44.1 From 8a9d83ffb9f64e18ac77c6815cc5b5d9ecc3bdeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Tue, 23 Aug 2022 18:04:21 +0200 Subject: [PATCH 051/118] Add ddclient to droppie --- hosts/chocolatebar/chocolatebar.nix | 4 ++-- hosts/droppie/droppie.nix | 15 +++++++++++++++ secrets/dyndns-droppie.key | 27 +++++++++++++++++++++++++++ secrets/secrets.nix | 12 ++++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 secrets/dyndns-droppie.key diff --git a/hosts/chocolatebar/chocolatebar.nix b/hosts/chocolatebar/chocolatebar.nix index eb6efd77..87fd57dd 100644 --- a/hosts/chocolatebar/chocolatebar.nix +++ b/hosts/chocolatebar/chocolatebar.nix @@ -28,12 +28,12 @@ in age.secrets."vnc-key.pem" = { file = "${self}/secrets/vnc-key-chocolatebar.pem"; - mode = "700"; + mode = "400"; owner = psCfg.user.name; }; age.secrets."vnc-cert.pem" = { file = "${self}/secrets/vnc-cert-chocolatebar.pem"; - mode = "700"; + mode = "400"; owner = psCfg.user.name; }; pub-solar.sway.vnc.enable = true; diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index 0e2fadf3..f16974db 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -39,5 +39,20 @@ in }; wantedBy = [ "multi-user.target" ]; }; + + services.ddclient = { + enable = true; + ipv6 = true; + domains = [ "backup.b12f.io" ]; + server = "ddns.hosting.de"; + use = "web, web=http://checkip6.spdyn.de/, web-skip=''"; + passwordFile = "/run/agenix/dyndns-droppie.key"; + }; + + age.secrets."dyndns-droppie.key" = { + file = "${self}/secrets/dyndns-droppie.key"; + mode = "400"; + owner = "root"; + }; }; } diff --git a/secrets/dyndns-droppie.key b/secrets/dyndns-droppie.key new file mode 100644 index 00000000..d4f7e999 --- /dev/null +++ b/secrets/dyndns-droppie.key @@ -0,0 +1,27 @@ +age-encryption.org/v1 +-> ssh-rsa kFDS0A +lbrJzpCXpf3BJYL80d2vD/b4raoPnUKV0D9Ka9yKb72W3ATfA/Cqq7vpisHRnwyj +3pt1TfrPzti/8ZKDqY/Zw171jQbOF6zW45z4m8yJu4J1LYXh8yYrTR3YPwhPoGYm +eZJWWj2YghqCFC7vdL/wZFjkStxwBGgrJfNOxJBcXOpUX2TOzfdNAgJ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PIQmn +--- IC9SI76EjaFZxQ5odEeIv49n/O8uOdpM6LE1Z7dtHg4 +l%uE\ ?2\&wG&@W~9"^Ɔon^xOIuO21c*m%)#جeI6A/i \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 65b6ed99..68b238d7 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -8,6 +8,9 @@ let chocolatebar-host = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINZT3QrKugNTWNOwYziQnxrT5zFqWQDafWjScDuIpMhN root@chocolatebar"; chocolatebar-user = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDwyNsGCMuyI9x2IxYEbYIL6oYsEfe1wqhHaRxSnK9oc10ge1LJni5o7g6XgryoQpCD9YenImcCxwkKblmlLQ2327uoVC2PUo07li1uT0eIPk0TQoxwp6besFs7/LEzZlgWQsc3gkEXmjk/E0mu0U6z2fkqciJ/ZxWYt9fLP6jBG47U9878rSaZ7k7Ilv6oRA3suArH189k1nerk/tonS4EWXeHZxHh/Eu0tqwmxN/6+g2GicYn6b+MbFQVdQAkctqT5Yz9USm9UKzbaAuZ799u0dJzagHm9JJZOr8r11ENtAkY9kAzRzm3u/ACiSdVzyLdjAK6m0dIPhp3OhedzuHiI6/wRll60tYtQTH1XwUpVbtir3+DT+jwZgO1zH3yL4iNh79kuUo+UEg1ZmGkSZRzSS2vb5qr0J5aSJmCd5sNB7a01PTtSlQPOqSF9PB+UmcLDF7JoKFub0KT/gRZ5neZkXTYQ/Y05qtaaFVlOVISijnm+sLUvKBv6OW8oYXIHBk= ben@chocolatebar"; + droppie-host = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBDuXuPPDXTyJgy4JRwbKcPbawvVB1Il2neyRWb4O5sJ root@nixos"; + droppie-user = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCnYTlTmHCl6LOkexqRR9LqjOoFgt9TQ4VzHQGRHJMzF/AGcDRoqC+pBLFSTzRb5/ikAOsb32XHyKVg4nNdJeQshO11QtDmkCB02D/XcIXxnNQ5A8CztT2az5xJtbbWSdamMnHBLcqLiwoLmXbERpdlt8jNqMHrz+bjCUGYVAFSfc/WdIs6EATJ1eF0VFxv7nUh4qhgStABSwhNsnoYOC/DOBSA9aBP1f5Fz9QHUioPTGi2hRwbTbtFUvTrymPpWVFRApa1zvGXcr4YUCm7ia1ZlZKzRpsPkwLxb8Omm4bGmR0cAVwVhVRySnhpCTwbIBLyw+H8PvKWBBba1NAKyMij root@droppie"; + allKeys = [ bbcom @@ -31,6 +34,13 @@ let chocolatebar-host chocolatebar-user ]; + + droppieKeys = [ + bbcom + + droppie-host + droppie-user + ]; in { "keyfile-biolimo.bin".publicKeys = biolimoKeys; @@ -42,5 +52,7 @@ in "vnc-cert-chocolatebar.pem".publicKeys = chocolatebarKeys; "vnc-key-chocolatebar.pem".publicKeys = chocolatebarKeys; + "dyndns-droppie.key".publicKeys = droppieKeys; + "mopidy.conf".publicKeys = allKeys; } -- 2.44.1 From 2b3a1d827b0f33d7e572b1f3fb3a0ce955c58c07 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 23 Aug 2022 18:23:08 +0200 Subject: [PATCH 052/118] droppie: add missing ddclient username --- hosts/droppie/droppie.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index f16974db..9d431cc7 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, self, ... }: with lib; let psCfg = config.pub-solar; @@ -45,6 +45,7 @@ in ipv6 = true; domains = [ "backup.b12f.io" ]; server = "ddns.hosting.de"; + username = "b12f"; use = "web, web=http://checkip6.spdyn.de/, web-skip=''"; passwordFile = "/run/agenix/dyndns-droppie.key"; }; -- 2.44.1 From d83e408e44f617f7972316754ea23a3492b6c3d6 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 23 Aug 2022 18:58:13 +0200 Subject: [PATCH 053/118] droppie: fix systemd wantedBy without this, the systemd service does not start after a reboot add cloud.pub.solar host key to ssh knownHosts --- hosts/droppie/droppie.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index 9d431cc7..76825ae0 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -26,6 +26,10 @@ in } ]; + services.openssh.knownHosts = { + "cloud.pub.solar".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIABPJSwr9DfnqV0KoL23BcxlWtRxuOqQpnFnCv4SG/LW"; + }; + systemd.user.services.ssh-tunnel-cloud-pub-solar = { unitConfig = { Description = "Reverse SSH connection to enable backups from IPv4-only to IPv6-only host"; @@ -37,7 +41,7 @@ in Restart = "always"; RestartSec = "5s"; }; - wantedBy = [ "multi-user.target" ]; + wantedBy = [ "default.target" ]; }; services.ddclient = { -- 2.44.1 From e380709023ae24a9d9b5c9d1cb38f7f71050825f Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 23 Aug 2022 18:59:18 +0200 Subject: [PATCH 054/118] yule: add cloud.pub.solar public ssh key --- users/yule/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/users/yule/default.nix b/users/yule/default.nix index 10d55ce7..bf1ddcda 100644 --- a/users/yule/default.nix +++ b/users/yule/default.nix @@ -24,6 +24,8 @@ in "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEST9eyAY3nzGYNnqDYfWHu+89LZsOjyKHMqCFvtP7vrgB7F7JbbECjdjAXEOfPDSCVwtMMpq8JJXeRMjpsD0rw= b12f Yubi Backup" "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFro/k4Mgqyh8yV/7Zwjc0dv60ZM7bROBU9JNd99P/4co6fxPt1pJiU/pEz2Dax/HODxgcO+jFZfvPEuLMCeAl0= YubiKey #10593996 PIV Slot 9a teutat3s" + + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKa5elEXgBc2luVBOHVWZisJgt0epFQOercPi0tZzPU root@cloud.pub.solar" ]; }; }; -- 2.44.1 From 1c3667ca367f192425c8ded58687528fea905cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Tue, 23 Aug 2022 19:10:57 +0200 Subject: [PATCH 055/118] Fix user for droppie secret file --- hosts/droppie/droppie.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index 76825ae0..5bb60ada 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -57,7 +57,7 @@ in age.secrets."dyndns-droppie.key" = { file = "${self}/secrets/dyndns-droppie.key"; mode = "400"; - owner = "root"; + owner = psCfg.user.name; }; }; } -- 2.44.1 From b012b8bfa7a05cf786bbf803d45e785029674ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Tue, 23 Aug 2022 23:18:31 +0200 Subject: [PATCH 056/118] Add laurakirst.de --- users/ben/home.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/users/ben/home.nix b/users/ben/home.nix index 0aff38a7..be796133 100644 --- a/users/ben/home.nix +++ b/users/ben/home.nix @@ -63,6 +63,12 @@ in MACs = "hmac-sha2-512-etm@openssh.com"; }; }; + + "laurakirst.de" = { + hostname = "webj4bsux.wh.hosting.zone"; + user = "webj4bsux_36qkrk"; + port = 2244; + }; }; }; -- 2.44.1 From c63c3da345aff2bc1239687abc6729b2bf293b75 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 24 Aug 2022 00:53:38 +0200 Subject: [PATCH 057/118] nix: set nix.package to force overlays/ overrides.nix to apply use nix as default version alias in devshell as well --- modules/core/nix.nix | 2 ++ shell/devos.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/core/nix.nix b/modules/core/nix.nix index 38b70cfc..f7ff5fa4 100644 --- a/modules/core/nix.nix +++ b/modules/core/nix.nix @@ -2,6 +2,8 @@ { nix = { + # Use default version alias for nix package + package = pkgs.nix; # Improve nix store disk usage autoOptimiseStore = true; gc.automatic = true; diff --git a/shell/devos.nix b/shell/devos.nix index bd3399a1..9aefcc6f 100644 --- a/shell/devos.nix +++ b/shell/devos.nix @@ -6,7 +6,7 @@ let cachix editorconfig-checker mdbook - nixUnstable + nix nixpkgs-fmt nvfetcher ; -- 2.44.1 From de40b08d067f88895ca0b89858e338f52d4a04f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Wed, 24 Aug 2022 18:43:11 +0200 Subject: [PATCH 058/118] Fix hibernation The resumeDevice and kernel `resume` parameter were being used wrong. Only `boot.resumeDevice` is necessary, and it should point at the _block device_ that holds the swapfile. If you are running on encrypted volumes, this means you will need to use the name of the *decrypted block device* on which the swapfile sits. --- modules/core/hibernation.nix | 9 +++------ modules/sway/config/config.d/mode_system.conf.nix | 2 +- modules/sway/default.nix | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/core/hibernation.nix b/modules/core/hibernation.nix index c0e912f1..0454d82b 100644 --- a/modules/core/hibernation.nix +++ b/modules/core/hibernation.nix @@ -13,7 +13,7 @@ in resumeDevice = mkOption { type = types.str; - default = "/swapfile"; + default = "/dev/sda1"; description = "The location of the hibernation resume swap file."; }; @@ -27,12 +27,9 @@ in config = { boot = mkIf cfg.enable { resumeDevice = cfg.resumeDevice; - kernelParams = [ - "resume=${cfg.resumeDevice}" - ] ++ ( + kernelParams = if (cfg.resumeOffset == null && cfg.enable) then builtins.abort "config.pub-solar.resumeOffset has to be set if config.pub-solar.enable is true." - else [ "resume_offset=${cfg.resumeOffset}" ] - ); + else [ "resume_offset=${builtins.toString cfg.resumeOffset}" ]; }; }; } diff --git a/modules/sway/config/config.d/mode_system.conf.nix b/modules/sway/config/config.d/mode_system.conf.nix index c505a9f5..f34ecc57 100644 --- a/modules/sway/config/config.d/mode_system.conf.nix +++ b/modules/sway/config/config.d/mode_system.conf.nix @@ -4,7 +4,7 @@ bindsym $mod+0 mode "$mode_system" mode "$mode_system" { bindsym e exec swaymsg exit, mode "default" -'' + (if !psCfg.core.hibernation.enable then '' +'' + (if psCfg.core.hibernation.enable then '' bindsym h exec systemctl hibernate, mode "default" '' else "") + (if !psCfg.paranoia.enable then '' diff --git a/modules/sway/default.nix b/modules/sway/default.nix index 7ef5560e..b237c527 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -95,7 +95,7 @@ in systemd.user.services.waybar = import ./waybar.service.nix { inherit pkgs psCfg; }; systemd.user.targets.sway-session = import ./sway-session.target.nix { inherit pkgs psCfg; }; - systemd.user.services.wayvnc = mkIf cfg.vnc.enable (import ./wayvnc.service.nix pkgs); + systemd.user.services.wayvnc = mkIf psCfg.sway.vnc.enable (import ./wayvnc.service.nix pkgs); xdg.configFile."sway/config".text = import ./config/config.nix { inherit config pkgs; }; xdg.configFile."sway/config.d/colorscheme.conf".source = ./config/config.d/colorscheme.conf; -- 2.44.1 From b7d2a48d4cded88b0f534a2b7c2621728c3144d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Wed, 24 Aug 2022 18:45:34 +0200 Subject: [PATCH 059/118] Fix hibernation for biolimo --- hosts/biolimo/biolimo.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/biolimo/biolimo.nix b/hosts/biolimo/biolimo.nix index 820225ea..1ff4289f 100644 --- a/hosts/biolimo/biolimo.nix +++ b/hosts/biolimo/biolimo.nix @@ -10,6 +10,10 @@ in ]; config = { + pub-solar.paranoia.enable = true; + pub-solar.core.hibernation.resumeDevice = "/dev/dm-0"; + pub-solar.core.hibernation.resumeOffset = 15296512; + hardware.cpu.intel.updateMicrocode = true; networking.firewall.allowedTCPPorts = [ 5000 ]; -- 2.44.1 From dc8257f31fa2fcbadf8baa679cf9141c3ee60c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Wed, 24 Aug 2022 18:43:11 +0200 Subject: [PATCH 060/118] Fix hibernation The resumeDevice and kernel `resume` parameter were being used wrong. Only `boot.resumeDevice` is necessary, and it should point at the _block device_ that holds the swapfile. If you are running on encrypted volumes, this means you will need to use the name of the *decrypted block device* on which the swapfile sits. --- modules/core/hibernation.nix | 9 +++------ modules/sway/config/config.d/mode_system.conf.nix | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/core/hibernation.nix b/modules/core/hibernation.nix index c0e912f1..0454d82b 100644 --- a/modules/core/hibernation.nix +++ b/modules/core/hibernation.nix @@ -13,7 +13,7 @@ in resumeDevice = mkOption { type = types.str; - default = "/swapfile"; + default = "/dev/sda1"; description = "The location of the hibernation resume swap file."; }; @@ -27,12 +27,9 @@ in config = { boot = mkIf cfg.enable { resumeDevice = cfg.resumeDevice; - kernelParams = [ - "resume=${cfg.resumeDevice}" - ] ++ ( + kernelParams = if (cfg.resumeOffset == null && cfg.enable) then builtins.abort "config.pub-solar.resumeOffset has to be set if config.pub-solar.enable is true." - else [ "resume_offset=${cfg.resumeOffset}" ] - ); + else [ "resume_offset=${builtins.toString cfg.resumeOffset}" ]; }; }; } diff --git a/modules/sway/config/config.d/mode_system.conf.nix b/modules/sway/config/config.d/mode_system.conf.nix index c505a9f5..f34ecc57 100644 --- a/modules/sway/config/config.d/mode_system.conf.nix +++ b/modules/sway/config/config.d/mode_system.conf.nix @@ -4,7 +4,7 @@ bindsym $mod+0 mode "$mode_system" mode "$mode_system" { bindsym e exec swaymsg exit, mode "default" -'' + (if !psCfg.core.hibernation.enable then '' +'' + (if psCfg.core.hibernation.enable then '' bindsym h exec systemctl hibernate, mode "default" '' else "") + (if !psCfg.paranoia.enable then '' -- 2.44.1 From 57f608ecde64e26e40f5c6a3f58d6b1028348fc4 Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Wed, 24 Aug 2022 18:19:03 +0200 Subject: [PATCH 061/118] Disable NetworkManager-wait-online system service This service is presumably useful for devices that need to ensure there is an active internet connection before starting other systemd units. This is neither the case for end-user devices as the an active internet connection is only needed after login nor the case for server-like systems as they normally have a static / dhcp-based network configuration which does not require switchable network configuration profiles. --- modules/core/networking.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/core/networking.nix b/modules/core/networking.nix index 95db64e3..ab6f7e3d 100644 --- a/modules/core/networking.nix +++ b/modules/core/networking.nix @@ -23,6 +23,9 @@ in }; }; config = { + # disable NetworkManager-wait-online by default + systemd.services.NetworkManager-wait-online.enable = lib.mkDefault false; + networking.networkmanager = { # Enable networkmanager. REMEMBER to add yourself to group in order to use nm related stuff. enable = true; -- 2.44.1 From 8efc4c2f9e6786c1bf92fbe73f7335412a9c130c Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Wed, 18 May 2022 00:30:24 +0200 Subject: [PATCH 062/118] Use iwd as wifi backend iwd is a lightweight wireless connection backend that was initiated by developers of intel. It is supposed to be faster. --- modules/core/networking.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/core/networking.nix b/modules/core/networking.nix index 95db64e3..60dcfe74 100644 --- a/modules/core/networking.nix +++ b/modules/core/networking.nix @@ -26,6 +26,7 @@ in networking.networkmanager = { # Enable networkmanager. REMEMBER to add yourself to group in order to use nm related stuff. enable = true; + wifi.backend = "iwd"; }; # Customized binary caches list (with fallback to official binary cache) -- 2.44.1 From f7eda8ca1c40214c4361d14ce96174d62ce6233e Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 5 Jun 2022 03:07:50 +0200 Subject: [PATCH 063/118] zsh: bundle plugins within our config --- modules/terminal-life/zsh/default.nix | 57 ++++++++++++++++++++------- 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index 2db8bc41..63da73ca 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -39,21 +39,48 @@ in nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; myip = "dig +short myip.opendns.com @208.67.222.222 2>&1"; }; - zplug = { - enable = true; - plugins = [ - { - name = "plugins/z"; - tags = [ "from:oh-my-zsh" ]; - } - { - name = "romkatv/powerlevel10k"; - tags = [ "as:theme" "depth:1" ]; - } - { name = "zdharma/fast-syntax-highlighting"; } - { name = "chisui/zsh-nix-shell"; } - ]; - }; + plugins = [ + { + # will source ohmyzsh/plugins/z/ + name = "zsh-plugins-z"; + file = "plugins/z/z.sh"; + src = pkgs.fetchFromGitHub { + owner = "ohmyzsh"; + repo = "ohmyzsh"; + rev = "master"; + sha256 = "sha256-NAVotL5RxpS/zKnO+ngMIjv787lqc1dj/c4blQrQcvU="; + }; + } + { + name = "zsh-powerlevel10k"; + file = "powerlevel10k.zsh-theme"; + src = pkgs.fetchFromGitHub { + owner = "romkatv"; + repo = "powerlevel10k"; + rev = "master"; + sha256 = "sha256-0pzkKPdzyQXTe8usaSaM1Iivi2UHQrSJrh5V2pRdiGg="; + }; + } + { + name = "zsh-fast-syntax-highlighting"; + src = pkgs.fetchFromGitHub { + owner = "zdharma"; + repo = "fast-syntax-highlighting"; + rev = "master"; + sha256 = "sha256-uoLrXfq31GvfHO6GTrg7Hus8da2B4SCM1Frc+mRFbFc="; + }; + } + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "master"; + sha256 = "sha256-BjgMhILEL/qdgfno4LR64LSB8n9pC9R+gG7IQWwgyfQ="; + }; + } + ]; initExtra = '' bindkey -v -- 2.44.1 From de03f0f42fbd61968dedf26e761f9f618d20617f Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 17 Jul 2022 16:37:09 +0200 Subject: [PATCH 064/118] zsh: correctly pin plugins to commits instead of branch names, to prevent errors like: error: hash mismatch in fixed-output derivation '/nix/store/n7w9jd46zx4rzy9a24abxv3lcx1ikn1j-source.drv': specified: sha256-0pzkKPdzyQXTe8usaSaM1Iivi2UHQrSJrh5V2pRd0Gg= got: sha256-9vc4cMBCNOmPOyzGwnPeMrXXyQUq4pC9Du3AWl9+Rys= --- modules/terminal-life/zsh/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index 63da73ca..b68a4270 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -47,7 +47,7 @@ in src = pkgs.fetchFromGitHub { owner = "ohmyzsh"; repo = "ohmyzsh"; - rev = "master"; + rev = "249c708ed3a4a7a63d16a6e911a46b6fb9623cbd"; sha256 = "sha256-NAVotL5RxpS/zKnO+ngMIjv787lqc1dj/c4blQrQcvU="; }; } @@ -57,17 +57,18 @@ in src = pkgs.fetchFromGitHub { owner = "romkatv"; repo = "powerlevel10k"; - rev = "master"; - sha256 = "sha256-0pzkKPdzyQXTe8usaSaM1Iivi2UHQrSJrh5V2pRdiGg="; + rev = "2dd6a29e4d7a33bfef10973d6550e087be37ddee"; + sha256 = "sha256-9vc4cMBCNOmPOyzGwnPeMrXXyQUq4pC9Du3AWl9+Rys="; }; } { name = "zsh-fast-syntax-highlighting"; + file = "F-Sy-H.plugin.zsh"; src = pkgs.fetchFromGitHub { - owner = "zdharma"; - repo = "fast-syntax-highlighting"; - rev = "master"; - sha256 = "sha256-uoLrXfq31GvfHO6GTrg7Hus8da2B4SCM1Frc+mRFbFc="; + owner = "z-shell"; + repo = "F-Sy-H"; + rev = "c4bdc485b67b58351a24f21fcac92c9e0232b939"; + sha256 = "sha256-uXBGIdJwubuueNhQRdGxPUi0eJN17cflYAuHTjeQ8FQ="; }; } { @@ -76,7 +77,7 @@ in src = pkgs.fetchFromGitHub { owner = "chisui"; repo = "zsh-nix-shell"; - rev = "master"; + rev = "af6f8a266ea1875b9a3e86e14796cadbe1cfbf08"; sha256 = "sha256-BjgMhILEL/qdgfno4LR64LSB8n9pC9R+gG7IQWwgyfQ="; }; } -- 2.44.1 From 6d1d683b231a13e94bed8fd215cd311fb99b0be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 25 Aug 2022 00:13:23 +0200 Subject: [PATCH 065/118] Fix swayidle command, add hibernation on lid close, fix env The swayidle command in the service was straight up broken, this commit fixes that. Environment Variables set in the `session-variables` file are now correctly imported across the system. This fixes `EDITOR` defaulting to `nano`. --- modules/paranoia/default.nix | 1 + modules/sway/config/config.d/systemd.conf | 2 +- modules/sway/mako.service.nix | 1 - modules/sway/swayidle.service.nix | 20 +++++++++----------- modules/sway/waybar.service.nix | 3 ++- pkgs/sway-service.nix | 2 +- profiles/base-user/session-variables.nix | 18 +++++++++++++++--- 7 files changed, 29 insertions(+), 18 deletions(-) diff --git a/modules/paranoia/default.nix b/modules/paranoia/default.nix index bb319767..699ab13e 100644 --- a/modules/paranoia/default.nix +++ b/modules/paranoia/default.nix @@ -20,5 +20,6 @@ in config = mkIf cfg.enable { pub-solar.core.hibernation.enable = true; + services.logind.lidSwitch = "hibernate"; }; } diff --git a/modules/sway/config/config.d/systemd.conf b/modules/sway/config/config.d/systemd.conf index d6380d41..66759c4f 100644 --- a/modules/sway/config/config.d/systemd.conf +++ b/modules/sway/config/config.d/systemd.conf @@ -5,4 +5,4 @@ # https://github.com/swaywm/sway/wiki/Systemd-integration # Also, import the most important environment variables into the D-Bus and systemd # user environments (e.g. required for screen sharing and Pinentry prompts): -exec "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target; exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemd-cat --identifier=sway sway" +exec "systemctl --user import-environment; systemctl --user start sway-session.target; exec dbus-update-activation-environment --systemd $IMPORT_ENVIRONMENT_ENV_LIST DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemd-cat --identifier=sway sway" diff --git a/modules/sway/mako.service.nix b/modules/sway/mako.service.nix index b155e148..1f210c74 100644 --- a/modules/sway/mako.service.nix +++ b/modules/sway/mako.service.nix @@ -5,7 +5,6 @@ Documentation = [ "man:mako(1)" ]; BindsTo = [ "sway-session.target" ]; After = [ "sway-session.target" ]; - # ConditionEnvironment requires systemd v247 to work correctly ConditionEnvironment = [ "WAYLAND_DISPLAY" ]; }; Service = { diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index 3b87c610..f10675fb 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -10,17 +10,15 @@ Service = { Type = "simple"; Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin"; - ExecStart = if psCfg.paranoia.enable then '' - ${pkgs.swayidle}/bin/swayidle -w \ - timeout 120 'swaymsg "output * dpms off"' \ - timeout 150 'systemctl hibernate' \ - '' else '' - ${pkgs.swayidle}/bin/swayidle -w \ - timeout 600 'swaylock-bg' \ - timeout 900 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock-bg' - ''; + ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ + after-resume 'swaymsg "output * dpms on"' \ + before-sleep 'swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ + timeout 120 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ + timeout 150 'systemctl hibernate' + '' else '' \ + timeout 600 'swaylock-bg' + timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' + ''); }; Install = { WantedBy = [ "sway-session.target" ]; diff --git a/modules/sway/waybar.service.nix b/modules/sway/waybar.service.nix index 98b8ed35..0237612f 100644 --- a/modules/sway/waybar.service.nix +++ b/modules/sway/waybar.service.nix @@ -4,8 +4,9 @@ Description = "Highly customizable Wayland bar for Sway and Wlroots based compositors."; Documentation = "https://github.com/Alexays/Waybar/wiki/"; BindsTo = [ "sway-session.target" ]; - After = [ "graphical-session-pre.target" "network-online.target" ]; + After = [ "sway-session.target" "network-online.target" ]; Wants = [ "graphical-session-pre.target" "network-online.target" "blueman-applet.service" ]; + ConditionEnvironment = [ "WAYLAND_DISPLAY" ]; }; Service = { diff --git a/pkgs/sway-service.nix b/pkgs/sway-service.nix index f0b97ee7..15781a1a 100644 --- a/pkgs/sway-service.nix +++ b/pkgs/sway-service.nix @@ -1,6 +1,6 @@ self: with self; '' # first import environment variables from the login manager - systemctl --user import-environment + systemctl --user import-environment $IMPORT_ENVIRONMENT_ENV_LIST DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP PATH; # then start the service exec systemctl --wait --user start sway.service '' diff --git a/profiles/base-user/session-variables.nix b/profiles/base-user/session-variables.nix index 5bbfa8ee..e922781b 100644 --- a/profiles/base-user/session-variables.nix +++ b/profiles/base-user/session-variables.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: let psCfg = config.pub-solar; wlroots = psCfg.graphical.wayland; @@ -77,10 +77,22 @@ let # TELEMETRY BS VUEDX_TELEMETRY = "off"; }; + + envListNames = lib.attrsets.mapAttrsToList (name: value: name) variables; + + # Here we merge an extra variable into the attrset called FULL_ENV_LIST. + # It's a list of the variable names defined above. + # We can use this to tell `systemctl import-environment` to import the full list above. + variablesWithMeta = lib.attrsets.zipAttrsWith (name: values: builtins.head values) [ + variables + { IMPORT_ENVIRONMENT_ENV_LIST = lib.lists.foldl (a: b: a + " " + b) "IMPORT_ENVIRONMENT_ENV_LIST" envListNames; } + ]; in { home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { - home.sessionVariables = variables; - systemd.user.sessionVariables = variables; + home.sessionVariables = variablesWithMeta; + systemd.user.sessionVariables = variablesWithMeta; }; + + environment.variables = variablesWithMeta; } -- 2.44.1 From f2a44a4b345b1df830c729aa36a902c3a95f6b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 25 Aug 2022 15:17:01 +0200 Subject: [PATCH 066/118] Fix swapfile for chocoaltebar --- hosts/chocolatebar/chocolatebar.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/chocolatebar/chocolatebar.nix b/hosts/chocolatebar/chocolatebar.nix index 87fd57dd..0725a012 100644 --- a/hosts/chocolatebar/chocolatebar.nix +++ b/hosts/chocolatebar/chocolatebar.nix @@ -18,6 +18,9 @@ in rocm-opencl-runtime ]; + pub-solar.core.hibernation.resumeDevice = "/dev/dm-0"; + pub-solar.core.hibernation.resumeOffset = 115075072; + services.openssh.openFirewall = true; networking.firewall.allowedTCPPorts = mkIf psCfg.sway.vnc.enable [ 5901 ]; -- 2.44.1 From 581a88293e31b938419bdb8c64fda2465adc6621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 25 Aug 2022 15:17:17 +0200 Subject: [PATCH 067/118] Import the full environment again --- pkgs/sway-service.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sway-service.nix b/pkgs/sway-service.nix index 15781a1a..2ab84c62 100644 --- a/pkgs/sway-service.nix +++ b/pkgs/sway-service.nix @@ -1,6 +1,6 @@ self: with self; '' # first import environment variables from the login manager - systemctl --user import-environment $IMPORT_ENVIRONMENT_ENV_LIST DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP PATH; + systemctl --user import-environment; # then start the service exec systemctl --wait --user start sway.service '' -- 2.44.1 From dbee2f03e7fb444dde5e7bcbabcf6fbeb5c45cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 25 Aug 2022 15:17:17 +0200 Subject: [PATCH 068/118] Import the full environment again --- pkgs/sway-service.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sway-service.nix b/pkgs/sway-service.nix index 15781a1a..2ab84c62 100644 --- a/pkgs/sway-service.nix +++ b/pkgs/sway-service.nix @@ -1,6 +1,6 @@ self: with self; '' # first import environment variables from the login manager - systemctl --user import-environment $IMPORT_ENVIRONMENT_ENV_LIST DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP PATH; + systemctl --user import-environment; # then start the service exec systemctl --wait --user start sway.service '' -- 2.44.1 From 8fc8ac2d586735b6a697c950b6536746ac1e73e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 25 Aug 2022 15:25:34 +0200 Subject: [PATCH 069/118] Fix service startup for ci-runner --- modules/ci-runner/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ci-runner/default.nix b/modules/ci-runner/default.nix index 0e78e55e..1460ab16 100644 --- a/modules/ci-runner/default.nix +++ b/modules/ci-runner/default.nix @@ -23,10 +23,11 @@ in path = [ pkgs.git pkgs.nix + pkgs.libvirt ]; wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ]; + after = [ "network.target" "libvirtd.service" ]; script = ''${pkgs.drone-runner-exec}/bin/drone-runner-exec daemon /run/agenix/drone-runner-exec-config''; }; -- 2.44.1 From 8be1bd53d3c471b641d3e8ef24811f5305760860 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 4 Jun 2022 23:45:06 +0200 Subject: [PATCH 070/118] wip: first PubSolarOS iso test using the NixOS test suite: https://nixos.org/manual/nixos/stable/index.html#sec-nixos-tests --- .drone.yml | 21 ++++++++++- flake.nix | 6 ++- tests/first-test.nix | 87 +++++++++++++++++++++++++++++++++++++++++++ tests/second-test.nix | 14 +++++++ 4 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 tests/first-test.nix create mode 100644 tests/second-test.nix diff --git a/.drone.yml b/.drone.yml index f54bd8f9..57a0aa1c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -103,10 +103,29 @@ steps: NIX_FLAGS: "--print-build-logs --verbose" commands: - 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS' - - nix $$NIX_FLAGS flake check - nix $$NIX_FLAGS build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel" - nix $$NIX_FLAGS develop --command echo OK +--- +kind: pipeline +type: exec +name: Tests + +steps: + - name: "Tests" + when: + event: + - pull_request + - tag + environment: + NIX_FLAGS: "--print-build-logs --verbose" + commands: + - 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS' + - nix $$NIX_FLAGS build ".#checks.x86_64-linux.customTestFor-PubSolarOS-firstTest" + #- nix $$NIX_FLAGS flake check + #- nix $$NIX_FLAGS develop --command echo OK + #- nix $$NIX_FLAGS develop --command bud --help + --- kind: pipeline type: docker diff --git a/flake.nix b/flake.nix index bf050b2e..b4335a8d 100644 --- a/flake.nix +++ b/flake.nix @@ -102,7 +102,11 @@ imports = [ (digga.lib.importHosts ./hosts) ]; hosts = { /* set host specific properties here */ - PubSolarOS = { }; + PubSolarOS = { + tests = [ + (import ./tests/first-test.nix { pkgs = nixos.legacyPackages.x86_64-linux; lib = nixos.lib; }) + ]; + }; }; importables = rec { profiles = digga.lib.rakeLeaves ./profiles // { diff --git a/tests/first-test.nix b/tests/first-test.nix new file mode 100644 index 00000000..251779a1 --- /dev/null +++ b/tests/first-test.nix @@ -0,0 +1,87 @@ +{ pkgs, lib, ... }: +{ + name = "firstTest"; + + nodes.test-machine = { suites ? null, ... }: { + imports = suites.iso; + + home-manager.users.pub-solar.programs.zsh.shellAliases = { + test-x11 = "glinfo | tee /tmp/test-x11.out && touch /tmp/test-x11-exit-ok"; + test-wayland = "wayland-info | tee /tmp/test-wayland.out && touch /tmp/test-wayland-exit-ok"; + }; + + # source: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/tests/sway.nix + environment = { + # For glinfo and wayland-info: + systemPackages = with pkgs; [ mesa-demos wayland-utils alacritty ]; + # Use a fixed SWAYSOCK path (for swaymsg): + variables = { + "SWAYSOCK" = "/tmp/sway-ipc.sock"; + # TODO: Investigate if we can get hardware acceleration to work (via + # virtio-gpu and Virgil). We currently have to use the Pixman software + # renderer since the GLES2 renderer doesn't work inside the VM (even + # with WLR_RENDERER_ALLOW_SOFTWARE): + # "WLR_RENDERER_ALLOW_SOFTWARE" = "1"; + "WLR_RENDERER" = "pixman"; + }; + + # To help with OCR: + etc."xdg/foot/foot.ini".text = lib.generators.toINI { } { + main = { + font = "inconsolata:size=14"; + }; + colors = rec { + foreground = "000000"; + background = "ffffff"; + regular2 = foreground; + }; + }; + }; + + fonts.fonts = [ pkgs.inconsolata ]; + + # Need to switch to a different GPU driver than the default one (-vga std) so that Sway can launch: + virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ]; + virtualisation.cores = 4; + virtualisation.memorySize = 2048; + }; + + enableOCR = true; + + testScript = '' + import shlex + def swaymsg(command: str, succeed=True): + with machine.nested(f"sending swaymsg {command!r}" + " (allowed to fail)" * (not succeed)): + (machine.succeed if succeed else machine.execute)( + f"su - pub-solar -c {shlex.quote('swaymsg -- ' + command)}" + ) + + + machine.wait_for_unit("multi-user.target") + + # To check the version: + print(machine.succeed("sway --version")) + + # Wait for Sway to complete startup: + machine.wait_for_file("/run/user/1000/wayland-1") + machine.wait_for_file("/tmp/sway-ipc.sock") + + # Start a terminal (foot) on workspace 3: + machine.wait_for_text("1") + machine.send_key("meta_l-3") + machine.sleep(3) + machine.send_key("meta_l-ret") + machine.sleep(10) + machine.send_chars("whoami\n") + machine.sleep(3) + machine.wait_for_text("pub-solar") + machine.send_chars("test-wayland\n") + machine.wait_for_file("/tmp/test-wayland-exit-ok") + print(machine.succeed("cat /tmp/test-wayland.out")) + machine.copy_from_vm("/tmp/test-wayland.out") + machine.sleep(3) + machine.screenshot("foot_wayland_info") + machine.send_key("meta_l-shift-q") + machine.wait_until_fails("pgrep foot") + ''; +} diff --git a/tests/second-test.nix b/tests/second-test.nix new file mode 100644 index 00000000..d6409820 --- /dev/null +++ b/tests/second-test.nix @@ -0,0 +1,14 @@ +{ }: +{ + name = "secondTest"; + + nodes.test-machine2 = { suites ? null, ... }: { + imports = [ + suites.iso + ]; + }; + + testScript = '' + machines[0].systemctl("is-system-running --wait") + ''; +} -- 2.44.1 From 472560e1c1507a664e3b8ef479f28228712464ef Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 20:51:56 +0200 Subject: [PATCH 071/118] Restructure CI: build ISO on each push to main branch tags with v* and t* names trigger a test VM pull requests trigger a basic check building host PubSolarOS --- .drone.yml | 119 ++++++++--------------------------------------------- 1 file changed, 17 insertions(+), 102 deletions(-) diff --git a/.drone.yml b/.drone.yml index 57a0aa1c..986eee5c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,92 +1,3 @@ ---- -kind: pipeline -type: docker -name: Upstreaming - -steps: - - name: "Sync 'devos' branch with upstream" - image: alpine/git - when: - event: - - cron - cron: - - sync-main-with-upstream - environment: - GITEA_SSH_KEY: - from_secret: gitea_ssh_key - commands: - - ./.drone/setup_ssh.sh - - git remote add devos git@git.b12f.io:pub-solar/devos - - git remote set-url origin git@git.b12f.io:pub-solar/os - - git fetch --all - - git checkout -b devos --track origin/devos - - git merge -X theirs devos/main - - git push origin devos - - git remote set-url origin https://git.b12f.io/pub-solar/os.git - - - name: "Sync $BRANCH with upstream" - image: alpine/git - when: - event: - - cron - cron: - - sync-main-with-upstream - - sync-b12f-with-main - - sync-teutat3s-with-main - environment: - GITEA_SSH_KEY: - from_secret: gitea_ssh_key - commands: - - git fetch origin - - git checkout origin/main - - ./.drone/setup_ssh.sh - - git remote set-url origin git@git.b12f.io:pub-solar/os - - git fetch --all - - ./.drone/upstream-branch.sh - - - name: "Open pull request for failed merge" - image: nixery.dev/shell/tea - when: - status: - - failure - event: - - cron - cron: - - sync-main-with-upstream - - sync-b12f-with-main - - sync-teutat3s-with-main - environment: - TEA_CONFIG: - from_secret: tea_config - commands: - - mkdir -p ~/.config/tea - - echo "$$TEA_CONFIG" > ~/.config/tea/config.yml - - tea pulls create --base main --head devos - - - name: "Notify matrix" - image: plugins/matrix - when: - status: - - failure - event: - - cron - cron: - - sync-main-with-upstream - - sync-b12f-with-main - - sync-teutat3s-with-main - settings: - homeserver: https://matrix.pub.solar - roomid: dfQBqwkhIzrFjMSsxy:pub.solar - username: - from_secret: matrix_username - password: - from_secret: matrix_password - template: "Upstreaming {{ build.status }} [{{ build.branch }}#{{ truncate build.commit 8 }}]({{ build.link }}) by {{ build.author }}. [Pull requests](https://git.b12f.io/pub-solar/os/pulls)" - -trigger: - event: - - cron - --- kind: pipeline type: docker @@ -98,11 +9,11 @@ steps: when: event: - pull_request - - tag environment: NIX_FLAGS: "--print-build-logs --verbose" commands: - 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS' + - nix $$NIX_FLAGS flake show - nix $$NIX_FLAGS build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel" - nix $$NIX_FLAGS develop --command echo OK @@ -113,18 +24,19 @@ name: Tests steps: - name: "Tests" - when: - event: - - pull_request - - tag environment: NIX_FLAGS: "--print-build-logs --verbose" commands: - 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS' - nix $$NIX_FLAGS build ".#checks.x86_64-linux.customTestFor-PubSolarOS-firstTest" - #- nix $$NIX_FLAGS flake check - #- nix $$NIX_FLAGS develop --command echo OK - #- nix $$NIX_FLAGS develop --command bud --help + - nix-store --read-log result + - nix $$NIX_FLAGS flake check + - nix $$NIX_FLAGS develop --command echo OK + +trigger: + ref: + - refs/tags/v* + - refs/tags/t* --- kind: pipeline @@ -134,14 +46,15 @@ name: Publish ISO steps: - name: "Build ISO" image: docker.nix-community.org/nixpkgs/nix-flakes:latest + environment: + NIX_FLAGS: "--print-build-logs --verbose" volumes: - name: file-exchange path: /var/nix/iso-cache commands: - | - nix --print-build-logs --verbose \ - build \ - '.#nixosConfigurations.bootstrap.config.system.build.bootstrapIso' + nix $$NIX_FLAGS build \ + '.#nixosConfigurations.bootstrap.config.system.build.bootstrapIso' - cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/ - name: "Publish ISO" @@ -167,8 +80,10 @@ depends_on: - Check trigger: + branch: + - main event: - - tag + - push volumes: - name: file-exchange @@ -176,6 +91,6 @@ volumes: --- kind: signature -hmac: da951ba8ede88996728acfb47846e01880eb0e3b91f66e47848d6c1cc727c5d9 +hmac: f78042286446a0649b61bdd28240caf7650cf995804acb714b92d145fa028bdf ... -- 2.44.1 From 553e23baf9e25a77323b1c06f5e75e37713a4fc0 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 14 Aug 2022 21:40:29 +0200 Subject: [PATCH 072/118] ci: add upload artifacts step --- .drone.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 986eee5c..84ef47c9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,9 +13,8 @@ steps: NIX_FLAGS: "--print-build-logs --verbose" commands: - 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS' - - nix $$NIX_FLAGS flake show + - nix $$NIX_FLAGS develop --command nix flake show - nix $$NIX_FLAGS build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel" - - nix $$NIX_FLAGS develop --command echo OK --- kind: pipeline @@ -33,6 +32,25 @@ steps: - nix $$NIX_FLAGS flake check - nix $$NIX_FLAGS develop --command echo OK + - name: "Upload artifacts" + environment: + TRITON_DONT_SOURCE_PROFILE: 1 + PRIVATE_SSH_KEY: + from_secret: private_ssh_key + MANTA_USER: pub_solar + MANTA_URL: https://eu-central.manta.greenbaum.cloud + MANTA_KEY_ID: "02:ae:79:2b:8f:7f:51:ba:c6:3c:ea:6f:f7:bb:d1:6a" + commands: + - export TARGET_DIR="$${DRONE_REPO}/$${DRONE_BUILD_NUMBER}" + - echo env var TARGET_DIR is set to $$TARGET_DIR + - "mkdir ~/.ssh && chmod 700 ~/.ssh" + - echo "$$PRIVATE_SSH_KEY" > ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519 + - nix flake new --template "git+https://git.greenbaum.cloud/dev/tritonshell?ref=main" ./tritonshell + - git add tritonshell + - cd tritonshell + - nix develop --command mput -p -f ../result/foot_wayland_info.png ~~/public/$${TARGET_DIR} + - nix develop --command mput -p -f ../result/test-wayland.out ~~/public/$${TARGET_DIR} + trigger: ref: - refs/tags/v* @@ -89,8 +107,13 @@ volumes: - name: file-exchange temp: {} +--- +kind: secret +name: private_ssh_key +data: cSWd6rIg8Z51hD+KMenYPX669qb6PWdh9V80Z1YpED68Ffoy73tWEoBjEs2pKUJpcL8qGxMjj5Ot2TAK6iUs5Qnv+ZKmjvvttgVCfKdHE6ULT+aOPdl3PvvKV6VY5iapE7aXmPF5NWuMe4G6OJiA/IP5U4P4hspAUV4/MlAjiLYDNtfJSXpA/5Hv5PvjuTM2RartUdXLdFe5qXfMFlmFKeU6J9jxf0BFY9lwhniOsxTGo6YQmf0fEqRd6i2AeKN58Oevir3H5rKQvDhCAUmPxT8rEHYoG7sgkt4ow+0gWyLuoimetZHHT/0IKbSWpQV9rfgxMa7L9TvN9pe573dKjFcGpJpbUsaL8O7R/Av6APzcNBWwNArMcD7/nSuj/33bppCJfC3IA5KLrRqi2Tt5nVw7Wm5eYX4iloftCBFsuI2Zj3B9eW4wrKy4k/CvP7klinaoyfGrt48Z3K3JCOUnwaZH/4xTE8+V0UeYEfDjU10etVa27I//sxK/yBRNrX3pRXnwQS997/zW8KHhzh7C4BUNkKj9k2qjxFPRKJp3knbfHlEsirfFcPXoDSRlBHpvDqKzNkxtAA== + --- kind: signature -hmac: f78042286446a0649b61bdd28240caf7650cf995804acb714b92d145fa028bdf +hmac: 82e3f3690bafae2ff1962ebc24504275dba0dbca707e14b2a389b31a9f7b57c0 ... -- 2.44.1 From 8feaa494cbafcbd426873fa43b1089cb0354b5ae Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 24 Aug 2022 22:36:53 +0200 Subject: [PATCH 073/118] ci: add matrix notify step, fix ssh key id --- .drone.yml | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 84ef47c9..0f6e6f7a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,7 +39,7 @@ steps: from_secret: private_ssh_key MANTA_USER: pub_solar MANTA_URL: https://eu-central.manta.greenbaum.cloud - MANTA_KEY_ID: "02:ae:79:2b:8f:7f:51:ba:c6:3c:ea:6f:f7:bb:d1:6a" + MANTA_KEY_ID: "5d:5f:3d:22:8d:37:1f:e6:d6:ab:06:18:d9:a2:04:67" commands: - export TARGET_DIR="$${DRONE_REPO}/$${DRONE_BUILD_NUMBER}" - echo env var TARGET_DIR is set to $$TARGET_DIR @@ -56,6 +56,31 @@ trigger: - refs/tags/v* - refs/tags/t* +--- +kind: pipeline +type: docker +name: Notification + +steps: + - name: "Notify matrix" + image: plugins/matrix + settings: + homeserver: https://matrix.pub.solar + roomid: dfQBqwkhIzrFjMSsxy:pub.solar + username: + from_secret: matrix_username + password: + from_secret: matrix_password + template: "Test run status: {{ build.status }}, artifacts uploaded to Manta: https://eu-central.manta.greenbaum.cloud/pub_solar/public/{{ repo.Owner }}/{{ repo.Name }}/{{ build.number }}" + +depends_on: + - Tests + +trigger: + ref: + - refs/tags/v* + - refs/tags/t* + --- kind: pipeline type: docker @@ -107,13 +132,8 @@ volumes: - name: file-exchange temp: {} ---- -kind: secret -name: private_ssh_key -data: cSWd6rIg8Z51hD+KMenYPX669qb6PWdh9V80Z1YpED68Ffoy73tWEoBjEs2pKUJpcL8qGxMjj5Ot2TAK6iUs5Qnv+ZKmjvvttgVCfKdHE6ULT+aOPdl3PvvKV6VY5iapE7aXmPF5NWuMe4G6OJiA/IP5U4P4hspAUV4/MlAjiLYDNtfJSXpA/5Hv5PvjuTM2RartUdXLdFe5qXfMFlmFKeU6J9jxf0BFY9lwhniOsxTGo6YQmf0fEqRd6i2AeKN58Oevir3H5rKQvDhCAUmPxT8rEHYoG7sgkt4ow+0gWyLuoimetZHHT/0IKbSWpQV9rfgxMa7L9TvN9pe573dKjFcGpJpbUsaL8O7R/Av6APzcNBWwNArMcD7/nSuj/33bppCJfC3IA5KLrRqi2Tt5nVw7Wm5eYX4iloftCBFsuI2Zj3B9eW4wrKy4k/CvP7klinaoyfGrt48Z3K3JCOUnwaZH/4xTE8+V0UeYEfDjU10etVa27I//sxK/yBRNrX3pRXnwQS997/zW8KHhzh7C4BUNkKj9k2qjxFPRKJp3knbfHlEsirfFcPXoDSRlBHpvDqKzNkxtAA== - --- kind: signature -hmac: 82e3f3690bafae2ff1962ebc24504275dba0dbca707e14b2a389b31a9f7b57c0 +hmac: b38ea67f7458383c2f7650d86a619efd065b59888d738d4471c83b0a0ad12e3d ... -- 2.44.1 From c2e5d8df3c6f01c58ec07f2bf7ce74c16f2f62f5 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 25 Aug 2022 15:42:33 +0200 Subject: [PATCH 074/118] ci: better matrix notify template message, prefix manta path with ci/ and set target filename for mput --- .drone.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0f6e6f7a..0bebe210 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,15 +41,15 @@ steps: MANTA_URL: https://eu-central.manta.greenbaum.cloud MANTA_KEY_ID: "5d:5f:3d:22:8d:37:1f:e6:d6:ab:06:18:d9:a2:04:67" commands: - - export TARGET_DIR="$${DRONE_REPO}/$${DRONE_BUILD_NUMBER}" + - export TARGET_DIR="ci/$${DRONE_REPO}/$${DRONE_BUILD_NUMBER}" - echo env var TARGET_DIR is set to $$TARGET_DIR - "mkdir ~/.ssh && chmod 700 ~/.ssh" - echo "$$PRIVATE_SSH_KEY" > ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519 - nix flake new --template "git+https://git.greenbaum.cloud/dev/tritonshell?ref=main" ./tritonshell - git add tritonshell - cd tritonshell - - nix develop --command mput -p -f ../result/foot_wayland_info.png ~~/public/$${TARGET_DIR} - - nix develop --command mput -p -f ../result/test-wayland.out ~~/public/$${TARGET_DIR} + - nix develop --command mput -p -f ../result/foot_wayland_info.png ~~/public/$${TARGET_DIR}/foot_wayland_info.png + - nix develop --command mput -p -f ../result/test-wayland.out ~~/public/$${TARGET_DIR}/test-wayland.out trigger: ref: @@ -71,7 +71,7 @@ steps: from_secret: matrix_username password: from_secret: matrix_password - template: "Test run status: {{ build.status }}, artifacts uploaded to Manta: https://eu-central.manta.greenbaum.cloud/pub_solar/public/{{ repo.Owner }}/{{ repo.Name }}/{{ build.number }}" + template: "Test run triggered by tag: {{ build.tag }}. Test run exit status: {{ build.status }}. Artifacts uploaded to Manta: https://eu-central.manta.greenbaum.cloud/pub_solar/public/ci/{{ repo.Owner }}/{{ repo.Name }}/{{ build.number }}/foot_wayland_info.png" depends_on: - Tests @@ -134,6 +134,6 @@ volumes: --- kind: signature -hmac: b38ea67f7458383c2f7650d86a619efd065b59888d738d4471c83b0a0ad12e3d +hmac: c6845bbec339e7ccfdb34889bfd56d25dc2c423eac255eb30f19b8d9e7bf9f1f ... -- 2.44.1 From 61220214356b9d719b0cbddc6e878586c3775e1c Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 27 Aug 2022 13:48:32 +0200 Subject: [PATCH 075/118] Bump flake.lock --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 857bb989..29228dcd 100644 --- a/flake.lock +++ b/flake.lock @@ -42,11 +42,11 @@ ] }, "locked": { - "lastModified": 1657835815, - "narHash": "sha256-CnZszAYpNKydh6N7+xg+eRtWNVoAAGqc6bg+Lpgq1xc=", + "lastModified": 1661329936, + "narHash": "sha256-dafFjAcJPo0SdegK3E+SnTI8CNMgV/bBm/6CeDf82f8=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "54a24f042f93c79f5679f133faddedec61955cf2", + "rev": "ef0e7f41cdf8fae1d2390c4df246c90a364ed8d9", "type": "github" }, "original": { @@ -307,11 +307,11 @@ }, "latest_2": { "locked": { - "lastModified": 1660305968, - "narHash": "sha256-r0X1pZCSEA6mzt5OuTA7nHuLmvnbkwgpFAh1iLIx4GU=", + "lastModified": 1661361016, + "narHash": "sha256-Bjf6ZDnDc6glTwIIItvwfcaeJ5zWFM6GYfPajSArdUY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d", + "rev": "b784c5ae63dd288375af1b4d37b8a27dd8061887", "type": "github" }, "original": { @@ -358,11 +358,11 @@ }, "nixos": { "locked": { - "lastModified": 1660318005, - "narHash": "sha256-g9WCa9lVUmOV6dYRbEPjv/TLOR5hamjeCcKExVGS3OQ=", + "lastModified": 1661427965, + "narHash": "sha256-LJeSDbiebN0/eRt9vyOm+Bxljdsq5ZdalmmTk9Xpp30=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5c211b47aeadcc178c5320afd4e74c7eed5c389f", + "rev": "058de3818577db19d1965c21e2479916a3eaaf95", "type": "github" }, "original": { @@ -378,11 +378,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1657748715, - "narHash": "sha256-WecDwDY/hEcDQYzFnccCNa+5Umht0lfjx/d1qGDy/rQ=", + "lastModified": 1660727616, + "narHash": "sha256-zYTIvdPMYMx/EYqXODAwIIU30RiEHqNHdgarIHuEYZc=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "3323b944d99b026aebfd8de439e001409dde067d", + "rev": "adccd191a0e83039d537e021f19495b7bad546a1", "type": "github" }, "original": { -- 2.44.1 From 242de215d6801d6858fe935d2ef1170651909d49 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 27 Aug 2022 13:49:55 +0200 Subject: [PATCH 076/118] Switch to our digga fork, include upstream PR divnix/digga#455 to fix bootstrap iso builds --- flake.lock | 11 ++++++----- flake.nix | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 29228dcd..794fd6d0 100644 --- a/flake.lock +++ b/flake.lock @@ -143,15 +143,16 @@ "nixpkgs-unstable": "nixpkgs-unstable" }, "locked": { - "lastModified": 1659622306, - "narHash": "sha256-Kpfm2PNs+kZU0W7qcugoPATLG8I2P7FJFGTgsf1LJiU=", - "owner": "divnix", + "lastModified": 1661600857, + "narHash": "sha256-KfQCcTtfvU0PXV4fD9XKIMcKx9lUUR0xWJoBgc12fKE=", + "owner": "pub-solar", "repo": "digga", - "rev": "d1193743a535d7fbbc7f3eda4e51295b10bd4d2c", + "rev": "c902b3ef0aa45cb4f336c390f647bb182c38a221", "type": "github" }, "original": { - "owner": "divnix", + "owner": "pub-solar", + "ref": "fix/bootstrap-iso", "repo": "digga", "type": "github" } diff --git a/flake.nix b/flake.nix index b4335a8d..466d1077 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,7 @@ nixos.url = "github:nixos/nixpkgs/nixos-22.05"; latest.url = "github:nixos/nixpkgs/nixos-unstable"; - digga.url = "github:divnix/digga"; + digga.url = "github:pub-solar/digga/fix/bootstrap-iso"; digga.inputs.nixpkgs.follows = "nixos"; digga.inputs.nixlib.follows = "nixos"; digga.inputs.home-manager.follows = "home"; -- 2.44.1 From 209eed069c066b1ae504ae7e43adc4f4f90bcceb Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 29 Aug 2022 11:53:55 +0200 Subject: [PATCH 077/118] Add comment how to build isoImage --- hosts/bootstrap.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hosts/bootstrap.nix b/hosts/bootstrap.nix index ba509911..7772b0f1 100644 --- a/hosts/bootstrap.nix +++ b/hosts/bootstrap.nix @@ -1,9 +1,6 @@ { profiles, ... }: { - # build with: `nix build '.#nixosConfigurations.bootstrap.config.system.build.bootstrapIso'` - # reachable on the local link via ssh root@fe80::47%eno1 - # where 'eno1' is replaced by your own machine's network - # interface that has the local link to the target machine + # build with: `nix build ".#nixosConfigurations.bootstrap.config.system.build.isoImage"` imports = [ # profiles.networking profiles.users.root # make sure to configure ssh keys -- 2.44.1 From c1b672fe703a46a50dda2bcbca9f021606d41c0f Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 29 Aug 2022 11:55:20 +0200 Subject: [PATCH 078/118] Fix conflicting definition values, force use of our defined value. error: The option 'services.getty.autologinUser' has conflicting definition values: - In '/nix/store/zyh8f18z0m1r9jppvdcdivfvfxg0j3fv-source/nixos/modules/profiles/installation-device.nix': "nixos" - In '/nix/store/w82qigr5jqv9c6jhdrpdwixydk3rmbzw-source/modules/graphical': "pub-solar" --- modules/graphical/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index a506c2ef..ede262b3 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -61,7 +61,7 @@ in }; }; - services.getty.autologinUser = mkIf cfg.autologin.enable "${psCfg.user.name}"; + services.getty.autologinUser = mkIf cfg.autologin.enable (mkForce "${psCfg.user.name}"); qt5 = { enable = true; -- 2.44.1 From 7b5696435a8ec65b4788647c8a3a42f92da58348 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 29 Aug 2022 15:19:07 +0200 Subject: [PATCH 079/118] Fix Build ISO ci step, use '.#nixosConfigurations.bootstrap.config.system.build.isoImage' --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0bebe210..a170d5a2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -97,7 +97,7 @@ steps: commands: - | nix $$NIX_FLAGS build \ - '.#nixosConfigurations.bootstrap.config.system.build.bootstrapIso' + '.#nixosConfigurations.bootstrap.config.system.build.isoImage' - cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/ - name: "Publish ISO" @@ -134,6 +134,6 @@ volumes: --- kind: signature -hmac: c6845bbec339e7ccfdb34889bfd56d25dc2c423eac255eb30f19b8d9e7bf9f1f +hmac: 5d7c0ef5519ffe68189271b18d9084db55c9e14831f95234655f5387f9426db0 ... -- 2.44.1 From 2fa84ab4aae51a50218344e177e9009bb9cbeba1 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 29 Aug 2022 16:47:31 +0200 Subject: [PATCH 080/118] Use more descriptive drone secret names --- .drone.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index a170d5a2..7da733c4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -107,13 +107,13 @@ steps: path: /var/nix/iso-cache settings: host: - from_secret: ssh_host + from_secret: iso_web_ssh_host user: - from_secret: ssh_user + from_secret: iso_web_ssh_user port: - from_secret: ssh_port + from_secret: iso_web_ssh_port key: - from_secret: ssh_key + from_secret: iso_web_ssh_key target: /srv/os source: - /var/nix/iso-cache/*.iso @@ -134,6 +134,6 @@ volumes: --- kind: signature -hmac: 5d7c0ef5519ffe68189271b18d9084db55c9e14831f95234655f5387f9426db0 +hmac: 2b930bb5fe02006203b7c2fae8af75814749e8cec5f976ec0d6e64eae1b0c5db ... -- 2.44.1 From b7ba1b7ba9b87c7a60e3f2fe4772d8579b0ed711 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 1 Sep 2022 14:34:57 +0200 Subject: [PATCH 081/118] Fix hosts rebuilding with ISO config after #125 See: https://github.com/divnix/digga/pull/455#issuecomment-1231789444 Upstream fix found in https://github.com/montchr/dotfield/blob/e1b09712fef297ee6173f7010787cd5b2b574a17/nixos/default.nix#L85-L88 --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 466d1077..41cd4ff2 100644 --- a/flake.nix +++ b/flake.nix @@ -92,7 +92,10 @@ imports = [ (digga.lib.importExportableModules ./modules) ]; modules = [ { lib.our = self.lib; } - digga.nixosModules.bootstrapIso + # FIXME: upstream module causes a huge number of unnecessary + # dependencies to be pulled in for all systems -- many of them are + # graphical. should only be imported as needed. + # digga.nixosModules.bootstrapIso digga.nixosModules.nixConfig home.nixosModules.home-manager agenix.nixosModules.age -- 2.44.1 From d563b1d469a0a8bd2e170f450e8c6e790ee4efb9 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 1 Sep 2022 14:37:14 +0200 Subject: [PATCH 082/118] Fix swaylock-bg, now a bash script - reference jq from pkgs - shellcheck fixes --- pkgs/swaylock-bg.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/swaylock-bg.nix b/pkgs/swaylock-bg.nix index b55c32ae..75bcd7de 100644 --- a/pkgs/swaylock-bg.nix +++ b/pkgs/swaylock-bg.nix @@ -3,18 +3,17 @@ self: with self; '' # swaylock # Make sure we aren't running twice - RUNNING=$(ps -A | grep swaylock | wc -l) - if [ $RUNNING -ne 0 ]; then + RUNNING=$(${procps}/bin/pgrep -c ${swaylock}/bin/swaylock) + if [ "$RUNNING" -ne 0 ]; then exit 0 fi - IMAGE=$XDG_CONFIG_HOME/wallpaper.jpg + IMAGE="$XDG_CONFIG_HOME/wallpaper.jpg" LOCKARGS="" - for OUTPUT in `${sway}/bin/swaymsg -t get_outputs | jq -r '.[].name'` + for OUTPUT in $(${sway}/bin/swaymsg -t get_outputs | ${jq}/bin/jq -r '.[].name') do LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}" - IMAGES="''${IMAGES} ''${IMAGE}" done exec ${swaylock}/bin/swaylock $LOCKARGS '' -- 2.44.1 From 1767dcb0763cbfeed673200602b20e11c465da35 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 1 Sep 2022 14:38:10 +0200 Subject: [PATCH 083/118] Fix swayidle service - add missing \ - reference swaylock-bg script from pkgs --- modules/sway/swayidle.service.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index f10675fb..685d0f1d 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -12,11 +12,11 @@ Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin"; ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ after-resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ + before-sleep '${pkgs.swaylock-bg}/bin/swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ timeout 120 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ timeout 150 'systemctl hibernate' '' else '' \ - timeout 600 'swaylock-bg' + timeout 600 '${pkgs.swaylock-bg}/bin/swaylock-bg' \ timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' ''); }; -- 2.44.1 From 0fbabc23b921fa8ac8ac5647d1ff6b5a360b70c4 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 1 Sep 2022 15:35:04 +0200 Subject: [PATCH 084/118] bootstap: host needs digga's bootstrapIso module --- flake.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flake.nix b/flake.nix index 41cd4ff2..4ac60e8a 100644 --- a/flake.nix +++ b/flake.nix @@ -105,6 +105,11 @@ imports = [ (digga.lib.importHosts ./hosts) ]; hosts = { /* set host specific properties here */ + bootstrap = { + modules = [ + digga.nixosModules.bootstrapIso + ]; + }; PubSolarOS = { tests = [ (import ./tests/first-test.nix { pkgs = nixos.legacyPackages.x86_64-linux; lib = nixos.lib; }) -- 2.44.1 From f230280170931e7089aabd0e8e11760dbe8f35e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 12 Sep 2022 12:14:07 +0200 Subject: [PATCH 085/118] Virtual coming-out I guess they/them from now on pls --- users/ben/.config/mutt/admins@pub.solar.signature | 2 -- users/ben/.config/mutt/b.baedorf@openproject.com.signature | 1 - users/ben/.config/mutt/byb@miom.space.signature | 4 +--- users/ben/.config/mutt/hello@benjaminbaedorf.eu.signature | 4 +--- users/ben/.config/mutt/mail@b12f.io.signature | 4 +--- 5 files changed, 3 insertions(+), 12 deletions(-) diff --git a/users/ben/.config/mutt/admins@pub.solar.signature b/users/ben/.config/mutt/admins@pub.solar.signature index d47e6631..d24a0c1f 100644 --- a/users/ben/.config/mutt/admins@pub.solar.signature +++ b/users/ben/.config/mutt/admins@pub.solar.signature @@ -1,6 +1,4 @@ --- - pub.solar Admins (they/them) MAIL: admins@pub.solar diff --git a/users/ben/.config/mutt/b.baedorf@openproject.com.signature b/users/ben/.config/mutt/b.baedorf@openproject.com.signature index a8a8e333..78caad7b 100644 --- a/users/ben/.config/mutt/b.baedorf@openproject.com.signature +++ b/users/ben/.config/mutt/b.baedorf@openproject.com.signature @@ -1,4 +1,3 @@ --- Benjamin Bädorf Senior Frontend Engineer diff --git a/users/ben/.config/mutt/byb@miom.space.signature b/users/ben/.config/mutt/byb@miom.space.signature index 29f93057..adf5bed3 100644 --- a/users/ben/.config/mutt/byb@miom.space.signature +++ b/users/ben/.config/mutt/byb@miom.space.signature @@ -1,7 +1,5 @@ --- - -Benjamin Bädorf (he/him) +Benjamin Yule Bädorf (they/them) Software Engineer at MiOM 202 MAIL: byb@miom.space diff --git a/users/ben/.config/mutt/hello@benjaminbaedorf.eu.signature b/users/ben/.config/mutt/hello@benjaminbaedorf.eu.signature index d72c2792..149014c1 100644 --- a/users/ben/.config/mutt/hello@benjaminbaedorf.eu.signature +++ b/users/ben/.config/mutt/hello@benjaminbaedorf.eu.signature @@ -1,7 +1,5 @@ --- - -Benjamin Bädorf (he/him) +Benjamin Yule Bädorf (they/them) Software Engineer MAIL: hello@benjaminbaedorf.eu diff --git a/users/ben/.config/mutt/mail@b12f.io.signature b/users/ben/.config/mutt/mail@b12f.io.signature index 3e3e37aa..b12bc7e9 100644 --- a/users/ben/.config/mutt/mail@b12f.io.signature +++ b/users/ben/.config/mutt/mail@b12f.io.signature @@ -1,7 +1,5 @@ --- - -Benjamin Bädorf (he/him) +Benjamin Yule Bädorf (they/them) Software Engineer MAIL: mail@b12f.io -- 2.44.1 From a154e951a58f76a618600ed42a3ed9e7d58d10e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 2 Oct 2022 00:04:29 +0200 Subject: [PATCH 086/118] New yubi main ssh key --- users/yule/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/users/yule/default.nix b/users/yule/default.nix index bf1ddcda..21259c99 100644 --- a/users/yule/default.nix +++ b/users/yule/default.nix @@ -20,7 +20,8 @@ in publicKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmiF8ndGhnx2YAWbPDq14fftAwcJ0xnjJIVTotI12OO4SPX/SwH5Yp8C8Kf002qN9FbFmaONzq3s8TYpej13JubhfsQywNuFKZuZvJeHzmOwxsANW86RVrWT0WZmYx9a/a1TF9rPQpibDVt60wX8yLdExaJc5F1SvIIuyz1kxYpz36wItfR6hcwoLGh1emFCmfCpebJmp3hsrMDTTtTW/YNhyeSZW74ckyvZyjCYtRCJ8uF0ZmOSKRdillv4Ztg8MsUubGn+vaMl6V6x/QuDuehEPoM/3wBx9o22nf+QVbk7S1PC8EdT/K5vskn4/pfR7mDCyQOq1hB4w4Oyn0dsfX pi@ssrtc" - "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOLcgrSOP0EB2PSqMrZWwUeZAME9ffRbUq6CgaGAuIehqVWHWUnHb4LvP6hOiJkpWxwUC/12ml15I90zczqVXig= b12f Yubi Main" + + "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHx4A8rLYmFgTOp1fDGbbONN8SOT0l5wWrUSYFUcVzMPTyfdT23ZVIdVD5yZCySgi/7PSh5mVmyLIZVIXlNrZJg= b12f Yubi Main" "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEST9eyAY3nzGYNnqDYfWHu+89LZsOjyKHMqCFvtP7vrgB7F7JbbECjdjAXEOfPDSCVwtMMpq8JJXeRMjpsD0rw= b12f Yubi Backup" "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFro/k4Mgqyh8yV/7Zwjc0dv60ZM7bROBU9JNd99P/4co6fxPt1pJiU/pEz2Dax/HODxgcO+jFZfvPEuLMCeAl0= YubiKey #10593996 PIV Slot 9a teutat3s" -- 2.44.1 From 46b35da3bfb17ac648c6f9c6dc8d6213022ae419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 2 Oct 2022 01:00:49 +0200 Subject: [PATCH 087/118] Add hensokos ssh key to user yule --- users/yule/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/users/yule/default.nix b/users/yule/default.nix index 21259c99..7e581c4f 100644 --- a/users/yule/default.nix +++ b/users/yule/default.nix @@ -20,11 +20,11 @@ in publicKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmiF8ndGhnx2YAWbPDq14fftAwcJ0xnjJIVTotI12OO4SPX/SwH5Yp8C8Kf002qN9FbFmaONzq3s8TYpej13JubhfsQywNuFKZuZvJeHzmOwxsANW86RVrWT0WZmYx9a/a1TF9rPQpibDVt60wX8yLdExaJc5F1SvIIuyz1kxYpz36wItfR6hcwoLGh1emFCmfCpebJmp3hsrMDTTtTW/YNhyeSZW74ckyvZyjCYtRCJ8uF0ZmOSKRdillv4Ztg8MsUubGn+vaMl6V6x/QuDuehEPoM/3wBx9o22nf+QVbk7S1PC8EdT/K5vskn4/pfR7mDCyQOq1hB4w4Oyn0dsfX pi@ssrtc" + "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHx4A8rLYmFgTOp1fDGbbONN8SOT0l5wWrUSYFUcVzMPTyfdT23ZVIdVD5yZCySgi/7PSh5mVmyLIZVIXlNrZJg= @b12f Yubi Main" + "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEST9eyAY3nzGYNnqDYfWHu+89LZsOjyKHMqCFvtP7vrgB7F7JbbECjdjAXEOfPDSCVwtMMpq8JJXeRMjpsD0rw= @b12f Yubi Backup" - "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHx4A8rLYmFgTOp1fDGbbONN8SOT0l5wWrUSYFUcVzMPTyfdT23ZVIdVD5yZCySgi/7PSh5mVmyLIZVIXlNrZJg= b12f Yubi Main" - "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEST9eyAY3nzGYNnqDYfWHu+89LZsOjyKHMqCFvtP7vrgB7F7JbbECjdjAXEOfPDSCVwtMMpq8JJXeRMjpsD0rw= b12f Yubi Backup" - - "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFro/k4Mgqyh8yV/7Zwjc0dv60ZM7bROBU9JNd99P/4co6fxPt1pJiU/pEz2Dax/HODxgcO+jFZfvPEuLMCeAl0= YubiKey #10593996 PIV Slot 9a teutat3s" + "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFro/k4Mgqyh8yV/7Zwjc0dv60ZM7bROBU9JNd99P/4co6fxPt1pJiU/pEz2Dax/HODxgcO+jFZfvPEuLMCeAl0= YubiKey #10593996 PIV Slot 9a @teutat3s" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII/58A18EtxnLYHu63c/+AyTSkJQSso/VVdHUFGp1CTk cardno:FFFE34353135 @hensoko" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKa5elEXgBc2luVBOHVWZisJgt0epFQOercPi0tZzPU root@cloud.pub.solar" ]; -- 2.44.1 From 612e5e35c0cab9ed9f836d1dc861a815d3921bbe Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 1 Oct 2022 23:12:48 +0200 Subject: [PATCH 088/118] Fix swayidle, lock, waybar menu --- modules/sway/config/config.d/mode_system.conf.nix | 15 +++++++++++---- modules/sway/default.nix | 2 +- modules/sway/swayidle.service.nix | 8 ++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/modules/sway/config/config.d/mode_system.conf.nix b/modules/sway/config/config.d/mode_system.conf.nix index f34ecc57..f01921c4 100644 --- a/modules/sway/config/config.d/mode_system.conf.nix +++ b/modules/sway/config/config.d/mode_system.conf.nix @@ -1,15 +1,22 @@ -{ psCfg, ... }: '' +{ pkgs, psCfg, ... }: '' # Set shut down, restart and locking features +'' + (if psCfg.core.hibernation.enable && !psCfg.paranoia.enable then '' + set $mode_system (e)xit, (h)ibernate, (l)ock, (s)uspend, (r)eboot, (Shift+s)hutdown +'' else if psCfg.paranoia.enable then '' set $mode_system (e)xit, (h)ibernate, (r)eboot, (Shift+s)hutdown +'' else '' + set $mode_system (e)xit, (l)ock, (s)uspend, (r)eboot, (Shift+s)hutdown +'') ++ '' bindsym $mod+0 mode "$mode_system" mode "$mode_system" { bindsym e exec swaymsg exit, mode "default" '' + (if psCfg.core.hibernation.enable then '' - bindsym h exec systemctl hibernate, mode "default" + bindsym h exec systemctl hibernate, mode "default" '' else "") + (if !psCfg.paranoia.enable then '' - bindsym l exec swaylock-bg, mode "default" - bindsym s exec systemctl suspend, mode "default" + bindsym l exec ${pkgs.swaylock-bg}/bin/swaylock-bg, mode "default" + bindsym s exec systemctl suspend, mode "default" '' else "") + '' bindsym r exec systemctl reboot, mode "default" bindsym Shift+s exec systemctl poweroff, mode "default" diff --git a/modules/sway/default.nix b/modules/sway/default.nix index dd0e6055..c173e9ce 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -98,7 +98,7 @@ in xdg.configFile."sway/config.d/theme.conf".source = ./config/config.d/theme.conf; xdg.configFile."sway/config.d/gaps.conf".source = ./config/config.d/gaps.conf; xdg.configFile."sway/config.d/custom-keybindings.conf".source = ./config/config.d/custom-keybindings.conf; - xdg.configFile."sway/config.d/mode_system.conf".text = import ./config/config.d/mode_system.conf.nix { inherit psCfg; }; + xdg.configFile."sway/config.d/mode_system.conf".text = import ./config/config.d/mode_system.conf.nix { inherit pkgs psCfg; }; xdg.configFile."sway/config.d/applications.conf".source = ./config/config.d/applications.conf; xdg.configFile."sway/config.d/systemd.conf".source = ./config/config.d/systemd.conf; }; diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index 685d0f1d..80a04518 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -9,14 +9,14 @@ }; Service = { Type = "simple"; - Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin"; - ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ + Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin:${pkgs.swaylock-bg}/bin:${pkgs.swayidle}/bin"; + ExecStart = ''swayidle -w \ after-resume 'swaymsg "output * dpms on"' \ - before-sleep '${pkgs.swaylock-bg}/bin/swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ + before-sleep 'swaylock-bg' '' + (if psCfg.paranoia.enable then '' \ timeout 120 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ timeout 150 'systemctl hibernate' '' else '' \ - timeout 600 '${pkgs.swaylock-bg}/bin/swaylock-bg' \ + timeout 600 'swaylock-bg' \ timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' ''); }; -- 2.44.1 From 010b76e7df0e5cfdb713318d875456c9e7089a4c Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 2 Oct 2022 01:41:07 +0200 Subject: [PATCH 089/118] Revert "Fix user for droppie secret file" This reverts commit 1c3667ca367f192425c8ded58687528fea905cd7. --- hosts/droppie/droppie.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index 5bb60ada..76825ae0 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -57,7 +57,7 @@ in age.secrets."dyndns-droppie.key" = { file = "${self}/secrets/dyndns-droppie.key"; mode = "400"; - owner = psCfg.user.name; + owner = "root"; }; }; } -- 2.44.1 From 1181cd6feafb4b7a3778fc8dc2a7434bfe2b4b54 Mon Sep 17 00:00:00 2001 From: hensoko Date: Sun, 2 Oct 2022 01:17:34 +0000 Subject: [PATCH 090/118] Improve core module (#132) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/132 Reviewed-by: Benjamin Bädorf --- modules/core/boot.nix | 2 +- modules/core/default.nix | 8 +++--- modules/core/networking.nix | 49 ++++++++++++++++++++++++------------- 3 files changed, 37 insertions(+), 22 deletions(-) diff --git a/modules/core/boot.nix b/modules/core/boot.nix index 10f67dc4..cb16865d 100644 --- a/modules/core/boot.nix +++ b/modules/core/boot.nix @@ -19,7 +19,7 @@ in config = { boot = { # Enable plymouth for better experience of booting - plymouth.enable = true; + plymouth.enable = mkIf (!cfg.lite) (lib.mkDefault true); # Mount / luks device in initrd # Allow fstrim to work on it. diff --git a/modules/core/default.nix b/modules/core/default.nix index 80ca4926..9a3ea0fe 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -29,12 +29,12 @@ in config = { pub-solar = { - audio.enable = lib.mkIf (!cfg.lite) true; - crypto.enable = lib.mkIf (!cfg.lite) true; - devops.enable = lib.mkIf (!cfg.lite) true; + audio.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true); + crypto.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true); + devops.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true); terminal-life = { - enable = true; + enable = lib.mkDefault true; lite = cfg.lite; }; }; diff --git a/modules/core/networking.nix b/modules/core/networking.nix index 5774f7eb..edfef42d 100644 --- a/modules/core/networking.nix +++ b/modules/core/networking.nix @@ -6,6 +6,15 @@ let cfg = config.pub-solar.core; in { options.pub-solar.core = { + enableCaddy = mkOption { + type = types.bool; + default = !cfg.lite; + }; + enableHelp = mkOption { + type = types.bool; + default = !cfg.lite; + }; + binaryCaches = mkOption { type = types.listOf types.str; default = [ ]; @@ -16,11 +25,6 @@ in default = [ ]; description = "Public keys of binary caches."; }; - iwdConfig = mkOption { - type = with types; nullOr (attrsOf (attrsOf (oneOf [ bool int str ]))); - default = null; - description = "Configuratoin of iNet Wireless Daemon."; - }; }; config = { # disable NetworkManager-wait-online by default @@ -38,27 +42,38 @@ in # These entries get added to /etc/hosts networking.hosts = { - "127.0.0.1" = [ "cups.local" "help.local" "caddy.local" ]; + "127.0.0.1" = [ ] + ++ lib.optionals cfg.enableCaddy [ "caddy.local" ] + ++ lib.optionals config.pub-solar.printing.enable [ "cups.local" ] + ++ lib.optionals cfg.enableHelp [ "help.local" ]; }; # Caddy reverse proxy for local services like cups services.caddy = { - enable = true; + enable = cfg.enableCaddy; globalConfig = '' default_bind 127.0.0.1 auto_https off ''; - extraConfig = '' - cups.local:80 { - request_header Host localhost:631 - reverse_proxy unix//run/cups/cups.sock - } + extraConfig = concatStringsSep "\n" [ + (lib.optionalString + config.pub-solar.printing.enable + '' + cups.local:80 { + request_header Host localhost:631 + reverse_proxy unix//run/cups/cups.sock + } + '') - help.local:80 { - root * ${pkgs.psos-docs}/lib/html - file_server - } - ''; + (lib.optionalString + cfg.enableHelp + '' + help.local:80 { + root * ${pkgs.psos-docs}/lib/html + file_server + } + '') + ]; }; }; } -- 2.44.1 From 633869a8fc722208a3ebd13f7718b004ad07ffce Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 2 Oct 2022 04:08:53 +0200 Subject: [PATCH 091/118] Add another of hensokos ssh keys to user yule --- users/yule/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/users/yule/default.nix b/users/yule/default.nix index 7e581c4f..960f85b3 100644 --- a/users/yule/default.nix +++ b/users/yule/default.nix @@ -25,6 +25,7 @@ in "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFro/k4Mgqyh8yV/7Zwjc0dv60ZM7bROBU9JNd99P/4co6fxPt1pJiU/pEz2Dax/HODxgcO+jFZfvPEuLMCeAl0= YubiKey #10593996 PIV Slot 9a @teutat3s" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII/58A18EtxnLYHu63c/+AyTSkJQSso/VVdHUFGp1CTk cardno:FFFE34353135 @hensoko" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAqkqMYgncrnczcW/0PY+Z+FmNXXpgw6D9JWTTwiainy hensoko@hensoko-tp-work" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKa5elEXgBc2luVBOHVWZisJgt0epFQOercPi0tZzPU root@cloud.pub.solar" ]; -- 2.44.1 From e80195849422055e52d3e447cb92428cc88fca19 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 2 Oct 2022 04:10:50 +0200 Subject: [PATCH 092/118] Update inputs in flake.lock --- flake.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index 794fd6d0..4e02f07a 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1652712410, - "narHash": "sha256-hMJ2TqLt0DleEnQFGUHK9sV2aAzJPU8pZeiZoqRozbE=", + "lastModified": 1664140963, + "narHash": "sha256-pFxDtOLduRFlol0Y4ShE+soRQX4kbhaCNBtDOvx7ykw=", "owner": "ryantm", "repo": "agenix", - "rev": "7e5e58b98c3dcbf497543ff6f22591552ebfe65b", + "rev": "6acb1fe5f8597d5ce63fc82bc7fcac7774b1cdf0", "type": "github" }, "original": { @@ -42,11 +42,11 @@ ] }, "locked": { - "lastModified": 1661329936, - "narHash": "sha256-dafFjAcJPo0SdegK3E+SnTI8CNMgV/bBm/6CeDf82f8=", + "lastModified": 1664210064, + "narHash": "sha256-df6nKVZe/yAhmJ9csirTPahc0dldwm3HBhCVNA6qWr0=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "ef0e7f41cdf8fae1d2390c4df246c90a364ed8d9", + "rev": "02d2551c927b7d65ded1b3c7cd13da5cc7ae3fcf", "type": "github" }, "original": { @@ -192,11 +192,11 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1648199409, - "narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=", + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", "owner": "edolstra", "repo": "flake-compat", - "rev": "64a525ee38886ab9028e6f61790de0832aa3ef03", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", "type": "github" }, "original": { @@ -256,11 +256,11 @@ }, "flake-utils_3": { "locked": { - "lastModified": 1649676176, - "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "owner": "numtide", "repo": "flake-utils", - "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "type": "github" }, "original": { @@ -308,11 +308,11 @@ }, "latest_2": { "locked": { - "lastModified": 1661361016, - "narHash": "sha256-Bjf6ZDnDc6glTwIIItvwfcaeJ5zWFM6GYfPajSArdUY=", + "lastModified": 1664538465, + "narHash": "sha256-EnlC7dDKX7X1wlnXkB1gmn9rBZQ0J9+biVTZHw//8us=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b784c5ae63dd288375af1b4d37b8a27dd8061887", + "rev": "10ecda252ce1b3b1d6403caeadbcc8f30d5ab796", "type": "github" }, "original": { @@ -329,11 +329,11 @@ ] }, "locked": { - "lastModified": 1659610603, - "narHash": "sha256-LYgASYSPYo7O71WfeUOaEUzYfzuXm8c8eavJcel+pfI=", + "lastModified": 1662220400, + "narHash": "sha256-9o2OGQqu4xyLZP9K6kNe1pTHnyPz0Wr3raGYnr9AIgY=", "owner": "nmattia", "repo": "naersk", - "rev": "c6a45e4277fa58abd524681466d3450f896dc094", + "rev": "6944160c19cb591eb85bbf9b2f2768a935623ed3", "type": "github" }, "original": { @@ -359,11 +359,11 @@ }, "nixos": { "locked": { - "lastModified": 1661427965, - "narHash": "sha256-LJeSDbiebN0/eRt9vyOm+Bxljdsq5ZdalmmTk9Xpp30=", + "lastModified": 1664594436, + "narHash": "sha256-YHowMADGzdi7fKnGlg47qe0PIljq+11VqLarmXDuKxQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "058de3818577db19d1965c21e2479916a3eaaf95", + "rev": "9cac45850280978a21a3eb67b15a18f34cbffa2d", "type": "github" }, "original": { @@ -394,11 +394,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1660407119, - "narHash": "sha256-04lWO0pDbhAXFdL4v2VzzwgxrZ5IefKn+TmZPiPeKxg=", + "lastModified": 1664628729, + "narHash": "sha256-A1J0ZPhBfZZiWI6ipjKJ8+RpMllzOMu/An/8Tk3t4oo=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "12620020f76b1b5d2b0e6fbbda831ed4f5fe56e1", + "rev": "3024c67a2e9a35450558426c42e7419ab37efd95", "type": "github" }, "original": { @@ -460,11 +460,11 @@ ] }, "locked": { - "lastModified": 1654975372, - "narHash": "sha256-wkNZ16akgKViuZzE/IM+bux4uaJ04KIwUeexH8gBjgw=", + "lastModified": 1664550666, + "narHash": "sha256-eXfMRd9uItEp3PsYI31FSVGPG9dVC6yF++65ZrGwW8A=", "owner": "berberman", "repo": "nvfetcher", - "rev": "d4b237c10f14f72f8266b0f658faad822e491e55", + "rev": "9763ad40d59a044e90726653d9253efaeeb053b2", "type": "github" }, "original": { -- 2.44.1 From 986680cc26e75217b9365935f379581b84b26007 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 2 Oct 2022 23:59:08 +0200 Subject: [PATCH 093/118] bootstrap iso: add PubSolarOS naming, drone pipeline adjustments to include a symlink to the latest iso built --- .drone.yml | 13 +++++++++-- hosts/bootstrap.nix | 48 +++++++++++++++++++++++++++++++--------- modules/core/default.nix | 9 ++++---- 3 files changed, 52 insertions(+), 18 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7da733c4..b9718b8c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -98,7 +98,14 @@ steps: - | nix $$NIX_FLAGS build \ '.#nixosConfigurations.bootstrap.config.system.build.isoImage' - - cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/ + - cp $(readlink -f result)/iso/PubSolarOS*.iso /var/nix/iso-cache/ + - nix shell nixpkgs#findutils + - cd /var/nix/iso-cache/ + - export ISO_NAME=$(find . -name '*.iso' -printf "%f\n") + - sha256sum $ISO_NAME > $ISO_NAME.sha256 + - ln -s $ISO_NAME PubSolarOS-latest.iso + - cp $ISO_NAME.sha256 PubSolarOS-latest.iso.sha256 + - nix run nixpkgs#gnused -- --in-place "s/$ISO_NAME/PubSolarOS-latest.iso/" PubSolarOS-latest.iso.sha256 - name: "Publish ISO" image: appleboy/drone-scp @@ -117,6 +124,8 @@ steps: target: /srv/os source: - /var/nix/iso-cache/*.iso + - /var/nix/iso-cache/*.iso.sha256 + overwrite: true strip_components: 3 depends_on: @@ -134,6 +143,6 @@ volumes: --- kind: signature -hmac: 2b930bb5fe02006203b7c2fae8af75814749e8cec5f976ec0d6e64eae1b0c5db +hmac: 7b0b56a97294cd563eee2bde56abeea6dd0928e01729980a25f8c165a3f6e0f6 ... diff --git a/hosts/bootstrap.nix b/hosts/bootstrap.nix index 7772b0f1..49422675 100644 --- a/hosts/bootstrap.nix +++ b/hosts/bootstrap.nix @@ -1,4 +1,18 @@ -{ profiles, ... }: +{ config, lib, pkgs, profiles, ... }: +with lib; +let + # Gets hostname of host to be bundled inside iso + # Copied from https://github.com/divnix/digga/blob/30ffa0b02272dc56c94fd3c7d8a5a0f07ca197bf/modules/bootstrap-iso.nix#L3-L11 + getFqdn = config: + let + net = config.networking; + fqdn = + if (net ? domain) && (net.domain != null) + then "${net.hostName}.${net.domain}" + else net.hostName; + in + fqdn; +in { # build with: `nix build ".#nixosConfigurations.bootstrap.config.system.build.isoImage"` imports = [ @@ -10,16 +24,28 @@ profiles.pub-solar-iso ]; - boot.loader.systemd-boot.enable = true; + config = { + boot.loader.systemd-boot.enable = true; - # will be overridden by the bootstrapIso instrumentation - fileSystems."/" = { device = "/dev/disk/by-label/nixos"; }; + # will be overridden by the bootstrapIso instrumentation + fileSystems."/" = { device = "/dev/disk/by-label/nixos"; }; - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "21.05"; # Did you read the comment? + system.nixos.label = "PubSolarOS-" + config.system.nixos.version; + + # mkForce because a similar transformation gets double applied otherwise + # https://github.com/divnix/digga/blob/30ffa0b02272dc56c94fd3c7d8a5a0f07ca197bf/modules/bootstrap-iso.nix#L17 + # https://github.com/NixOS/nixpkgs/blob/aecd4d8349b94f9bd5718c74a5b789f233f67326/nixos/modules/installer/cd-dvd/installation-cd-base.nix#L21-L22 + isoImage = { + isoBaseName = mkForce (getFqdn config); + isoName = mkForce "${config.system.nixos.label}-${config.isoImage.isoBaseName}-${pkgs.stdenv.hostPlatform.system}.iso"; + }; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "21.05"; # Did you read the comment? + }; } diff --git a/modules/core/default.nix b/modules/core/default.nix index 9a3ea0fe..4f74b46d 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -2,7 +2,6 @@ with lib; let - psCfg = config.pub-solar; cfg = config.pub-solar.core; in { @@ -29,12 +28,12 @@ in config = { pub-solar = { - audio.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true); - crypto.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true); - devops.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true); + audio.enable = mkIf (!cfg.lite) (mkDefault true); + crypto.enable = mkIf (!cfg.lite) (mkDefault true); + devops.enable = mkIf (!cfg.lite) (mkDefault true); terminal-life = { - enable = lib.mkDefault true; + enable = mkDefault true; lite = cfg.lite; }; }; -- 2.44.1 From f2ecc2d8b9ee6b5c0cbda2f3e8b5342e714e58b6 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 3 Oct 2022 02:30:08 +0200 Subject: [PATCH 094/118] ci: fix upload target path --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b9718b8c..5e20924e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -121,7 +121,7 @@ steps: from_secret: iso_web_ssh_port key: from_secret: iso_web_ssh_key - target: /srv/os + target: /srv/os/download source: - /var/nix/iso-cache/*.iso - /var/nix/iso-cache/*.iso.sha256 @@ -143,6 +143,6 @@ volumes: --- kind: signature -hmac: 7b0b56a97294cd563eee2bde56abeea6dd0928e01729980a25f8c165a3f6e0f6 +hmac: 8823c7103f6a075bb291a497c7ab5d5db47a91f9bc7d8ef95329b5620c9cf91d ... -- 2.44.1 From ed8543aa16bccd5c1093ed001e05f8b6929a7d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 3 Oct 2022 02:53:40 +0200 Subject: [PATCH 095/118] Use wpa_supplicant for biolimo --- hosts/biolimo/biolimo.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/biolimo/biolimo.nix b/hosts/biolimo/biolimo.nix index 1ff4289f..ae2c5fba 100644 --- a/hosts/biolimo/biolimo.nix +++ b/hosts/biolimo/biolimo.nix @@ -18,6 +18,8 @@ in networking.firewall.allowedTCPPorts = [ 5000 ]; + networking.networkmanager.wifi.backend = "wpa_supplicant"; + home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable { "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; -- 2.44.1 From 0f2a17c81ba57ffaef2527be8c0b03e599d19d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 3 Oct 2022 03:09:12 +0200 Subject: [PATCH 096/118] F1 Droppie --- hosts/droppie/droppie.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/droppie/droppie.nix b/hosts/droppie/droppie.nix index 76825ae0..4e03b6c2 100644 --- a/hosts/droppie/droppie.nix +++ b/hosts/droppie/droppie.nix @@ -13,6 +13,7 @@ in hardware.cpu.intel.updateMicrocode = true; pub-solar.core.disk-encryption-active = false; + pub-solar.core.lite = true; security.sudo.extraRules = [ { @@ -30,7 +31,7 @@ in "cloud.pub.solar".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIABPJSwr9DfnqV0KoL23BcxlWtRxuOqQpnFnCv4SG/LW"; }; - systemd.user.services.ssh-tunnel-cloud-pub-solar = { + systemd.services.ssh-tunnel-cloud-pub-solar = { unitConfig = { Description = "Reverse SSH connection to enable backups from IPv4-only to IPv6-only host"; After = [ "network.target" ]; @@ -38,6 +39,8 @@ in serviceConfig = { Type = "simple"; ExecStart = "${pkgs.openssh}/bin/ssh -vvv -g -N -T -o 'ServerAliveInterval 10' -o 'ExitOnForwardFailure yes' -R 127.0.0.1:22022:localhost:22 root@cloud.pub.solar"; + User = psCfg.user.name; + Group = "users"; Restart = "always"; RestartSec = "5s"; }; -- 2.44.1 From 61417fbd0ed11a71f818e68a94388802c7c1442d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 3 Oct 2022 03:56:53 +0200 Subject: [PATCH 097/118] Fix Droppie wifi --- hosts/biolimo/biolimo.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/biolimo/biolimo.nix b/hosts/biolimo/biolimo.nix index ae2c5fba..e63aa950 100644 --- a/hosts/biolimo/biolimo.nix +++ b/hosts/biolimo/biolimo.nix @@ -18,7 +18,7 @@ in networking.firewall.allowedTCPPorts = [ 5000 ]; - networking.networkmanager.wifi.backend = "wpa_supplicant"; + networking.networkmanager.wifi.backend = mkForce "wpa_supplicant"; home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable { "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; -- 2.44.1 From 8529a15177466a14be333e0fdc83e39f3eb4ee07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 3 Oct 2022 03:57:34 +0200 Subject: [PATCH 098/118] Be more paranoid The paranoia mode now also enables the firewall and closes down a couple of small openSSH holes. `noexec` on the whole FS is left out as it will make every existing PubSolarOS installation panic. --- modules/core/networking.nix | 2 ++ modules/paranoia/default.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/modules/core/networking.nix b/modules/core/networking.nix index edfef42d..c5ec9cbe 100644 --- a/modules/core/networking.nix +++ b/modules/core/networking.nix @@ -36,6 +36,8 @@ in wifi.backend = "iwd"; }; + networking.firewall.enable = true; + # Customized binary caches list (with fallback to official binary cache) nix.binaryCaches = cfg.binaryCaches; nix.binaryCachePublicKeys = cfg.publicKeys; diff --git a/modules/paranoia/default.nix b/modules/paranoia/default.nix index 699ab13e..f5ceaeaf 100644 --- a/modules/paranoia/default.nix +++ b/modules/paranoia/default.nix @@ -21,5 +21,35 @@ in config = mkIf cfg.enable { pub-solar.core.hibernation.enable = true; services.logind.lidSwitch = "hibernate"; + + # The options below are directly taken from or inspired by + # https://xeiaso.net/blog/paranoid-nixos-2021-07-18 + + # Don't set this if you need sftp + services.openssh.allowSFTP = false; + services.openssh.openFirewall = false; # Lock yourself out + + # Limit the use of sudo to the group wheel + security.sudo.execWheelOnly = true; + + # Remove the complete default environment of packages like + # nano, perl and rsync + environment.defaultPackages = lib.mkForce [ ]; + + # fileSystems."/".options = [ "noexec" ]; + + services.openssh = { + enable = true; + openFirewall = false; + passwordAuthentication = false; + kbdInteractiveAuthentication = false; + extraConfig = '' + AllowTcpForwarding yes + X11Forwarding no + AllowAgentForwarding no + AllowStreamLocalForwarding no + AuthenticationMethods publickey + ''; + }; }; } -- 2.44.1 From 6f3885d0caff8d36508080e4db60b4c62616c3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 3 Oct 2022 04:07:48 +0200 Subject: [PATCH 099/118] Remove doubled openssh configs in paranoia module --- modules/paranoia/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/paranoia/default.nix b/modules/paranoia/default.nix index f5ceaeaf..75275a11 100644 --- a/modules/paranoia/default.nix +++ b/modules/paranoia/default.nix @@ -39,8 +39,6 @@ in # fileSystems."/".options = [ "noexec" ]; services.openssh = { - enable = true; - openFirewall = false; passwordAuthentication = false; kbdInteractiveAuthentication = false; extraConfig = '' -- 2.44.1 From b23e1e16a42465ff3905905e43f3265ef8b62846 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 3 Oct 2022 04:11:16 +0200 Subject: [PATCH 100/118] alacritty: improve selection and cursor colors --- modules/graphical/alacritty.nix | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/modules/graphical/alacritty.nix b/modules/graphical/alacritty.nix index e4e2f6ad..b389343c 100644 --- a/modules/graphical/alacritty.nix +++ b/modules/graphical/alacritty.nix @@ -100,10 +100,15 @@ foreground = "0xe3e1e4"; }; - # Colors the cursor will use if `custom_cursor_colors` is true + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. cursor = { - text = "0x1a181a"; - cursor = "0xe3e1e4"; + text = "CellBackground"; + cursor = "CellForeground"; }; # Colors used for the search bar and match highlighting. @@ -115,14 +120,25 @@ background = "0x1a181a"; }; focused_match = { - foreground = "0xe5c463"; - background = "0xe3e1e4"; + foreground = "CellBackground"; + background = "CellForeground"; }; #bar = # background = "#c5c8c6"; # foreground = "#1d1f21"; }; + # Selection colors + # + # Colors which should be used to draw the selection area. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + selection = { + text = "0x1a181a"; + background = "0xf85e84"; + }; + # Normal colors normal = { black = "0x1a181a"; -- 2.44.1 From 5da560ef56cb081b4dd3bae67a3a2e67421487cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 3 Oct 2022 04:55:14 +0200 Subject: [PATCH 101/118] Open up SSH by default --- modules/core/services.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/core/services.nix b/modules/core/services.nix index 61ba6ea0..41aa45e5 100644 --- a/modules/core/services.nix +++ b/modules/core/services.nix @@ -4,7 +4,9 @@ # For rage encryption, all hosts need a ssh key pair services.openssh = { enable = true; - openFirewall = lib.mkDefault false; + # If you don't want the host to have SSH actually opened up to the net, + # set `services.openssh.openFirewall` to false in your config. + openFirewall = lib.mkDefault true; }; # Service that makes Out of Memory Killer more effective -- 2.44.1 From f62a1d30f9ccc514554208287640f147111a52b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 3 Oct 2022 15:51:38 +0200 Subject: [PATCH 102/118] Add inkscape to biolimo --- hosts/biolimo/biolimo.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/hosts/biolimo/biolimo.nix b/hosts/biolimo/biolimo.nix index e63aa950..b02053d1 100644 --- a/hosts/biolimo/biolimo.nix +++ b/hosts/biolimo/biolimo.nix @@ -20,11 +20,17 @@ in networking.networkmanager.wifi.backend = mkForce "wpa_supplicant"; - home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable { - "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; - "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; - "sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; - "sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf; + home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { + xdg.configFile = mkIf psCfg.sway.enable { + "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; + "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; + "sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; + "sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf; + }; + + home.packages = [ + inkscape + ]; }; }; } -- 2.44.1 From f28d05e24eee55396773f165b40d374be795f414 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 5 Oct 2022 11:57:51 +0200 Subject: [PATCH 103/118] Change user.publicKeys to a SSH keys string list --- modules/user/default.nix | 2 +- profiles/base-user/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/user/default.nix b/modules/user/default.nix index 2fd5958e..7c869380 100644 --- a/modules/user/default.nix +++ b/modules/user/default.nix @@ -23,7 +23,7 @@ in }; publicKeys = mkOption { description = "User SSH public keys"; - type = types.listOf types.path; + type = types.listOf types.str; default = [ ]; }; fullName = mkOption { diff --git a/profiles/base-user/default.nix b/profiles/base-user/default.nix index 9ff21c8e..374dca40 100644 --- a/profiles/base-user/default.nix +++ b/profiles/base-user/default.nix @@ -25,7 +25,7 @@ in ]; initialHashedPassword = if psCfg.user.password != null then psCfg.user.password else ""; shell = pkgs.zsh; - openssh.authorizedKeys.keyFiles = if psCfg.user.publicKeys != null then psCfg.user.publicKeys else [ ]; + openssh.authorizedKeys.keys = if psCfg.user.publicKeys != null then psCfg.user.publicKeys else [ ]; }; }; } -- 2.44.1 From d43bd8058058f7d3231b4422997e9a11eb03385b Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 5 Oct 2022 11:58:26 +0200 Subject: [PATCH 104/118] core: disable SSH passwordAuthentication by default --- modules/core/services.nix | 1 + modules/paranoia/default.nix | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/services.nix b/modules/core/services.nix index 41aa45e5..6ce74472 100644 --- a/modules/core/services.nix +++ b/modules/core/services.nix @@ -7,6 +7,7 @@ # If you don't want the host to have SSH actually opened up to the net, # set `services.openssh.openFirewall` to false in your config. openFirewall = lib.mkDefault true; + passwordAuthentication = false; }; # Service that makes Out of Memory Killer more effective diff --git a/modules/paranoia/default.nix b/modules/paranoia/default.nix index 75275a11..2dc439cf 100644 --- a/modules/paranoia/default.nix +++ b/modules/paranoia/default.nix @@ -39,7 +39,6 @@ in # fileSystems."/".options = [ "noexec" ]; services.openssh = { - passwordAuthentication = false; kbdInteractiveAuthentication = false; extraConfig = '' AllowTcpForwarding yes -- 2.44.1 From 87c3630dfb53172dc3129e0edea4b4672aa89c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 17 Oct 2022 15:56:48 +0200 Subject: [PATCH 105/118] Add factorio --- flake.lock | 17 ++++++++ flake.nix | 2 + hosts/chocolatebar/chocolatebar.nix | 16 ++++++-- hosts/chocolatebar/factorio/default.nix | 38 ++++++++++++++++++ .../chocolatebar/factorio/far-reach_1.1.2.zip | Bin 0 -> 48615 bytes overlays/overrides.nix | 5 +++ 6 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 hosts/chocolatebar/factorio/default.nix create mode 100644 hosts/chocolatebar/factorio/far-reach_1.1.2.zip diff --git a/flake.lock b/flake.lock index 805e68ba..7f1c54e8 100644 --- a/flake.lock +++ b/flake.lock @@ -322,6 +322,22 @@ "type": "github" } }, + "master": { + "locked": { + "lastModified": 1665245146, + "narHash": "sha256-OhAD7mOpsfHqz8OR78PirgqF3vB1fgnENYgdasbmaM0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ab92858d678818839843d19050942e841a04abd1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, "naersk": { "inputs": { "nixpkgs": [ @@ -497,6 +513,7 @@ "digga": "digga", "home": "home", "latest": "latest_2", + "master": "master", "naersk": "naersk", "nixos": "nixos", "nixos-generators": "nixos-generators", diff --git a/flake.nix b/flake.nix index 4bb0249f..d4c44813 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ # Track channels with commits tested and built by hydra nixos.url = "github:nixos/nixpkgs/nixos-22.05"; latest.url = "github:nixos/nixpkgs/nixos-unstable"; + master.url = "github:nixos/nixpkgs/master"; pub-solar.url = "github:pub-solar/nixpkgs/fix/use-latest-unstable-yubikey-agent"; digga.url = "github:pub-solar/digga/fix/bootstrap-iso"; @@ -69,6 +70,7 @@ overlays = [ ]; }; latest = { }; + master = { }; }; lib = import ./lib { lib = digga.lib // nixos.lib; }; diff --git a/hosts/chocolatebar/chocolatebar.nix b/hosts/chocolatebar/chocolatebar.nix index 9b55e06f..6819481b 100644 --- a/hosts/chocolatebar/chocolatebar.nix +++ b/hosts/chocolatebar/chocolatebar.nix @@ -8,6 +8,7 @@ in imports = [ ./configuration.nix ./virtualisation + ./factorio ]; config = { @@ -27,6 +28,7 @@ in environment.systemPackages = with pkgs; [ wayvnc drone-docker-runner + stdenv.cc.cc.lib ]; age.secrets."vnc-key.pem" = { @@ -42,10 +44,16 @@ in pub-solar.sway.vnc.enable = true; pub-solar.ci-runner.enable = true; - home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable { - "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; - "sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; - "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; + home-manager.users."${psCfg.user.name}" = { + xdg.configFile = mkIf psCfg.sway.enable { + "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; + "sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; + "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; + }; + + home.sessionVariables = { + NIX_CC = "${pkgs.stdenv.cc}"; + }; }; }; } diff --git a/hosts/chocolatebar/factorio/default.nix b/hosts/chocolatebar/factorio/default.nix new file mode 100644 index 00000000..f7e45255 --- /dev/null +++ b/hosts/chocolatebar/factorio/default.nix @@ -0,0 +1,38 @@ +{ config, pkgs, lib, self, ... }: +with lib; +let + psCfg = config.pub-solar; + xdg = config.home-manager.users."${psCfg.user.name}".xdg; + + far-reach = pkgs.stdenv.mkDerivation rec { + pname = "factorio-far-reach"; + version = "1.1.2"; + src = ./far-reach_1.1.2.zip; + phases = [ "installPhase" ]; + deps = [ ]; + installPhase = '' + mkdir -p $out + cp $src far-reach_1.1.2.zip + ''; + }; +in +{ + config = { + services.factorio = { + enable = true; + port = 34197; # The default, but make it explicit + lan = true; + admins = [ + "doubtwriter" + "scottjive" + ]; + openFirewall = true; + autosave-interval = 3; + game-name = "Babes plays"; + requireUserVerification = false; + mods = [ + far-reach + ]; + }; + }; +} diff --git a/hosts/chocolatebar/factorio/far-reach_1.1.2.zip b/hosts/chocolatebar/factorio/far-reach_1.1.2.zip new file mode 100644 index 0000000000000000000000000000000000000000..4bae7ec8a881d26b522204749be08084d7969d50 GIT binary patch literal 48615 zcmaI6b97}v_cnNA+qQjU+cr8K>&8Y09ox3mv7K~m+wAamoOIkhd1rm|`)19&GqqNo zsyeIoALm)S&ffLxM@A;^Z%UuuLt_)Xl3fk;%aGXZez^B%E1a`Q~O`L z;Q=uEv0CbS!?4s)001`{06_9zcAMLnI$B%WJ6W^3d%KV5%Bya(WA{`9dZ579A+4U;fI-T51ci@+DNUb1{Edl+a5r4ztTn>Kq^`=Gc9@1rQg700B2wwUn9hDpT5$z5Qp6b-i2|V+R)f;^O6j=d-ar_H=}5HK z2R?wfMh1L%0I@N)q8-b2_Q||lv4`G#-m%v7=p+41fpwc=G}6VsLh=l%i8wJ~!oG5x zjN4jc^bS*6!hKl!exljJk~&V|0_IoWY%*85=o$uv7cI+aLdI5^Kfa@`=e(w0rYcg- zi*?UyG|#V-1ajcde8?(OHSmxh{Irx=O?T4}#8HfM=5a1s?k**FAD-H#*D7UL``IrYx-N@l=T+wmIybCfe$&;woDoa-5LXxh1J#2T zxiHhd#UgRTtJLba)5Y^Vj^XU8Irw2-6HdI=Ne^#my$Gi83$~lb2SZjgeYiJ#>{(>N zKglNu?u~pTeY-?F#_E7gzsUbMXNmgJAx5YHft}__H{^ zdC$RvC|9!lG2C-VN2Ru=ZkN`j~JODuS-;S4)qr0n|LX8} za*>tN+H2mbyrXbwsC8tAcjya&l zcztC;?NjSpvyrY$M^C>=Y#QxpIU=2%E~h(+aVs!g+S1_c5P^_}BU{`L4{?|9UcQ9C zmmTf(GWDb*t#yuI&`T@{8LOx0OCMG_%%aw)BrCUwc2HtQk<%2W5O;RC#BdXpO})6< zdeEOUaL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^5Z-P6cPIH5?SJ)>JU5A!f6zF{CjQwa5o}>8E1~~G!-C%*zP-{` z;*u5%+pj@D_{aXAPrw@Hf79HpJsiv&O>OKsoE`t8atJ!ZQ)uJx1|;-J{zs4bpR$TP VD!j8HAYj5@bMOkiwEd&>e*rXLphExv literal 0 HcmV?d00001 diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 243373bc..3471932b 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -21,12 +21,17 @@ channels: final: prev: { tdesktop arduino arduino-cli + steam ; inherit (channels.pub-solar) yubikey-agent ; + inherit (channels.master) + factorio-headless + ; + haskellPackages = prev.haskellPackages.override (old: { -- 2.44.1 From eb287f9850ee412b46ef223e09980e42f114442c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 17 Oct 2022 15:58:03 +0200 Subject: [PATCH 106/118] Add tails VM --- .../virtualisation/create-service.nix | 2 +- hosts/chocolatebar/virtualisation/default.nix | 24 +++ .../chocolatebar/virtualisation/guest-xml.nix | 4 +- .../chocolatebar/virtualisation/tails-xml.nix | 183 ++++++++++++++++++ 4 files changed, 210 insertions(+), 3 deletions(-) create mode 100644 hosts/chocolatebar/virtualisation/tails-xml.nix diff --git a/hosts/chocolatebar/virtualisation/create-service.nix b/hosts/chocolatebar/virtualisation/create-service.nix index 2f174e99..00fd21da 100644 --- a/hosts/chocolatebar/virtualisation/create-service.nix +++ b/hosts/chocolatebar/virtualisation/create-service.nix @@ -15,7 +15,7 @@ in script = let networkXML = pkgs.writeText "network.xml" (import ./network-xml.nix { inherit config; inherit pkgs; inherit lib; }); - machineXML = pkgs.writeText "${vm.name}.xml" (generateXML { inherit config; inherit pkgs; inherit lib; inherit vm; varsFile = varsFile; }); + machineXML = pkgs.writeText "${vm.name}.xml" (vm.generateXML { inherit config; inherit pkgs; inherit lib; inherit vm; varsFile = varsFile; }); in '' echo "Checking if ${vm.name} is already running" diff --git a/hosts/chocolatebar/virtualisation/default.nix b/hosts/chocolatebar/virtualisation/default.nix index 730e5a99..24fa205c 100644 --- a/hosts/chocolatebar/virtualisation/default.nix +++ b/hosts/chocolatebar/virtualisation/default.nix @@ -4,8 +4,11 @@ let psCfg = config.pub-solar; xdg = config.home-manager.users."${psCfg.user.name}".xdg; createService = import ./create-service.nix; + generateXML = import ./guest-xml.nix; + generateTailsXML = import ./tails-xml.nix; isolateGPU = "rx550x"; + memory = 48; # in GB handOverUSBDevices = false; isolateAnyGPU = isolateGPU != null; @@ -31,8 +34,10 @@ in id = "http://microsoft.com/win/10"; gpu = true; mountHome = false; + memory = memory; isolateGPU = isolateGPU; handOverUSBDevices = handOverUSBDevices; + generateXML = generateXML; }; }; vm-manjaro = createService { @@ -45,8 +50,27 @@ in id = "https://manjaro.org/download/#i3"; gpu = true; mountHome = true; + memory = memory; isolateGPU = isolateGPU; handOverUSBDevices = handOverUSBDevices; + generateXML = generateXML; + }; + }; + vm-tails = createService { + inherit config; + inherit pkgs; + inherit lib; + vm = { + name = "tails"; + disk = "/var/lib/vms/tails/tails-amd64-5.4.iso"; + # disk = "/var/lib/vms/nixos/nixos-minimal.iso"; + id = "https://tails.boum.org/install/index.en.html"; + gpu = false; + mountHome = false; + memory = 16; + isolateGPU = isolateGPU; + handOverUSBDevices = false; + generateXML = generateTailsXML; }; }; }; diff --git a/hosts/chocolatebar/virtualisation/guest-xml.nix b/hosts/chocolatebar/virtualisation/guest-xml.nix index 801e0d77..117e4da5 100644 --- a/hosts/chocolatebar/virtualisation/guest-xml.nix +++ b/hosts/chocolatebar/virtualisation/guest-xml.nix @@ -13,8 +13,8 @@ in - 33554432 - 33554432 + ${toString vm.memory} + ${toString vm.memory} 12 diff --git a/hosts/chocolatebar/virtualisation/tails-xml.nix b/hosts/chocolatebar/virtualisation/tails-xml.nix new file mode 100644 index 00000000..5efefb22 --- /dev/null +++ b/hosts/chocolatebar/virtualisation/tails-xml.nix @@ -0,0 +1,183 @@ +{ config, pkgs, lib, vm, varsFile, ... }: +let + psCfg = config.pub-solar; + xdg = config.home-manager.users."${psCfg.user.name}".xdg; + home = config.home-manager.users."${psCfg.user.name}".home; +in +'' + + ${vm.name} + UUID + + + + + + ${toString vm.memory} + ${toString vm.memory} + 8 + + hvm + + + + + + + + + + + + + + destroy + restart + destroy + + + + + + /run/libvirt/nix-emulators/qemu-system-x86_64 + + + + + +

+ + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + +
+ + +
+ + + + + +
+ + + + + + + + + + + +
+ + + +
+ + +
+ + + + + + + + +
+ +