Advertisement
Guest User

Birth of an OS

a guest
Apr 29th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. { config, pkgs, ... }:
  2.  
  3. {
  4. imports = [
  5. # <nixpkgs/nixos/modules/installer/virtualbox-demo.nix>
  6. # <nixpkgs/nixos/modules/profiles/base.nix>
  7. #./hardware-configuration.nix
  8. ];
  9.  
  10. # Let demo build as a trusted user.
  11. nix.trustedUsers = [ "demo" "skykanin"];
  12.  
  13. boot.loader.grub = {
  14. enable = true;
  15. version = 2;
  16. device = "/dev/sda";
  17. };
  18.  
  19. fileSystems = [ # Mount the root file system #
  20. { mountPoint ="/"; device ="/dev/sda1";}
  21. ];
  22.  
  23. networking.hostName = "skykanins-machine";
  24. networking.firewall.enable = false;
  25.  
  26. environment.systemPackages = with pkgs; [
  27. curl
  28. emacs
  29. firefox
  30. git
  31. neofetch
  32. oh-my-zsh
  33. wget
  34. ];
  35.  
  36. # Mount a VirtualBox shared folder.
  37. # This is configurable in the VirtualBox menu at
  38. # Machine / Settings / Shared Folders.
  39. # fileSystems."/mnt" = {
  40. # fsType = "vboxsf";
  41. # device = "nameofdevicetomount";
  42. # options = [ "rw" ];
  43. # };
  44.  
  45. # By default, the NixOS VirtualBox demo image includes SDDM and Plasma.
  46. # If you prefer another desktop manager or display manager, you may want
  47. # to disable the default.
  48. # services.xserver.desktopManager.plasma5.enable = false;
  49. # services.xserver.displayManager.sddm.enable = false;
  50.  
  51. services.xserver = {
  52. enable = true;
  53. layout = "no";
  54.  
  55. windowManager.i3 = {
  56. enable = true;
  57. package = pkgs.i3-gaps;
  58. extraPackages = with pkgs; [
  59. dmenu
  60. i3status
  61. i3lock
  62. ];
  63. };
  64.  
  65. desktopManager = {
  66. plasma5.enable = false;
  67. xfce.enable = true;
  68. };
  69.  
  70. displayManager = {
  71. sddm.enable = false;
  72. lightdm = {
  73. enable = true;
  74. autoLogin = {
  75. enable = true;
  76. user = "skykanin";
  77. };
  78. };
  79. };
  80. };
  81.  
  82. # Create user
  83. users.users.skykanin = {
  84. isNormalUser = true;
  85. description = "Skykanin Foobar";
  86. extraGroups = [ "wheel" "audio" "networkmanager" "postgres"];
  87. initialPassword = "skykanin";
  88. };
  89.  
  90. # Use zsh as default shell
  91. users.defaultUserShell = pkgs.zsh;
  92.  
  93. programs.java = {
  94. enable = true;
  95. package = pkgs.openjdk11;
  96. };
  97.  
  98. programs.zsh = {
  99. ohMyZsh = {
  100. enable = true;
  101. theme = "robbyrussell";
  102. plugins = [ "git" "lein" "mvn" "npm" "zsh-syntax-highlighting" ];
  103. };
  104. syntaxHighlighting.enable = true;
  105. interactiveShellInit = ''
  106. export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh
  107. #Customise your oh-my-zsh options here
  108. ZSH_THEME="agnoster"
  109. plugins=(git)
  110. source $ZSH/oh-my-zsh.sh
  111. '';
  112. promptInit = ""; # Clear this to avoid a conflict with oh-my-zsh
  113. };
  114.  
  115. # Set your time zone.
  116. time.timeZone = "Europe/Oslo";
  117.  
  118. system.autoUpgrade.enable = true;
  119. nixpkgs.config.allowUnfree = true;
  120.  
  121. # Enable the OpenSSH daemon.
  122. services.openssh.enable = true;
  123.  
  124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement