diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..48693bd --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-20.03", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 3a55425..7bd60b8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,24 +1,30 @@ { - description = "Julian's Flaky Flake"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.03"; - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - } - }; + outputs = { self, nixpkgs }: { - outputs = {nixpkgs, home-manager, ...}: { - defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux; + nixosConfigurations.container = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = + [ ({ pkgs, ... }: { + boot.isContainer = true; - homeConfigurations = { - "jsutter" = home-manager.lib.homeManagerConfiguration { - # Note: I am sure this could be done better with flake-utils or something - pkgs = nixpkgs.legacyPackages.x86_64-linux; + # Let 'nixos-version --json' know about the Git revision + # of this flake. + system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; - modules = [ ./home.nix ]; + # Network configuration. + networking.useDHCP = false; + networking.firewall.allowedTCPPorts = [ 80 ]; + + # Enable a web server. + services.httpd = { + enable = true; + adminAddr = "morty@example.org"; }; - }; + }) + ]; }; + + }; }