From 83a3a376dc3cc5bbc0354ed7e43bb45c3d584e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikodem=20Rabuli=C5=84ski?= Date: Wed, 31 Jan 2024 21:23:53 +0100 Subject: [PATCH] treewide: no more ifd --- flake.lock | 94 ++++--------------------------- flake.nix | 3 - hosts/default.nix | 2 - hosts/hijiri/yabai.nix | 9 +++ modules/system/common/default.nix | 2 + 5 files changed, 21 insertions(+), 89 deletions(-) diff --git a/flake.lock b/flake.lock index e486a17..46cc0e7 100644 --- a/flake.lock +++ b/flake.lock @@ -214,27 +214,6 @@ } }, "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "hercules-ci-agent", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1704982712, - "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "07f6395285469419cf9d078f59b5b49993198c00", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "hercules-ci-effects", @@ -254,7 +233,7 @@ "type": "indirect" } }, - "flake-parts_4": { + "flake-parts_3": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" }, @@ -291,46 +270,10 @@ "type": "github" } }, - "haskell-flake": { - "locked": { - "lastModified": 1684780604, - "narHash": "sha256-2uMZsewmRn7rRtAnnQNw1lj0uZBMh4m6Cs/7dV5YF08=", - "owner": "srid", - "repo": "haskell-flake", - "rev": "74210fa80a49f1b6f67223debdbf1494596ff9f2", - "type": "github" - }, - "original": { - "owner": "srid", - "ref": "0.3.0", - "repo": "haskell-flake", - "type": "github" - } - }, - "hercules-ci-agent": { - "inputs": { - "flake-parts": "flake-parts_2", - "haskell-flake": "haskell-flake", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1706307588, - "narHash": "sha256-t46dB7XCBwj2FOwhFWyMOfriGny1bEOgak24fylo5j4=", - "owner": "hercules-ci", - "repo": "hercules-ci-agent", - "rev": "f01ae96b022bb12d35d7223548a0b05623a55ddf", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "hercules-ci-agent", - "type": "github" - } - }, "hercules-ci-effects": { "inputs": { - "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_2" + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1704029560, @@ -393,8 +336,8 @@ }, "niko-nur": { "inputs": { - "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_3" + "flake-parts": "flake-parts_3", + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1690830552, @@ -427,11 +370,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1705856552, - "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", + "lastModified": 1703637592, + "narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", + "rev": "cfc3698c31b1fb9cdcf10f36c9643460264d0ca8", "type": "github" }, "original": { @@ -490,22 +433,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1703637592, - "narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "cfc3698c31b1fb9cdcf10f36c9643460264d0ca8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1690753480, "narHash": "sha256-GQgPs8fCh/LsyQoYMUZgT2p7jFVWyHu9p+1Nl/dp8GY=", @@ -521,7 +448,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -605,12 +532,11 @@ "fenix": "fenix", "firefox-darwin": "firefox-darwin", "flake-parts": "flake-parts", - "hercules-ci-agent": "hercules-ci-agent", "hercules-ci-effects": "hercules-ci-effects", "home-manager": "home-manager", "mailserver": "mailserver", "niko-nur": "niko-nur", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "nvidia-patch": "nvidia-patch", "racket": "racket", "wrapper-manager": "wrapper-manager", diff --git a/flake.nix b/flake.nix index 70f80aa..479d957 100644 --- a/flake.nix +++ b/flake.nix @@ -77,9 +77,6 @@ url = "github:nrabulinski/racket.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - hercules-ci-agent = { - url = "github:hercules-ci/hercules-ci-agent"; - }; hercules-ci-effects = { url = "github:hercules-ci/hercules-ci-effects"; }; diff --git a/hosts/default.nix b/hosts/default.nix index f86cdff..1c07c58 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -31,7 +31,6 @@ inputs.disko.nixosModules.disko inputs.mailserver.nixosModules.default inputs.home-manager.nixosModules.home-manager - inputs.hercules-ci-agent.nixosModules.agent-service inputs.nvidia-patch.nixosModules.nvidia-patch self.nixosModules.settei self.nixosModules.common @@ -46,7 +45,6 @@ modules = [ inputs.agenix.darwinModules.age inputs.home-manager.darwinModules.home-manager - inputs.hercules-ci-agent.darwinModules.agent-service self.darwinModules.settei self.darwinModules.common sharedOptions diff --git a/hosts/hijiri/yabai.nix b/hosts/hijiri/yabai.nix index 1fe212c..dcfba1f 100644 --- a/hosts/hijiri/yabai.nix +++ b/hosts/hijiri/yabai.nix @@ -1,4 +1,5 @@ { + config, lib, pkgs, ... @@ -27,4 +28,12 @@ || yabai -m window $YABAI_WINDOW_ID --toggle float' ''; }; + + environment.etc."sudoers.d/yabai".source = pkgs.runCommand "sudoers-yabai" {} '' + YABAI_BIN="${config.services.yabai.package}/bin/yabai" + SHASUM=$(sha256sum "$YABAI_BIN" | cut -d' ' -f1) + cat <"$out" + %admin ALL=(root) NOPASSWD: sha256:$SHASUM $YABAI_BIN --load-sa + EOF + ''; } diff --git a/modules/system/common/default.nix b/modules/system/common/default.nix index 9ee8805..788d89a 100644 --- a/modules/system/common/default.nix +++ b/modules/system/common/default.nix @@ -32,6 +32,8 @@ # NixOS' fish module doesn't allow setting what package to use for fish, # so I need to override the fish package. nixpkgs.overlays = [(_: _: {inherit (inputs'.settei.packages) fish;})]; + + nix.settings.allow-import-from-derivation = false; }; linuxConfig = lib.optionalAttrs isLinux {