Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. { lib, config, pkgs, ... }:
  2.  
  3. let
  4. commonPackages = with pkgs; [ wget screen vim nix-repl usbutils synergy nox gnome3.eog ];
  5. in
  6.  
  7. lib.recursiveUpdate {
  8. services.openssh.enable = true;
  9. systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target"];
  10. services.openssh.permitRootLogin = "yes";
  11. services.ntp.enable = true;
  12. environment.systemPackages = with pkgs; [
  13. wget screen vim nix-repl usbutils
  14. ];
  15.  
  16. nixpkgs.config = {
  17. packageOverrides = pkgs: {
  18. nix = pkgs.nixStable;
  19. };
  20. };
  21. fileSystems = {
  22. "/" = { device = "UUID=a270b863-9e3e-4812-adf8-215e695de3d8"; fsType = "ext4"; };
  23. "/boot" = { device = "UUID=2178-694E"; };
  24. };
  25. time.timeZone = "America/Moncton";
  26. services.avahi.enable = true;
  27. networking.firewall.enable = false;
  28.  
  29. boot.kernelParams = [
  30. #"console=hvc0"
  31. "boot.shell_on_fail"
  32. ];
  33. users.extraUsers.clever = {
  34. home = "/home/clever";
  35. isNormalUser = true;
  36. extraGroups = [ "wheel" ];
  37. uid = 1000;
  38. openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbT602iZQq/t13jCAThxk13r8E4pEqZbPqoRpi4thPbLc6AAYdxEPemADGcsx60zWT/PEvgXfkDLVU1L6vHB0v3GUZS96xZhZPgYAHR0kACSUIZH2PK7r8XA422JuPRBCtB5Oj8vcNKu6bsfb4uSul3Ia1HbgGYzhc5r6u/GtRHrI8oW6Qzq8BDyEYc4J6dv7tw7n4FjhlUKEWCNMnkoQd2Fr2gYM0/PCBnQMSBXevf2IgLlJlRAR3sH4lW21jVUN1m3VGIfiHwef7ZSD8ApyGaW0snTe8/JkGZkMbK/wnGp7R7aUMQCIvcaa+y/I+TDrfFjmJn/Ht7wEAN66NJdSD" ];
  39. initialHashedPassword = "$6$8tTq1zrz$XMqxUvlrCmj5gdMyDJ46p.ZVZrY7D.aUw3KRaf2Vof2Lu7J.M2GIZH5zK1./CcPzc2B.HUIYIC2xSCmtMcr4h0";
  40. };
  41. nixpkgs.config.allowUnfree = true;
  42. hardware.pulseaudio.enable = true;
  43. } (if builtins.currentSystem != "armv6l-linux" then {
  44. imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> <nixpkgs/nixos/modules/profiles/all-hardware.nix> ];
  45. boot.loader.grub.enable = true;
  46. boot.loader.grub.version = 2;
  47. boot.loader.grub.device = "nodev";
  48. boot.initrd.availableKernelModules = [ "ata_piix" "xen_blkfront" ];
  49. fileSystems = {
  50. "/" = { device = "UUID=a270b863-9e3e-4812-adf8-215e695de3d8"; fsType = "ext4"; };
  51. "/boot" = { device = "UUID=2178-694E"; };
  52. "/nix/var/nix/profiles" = { device="/nix/var/nix/profiles.x86"; options="bind"; };
  53. "/media/videos/4tb/" = { device="c2d:/media/videos/4tb"; fsType = "nfs"; };
  54. };
  55. environment.systemPackages = with pkgs; [ pavucontrol gdb file psmisc teamspeak_client sysstat pciutils ] ++ commonPackages;
  56. services.tor = {
  57. enable = true;
  58. client = {
  59. enable = true;
  60. privoxy.enable = true;
  61. };
  62. };
  63. services.xserver = {
  64. enable = true;
  65. displayManager.slim.enable = true;
  66. desktopManager.xfce.enable = true;
  67. };
  68. services.kmscon = {
  69. enable = true;
  70. extraConfig = ''
  71. font-name=Inconsolata
  72. font-engine=pango
  73. '';
  74. };
  75. fonts.fonts = [ pkgs.corefonts ];
  76. fonts.enableFontDir = true;
  77. } else {
  78. #imports = [ <nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix> ];
  79. imports = [<nixos/modules/profiles/minimal.nix>];
  80. services.nixosManual.enable = false; # FIXME: workaround SANE not evaluating on ARM
  81. boot.loader.grub.enable = false;
  82. boot.loader.generic-extlinux-compatible.enable = true;
  83. boot.kernelPackages = pkgs.linuxPackages_rpi;
  84. hardware.sane.enable = false;
  85. environment.systemPackages = with pkgs; [ ] ++ commonPackages;
  86. fileSystems = {
  87. "/" = { device = "UUID=a270b863-9e3e-4812-adf8-215e695de3d8"; fsType = "ext4"; };
  88. "/boot" = { device = "UUID=2178-694E"; };
  89. "/nix/var/nix/profiles" = { device="/nix/var/nix/profiles.arm"; options="bind"; };
  90. };
  91. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement