From c791282b1f37f308c076b1b703747247869a0949 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 19 Apr 2024 22:54:21 +0200 Subject: [PATCH] nixos bjarte --- hosts/bjarte/default.nix | 5 ++- hosts/bjarte/hardware-configuration.nix | 41 +++++++++++++++++++ .../profiles/gnome/dconf-gnome-bindings.nix | 7 ++++ users/pbsds/home/profiles/gnome/dconf-pull.sh | 1 + 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 hosts/bjarte/hardware-configuration.nix diff --git a/hosts/bjarte/default.nix b/hosts/bjarte/default.nix index 271e99e..ad003f5 100644 --- a/hosts/bjarte/default.nix +++ b/hosts/bjarte/default.nix @@ -1,7 +1,8 @@ { config, pkgs, lib, ... }: { # Bootloader - #TODO + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; #boot.kernel.sysctl."vm.swappiness" = lib.mkDefault 10; # 0-100, commonly 60 @@ -44,6 +45,8 @@ #networking.useDHCP = true; #TODO: avahi? resolved? https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/base.nix#L15-L18 + services.printing.enable = true; + # TODO: remove? Move? programs.dconf.enable = true; } diff --git a/hosts/bjarte/hardware-configuration.nix b/hosts/bjarte/hardware-configuration.nix new file mode 100644 index 0000000..1dc6080 --- /dev/null +++ b/hosts/bjarte/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/17a93b23-a9f5-47ae-bd99-f8ea843da566"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/6CD3-AA6E"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/f076b6be-c3cf-45c1-80ec-05d6924cb061"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix b/users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix index 2b9de3c..81cc8f1 100644 --- a/users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix +++ b/users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix @@ -10,6 +10,13 @@ with lib.hm.gvariant; xkb-options = [ "terminate:ctrl_alt_bksp" "caps:none" ]; }; + "org/gnome/desktop/peripherals/touchpad" = { + disable-while-typing = false; + natural-scroll = false; + tap-to-click = true; + two-finger-scrolling-enabled = true; + }; + "org/gnome/desktop/wm/keybindings" = { close = [ "F4" ]; maximize = [ "Up" ]; diff --git a/users/pbsds/home/profiles/gnome/dconf-pull.sh b/users/pbsds/home/profiles/gnome/dconf-pull.sh index 0709a0a..c174460 100755 --- a/users/pbsds/home/profiles/gnome/dconf-pull.sh +++ b/users/pbsds/home/profiles/gnome/dconf-pull.sh @@ -16,6 +16,7 @@ dump1() { { dump "org/gnome/desktop/input-sources" + dump "org/gnome/desktop/peripherals/touchpad" dump "org/gnome/desktop/wm/keybindings" dump "org/gnome/mutter/keybindings" dump "org/gnome/shell/keybindings"