switch to nixfmt
Charlotte Som charlotte@som.codes
Sun, 08 Sep 2024 10:03:26 +0100
13 files changed,
195 insertions(+),
122 deletions(-)
jump to
M
flake.nix
→
flake.nix
@@ -4,71 +4,85 @@ inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; }; - outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs: { - nixosConfigurations = { - runestone = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + outputs = + { + self, + nixpkgs, + nixpkgs-unstable, + ... + }@inputs: + { + nixosConfigurations = { + runestone = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; - specialArgs = { - user-pkgs = self.packages; - unstable-pkgs = nixpkgs-unstable.legacyPackages."x86_64-linux"; - }; + specialArgs = { + user-pkgs = self.packages; + unstable-pkgs = nixpkgs-unstable.legacyPackages."x86_64-linux"; + }; - modules = [ - /* ({ config, pkgs, ... }: { - nixpkgs.overlays = [ - (final: prev: { - xdg-desktop-portal-gnome = prev.xdg-desktop-portal-gnome.overrideAttrs (oldAttrs: { - patches = (oldAttrs.patches or [ ]) ++ [ - ./packages/xdg-desktop-portal-gnome/unattended.patch - ]; - }); + modules = [ + /* + ({ config, pkgs, ... }: { + nixpkgs.overlays = [ + (final: prev: { + xdg-desktop-portal-gnome = prev.xdg-desktop-portal-gnome.overrideAttrs (oldAttrs: { + patches = (oldAttrs.patches or [ ]) ++ [ + ./packages/xdg-desktop-portal-gnome/unattended.patch + ]; + }); + }) + ]; }) - ]; - }) */ + */ - ({ ... }: { - system.stateVersion = "24.05"; - }) + ( + { ... }: + { + system.stateVersion = "24.05"; + } + ) - ./profiles/common/base.nix - ./profiles/common/locale.nix - ./profiles/common/networking.nix - ./profiles/common/desktop.nix + ./profiles/common/base.nix + ./profiles/common/locale.nix + ./profiles/common/networking.nix + ./profiles/common/desktop.nix - ./profiles/runestone/hardware-configuration.nix - ./profiles/runestone/base.nix - ./profiles/runestone/desktop.nix - ./profiles/runestone/grafana-prometheus.nix - ]; - }; + ./profiles/runestone/hardware-configuration.nix + ./profiles/runestone/base.nix + ./profiles/runestone/desktop.nix + ./profiles/runestone/grafana-prometheus.nix + ]; + }; - opal = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + opal = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; - specialArgs = { - user-pkgs = self.packages; - unstable-pkgs = nixpkgs-unstable.legacyPackages."x86_64-linux"; - }; + specialArgs = { + user-pkgs = self.packages; + unstable-pkgs = nixpkgs-unstable.legacyPackages."x86_64-linux"; + }; - modules = [ - ({ ... }: { - system.stateVersion = "24.05"; - }) + modules = [ + ( + { ... }: + { + system.stateVersion = "24.05"; + } + ) - ./profiles/common/base.nix - ./profiles/common/locale.nix - ./profiles/common/networking.nix - ./profiles/common/desktop.nix + ./profiles/common/base.nix + ./profiles/common/locale.nix + ./profiles/common/networking.nix + ./profiles/common/desktop.nix - ./profiles/opal/hardware-configuration.nix - ./profiles/opal/base.nix - ./profiles/runestone/gnome.nix # TODO: replace with a nice wayland twm or something - ]; + ./profiles/opal/hardware-configuration.nix + ./profiles/opal/base.nix + ./profiles/runestone/gnome.nix # TODO: replace with a nice wayland twm or something + ]; + }; }; - }; - packages = - import ./packages/default.nix { pkgs = import nixpkgs { system = "x86_64-linux"; }; }; - }; + packages = import ./packages/default.nix { pkgs = import nixpkgs { system = "x86_64-linux"; }; }; + }; }
M
packages/berkeley-mono/package.nix
→
packages/berkeley-mono/package.nix
@@ -1,4 +1,9 @@
-{ stdenv, requireFile, unzip, lib }: +{ + stdenv, + requireFile, + unzip, + lib, +}: stdenv.mkDerivation { pname = "berkeley-mono"; version = "1.0";
M
packages/default.nix
→
packages/default.nix
@@ -1,3 +1,4 @@
-{pkgs}: { +{ pkgs }: +{ berkeley-mono = pkgs.callPackage ./berkeley-mono/package.nix { }; -}+}
M
profiles/common/base.nix
→
profiles/common/base.nix
@@ -1,7 +1,11 @@
-{ pkgs, ... }: { +{ pkgs, ... }: +{ nix = { package = pkgs.lix; - settings.experimental-features = [ "nix-command" "flakes" ]; + settings.experimental-features = [ + "nix-command" + "flakes" + ]; gc = { automatic = true; dates = "monthly";
M
profiles/common/desktop.nix
→
profiles/common/desktop.nix
@@ -1,4 +1,5 @@
-{ lib, ... }: { +{ lib, ... }: +{ hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true;
M
profiles/common/locale.nix
→
profiles/common/locale.nix
@@ -1,4 +1,5 @@
-{ ... }: { +{ ... }: +{ i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "en_GB.UTF-8";
M
profiles/common/networking.nix
→
profiles/common/networking.nix
@@ -1,4 +1,5 @@
-{ ... }: { +{ ... }: +{ networking.networkmanager.enable = true; systemd.services.NetworkManager-wait-online.enable = false; networking.firewall.enable = false;
M
profiles/opal/base.nix
→
profiles/opal/base.nix
@@ -1,9 +1,13 @@
-{ pkgs, ... }: { +{ pkgs, ... }: +{ networking.hostName = "opal"; time.timeZone = "Europe/London"; boot.initrd.kernelModules = [ "ideapad_laptop" ]; - boot.kernelParams = [ "i8042.direct" "i8042.dumbkbd" ]; # funny keyboard issue + boot.kernelParams = [ + "i8042.direct" + "i8042.dumbkbd" + ]; # funny keyboard issue hardware.opengl = { enable = true;@@ -19,11 +23,18 @@
users.users.charlotte = { isNormalUser = true; description = "charlotte"; - extraGroups = [ "networkmanager" "wheel" "video" ]; + extraGroups = [ + "networkmanager" + "wheel" + "video" + ]; shell = pkgs.zsh; - packages = (with pkgs; [ - stow - ]); + packages = ( + with pkgs; + [ + stow + ] + ); }; }
M
profiles/opal/hardware-configuration.nix
→
profiles/opal/hardware-configuration.nix
@@ -1,28 +1,34 @@
-{ config, lib, modulesPath, ... }: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; +{ + config, + lib, + modulesPath, + ... +}: +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "nvme" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/13f110b2-0cb6-4f22-a3c1-5d764d0ba9f7"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/13f110b2-0cb6-4f22-a3c1-5d764d0ba9f7"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/60C6-4ADE"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/60C6-4ADE"; + fsType = "vfat"; + }; - swapDevices = - [{ device = "/dev/disk/by-uuid/7919a726-42b5-4b5d-b8f5-7f556049ebc1"; }]; + swapDevices = [ { device = "/dev/disk/by-uuid/7919a726-42b5-4b5d-b8f5-7f556049ebc1"; } ]; networking.useDHCP = lib.mkDefault true;
M
profiles/runestone/base.nix
→
profiles/runestone/base.nix
@@ -1,4 +1,10 @@
-{ pkgs, user-pkgs, unstable-pkgs, ... }: { +{ + pkgs, + user-pkgs, + unstable-pkgs, + ... +}: +{ networking.hostName = "runestone"; time.timeZone = "Europe/London";@@ -16,23 +22,32 @@
users.users.charlotte = { isNormalUser = true; description = "charlotte"; - extraGroups = [ "networkmanager" "wheel" "video" ]; + extraGroups = [ + "networkmanager" + "wheel" + "video" + ]; shell = pkgs.zsh; }; programs.firefox.enable = true; - environment.systemPackages = (with pkgs;[ - vscode-fhs - nixpkgs-fmt - foot - ]) ++ [ - user-pkgs.berkeley-mono - unstable-pkgs.nixd - ]; + environment.systemPackages = + (with pkgs; [ + vscode-fhs + nixpkgs-fmt + foot + ]) + ++ [ + user-pkgs.berkeley-mono + unstable-pkgs.nixd + unstable-pkgs.nixfmt-rfc-style + ]; - users.users.charlotte.packages = (with pkgs; [ - stow - ]) ++ (with unstable-pkgs; [ - lan-mouse - ]); + users.users.charlotte.packages = + (with pkgs; [ + stow + ]) + ++ (with unstable-pkgs; [ + lan-mouse + ]); }
M
profiles/runestone/desktop.nix
→
profiles/runestone/desktop.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: { +{ pkgs, ... }: +{ services.xserver.desktopManager.gnome.enable = true; services.xserver.displayManager.gdm.enable = true;
M
profiles/runestone/grafana-prometheus.nix
→
profiles/runestone/grafana-prometheus.nix
@@ -1,4 +1,5 @@
-{ config, ... }: { +{ config, ... }: +{ services.grafana = { enable = true;
M
profiles/runestone/hardware-configuration.nix
→
profiles/runestone/hardware-configuration.nix
@@ -1,29 +1,41 @@
-{ config, lib, modulesPath, ... }: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; +{ + config, + lib, + modulesPath, + ... +}: +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "vmd" + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/a69298ce-9e01-43d4-b395-ddec19dc4a42"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/a69298ce-9e01-43d4-b395-ddec19dc4a42"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/92E6-F710"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/92E6-F710"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; - swapDevices = - [{ device = "/dev/disk/by-uuid/ded24e03-a766-49eb-b494-071a9ac45423"; }]; + swapDevices = [ { device = "/dev/disk/by-uuid/ded24e03-a766-49eb-b494-071a9ac45423"; } ]; networking.useDHCP = lib.mkDefault true;