Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { lib, config, pkgs, ... }:
- let
- commonPackages = with pkgs; [ wget screen vim nix-repl usbutils synergy nox gnome3.eog ];
- in
- lib.recursiveUpdate {
- services.openssh.enable = true;
- systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target"];
- services.openssh.permitRootLogin = "yes";
- services.ntp.enable = true;
- environment.systemPackages = with pkgs; [
- wget screen vim nix-repl usbutils
- ];
- nixpkgs.config = {
- packageOverrides = pkgs: {
- nix = pkgs.nixStable;
- };
- };
- fileSystems = {
- "/" = { device = "UUID=a270b863-9e3e-4812-adf8-215e695de3d8"; fsType = "ext4"; };
- "/boot" = { device = "UUID=2178-694E"; };
- };
- time.timeZone = "America/Moncton";
- services.avahi.enable = true;
- networking.firewall.enable = false;
- boot.kernelParams = [
- #"console=hvc0"
- "boot.shell_on_fail"
- ];
- users.extraUsers.clever = {
- home = "/home/clever";
- isNormalUser = true;
- extraGroups = [ "wheel" ];
- uid = 1000;
- openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbT602iZQq/t13jCAThxk13r8E4pEqZbPqoRpi4thPbLc6AAYdxEPemADGcsx60zWT/PEvgXfkDLVU1L6vHB0v3GUZS96xZhZPgYAHR0kACSUIZH2PK7r8XA422JuPRBCtB5Oj8vcNKu6bsfb4uSul3Ia1HbgGYzhc5r6u/GtRHrI8oW6Qzq8BDyEYc4J6dv7tw7n4FjhlUKEWCNMnkoQd2Fr2gYM0/PCBnQMSBXevf2IgLlJlRAR3sH4lW21jVUN1m3VGIfiHwef7ZSD8ApyGaW0snTe8/JkGZkMbK/wnGp7R7aUMQCIvcaa+y/I+TDrfFjmJn/Ht7wEAN66NJdSD" ];
- initialHashedPassword = "$6$8tTq1zrz$XMqxUvlrCmj5gdMyDJ46p.ZVZrY7D.aUw3KRaf2Vof2Lu7J.M2GIZH5zK1./CcPzc2B.HUIYIC2xSCmtMcr4h0";
- };
- nixpkgs.config.allowUnfree = true;
- hardware.pulseaudio.enable = true;
- } (if builtins.currentSystem != "armv6l-linux" then {
- imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> <nixpkgs/nixos/modules/profiles/all-hardware.nix> ];
- boot.loader.grub.enable = true;
- boot.loader.grub.version = 2;
- boot.loader.grub.device = "nodev";
- boot.initrd.availableKernelModules = [ "ata_piix" "xen_blkfront" ];
- fileSystems = {
- "/" = { device = "UUID=a270b863-9e3e-4812-adf8-215e695de3d8"; fsType = "ext4"; };
- "/boot" = { device = "UUID=2178-694E"; };
- "/nix/var/nix/profiles" = { device="/nix/var/nix/profiles.x86"; options="bind"; };
- "/media/videos/4tb/" = { device="c2d:/media/videos/4tb"; fsType = "nfs"; };
- };
- environment.systemPackages = with pkgs; [ pavucontrol gdb file psmisc teamspeak_client sysstat pciutils ] ++ commonPackages;
- services.tor = {
- enable = true;
- client = {
- enable = true;
- privoxy.enable = true;
- };
- };
- services.xserver = {
- enable = true;
- displayManager.slim.enable = true;
- desktopManager.xfce.enable = true;
- };
- services.kmscon = {
- enable = true;
- extraConfig = ''
- font-name=Inconsolata
- font-engine=pango
- '';
- };
- fonts.fonts = [ pkgs.corefonts ];
- fonts.enableFontDir = true;
- } else {
- #imports = [ <nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix> ];
- imports = [<nixos/modules/profiles/minimal.nix>];
- services.nixosManual.enable = false; # FIXME: workaround SANE not evaluating on ARM
- boot.loader.grub.enable = false;
- boot.loader.generic-extlinux-compatible.enable = true;
- boot.kernelPackages = pkgs.linuxPackages_rpi;
- hardware.sane.enable = false;
- environment.systemPackages = with pkgs; [ ] ++ commonPackages;
- fileSystems = {
- "/" = { device = "UUID=a270b863-9e3e-4812-adf8-215e695de3d8"; fsType = "ext4"; };
- "/boot" = { device = "UUID=2178-694E"; };
- "/nix/var/nix/profiles" = { device="/nix/var/nix/profiles.arm"; options="bind"; };
- };
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement