From 411a0e3e74ab36633c9ea32ef64d7b6101b78e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 21 Oct 2021 20:06:57 +0200 Subject: [PATCH 01/58] Add basic ISO setup --- flake.lock | 17 ++++++++++++++++- flake.nix | 2 +- modules/x-os/boot.nix | 8 +++++++- profiles/installed/default.nix | 10 ++++++++++ 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 profiles/installed/default.nix diff --git a/flake.lock b/flake.lock index c9cfb536..488c04da 100644 --- a/flake.lock +++ b/flake.lock @@ -245,6 +245,21 @@ "type": "github" } }, + "flake-utils_3": { + "locked": { + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home": { "inputs": { "nixpkgs": [ @@ -359,7 +374,7 @@ }, "nix-dram": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs" }, "locked": { diff --git a/flake.nix b/flake.nix index 030ff244..a513d8c0 100644 --- a/flake.nix +++ b/flake.nix @@ -129,7 +129,7 @@ }; suites = with profiles; rec { base = [ core users.nixos users.root ]; - pubsolaros = [ core base-user users.root ]; + pubsolaros = [ core installed base-user users.root ]; anonymous = [ pubsolaros users.nixos ]; }; }; diff --git a/modules/x-os/boot.nix b/modules/x-os/boot.nix index 5068590e..131dec8c 100644 --- a/modules/x-os/boot.nix +++ b/modules/x-os/boot.nix @@ -9,6 +9,12 @@ with lib; { type = types.str; description = "Keyfile location"; }; + + pub-solar.x-os.enableBootLoader = mkOption { + type = types.bool; + default = false; + description = "Whether to include the grub bootloader. Turn this off for ISO images."; + }; }; config = { @@ -31,7 +37,7 @@ with lib; { efi.efiSysMountPoint = "/boot/efi"; grub = { - enable = true; + enable = cfg.enableBootLoader; version = 2; device = "nodev"; efiSupport = true; diff --git a/profiles/installed/default.nix b/profiles/installed/default.nix new file mode 100644 index 00000000..322c3093 --- /dev/null +++ b/profiles/installed/default.nix @@ -0,0 +1,10 @@ +{ self, config, lib, pkgs, ... }: +let inherit (lib) fileContents; +in +{ + imports = [ ../cachix ]; + config = { + pub-solar.printing.enable = true; + pub-solar.x-os.enableBootLoader = true; + }; +} From 7473789e8e04e52be3a7b4174065390c7a678370 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 23 Oct 2021 23:27:38 +0200 Subject: [PATCH 02/58] kernel: switch to linux lts 5.10 --- profiles/core/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/profiles/core/default.nix b/profiles/core/default.nix index c4247377..07a05328 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -13,7 +13,6 @@ in pub-solar.nextcloud.enable = true; pub-solar.office.enable = true; # pub-solar.printing.enable = true; # this is enabled automatically if office is enabled - pub-solar.server.enable = true; pub-solar.printing.enable = true; nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; @@ -124,7 +123,6 @@ in services.earlyoom.enable = true; - boot.kernelPackages = pkgs.linuxPackages_latest; boot.supportedFilesystems = [ "ntfs" ]; }; } From 0bfe4a135ef969bc916890dae42300a32f4e6320 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 23 Oct 2021 23:28:42 +0200 Subject: [PATCH 03/58] modules: remove redundant server module, SSH is enabled in core profile, too --- .gitignore | 2 +- modules/server/default.nix | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 modules/server/default.nix diff --git a/.gitignore b/.gitignore index b8cac1af..37acdb01 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,4 @@ doi pkgs/_sources/.shake* tags -/owners \ No newline at end of file +/owners diff --git a/modules/server/default.nix b/modules/server/default.nix deleted file mode 100644 index 3821421c..00000000 --- a/modules/server/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ lib, config, pkgs, ... }: -with lib; -let - psCfg = config.pub-solar; - cfg = config.pub-solar.server; -in -{ - options.pub-solar.server = { - enable = mkEnableOption "Enable server options like sshd"; - }; - - config = mkIf cfg.enable { - services.openssh = { - enable = true; - permitRootLogin = "no"; - passwordAuthentication = false; - }; - }; -} From 27aab3e5408a2205ceaab76fa995852b53c6fe46 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 23 Oct 2021 23:29:09 +0200 Subject: [PATCH 04/58] initrd: make keyfile optional --- modules/x-os/boot.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/x-os/boot.nix b/modules/x-os/boot.nix index 131dec8c..dff8d526 100644 --- a/modules/x-os/boot.nix +++ b/modules/x-os/boot.nix @@ -23,7 +23,7 @@ with lib; { # Use Keyfile to unlock the root partition to avoid keying in twice. # Allow fstrim to work on it. - boot.initrd = { + boot.initrd = mkIf cfg.enableBootLoader { secrets = { "/keyfile.bin" = cfg.keyfile; }; luks.devices."cryptroot" = { keyFile = "/keyfile.bin"; From 3aaef50ecaf3b44eac1e1ee30510b59b89ff914b Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 20:12:57 +0200 Subject: [PATCH 05/58] profiles: move social into separate profile --- profiles/graphical/default.nix | 1 - profiles/social/default.nix | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 profiles/social/default.nix diff --git a/profiles/graphical/default.nix b/profiles/graphical/default.nix index 62acad2f..237a74e5 100644 --- a/profiles/graphical/default.nix +++ b/profiles/graphical/default.nix @@ -4,5 +4,4 @@ in { pub-solar.graphical.enable = true; pub-solar.sway.enable = true; - pub-solar.social.enable = true; } diff --git a/profiles/social/default.nix b/profiles/social/default.nix new file mode 100644 index 00000000..cad05d33 --- /dev/null +++ b/profiles/social/default.nix @@ -0,0 +1,6 @@ +{ self, config, lib, pkgs, ... }: +let inherit (lib) fileContents; +in +{ + pub-solar.social.enable = true; +} From b79e92155a3995ce77b96719a3eac669f9775cb2 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 20:13:18 +0200 Subject: [PATCH 06/58] bootstrap: add graphical profile --- hosts/bootstrap.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/bootstrap.nix b/hosts/bootstrap.nix index d491855d..82bea4eb 100644 --- a/hosts/bootstrap.nix +++ b/hosts/bootstrap.nix @@ -9,6 +9,7 @@ profiles.core profiles.users.root # make sure to configure ssh keys profiles.users.nixos + profiles.graphical ]; boot.loader.systemd-boot.enable = true; From cd4dce51c1bb894da3af9313e310a861ae4dbaba Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 20:13:31 +0200 Subject: [PATCH 07/58] drone: init check pipeline --- .drone.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 89514d6c..894360d3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -82,8 +82,31 @@ steps: 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)" + +--- +kind: pipeline +type: docker +name: Check + +steps: + - name: "Check" + image: nixpkgs/nix-flakes:nixos-21.05 + when: + event: + - pull_request + - tag + commands: + - echo "" >> /etc/nix/nix.conf + - echo "system-features = nixos-test benchmark big-parallel kvm recursive-nix" >> /etc/nix/nix.conf + - echo "substituters = https://nrdxp.cachix.org https://nix-community.cachix.org https://cache.nixos.org" >> /etc/nix/nix.conf + - echo "trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" >> /etc/nix/nix.conf + - nix -Lv flake check + - nix -Lv build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel" + - nix -Lv develop -c echo OK + - nix -Lv develop --command bud --help + --- kind: signature -hmac: 145dff5d1aac21f4c68f186cc2dbd98ccb8f08f23af8df3528de6a21defee1c7 +hmac: 36b824020f2bafbb46bc0b4087296e82db41677a3b5b85c7851b90322492343c ... From c95629704115eca1dd6d0423230a9f2373485149 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 01:18:33 +0200 Subject: [PATCH 08/58] x-os: prepare booting from unencrypted /boot partition --- modules/x-os/boot.nix | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/modules/x-os/boot.nix b/modules/x-os/boot.nix index dff8d526..51cd5b4b 100644 --- a/modules/x-os/boot.nix +++ b/modules/x-os/boot.nix @@ -3,46 +3,19 @@ let cfg = config.pub-solar.x-os; in -with lib; { - options = { - pub-solar.x-os.keyfile = mkOption { - type = types.str; - description = "Keyfile location"; - }; - - pub-solar.x-os.enableBootLoader = mkOption { - type = types.bool; - default = false; - description = "Whether to include the grub bootloader. Turn this off for ISO images."; - }; - }; - +{ config = { # Enable plymouth for better experience of booting boot.plymouth.enable = true; - # Use Keyfile to unlock the root partition to avoid keying in twice. + # Mount / luks device in initrd # Allow fstrim to work on it. - boot.initrd = mkIf cfg.enableBootLoader { - secrets = { "/keyfile.bin" = cfg.keyfile; }; + boot.initrd = { luks.devices."cryptroot" = { - keyFile = "/keyfile.bin"; allowDiscards = true; - fallbackToPassword = true; }; }; - # Use GRUB with encrypted /boot under EFI env. - boot.loader = { - efi.efiSysMountPoint = "/boot/efi"; - - grub = { - enable = cfg.enableBootLoader; - version = 2; - device = "nodev"; - efiSupport = true; - enableCryptodisk = true; - }; - }; + boot.loader.systemd-boot.enable = true; }; } From 2588264d881a410df334283a179762ba32a26a76 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 22:03:28 +0200 Subject: [PATCH 09/58] Make check work --- .drone.yml | 3 ++- flake.lock | 6 +++--- flake.nix | 7 ++++--- hosts/PubSolarOS.nix | 11 +++++++++-- hosts/bootstrap.nix | 1 + lib/compat/nixos/default.nix | 2 +- modules/x-os/boot.nix | 10 ++++++++-- .../{installed => pub-solar-iso}/default.nix | 3 +-- users/pub-solar/default.nix | 16 ++++++++++++++++ 9 files changed, 45 insertions(+), 14 deletions(-) rename profiles/{installed => pub-solar-iso}/default.nix (59%) create mode 100644 users/pub-solar/default.nix diff --git a/.drone.yml b/.drone.yml index 894360d3..be74152a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -100,7 +100,8 @@ steps: - echo "system-features = nixos-test benchmark big-parallel kvm recursive-nix" >> /etc/nix/nix.conf - echo "substituters = https://nrdxp.cachix.org https://nix-community.cachix.org https://cache.nixos.org" >> /etc/nix/nix.conf - echo "trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" >> /etc/nix/nix.conf - - nix -Lv flake check + # Currently broken + #- nix -Lv flake check - nix -Lv build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel" - nix -Lv develop -c echo OK - nix -Lv develop --command bud --help diff --git a/flake.lock b/flake.lock index 488c04da..a5d8b109 100644 --- a/flake.lock +++ b/flake.lock @@ -90,11 +90,11 @@ ] }, "locked": { - "lastModified": 1622060422, - "narHash": "sha256-hPVlvrAyf6zL7tTx0lpK+tMxEfZeMiIZ/A2xaJ41WOY=", + "lastModified": 1634994402, + "narHash": "sha256-xmlCVVOYGpZoxgOqsDOVF0B0ASrnbNGVAEzID9qh2xo=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "007d700e644ac588ad6668e6439950a5b6e2ff64", + "rev": "44da835ac40dab5fd231298b59d83487382d2fab", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a513d8c0..70ed129e 100644 --- a/flake.nix +++ b/flake.nix @@ -121,16 +121,16 @@ imports = [ (digga.lib.importHosts ./hosts) ]; hosts = { /* set host specific properties here */ - NixOS = { }; + PubSolarOS = { }; }; importables = rec { profiles = digga.lib.rakeLeaves ./profiles // { users = digga.lib.rakeLeaves ./users; }; suites = with profiles; rec { - base = [ core users.nixos users.root ]; + base = [ core users.pub-solar users.root ]; pubsolaros = [ core installed base-user users.root ]; - anonymous = [ pubsolaros users.nixos ]; + anonymous = [ pubsolaros users.pub-solar ]; }; }; }; @@ -146,6 +146,7 @@ }; users = { nixos = { suites, ... }: { imports = suites.base; }; + pub-solar = { suites, ... }: { imports = suites.base; }; }; # digga.lib.importers.rakeLeaves ./users/hm; }; diff --git a/hosts/PubSolarOS.nix b/hosts/PubSolarOS.nix index 3b084119..84cf730f 100644 --- a/hosts/PubSolarOS.nix +++ b/hosts/PubSolarOS.nix @@ -1,7 +1,14 @@ -{ suites, ... }: +{ profiles, ... }: { ### root password is empty by default ### - imports = suites.base; + imports = [ + # profiles.networking + profiles.core + profiles.users.root # make sure to configure ssh keys + profiles.users.nixos + profiles.graphical + profiles.pub-solar-iso + ]; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/hosts/bootstrap.nix b/hosts/bootstrap.nix index 82bea4eb..377569d1 100644 --- a/hosts/bootstrap.nix +++ b/hosts/bootstrap.nix @@ -10,6 +10,7 @@ profiles.users.root # make sure to configure ssh keys profiles.users.nixos profiles.graphical + profiles.pub-solar-iso ]; boot.loader.systemd-boot.enable = true; diff --git a/lib/compat/nixos/default.nix b/lib/compat/nixos/default.nix index e4e0e68a..83f05f9f 100644 --- a/lib/compat/nixos/default.nix +++ b/lib/compat/nixos/default.nix @@ -2,7 +2,7 @@ let inherit (default.inputs.nixos) lib; - host = configs.${hostname} or configs.NixOS; + host = configs.${hostname} or configs.PubSolarOS; configs = default.nixosConfigurations; default = (import ../.).defaultNix; hostname = lib.fileContents /etc/hostname; diff --git a/modules/x-os/boot.nix b/modules/x-os/boot.nix index 51cd5b4b..0633bec4 100644 --- a/modules/x-os/boot.nix +++ b/modules/x-os/boot.nix @@ -1,16 +1,22 @@ { config, pkgs, lib, ... }: - +with lib; let cfg = config.pub-solar.x-os; in { + options.pub-solar.x-os.iso-options.enable = mkOption { + type = types.bool; + default = false; + description = "Feature flag for iso builds"; + }; config = { # Enable plymouth for better experience of booting boot.plymouth.enable = true; # Mount / luks device in initrd # Allow fstrim to work on it. - boot.initrd = { + # The ! makes this enabled by default + boot.initrd = mkIf (!cfg.iso-options.enable) { luks.devices."cryptroot" = { allowDiscards = true; }; diff --git a/profiles/installed/default.nix b/profiles/pub-solar-iso/default.nix similarity index 59% rename from profiles/installed/default.nix rename to profiles/pub-solar-iso/default.nix index 322c3093..24312b53 100644 --- a/profiles/installed/default.nix +++ b/profiles/pub-solar-iso/default.nix @@ -4,7 +4,6 @@ in { imports = [ ../cachix ]; config = { - pub-solar.printing.enable = true; - pub-solar.x-os.enableBootLoader = true; + pub-solar.x-os.iso-options.enable = true; }; } diff --git a/users/pub-solar/default.nix b/users/pub-solar/default.nix new file mode 100644 index 00000000..af669b41 --- /dev/null +++ b/users/pub-solar/default.nix @@ -0,0 +1,16 @@ +{ hmUsers, ... }: +{ + home-manager.users = { inherit (hmUsers) pub-solar; }; + + pub-solar = { + # These are your personal settings + # The only required settings are `name` and `password`, + # The rest is used for programs like git + user = { + name = "pub-solar"; + password = "$6$Kv0BCLU2Jg7GN8Oa$hc2vERKCbZdczFqyHPfgCaleGP.JuOWyd.bfcIsLDNmExGXI6Rnkze.SWzVzVS311KBznN/P4uUYAUADXkVtr."; + fullName = "Pub Solar"; + email = "iso@pub.solar"; + }; + }; +} From 2340270d813b43b96f4c441bdcbdc3a4bed92096 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 22:55:28 +0200 Subject: [PATCH 10/58] All the option are with us now --- .drone.yml | 49 ++++++++++++++++++++++++++++++- flake.nix | 2 +- modules/audio/default.nix | 10 ++++--- profiles/audio/default.nix | 6 ++++ profiles/core/default.nix | 6 ---- profiles/full-install/default.nix | 15 ++++++++++ 6 files changed, 76 insertions(+), 12 deletions(-) create mode 100644 profiles/audio/default.nix create mode 100644 profiles/full-install/default.nix diff --git a/.drone.yml b/.drone.yml index be74152a..fdd58446 100644 --- a/.drone.yml +++ b/.drone.yml @@ -106,8 +106,55 @@ steps: - nix -Lv develop -c echo OK - nix -Lv develop --command bud --help +--- +kind: pipeline +type: docker +name: Publish ISO + +steps: + - name: "Build ISO" + image: nixpkgs/nix-flakes:nixos-21.05 + volumes: + - name: nix-store + path: /nix/store + when: + event: + - push + branch: + - main + commands: + - echo "" >> /etc/nix/nix.conf + - echo "system-features = nixos-test benchmark big-parallel kvm recursive-nix" >> /etc/nix/nix.conf + - echo "substituters = https://nrdxp.cachix.org https://nix-community.cachix.org https://cache.nixos.org" >> /etc/nix/nix.conf + - echo "trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" >> /etc/nix/nix.conf + - nix-shell + - bud build bootstrap bootstrapIso + + - name: "Publish ISO" + image: appleboy/drone-scp + volumes: + - name: nix-store + path: /nix/store + settings: + host: + from_secret: ssh_host + user: + from_secret: ssh_user + port: + from_secret: ssh_port + key: + from_secret: ssh_key + target: /var/www/pub.solar + source: + - result/iso/*.iso + +volumes: + - name: nix-store + host: + path: "/var/nix/build-store" + --- kind: signature -hmac: 36b824020f2bafbb46bc0b4087296e82db41677a3b5b85c7851b90322492343c +hmac: a1c4dfbb3185a6185cc80622b0d78ff50a45c208fcbed963dbca894c8f47c6b3 ... diff --git a/flake.nix b/flake.nix index 70ed129e..9f183695 100644 --- a/flake.nix +++ b/flake.nix @@ -129,7 +129,7 @@ }; suites = with profiles; rec { base = [ core users.pub-solar users.root ]; - pubsolaros = [ core installed base-user users.root ]; + pubsolaros = [ core full-install base-user users.root ]; anonymous = [ pubsolaros users.pub-solar ]; }; }; diff --git a/modules/audio/default.nix b/modules/audio/default.nix index ce8c2f34..68b3c19b 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -8,6 +8,8 @@ in { options.pub-solar.audio = { enable = mkEnableOption "Life in highs and lows"; + mopidy.enable = mkEnableOption "Life with mopidy"; + bluetooth.enable = mkEnableOption "Life with bluetooth"; }; config = mkIf cfg.enable { @@ -36,7 +38,7 @@ in config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json); # Bluetooth configuration for pipewire - media-session.config.bluez-monitor.rules = [ + media-session.config.bluez-monitor.rules = mkIf cfg.bluetooth.enable [ { # Matches all cards matches = [{ "device.name" = "~bluez_card.*"; }]; @@ -63,10 +65,10 @@ in }; # Enable bluetooth - hardware.bluetooth.enable = true; - services.blueman.enable = true; + hardware.bluetooth.enable = mkIf cfg.bluetooth.enable true; + services.blueman.enable = mkIf cfg.bluetooth.enable true; # Enable audio server & client - services.mopidy = import ./mopidy.nix pkgs; + services.mopidy = mkIf cfg.mopidy.enable ((import ./mopidy.nix) pkgs); }; } diff --git a/profiles/audio/default.nix b/profiles/audio/default.nix new file mode 100644 index 00000000..22b64af5 --- /dev/null +++ b/profiles/audio/default.nix @@ -0,0 +1,6 @@ +{ self, config, lib, pkgs, ... }: +let inherit (lib) fileContents; +in +{ + pub-solar.audio.enable = true; +} diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 07a05328..b77baf53 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -9,11 +9,6 @@ in pub-solar.audio.enable = true; pub-solar.crypto.enable = true; pub-solar.devops.enable = true; - pub-solar.docker.enable = true; - pub-solar.nextcloud.enable = true; - pub-solar.office.enable = true; - # pub-solar.printing.enable = true; # this is enabled automatically if office is enabled - pub-solar.printing.enable = true; nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; @@ -30,7 +25,6 @@ in git git-lfs git-bug - git-crypt wget openssl openssh diff --git a/profiles/full-install/default.nix b/profiles/full-install/default.nix new file mode 100644 index 00000000..ba136554 --- /dev/null +++ b/profiles/full-install/default.nix @@ -0,0 +1,15 @@ +{ self, config, lib, pkgs, ... }: +let inherit (lib) fileContents; +in +{ + imports = [ ../cachix ]; + + config = { + pub-solar.audio.mopidy.enable = true; + pub-solar.audio.bluetooth.enable = true; + pub-solar.docker.enable = true; + pub-solar.nextcloud.enable = true; + pub-solar.office.enable = true; + # pub-solar.printing.enable = true; # this is enabled automatically if office is enabled + }; +} From 40e93f15d921634f19b999b3f653cc4bae8bbe96 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 23:01:08 +0200 Subject: [PATCH 11/58] Sign correctly --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index fdd58446..3b526ae2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -155,6 +155,6 @@ volumes: --- kind: signature -hmac: a1c4dfbb3185a6185cc80622b0d78ff50a45c208fcbed963dbca894c8f47c6b3 +hmac: 79df404a887f5de8b7725ecedaface562d6d67b23112af89d6cb3948af4264d2 ... From a79834c15a4bce4059f78af5b99cbd8e2b3b8f0c Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 23:04:53 +0200 Subject: [PATCH 12/58] Test push event on feature branch --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3b526ae2..9218c2c2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -121,7 +121,7 @@ steps: event: - push branch: - - main + - feature/basic-iso commands: - echo "" >> /etc/nix/nix.conf - echo "system-features = nixos-test benchmark big-parallel kvm recursive-nix" >> /etc/nix/nix.conf @@ -155,6 +155,6 @@ volumes: --- kind: signature -hmac: 79df404a887f5de8b7725ecedaface562d6d67b23112af89d6cb3948af4264d2 +hmac: d20bd6483d36dbc68677e3fcac26da8680beeba20684a80c64bcb1be818e8765 ... From 6b67d08edd6654590be0c46f40781380bab3c007 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 23:13:13 +0200 Subject: [PATCH 13/58] Use different path for volume --- .drone.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9218c2c2..848f096c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -116,7 +116,7 @@ steps: image: nixpkgs/nix-flakes:nixos-21.05 volumes: - name: nix-store - path: /nix/store + path: /var/nix/iso-cache when: event: - push @@ -129,12 +129,13 @@ steps: - echo "trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" >> /etc/nix/nix.conf - nix-shell - bud build bootstrap bootstrapIso + - cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/ - name: "Publish ISO" image: appleboy/drone-scp volumes: - name: nix-store - path: /nix/store + path: /var/nix/iso-cache settings: host: from_secret: ssh_host @@ -151,10 +152,10 @@ steps: volumes: - name: nix-store host: - path: "/var/nix/build-store" + path: "/var/nix/iso-cache" --- kind: signature -hmac: d20bd6483d36dbc68677e3fcac26da8680beeba20684a80c64bcb1be818e8765 +hmac: b5366c36f19140ef6c884cc7b5455b6e4e5cd803c5e7d1ed7414bf246bf7f7ed ... From 8f194d1503f39014442e5d4da16e1ec5212dcb90 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 23:18:10 +0200 Subject: [PATCH 14/58] Fix devshell for executing bud --- .drone.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 848f096c..96611d98 100644 --- a/.drone.yml +++ b/.drone.yml @@ -127,8 +127,7 @@ steps: - echo "system-features = nixos-test benchmark big-parallel kvm recursive-nix" >> /etc/nix/nix.conf - echo "substituters = https://nrdxp.cachix.org https://nix-community.cachix.org https://cache.nixos.org" >> /etc/nix/nix.conf - echo "trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" >> /etc/nix/nix.conf - - nix-shell - - bud build bootstrap bootstrapIso + - nix -Lv develop --command bud build bootstrap bootstrapIso - cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/ - name: "Publish ISO" @@ -156,6 +155,6 @@ volumes: --- kind: signature -hmac: b5366c36f19140ef6c884cc7b5455b6e4e5cd803c5e7d1ed7414bf246bf7f7ed +hmac: 56184121f9e3e0c8c27de1c1439f40d29544fc4c207b261e8e3a8163d439acbc ... From effea24101b22b6bdf035d5f90bdaea4cd8cf8c1 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 25 Oct 2021 21:51:13 +0200 Subject: [PATCH 15/58] drone: fix publish scp source path --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 96611d98..c40607a5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -146,7 +146,7 @@ steps: from_secret: ssh_key target: /var/www/pub.solar source: - - result/iso/*.iso + - /var/nix/iso-cache/*.iso volumes: - name: nix-store @@ -155,6 +155,6 @@ volumes: --- kind: signature -hmac: 56184121f9e3e0c8c27de1c1439f40d29544fc4c207b261e8e3a8163d439acbc +hmac: 43227ed11479ad86afeb77f850a713b2a09b3154df1bf2237ba00f7d5b553d57 ... From 74241b459eeecc230660d2e5c9633d28eaaa2189 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 25 Oct 2021 22:43:02 +0200 Subject: [PATCH 16/58] switch to pub-solar user and use base-user profile --- hosts/PubSolarOS.nix | 3 ++- hosts/bootstrap.nix | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hosts/PubSolarOS.nix b/hosts/PubSolarOS.nix index 84cf730f..2438ac28 100644 --- a/hosts/PubSolarOS.nix +++ b/hosts/PubSolarOS.nix @@ -5,7 +5,8 @@ # profiles.networking profiles.core profiles.users.root # make sure to configure ssh keys - profiles.users.nixos + profiles.users.pub-solar + profiles.base-user profiles.graphical profiles.pub-solar-iso ]; diff --git a/hosts/bootstrap.nix b/hosts/bootstrap.nix index 377569d1..c6d8f105 100644 --- a/hosts/bootstrap.nix +++ b/hosts/bootstrap.nix @@ -8,7 +8,8 @@ # profiles.networking profiles.core profiles.users.root # make sure to configure ssh keys - profiles.users.nixos + profiles.users.pub-solar + profiles.base-user profiles.graphical profiles.pub-solar-iso ]; From 1ab1ec5ded9bd4f0c6730bc22fd71815a19db0e4 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 26 Oct 2021 01:02:17 +0200 Subject: [PATCH 17/58] drone: sign --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1c8e5895..7c318efa 100644 --- a/.drone.yml +++ b/.drone.yml @@ -156,6 +156,6 @@ volumes: --- kind: signature -hmac: 43227ed11479ad86afeb77f850a713b2a09b3154df1bf2237ba00f7d5b553d57 +hmac: 493c996fab22097034fd500fe537e05d8008324aec42b96da75b5234a5a2d533 ... From 27d962c96ba9b290e07bc2820f75cc3b846e006a Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 26 Oct 2021 01:06:13 +0200 Subject: [PATCH 18/58] fix x-os option --- modules/x-os/boot.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/x-os/boot.nix b/modules/x-os/boot.nix index 484a46cf..0633bec4 100644 --- a/modules/x-os/boot.nix +++ b/modules/x-os/boot.nix @@ -4,6 +4,11 @@ let cfg = config.pub-solar.x-os; in { + options.pub-solar.x-os.iso-options.enable = mkOption { + type = types.bool; + default = false; + description = "Feature flag for iso builds"; + }; config = { # Enable plymouth for better experience of booting boot.plymouth.enable = true; From 7271c343202b749d51148b3dbbeec0a2a83cb932 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 26 Oct 2021 01:19:47 +0200 Subject: [PATCH 19/58] hammer for fontconfig --- profiles/base-user/home.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/base-user/home.nix b/profiles/base-user/home.nix index 6d7c87d2..7c5c5518 100644 --- a/profiles/base-user/home.nix +++ b/profiles/base-user/home.nix @@ -20,7 +20,7 @@ in home.packages = with pkgs; [ ]; - fonts.fontconfig.enable = true; + fonts.fontconfig.enable = mkForce true; programs.dircolors.enable = true; programs.dircolors.enableZshIntegration = true; From d36feb2028fafcfc09a798d31763eed55634a498 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 26 Oct 2021 10:14:42 +0200 Subject: [PATCH 20/58] drone: strip path before scp'ing --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 7c318efa..39ff1b0d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -148,6 +148,7 @@ steps: target: /var/www/pub.solar source: - /var/nix/iso-cache/*.iso + strip_components: 3 volumes: - name: nix-store @@ -156,6 +157,6 @@ volumes: --- kind: signature -hmac: 493c996fab22097034fd500fe537e05d8008324aec42b96da75b5234a5a2d533 +hmac: 81a1527ce6d9af333113b6bf667a61d2e5650a96d4846fc0d1376b444253108d ... From 5aac1779407acbd7e5c583b24c82c6b37bf2728d Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 26 Oct 2021 10:40:03 +0200 Subject: [PATCH 21/58] drone: use trigger conditional for whole publish pipeline --- .drone.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 451ba911..4991e307 100644 --- a/.drone.yml +++ b/.drone.yml @@ -118,11 +118,6 @@ steps: volumes: - name: nix-store path: /var/nix/iso-cache - when: - event: - - push - branch: - - feature/basic-iso commands: - echo "" >> /etc/nix/nix.conf - echo "system-features = nixos-test benchmark big-parallel kvm recursive-nix" >> /etc/nix/nix.conf @@ -150,6 +145,12 @@ steps: - /var/nix/iso-cache/*.iso strip_components: 3 +trigger: + event: + - push + branch: + - feature/basic-iso + volumes: - name: nix-store host: @@ -157,6 +158,6 @@ volumes: --- kind: signature -hmac: b80fc2bec44f00eb0e02943a918f45c7e652ae66e8b7a7a52ecc05c571fd5164 +hmac: 64f156e8fe88b7266980aa86fd5b98fe2ec6b39336da3209fc34ff0864648408 ... From 907b08930a3a82315bbfd885ea6a2cfcc16ce98b Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 26 Oct 2021 10:45:53 +0200 Subject: [PATCH 22/58] drone: only trigger upstreaming on cron event --- .drone.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 4991e307..2b514c21 100644 --- a/.drone.yml +++ b/.drone.yml @@ -84,6 +84,10 @@ steps: 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 @@ -158,6 +162,6 @@ volumes: --- kind: signature -hmac: 64f156e8fe88b7266980aa86fd5b98fe2ec6b39336da3209fc34ff0864648408 +hmac: 539937d723b620778939dcac3819b0f6a4c396f1c477a2783ae3fb6feab0f4d7 ... From 082e33c1edf7621a2dc70a5ee6f7e08fc2a31c15 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 19 Jan 2022 01:13:15 +0100 Subject: [PATCH 23/58] wip --- .envrc | 12 +- flake.lock | 205 +++++++++++------- flake.nix | 15 +- .../.config/sway/config.d/applications.conf | 14 -- .../con/.config/sway/config.d/autostart.conf | 6 - .../sway/config.d/custom-keybindings.conf | 5 - .../.config/sway/config.d/input-defaults.conf | 35 --- hosts/con/.config/sway/config.d/screens.conf | 41 ---- hosts/con/con.nix | 40 ---- hosts/con/default.nix | 6 - hosts/con/hardware-configuration.nix | 34 --- hosts/dumpyourvms/dumpyourvms.nix | 11 +- hosts/dumpyourvms/unbound.nix | 2 - hosts/fae.nix | 59 +++++ modules/audio/default.nix | 2 +- modules/graphical/default.nix | 1 + modules/social/default.nix | 3 +- modules/sway/default.nix | 12 +- modules/terminal-life/default.nix | 1 - modules/terminal-life/nvim/default.nix | 5 +- modules/terminal-life/nvim/lsp.vim | 42 ++-- modules/terminal-life/nvim/plugins.vim | 4 +- modules/terminal-life/zsh/default.nix | 16 +- modules/virtualisation/default.nix | 2 +- modules/x-os/boot.nix | 10 +- overlays/element-desktop.nix | 8 + overlays/overrides.nix | 18 +- pkgs/default.nix | 1 + pkgs/gpu-switch.nix | 69 ++++++ pkgs/mopidy-jellyfin.nix | 14 +- profiles/base-user/.config/waybar/config | 2 +- shell/bud/default.nix | 2 +- shell/devos.nix | 5 +- users/teutat3s/.config/git/config.nix | 8 +- users/teutat3s/.config/watson/config.nix | 29 +++ users/teutat3s/home.nix | 8 +- users/teutat3s/session-variables.nix | 1 + users/teutat3s/zshrc.nix | 4 +- 38 files changed, 414 insertions(+), 338 deletions(-) delete mode 100644 hosts/con/.config/sway/config.d/applications.conf delete mode 100644 hosts/con/.config/sway/config.d/autostart.conf delete mode 100644 hosts/con/.config/sway/config.d/custom-keybindings.conf delete mode 100644 hosts/con/.config/sway/config.d/input-defaults.conf delete mode 100644 hosts/con/.config/sway/config.d/screens.conf delete mode 100644 hosts/con/con.nix delete mode 100644 hosts/con/default.nix delete mode 100644 hosts/con/hardware-configuration.nix create mode 100644 hosts/fae.nix create mode 100644 overlays/element-desktop.nix create mode 100644 pkgs/gpu-switch.nix create mode 100644 users/teutat3s/.config/watson/config.nix diff --git a/.envrc b/.envrc index a6d5743c..c878da9a 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1,10 @@ -watch_file shell/* flake.nix -use flake || use nix +# reload when these files change +watch_file flake.nix +watch_file shell.nix + +{ + # shell gc root dir + mkdir -p "$(direnv_layout_dir)" + + eval "$(nix print-dev-env --profile $(direnv_layout_dir)/flake-profile)" +} || use nix diff --git a/flake.lock b/flake.lock index dd3ae7e1..059e0070 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1637793790, - "narHash": "sha256-oPXavjxETEWGXq8g7kQHyRLKUmLX2yPtGn+t3V0mrTY=", + "lastModified": 1640802000, + "narHash": "sha256-ZiI94Zv/IgW64fqKrtVaQqfUCkn9STvAjgfFmvtqcQ8=", "owner": "ryantm", "repo": "agenix", - "rev": "f85eea0e29fa9a8924571d0e398215e175f80d55", + "rev": "c5558c88b2941bf94886dfdede6926b1ba5f5629", "type": "github" }, "original": { @@ -23,10 +23,7 @@ "beautysh": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": [ - "bud", - "nixpkgs" - ], + "nixpkgs": "nixpkgs", "poetry2nix": "poetry2nix" }, "locked": { @@ -90,11 +87,11 @@ ] }, "locked": { - "lastModified": 1634994402, - "narHash": "sha256-xmlCVVOYGpZoxgOqsDOVF0B0ASrnbNGVAEzID9qh2xo=", + "lastModified": 1640117230, + "narHash": "sha256-W7LXeJavyIzNfNaoEsK65sEaCGqE9MVWvK0xSzNR4ls=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "44da835ac40dab5fd231298b59d83487382d2fab", + "rev": "5851d9613edf8b2279746c7e5b9faac55ff17e8a", "type": "github" }, "original": { @@ -113,11 +110,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1637357482, - "narHash": "sha256-mMRxOlcQs3V9cZYsKGKWEjl+oqclhaH1SKT3QGeTQ0Q=", + "lastModified": 1639771334, + "narHash": "sha256-4hgZmsCPaL5QlcEijHmzaYYrEwHtUFqraCUrCqLGJOo=", "owner": "input-output-hk", "repo": "deploy-rs", - "rev": "5a6db26726ec8c7904aea5bcdf13589342386f9d", + "rev": "7267eab9139ca4476fd8ed49e2e8652bba4c037f", "type": "github" }, "original": { @@ -163,11 +160,11 @@ ] }, "locked": { - "lastModified": 1640031018, + "lastModified": 1640815524, "narHash": "sha256-ZzyS803XuCl99XE4581m0Suni+q1Hz+Mpw6A9bs7VKM=", "owner": "divnix", "repo": "digga", - "rev": "3157889810e51a1ae03f82bf6bf6657ba8cf93c6", + "rev": "5c9417495d8ab8813377d7b990680258b9eb4cff", "type": "github" }, "original": { @@ -178,15 +175,15 @@ }, "fenix": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1637303083, - "narHash": "sha256-e2A5JBjxYNpjoGd53K0oVUUaS9ojwOT5rnThyPNS46M=", + "lastModified": 1639117493, + "narHash": "sha256-67H9uXUdauaqMfkcKzpgHR3GeOKPAwOs6G3C1VpT67o=", "owner": "nix-community", "repo": "fenix", - "rev": "8294ceadbbbe1a886640bfcc15f5a02a2b471955", + "rev": "94b5686cad2ed210da106b0b7e1e212dab43fbf2", "type": "github" }, "original": { @@ -307,11 +304,26 @@ }, "flake-utils_5": { "locked": { - "lastModified": 1631561581, - "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", "owner": "numtide", "repo": "flake-utils", - "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", "type": "github" }, "original": { @@ -327,11 +339,11 @@ ] }, "locked": { - "lastModified": 1637917557, - "narHash": "sha256-3u5bLyGn5NUG3RJA7/v1Bqa/QCFGqp/01Bh/4REf9m4=", + "lastModified": 1639871969, + "narHash": "sha256-6feWUnMygRzA9tzkrfAzpA5/NBYg75bkFxnqb1DtD7E=", "owner": "nix-community", "repo": "home-manager", - "rev": "4daff26495ca9ac67476cba8cf15c3e36d91ab18", + "rev": "697cc8c68ed6a606296efbbe9614c32537078756", "type": "github" }, "original": { @@ -359,11 +371,11 @@ }, "latest_2": { "locked": { - "lastModified": 1638198142, - "narHash": "sha256-plU9b8r4St6q4U7VHtG9V7oF8k9fIpfXl/KDaZLuY9k=", + "lastModified": 1641887635, + "narHash": "sha256-kDGpufwzVaiGe5e1sBUBPo9f1YN+nYHJlYqCaVpZTQQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8a308775674e178495767df90c419425474582a1", + "rev": "b2737d4980a17cc2b7d600d7d0b32fd7333aca88", "type": "github" }, "original": { @@ -380,11 +392,11 @@ ] }, "locked": { - "lastModified": 1638203339, - "narHash": "sha256-Sz3iCvbWrVWOD/XfYQeRJgP/7MVYL3/VKsNXvDeWBFc=", + "lastModified": 1639947939, + "narHash": "sha256-pGsM8haJadVP80GFq4xhnSpNitYNQpaXk4cnA796Cso=", "owner": "nmattia", "repo": "naersk", - "rev": "c3e56b8a4ffb6d906cdfcfee034581f9a8ece571", + "rev": "2fc8ce9d3c025d59fee349c1f80be9785049d653", "type": "github" }, "original": { @@ -393,6 +405,25 @@ "type": "github" } }, + "nix-dram": { + "inputs": { + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1639413393, + "narHash": "sha256-OcmY7yw6gu+fb3J8UT9Qmj1+eyP8HaOF133ojEx0aq8=", + "owner": "pub-solar", + "repo": "nix-dram", + "rev": "07881073fcaa0fb394dbf8ce9fd1483afc376d95", + "type": "github" + }, + "original": { + "owner": "pub-solar", + "repo": "nix-dram", + "type": "github" + } + }, "nixlib": { "locked": { "lastModified": 1640478849, @@ -408,32 +439,13 @@ "type": "github" } }, - "nix-dram": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1628492639, - "narHash": "sha256-ffF/oEhLs/stAsXXobruKHyH9jnMC2rt/SM3ASrs2U8=", - "owner": "dramforever", - "repo": "nix-dram", - "rev": "fba426108ea6bdeb1e362bac9da06cbd33726f41", - "type": "github" - }, - "original": { - "owner": "dramforever", - "repo": "nix-dram", - "type": "github" - } - }, "nixos": { "locked": { - "lastModified": 1638231428, - "narHash": "sha256-Sm5loBKdeusSvIAC+LtzRT6I7tAcqZdIPnHcxZt7NaE=", + "lastModified": 1642068274, + "narHash": "sha256-uncr2I2z6Y2ghTdm0VDzTPjPtBsaGpsb17HgL/fGDdg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "393c5357a0071d51668bcdc69dfc25ddacbd5840", + "rev": "00d17d8ddc4c12bae0cd750eb2bb51ee813a5301", "type": "github" }, "original": { @@ -446,7 +458,7 @@ "nixos-generators": { "inputs": { "nixlib": "nixlib", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1637655461, @@ -464,11 +476,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1638182287, - "narHash": "sha256-vBzf+hbTJz2ZdXV/DWirl6wOO7tjdqzTIU+0FANt65U=", + "lastModified": 1640686209, + "narHash": "sha256-6glXUlKRDhEhNuYx6r3fXU6KH2/Vq9mJZjB9oUpwrmc=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "6b3f79de09c3de7c91ab51e55e87879f61b6faec", + "rev": "46df95ca81e7e4cf3458cdb4b7d1714b5fce9da5", "type": "github" }, "original": { @@ -479,11 +491,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1640831728, - "narHash": "sha256-KK5SKqqfAt+ev3bHLrVXJ6i4zx9YQW6k19oUInY8T2M=", + "lastModified": 1640861606, + "narHash": "sha256-AQ+84X0wbu8TqijaVcfAgldnV8AIFkbzXlyILuqub8o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5d90841dd0179430db010dfc2c58b2a7de4371be", + "rev": "c1792db42df222b0ec570bd774488f48aa0c91b1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1640897803, + "narHash": "sha256-FfBWDDz0/pgb+qtf6RGIkrsA1SW8lv77eUpm5xijTQQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0e57783d3a9ff01d3ace41d9f75d84b865285746", "type": "github" }, "original": { @@ -492,13 +520,13 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { - "lastModified": 1636976544, - "narHash": "sha256-9ZmdyoRz4Qu8bP5BKR1T10YbzcB9nvCeQjOEw2cRKR0=", + "lastModified": 1638986258, + "narHash": "sha256-OceRdctKZRSgqQxVRvvNB0MaEnFMzQqjUffecoDE9eI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "931ab058daa7e4cd539533963f95e2bb0dbd41e6", + "rev": "581d2d6c9cd5c289002203581d8aa0861963a933", "type": "github" }, "original": { @@ -508,7 +536,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1640418986, "narHash": "sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=", @@ -524,14 +552,29 @@ "type": "github" } }, + "nixpkgs_5": { + "locked": { + "lastModified": 1639399671, + "narHash": "sha256-KT+YqqPZsdzKNE4T8okeH8lV+a0vtFxD4w+P2CEZC40=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c95b2e99529891b1d52e065c34dd50c136151bcb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-21.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "locked": { - "lastModified": 1638231901, - "narHash": "sha256-XzuvFTmsXULdWynQWzgaPHikepNhjEpK4o5WXfmRqek=", - "owner": "nix-community", - "repo": "NUR", - "rev": "4e68fb3d8f48e91196deb13f44bcfb421da25afb", - "type": "github" + "lastModified": 1626378135, + "narHash": "sha256-koC6DBYmLCrgXA+AMHVaODf1uHYPmvcFygHfy3eg6vI=", + "path": "/nix/store/6mfkswqi67m35qwv0vh7kpk8rypbl2rq-source", + "rev": "00c2ec8f0bbdf0cfb2135bde55fbae5d6b64aa6d", + "type": "path" }, "original": { "id": "nur", @@ -541,17 +584,17 @@ "nvfetcher": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "nixpkgs": [ "nixos" ] }, "locked": { - "lastModified": 1634524567, - "narHash": "sha256-v9ZTZj1WNQaaVfs1P1mUPuh518mmwpqszj1EjdeGUmc=", + "lastModified": 1640033174, + "narHash": "sha256-b8w7NgobOYLlFV9j+XGbF+51LpOll0QeatxEGRv7uhg=", "owner": "berberman", "repo": "nvfetcher", - "rev": "807513f4bbd0e3b5863f4c3b91f8ac846ed6da9b", + "rev": "8bbf1921a36343f9a78c68e2bbc9798ab8f3b768", "type": "github" }, "original": { @@ -563,7 +606,7 @@ "poetry2nix": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1625240517, @@ -590,10 +633,6 @@ "latest": "latest_2", "naersk": "naersk", "nix-dram": "nix-dram", - "nixlib": [ - "digga", - "nixlib" - ], "nixos": "nixos", "nixos-hardware": "nixos-hardware", "nur": "nur", @@ -603,11 +642,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1637268320, - "narHash": "sha256-lxB1r+7cmZisiGLx0tZ2LaC6X/EcQTbRIWZfnLIIgs4=", + "lastModified": 1639071661, + "narHash": "sha256-4YySLORuK0qGGIEJj78S7CZ4jy4GIHJ5ks17k5AWblo=", "owner": "rust-analyzer", "repo": "rust-analyzer", - "rev": "f0da9406bcbde1bc727242b481d8de825e84f59a", + "rev": "2534b7db1a093543d5bd759b3a1ca9e34418fa31", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d9b42967..08a9dc0a 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,7 @@ nixos-hardware.url = "github:nixos/nixos-hardware"; # PubSolarOS additions - nix-dram.url = "github:dramforever/nix-dram"; + nix-dram.url = "github:pub-solar/nix-dram"; }; outputs = @@ -108,6 +108,9 @@ hosts = { /* set host specific properties here */ NixOS = { }; + fae = { + system = "aarch64-linux"; + }; }; importables = rec { profiles = digga.lib.rakeLeaves ./profiles // { @@ -144,7 +147,15 @@ homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; - deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { }; + deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { + fae = { + profilesOrder = [ "system" "direnv" ]; + profiles.direnv = { + user = "nixos"; + path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.nixos; + }; + }; + }; defaultTemplate = self.templates.bud; templates.bud.path = ./.; diff --git a/hosts/con/.config/sway/config.d/applications.conf b/hosts/con/.config/sway/config.d/applications.conf deleted file mode 100644 index c528a114..00000000 --- a/hosts/con/.config/sway/config.d/applications.conf +++ /dev/null @@ -1,14 +0,0 @@ -assign [app_id="firefox"] $ws2 - -# seahorse -for_window [title="seahorse"] floating enabled - -# NetworkManager -for_window [title="Network Connections"] floating enabled - -# thunderbird -for_window [title="New Task:*"] floating enabled -for_window [title="Edit Task:*"] floating enabled -for_window [title="New Event:*"] floating enabled -for_window [title="Edit Event:*"] floating enabled - diff --git a/hosts/con/.config/sway/config.d/autostart.conf b/hosts/con/.config/sway/config.d/autostart.conf deleted file mode 100644 index 8ed35abb..00000000 --- a/hosts/con/.config/sway/config.d/autostart.conf +++ /dev/null @@ -1,6 +0,0 @@ -# Autostart applications -# -# Example: -# exec swayidle - -#exec qMasterPassword diff --git a/hosts/con/.config/sway/config.d/custom-keybindings.conf b/hosts/con/.config/sway/config.d/custom-keybindings.conf deleted file mode 100644 index e678cb75..00000000 --- a/hosts/con/.config/sway/config.d/custom-keybindings.conf +++ /dev/null @@ -1,5 +0,0 @@ -# switch keyboard input language -bindsym $mod+tab exec swaymsg input "1:1:AT_Translated_Set_2_keyboard" xkb_switch_layout next - -bindsym $mod+Shift+F2 exec chromium --enable-features=UseOzonePlatform --ozone-platform=wayland - diff --git a/hosts/con/.config/sway/config.d/input-defaults.conf b/hosts/con/.config/sway/config.d/input-defaults.conf deleted file mode 100644 index 11773d48..00000000 --- a/hosts/con/.config/sway/config.d/input-defaults.conf +++ /dev/null @@ -1,35 +0,0 @@ -### Input configuration -# -# You can get the names of your inputs by running: swaymsg -t get_inputs -# Read `man 5 sway-input` for more information about this section. - -input "type:keyboard" { - xkb_layout us,de - xkb_model pc105 - xkb_options altwin:swap_alt_win -} - -input "type:touchpad" { - tap enabled - natural_scroll enabled -} - -# Touchpad controls -#bindsym XF86TouchpadToggle exec $HOME/Workspace/ben/toggletouchpad.sh # toggle touchpad - -# Screen brightness controls -bindsym XF86MonBrightnessUp exec "brightnessctl -d intel_backlight set +10%; notify-send $(brightnessctl -d intel_backlight i | awk '/Current/ {print $4}')" -bindsym XF86MonBrightnessDown exec "brightnessctl -d intel_backlight set 10%-; notify-send $(brightnessctl -d intel_backlight i | awk '/Current/ { print $4}')" - -# Keyboard backlight brightness controls -bindsym XF86KbdBrightnessDown exec "brightnessctl -d smc::kbd_backlight set 10%-; notify-send $(brightnessctl -d smc::kbd_backlight i | awk '/Current/ { print $4}')" -bindsym XF86KbdBrightnessUp exec "brightnessctl -d smc::kbd_backlight set +10%; notify-send $(brightnessctl -d smc::kbd_backlight i | awk '/Current/ { print $4}')" - -# Pulse Audio controls -bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 && notify-send 'Vol. up' #increase sound volume -bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 && notify-send 'Vol. down' #decrease sound volume -bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send 'Mute sound' # mute sound -# Media player controls -bindsym XF86AudioPlay exec "playerctl play-pause; notify-send 'Play/Pause'" -bindsym XF86AudioNext exec "playerctl next; notify-send 'Next'" -bindsym XF86AudioPrev exec "playerctl previous; notify-send 'Prev.'" diff --git a/hosts/con/.config/sway/config.d/screens.conf b/hosts/con/.config/sway/config.d/screens.conf deleted file mode 100644 index c5784e14..00000000 --- a/hosts/con/.config/sway/config.d/screens.conf +++ /dev/null @@ -1,41 +0,0 @@ -### Output configuration -# -# Example configuration: -# -# output HDMI-A-1 resolution 1920x1080 position 1920,0 -# -# You can get the names of your outputs by running: swaymsg -t get_outputs - -set $main_screen eDP-1 -set $displayport DP-1 -set $hmdi HDMI-A-1 - -output $main_screen -output $displayport scale 2 -output $hdmi scale 1 - -output $main_screen pos 0 1080 -output $displayport pos 0 0 -output $hdmi pos 1920 0 - -#bindswitch lid:on output $main_screen disable -#bindswitch lid:off output $main_screen enable -bindsym $mod+Shift+x output $main_screen toggle - -# TODO when using more monitors -## Manual management of external displays -# Set the shortcuts and what they do -#set $mode_display HDMI (i) top, (j) left, (k) bottom, (l) right, (o) off -#mode "$mode_display" { -# bindsym i output HDMI-A-1 enable; output HDMI-A-1 pos 0 0 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 0 1080, mode "default" -# bindsym j output HDMI-A-1 enable; output HDMI-A-1 pos 0 0 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 1920 0, mode "default" -# bindsym k output HDMI-A-1 enable; output HDMI-A-1 pos 0 900 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 0 0, mode "default" -# bindsym l output HDMI-A-1 enable; output HDMI-A-1 pos 1440 0 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 0 0, mode "default" -# bindsym o output HDMI-A-1 disable, mode "default" -# -# # back to normal: Enter or Escape -# bindsym Return mode "default" -# bindsym Escape mode "default" -#} -## Declare here the shortcut to bring the display selection menu -#bindsym $mod+x mode "$mode_display" diff --git a/hosts/con/con.nix b/hosts/con/con.nix deleted file mode 100644 index ede5188c..00000000 --- a/hosts/con/con.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ config, pkgs, lib, ... }: -with lib; -let - psCfg = config.pub-solar; - xdg = config.home-manager.users."${psCfg.user.name}".xdg; -in -{ - imports = [ - ./hardware-configuration.nix - ]; - - config = { - pub-solar.x-os.keyfile = "/etc/nixos/hosts/con/secrets/keyfile.bin"; - pub-solar.nextcloud.enable = mkForce false; - - home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { - home.sessionVariables = { - DOCKER_BUILDKIT = "1"; - }; - # Custom device sway configs - xdg.configFile = mkIf psCfg.sway.enable { - "sway/config.d/10-applications.conf".source = ./.config/sway/config.d/applications.conf; - "sway/config.d/autostart.conf".source = ./.config/sway/config.d/autostart.conf; - "sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf; - "sway/config.d/input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; - "sway/config.d/screens.conf".source = ./.config/sway/config.d/screens.conf; - }; - }; - networking.hosts = { - "127.0.0.1" = [ - "virtrex.test" - "api.virtrex.test" - "expo.test" - "proxy.test" - "dachfensterkonfigurator.test" - "handwerker.velux.test" - ]; - }; - }; -} diff --git a/hosts/con/default.nix b/hosts/con/default.nix deleted file mode 100644 index 2196635d..00000000 --- a/hosts/con/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ suites, ... }: -{ - imports = [ - ./con.nix - ] ++ suites.con; -} diff --git a/hosts/con/hardware-configuration.nix b/hosts/con/hardware-configuration.nix deleted file mode 100644 index 8adf9afd..00000000 --- a/hosts/con/hardware-configuration.nix +++ /dev/null @@ -1,34 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { - device = "/dev/disk/by-uuid/382ae29a-ed0d-4e18-99db-6efb6afaae64"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/fb2f9ace-ce72-4b0d-b8b5-a8792d374f3c"; - - fileSystems."/boot/efi" = - { - device = "/dev/disk/by-uuid/6BD6-50D2"; - fsType = "vfat"; - }; - - swapDevices = [ ]; - - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; -} diff --git a/hosts/dumpyourvms/dumpyourvms.nix b/hosts/dumpyourvms/dumpyourvms.nix index a30c80aa..e1e8abff 100644 --- a/hosts/dumpyourvms/dumpyourvms.nix +++ b/hosts/dumpyourvms/dumpyourvms.nix @@ -18,11 +18,15 @@ in pub-solar.virtualisation.enable = true; - # fix backlight for keyboard and brightness, adjust function key binding + # fix backlight for keyboard and brightness, adjust function key binding, + # intel_pstate for cpu schedutil, resume offset for swapfile, disable amdgpu driver boot.kernelParams = [ "acpi_backlight=video" "hid_apple.fnmode=2" "intel_pstate=passive" "resume_offset=47366144" ]; boot.loader.efi.canTouchEfiVariables = true; boot.resumeDevice = "/dev/mapper/cryptroot"; + boot.kernelPackages = pkgs.linuxPackages_5_15; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + systemd.sleep.extraConfig = '' HibernateMode=shutdown ''; @@ -43,8 +47,8 @@ in # https://ubuntuforums.org/showthread.php?t=2409856 services.cron.systemCronJobs = [ "@reboot root ${pkgs.util-linux}/bin/rfkill block bluetooth" - "@reboot root ${pkgs.coreutils}/bin/echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" - "@reboot root ${pkgs.coreutils}/bin/echo 510 > /sys/class/backlight/gmux_backlight/brightness" + "@reboot root ${pkgs.coreutils}/bin/sleep 10; ${pkgs.coreutils}/bin/echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" + "@reboot root ${pkgs.coreutils}/bin/sleep 11; ${pkgs.coreutils}/bin/echo 510 > /sys/class/backlight/gmux_backlight/brightness" ]; # Increase console font size for HiDPI display @@ -116,7 +120,6 @@ in hardware.firmware = with pkgs; [ wireless-regdb ]; boot.extraModprobeConfig = '' options cfg80211 ieee80211_regdom="DE" - blacklist amdgpu ''; # This value determines the NixOS release from which the default diff --git a/hosts/dumpyourvms/unbound.nix b/hosts/dumpyourvms/unbound.nix index 43e16aba..c7c0b519 100644 --- a/hosts/dumpyourvms/unbound.nix +++ b/hosts/dumpyourvms/unbound.nix @@ -30,13 +30,11 @@ forward-addr = [ "5.1.66.255@853#dot.ffmuc.net" "185.150.99.255@853#dot.ffmuc.net" - "145.100.185.18@853#dnsovertls3.sinodun.com" "89.233.43.71@853#unicast.censurfridns.dk" "94.130.110.185@853#ns1.dnsprivacy.at" "2001:678:e68:f000::@853#dot.ffmuc.net" "2001:678:ed0:f000::@853#dot.ffmuc.net" - "2001:610:1:40ba:145:100:185:18@853#dnsovertls3.sinodun.com" "2a01:3a0:53:53::0@853#unicast.censurfridns.dk" "2a01:4f8:c0c:3c03::2@853#ns1.dnsprivacy.at" "2a01:4f8:c0c:3bfc::2@853#ns2.dnsprivacy.at" diff --git a/hosts/fae.nix b/hosts/fae.nix new file mode 100644 index 00000000..45aab903 --- /dev/null +++ b/hosts/fae.nix @@ -0,0 +1,59 @@ +{ config, lib, pkgs, profiles, ... }: +{ + imports = [ + # profiles.networking + #profiles.core + "${fetchTarball { + url = "https://github.com/NixOS/nixos-hardware/archive/8f1bf828d8606fe38a02df312cf14546ae200a72.tar.gz"; + sha256 = "11milap153g3f63fcrcv4777vd64f7wlfkk9p3kpxi6dqd2sxvh4"; + } + }/raspberry-pi/4" + profiles.users.root # make sure to configure ssh keys + profiles.users.nixos + ]; + + config = { + pub-solar.x-os.iso-options.enable = true; + + fileSystems = { + "/" = { + device = "/dev/disk/by-label/NIXOS_SD"; + fsType = "ext4"; + options = [ "noatime" ]; + }; + }; + + networking = { + hostName = "fae"; + }; + + environment.systemPackages = with pkgs; [ vim ]; + + services.openssh.enable = true; + + #users = { + # mutableUsers = false; + # users."${user}" = { + # isNormalUser = true; + # password = password; + # extraGroups = [ "wheel" ]; + # }; + #}; + + security.sudo.extraConfig = lib.mkAfter '' + %wheel ALL=(ALL) NOPASSWD:ALL + ''; + + + # Enable GPU acceleration + hardware.raspberry-pi."4".fkms-3d.enable = true; + + #services.xserver = { + # enable = true; + # displayManager.lightdm.enable = true; + # desktopManager.xfce.enable = true; + #}; + + hardware.pulseaudio.enable = true; + }; +} diff --git a/modules/audio/default.nix b/modules/audio/default.nix index 51ec0b7e..6a550cfd 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -74,6 +74,6 @@ in services.blueman.enable = true; # Enable audio server & client - services.mopidy = import ./mopidy.nix pkgs; + #services.mopidy = import ./mopidy.nix pkgs; }; } diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index bbf8f59d..f2e2ffcf 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -92,6 +92,7 @@ in gnome3.adwaita-icon-theme gnome.eog gnome3.nautilus + gnome.yelp wine diff --git a/modules/social/default.nix b/modules/social/default.nix index 90a23c3e..13a45166 100644 --- a/modules/social/default.nix +++ b/modules/social/default.nix @@ -12,10 +12,9 @@ in config = mkIf cfg.enable { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home.packages = [ - #mySignalDesktop signal-desktop tdesktop - element-desktop-wayland + element-desktop-search-fixed irssi ]; }; diff --git a/modules/sway/default.nix b/modules/sway/default.nix index cfc5733c..b690d9c0 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -32,7 +32,17 @@ in xdg.portal = { enable = true; - extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ]; + wlr = { + enable = true; + settings = { + screencast = { + max_fps = 30; + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; + }; + }; + }; + extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; gtkUsePortal = true; }; diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 17262f77..7ae57fab 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -18,7 +18,6 @@ in environment.shells = with pkgs; [ zsh ]; - environment.systemPackages = with pkgs; [ screen ]; diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index e46c82e2..02102c49 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -74,9 +74,7 @@ in nodePackages.typescript-language-server nodePackages.vim-language-server nodePackages.vue-language-server - nodePackages.vscode-css-languageserver-bin - nodePackages.vscode-html-languageserver-bin - nodePackages.vscode-json-languageserver-bin + nodePackages.vscode-langservers-extracted nodePackages.yaml-language-server python39Packages.python-lsp-server python3Full @@ -131,6 +129,7 @@ in vim-go vim-javascript vim-json + SchemaStore-nvim vim-markdown vim-nix vim-ruby diff --git a/modules/terminal-life/nvim/lsp.vim b/modules/terminal-life/nvim/lsp.vim index 1d5bf4d4..9b1e1b00 100644 --- a/modules/terminal-life/nvim/lsp.vim +++ b/modules/terminal-life/nvim/lsp.vim @@ -33,24 +33,26 @@ lua <lua vim.lsp.buf.hover()', opts) buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) - buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) - buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) + buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) + buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) + buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) + buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) + buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) - buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) - buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) - buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) - buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) + buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) + buf_set_keymap('n', 'dp', 'lua vim.lsp.diagnostic.goto_prev()', opts) + buf_set_keymap('n', 'dn', 'lua vim.lsp.diagnostic.goto_next()', opts) + buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) + buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) end -- Add additional capabilities supported by nvim-cmp local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) + -- vscode HTML lsp needs this https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html + capabilities.textDocument.completion.completionItem.snippetSupport = true for lsp_key, lsp_settings in pairs({ 'bashls', ------------------------------- Bash @@ -76,10 +78,14 @@ lua <got :GoTest:botright copen +autocmd FileType go nmap gd :GoDef +autocmd FileType go nmap gD :GoDecls " Go formatting autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index d892170c..8a50e93b 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -22,7 +22,6 @@ in [ "$(tty)" = "/dev/tty1" ] && exec sway ''; - shellAliases = { nano = "nvim"; vi = "nvim"; @@ -71,13 +70,14 @@ in bindkey '^R' fzf-history-widget # ArrowUp/Down start searching history with current input - autoload -U history-search-end - zle -N history-beginning-search-backward-end history-search-end - zle -N history-beginning-search-forward-end history-search-end - bindkey "^[[A" history-beginning-search-backward-end - bindkey "^[[B" history-beginning-search-forward-end - bindkey "^P" history-beginning-search-backward-end - bindkey "^N" history-beginning-search-forward-end + autoload -U up-line-or-beginning-search + autoload -U down-line-or-beginning-search + zle -N up-line-or-beginning-search + zle -N down-line-or-beginning-search + bindkey "^[[A" up-line-or-beginning-search + bindkey "^[[B" down-line-or-beginning-search + bindkey "^P" up-line-or-beginning-search + bindkey "^N" down-line-or-beginning-search # MAKE CTRL+S WORK IN VIM stty -ixon diff --git a/modules/virtualisation/default.nix b/modules/virtualisation/default.nix index 4d588622..ad3db4e7 100644 --- a/modules/virtualisation/default.nix +++ b/modules/virtualisation/default.nix @@ -19,7 +19,7 @@ in virtualisation.libvirtd = { enable = true; - qemuOvmf = true; + qemu.ovmf.enable = true; }; users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] { extraGroups = [ "libvirtd" ]; diff --git a/modules/x-os/boot.nix b/modules/x-os/boot.nix index 51cd5b4b..0633bec4 100644 --- a/modules/x-os/boot.nix +++ b/modules/x-os/boot.nix @@ -1,16 +1,22 @@ { config, pkgs, lib, ... }: - +with lib; let cfg = config.pub-solar.x-os; in { + options.pub-solar.x-os.iso-options.enable = mkOption { + type = types.bool; + default = false; + description = "Feature flag for iso builds"; + }; config = { # Enable plymouth for better experience of booting boot.plymouth.enable = true; # Mount / luks device in initrd # Allow fstrim to work on it. - boot.initrd = { + # The ! makes this enabled by default + boot.initrd = mkIf (!cfg.iso-options.enable) { luks.devices."cryptroot" = { allowDiscards = true; }; diff --git a/overlays/element-desktop.nix b/overlays/element-desktop.nix new file mode 100644 index 00000000..dce8b8e4 --- /dev/null +++ b/overlays/element-desktop.nix @@ -0,0 +1,8 @@ +final: prev: { + element-desktop-search-fixed = prev.element-desktop-wayland.overrideAttrs (oldAttrs: { + fixupPhase = '' + wrapProgram $out/bin/element-desktop \ + --prefix LD_PRELOAD : ${prev.sqlcipher}/lib/libsqlcipher.so + ''; + }); +} diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 477c1f8a..7b313492 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -4,33 +4,28 @@ channels: final: prev: { inherit (channels.latest) cachix - deploy-rs - docker - docker-compose_2 dhall discord element-desktop rage nixpkgs-fmt - nomad - rage + qutebrowser signal-desktop starship deploy-rs + thunderbird + firefox-wayland element-desktop-wayland - neovim-unwrapped + nomad tdesktop - xdg-desktop-portal - xdg-desktop-portal-gtk - xdg-desktop-portal-wlr obs-studio obs-studio-plugins looking-glass-client ; # nix is set to 2.3 in 21.11 - nix-direnv = prev.nix-direnv.override { nix = prev.nixUnstable; }; + nix-direnv = prev.nix-direnv.override { nix_2_4 = true; }; haskellPackages = prev.haskellPackages.override (old: { @@ -43,4 +38,7 @@ channels: final: prev: { haskell-language-server; }); }); + + # Example to override node package + # nodePackages = prev.nodePackages // { inherit (channels.latest.nodePackages) manta; }; } diff --git a/pkgs/default.nix b/pkgs/default.nix index 312e685f..3f32f8b1 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -3,6 +3,7 @@ with final; { # keep sources this first sources = prev.callPackage (import ./_sources/generated.nix) { }; # then, call packages with `final.callPackage` + gpu-switch = writeShellScriptBin "gpu-switch" (import ./gpu-switch.nix final); import-gtk-settings = writeShellScriptBin "import-gtk-settings" (import ./import-gtk-settings.nix final); lgcl = writeShellScriptBin "lgcl" (import ./lgcl.nix final); mailto-mutt = writeShellScriptBin "mailto-mutt" (import ./mailto-mutt.nix final); diff --git a/pkgs/gpu-switch.nix b/pkgs/gpu-switch.nix new file mode 100644 index 00000000..a6045ff9 --- /dev/null +++ b/pkgs/gpu-switch.nix @@ -0,0 +1,69 @@ +self: with self; '' + # Copyright (c) 2014-2015 Bruno Bierbaumer, Andreas Heider + + readonly sysfs_efi_vars='/sys/firmware/efi/efivars' + readonly efi_gpu='gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9' + + usage(){ + cat <&2 + exit 1 + fi + + if ! mount | grep -q $sysfs_efi_vars; then + if ! mount -t efivarfs none $sysfs_efi_vars; then + printf "Fatal: Couldn't mount ''${sysfs_efi_vars}.\n" 1>&2 + exit 1 + fi + fi + chattr -i "''${sysfs_efi_vars}/''${efi_gpu}" 2> /dev/null + printf "\x07\x00\x00\x00\x''${1}\x00\x00\x00" > "''${sysfs_efi_vars}/''${efi_gpu}" + } + + if [ $# -ne 1 ]; then + usage 1>&2 + exit 1 + fi + + case "$1" in + -i|--integrated) + switch_gpu 1 + ;; + -d|--dedicated) + switch_gpu 0 + ;; + -h|--help) + usage + ;; + *) + usage 1>&2 + exit 1 + ;; + esac +'' diff --git a/pkgs/mopidy-jellyfin.nix b/pkgs/mopidy-jellyfin.nix index 8c99ac21..a3cde276 100644 --- a/pkgs/mopidy-jellyfin.nix +++ b/pkgs/mopidy-jellyfin.nix @@ -1,20 +1,20 @@ self: with self; let - websocket-client = python38.pkgs.buildPythonPackage rec { + websocket-client = python39.pkgs.buildPythonPackage rec { pname = "websocket-client"; - version = "1.0.0"; + version = "1.2.1"; doCheck = false; - src = python38.pkgs.fetchPypi { + src = python39.pkgs.fetchPypi { inherit pname version; - sha256 = "sha256-UFGzii9MJ/vXygd+uyPsaWWmJt7VqVY382vhs1tsT4E="; + sha256 = "sha256-jftxXYqZL1cS//jIQ62ulOIrIqmbLF5rDsShqYHMTg0="; }; }; in -python38.pkgs.buildPythonPackage rec { +python39.pkgs.buildPythonPackage rec { pname = "Mopidy-Jellyfin"; version = "1.0.2"; doCheck = false; - propagatedBuildInputs = with python38.pkgs; [ + propagatedBuildInputs = with python39.pkgs; [ unidecode websocket-client requests @@ -22,7 +22,7 @@ python38.pkgs.buildPythonPackage rec { pykka mopidy ]; - src = python38.pkgs.fetchPypi { + src = python39.pkgs.fetchPypi { inherit pname version; sha256 = "sha256-5XimIIQSpvNyQbSOFtSTkA0jhA0V68BbyQEQNnov+0g="; }; diff --git a/profiles/base-user/.config/waybar/config b/profiles/base-user/.config/waybar/config index f38c6946..9ab5229f 100644 --- a/profiles/base-user/.config/waybar/config +++ b/profiles/base-user/.config/waybar/config @@ -4,7 +4,7 @@ "height": 26, // Waybar height "modules-left": ["sway/workspaces", "sway/mode"], - "modules-center": ["mpd"], + //"modules-center": ["mpd"], "modules-right": ["sway/language", "pulseaudio", "network", "idle_inhibitor", "battery", "clock", "tray"], "sway/workspaces": { "disable-scroll": true diff --git a/shell/bud/default.nix b/shell/bud/default.nix index c486636b..f65e71ed 100644 --- a/shell/bud/default.nix +++ b/shell/bud/default.nix @@ -1,7 +1,7 @@ { pkgs, lib, budUtils, ... }: { bud.cmds = with pkgs; { get = { - writer = budUtils.writeBashWithPaths [ nixUnstable git coreutils ]; + writer = budUtils.writeBashWithPaths [ nixFlakes git coreutils ]; synopsis = "get [DEST]"; help = "Copy the desired template to DEST"; script = ./get.bash; diff --git a/shell/devos.nix b/shell/devos.nix index dd6f75ef..8702740a 100644 --- a/shell/devos.nix +++ b/shell/devos.nix @@ -15,6 +15,9 @@ in imports = [ "${extraModulesPath}/git/hooks.nix" ]; git = { inherit hooks; }; + # override for our own welcome + devshell.name = pkgs.lib.mkForce "PubSolarOS"; + # tempfix: remove when merged https://github.com/numtide/devshell/pull/123 devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry '' # PATH is devshell's exorbitant privilige: @@ -31,7 +34,7 @@ in ''); commands = with pkgs; [ - (devos nixUnstable) + (devos nixFlakes) (devos agenix) { category = "devos"; diff --git a/users/teutat3s/.config/git/config.nix b/users/teutat3s/.config/git/config.nix index 10cbd6f0..3993ce02 100644 --- a/users/teutat3s/.config/git/config.nix +++ b/users/teutat3s/.config/git/config.nix @@ -1,7 +1,13 @@ { config, pkgs, ... }: let in -pkgs.lib.mkAfter ''[includeIf "gitdir:~/CodeRoom/greenbaum.cloud/"] +pkgs.lib.mkAfter ''[sendemail] + smtpserver = smtp.mailbox.org + smtpuser = jhonas@mailbox.org + smtpencryption = tls + smtpserverport = 587 + +[includeIf "gitdir:~/CodeRoom/greenbaum.cloud/"] path = ~/.config/git/config_greenbaum.cloud [includeIf "gitdir:~/CodeRoom/git.b12f.io/"] diff --git a/users/teutat3s/.config/watson/config.nix b/users/teutat3s/.config/watson/config.nix new file mode 100644 index 00000000..83142743 --- /dev/null +++ b/users/teutat3s/.config/watson/config.nix @@ -0,0 +1,29 @@ +{ config, pkgs, ... }: +let +in +''# Watson configuration +# showing defaults commented out + +# not implemented yet as of 2.0.1 +#[backend] +#url = https://api.crick.fr +#token = yourapitoken + +[options] +#options.confirm_new_project = false +#options.confirm_new_tag = false +date_format = %d.%m.%Y +#log_current = false +#pager = true +#report_current = false +#reverse_log = true +stop_on_start = true +#stop_on_restart = false +time_format = %H:%M%z +#week_start = monday + +#[default_tags] +#project-name = tag1 tag2 +#python101 = teaching python +#voyager2 = nasa 'space mission' +'' diff --git a/users/teutat3s/home.nix b/users/teutat3s/home.nix index 6329042a..b54a01a2 100644 --- a/users/teutat3s/home.nix +++ b/users/teutat3s/home.nix @@ -15,17 +15,19 @@ in { key = "V"; mods = "Control|Super"; action = "Paste"; } { key = "C"; mods = "Control|Super"; action = "Copy"; } ]; - services.kbfs.enable = false; - services.keybase.enable = false; + services.kbfs.enable = true; + services.keybase.enable = true; services.yubikey-agent.enable = true; home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { xdg.configFile."git/config".text = import ./.config/git/config.nix { inherit config; inherit pkgs; }; xdg.configFile."git/config_greenbaum.cloud".text = import ./.config/git/config_greenbaum.cloud.nix { inherit config; inherit pkgs; }; xdg.configFile."git/config_git.b12f.io".text = import ./.config/git/config_git.b12f.io.nix { inherit config; inherit pkgs; }; + xdg.configFile."watson/config".text = import ./.config/watson/config.nix { inherit config; inherit pkgs; }; home.packages = with pkgs; [ AusweisApp2 consul + gpu-switch ifmetric ipmitool keybase-gui @@ -67,7 +69,7 @@ in }; programs.zsh = { - initExtra = import ./zshrc.nix pkgs; + initExtra = import ./zshrc.nix { inherit config; inherit pkgs; }; }; # xdg.configFile."wallpaper.jpg".source = ./assets/wallpaper.jpg; diff --git a/users/teutat3s/session-variables.nix b/users/teutat3s/session-variables.nix index e9db7172..040e0b8f 100644 --- a/users/teutat3s/session-variables.nix +++ b/users/teutat3s/session-variables.nix @@ -7,6 +7,7 @@ in home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home.sessionVariables = { DRONE_SERVER = "https://ci.b12f.io"; + GOPATH = "/home/${psCfg.user.name}/CodeRoom/go"; }; }; } diff --git a/users/teutat3s/zshrc.nix b/users/teutat3s/zshrc.nix index 97bc4861..8b6b3992 100644 --- a/users/teutat3s/zshrc.nix +++ b/users/teutat3s/zshrc.nix @@ -1,4 +1,4 @@ -pkgs: +{ config, pkgs, ... }: '' bindkey "^[[1;3D" backward-word bindkey "^[[1;3C" forward-word @@ -83,5 +83,5 @@ pkgs: complete -o nospace -C ${pkgs.waypoint}/bin/waypoint waypoint complete -C '${pkgs.awscli2}/bin/aws_completer' ${pkgs.awscli2}/bin/aws - source /run/secrets/environment-secrets + source ${config.age.secrets.environment-secrets.path} '' From 7becfcd913aac24f11d52a67884e5ab9b5da1a27 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 14:42:02 +0100 Subject: [PATCH 24/58] Fix last upstream merge, add back openssh service Dont't autoUpgrade by default --- profiles/core/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 87b79740..eca35b4e 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -117,7 +117,11 @@ in ''; }; - system.autoUpgrade.enable = true; + # 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; From a4dbe4fa785ac542382d5de9f61ae6090a8227c0 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 16:19:36 +0100 Subject: [PATCH 25/58] Reference nix-dram package directly from inputs This should avoid patches not working because our pkgs follows nixos = release-21.11 and nix-dram follows nixos-unstable --- flake.nix | 1 - profiles/core/default.nix | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index b50837b4..26e442ad 100644 --- a/flake.nix +++ b/flake.nix @@ -71,7 +71,6 @@ nur.overlay agenix.overlay nvfetcher.overlay - nix-dram.overlay ./pkgs/default.nix ]; }; diff --git a/profiles/core/default.nix b/profiles/core/default.nix index eca35b4e..dca063f4 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -93,7 +93,7 @@ in nix = { # use nix-dram, a patched nix command, see: https://github.com/dramforever/nix-dram - package = pkgs.nix-dram; + package = inputs.nix-dram.packages.${pkgs.system}.nix-dram; # Improve nix store disk usage autoOptimiseStore = true; From 2748fbcdee0df2e6ef10fa849bd518385c8a1f40 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:09:49 +0100 Subject: [PATCH 26/58] wayland: use NIXOS_OZONE_WL instead of *-wayland packages --- modules/social/default.nix | 2 +- modules/sway/config/config.d/custom-keybindings.conf | 2 +- overlays/overrides.nix | 1 - profiles/base-user/session-variables.nix | 3 +++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/social/default.nix b/modules/social/default.nix index 90a23c3e..f3aa63b7 100644 --- a/modules/social/default.nix +++ b/modules/social/default.nix @@ -15,7 +15,7 @@ in #mySignalDesktop signal-desktop tdesktop - element-desktop-wayland + element-desktop irssi ]; }; diff --git a/modules/sway/config/config.d/custom-keybindings.conf b/modules/sway/config/config.d/custom-keybindings.conf index 6218d900..5faddece 100644 --- a/modules/sway/config/config.d/custom-keybindings.conf +++ b/modules/sway/config/config.d/custom-keybindings.conf @@ -18,7 +18,7 @@ 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 --enable-features=UseOzonePlatform --ozone-platform=wayland +bindsym $mod+Shift+F4 exec signal-desktop 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 diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 5c114143..c0cb58ad 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -14,7 +14,6 @@ channels: final: prev: { starship deploy-rs - element-desktop-wayland neovim-unwrapped tdesktop xdg-desktop-portal diff --git a/profiles/base-user/session-variables.nix b/profiles/base-user/session-variables.nix index 264d787f..cc3aa69f 100644 --- a/profiles/base-user/session-variables.nix +++ b/profiles/base-user/session-variables.nix @@ -58,6 +58,9 @@ let # experimental wayland in firefox/thunderbird MOZ_ENABLE_WAYLAND = "1"; + # chromium / electron on wayland: enable ozone (native wayland mode) + NIXOS_OZONE_WL = "1"; + # Vagrant VAGRANT_HOME = "${xdg.dataHome}/vagrant"; VAGRANT_DEFAULT_PROVIDER = "libvirt"; From 2690f79f109d6a45e778e1b43134e5afc2c2b603 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:34:08 +0100 Subject: [PATCH 27/58] Use newer ansible version instead of pythonPackages one --- modules/devops/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/devops/default.nix b/modules/devops/default.nix index 04f886a0..9c0d9a9e 100644 --- a/modules/devops/default.nix +++ b/modules/devops/default.nix @@ -15,7 +15,8 @@ in drone-cli nmap pgcli - python38Packages.ansible + ansible + ansible-lint restic shellcheck terraform_0_15 From 19bf284361390ff400ce6f4f6053a1425001dc3c Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:34:32 +0100 Subject: [PATCH 28/58] terminal-life: add asciinema --- modules/terminal-life/default.nix | 1 + modules/terminal-life/nvim/neovim-0.6.1.patch | 99 +++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 modules/terminal-life/nvim/neovim-0.6.1.patch diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 7ae57fab..cec6d4fe 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -26,6 +26,7 @@ in home.packages = [ ack ag + asciinema bat exa fd diff --git a/modules/terminal-life/nvim/neovim-0.6.1.patch b/modules/terminal-life/nvim/neovim-0.6.1.patch new file mode 100644 index 00000000..4f34b297 --- /dev/null +++ b/modules/terminal-life/nvim/neovim-0.6.1.patch @@ -0,0 +1,99 @@ +diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix +index e46c82e..02102c4 100644 +--- a/modules/terminal-life/nvim/default.nix ++++ b/modules/terminal-life/nvim/default.nix +@@ -74,9 +74,7 @@ in + nodePackages.typescript-language-server + nodePackages.vim-language-server + nodePackages.vue-language-server +- nodePackages.vscode-css-languageserver-bin +- nodePackages.vscode-html-languageserver-bin +- nodePackages.vscode-json-languageserver-bin ++ nodePackages.vscode-langservers-extracted + nodePackages.yaml-language-server + python39Packages.python-lsp-server + python3Full +@@ -131,6 +129,7 @@ in + vim-go + vim-javascript + vim-json ++ SchemaStore-nvim + vim-markdown + vim-nix + vim-ruby +diff --git a/modules/terminal-life/nvim/lsp.vim b/modules/terminal-life/nvim/lsp.vim +index 1d5bf4d..83e5d8c 100644 +--- a/modules/terminal-life/nvim/lsp.vim ++++ b/modules/terminal-life/nvim/lsp.vim +@@ -40,10 +40,10 @@ lua <rn', 'lua vim.lsp.buf.rename()', opts) + buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) + buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) +- buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) +- buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) +- buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) +- buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) ++ buf_set_keymap('n', 'e', 'lua vim.diagnostic.open_float()', opts) ++ buf_set_keymap('n', 'g[', 'lua vim.diagnostic.goto_prev()', opts) ++ buf_set_keymap('n', 'g]', 'lua vim.diagnostic.goto_next()', opts) ++ buf_set_keymap('n', 'q', 'lua vim.diagnostic.setloclist()', opts) + buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) + + end +@@ -51,6 +51,8 @@ lua < g[ PrevDiagnosticCycle From ad3fc6126da2dc47fa29abdb3f24c1dfe25d7cc3 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:37:21 +0100 Subject: [PATCH 29/58] core: add missing argument inputs --- profiles/core/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/core/default.nix b/profiles/core/default.nix index dca063f4..f45e7a78 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -1,4 +1,4 @@ -{ self, config, lib, pkgs, ... }: +{ self, config, lib, pkgs, inputs, ... }: let inherit (lib) fileContents; in { From af6c13f3e697dd076e6922abf0f2242c122119e1 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:35:00 +0100 Subject: [PATCH 30/58] modules: user: add publicKeys option --- modules/user/default.nix | 5 +++++ profiles/base-user/default.nix | 1 + 2 files changed, 6 insertions(+) diff --git a/modules/user/default.nix b/modules/user/default.nix index 79e32eca..2fd5958e 100644 --- a/modules/user/default.nix +++ b/modules/user/default.nix @@ -21,6 +21,11 @@ in type = types.nullOr types.str; default = null; }; + publicKeys = mkOption { + description = "User SSH public keys"; + type = types.listOf types.path; + default = [ ]; + }; fullName = mkOption { description = "User full name"; type = types.nullOr types.str; diff --git a/profiles/base-user/default.nix b/profiles/base-user/default.nix index ec8145a9..44089bec 100644 --- a/profiles/base-user/default.nix +++ b/profiles/base-user/default.nix @@ -19,6 +19,7 @@ in extraGroups = [ "wheel" "docker" "input" "audio" "video" "networkmanager" "lp" "scanner" ]; 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 []; }; }; } From 6b0994ac4e0f57a4548c068060db513035e29356 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:35:52 +0100 Subject: [PATCH 31/58] pkgs: lgcl: fix nix flake check for aarch64-linux --- pkgs/lgcl.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/lgcl.nix b/pkgs/lgcl.nix index 4ef2dac9..1d973e81 100644 --- a/pkgs/lgcl.nix +++ b/pkgs/lgcl.nix @@ -1,3 +1,9 @@ -self: with self; '' - ${self.looking-glass-client}/bin/looking-glass-client -f /dev/shm/looking-glass input:ignoreWindowsKeys=yes input:grabKeyboardOnFocus=no +self: with self; +let + looking-glass-client = self.looking-glass-client.overrideAttrs (old: { + meta.platforms = [ "x86_64-linux" "aarch64-linux" ]; + }); +in +'' + ${looking-glass-client}/bin/looking-glass-client -f /dev/shm/looking-glass input:ignoreWindowsKeys=yes input:grabKeyboardOnFocus=no '' From 0555636f26532cb986ed31a28c3b6bf0e9050739 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:37:21 +0100 Subject: [PATCH 32/58] core: add missing argument inputs --- profiles/core/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 0a3d02ce..d01d0aa7 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -1,4 +1,4 @@ -{ self, config, lib, pkgs, ... }: +{ self, config, lib, pkgs, inputs, ... }: let inherit (lib) fileContents; in { From f5f6ddd10c019276ffc0ea90e2528562e94f3559 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:43:05 +0100 Subject: [PATCH 33/58] core: add ncd, useful for comparing versions of pkgs that will be upgraded, see: https://discourse.nixos.org/t/nvd-simple-nix-nixos-version-diff-tool/12397 --- profiles/core/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/profiles/core/default.nix b/profiles/core/default.nix index d01d0aa7..b50ef45f 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -68,6 +68,7 @@ in # Build broken, python2.7-PyJWT-2.0.1.drv' failed #nixops psos + nvd # Fun neofetch From 82aeb0ec392878a4117ae93b1c6886d75997bb17 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:45:26 +0100 Subject: [PATCH 34/58] iso: default user nixos becomes pub-solar --- flake.nix | 4 ++-- users/nixos/default.nix | 11 ----------- users/pub-solar/default.nix | 2 ++ 3 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 users/nixos/default.nix diff --git a/flake.nix b/flake.nix index a183e24c..6f4502e5 100644 --- a/flake.nix +++ b/flake.nix @@ -150,8 +150,8 @@ fae = { profilesOrder = [ "system" "direnv" ]; profiles.direnv = { - user = "nixos"; - path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.nixos; + user = "pub-solar"; + path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.pub-solar; }; }; }; diff --git a/users/nixos/default.nix b/users/nixos/default.nix deleted file mode 100644 index 077a52e4..00000000 --- a/users/nixos/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ hmUsers, ... }: -{ - home-manager.users = { inherit (hmUsers) nixos; }; - - users.users.nixos = { - password = "nixos"; - description = "default"; - isNormalUser = true; - extraGroups = [ "wheel" ]; - }; -} diff --git a/users/pub-solar/default.nix b/users/pub-solar/default.nix index af669b41..7289f717 100644 --- a/users/pub-solar/default.nix +++ b/users/pub-solar/default.nix @@ -5,12 +5,14 @@ pub-solar = { # These are your personal settings # The only required settings are `name` and `password`, + # for convenience, use publicKeys to add your SSH keys # The rest is used for programs like git user = { name = "pub-solar"; password = "$6$Kv0BCLU2Jg7GN8Oa$hc2vERKCbZdczFqyHPfgCaleGP.JuOWyd.bfcIsLDNmExGXI6Rnkze.SWzVzVS311KBznN/P4uUYAUADXkVtr."; fullName = "Pub Solar"; email = "iso@pub.solar"; + publicKeys = [ ../../secrets/teutat3s-yubikey.pub ]; }; }; } From 5dbcf14d1fea453bc8fb7e5256484320ed16df67 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:47:45 +0100 Subject: [PATCH 35/58] iso: use iso suite in PubSolarOS host --- flake.nix | 1 + hosts/PubSolarOS.nix | 15 +++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 6f4502e5..e02af16b 100644 --- a/flake.nix +++ b/flake.nix @@ -117,6 +117,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 ]; anonymous = [ pubsolaros users.pub-solar ]; teutat3s = pubsolaros ++ [ users.teutat3s ]; diff --git a/hosts/PubSolarOS.nix b/hosts/PubSolarOS.nix index 2438ac28..70cf7a08 100644 --- a/hosts/PubSolarOS.nix +++ b/hosts/PubSolarOS.nix @@ -1,15 +1,10 @@ -{ profiles, ... }: +{ suites, ... }: { ### root password is empty by default ### - imports = [ - # profiles.networking - profiles.core - profiles.users.root # make sure to configure ssh keys - profiles.users.pub-solar - profiles.base-user - profiles.graphical - profiles.pub-solar-iso - ]; + ### default password: pub-solar, optional: add your SSH keys + imports = + suites.iso + ; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; From 32a51fd9ef9cf6cc7ca6f842d1e9cfa3408bf747 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:48:58 +0100 Subject: [PATCH 36/58] dumpyourvms: fix floating network-manager windows --- hosts/dumpyourvms/.config/sway/config.d/applications.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/dumpyourvms/.config/sway/config.d/applications.conf b/hosts/dumpyourvms/.config/sway/config.d/applications.conf index c528a114..1b8f3726 100644 --- a/hosts/dumpyourvms/.config/sway/config.d/applications.conf +++ b/hosts/dumpyourvms/.config/sway/config.d/applications.conf @@ -4,7 +4,7 @@ assign [app_id="firefox"] $ws2 for_window [title="seahorse"] floating enabled # NetworkManager -for_window [title="Network Connections"] floating enabled +for_window [app_id="nm-connection-editor"] floating enabled # thunderbird for_window [title="New Task:*"] floating enabled From bcd9f7e0a309fdfd39dfb0a8f7244476bb247008 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:49:41 +0100 Subject: [PATCH 37/58] dumpyourvms: disable mopidy, vpn IP updates --- hosts/dumpyourvms/dumpyourvms.nix | 1 + hosts/dumpyourvms/networking.nix | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hosts/dumpyourvms/dumpyourvms.nix b/hosts/dumpyourvms/dumpyourvms.nix index e1e8abff..17710745 100644 --- a/hosts/dumpyourvms/dumpyourvms.nix +++ b/hosts/dumpyourvms/dumpyourvms.nix @@ -17,6 +17,7 @@ in }; pub-solar.virtualisation.enable = true; + pub-solar.audio.mopidy.enable = lib.mkForce false; # fix backlight for keyboard and brightness, adjust function key binding, # intel_pstate for cpu schedutil, resume offset for swapfile, disable amdgpu driver diff --git a/hosts/dumpyourvms/networking.nix b/hosts/dumpyourvms/networking.nix index 28a6601f..479ae7c8 100644 --- a/hosts/dumpyourvms/networking.nix +++ b/hosts/dumpyourvms/networking.nix @@ -1,8 +1,8 @@ { hosts = { "10.0.0.42" = [ "nomad.service.consul" ]; - "10.0.0.48" = [ "consul.service.consul" ]; - "10.0.0.49" = [ "vault.service.consul" ]; + "10.0.0.66" = [ "consul.service.consul" ]; + "10.0.0.67" = [ "vault.service.consul" ]; "10.0.0.200" = [ "headnode.cgn-1" ]; "10.0.0.201" = [ "cn01.cgn-1" ]; "10.0.0.202" = [ "cn02.cgn-1" ]; From bc07b99029eac4e3a51eef95e7f844a1ba3a84af Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:50:01 +0100 Subject: [PATCH 38/58] teutat3s: enable social profile --- users/teutat3s/home.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/users/teutat3s/home.nix b/users/teutat3s/home.nix index b54a01a2..e04f38c9 100644 --- a/users/teutat3s/home.nix +++ b/users/teutat3s/home.nix @@ -10,6 +10,8 @@ in ]; config = { + pub-solar.social.enable = true; + pub-solar.graphical.alacritty.settings.font.size = 12; pub-solar.graphical.alacritty.settings.key_bindings = [ { key = "V"; mods = "Control|Super"; action = "Paste"; } From f21a8f0e810502243d5b8925c7af02cf12bd88c9 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:50:16 +0100 Subject: [PATCH 39/58] teutat3s: add SSH public key --- secrets/teutat3s-yubikey.pub | 1 + 1 file changed, 1 insertion(+) create mode 100644 secrets/teutat3s-yubikey.pub diff --git a/secrets/teutat3s-yubikey.pub b/secrets/teutat3s-yubikey.pub new file mode 100644 index 00000000..0462fc12 --- /dev/null +++ b/secrets/teutat3s-yubikey.pub @@ -0,0 +1 @@ +ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFro/k4Mgqyh8yV/7Zwjc0dv60ZM7bROBU9JNd99P/4co6fxPt1pJiU/pEz2Dax/HODxgcO+jFZfvPEuLMCeAl0= YubiKey #10593996 PIV Slot 9a From a774ccdb0cd40789b99cb7ba3e6c731752ab4726 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:51:42 +0100 Subject: [PATCH 40/58] fae: boots PubSolarOS --- flake.nix | 5 ++++ hosts/fae.nix | 64 ++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 50 insertions(+), 19 deletions(-) diff --git a/flake.nix b/flake.nix index e02af16b..7754db3c 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,8 @@ channelsConfig = { allowUnfree = true; }; + supportedSystems = [ "x86_64-linux" "aarch64-linux" ]; + channels = { nixos = { imports = [ (digga.lib.importOverlays ./overlays) ]; @@ -149,6 +151,9 @@ deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { fae = { + hostname = "fae.fritz.box:22"; + sshUser = "pub-solar"; + fastConnect = true; profilesOrder = [ "system" "direnv" ]; profiles.direnv = { user = "pub-solar"; diff --git a/hosts/fae.nix b/hosts/fae.nix index 45aab903..fac810d0 100644 --- a/hosts/fae.nix +++ b/hosts/fae.nix @@ -9,7 +9,9 @@ } }/raspberry-pi/4" profiles.users.root # make sure to configure ssh keys - profiles.users.nixos + profiles.users.pub-solar + profiles.base-user + profiles.pub-solar-iso ]; config = { @@ -23,37 +25,61 @@ }; }; - networking = { - hostName = "fae"; - }; - - environment.systemPackages = with pkgs; [ vim ]; + environment.systemPackages = with pkgs; [ + (kodi-gbm.withPackages (p: with p; [ jellyfin netflix youtube ])) + ]; services.openssh.enable = true; - #users = { - # mutableUsers = false; - # users."${user}" = { - # isNormalUser = true; - # password = password; - # extraGroups = [ "wheel" ]; - # }; - #}; + networking.firewall = { + allowedTCPPorts = [ 8080 ]; + allowedUDPPorts = [ 8080 ]; + }; security.sudo.extraConfig = lib.mkAfter '' %wheel ALL=(ALL) NOPASSWD:ALL ''; + nix = { + autoOptimiseStore = true; + + gc.automatic = true; + + optimise.automatic = true; + + useSandbox = true; + + allowedUsers = [ "@wheel" ]; + + trustedUsers = [ "root" "@wheel" ]; + + extraOptions = '' + min-free = 536870912 + keep-outputs = true + keep-derivations = true + fallback = true + ''; + }; # Enable GPU acceleration hardware.raspberry-pi."4".fkms-3d.enable = true; - #services.xserver = { - # enable = true; - # displayManager.lightdm.enable = true; - # desktopManager.xfce.enable = true; - #}; + # Define a user account for kodi + users.extraUsers.kodi.isNormalUser = true; + + services.xserver = { + enable = true; + desktopManager.kodi.enable = true; + desktopManager.kodi.package = pkgs.kodi-gbm; + displayManager = { + autoLogin.enable = true; + autoLogin.user = "kodi"; + }; + }; hardware.pulseaudio.enable = true; + + # custom raspi boot loader is already present + boot.loader.systemd-boot.enable = lib.mkForce false; }; } From 0337015328b904bfb780d363ac6b6235bf46b4bf Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:52:31 +0100 Subject: [PATCH 41/58] overrides: remove unneeded element-desktop overlay --- overlays/element-desktop.nix | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 overlays/element-desktop.nix diff --git a/overlays/element-desktop.nix b/overlays/element-desktop.nix deleted file mode 100644 index dce8b8e4..00000000 --- a/overlays/element-desktop.nix +++ /dev/null @@ -1,8 +0,0 @@ -final: prev: { - element-desktop-search-fixed = prev.element-desktop-wayland.overrideAttrs (oldAttrs: { - fixupPhase = '' - wrapProgram $out/bin/element-desktop \ - --prefix LD_PRELOAD : ${prev.sqlcipher}/lib/libsqlcipher.so - ''; - }); -} From b0483a0757c37ec273fcdec807af36152cf22aa3 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:52:56 +0100 Subject: [PATCH 42/58] chore: bump flake lock --- flake.lock | 149 ++++++++++++++++++++++++++++++++--------------------- flake.nix | 8 +-- 2 files changed, 95 insertions(+), 62 deletions(-) diff --git a/flake.lock b/flake.lock index 67eda633..f9d9b519 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1640802000, - "narHash": "sha256-ZiI94Zv/IgW64fqKrtVaQqfUCkn9STvAjgfFmvtqcQ8=", + "lastModified": 1641576265, + "narHash": "sha256-G4W39k5hdu2kS13pi/RhyTOySAo7rmrs7yMUZRH0OZI=", "owner": "ryantm", "repo": "agenix", - "rev": "c5558c88b2941bf94886dfdede6926b1ba5f5629", + "rev": "08b9c96878b2f9974fc8bde048273265ad632357", "type": "github" }, "original": { @@ -27,11 +27,11 @@ "poetry2nix": "poetry2nix" }, "locked": { - "lastModified": 1630693543, - "narHash": "sha256-7Sly3ReaJZw60Qo0rpfN4jF6zy94nwQz6ENgUUFzJfg=", + "lastModified": 1641830469, + "narHash": "sha256-uhDmgNP/biOWe4FtOa6c2xZnREH+NP9rdrMm0LccRUk=", "owner": "lovesegfault", "repo": "beautysh", - "rev": "5609593961b70428f58d5c1b4b25cdda43b0d0bd", + "rev": "e85d9736927c0fcf2abb05cb3a2d8d9b4502a2eb", "type": "github" }, "original": { @@ -67,11 +67,11 @@ ] }, "locked": { - "lastModified": 1640836100, - "narHash": "sha256-My9Lay6BCDwAZgrL4SuVXHkYPHIU7ypnuiS/pd7eg1M=", + "lastModified": 1642035816, + "narHash": "sha256-1Lq5c1AeUv/1SK08+O704JVfDdD/zodHzA0cv0TIga8=", "owner": "divnix", "repo": "bud", - "rev": "b1d8ab3970f4dfb5fb90d7d8a9ab493c75d031fc", + "rev": "a789d710851441ba7e7cd59be378623b1fe05688", "type": "github" }, "original": { @@ -87,11 +87,11 @@ ] }, "locked": { - "lastModified": 1640117230, - "narHash": "sha256-W7LXeJavyIzNfNaoEsK65sEaCGqE9MVWvK0xSzNR4ls=", + "lastModified": 1642495030, + "narHash": "sha256-u1ZlFbLWzkM6zOfuZ1tr0tzTuDWucOYwALPWDWLorkE=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "5851d9613edf8b2279746c7e5b9faac55ff17e8a", + "rev": "bcdb6022b3a300abf59cb5d0106c158940f5120e", "type": "github" }, "original": { @@ -225,11 +225,11 @@ }, "flake-utils": { "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "lastModified": 1631561581, + "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", "owner": "numtide", "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", "type": "github" }, "original": { @@ -288,8 +288,23 @@ }, "flake-utils_4": { "locked": { - "lastModified": 1631561581, - "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", "owner": "numtide", "repo": "flake-utils", "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", @@ -324,11 +339,11 @@ }, "latest": { "locked": { - "lastModified": 1638198142, - "narHash": "sha256-plU9b8r4St6q4U7VHtG9V7oF8k9fIpfXl/KDaZLuY9k=", + "lastModified": 1643347846, + "narHash": "sha256-O0tyXF//ppRpe9yT1Uu5n34yI2MWDyY6ZiJ4Qn5zIkE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8a308775674e178495767df90c419425474582a1", + "rev": "5bb20f9dc70e9ee16e21cc404b6508654931ce41", "type": "github" }, "original": { @@ -354,6 +369,22 @@ "type": "github" } }, + "master": { + "locked": { + "lastModified": 1643636025, + "narHash": "sha256-pGU2qvKLMJ7jUbPdcWcdE8jSujy5iBI6ZFejpVHazUw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "be41b14875ff8d0fbcf80c13ace036a3fa4a96c3", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, "naersk": { "inputs": { "nixpkgs": [ @@ -376,19 +407,21 @@ }, "nix-dram": { "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_5" + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "latest" + ] }, "locked": { - "lastModified": 1639413393, - "narHash": "sha256-OcmY7yw6gu+fb3J8UT9Qmj1+eyP8HaOF133ojEx0aq8=", - "owner": "pub-solar", + "lastModified": 1643638527, + "narHash": "sha256-NoRwXgTk3zHaTM4egk4MbEnV7RTXWUTon3OiG0GHjhE=", + "owner": "dramforever", "repo": "nix-dram", - "rev": "07881073fcaa0fb394dbf8ce9fd1483afc376d95", + "rev": "86350dcada08e6f41fedd20f8c25a3a199a3be7d", "type": "github" }, "original": { - "owner": "pub-solar", + "owner": "dramforever", "repo": "nix-dram", "type": "github" } @@ -410,11 +443,11 @@ }, "nixos": { "locked": { - "lastModified": 1643463207, - "narHash": "sha256-W0azAxucUq84BvWqDPt3gX8kyc8wYvGUynZV9COfByQ=", + "lastModified": 1643630271, + "narHash": "sha256-0H+50Ys/8/rjE+64vpFRjwnDwthDfHh45IDpZ2BiECg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "03098169624f487eef37186b3214c40e6b6e919d", + "rev": "83a53b4adf04607af34060b2f7699a412fc9bc3d", "type": "github" }, "original": { @@ -427,10 +460,7 @@ "nixos-generators": { "inputs": { "nixlib": "nixlib", - "nixpkgs": [ - "digga", - "blank" - ] + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1637655461, @@ -448,11 +478,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1640686209, - "narHash": "sha256-6glXUlKRDhEhNuYx6r3fXU6KH2/Vq9mJZjB9oUpwrmc=", + "lastModified": 1641965797, + "narHash": "sha256-AfxfIzAZbt9aAzpVBn0Bwhd/M4Wix7G91kEjm9H6FPo=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "46df95ca81e7e4cf3458cdb4b7d1714b5fce9da5", + "rev": "87a35a0d58f546dc23f37b4f6af575d0e4be6a7a", "type": "github" }, "original": { @@ -463,11 +493,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1643428210, - "narHash": "sha256-ympCeHuXeGitpnegE0raAtWLNg3vZbjj5QbbMvvBGCQ=", + "lastModified": 1633971123, + "narHash": "sha256-WmI4NbH1IPGFWVkuBkKoYgOnxgwSfWDgdZplJlQ93vA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e1b353e890801a759efe9a4c42f6984e47721f0d", + "rev": "e4ef597edfd8a0ba5f12362932fc9b1dd01a0aef", "type": "github" }, "original": { @@ -479,11 +509,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1643513770, - "narHash": "sha256-Q64SabfQLuhHQfhpIHS/fLCEO2NUFnI+EKsB5GnfWh8=", + "lastModified": 1643634174, + "narHash": "sha256-LpfTneNuLmXuTyR4hPXtr92g1YAZymJUQxdHjTCi79w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "66ab3568d67b90275c0720aae8b911bad82c24fe", + "rev": "589235201f2e0717bee4915bffff5330fa00ff41", "type": "github" }, "original": { @@ -492,13 +522,13 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { - "lastModified": 1636976544, - "narHash": "sha256-9ZmdyoRz4Qu8bP5BKR1T10YbzcB9nvCeQjOEw2cRKR0=", + "lastModified": 1638986258, + "narHash": "sha256-OceRdctKZRSgqQxVRvvNB0MaEnFMzQqjUffecoDE9eI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "931ab058daa7e4cd539533963f95e2bb0dbd41e6", + "rev": "581d2d6c9cd5c289002203581d8aa0861963a933", "type": "github" }, "original": { @@ -508,18 +538,18 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1639399671, - "narHash": "sha256-KT+YqqPZsdzKNE4T8okeH8lV+a0vtFxD4w+P2CEZC40=", + "lastModified": 1643381941, + "narHash": "sha256-pHTwvnN4tTsEKkWlXQ8JMY423epos8wUOhthpwJjtpc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c95b2e99529891b1d52e065c34dd50c136151bcb", + "rev": "5efc8ca954272c4376ac929f4c5ffefcc20551d5", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-21.11", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -540,17 +570,17 @@ "nvfetcher": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_5", "nixpkgs": [ "nixos" ] }, "locked": { - "lastModified": 1640033174, - "narHash": "sha256-b8w7NgobOYLlFV9j+XGbF+51LpOll0QeatxEGRv7uhg=", + "lastModified": 1643518077, + "narHash": "sha256-FHhKjrPxvCv1aywLeqJi3kARDql7cwaj2jcpWp42Xhw=", "owner": "berberman", "repo": "nvfetcher", - "rev": "8bbf1921a36343f9a78c68e2bbc9798ab8f3b768", + "rev": "1b4adc9dac4c5f2c3ce14fdaf2702f9ce6bec491", "type": "github" }, "original": { @@ -565,11 +595,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1625240517, - "narHash": "sha256-2E1gaOP+bCplhf3kliVQWK5N1NV2h06mkJk2KTiRTJQ=", + "lastModified": 1633382856, + "narHash": "sha256-hYlet806M9xJj4yxf0g5fhDT2IEUVIMAl7sqIeZ8DUM=", "owner": "nix-community", "repo": "poetry2nix", - "rev": "e40e8ed0e8c11e709e4c8c7c20174facd265a021", + "rev": "705cbfa10e3d9bfed2e59e0256844ae3704dbd7e", "type": "github" }, "original": { @@ -587,6 +617,7 @@ "digga": "digga", "home": "home", "latest": "latest_2", + "master": "master", "naersk": "naersk", "nix-dram": "nix-dram", "nixos": "nixos", diff --git a/flake.nix b/flake.nix index 7754db3c..1f727e0f 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,7 @@ { nixos.url = "github:nixos/nixpkgs/release-21.11"; latest.url = "github:nixos/nixpkgs/nixos-unstable"; + master.url = "github:nixos/nixpkgs/master"; digga.url = "github:divnix/digga"; digga.inputs.nixpkgs.follows = "nixos"; @@ -41,7 +42,8 @@ nixos-hardware.url = "github:nixos/nixos-hardware"; # PubSolarOS additions - nix-dram.url = "github:pub-solar/nix-dram"; + nix-dram.url = "github:dramforever/nix-dram"; + nix-dram.inputs.nixpkgs.follows = "latest"; }; outputs = @@ -77,6 +79,7 @@ ]; }; latest = { }; + master = { }; }; lib = import ./lib { lib = digga.lib // nixos.lib; }; @@ -123,7 +126,6 @@ pubsolaros = [ core full-install base-user users.root ]; anonymous = [ pubsolaros users.pub-solar ]; teutat3s = pubsolaros ++ [ users.teutat3s ]; - con = teutat3s ++ [ graphical ]; dumpyourvms = teutat3s ++ [ graphical ]; ryzensun = teutat3s ++ [ graphical ]; }; @@ -140,8 +142,8 @@ }; }; users = { - teutat3s = { suites, ... }: { imports = suites.base; }; pub-solar = { suites, ... }: { imports = suites.base; }; + teutat3s = { suites, ... }: { imports = suites.base; }; }; # digga.lib.importers.rakeLeaves ./users/hm; }; From 7e3afff152ab7a67e2e3cca56838fabfe2af5d9c Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:53:28 +0100 Subject: [PATCH 43/58] overrides: use qMasterPassword from master nixpkgs --- overlays/overrides.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 400a57cb..0376132a 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -14,6 +14,8 @@ channels: final: prev: { starship deploy-rs + docker + docker-compose_2 nomad tdesktop obs-studio @@ -21,6 +23,10 @@ channels: final: prev: { looking-glass-client ; + inherit (channels.master) + qMasterPassword + ; + haskellPackages = prev.haskellPackages.override (old: { overrides = prev.lib.composeExtensions (old.overrides or (_: _: { })) (hfinal: hprev: From eca6d4d9993eb86cc80191749f48f9fb312b141d Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 2 Feb 2022 03:07:28 +0100 Subject: [PATCH 44/58] Use ttp shell function from tritonshell --- users/teutat3s/zshrc.nix | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/users/teutat3s/zshrc.nix b/users/teutat3s/zshrc.nix index 8b6b3992..f6723c14 100644 --- a/users/teutat3s/zshrc.nix +++ b/users/teutat3s/zshrc.nix @@ -54,18 +54,32 @@ alias wg-down="sudo systemctl stop wg-quick@wg0.service" # Helper function for docker on triton - ttdo () { + ttp() { if [[ "$1" == "set" ]]; then if [[ -n "$2" ]]; then + source unset-env.sh triton profile set "$2" fi - source ~/CodeRoom/greenbaum.cloud/triton-docker.env.sh + source ~/CodeRoom/greenbaum.cloud/tritonshell/template/pkgs/utils/triton-docker.env.sh elif [[ "$1" == "unset" ]]; then - eval "$(triton env --unset)" && unset TRITON_CNS_SEARCH_DOMAIN_PRIVATE TRITON_CNS_SEARCH_DOMAIN_PUBLIC + source ~/CodeRoom/greenbaum.cloud/tritonshell/template/pkgs/utils/unset-env.sh elif [[ "$1" == "env" ]]; then - env | grep "DOCKER\|TRITON\|SDC" + env | grep "DOCKER\|MANTA\|SDC\|TRITON" | sort else - /usr/bin/docker $@ + echo "this is a helper function to quickly switch triton profiles" + echo "and setup the required environment variables" + echo "for triton, manta and the remote docker host (API)" + echo + echo 'use "ttp set your-profile" to switch to a profile' + echo + echo 'use "ttp unset" to clear all environment variables used by these CLIs' + echo "useful if you'd like to run a docker command against the" + echo "local docker host" + echo + echo 'use "ttp env" to view the currently set environment variables' + echo "used by the triton & manta CLIs" + echo + echo 'use "ttp help" to view this help' fi } From 61967bc0e873cb13087c0a7aaa750e4674205372 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 2 Feb 2022 13:30:47 +0100 Subject: [PATCH 45/58] Update env secret --- secrets/environment-secrets.age | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/secrets/environment-secrets.age b/secrets/environment-secrets.age index da5644d6..dc867a11 100644 --- a/secrets/environment-secrets.age +++ b/secrets/environment-secrets.age @@ -1,11 +1,11 @@ age-encryption.org/v1 --> ssh-ed25519 Wp/X/Q C++E2jLATPQMAxb63nkqjPrgHoVDm1ZsUGr7niplsRY -K6dtOxlstQTNdKUNJA7UU1SwLzZ59loADXyQ1Li4Jos --> ssh-ed25519 8U1+ng yNH7UiUtOvW9H0Ff9XTVRi7nxQXqNRlUxRrWkvbYjwA -mJc/c+tLP7kRrR6OCV+b9Z7WkvDwuagbP3e8Nm67738 --> ssh-ed25519 BVsyTA o7UF3e1fMZKyN6wg3u5j4uHjc4tYZCABSCq0TxbwYnU -X6OG6ySS92rDBXMy5yC7rRqAfxzYe4Ahrpc/fqTd2Gk --> H-grease z7xB6LqI RK 4QF L, -nLqd2fYqYz7wfoQ5IWc41v5AMQeKeNZkabRMkYo ---- 7JewEr1iERrpdhFYTlscmFemDbUvKxxc2QWq482abjo -1+/4'GQbkqf |B}۟*|=侸wbY9\Q mڕ&- $C0 \ No newline at end of file +-> ssh-ed25519 Wp/X/Q IKfNl3gr5ua8kmzHnvIxSSF9BRFVyoLVBaQ5jzuFARI +uzHWNCEVtzi5dTqro2ybcKZk9eIH55EW3XQ3PN694Z4 +-> ssh-ed25519 8U1+ng utu6wEkelk2/T/y/NAOgjZuz30CT/epmQqU15pgsmSI +eH+xU7pl7Ok/tYVQBjumMMUo58UQWaOnbfE7bYxIyM8 +-> ssh-ed25519 BVsyTA 34Fk/GSuH8FJWNLZxE9798zfLawgJucGk7M8bEazHng +Z5B0o32wZLAK0u7iTrWUn8he4G5AW+z1DDhkYZeSDXA +-> :|0NxJA-grease Ko8o7 vL#k|]M +GmDtTyzO8xSd51y5FYQ9uGUe/dTbQYI/7UqK4CtH078GDYn4PIGNlIdqTca5MQ +--- mHoGm+wNh2RKcaqRVO3AFX2ravHNTHlIfq2ADiZPVmg +SCF"W`6}ib+ LVdχFr~?HPC~χJs5WMyXxރDGH \ No newline at end of file From 9d0eb01b1ad38edffc19da7a9096e11d96abfc40 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 3 Feb 2022 00:30:16 +0100 Subject: [PATCH 46/58] Add mdbook from pr 1306 with multilang support --- modules/terminal-life/default.nix | 1 + overlays/mdbook-multilang.nix | 20 ++++++++++++++++++++ shell/bud/get.bash | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 overlays/mdbook-multilang.nix diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index cec6d4fe..c253c4bd 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -32,6 +32,7 @@ in fd gh glow + mdbook-multilang nnn powerline vifm diff --git a/overlays/mdbook-multilang.nix b/overlays/mdbook-multilang.nix new file mode 100644 index 00000000..f1295a36 --- /dev/null +++ b/overlays/mdbook-multilang.nix @@ -0,0 +1,20 @@ +final: prev: { + mdbook-multilang = prev.mdbook.overrideAttrs (oldAttrs: rec { + pname = "mdbook"; + + version = "pr1306"; + + src = prev.fetchFromGitHub { + owner = "Ruin0x11"; + repo = "mdBook"; + rev = "9d8147c52dd9d50047ba5b29e4af99f92577806e"; + sha256 = "sha256-gJnQKHssO2ChiT4d037Lncd7hiOa5uh756p8TzPzbgQ="; + }; + + cargoDeps = oldAttrs.cargoDeps.overrideAttrs (prev.lib.const { + name = "${pname}-vendor.tar.gz"; + inherit src; + outputHash = "sha256-QCEyl5FZqECYYb5eRm8mn+R6owt+CLQwCq/AMMPygE0="; + }); + }); +} diff --git a/shell/bud/get.bash b/shell/bud/get.bash index 89e2af3d..d7cdedb8 100644 --- a/shell/bud/get.bash +++ b/shell/bud/get.bash @@ -1 +1 @@ - nix flake new -t "github:divnix/devos/main" "${2:-devos}" + nix flake new -t "github:divnix/devos/main" "${2:-devos}" From f4d59feb2922fc2b1750775683b49802d429245a Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 4 Feb 2022 12:57:19 +0100 Subject: [PATCH 47/58] watson: disable pager --- users/teutat3s/.config/watson/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/teutat3s/.config/watson/config.nix b/users/teutat3s/.config/watson/config.nix index 83142743..e9319aeb 100644 --- a/users/teutat3s/.config/watson/config.nix +++ b/users/teutat3s/.config/watson/config.nix @@ -14,7 +14,7 @@ in #options.confirm_new_tag = false date_format = %d.%m.%Y #log_current = false -#pager = true +pager = false #report_current = false #reverse_log = true stop_on_start = true From ea189c34616aebca35c48c5b1f6831bab8b46f5b Mon Sep 17 00:00:00 2001 From: Parthiv Seetharaman Date: Thu, 3 Feb 2022 13:19:09 -0800 Subject: [PATCH 48/58] README: typos and grammar --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 29d450dc..e2a83eb9 100644 --- a/README.md +++ b/README.md @@ -58,14 +58,15 @@ following giants][giants]: - [devshell](https://github.com/numtide/devshell) ## Divnix -The divnix org is an open space that spontaniously formed out of "the Nix". -It is really just a place where otherwise unrelated people a) get -together and b) stuff done. +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), -experiment and learn together and iterate quickly on best practices. That's what it is. +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 +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 From d6b84ca240e13dd39dbd37bd2589ca64a10865d8 Mon Sep 17 00:00:00 2001 From: Brendan Tobolaski Date: Thu, 17 Feb 2022 10:15:02 -0600 Subject: [PATCH 49/58] Fix decryption location for agenix --- doc/secrets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/secrets.md b/doc/secrets.md index 47ca43d4..8794925a 100644 --- a/doc/secrets.md +++ b/doc/secrets.md @@ -14,7 +14,7 @@ to easily setup those secret files declaratively. [agenix][agenix] encrypts secrets and stores them as .age files in your repository. Age files are encrypted with multiple ssh public keys, so any host or user with a matching ssh private key can read the data. The [age module][age module] will add those -encrypted files to the nix store and decrypt them on activation to `/run/secrets`. +encrypted files to the nix store and decrypt them on activation to `/run/agenix`. ### Setup All hosts must have openssh enabled, this is done by default in the core profile. From b0aadda88cc922ba92917da35ee4852fd2bd5748 Mon Sep 17 00:00:00 2001 From: Parthiv Seetharaman Date: Thu, 17 Feb 2022 16:22:48 -0800 Subject: [PATCH 50/58] flake: switch back to serokell deploy input There is a bug in the input-output-hk fork --- flake.lock | 64 ++++++++++-------------------------------------------- flake.nix | 2 +- 2 files changed, 13 insertions(+), 53 deletions(-) diff --git a/flake.lock b/flake.lock index 67701251..5d7d11d5 100644 --- a/flake.lock +++ b/flake.lock @@ -102,7 +102,6 @@ }, "deploy": { "inputs": { - "fenix": "fenix", "flake-compat": "flake-compat", "nixpkgs": [ "nixos" @@ -110,15 +109,15 @@ "utils": "utils" }, "locked": { - "lastModified": 1637357482, - "narHash": "sha256-mMRxOlcQs3V9cZYsKGKWEjl+oqclhaH1SKT3QGeTQ0Q=", - "owner": "input-output-hk", + "lastModified": 1643787431, + "narHash": "sha256-8IwuVgXulRE3ZWq6z8mytarawC32pKPKR20EyDtSH+w=", + "owner": "serokell", "repo": "deploy-rs", - "rev": "5a6db26726ec8c7904aea5bcdf13589342386f9d", + "rev": "4154ba1aaaf7333a916384c348d867d03b6f1409", "type": "github" }, "original": { - "owner": "input-output-hk", + "owner": "serokell", "repo": "deploy-rs", "type": "github" } @@ -172,25 +171,6 @@ "type": "github" } }, - "fenix": { - "inputs": { - "nixpkgs": "nixpkgs_3", - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1637303083, - "narHash": "sha256-e2A5JBjxYNpjoGd53K0oVUUaS9ojwOT5rnThyPNS46M=", - "owner": "nix-community", - "repo": "fenix", - "rev": "8294ceadbbbe1a886640bfcc15f5a02a2b471955", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -408,10 +388,7 @@ "nixos-generators": { "inputs": { "nixlib": "nixlib", - "nixpkgs": [ - "digga", - "blank" - ] + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1637655461, @@ -475,16 +452,16 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1636976544, - "narHash": "sha256-9ZmdyoRz4Qu8bP5BKR1T10YbzcB9nvCeQjOEw2cRKR0=", - "owner": "nixos", + "lastModified": 1644972330, + "narHash": "sha256-6V2JFpTUzB9G+KcqtUR1yl7f6rd9495YrFECslEmbGw=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "931ab058daa7e4cd539533963f95e2bb0dbd41e6", + "rev": "19574af0af3ffaf7c9e359744ed32556f34536bd", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-unstable", + "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -560,23 +537,6 @@ "nvfetcher": "nvfetcher" } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1637268320, - "narHash": "sha256-lxB1r+7cmZisiGLx0tZ2LaC6X/EcQTbRIWZfnLIIgs4=", - "owner": "rust-analyzer", - "repo": "rust-analyzer", - "rev": "f0da9406bcbde1bc727242b481d8de825e84f59a", - "type": "github" - }, - "original": { - "owner": "rust-analyzer", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "utils": { "locked": { "lastModified": 1637014545, diff --git a/flake.nix b/flake.nix index 50402527..ed387178 100644 --- a/flake.nix +++ b/flake.nix @@ -26,7 +26,7 @@ darwin.url = "github:LnL7/nix-darwin"; darwin.inputs.nixpkgs.follows = "nixos"; - deploy.url = "github:input-output-hk/deploy-rs"; + deploy.url = "github:serokell/deploy-rs"; deploy.inputs.nixpkgs.follows = "nixos"; agenix.url = "github:ryantm/agenix"; From 81ec0ecffc59ee1e933170300fc69ee5cbbeb280 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 22 Feb 2022 16:49:46 +0100 Subject: [PATCH 51/58] alacritty: better search colors highlighting --- modules/graphical/alacritty.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/graphical/alacritty.nix b/modules/graphical/alacritty.nix index f08be710..e4e2f6ad 100644 --- a/modules/graphical/alacritty.nix +++ b/modules/graphical/alacritty.nix @@ -106,6 +106,23 @@ cursor = "0xe3e1e4"; }; + # Colors used for the search bar and match highlighting. + search = { + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + matches = { + foreground = "0xe5c463"; + background = "0x1a181a"; + }; + focused_match = { + foreground = "0xe5c463"; + background = "0xe3e1e4"; + }; + #bar = + # background = "#c5c8c6"; + # foreground = "#1d1f21"; + }; + # Normal colors normal = { black = "0x1a181a"; From 6eb0925aafde8debb3f3d9edec2d863121d26f79 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 22 Feb 2022 16:50:18 +0100 Subject: [PATCH 52/58] update flake.lock --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index f9d9b519..600b6e87 100644 --- a/flake.lock +++ b/flake.lock @@ -355,11 +355,11 @@ }, "latest_2": { "locked": { - "lastModified": 1643347846, - "narHash": "sha256-O0tyXF//ppRpe9yT1Uu5n34yI2MWDyY6ZiJ4Qn5zIkE=", + "lastModified": 1645433236, + "narHash": "sha256-4va4MvJ076XyPp5h8sm5eMQvCrJ6yZAbBmyw95dGyw4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5bb20f9dc70e9ee16e21cc404b6508654931ce41", + "rev": "7f9b6e2babf232412682c09e57ed666d8f84ac2d", "type": "github" }, "original": { @@ -371,11 +371,11 @@ }, "master": { "locked": { - "lastModified": 1643636025, - "narHash": "sha256-pGU2qvKLMJ7jUbPdcWcdE8jSujy5iBI6ZFejpVHazUw=", + "lastModified": 1645539323, + "narHash": "sha256-s5qa/V4r+AG1441Ek8ORftiN7FaxP+vcseZhGkEhra0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "be41b14875ff8d0fbcf80c13ace036a3fa4a96c3", + "rev": "30b10a87fb5e277ab1927c61fdca26d5f19f7cc6", "type": "github" }, "original": { @@ -413,11 +413,11 @@ ] }, "locked": { - "lastModified": 1643638527, - "narHash": "sha256-NoRwXgTk3zHaTM4egk4MbEnV7RTXWUTon3OiG0GHjhE=", + "lastModified": 1644066500, + "narHash": "sha256-15PCSlsvYQOwJ+Jvp9evrBiun4pquPAh5VZAUO5whcw=", "owner": "dramforever", "repo": "nix-dram", - "rev": "86350dcada08e6f41fedd20f8c25a3a199a3be7d", + "rev": "579d5a3db2cb4726653a0916e0f210dbb84cb0a5", "type": "github" }, "original": { @@ -443,11 +443,11 @@ }, "nixos": { "locked": { - "lastModified": 1643630271, - "narHash": "sha256-0H+50Ys/8/rjE+64vpFRjwnDwthDfHh45IDpZ2BiECg=", + "lastModified": 1645488570, + "narHash": "sha256-29Fvczhd20K3ol0wbQrFlsUiYUDoGnpOR2XJTdrRnZA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "83a53b4adf04607af34060b2f7699a412fc9bc3d", + "rev": "491ad20776074706da6befe0cb8334f2df23fc00", "type": "github" }, "original": { From 869446df6343e06274423ef884a548730144f182 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 22 Feb 2022 16:49:46 +0100 Subject: [PATCH 53/58] alacritty: better search colors highlighting --- modules/graphical/alacritty.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/graphical/alacritty.nix b/modules/graphical/alacritty.nix index f08be710..e4e2f6ad 100644 --- a/modules/graphical/alacritty.nix +++ b/modules/graphical/alacritty.nix @@ -106,6 +106,23 @@ cursor = "0xe3e1e4"; }; + # Colors used for the search bar and match highlighting. + search = { + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + matches = { + foreground = "0xe5c463"; + background = "0x1a181a"; + }; + focused_match = { + foreground = "0xe5c463"; + background = "0xe3e1e4"; + }; + #bar = + # background = "#c5c8c6"; + # foreground = "#1d1f21"; + }; + # Normal colors normal = { black = "0x1a181a"; From 4052b39c6e615a114790ba0979b5d2f0dc5a9baf Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 22 Feb 2022 16:51:08 +0100 Subject: [PATCH 54/58] nix-dram: ensure nixpkgs follows latest input --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 26e442ad..4569e41a 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,7 @@ # PubSolarOS additions nix-dram.url = "github:dramforever/nix-dram"; + nix-dram.inputs.nixpkgs.follows = "latest"; }; outputs = From f6a9e1890398e0f1614d4ef5567c87c769e98ba2 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 25 Feb 2022 10:52:00 +0100 Subject: [PATCH 55/58] waybar: temp fix for bandwidth stats, see: https://github.com/Alexays/Waybar/issues/1392 --- profiles/base-user/.config/waybar/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/base-user/.config/waybar/config b/profiles/base-user/.config/waybar/config index 9ab5229f..53de2bda 100644 --- a/profiles/base-user/.config/waybar/config +++ b/profiles/base-user/.config/waybar/config @@ -62,7 +62,7 @@ "network": { "interval": 3, "tooltip": true, - //"interface": "wlp4s0", // (Optional) To force the use of this interface   \uF2E7, + "interface": "wlp4s0", // (Optional) To force the use of this interface   \uF2E7, "format-wifi": " \uf062 {bandwidthUpBits} | \uf063 {bandwidthDownBits}", "format-ethernet": " \uf062 {bandwidthUpBits} | \uf063 {bandwidthDownBits}", "format-disconnected": "", From 17b2a84d234660afe27820f030311a117122cd2a Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 25 Feb 2022 10:52:07 +0100 Subject: [PATCH 56/58] update flake.lock --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 1d7ec88c..2ade96dd 100644 --- a/flake.lock +++ b/flake.lock @@ -351,11 +351,11 @@ }, "master": { "locked": { - "lastModified": 1645539323, - "narHash": "sha256-s5qa/V4r+AG1441Ek8ORftiN7FaxP+vcseZhGkEhra0=", + "lastModified": 1645740083, + "narHash": "sha256-re4GMWyI5zN6+daJv5ejFi22Bm77jf82iEZA6HHWRAc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "30b10a87fb5e277ab1927c61fdca26d5f19f7cc6", + "rev": "cb7aad71e54deaaea8cb02c7303f3e081c10a7f8", "type": "github" }, "original": { From 6dcbd42a562a6537edc59ac3de4cbd23b27a7d74 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 25 Feb 2022 13:31:21 +0100 Subject: [PATCH 57/58] core: add jless, see: https://jless.io --- profiles/core/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/profiles/core/default.nix b/profiles/core/default.nix index b50ef45f..a8101706 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -59,6 +59,7 @@ in p7zip croc jq + jless # Nix specific utilities niv From a188dc9c6ee79a0c431a8676da12c103a6b934e4 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 25 Feb 2022 13:31:45 +0100 Subject: [PATCH 58/58] terminal-life: add python-wiki-fetch --- modules/terminal-life/default.nix | 1 + overlays/python-wiki-fetch.nix | 26 +++++++++++++++++++++++++ overlays/python-wiki-fetch.patch | 32 +++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 overlays/python-wiki-fetch.nix create mode 100644 overlays/python-wiki-fetch.patch diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index c253c4bd..d32546f0 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -35,6 +35,7 @@ in mdbook-multilang nnn powerline + python-wiki-fetch vifm watson ]; diff --git a/overlays/python-wiki-fetch.nix b/overlays/python-wiki-fetch.nix new file mode 100644 index 00000000..2b20e95c --- /dev/null +++ b/overlays/python-wiki-fetch.nix @@ -0,0 +1,26 @@ +final: prev: with prev.python39Packages; { + python-wiki-fetch = buildPythonPackage rec { + pname = "fetch"; + version = "unstable-2022-02-25"; + + src = prev.fetchFromGitHub { + owner = "yashsinghcodes"; + repo = "fetch"; + rev = "3a490a2c2f0b6d2491397fe77939e850056963fd"; + sha256 = "sha256-VsZ8YEXZOIf3UbPmJSn84DYaINavLXCzC0nUOqkvOh4="; + }; + + checkPhase = '' + cd test + ${python.interpreter} test.py + ''; + + propagatedBuildInputs = [ + beautifulsoup4 + requests + wheel + ]; + + patches = ./python-wiki-fetch.patch; + }; +} diff --git a/overlays/python-wiki-fetch.patch b/overlays/python-wiki-fetch.patch new file mode 100644 index 00000000..09bb13a4 --- /dev/null +++ b/overlays/python-wiki-fetch.patch @@ -0,0 +1,32 @@ +--- a/setup.py ++++ b/setup.py +@@ -3,13 +3,6 @@ from os import name, path + from sys import version + import setuptools + +-req_pkgs = [ +- 'bs4', +- 'requests', +- 'wheel' +-] +- +- + with open("README.md","r") as f: + long_description = f.read() + +@@ -25,7 +18,7 @@ setuptools.setup( + packages = setuptools.find_packages(), + entry_points={ + 'console_scripts': [ +- 'fetch=fetch.fetch:arguments', ++ 'wiki=fetch.fetch:arguments', + ] + }, + python_requires='>=3.*', +@@ -36,6 +29,4 @@ setuptools.setup( + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + ], +- install_requires=req_pkgs, +- setup_requires=req_pkgs, + )