about summary refs log tree commit diff
path: root/machines
diff options
context:
space:
mode:
Diffstat (limited to 'machines')
-rwxr-xr-xmachines/adax/cc.nix15
-rwxr-xr-xmachines/adax/configuration.nix16
-rwxr-xr-xmachines/adax/default.nix6
-rwxr-xr-xmachines/adax/hardware-configuration.nix38
-rwxr-xr-xmachines/base.nix49
-rwxr-xr-xmachines/hp-compaq/configuration.nix16
-rwxr-xr-xmachines/hp-compaq/default.nix6
-rwxr-xr-xmachines/hp-compaq/hardware-configuration.nix44
-rwxr-xr-xmachines/pl.nix11
-rwxr-xr-xmachines/x220/hardware-configuration.nix33
10 files changed, 234 insertions, 0 deletions
diff --git a/machines/adax/cc.nix b/machines/adax/cc.nix
new file mode 100755
index 0000000..96b12d2
--- /dev/null
+++ b/machines/adax/cc.nix
@@ -0,0 +1,15 @@
+# Edit this configuration file to define what should be installed on
+# your system.  Help is available in the configuration.nix(5) man page
+# and in the NixOS manual (accessible by running ‘nixos-help’).
+
+{ config, pkgs, ... }:
+
+{
+  imports =
+    [ # Include the results of the hardware scan.
+      ./hardware-configuration.nix
+      ./dots/machines/hp-compaq/configuration.nix
+    ];
+
+
+}
diff --git a/machines/adax/configuration.nix b/machines/adax/configuration.nix
new file mode 100755
index 0000000..57b80d6
--- /dev/null
+++ b/machines/adax/configuration.nix
@@ -0,0 +1,16 @@
+{ config, pkgs, ... }:
+
+{
+
+  imports = [
+    ../base.nix
+    ../pl.nix
+    ../../modules/larbs.nix
+  ];
+
+  networking.hostName = "adax";
+
+  environment.systemPackages = with pkgs; [
+  ];
+
+}
diff --git a/machines/adax/default.nix b/machines/adax/default.nix
new file mode 100755
index 0000000..246ffea
--- /dev/null
+++ b/machines/adax/default.nix
@@ -0,0 +1,6 @@
+{
+	imports = [
+		./configuration.nix
+		./hardware-configuration.nix
+	];
+}
diff --git a/machines/adax/hardware-configuration.nix b/machines/adax/hardware-configuration.nix
new file mode 100755
index 0000000..99b9002
--- /dev/null
+++ b/machines/adax/hardware-configuration.nix
@@ -0,0 +1,38 @@
+# 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/installer/scan/not-detected.nix>
+    ];
+
+  boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usbhid" "usb_storage" "floppy" "sd_mod" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-intel" ];
+  boot.extraModulePackages = [ ];
+
+  boot.loader.grub.enable = true;
+  boot.loader.grub.version = 2;
+  boot.loader.grub.device = "/dev/sdc"; # or "nodev" for efi only
+
+  networking.useDHCP = false;
+  networking.interfaces.enp3s0.useDHCP = true;
+
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/6b9e05c9-827e-4a34-bb35-f2a3da149f44";
+      fsType = "ext4";
+    };
+
+  fileSystems."/boot" =
+    { device = "/dev/disk/by-uuid/7F96-4F40";
+      fsType = "vfat";
+    };
+
+  swapDevices =
+    [ { device = "/dev/disk/by-uuid/cda58eb8-fc1e-4bea-9dca-b119a1da2267"; }
+    ];
+
+  nix.maxJobs = lib.mkDefault 2;
+}
diff --git a/machines/base.nix b/machines/base.nix
new file mode 100755
index 0000000..5976448
--- /dev/null
+++ b/machines/base.nix
@@ -0,0 +1,49 @@
+## Base setup, absolute minimum
+
+{ pkgs, ... }:
+{
+
+  imports = [
+    ../modules/nur.nix
+    ../users/pn.nix
+  ];
+
+  environment.systemPackages = with pkgs; [
+    wget vim curl htop file
+    stdenv git zip unzip
+    dnsutils ripgrep jq
+  ];
+
+  console.font = "${pkgs.terminus_font}/share/consolefonts/ter-v22n";
+
+  ## === Vim configuration ===
+  programs.vim.defaultEditor = true;
+  environment.etc."vim/vimrc".text = ''
+    set undodir=$XDG_DATA_HOME/vim/undo
+    set directory=$XDG_DATA_HOME/vim/swap
+    set backupdir=$XDG_DATA_HOME/vim/backup
+    set viewdir=$XDG_DATA_HOME/vim/view
+    set viminfo+='1000,n$XDG_DATA_HOME/vim/viminfo
+    set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
+  '';
+
+  ## === ZSH configuration ===
+
+  ## Make zsh the default shell
+  users.defaultUserShell = "/run/current-system/sw/bin/zsh";
+
+  ## Cleanup home
+  environment.etc."zshenv.local".text = ''
+    export ZDOTDIR=$HOME/.config/zsh
+  '';
+
+  programs.zsh = {
+    enable = true;
+    enableCompletion = true;
+    autosuggestions.enable = true;
+    histFile = "$XDG_DATA_HOME/zsh/history";
+
+    syntaxHighlighting.enable = true;
+  };
+
+}
diff --git a/machines/hp-compaq/configuration.nix b/machines/hp-compaq/configuration.nix
new file mode 100755
index 0000000..cc61647
--- /dev/null
+++ b/machines/hp-compaq/configuration.nix
@@ -0,0 +1,16 @@
+{ config, pkgs, ... }:
+
+{
+
+  imports = [
+	../base.nix
+	../pl.nix
+	../../modules/larbs.nix
+  ];
+
+  networking.hostName = "hp-compaq";
+
+  environment.systemPackages = with pkgs; [
+  ];
+}
+
diff --git a/machines/hp-compaq/default.nix b/machines/hp-compaq/default.nix
new file mode 100755
index 0000000..246ffea
--- /dev/null
+++ b/machines/hp-compaq/default.nix
@@ -0,0 +1,6 @@
+{
+	imports = [
+		./configuration.nix
+		./hardware-configuration.nix
+	];
+}
diff --git a/machines/hp-compaq/hardware-configuration.nix b/machines/hp-compaq/hardware-configuration.nix
new file mode 100755
index 0000000..6971c39
--- /dev/null
+++ b/machines/hp-compaq/hardware-configuration.nix
@@ -0,0 +1,44 @@
+# 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/installer/scan/not-detected.nix>
+    ];
+
+  boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ ];
+  boot.extraModulePackages = [ ];
+
+  boot.loader.grub.enable = true;
+  boot.loader.grub.version = 2;
+  boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
+
+  networking.useDHCP = false;
+  networking.interfaces.enp2s0.useDHCP = true;
+
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/ad2775d5-5890-493e-b709-60c1f7f3c63b";
+      fsType = "ext4";
+    };
+
+  fileSystems."/nix/store" =
+    { device = "/nix/store";
+      fsType = "none";
+      options = [ "bind" ];
+    };
+
+  fileSystems."/boot" =
+    { device = "/dev/disk/by-uuid/C6DC-F51D";
+      fsType = "vfat";
+    };
+
+  swapDevices =
+    [ { device = "/dev/disk/by-uuid/ad2b96eb-341c-40e2-bb86-1ed2f03a0713"; }
+    ];
+
+  nix.maxJobs = lib.mkDefault 2;
+}
diff --git a/machines/pl.nix b/machines/pl.nix
new file mode 100755
index 0000000..14d8a5f
--- /dev/null
+++ b/machines/pl.nix
@@ -0,0 +1,11 @@
+## Configuration for writing in polish
+
+{
+  i18n.defaultLocale = "en_US.UTF-8"; # Less confusing locale than polish one
+
+  console.keyMap = "pl";
+
+  time.timeZone = "Europe/Warsaw";
+
+  services.xserver.layout = "pl";
+}
diff --git a/machines/x220/hardware-configuration.nix b/machines/x220/hardware-configuration.nix
new file mode 100755
index 0000000..3b34522
--- /dev/null
+++ b/machines/x220/hardware-configuration.nix
@@ -0,0 +1,33 @@
+# ThinkPad X220
+
+# 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/installer/scan/not-detected.nix>
+    ];
+
+  boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-intel" "tp_smapi" ];
+  boot.extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ];
+
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/e00c989b-b3fd-469e-b894-ea609fb4d7fa";
+      fsType = "ext4";
+    };
+
+  fileSystems."/boot" =
+    { device = "/dev/disk/by-uuid/2f0948cd-a0de-41c0-a341-e9fe01460fd3";
+      fsType = "ext3";
+    };
+
+    swapDevices = [ {
+      device = "/dev/sda2"; } ];
+
+  nix.maxJobs = lib.mkDefault 4;
+  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
+}