From bce6cfad0fd05b32b2192bca7b563a7e3d7abd66 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Fri, 29 Jun 2018 21:59:28 +0000 Subject: [PATCH] Initial --- .gitignore | 1 + README.md | 7 +++++++ chromium.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 chromium.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2be92b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result diff --git a/README.md b/README.md new file mode 100644 index 0000000..1bc8bd8 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# build + + $ nix-build '' -A config.system.build.isoImage -I nixos-config=chromium.nix + +# run + + $ qemu-system-x86_64 -smp 2 -m 1024 -enable-kvm -sandbox on -cdrom result/iso/nixos-*-linux.iso diff --git a/chromium.nix b/chromium.nix new file mode 100644 index 0000000..17d5714 --- /dev/null +++ b/chromium.nix @@ -0,0 +1,29 @@ +{config, pkgs, ...}: +{ + imports = [ + + ]; + + environment.systemPackages = with pkgs; [ + chromium + ]; + + services.xserver = { + enable = true; + desktopManager.xterm.enable = false; + displayManager.slim = { + enable = true; + defaultUser = "user"; + autoLogin = true; + }; + displayManager.sessionCommands = "while [ 1 ]; do ${pkgs.chromium}/bin/chromium; done &"; + windowManager.xmonad.enable = true; + windowManager.default = "xmonad"; + }; + + users.extraUsers.user = { + isNormalUser = true; + extraGroups = [ "audio" ]; + createHome = true; + }; +}