mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 15:45:38 +00:00
start generator work
This commit is contained in:
parent
6281e32275
commit
50a538c78e
37
flake.lock
37
flake.lock
@ -74,6 +74,42 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1636849918,
|
||||
"narHash": "sha256-nzUK6dPcTmNVrgTAC1EOybSMsrcx+QrVPyqRdyKLkjA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "28a5b0557f14124608db68d3ee1f77e9329e9dd5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-generators": {
|
||||
"inputs": {
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1660727616,
|
||||
"narHash": "sha256-zYTIvdPMYMx/EYqXODAwIIU30RiEHqNHdgarIHuEYZc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "adccd191a0e83039d537e021f19495b7bad546a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1663357389,
|
||||
@ -124,6 +160,7 @@
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nur": "nur",
|
||||
"wallpapers": "wallpapers",
|
||||
|
20
flake.nix
20
flake.nix
@ -32,9 +32,15 @@
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Used to generate NixOS images for other platforms
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, darwin, wsl, home-manager, nur, wallpapers }:
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
|
||||
let
|
||||
|
||||
@ -57,14 +63,14 @@
|
||||
|
||||
in {
|
||||
|
||||
nixosConfigurations = {
|
||||
nixosConfigurations = with inputs; {
|
||||
desktop = import ./hosts/desktop {
|
||||
inherit nixpkgs home-manager nur globals wallpapers;
|
||||
};
|
||||
wsl = import ./hosts/wsl { inherit nixpkgs wsl home-manager globals; };
|
||||
};
|
||||
|
||||
darwinConfigurations = {
|
||||
darwinConfigurations = with inputs; {
|
||||
macbook = import ./hosts/macbook {
|
||||
inherit nixpkgs darwin home-manager nur globals;
|
||||
};
|
||||
@ -110,6 +116,14 @@
|
||||
|
||||
});
|
||||
|
||||
# Package servers into images with a generator
|
||||
packages.x86_64-linux = with inputs; {
|
||||
aws = import ./generators/aws.nix {
|
||||
inherit nixpkgs nixos-generators home-manager globals;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
};
|
||||
|
||||
# Templates for starting other projects quickly
|
||||
templates = rec {
|
||||
default = basic;
|
||||
|
19
generators/aws.nix
Normal file
19
generators/aws.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ nixpkgs, system, nixos-generators, home-manager, globals, ... }:
|
||||
|
||||
nixos-generators.nixoGenerate {
|
||||
inherit system;
|
||||
imports = [
|
||||
globals
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
networking.hostName = "sheep";
|
||||
gui.enable = false;
|
||||
colorscheme = (import ../../modules/colorscheme/gruvbox);
|
||||
passwordHash =
|
||||
"$6$PZYiMGmJIIHAepTM$Wx5EqTQ5GApzXx58nvi8azh16pdxrN6Qrv1wunDlzveOgawitWzcIxuj76X9V868fsPi/NOIEO8yVXqwzS9UF.";
|
||||
}
|
||||
../hosts/common.nix
|
||||
../modules/nixos
|
||||
];
|
||||
format = "aws";
|
||||
}
|
Loading…
Reference in New Issue
Block a user