Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

AUTOFORMAT

+33 -24
+2 -1
configuration.nix
··· 6 6 7 7 { 8 8 imports = 9 - [ # Include the results of the hardware scan. 9 + [ 10 + # Include the results of the hardware scan. 10 11 ./hardware-configuration.nix 11 12 ./boot.nix 12 13 ./networking.nix
+6 -4
gui.nix
··· 1 - { pkgs, ... }: let 1 + { pkgs, ... }: 2 + let 2 3 unstable = import <nixos-unstable> { }; 3 - in { 4 + in 5 + { 4 6 # Enable the X11 windowing system. 5 7 services.xserver = { 6 8 enable = true; 7 - videoDrivers = ["amdgpu"]; 9 + videoDrivers = [ "amdgpu" ]; 8 10 }; 9 11 10 12 # Configure keymap in X11 ··· 52 54 noto-fonts-cjk 53 55 noto-fonts-emoji 54 56 noto-fonts-extra 55 - (nerdfonts.override { fonts = ["FiraCode"]; }) 57 + (nerdfonts.override { fonts = [ "FiraCode" ]; }) 56 58 ]; 57 59 58 60 # Polkit is a dependency of Sway. It's responsible for handling security policies
+7 -4
hardware-configuration.nix
··· 5 5 6 6 { 7 7 imports = 8 - [ (modulesPath + "/installer/scan/not-detected.nix") 8 + [ 9 + (modulesPath + "/installer/scan/not-detected.nix") 9 10 ]; 10 11 11 12 boot.kernelPackages = pkgs.linuxPackages_zen; 12 13 boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; 13 14 boot.initrd.kernelModules = [ "kvm-amd" "amdgpu" ]; 14 - boot.kernelModules = [ "kvm-amd" "amdgpu"]; 15 + boot.kernelModules = [ "kvm-amd" "amdgpu" ]; 15 16 virtualisation.libvirtd = { 16 17 enable = true; 17 18 qemu = { ··· 27 28 hardware.enableRedistributableFirmware = true; 28 29 29 30 fileSystems."/" = 30 - { device = "/dev/disk/by-uuid/07019c69-2597-410d-a8a0-a8ffb0f58883"; 31 + { 32 + device = "/dev/disk/by-uuid/07019c69-2597-410d-a8a0-a8ffb0f58883"; 31 33 fsType = "ext4"; 32 34 }; 33 35 34 36 fileSystems."/boot" = 35 - { device = "/dev/disk/by-uuid/4B85-C90A"; 37 + { 38 + device = "/dev/disk/by-uuid/4B85-C90A"; 36 39 fsType = "vfat"; 37 40 }; 38 41
+2 -2
networking.nix
··· 42 42 "/srv/shokuhou" = { 43 43 device = "192.168.1.3:/srv/shokuhou"; 44 44 fsType = "nfs"; 45 - options = ["nfsvers=4" "user" "x-system.automount" "x-system.idle-timeout=600"]; 45 + options = [ "nfsvers=4" "user" "x-system.automount" "x-system.idle-timeout=600" ]; 46 46 }; 47 47 "/srv/mentalout" = { 48 48 device = "192.168.1.3:/srv/mentalout"; 49 49 fsType = "nfs"; 50 - options = ["nfsvers=4" "user" "x-system.automount" "x-system.idle-timeout=600"]; 50 + options = [ "nfsvers=4" "user" "x-system.automount" "x-system.idle-timeout=600" ]; 51 51 }; 52 52 }; 53 53 }
+3 -2
noah-home.nix
··· 9 9 "google-chrome" 10 10 ]; 11 11 }; 12 - in { 12 + in 13 + { 13 14 home.packages = with pkgs; [ 14 15 # main tool 15 16 firefox-devedition ··· 134 135 ]; 135 136 136 137 nix = { 137 - settings.experimental-features = ["nix-command" "flakes"]; 138 + settings.experimental-features = [ "nix-command" "flakes" ]; 138 139 }; 139 140 140 141 programs.fish = {
+11 -9
packages.nix
··· 1 1 { pkgs, lib, ... }: 2 - let # bash script to let dbus know about important env variables and 2 + let # bash script to let dbus know about important env variables and 3 3 # propagate them to relevent services run at the end of sway config 4 4 # see 5 5 # https://github.com/emersion/xdg-desktop-portal-wlr/wiki/"It-doesn't-work"-Troubleshooting-Checklist ··· 27 27 name = "configure-gtk"; 28 28 destination = "/bin/configure-gtk"; 29 29 executable = true; 30 - text = let 31 - # TODO: figure out why these bindings exist or where they're used 32 - schema = pkgs.gsettings-desktop-schemas; 33 - datadir = "${schema}/share/gsettings-schemas/${schema.name}"; 34 - in '' 35 - 6 gnome_schema=org.gnome.desktop.interface 36 - gsettings set $gnome_schema gtk-theme 'Dracula' 37 - ''; 30 + text = 31 + let 32 + # TODO: figure out why these bindings exist or where they're used 33 + schema = pkgs.gsettings-desktop-schemas; 34 + datadir = "${schema}/share/gsettings-schemas/${schema.name}"; 35 + in 36 + '' 37 + 6 gnome_schema=org.gnome.desktop.interface 38 + gsettings set $gnome_schema gtk-theme 'Dracula' 39 + ''; 38 40 }; 39 41 in 40 42 {
+2 -2
users.nix
··· 16 16 users.users.noah = { 17 17 isNormalUser = true; 18 18 shell = pkgs.fish; 19 - extraGroups = [ "wheel" "video" "nas" "libvirtd" "qemu-libvirtd"]; # Enable ‘sudo’ for the user. 19 + extraGroups = [ "wheel" "video" "nas" "libvirtd" "qemu-libvirtd" ]; # Enable ‘sudo’ for the user. 20 20 hashedPasswordFile = "/etc/nixos/noah-password"; 21 21 openssh.authorizedKeys.keys = [ 22 22 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC/cXL1cV6QUW5z2bJp1mCu0CXrcc0Dntdxaeo3fg60N noah@odin" ··· 34 34 # No more NIX_PATH, use system pkgs 35 35 home-manager.useGlobalPkgs = true; 36 36 37 - home-manager.users.noah = import ./noah-home.nix ; 37 + home-manager.users.noah = import ./noah-home.nix; 38 38 }