treewide: no more ifd

This commit is contained in:
Nikodem Rabuliński 2024-01-31 21:23:53 +01:00
parent 638ce5fb4a
commit 83a3a376dc
5 changed files with 21 additions and 89 deletions

94
flake.lock generated
View file

@ -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",

View file

@ -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";
};

View file

@ -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

View file

@ -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 <<EOF >"$out"
%admin ALL=(root) NOPASSWD: sha256:$SHASUM $YABAI_BIN --load-sa
EOF
'';
}

View file

@ -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 {