This commit is contained in:
Felix Albrigtsen 2023-07-26 09:06:51 +02:00
parent 881a54f445
commit c6a3bd1038
3 changed files with 53 additions and 5 deletions

View File

@ -1,5 +1,26 @@
{ {
"nodes": { "nodes": {
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1690247892,
"narHash": "sha256-WMGc1yq1cqRd+kzjWgbvHxckJIe8VQfiZ5RfR8tgABw=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "efd35d99ce412335c478dff9da9a4256bbd39757",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1687573514, "lastModified": 1687573514,
@ -34,6 +55,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"unstable": "unstable" "unstable": "unstable"

View File

@ -4,14 +4,15 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05-small"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05-small";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small"; unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
nix-darwin.url = "github:lnl7/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs"; sops-nix.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { self, nixpkgs, unstable, sops-nix, ... }@inputs: outputs = { self, nixpkgs, unstable, nix-darwin, sops-nix, ... }@inputs:
let let
system = "x86_64-linux";
overlay-unstable = final: prev: { overlay-unstable = final: prev: {
unstable = unstable.legacyPackages.${prev.system}; unstable = unstable.legacyPackages.${prev.system};
}; };
@ -19,7 +20,7 @@
{ {
nixosConfigurations = { nixosConfigurations = {
voyager = nixpkgs.lib.nixosSystem { voyager = nixpkgs.lib.nixosSystem {
inherit system; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
}; };
@ -32,7 +33,7 @@
]; ];
}; };
chapel = nixpkgs.lib.nixosSystem { chapel = nixpkgs.lib.nixosSystem {
inherit system; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
}; };
@ -42,7 +43,7 @@
]; ];
}; };
redshirt = nixpkgs.lib.nixosSystem { redshirt = nixpkgs.lib.nixosSystem {
inherit system; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
}; };
@ -54,6 +55,18 @@
}; };
}; };
darwinConfigurations.worf = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = {
inherit inputs;
};
modules = [
./hosts/worf/configuration.nix
# ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
# sops-nix.nixosModules.sops
];
};
devShells.x86_64-linux = { devShells.x86_64-linux = {
default = nixpkgs.legacyPackages.x86_64-linux.callPackage ./shell.nix { }; default = nixpkgs.legacyPackages.x86_64-linux.callPackage ./shell.nix { };
}; };

View File

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = [
pkgs.neovim
pkgs.iterm2
];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
}