diff options
-rw-r--r-- | common-workstation.nix | 88 | ||||
-rw-r--r-- | common.nix | 147 | ||||
-rw-r--r-- | machines/arilou.nix | 2 | ||||
-rw-r--r-- | machines/dnyarri.nix | 2 | ||||
-rw-r--r-- | machines/mmrnmhrm.nix | 2 |
5 files changed, 102 insertions, 139 deletions
diff --git a/common-workstation.nix b/common-workstation.nix new file mode 100644 index 00000000..fc071d00 --- /dev/null +++ b/common-workstation.nix @@ -0,0 +1,88 @@ +{ pkgs, ... }: + +{ + imports = [ + ./common.nix + <nixpkgs/nixos/modules/programs/virtualbox.nix> + ./modules/i3 + ]; + + boot.kernelParams = [ "zswap.enabled=1" ]; + boot.cleanTmpDir = true; + + hardware = { + pulseaudio.enable = true; + pulseaudio.package = pkgs.pulseaudio.override { + useSystemd = true; + }; + opengl = { + driSupport32Bit = true; + s3tcSupport = true; + }; + }; + + fonts = { + enableCoreFonts = true; + enableFontDir = true; + enableGhostscriptFonts = true; + fonts = [ + pkgs.dosemu_fonts + pkgs.liberation_ttf + ]; + }; + + services = { + openssh = { + enable = true; + permitRootLogin = "without-password"; + }; + + syslogd.tty = "tty13"; + + xfs.enable = false; + + gpm = { + enable = true; + protocol = "exps2"; + }; + + printing = { + enable = true; + drivers = [ pkgs.foo2zjs pkgs.foomatic_filters ]; + }; + + udev.extraRules = '' + SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", \ + ATTRS{serial}=="0001", OWNER="aszlig", SYMLINK+="axbo" + SUBSYSTEM=="usb*|tty", ACTION=="add|change", ATTRS{idVendor}=="0403", \ + ATTRS{idProduct}=="6001", OWNER="aszlig" # Enttec + ''; + + xserver = { + enable = true; + layout = "dvorak"; + + startGnuPGAgent = true; + + displayManager.sessionCommands = '' + ${pkgs.redshift}/bin/redshift -l 48.428404:10.866007 & + ''; + + desktopManager.default = "none"; + desktopManager.xterm.enable = false; + + displayManager.lightdm.enable = true; + }; + }; + + users.extraUsers.aszlig = { + uid = 1000; + description = "aszlig"; + group = "users"; + extraGroups = [ "vboxusers" "wheel" "video" ]; + home = "/home/aszlig"; + useDefaultShell = true; + createHome = true; + createUser = true; + }; +} diff --git a/common.nix b/common.nix index 243840bc..a3ceef6d 100644 --- a/common.nix +++ b/common.nix @@ -1,10 +1,6 @@ -{config, pkgs, ...}: -{ - imports = [ - <nixpkgs/nixos/modules/programs/virtualbox.nix> - ./modules/i3 - ]; +{ config, pkgs, ... }: +{ nix = { package = pkgs.nixUnstable; useChroot = true; @@ -14,136 +10,22 @@ ''; }; - boot = { - cleanTmpDir = true; - - loader.grub = { - enable = true; - version = 2; - }; - - kernelParams = [ "zswap.enabled=1" ]; + boot.loader.grub = { + enable = true; + version = 2; }; - hardware = { - cpu.intel.updateMicrocode = true; - pulseaudio.enable = true; - pulseaudio.package = pkgs.pulseaudio.override { - useSystemd = true; - }; - opengl = { - driSupport32Bit = true; - s3tcSupport = true; - }; - }; + hardware.cpu.intel.updateMicrocode = true; users.defaultUserShell = "/var/run/current-system/sw/bin/zsh"; - networking = { - wireless.enable = false; - firewall.enable = false; - }; - - fileSystems = { - /* - "/run/nix/remote-stores/mmrnmhrm/nix" = { - device = "root@mmrnmhrm:/nix"; - fsType = "sshfs"; - noCheck = true; - options = pkgs.lib.concatStringsSep "," [ - "comment=x-systemd.automount" - "compression=yes" - "ssh_command=${pkgs.openssh}/bin/ssh" - "Ciphers=arcfour" - "IdentityFile=/root/.ssh/id_buildfarm" - ]; - }; - */ - }; - - fonts = { - enableCoreFonts = true; - enableFontDir = true; - enableGhostscriptFonts = true; - fonts = [ - pkgs.dosemu_fonts - pkgs.liberation_ttf - ]; - }; - - i18n = { - consoleKeyMap = "dvorak"; - }; + networking.wireless.enable = false; + networking.firewall.enable = false; + i18n.consoleKeyMap = "dvorak"; programs.ssh.startAgent = false; - services = { - openssh = { - enable = true; - permitRootLogin = "without-password"; - }; - - syslogd.tty = "tty13"; - - xfs.enable = false; - - gpm = { - enable = true; - protocol = "exps2"; - }; - - nixosManual.showManual = false; - - printing = { - enable = true; - drivers = [ pkgs.foo2zjs pkgs.foomatic_filters ]; - }; - - udev.extraRules = '' - SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", \ - ATTRS{serial}=="0001", OWNER="aszlig", SYMLINK+="axbo" - SUBSYSTEM=="usb*|tty", ACTION=="add|change", ATTRS{idVendor}=="0403", \ - ATTRS{idProduct}=="6001", OWNER="aszlig" # Enttec - ''; - - xserver = { - enable = true; - layout = "dvorak"; - - startGnuPGAgent = true; - - displayManager.sessionCommands = '' - ${pkgs.redshift}/bin/redshift -l 48.428404:10.866007 & - ''; - - desktopManager.default = "none"; - desktopManager.xterm.enable = false; - - displayManager.lightdm.enable = true; - }; - }; - - /* - jobs.vlock_all = { - name = "vlock-all"; - startOn = "keyboard-request"; - path = [ pkgs.vlock ]; - script = "vlock -asn"; - task = true; - restartIfChanged = false; - }; - */ - - users.extraUsers.aszlig = { - uid = 1000; - description = "aszlig"; - group = "users"; - extraGroups = [ "vboxusers" "wheel" "video" ]; - home = "/home/aszlig"; - useDefaultShell = true; - createHome = true; - createUser = true; - }; + services.nixosManual.showManual = false; environment.systemPackages = with pkgs; [ binutils @@ -162,13 +44,6 @@ ]; nixpkgs.config = import ./nixpkgs/config.nix; - - system.fsPackages = with pkgs; [ - sshfsFuse - ]; - - # broken -> chroot build -> FIXME - #system.copySystemConfiguration = true; - + system.fsPackages = with pkgs; [ sshfsFuse ]; time.timeZone = "Europe/Berlin"; } diff --git a/machines/arilou.nix b/machines/arilou.nix index 0cb83031..08f3e370 100644 --- a/machines/arilou.nix +++ b/machines/arilou.nix @@ -8,7 +8,7 @@ let diskID = "usb-Lexar_USB_Flash_Drive_201303211246293590E4-0:0"; in { imports = [ - ../common.nix + ../common-workstation.nix <nixpkgs/nixos/modules/profiles/all-hardware.nix> ]; diff --git a/machines/dnyarri.nix b/machines/dnyarri.nix index bc3ac135..ad385001 100644 --- a/machines/dnyarri.nix +++ b/machines/dnyarri.nix @@ -4,7 +4,7 @@ with pkgs.lib; with import ../lib; { - require = singleton ../common.nix; + imports = singleton ../common-workstation.nix; nix.maxJobs = 8; diff --git a/machines/mmrnmhrm.nix b/machines/mmrnmhrm.nix index c8866545..e52cfd4d 100644 --- a/machines/mmrnmhrm.nix +++ b/machines/mmrnmhrm.nix @@ -4,7 +4,7 @@ with pkgs.lib; with import ../lib; { - require = singleton ../common.nix; + imports = singleton ../common-workstation.nix; nix.maxJobs = 2; |