lxc: image builder
This commit is contained in:
parent
727c289f8e
commit
a5d5f9f74e
7 changed files with 88 additions and 7 deletions
4
.envrc
4
.envrc
|
@ -1 +1,5 @@
|
|||
if [ ! -z $MYVIMRC ]; then
|
||||
export NVIM_APPNAME=vim-inside-vim
|
||||
fi
|
||||
|
||||
use flake;
|
||||
|
|
61
flake.lock
generated
61
flake.lock
generated
|
@ -220,6 +220,40 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1693701915,
|
||||
"narHash": "sha256-waHPLdDYUOHSEtMKKabcKIMhlUOHPOOPQ9UyFeEoovs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "f5af57d3ef9947a70ac86e42695231ac1ad00c25",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-generators": {
|
||||
"inputs": {
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701689616,
|
||||
"narHash": "sha256-ewnfgvRy73HoP5KnYmy1Rcr4m4yShvsb6TCCaKoW8pc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "246219bc21b943c6f6812bb7744218ba0df08600",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1702830618,
|
||||
|
@ -348,6 +382,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1693714546,
|
||||
"narHash": "sha256-3EMJZeGSZT6pD1eNwI/6Yc0R4rxklNvJ2SDFcsCnjpM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d816b5ab44187a2dd84806630ce77a733724f95f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1703013332,
|
||||
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
|
||||
|
@ -363,7 +413,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1702539185,
|
||||
"narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=",
|
||||
|
@ -379,7 +429,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1692463654,
|
||||
"narHash": "sha256-F8hZmsQINI+S6UROM4jyxAMbQLtzE44pI8Nk6NtMdao=",
|
||||
|
@ -464,7 +514,8 @@
|
|||
"firefox-addons": "firefox-addons",
|
||||
"home-manager": "home-manager",
|
||||
"nix-colors": "nix-colors",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nixvim": "nixvim",
|
||||
|
@ -491,7 +542,7 @@
|
|||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -510,7 +561,7 @@
|
|||
},
|
||||
"sops-nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs-stable": "nixpkgs-stable_4"
|
||||
},
|
||||
"locked": {
|
||||
|
|
14
flake.nix
14
flake.nix
|
@ -32,6 +32,9 @@
|
|||
};
|
||||
nur.url = "github:nix-community/nur";
|
||||
firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
|
||||
# Pro gamer move
|
||||
nixos-generators.url = "github:nix-community/nixos-generators";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
||||
|
@ -65,7 +68,16 @@
|
|||
# Acessible through 'nix build', 'nix shell', etc
|
||||
packages = forAllSystems (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in import ./pkgs { inherit pkgs; }
|
||||
in import ./pkgs { inherit pkgs; } //
|
||||
{
|
||||
proxmox-lxc = inputs.nixos-generators.nixosGenerate {
|
||||
inherit system;
|
||||
modules = [
|
||||
./nixos/templates/proxmox-lxc.nix
|
||||
];
|
||||
format = "proxmox-lxc";
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
# Devshell for bootstrapping
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
shellAliases = {
|
||||
vim = "nvim";
|
||||
vi = "nvim";
|
||||
vimin = "NVIM_APPNAME=nvim-minimal nvim";
|
||||
ddgo = "${pkgs.w3m} https://lite.duckduckgo.com";
|
||||
};
|
||||
};
|
||||
|
|
10
nixos/templates/proxmox-lxc.nix
Normal file
10
nixos/templates/proxmox-lxc.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, config, modulesPath, ... }: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
../../nixos/base.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bashInteractive
|
||||
];
|
||||
}
|
|
@ -9,6 +9,8 @@
|
|||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBs6/s+973H28jOrvN0zr1eayT+thrs61l1qV7uFhw8I''
|
||||
];
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = config.users.users.noe.openssh.authorizedKeys.keys;
|
||||
|
||||
environment.systemPackages = [ pkgs.nixos-rebuild ];
|
||||
security.sudo.extraRules = [
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
{ pkgs ? (import ../nixpkgs.nix) { } }: rec {
|
||||
{ pkgs ? (import ../nixpkgs.nix) { }, ... }: rec {
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue