From ce63512644c9d04c11fd58fec79b09d454d8a43a Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 25 Jan 2021 14:57:29 +0000 Subject: modules/workstation: switch to NixOS podman module This exists now! And it does everything I was doing myself before! Yay! --- modules/workstation/default.nix | 3 ++- modules/workstation/podman/default.nix | 46 ---------------------------------- 2 files changed, 2 insertions(+), 47 deletions(-) delete mode 100644 modules/workstation/podman/default.nix (limited to 'modules') diff --git a/modules/workstation/default.nix b/modules/workstation/default.nix index 0fb371b6fbad..17eab606e6f3 100644 --- a/modules/workstation/default.nix +++ b/modules/workstation/default.nix @@ -4,7 +4,7 @@ imports = [ ../nix ../shell ../users ../ssh ./documentation ./windowing ./fonts ./hardware ./locale - ./dict ./dino ./emacs ./gnupg ./lorri ./mail ./mpv ./podman ./weechat + ./dict ./dino ./emacs ./gnupg ./lorri ./mail ./mpv ./weechat ]; environment.systemPackages = with pkgs; [ ffmpeg mosh mpv qemu youtube-dl ]; @@ -13,4 +13,5 @@ services.mingetty.loginOptions = "-- \\u"; services.locate.enable = true; + virtualisation.podman.enable = true; } diff --git a/modules/workstation/podman/default.nix b/modules/workstation/podman/default.nix deleted file mode 100644 index 9e64fcb4807c..000000000000 --- a/modules/workstation/podman/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ config, pkgs, ... }: - -{ - environment.etc."containers/libpod.conf".text = '' - runtime_path = ["${pkgs.runc}/bin/runc"] - conmon_path = ["${pkgs.conmon}/bin/conmon"] - ''; - - environment.etc."containers/policy.json".text = builtins.toJSON { - # Not insecure when I'm manually pulling images on a workstation. - default = [ { type = "insecureAcceptAnything"; } ]; - }; - - environment.etc."containers/registries.conf".text = '' - [registries.search] - registries = ['docker.io'] - ''; - - environment.systemPackages = with pkgs; - let - podman-bin = writeShellScriptBin "podman" '' - HOME="$XDG_CONFIG_HOME/podman" - exec ${podman}/bin/podman "$@" - ''; - in - [ podman-bin podman.man runc conmon slirp4netns ]; - - users.users.qyliss.xdg.config.paths."podman/.config/containers/libpod.conf" = - pkgs.writeText "libpod.conf" '' - runtime_path = ["${pkgs.runc}/bin/runc"] - conmon_path = ["${pkgs.conmon}/bin/conmon"] - ''; - - users.users.qyliss.xdg.config.paths."podman/.config/containers/storage.conf" = - pkgs.writeText "storage.conf" '' - [storage] - driver = "zfs" - runroot = "/tmp/1000" - graphroot = "/home/state/podman/containers/storage" - ''; - - systemd.tmpfiles.rules = [ - "d ${config.users.users.qyliss.home}/state/containers 0700 qyliss qyliss" - "d ${config.users.users.qyliss.home}/state/podman 0700 qyliss qyliss" - ]; -} -- cgit 1.4.1