diff options
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/oracle/configuration.nix | 91 | ||||
-rw-r--r-- | hosts/oracle/hardware-configuration.nix | 42 |
2 files changed, 133 insertions, 0 deletions
diff --git a/hosts/oracle/configuration.nix b/hosts/oracle/configuration.nix new file mode 100644 index 0000000..500906b --- /dev/null +++ b/hosts/oracle/configuration.nix | |||
@@ -0,0 +1,91 @@ | |||
1 | { config, pkgs, ... }: | ||
2 | |||
3 | { | ||
4 | imports = | ||
5 | [ | ||
6 | ./hardware-configuration.nix | ||
7 | ]; | ||
8 | |||
9 | boot.loader.systemd-boot.enable = true; | ||
10 | boot.loader.efi.canTouchEfiVariables = true; | ||
11 | |||
12 | # swap on luks | ||
13 | boot.initrd.secrets = { | ||
14 | "/crypto_keyfile.bin" = null; | ||
15 | }; | ||
16 | boot.initrd.luks.devices."luks-5cbabb1a-ed3b-44da-b4c0-894c2265d8c0".device = "/dev/disk/by-uuid/5cbabb1a-ed3b-44da-b4c0-894c2265d8c0"; | ||
17 | boot.initrd.luks.devices."luks-5cbabb1a-ed3b-44da-b4c0-894c2265d8c0".keyFile = "/crypto_keyfile.bin"; | ||
18 | |||
19 | networking.hostName = "oracle"; | ||
20 | networking.networkmanager.enable = true; | ||
21 | |||
22 | time.timeZone = "America/Vancouver"; | ||
23 | i18n.defaultLocale = "en_CA.UTF-8"; | ||
24 | sound.enable = true; | ||
25 | hardware.pulseaudio.enable = false; | ||
26 | hardware.bluetooth.enable = true; | ||
27 | security.rtkit.enable = true; | ||
28 | programs.zsh.enable = true; | ||
29 | |||
30 | users.users.shubh = { | ||
31 | isNormalUser = true; | ||
32 | shell = pkgs.zsh; | ||
33 | extraGroups = [ "networkmanager" "wheel" "docker" ]; | ||
34 | }; | ||
35 | |||
36 | nixpkgs.config.allowUnfree = true; | ||
37 | |||
38 | environment.systemPackages = with pkgs; [ | ||
39 | neovim | ||
40 | git | ||
41 | interception-tools | ||
42 | ]; | ||
43 | |||
44 | services = { | ||
45 | xserver = { | ||
46 | enable = true; | ||
47 | layout = "us"; | ||
48 | displayManager = { | ||
49 | sddm.enable = true; | ||
50 | defaultSession = "plasmawayland"; | ||
51 | }; | ||
52 | desktopManager.plasma5.enable = true; | ||
53 | libinput.enable = true; | ||
54 | }; | ||
55 | pipewire = { | ||
56 | enable = true; | ||
57 | alsa.enable = true; | ||
58 | alsa.support32Bit = true; | ||
59 | pulse.enable = true; | ||
60 | }; | ||
61 | interception-tools = { | ||
62 | enable = true; | ||
63 | plugins = with pkgs; [ | ||
64 | interception-tools-plugins.caps2esc | ||
65 | ]; | ||
66 | udevmonConfig = '' | ||
67 | - JOB: "intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE" | ||
68 | - JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE" | ||
69 | DEVICE: | ||
70 | EVENTS: | ||
71 | EV_KEY: [KEY_CAPSLOCK, KEY_ESC] | ||
72 | ''; | ||
73 | }; | ||
74 | }; | ||
75 | virtualisation.docker.enable = true; | ||
76 | |||
77 | nix = { | ||
78 | extraOptions = '' | ||
79 | experimental-features = nix-command flakes | ||
80 | ''; | ||
81 | }; | ||
82 | |||
83 | # This value determines the NixOS release from which the default | ||
84 | # settings for stateful data, like file locations and database versions | ||
85 | # on your system were taken. It‘s perfectly fine and recommended to leave | ||
86 | # this value at the release version of the first install of this system. | ||
87 | # Before changing this value read the documentation for this option | ||
88 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||
89 | system.stateVersion = "23.05"; # Did you read the comment? | ||
90 | |||
91 | } | ||
diff --git a/hosts/oracle/hardware-configuration.nix b/hosts/oracle/hardware-configuration.nix new file mode 100644 index 0000000..1d57a92 --- /dev/null +++ b/hosts/oracle/hardware-configuration.nix | |||
@@ -0,0 +1,42 @@ | |||
1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ | ||
2 | # and may be overwritten by future invocations. Please make changes | ||
3 | # to /etc/nixos/configuration.nix instead. | ||
4 | { config, lib, pkgs, modulesPath, ... }: | ||
5 | |||
6 | { | ||
7 | imports = | ||
8 | [ (modulesPath + "/installer/scan/not-detected.nix") | ||
9 | ]; | ||
10 | |||
11 | boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; | ||
12 | boot.initrd.kernelModules = [ ]; | ||
13 | boot.kernelModules = [ "kvm-amd" ]; | ||
14 | boot.extraModulePackages = [ ]; | ||
15 | |||
16 | fileSystems."/" = | ||
17 | { device = "/dev/disk/by-uuid/84cae4ab-2829-4af1-9fe8-1a57128b1fa1"; | ||
18 | fsType = "ext4"; | ||
19 | }; | ||
20 | |||
21 | boot.initrd.luks.devices."luks-8bf40ec5-be29-41f3-97c8-ed6a6beec6d3".device = "/dev/disk/by-uuid/8bf40ec5-be29-41f3-97c8-ed6a6beec6d3"; | ||
22 | |||
23 | fileSystems."/boot" = | ||
24 | { device = "/dev/disk/by-uuid/2B72-E7BD"; | ||
25 | fsType = "vfat"; | ||
26 | }; | ||
27 | |||
28 | swapDevices = | ||
29 | [ { device = "/dev/disk/by-uuid/3815a775-9072-4703-ab1d-267fe1287bf8"; } | ||
30 | ]; | ||
31 | |||
32 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||
33 | # (the default) this is the recommended approach. When using systemd-networkd it's | ||
34 | # still possible to use this option, but it's recommended to use it in conjunction | ||
35 | # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. | ||
36 | networking.useDHCP = lib.mkDefault true; | ||
37 | # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; | ||
38 | # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; | ||
39 | |||
40 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
41 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
42 | } | ||