Advertisement
Guest User

irctip

a guest
Apr 30th, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1.  
  2. # configuration.nix #
  3. { config, pkgs, ... }:
  4.  
  5. let
  6.  
  7. fa-teams = pkgs.callPackage /home/jk/dev/fa-teams {};
  8.  
  9. in
  10. {
  11. imports = [ ./hardware-configuration.nix ];
  12.  
  13. networking.hostName = "nixos";
  14. environment.systemPackages = [ fa-teams ];
  15.  
  16.  
  17. system.stateVersion = "20.03";
  18.  
  19. services.cron = {
  20. enable = true;
  21. systemCronJobs = [
  22. "* * * * * jk fa-teams >> /home/jk/cron.log"
  23. ];
  24. };
  25.  
  26. }
  27. ------------------------------------------------------------------------------------------------------------------------
  28. # /home/jk/dev/fa-teams/default.nix
  29.  
  30. { pkgs ? import <nixpkgs> {}, ... }:
  31.  
  32. let
  33. nixpkgs = builtins.fromJSON (builtins.readFile ./.nixos-20.03.json);
  34.  
  35. src = pkgs.fetchFromGitHub {
  36. owner = "NixOS";
  37. repo = "nixpkgs-channels";
  38. inherit (nixpkgs) rev sha256;
  39. };
  40.  
  41. pinnedPkgs = import src {};
  42.  
  43. drv = pinnedPkgs.haskellPackages.callCabal2nix "fa-teams" ./. {};
  44.  
  45. in
  46. {
  47. fa-teams = drv;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement