From 3df076fbae96e68b71712ac2bbf8779a80bd968c Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sat, 26 Aug 2023 23:00:18 +0000 Subject: [PATCH] Reformat with nixfmt --- externals/packages/avarice/default.nix | 6 +- externals/packages/hll2300d/default.nix | 74 ++++++----- externals/packages/jlink/default.nix | 33 +---- .../packages/weechat-matrix-rs/default.nix | 3 +- externals/systemd-boot-secure/default.nix | 34 ++--- flake.lock | 34 +++++ flake.nix | 46 +++---- home/default.nix | 11 +- home/fish.nix | 3 +- home/git.nix | 6 +- home/gtk.nix | 8 +- home/mpv.nix | 10 +- home/neovim/default.nix | 11 +- home/sway.nix | 72 +++++----- sets/base.nix | 7 +- sets/buildMachines.nix | 14 +- sets/disc.nix | 5 +- sets/fpga.nix | 5 +- sets/hardware.nix | 6 +- sets/ime.nix | 7 +- sets/kernelpatch.nix | 10 +- sets/laptop.nix | 9 +- sets/packages.nix | 25 ++-- sets/pipewire.nix | 5 +- sets/radio.nix | 9 +- sets/sway.nix | 8 +- sets/virtualization.nix | 32 ++++- sets/wifi.nix | 3 +- sets/workstation.nix | 18 +-- system/mistmane/hardware-configuration.nix | 27 ++-- system/rainbowdash/default.nix | 23 ++-- system/rainbowdash/hardware-configuration.nix | 42 +++--- system/spike/default.nix | 6 +- system/spike/hardware-configuration.nix | 50 ++++--- system/starlight/boot-config.nix | 11 +- system/starlight/default.nix | 23 +++- system/starlight/hardware-configuration.nix | 124 ++++++++---------- system/starlight/scripts.nix | 3 +- 38 files changed, 408 insertions(+), 415 deletions(-) diff --git a/externals/packages/avarice/default.nix b/externals/packages/avarice/default.nix index 6cc613a..9c72d7d 100644 --- a/externals/packages/avarice/default.nix +++ b/externals/packages/avarice/default.nix @@ -4,7 +4,8 @@ stdenv.mkDerivation rec { pname = "avarice"; version = "2.14"; src = fetchurl { - url = "mirror://sourceforge/project/avarice/avarice/avarice-${version}/avarice-${version}.tar.bz2"; + url = + "mirror://sourceforge/project/avarice/avarice/avarice-${version}/avarice-${version}.tar.bz2"; sha256 = "1ab2pxnkbw501iv1i9z9nj7hfzz4y7hid4l4q58cifm3aw17skjb"; }; @@ -16,7 +17,8 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "http://avarice.sourceforge.net/"; - description = "A program to facilitate AVR debugging using an Atmel or AVR ICE"; + description = + "A program to facilitate AVR debugging using an Atmel or AVR ICE"; license = licenses.gpl2; platforms = platforms.unix; maintainers = [ maintainers.artemist ]; diff --git a/externals/packages/hll2300d/default.nix b/externals/packages/hll2300d/default.nix index d00a543..0db0524 100644 --- a/externals/packages/hll2300d/default.nix +++ b/externals/packages/hll2300d/default.nix @@ -1,18 +1,20 @@ -{ stdenv, lib, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk, perl, gnugrep, which }: +{ stdenv, lib, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file +, a2ps, coreutils, gawk, perl, gnugrep, which }: let version = "3.2.0-1"; lprdeb = fetchurl { - url = "https://download.brother.com/welcome/dlf101900/hll2300dlpr-${version}.i386.deb"; + url = + "https://download.brother.com/welcome/dlf101900/hll2300dlpr-${version}.i386.deb"; sha256 = "093ya7qykhk8mnbiwz1wy0qly66mmk0ghd1rgla25biask5nnmwv"; }; cupsdeb = fetchurl { - url = "https://download.brother.com/welcome/dlf101901/hll2300dcupswrapper-${version}.i386.deb"; + url = + "https://download.brother.com/welcome/dlf101901/hll2300dcupswrapper-${version}.i386.deb"; sha256 = "1fylsbnxbljh517lbdr3324jsi4fwhbfh6gzrdvifg0wl20vfwqr"; }; -in -stdenv.mkDerivation { +in stdenv.mkDerivation { name = "cups-brother-hll2300dw"; nativeBuildInputs = [ makeWrapper ]; @@ -21,42 +23,41 @@ stdenv.mkDerivation { dontUnpack = true; installPhase = '' - mkdir -p $out - dpkg-deb -x ${cupsdeb} $out - dpkg-deb -x ${lprdeb} $out + mkdir -p $out + dpkg-deb -x ${cupsdeb} $out + dpkg-deb -x ${lprdeb} $out - substituteInPlace $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D \ - --replace /opt "$out/opt" \ - --replace /usr/bin/perl ${perl}/bin/perl \ - --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$out/opt/brother/Printers/HLL2300D/\"; #" \ - --replace "PRINTER =~" "PRINTER = \"HLL2300D\"; #" + substituteInPlace $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D \ + --replace /opt "$out/opt" \ + --replace /usr/bin/perl ${perl}/bin/perl \ + --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$out/opt/brother/Printers/HLL2300D/\"; #" \ + --replace "PRINTER =~" "PRINTER = \"HLL2300D\"; #" - patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - $out/opt/brother/Printers/HLL2300D/lpd/brprintconflsr3 - patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - $out/opt/brother/Printers/HLL2300D/lpd/rawtobr3 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ + $out/opt/brother/Printers/HLL2300D/lpd/brprintconflsr3 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ + $out/opt/brother/Printers/HLL2300D/lpd/rawtobr3 - for f in \ - $out/opt/brother/Printers/HLL2300D/cupswrapper/brother_lpdwrapper_HLL2300D \ - $out/opt/brother/Printers/HLL2300D/cupswrapper/paperconfigml1 \ - ; do - wrapProgram $f \ - --prefix PATH : ${lib.makeBinPath [ - coreutils - ghostscript - gnugrep - gnused - ]} - done + for f in \ + $out/opt/brother/Printers/HLL2300D/cupswrapper/brother_lpdwrapper_HLL2300D \ + $out/opt/brother/Printers/HLL2300D/cupswrapper/paperconfigml1 \ + ; do + wrapProgram $f \ + --prefix PATH : ${ + lib.makeBinPath [ coreutils ghostscript gnugrep gnused ] + } + done - mkdir -p $out/lib/cups/filter/ - ln -s $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D $out/lib/cups/filter/brother_lpdwrapper_HLL2300D + mkdir -p $out/lib/cups/filter/ + ln -s $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D $out/lib/cups/filter/brother_lpdwrapper_HLL2300D - mkdir -p $out/share/cups/model - ln -s $out/opt/brother/Printers/HLL2300D/cupswrapper/brother-HLL2300D-cups-en.ppd $out/share/cups/model/ + mkdir -p $out/share/cups/model + ln -s $out/opt/brother/Printers/HLL2300D/cupswrapper/brother-HLL2300D-cups-en.ppd $out/share/cups/model/ - wrapProgram $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D \ - --prefix PATH ":" ${lib.makeBinPath [ ghostscript a2ps file gnused gnugrep coreutils which ] } + wrapProgram $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D \ + --prefix PATH ":" ${ + lib.makeBinPath [ ghostscript a2ps file gnused gnugrep coreutils which ] + } ''; meta = with lib; { @@ -64,7 +65,8 @@ stdenv.mkDerivation { description = "Brother hl-l2300dw printer driver"; license = licenses.unfree; platforms = platforms.linux; - downloadPage = "https://support.brother.com/g/b/downloadlist.aspx?c=de&lang=de&prod=hll2300d_us_eu_as&os=128&flang=English"; + downloadPage = + "https://support.brother.com/g/b/downloadlist.aspx?c=de&lang=de&prod=hll2300d_us_eu_as&os=128&flang=English"; maintainers = [ maintainers.artemist ]; }; } diff --git a/externals/packages/jlink/default.nix b/externals/packages/jlink/default.nix index 7a5a581..a723da5 100644 --- a/externals/packages/jlink/default.nix +++ b/externals/packages/jlink/default.nix @@ -1,33 +1,14 @@ -{ stdenv -, lib -, fetchurl -, autoPatchelfHook -, substituteAll -, qt4 -, fontconfig -, freetype -, libusb -, libICE -, libSM -, ncurses5 -, udev -, libX11 -, libXext -, libXcursor -, libXfixes -, libXrender -, libXrandr -}: +{ stdenv, lib, fetchurl, autoPatchelfHook, substituteAll, qt4, fontconfig +, freetype, libusb, libICE, libSM, ncurses5, udev, libX11, libXext, libXcursor +, libXfixes, libXrender, libXrandr }: let - conf = (lib.importJSON ./version.json).${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); -in -stdenv.mkDerivation rec { + conf = (lib.importJSON ./version.json).${stdenv.hostPlatform.system} or (throw + "unsupported system ${stdenv.hostPlatform.system}"); +in stdenv.mkDerivation rec { pname = "jlink"; version = conf.version; - src = fetchurl { - inherit (conf) url hash curlOpts; - }; + src = fetchurl { inherit (conf) url hash curlOpts; }; dontConfigure = true; dontBuild = true; diff --git a/externals/packages/weechat-matrix-rs/default.nix b/externals/packages/weechat-matrix-rs/default.nix index bf7ff9a..55ff13a 100644 --- a/externals/packages/weechat-matrix-rs/default.nix +++ b/externals/packages/weechat-matrix-rs/default.nix @@ -1,4 +1,5 @@ -{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, cmake, openssl, llvmPackages, weechat }: +{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, cmake, openssl +, llvmPackages, weechat }: rustPlatform.buildRustPackage rec { pname = "weechat-matrix-rs"; diff --git a/externals/systemd-boot-secure/default.nix b/externals/systemd-boot-secure/default.nix index b575daa..abdfa29 100644 --- a/externals/systemd-boot-secure/default.nix +++ b/externals/systemd-boot-secure/default.nix @@ -19,11 +19,15 @@ let nix = config.nix.package.out; - timeout = if config.boot.loader.timeout != null then config.boot.loader.timeout else ""; + timeout = if config.boot.loader.timeout != null then + config.boot.loader.timeout + else + ""; editor = if cfg.editor then "True" else "False"; - configurationLimit = if cfg.configurationLimit == null then 0 else cfg.configurationLimit; + configurationLimit = + if cfg.configurationLimit == null then 0 else cfg.configurationLimit; inherit (cfg) consoleMode; @@ -35,10 +39,10 @@ let signingKey = if cfg.signed then cfg.signing-key else "/no-signing-key"; - signingCertificate = if cfg.signed then cfg.signing-certificate else "/no-signing-crt"; + signingCertificate = + if cfg.signed then cfg.signing-certificate else "/no-signing-crt"; }; -in -{ +in { options.boot.loader.systemd-boot-secure = { enable = mkOption { @@ -46,7 +50,8 @@ in type = types.bool; - description = "Whether to enable the systemd-boot (formerly gummiboot) EFI boot manager"; + description = + "Whether to enable the systemd-boot (formerly gummiboot) EFI boot manager"; }; signed = mkOption { @@ -154,13 +159,13 @@ in }; config = mkIf cfg.enable { - assertions = [ - { - assertion = (config.boot.kernelPackages.kernel.features or { efiBootStub = true; }) ? efiBootStub; + assertions = [{ + assertion = + (config.boot.kernelPackages.kernel.features or { efiBootStub = true; }) + ? efiBootStub; - message = "This kernel does not support the EFI boot stub"; - } - ]; + message = "This kernel does not support the EFI boot stub"; + }]; boot.loader.grub.enable = mkDefault false; @@ -171,9 +176,8 @@ in boot.loader.id = "systemd-boot"; - requiredKernelConfig = with config.lib.kernelConfig; [ - (isYes "EFI_STUB") - ]; + requiredKernelConfig = with config.lib.kernelConfig; + [ (isYes "EFI_STUB") ]; }; }; } diff --git a/flake.lock b/flake.lock index 3945129..ce0350c 100644 --- a/flake.lock +++ b/flake.lock @@ -277,6 +277,7 @@ "nixpkgs-unstable": "nixpkgs-unstable", "private": "private", "rustybar": "rustybar", + "utils": "utils_2", "wip-pinebook-pro": "wip-pinebook-pro" } }, @@ -341,6 +342,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "utils": { "locked": { "lastModified": 1637014545, @@ -356,6 +372,24 @@ "type": "github" } }, + "utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1692799911, + "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "wip-pinebook-pro": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 7cc367f..6d58a06 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,8 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixos-hardware.url = "github:nixos/nixos-hardware"; + utils.url = "github:numtide/flake-utils"; + lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; inputs.nixpkgs.follows = "nixpkgs"; @@ -18,7 +20,8 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - private.url = "git+ssh://git@github.com/artemist/nixos-config-private?ref=unified"; + private.url = + "git+ssh://git@github.com/artemist/nixos-config-private?ref=unified"; wip-pinebook-pro = { url = "github:samueldr/wip-pinebook-pro"; @@ -26,53 +29,46 @@ }; }; - outputs = { self, nixpkgs, home-manager, rustybar, private, wip-pinebook-pro, nixpkgs-unstable, lanzaboote, ... } @ inputs: + outputs = { self, nixpkgs, home-manager, private, nixpkgs-unstable, utils, ... + }@inputs: let - makeSystem = conf: nixpkgs.lib.nixosSystem (nixpkgs.lib.recursiveUpdate conf - rec { + makeSystem = conf: + nixpkgs.lib.nixosSystem (nixpkgs.lib.recursiveUpdate conf rec { specialArgs = { inherit inputs; - pkgs-unstable = import nixpkgs-unstable { config.allowUnfree = true; system = conf.system; }; + pkgs-unstable = import nixpkgs-unstable { + config.allowUnfree = true; + system = conf.system; + }; }; modules = [ private.nixosModules.base home-manager.nixosModules.home-manager - { - home-manager.extraSpecialArgs = specialArgs; - } + { home-manager.extraSpecialArgs = specialArgs; } ] ++ (conf.modules or [ ]); }); - in - { + in { nixosConfigurations.starlight = makeSystem { system = "x86_64-linux"; - modules = [ - ./system/starlight - private.nixosModules.starlight - ]; + modules = [ ./system/starlight private.nixosModules.starlight ]; }; nixosConfigurations.rainbowdash = makeSystem { system = "x86_64-linux"; - modules = [ - ./system/rainbowdash - ]; + modules = [ ./system/rainbowdash ]; }; nixosConfigurations.spike = makeSystem { system = "x86_64-linux"; - modules = [ - ./system/spike - ]; + modules = [ ./system/spike ]; }; nixosConfigurations.mistmane = makeSystem { system = "aarch64-linux"; - modules = [ - ./system/mistmane - ]; + modules = [ ./system/mistmane ]; }; - - }; + } // utils.lib.eachDefaultSystem (system: + let pkgs = import nixpkgs { inherit system; }; + in { formatter = pkgs.nixfmt; }); } diff --git a/home/default.nix b/home/default.nix index 9bebbb4..9ddf82c 100644 --- a/home/default.nix +++ b/home/default.nix @@ -6,15 +6,8 @@ useGlobalPkgs = true; }; home-manager.users.artemis = { - imports = [ - ./fish.nix - ./gtk.nix - ./git.nix - ./mpv.nix - ./kitty.nix - ./neovim - ./ssh - ]; + imports = + [ ./fish.nix ./gtk.nix ./git.nix ./mpv.nix ./kitty.nix ./neovim ./ssh ]; home.stateVersion = config.system.stateVersion; diff --git a/home/fish.nix b/home/fish.nix index f2ca917..ff38bd9 100644 --- a/home/fish.nix +++ b/home/fish.nix @@ -1,5 +1,4 @@ -{ ... }: -{ +{ ... }: { programs.fish = { enable = true; interactiveShellInit = "set -g -x GPG_TTY (tty)"; diff --git a/home/git.nix b/home/git.nix index bb25bfe..7dd4ce3 100644 --- a/home/git.nix +++ b/home/git.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { programs.git = { enable = true; package = pkgs.gitAndTools.gitFull; @@ -20,7 +19,8 @@ init.defaultBranch = "canon"; log.showSignature = true; - credential.helper = "!${pkgs.gitAndTools.pass-git-helper}/bin/pass-git-helper $@"; + credential.helper = + "!${pkgs.gitAndTools.pass-git-helper}/bin/pass-git-helper $@"; sendemail = { smtpServer = "smtp.fastmail.com"; smtpUser = "me@artem.ist"; diff --git a/home/gtk.nix b/home/gtk.nix index 0a5a1c6..08317ae 100644 --- a/home/gtk.nix +++ b/home/gtk.nix @@ -1,10 +1,6 @@ { ... }: -let - common-gtk = { - gtk-application-prefer-dark-theme = true; - }; -in -{ +let common-gtk = { gtk-application-prefer-dark-theme = true; }; +in { home.sessionVariables.GTK_THEME = "Adwaita:dark"; gtk = { enable = true; diff --git a/home/mpv.nix b/home/mpv.nix index 83f0bdb..28bb96c 100644 --- a/home/mpv.nix +++ b/home/mpv.nix @@ -2,10 +2,11 @@ let ffmpeg_5 = pkgs.ffmpeg_5-full; scripts = with pkgs.mpvScripts; [ sponsorblock ]; - mpv = pkgs.wrapMpv (pkgs.mpv-unwrapped.override { inherit ffmpeg_5; }) { inherit scripts; }; -in + mpv = pkgs.wrapMpv (pkgs.mpv-unwrapped.override { inherit ffmpeg_5; }) { + inherit scripts; + }; -{ +in { home.packages = [ ffmpeg_5 ]; programs.mpv = { enable = true; @@ -20,7 +21,8 @@ in audio-normalize-downmix = "yes"; replaygain = "track"; - script-opts-set = "sponsorblock-local_database=no,sponsorblock-skip_categories=[sponsor,intro,selfpromo]"; + script-opts-set = + "sponsorblock-local_database=no,sponsorblock-skip_categories=[sponsor,intro,selfpromo]"; }; # Don't make this profile default since not all machines can handle it profiles.gpu-hq = { diff --git a/home/neovim/default.nix b/home/neovim/default.nix index f2b6562..3323355 100644 --- a/home/neovim/default.nix +++ b/home/neovim/default.nix @@ -13,15 +13,14 @@ let }; meta.homepage = "https://github.com/folke/lsp-colors.nvim"; }; -in -{ +in { programs.neovim = { enable = true; vimAlias = true; - extraConfig = (builtins.replaceStrings - [ "{{CLANGDPATH}}" "{{JLSPATH}}" ] - [ "${pkgs.clang-tools}/bin/clangd" "${pkgs.java-language-server}/bin/java-language-server" ] - (builtins.readFile ./init.vim)); + extraConfig = (builtins.replaceStrings [ "{{CLANGDPATH}}" "{{JLSPATH}}" ] [ + "${pkgs.clang-tools}/bin/clangd" + "${pkgs.java-language-server}/bin/java-language-server" + ] (builtins.readFile ./init.vim)); plugins = with pkgs.vimPlugins; [ editorconfig-vim fzf-vim diff --git a/home/sway.nix b/home/sway.nix index f67b1b7..342a4ac 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -18,20 +18,15 @@ let F11 = "21"; F12 = "22"; }; - extraGotoBindings = lib.mapAttrs' - (name: value: { - name = "${mod}+${name}"; - value = "workspace ${value}"; - }) - extraWorkspaces; - extraMoveBindings = lib.mapAttrs' - (name: value: { - name = "${mod}+Shift+${name}"; - value = "move container to workspace ${value}"; - }) - extraWorkspaces; -in -{ + extraGotoBindings = lib.mapAttrs' (name: value: { + name = "${mod}+${name}"; + value = "workspace ${value}"; + }) extraWorkspaces; + extraMoveBindings = lib.mapAttrs' (name: value: { + name = "${mod}+Shift+${name}"; + value = "move container to workspace ${value}"; + }) extraWorkspaces; +in { home.sessionVariables = { MOZ_USE_XINPUT2 = 1; _JAVA_AWT_WM_NONREPARENTING = 1; @@ -60,8 +55,14 @@ in startup = [ { command = "mako"; } - { command = "dbus-update-activation-environment --systemd --all"; always = true; } - { command = "swayidle -w before-sleep 'swaylock -f' timeout 600 'swaylock -f' timeout 660 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\"'"; } + { + command = "dbus-update-activation-environment --systemd --all"; + always = true; + } + { + command = + "swayidle -w before-sleep 'swaylock -f' timeout 600 'swaylock -f' timeout 660 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\"'"; + } ]; # I have to set these to something and can't set them to existing uses @@ -69,22 +70,23 @@ in down = "Mod1+Down"; up = "Mod1+Up"; right = "Mod1+Right"; - keybindings = lib.mkOptionDefault - ({ - "${mod}+Shift+d" = "exec wofi -I -i -S drun"; - "${mod}+j" = "move workspace to left"; - "${mod}+k" = "move workspace to right"; - "${mod}+l" = "exec swaylock"; - "${mod}+Mod1+e" = "exec wofi-emoji"; - # Sink 0 means the default AIUI - "XF86AudioRaiseVolume" = "exec pactl set-sink-volume 0 +5%"; - "XF86AudioLowerVolume" = "exec pactl set-sink-volume 0 -5%"; - "XF86AudioMute" = "exec pactl set-sink-mute 0 toggle"; - "XF86MonBrightnessUp" = "exec light -A 5"; - "XF86MonBrightnessDown" = "exec light -U 5"; - "Print" = "exec grim \"$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')\""; - "Shift+Print" = "exec grim -g \"$(slurp)\" \"$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')\""; - } // extraGotoBindings // extraMoveBindings); + keybindings = lib.mkOptionDefault ({ + "${mod}+Shift+d" = "exec wofi -I -i -S drun"; + "${mod}+j" = "move workspace to left"; + "${mod}+k" = "move workspace to right"; + "${mod}+l" = "exec swaylock"; + "${mod}+Mod1+e" = "exec wofi-emoji"; + # Sink 0 means the default AIUI + "XF86AudioRaiseVolume" = "exec pactl set-sink-volume 0 +5%"; + "XF86AudioLowerVolume" = "exec pactl set-sink-volume 0 -5%"; + "XF86AudioMute" = "exec pactl set-sink-mute 0 toggle"; + "XF86MonBrightnessUp" = "exec light -A 5"; + "XF86MonBrightnessDown" = "exec light -U 5"; + "Print" = '' + exec grim "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"''; + "Shift+Print" = '' + exec grim -g "$(slurp)" "$(xdg-user-dir PICTURES)/Screenshot/$(date +'%F %H-%M-%S-%N_screenshot.png')"''; + } // extraGotoBindings // extraMoveBindings); floating.titlebar = true; window.titlebar = true; @@ -97,7 +99,11 @@ in background = "#000000d0"; statusline = "#ffffff"; separator = "#aaaaaa"; - inactiveWorkspace = { border = "#000000d0"; background = "#323232d0"; text = "#ffffffd0"; }; + inactiveWorkspace = { + border = "#000000d0"; + background = "#323232d0"; + text = "#ffffffd0"; + }; }; }]; }; diff --git a/sets/base.nix b/sets/base.nix index 8f94391..e592251 100644 --- a/sets/base.nix +++ b/sets/base.nix @@ -47,5 +47,10 @@ security.sudo.execWheelOnly = true; systemd.extraConfig = "DefaultLimitCORE=infinity"; - security.pam.loginLimits = [{ domain = "*"; item = "core"; type = "hard"; value = "infinity"; }]; + security.pam.loginLimits = [{ + domain = "*"; + item = "core"; + type = "hard"; + value = "infinity"; + }]; } diff --git a/sets/buildMachines.nix b/sets/buildMachines.nix index 6d69717..fadc337 100644 --- a/sets/buildMachines.nix +++ b/sets/buildMachines.nix @@ -2,14 +2,12 @@ { nix = { - buildMachines = [ - { - hostName = "starlight"; - supportedFeatures = [ "kvm" "big-parallel" "benchmark" "nixos-text" ]; - system = "x86_64-linux"; - maxJobs = 2; - } - ]; + buildMachines = [{ + hostName = "starlight"; + supportedFeatures = [ "kvm" "big-parallel" "benchmark" "nixos-text" ]; + system = "x86_64-linux"; + maxJobs = 2; + }]; distributedBuilds = true; extraOptions = '' builders-use-substitutes = true diff --git a/sets/disc.nix b/sets/disc.nix index eb2eb5d..5603393 100644 --- a/sets/disc.nix +++ b/sets/disc.nix @@ -1,10 +1,7 @@ { pkgs, ... }: { - environment.systemPackages = with pkgs; [ - cyanrip - makemkv - ]; + environment.systemPackages = with pkgs; [ cyanrip makemkv ]; # Needed for MakeMKV boot.kernelModules = [ "sg" ]; diff --git a/sets/fpga.nix b/sets/fpga.nix index f631f7e..471b1e3 100644 --- a/sets/fpga.nix +++ b/sets/fpga.nix @@ -1,9 +1,8 @@ { pkgs, ... }: { - services.udev.packages = [ - (pkgs.callPackage ../externals/rules/fpga.nix { }) - ]; + services.udev.packages = + [ (pkgs.callPackage ../externals/rules/fpga.nix { }) ]; environment.systemPackages = with pkgs; [ # Synthesis icestorm diff --git a/sets/hardware.nix b/sets/hardware.nix index 863c63c..79f35b5 100644 --- a/sets/hardware.nix +++ b/sets/hardware.nix @@ -1,8 +1,6 @@ { config, pkgs, pkgs-unstable, ... }: -let - jlink = pkgs.callPackage ../externals/packages/jlink { }; -in -{ +let jlink = pkgs.callPackage ../externals/packages/jlink { }; +in { services.udev.packages = [ (pkgs.callPackage ../externals/rules/adafruit.nix { }) (pkgs.callPackage ../externals/rules/limesuite.nix { }) diff --git a/sets/ime.nix b/sets/ime.nix index a65efc3..6def230 100644 --- a/sets/ime.nix +++ b/sets/ime.nix @@ -10,7 +10,8 @@ # Required for support in kitty, ibus/fcitx5 are somewhat compatible so this works environment.variables.GLFW_IM_MODULE = "ibus"; - home-manager.users.artemis.wayland.windowManager.sway.config.startup = [ - { command = "fcitx5 -d --replace"; always = true; } - ]; + home-manager.users.artemis.wayland.windowManager.sway.config.startup = [{ + command = "fcitx5 -d --replace"; + always = true; + }]; } diff --git a/sets/kernelpatch.nix b/sets/kernelpatch.nix index 88e0d63..391e70b 100644 --- a/sets/kernelpatch.nix +++ b/sets/kernelpatch.nix @@ -3,10 +3,10 @@ { boot.kernelPatches = [{ name = "fix-execve"; - patch = pkgs.fetchpatch - { - url = "https://git.alpinelinux.org/aports/plain/main/linux-lts/0001-fs-exec-require-argv-0-presence-in-do_execveat_commo.patch?id=520e6dfd6e814414ab7cf862b897ca6ba427d30f"; - sha256 = "sha256-vrN64lGDiAFgMn5SGWiI9MwNRct4m9DJDxokFZ6EpiE="; - }; + patch = pkgs.fetchpatch { + url = + "https://git.alpinelinux.org/aports/plain/main/linux-lts/0001-fs-exec-require-argv-0-presence-in-do_execveat_commo.patch?id=520e6dfd6e814414ab7cf862b897ca6ba427d30f"; + sha256 = "sha256-vrN64lGDiAFgMn5SGWiI9MwNRct4m9DJDxokFZ6EpiE="; + }; }]; } diff --git a/sets/laptop.nix b/sets/laptop.nix index 78d9891..446de28 100644 --- a/sets/laptop.nix +++ b/sets/laptop.nix @@ -1,9 +1,7 @@ { config, pkgs, ... }: { - imports = [ - ./wifi.nix - ]; + imports = [ ./wifi.nix ]; services = { tlp.enable = true; @@ -12,7 +10,6 @@ programs.light.enable = true; users.users.artemis.extraGroups = [ "video" ]; - environment.systemPackages = with pkgs; [ - config.boot.kernelPackages.cpupower - ]; + environment.systemPackages = with pkgs; + [ config.boot.kernelPackages.cpupower ]; } diff --git a/sets/packages.nix b/sets/packages.nix index a2560ae..3cd5454 100644 --- a/sets/packages.nix +++ b/sets/packages.nix @@ -1,5 +1,4 @@ -{ config, pkgs, pkgs-unstable, lib, ... }: -{ +{ config, pkgs, pkgs-unstable, lib, ... }: { environment.systemPackages = (with pkgs; [ # Audiovisual pkgs-unstable.darktable @@ -117,17 +116,15 @@ hicolor-icon-theme # Dictionaries - ]) ++ (with pkgs.hunspellDicts; [ - en-us-large - de_DE - ]) ++ (lib.optionals (pkgs.system == "x86_64-linux") (with pkgs; [ - efibootmgr - efitools - sbsigntool + ]) ++ (with pkgs.hunspellDicts; [ en-us-large de_DE ]) + ++ (lib.optionals (pkgs.system == "x86_64-linux") (with pkgs; [ + efibootmgr + efitools + sbsigntool - # Wine and tools - cabextract - samba - pkgs-unstable.wineWowPackages.waylandFull - ])); + # Wine and tools + cabextract + samba + pkgs-unstable.wineWowPackages.waylandFull + ])); } diff --git a/sets/pipewire.nix b/sets/pipewire.nix index 01b4e6f..e5492a7 100644 --- a/sets/pipewire.nix +++ b/sets/pipewire.nix @@ -12,8 +12,5 @@ }; hardware.pulseaudio.enable = lib.mkForce false; security.rtkit.enable = true; - environment.systemPackages = with pkgs; [ - pulseaudio - qpwgraph - ]; + environment.systemPackages = with pkgs; [ pulseaudio qpwgraph ]; } diff --git a/sets/radio.nix b/sets/radio.nix index 4a3f8f4..74bdee0 100644 --- a/sets/radio.nix +++ b/sets/radio.nix @@ -1,11 +1,6 @@ { config, pkgs, ... }: { - services.udev.packages = with pkgs; [ - soapysdr-with-plugins - ]; - environment.systemPackages = with pkgs; [ - soapysdr-with-plugins - gqrx - ]; + services.udev.packages = with pkgs; [ soapysdr-with-plugins ]; + environment.systemPackages = with pkgs; [ soapysdr-with-plugins gqrx ]; } diff --git a/sets/sway.nix b/sets/sway.nix index 37cd64c..a216ed5 100644 --- a/sets/sway.nix +++ b/sets/sway.nix @@ -1,5 +1,4 @@ -{ config, pkgs, pkgs-unstable, ... }: -{ +{ config, pkgs, pkgs-unstable, ... }: { imports = [ ./fonts.nix ]; security.polkit.enable = true; services = { @@ -9,10 +8,7 @@ }; xdg.portal = { enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-gtk - xdg-desktop-portal-wlr - ]; + extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ]; }; sound.enable = true; environment.systemPackages = with pkgs; [ diff --git a/sets/virtualization.nix b/sets/virtualization.nix index 6fcf1e2..068f101 100644 --- a/sets/virtualization.nix +++ b/sets/virtualization.nix @@ -22,18 +22,36 @@ # Breaks IPv4 on bridge boot.kernel.sysctl."net.bridge.bridge-nf-call-iptables" = 0; - environment.systemPackages = with pkgs; [ - virtmanager - spice-gtk - qemu - ]; + environment.systemPackages = with pkgs; [ virtmanager spice-gtk qemu ]; users.users = { artemis.extraGroups = [ "lxd" "libvirtd" ]; lxd = { isSystemUser = true; - subUidRanges = [{ startUid = 16777216; count = 16777216; } { startUid = config.users.users.artemis.uid; count = 1; }]; - subGidRanges = [{ startGid = 16777216; count = 16777216; } { startGid = 100; count = 1; } { startGid = config.users.groups.artemis.gid; count = 1; }]; + subUidRanges = [ + { + startUid = 16777216; + count = 16777216; + } + { + startUid = config.users.users.artemis.uid; + count = 1; + } + ]; + subGidRanges = [ + { + startGid = 16777216; + count = 16777216; + } + { + startGid = 100; + count = 1; + } + { + startGid = config.users.groups.artemis.gid; + count = 1; + } + ]; group = "lxd"; }; }; diff --git a/sets/wifi.nix b/sets/wifi.nix index 2abcf20..80ae83f 100644 --- a/sets/wifi.nix +++ b/sets/wifi.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { services.udev.packages = [ pkgs.crda ]; networking.networkmanager = { enable = true; diff --git a/sets/workstation.nix b/sets/workstation.nix index e01d66d..7297bcf 100644 --- a/sets/workstation.nix +++ b/sets/workstation.nix @@ -1,13 +1,7 @@ { config, pkgs, pkgs-unstable, ... }: { - imports = [ - ./sway.nix - ./packages.nix - ./pipewire.nix - ./base.nix - ../home - ]; + imports = [ ./sway.nix ./packages.nix ./pipewire.nix ./base.nix ../home ]; i18n.defaultLocale = "de_DE.UTF-8"; i18n.supportedLocales = [ "all" ]; @@ -27,9 +21,7 @@ fwupd.enable = true; pcscd.enable = true; printing.enable = true; - udev.packages = [ - (pkgs.callPackage ../externals/rules/uhk.nix { }) - ]; + udev.packages = [ (pkgs.callPackage ../externals/rules/uhk.nix { }) ]; }; programs.ssh.startAgent = true; @@ -44,11 +36,7 @@ }; }; - nixpkgs.overlays = [ - (final: prev: { - brscan5 = pkgs-unstable.brscan5; - }) - ]; + nixpkgs.overlays = [ (final: prev: { brscan5 = pkgs-unstable.brscan5; }) ]; users.users.artemis.extraGroups = [ "scanner" ]; } diff --git a/system/mistmane/hardware-configuration.nix b/system/mistmane/hardware-configuration.nix index 31dbb0a..99a8868 100644 --- a/system/mistmane/hardware-configuration.nix +++ b/system/mistmane/hardware-configuration.nix @@ -4,32 +4,25 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "usbhid" ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/8b204d52-62c1-48e9-b487-e7138f49903a"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/8b204d52-62c1-48e9-b487-e7138f49903a"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/375e4660-be08-40ba-8961-0a9cc3a96187"; - fsType = "ext4"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/375e4660-be08-40ba-8961-0a9cc3a96187"; + fsType = "ext4"; + }; swapDevices = - [ - { device = "/dev/disk/by-uuid/1114039c-3329-4551-a56d-fccde77a31a7"; } - ]; + [{ device = "/dev/disk/by-uuid/1114039c-3329-4551-a56d-fccde77a31a7"; }]; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; } diff --git a/system/rainbowdash/default.nix b/system/rainbowdash/default.nix index 993cf41..75d2d77 100644 --- a/system/rainbowdash/default.nix +++ b/system/rainbowdash/default.nix @@ -24,10 +24,19 @@ # Home home-manager.users.artemis = { wayland.windowManager.sway.config = { - output."eDP-1" = { mode = "3840x2400@59.994Hz"; scale = "2"; }; + output."eDP-1" = { + mode = "3840x2400@59.994Hz"; + scale = "2"; + }; input."1386:18753:Wacom_HID_4941_Finger".map_to_output = "eDP-1"; - input."1739:52710:DLL096D:01_06CB:CDE6_Touchpad" = { middle_emulation = "enabled"; click_method = "clickfinger"; }; - startup = [{ command = "swayidle -w before-sleep 'light -O' after-resume 'light -I'"; always = true; }]; + input."1739:52710:DLL096D:01_06CB:CDE6_Touchpad" = { + middle_emulation = "enabled"; + click_method = "clickfinger"; + }; + startup = [{ + command = "swayidle -w before-sleep 'light -O' after-resume 'light -I'"; + always = true; + }]; }; xdg.configFile."rustybar/config.toml".text = '' [[tile]] @@ -44,14 +53,10 @@ ''; }; - services.printing.drivers = with pkgs; [ - cups-dymo - ]; + services.printing.drivers = with pkgs; [ cups-dymo ]; # Not in nixos-hardware for some reason - hardware.opengl.extraPackages = with pkgs; [ - intel-compute-runtime - ]; + hardware.opengl.extraPackages = with pkgs; [ intel-compute-runtime ]; boot.blacklistedKernelModules = [ "psmouse" ]; services.thermald.enable = true; diff --git a/system/rainbowdash/hardware-configuration.nix b/system/rainbowdash/hardware-configuration.nix index d6ad3f2..e35b6d3 100644 --- a/system/rainbowdash/hardware-configuration.nix +++ b/system/rainbowdash/hardware-configuration.nix @@ -4,40 +4,36 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.availableKernelModules = + [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/mapper/rainbowdash-root"; - fsType = "btrfs"; - options = [ "subvol=root" ]; - }; + fileSystems."/" = { + device = "/dev/mapper/rainbowdash-root"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; - fileSystems."/home" = - { - device = "/dev/mapper/rainbowdash-root"; - fsType = "btrfs"; - options = [ "subvol=home" ]; - }; + fileSystems."/home" = { + device = "/dev/mapper/rainbowdash-root"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/642D-02DF"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/642D-02DF"; + fsType = "vfat"; + }; swapDevices = [{ device = "/dev/disk/by-uuid/289be8e5-6547-41d4-a6ba-309141f9fccd"; }]; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; # High-DPI console - console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; + console.font = + lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; } diff --git a/system/spike/default.nix b/system/spike/default.nix index 75d6cb3..170ec85 100644 --- a/system/spike/default.nix +++ b/system/spike/default.nix @@ -30,7 +30,11 @@ ''; home-manager.users.artemis.wayland.windowManager.sway.config = { - output."DSI-1" = { pos = "0 0"; mode = "720x1280@60.083Hz"; transform = "90"; }; + output."DSI-1" = { + pos = "0 0"; + mode = "720x1280@60.083Hz"; + transform = "90"; + }; input."24704:32865:AMR-4630-XXX-0-_0-1023_USB_KEYBOARD_Mouse" = { scroll_method = "on_button_down"; scroll_button = "BTN_MIDDLE"; diff --git a/system/spike/hardware-configuration.nix b/system/spike/hardware-configuration.nix index a2ff16d..41bdae2 100644 --- a/system/spike/hardware-configuration.nix +++ b/system/spike/hardware-configuration.nix @@ -4,42 +4,36 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.availableKernelModules = + [ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/ee50d2d7-34ee-4fec-bee8-53ae5f464de2"; - fsType = "btrfs"; - options = [ "subvol=root" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/ee50d2d7-34ee-4fec-bee8-53ae5f464de2"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; - fileSystems."/home" = - { - device = "/dev/disk/by-uuid/ee50d2d7-34ee-4fec-bee8-53ae5f464de2"; - fsType = "btrfs"; - options = [ "subvol=home" ]; - }; + fileSystems."/home" = { + device = "/dev/disk/by-uuid/ee50d2d7-34ee-4fec-bee8-53ae5f464de2"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; - fileSystems."/nix" = - { - device = "/dev/disk/by-uuid/ee50d2d7-34ee-4fec-bee8-53ae5f464de2"; - fsType = "btrfs"; - options = [ "subvol=nix" ]; - }; + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/ee50d2d7-34ee-4fec-bee8-53ae5f464de2"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/B78C-8B71"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/B78C-8B71"; + fsType = "vfat"; + }; swapDevices = [{ device = "/dev/disk/by-uuid/057964ef-4692-4189-98c6-32e7e05565e2"; }]; diff --git a/system/starlight/boot-config.nix b/system/starlight/boot-config.nix index 08bbbb3..549330f 100644 --- a/system/starlight/boot-config.nix +++ b/system/starlight/boot-config.nix @@ -1,8 +1,13 @@ { config, pkgs, pkgs-unstable, ... }: let - net_opts = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=60" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ]; -in -{ + net_opts = [ + "x-systemd.automount" + "noauto" + "x-systemd.idle-timeout=60" + "x-systemd.device-timeout=5s" + "x-systemd.mount-timeout=5s" + ]; +in { imports = [ ../../externals/systemd-boot-secure ]; boot = { kernelPackages = pkgs-unstable.linuxPackages_latest; diff --git a/system/starlight/default.nix b/system/starlight/default.nix index cedf11a..e75ae5f 100644 --- a/system/starlight/default.nix +++ b/system/starlight/default.nix @@ -96,9 +96,8 @@ })) ]; - services.udev.packages = [ - (pkgs.callPackage ../../externals/rules/m1n1.nix { }) - ]; + services.udev.packages = + [ (pkgs.callPackage ../../externals/rules/m1n1.nix { }) ]; hardware.opengl.extraPackages = with pkgs; [ vulkan-validation-layers ]; @@ -106,9 +105,21 @@ home-manager.users.artemis = { programs.mpv.defaultProfiles = [ "gpu-hq" ]; wayland.windowManager.sway.config.output = { - "DP-1" = { pos = "0 0"; mode = "3840x2160@59.997Hz"; scale = "2"; }; - "DP-2" = { pos = "1920 0"; mode = "3840x2160@59.997Hz"; scale = "2"; }; - "DP-3" = { pos = "3840 0"; mode = "3840x2160@60Hz"; scale = "2"; }; + "DP-1" = { + pos = "0 0"; + mode = "3840x2160@59.997Hz"; + scale = "2"; + }; + "DP-2" = { + pos = "1920 0"; + mode = "3840x2160@59.997Hz"; + scale = "2"; + }; + "DP-3" = { + pos = "3840 0"; + mode = "3840x2160@60Hz"; + scale = "2"; + }; }; # no toTOML generator so I guess we have to do this xdg.configFile."rustybar/config.toml".text = '' diff --git a/system/starlight/hardware-configuration.nix b/system/starlight/hardware-configuration.nix index f4a600a..a4f23fa 100644 --- a/system/starlight/hardware-configuration.nix +++ b/system/starlight/hardware-configuration.nix @@ -4,91 +4,77 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = + [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/aca21111-a488-4bc7-90a7-e61517c24818"; - fsType = "btrfs"; - options = [ "subvol=root" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/aca21111-a488-4bc7-90a7-e61517c24818"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; - fileSystems."/nix" = - { - device = "/dev/disk/by-uuid/aca21111-a488-4bc7-90a7-e61517c24818"; - fsType = "btrfs"; - options = [ "subvol=nix" ]; - }; + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/aca21111-a488-4bc7-90a7-e61517c24818"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/1AC2-9317"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/1AC2-9317"; + fsType = "vfat"; + }; - fileSystems."/home" = - { - device = "/dev/disk/by-uuid/aca21111-a488-4bc7-90a7-e61517c24818"; - fsType = "btrfs"; - options = [ "subvol=home" ]; - }; + fileSystems."/home" = { + device = "/dev/disk/by-uuid/aca21111-a488-4bc7-90a7-e61517c24818"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; - fileSystems."/media/data" = - { - device = "/dev/disk/by-uuid/c01b98d1-1eb9-42ce-8d05-4b9d852fca55"; - fsType = "btrfs"; - }; + fileSystems."/media/data" = { + device = "/dev/disk/by-uuid/c01b98d1-1eb9-42ce-8d05-4b9d852fca55"; + fsType = "btrfs"; + }; - fileSystems."/var/lib/lxd/shmounts" = - { - device = "tmpfs"; - fsType = "tmpfs"; - }; + fileSystems."/var/lib/lxd/shmounts" = { + device = "tmpfs"; + fsType = "tmpfs"; + }; - fileSystems."/var/lib/lxd/devlxd" = - { - device = "tmpfs"; - fsType = "tmpfs"; - }; + fileSystems."/var/lib/lxd/devlxd" = { + device = "tmpfs"; + fsType = "tmpfs"; + }; - fileSystems."/var/lib/lxd/storage-pools/default" = - { - device = "/dev/disk/by-uuid/aca21111-a488-4bc7-90a7-e61517c24818"; - fsType = "btrfs"; - options = [ "subvol=root/var/lib/lxd/storage-pools/default" ]; - }; + fileSystems."/var/lib/lxd/storage-pools/default" = { + device = "/dev/disk/by-uuid/aca21111-a488-4bc7-90a7-e61517c24818"; + fsType = "btrfs"; + options = [ "subvol=root/var/lib/lxd/storage-pools/default" ]; + }; - fileSystems."/media/luna/photos" = - { - device = "10.69.0.69:/media/tank/photos"; - fsType = "nfs4"; - }; + fileSystems."/media/luna/photos" = { + device = "10.69.0.69:/media/tank/photos"; + fsType = "nfs4"; + }; - fileSystems."/media/luna/games" = - { - device = "10.69.0.69:/media/tank/games"; - fsType = "nfs4"; - }; + fileSystems."/media/luna/games" = { + device = "10.69.0.69:/media/tank/games"; + fsType = "nfs4"; + }; - fileSystems."/media/luna/media" = - { - device = "10.69.0.69:/media/tank/media"; - fsType = "nfs4"; - }; + fileSystems."/media/luna/media" = { + device = "10.69.0.69:/media/tank/media"; + fsType = "nfs4"; + }; - fileSystems."/media/luna/private" = - { - device = "10.69.0.69:/media/tank/users/artemis"; - fsType = "nfs4"; - }; + fileSystems."/media/luna/private" = { + device = "10.69.0.69:/media/tank/users/artemis"; + fsType = "nfs4"; + }; swapDevices = [{ device = "/dev/disk/by-uuid/b134fecf-719f-45af-b317-001e413f06c4"; }]; diff --git a/system/starlight/scripts.nix b/system/starlight/scripts.nix index 3a75a6c..d3bbb09 100644 --- a/system/starlight/scripts.nix +++ b/system/starlight/scripts.nix @@ -4,8 +4,7 @@ let #! ${pkgs.runtimeShell} PATH=${pkgs.sway}/bin ''; -in -{ +in { home-manager.users.artemis.home.packages = [ (pkgs.writeScriptBin "work" '' ${swayPrelude}