summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-09-21 17:49:51 +0200
committerAdrian Kummerlaender2018-09-21 17:49:51 +0200
commit0024a2ca7918be83ad812b02348cb49dd2ff2d57 (patch)
tree53e12738aa868fa7025083fd90df9ff0d524d8e9
parent7de3c3bee50247cd3a1102a5eab0d8ebb9ca0432 (diff)
downloadnixos_system-0024a2ca7918be83ad812b02348cb49dd2ff2d57.tar
nixos_system-0024a2ca7918be83ad812b02348cb49dd2ff2d57.tar.gz
nixos_system-0024a2ca7918be83ad812b02348cb49dd2ff2d57.tar.bz2
nixos_system-0024a2ca7918be83ad812b02348cb49dd2ff2d57.tar.lz
nixos_system-0024a2ca7918be83ad812b02348cb49dd2ff2d57.tar.xz
nixos_system-0024a2ca7918be83ad812b02348cb49dd2ff2d57.tar.zst
nixos_system-0024a2ca7918be83ad812b02348cb49dd2ff2d57.zip
Add basic automatix config
Extract desktop-specific settings that are shared by asterix and obelix into desktop role.
-rw-r--r--conf/common.nix16
-rw-r--r--configuration.nix53
-rw-r--r--host/asterix.nix5
-rw-r--r--host/automatix.nix13
-rw-r--r--host/hardware/automatix.nix25
-rw-r--r--host/obelix.nix5
-rw-r--r--host/role/conf/vpn/T-TeleSec_GlobalRoot_Class_2.pem (renamed from conf/vpn/T-TeleSec_GlobalRoot_Class_2.pem)0
-rw-r--r--host/role/conf/vpn/kit.ovpn.nix (renamed from conf/vpn/kit.ovpn.nix)0
-rw-r--r--host/role/desktop.nix45
9 files changed, 112 insertions, 50 deletions
diff --git a/conf/common.nix b/conf/common.nix
new file mode 100644
index 0000000..d1c4ba1
--- /dev/null
+++ b/conf/common.nix
@@ -0,0 +1,16 @@
+{ pkgs, ... }:
+
+{
+ users.extraUsers.common = {
+ isNormalUser = true;
+ uid = 1000;
+ extraGroups = [ "wheel" ];
+ shell = pkgs.fish;
+
+ openssh.authorizedKeys.keys = [
+ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDy2h3N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XWBNt1wQVIlYd9+Bf4lWuB0FA5kUfXd4Li5O4RWW3fsKT common@Schreibfix"
+ ];
+ };
+}
diff --git a/configuration.nix b/configuration.nix
index 3a4be5b..fef5b26 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -5,20 +5,10 @@
imports = [
./host/current.nix
+ ./conf/common.nix
./conf/fish.nix
];
- fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
-
- sound.enable = true;
- hardware = {
- opengl.driSupport32Bit = true;
- pulseaudio = {
- enable = true;
- support32Bit = true;
- };
- };
-
i18n = {
consoleKeyMap = "de";
defaultLocale = "en_US.UTF-8";
@@ -36,49 +26,16 @@
};
};
- services = {
- openssh = {
- enable = true;
- };
-
- journald = {
- extraConfig = ''Storage=volatile'';
- };
-
- openvpn.servers = {
- KIT = {
- config = import ./conf/vpn/kit.ovpn.nix;
- autoStart = false;
- };
- };
-
- xserver = {
- enable = true;
- layout = "de";
- xkbOptions = "caps:escape";
-
- displayManager.slim = {
- enable = true;
- autoLogin = true;
- defaultUser = "common";
- };
-
- desktopManager.default = "none";
- };
- };
-
- users.extraUsers.common = {
- isNormalUser = true;
- uid = 1000;
- extraGroups = [ "wheel" ];
- shell = pkgs.fish;
+ services.openssh = {
+ enable = true;
+ permitRootLogin = "no";
};
environment = {
systemPackages = let
custom_vim = import ./pkgs/vim/vim.nix pkgs;
in with pkgs; [
- hdparm ntfs3g psmisc htop fish git silver-searcher custom_vim
+ psmisc htop fish git silver-searcher custom_vim
];
shellAliases = {
diff --git a/host/asterix.nix b/host/asterix.nix
index 0112617..d925259 100644
--- a/host/asterix.nix
+++ b/host/asterix.nix
@@ -1,5 +1,8 @@
{
- imports = [ ./hardware/asterix.nix ];
+ imports = [
+ ./hardware/asterix.nix
+ ./role/desktop.nix
+ ];
boot = {
loader.grub = {
diff --git a/host/automatix.nix b/host/automatix.nix
new file mode 100644
index 0000000..fd819f4
--- /dev/null
+++ b/host/automatix.nix
@@ -0,0 +1,13 @@
+{ pkgs, ... }:
+
+{
+ imports = [ ./hardware/automatix.nix ];
+
+ boot.loader.grub = {
+ enable = true;
+ version = 2;
+ device = "/dev/sda";
+ };
+
+ networking.hostName = "automatix";
+}
diff --git a/host/hardware/automatix.nix b/host/hardware/automatix.nix
new file mode 100644
index 0000000..4b35109
--- /dev/null
+++ b/host/hardware/automatix.nix
@@ -0,0 +1,25 @@
+# Do not modify this file! It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations. Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, ... }:
+
+{
+ imports =
+ [ <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
+ ];
+
+ boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sd_mod" "sr_mod" ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/ec324e84-6766-49b7-ad5e-583e78a35432";
+ fsType = "ext4";
+ };
+
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/05f0315c-f5f5-4471-b2ef-6e53b95cb08b"; }
+ ];
+
+ nix.maxJobs = lib.mkDefault 1;
+}
diff --git a/host/obelix.nix b/host/obelix.nix
index 5d6206c..f876a61 100644
--- a/host/obelix.nix
+++ b/host/obelix.nix
@@ -1,7 +1,10 @@
{ pkgs, ... }:
{
- imports = [ ./hardware/obelix.nix ];
+ imports = [
+ ./hardware/obelix.nix
+ ./role/desktop.nix
+ ];
boot = {
loader.grub = {
diff --git a/conf/vpn/T-TeleSec_GlobalRoot_Class_2.pem b/host/role/conf/vpn/T-TeleSec_GlobalRoot_Class_2.pem
index 374b050..374b050 100644
--- a/conf/vpn/T-TeleSec_GlobalRoot_Class_2.pem
+++ b/host/role/conf/vpn/T-TeleSec_GlobalRoot_Class_2.pem
diff --git a/conf/vpn/kit.ovpn.nix b/host/role/conf/vpn/kit.ovpn.nix
index 82a21ee..82a21ee 100644
--- a/conf/vpn/kit.ovpn.nix
+++ b/host/role/conf/vpn/kit.ovpn.nix
diff --git a/host/role/desktop.nix b/host/role/desktop.nix
new file mode 100644
index 0000000..cf20500
--- /dev/null
+++ b/host/role/desktop.nix
@@ -0,0 +1,45 @@
+{ pkgs, ... }:
+
+{
+ fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
+
+ sound.enable = true;
+ hardware = {
+ opengl.driSupport32Bit = true;
+ pulseaudio = {
+ enable = true;
+ support32Bit = true;
+ };
+ };
+
+ services = {
+ journald = {
+ extraConfig = ''Storage=volatile'';
+ };
+
+ openvpn.servers = {
+ KIT = {
+ config = import ./conf/vpn/kit.ovpn.nix;
+ autoStart = false;
+ };
+ };
+
+ xserver = {
+ enable = true;
+ layout = "de";
+ xkbOptions = "caps:escape";
+
+ displayManager.slim = {
+ enable = true;
+ autoLogin = true;
+ defaultUser = "common";
+ };
+
+ desktopManager.default = "none";
+ };
+ };
+
+ environment.systemPackages = with pkgs; [
+ hdparm ntfs3g
+ ];
+}