diff options
Diffstat (limited to 'hosts/oracle/configuration.nix')
| -rw-r--r-- | hosts/oracle/configuration.nix | 91 |
1 files changed, 91 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 | } | ||
