diff --git a/flake.nix b/flake.nix index 03a0afd..32ef14c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { description = "My awesome system config"; - + inputs = { nixpkgs.url = "github:nixos/nixpkgs/release-21.05"; unstable.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -28,7 +28,7 @@ }; }; - outputs = inputs@{ self, utils, home-manager, nixpkgs, agenix, ...}: + outputs = inputs@{ self, utils, home-manager, nixpkgs, agenix, ... }: utils.lib.mkFlake { inherit self inputs; diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 0359215..baa28e1 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -6,7 +6,8 @@ { imports = - [ # Include the results of the hardware scan. + [ + # Include the results of the hardware scan. ./hardware-configuration.nix ]; @@ -14,13 +15,13 @@ boot = { supportedFilesystems = [ "btrfs" ]; loader = { - grub = { - enable = true; - version = 2; - device = "nodev"; - efiSupport = true; - }; - efi.canTouchEfiVariables = true; + grub = { + enable = true; + version = 2; + device = "nodev"; + efiSupport = true; + }; + efi.canTouchEfiVariables = true; }; kernelPackages = pkgs.linuxPackages_zen; }; @@ -39,8 +40,8 @@ # NETWORKING networking = { hostName = "nixos-laptop"; - networkmanager.enable = true; - + networkmanager.enable = true; + useDHCP = false; interfaces.wlp1s0.useDHCP = true; }; diff --git a/hosts/nixos-laptop/hardware-configuration.nix b/hosts/nixos-laptop/hardware-configuration.nix index 13440c6..2e1a17c 100644 --- a/hosts/nixos-laptop/hardware-configuration.nix +++ b/hosts/nixos-laptop/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; @@ -14,7 +15,8 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; + { + device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; fsType = "btrfs"; options = [ "subvol=root" ]; }; @@ -22,37 +24,41 @@ boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/078b81ba-238e-471d-9951-b743588532b8"; fileSystems."/home" = - { device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; + { + device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; fsType = "btrfs"; options = [ "subvol=home" ]; }; fileSystems."/nix" = - { device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; + { + device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; fsType = "btrfs"; options = [ "subvol=nix" ]; }; fileSystems."/persist" = - { device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; + { + device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; fsType = "btrfs"; options = [ "subvol=persist" ]; }; fileSystems."/log" = - { device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; + { + device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; fsType = "btrfs"; options = [ "subvol=log" ]; neededForBoot = true; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/938D-F813"; + { + device = "/dev/disk/by-uuid/938D-F813"; fsType = "vfat"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/29ebf65f-e6ca-4625-9f72-a9321152be1b"; } - ]; + [{ device = "/dev/disk/by-uuid/29ebf65f-e6ca-4625-9f72-a9321152be1b"; }]; } diff --git a/modules/apps/kitty.nix b/modules/apps/kitty.nix index d63ed05..c039099 100644 --- a/modules/apps/kitty.nix +++ b/modules/apps/kitty.nix @@ -11,56 +11,56 @@ let window_padding_width = 3; }; extraConfig = '' - foreground #f8f8f2 - background #282a36 - #background #000000 - selection_foreground #44475a - selection_background #f8f8f2 + foreground #f8f8f2 + background #282a36 + #background #000000 + selection_foreground #44475a + selection_background #f8f8f2 - url_color #ffb86c + url_color #ffb86c - # black - color0 #21222c - color8 #6272a4 + # black + color0 #21222c + color8 #6272a4 - # red - color1 #ff5555 - color9 #ff6e6e + # red + color1 #ff5555 + color9 #ff6e6e - # green - color2 #50fa7b - color10 #69ff94 + # green + color2 #50fa7b + color10 #69ff94 - # yellow - color3 #f1fa8c - color11 #ffffa5 + # yellow + color3 #f1fa8c + color11 #ffffa5 - # blue - color4 #bd93f9 - color12 #d6acff + # blue + color4 #bd93f9 + color12 #d6acff - # magenta - color5 #ff79c6 - color13 #ff92df + # magenta + color5 #ff79c6 + color13 #ff92df - # cyan - color6 #8be9fd - color14 #a4ffff + # cyan + color6 #8be9fd + color14 #a4ffff - # white - color7 #f8f8f2 - color15 #ffffff + # white + color7 #f8f8f2 + color15 #ffffff - # Cursor colors - cursor #6272a4 - cursor_text_color background + # Cursor colors + cursor #6272a4 + cursor_text_color background - # Tab bar colors - active_tab_foreground #44475a - active_tab_background #f8f8f2 - inactive_tab_foreground #282a36 - inactive_tab_background #6272a4 - ''; + # Tab bar colors + active_tab_foreground #44475a + active_tab_background #f8f8f2 + inactive_tab_foreground #282a36 + inactive_tab_background #6272a4 + ''; font = { name = "FiraCode Nerd Font"; size = 10; @@ -69,5 +69,5 @@ let }; in { - home-manager.users.moritz = {...}: (base); + home-manager.users.moritz = { ... }: (base); } diff --git a/modules/apps/rofi/default.nix b/modules/apps/rofi/default.nix index 5564d30..5265a02 100644 --- a/modules/apps/rofi/default.nix +++ b/modules/apps/rofi/default.nix @@ -10,5 +10,5 @@ let }); in { - home-manager.users.moritz = {...}: (base "/home/moritz/"); + home-manager.users.moritz = { ... }: (base "/home/moritz/"); } diff --git a/modules/apps/zathura.nix b/modules/apps/zathura.nix index b799228..1e6ee31 100644 --- a/modules/apps/zathura.nix +++ b/modules/apps/zathura.nix @@ -22,5 +22,5 @@ let }; in { - home-manager.users.moritz = {...}: (base); + home-manager.users.moritz = { ... }: (base); } diff --git a/modules/cli/default.nix b/modules/cli/default.nix index 67b0cf4..4c7eb2b 100644 --- a/modules/cli/default.nix +++ b/modules/cli/default.nix @@ -2,8 +2,8 @@ { imports = [ - ./git.nix - ./nix.nix - ./zsh.nix + ./git.nix + ./nix.nix + ./zsh.nix ]; } diff --git a/modules/cli/git.nix b/modules/cli/git.nix index c5b9724..3383a31 100644 --- a/modules/cli/git.nix +++ b/modules/cli/git.nix @@ -10,5 +10,5 @@ let }); in { - home-manager.users.moritz = {...}: (base "/home/moritz"); + home-manager.users.moritz = { ... }: (base "/home/moritz"); } diff --git a/modules/cli/zsh.nix b/modules/cli/zsh.nix index e0b7311..8c48428 100644 --- a/modules/cli/zsh.nix +++ b/modules/cli/zsh.nix @@ -14,10 +14,10 @@ let cat = "bat"; }; plugins = [ - { - name = "zsh-syntax-highlighting"; - src = inputs.zsh-syntax-highlighting; - } + { + name = "zsh-syntax-highlighting"; + src = inputs.zsh-syntax-highlighting; + } ]; enableAutosuggestions = true; enableCompletion = true; @@ -34,5 +34,5 @@ let in { environment.pathsToLink = [ "/share/zsh" ]; - home-manager.users.moritz = {...}: (base "/home/moritz"); + home-manager.users.moritz = { ... }: (base "/home/moritz"); } diff --git a/modules/default.nix b/modules/default.nix index 24e5a4a..9320098 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -18,7 +18,7 @@ }; fonts.fonts = with pkgs; [ - (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono"];}) + (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ]; }) ]; # PACKAGES diff --git a/modules/desktop/bspwm/default.nix b/modules/desktop/bspwm/default.nix index a4961c8..69ce5a7 100644 --- a/modules/desktop/bspwm/default.nix +++ b/modules/desktop/bspwm/default.nix @@ -31,9 +31,9 @@ onChange = "bspc wm -r"; }; "sxhkd/sxhkdrc" = { - source = ./sxhkdrc; - onChange = "pkill -USR1 -x sxhkd"; - }; + source = ./sxhkdrc; + onChange = "pkill -USR1 -x sxhkd"; + }; "wallpaper/dracula.png" = { source = ./dracula.png; }; diff --git a/modules/desktop/polybar/default.nix b/modules/desktop/polybar/default.nix index adab15e..81b1912 100644 --- a/modules/desktop/polybar/default.nix +++ b/modules/desktop/polybar/default.nix @@ -5,18 +5,18 @@ let services.polybar = { enable = true; package = pkgs.polybar.override { - pulseSupport = true; - }; + pulseSupport = true; + }; script = ''for m in $(polybar --list-monitors | ${pkgs.coreutils}/bin/cut -d":" -f1); do MONITOR=$m polybar --reload bottom & done ''; config = ./config.ini; extraConfig = builtins.readFile ./modules.ini + - builtins.readFile ./colors.ini; + builtins.readFile ./colors.ini; }; }; in { - home-manager.users.moritz = {...}: (base); + home-manager.users.moritz = { ... }: (base); } diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix index fb0c46e..d55f6da 100644 --- a/modules/gaming/default.nix +++ b/modules/gaming/default.nix @@ -1,10 +1,5 @@ { config, lib, pkgs, ... }: { - hardware.opengl.enable = true; - home-manager.users.moritz = { - home.packages = with pkgs; [ - steam - ]; - }; + programs.steam.enable = true; } diff --git a/modules/services/default.nix b/modules/services/default.nix index 349a56f..9aeda1f 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -10,6 +10,6 @@ ]; home-manager.users.moritz.services = { - kdeconnect.enable = true; + kdeconnect.enable = true; }; } diff --git a/modules/services/diskstation/default.nix b/modules/services/diskstation/default.nix index 0ab6760..57937da 100644 --- a/modules/services/diskstation/default.nix +++ b/modules/services/diskstation/default.nix @@ -14,9 +14,9 @@ diskstation -fstype=davfs,uid=1000 :https\://192.168.0.2\:5006/home/Drive/ ''; in - '' - /auto file:${mapConf} - ''; + '' + /auto file:${mapConf} + ''; debug = true; }; environment.etc."davfs2/certs/diskstation.pem" = { diff --git a/modules/services/dunst/default.nix b/modules/services/dunst/default.nix index 1cc6af8..0340f7c 100644 --- a/modules/services/dunst/default.nix +++ b/modules/services/dunst/default.nix @@ -12,5 +12,5 @@ let }; in { - home-manager.users.moritz = {...}: (base); + home-manager.users.moritz = { ... }: (base); } diff --git a/modules/services/emacs/default.nix b/modules/services/emacs/default.nix index 4ee8b13..3af62ab 100644 --- a/modules/services/emacs/default.nix +++ b/modules/services/emacs/default.nix @@ -14,22 +14,22 @@ let source = ./doom; recursive = true; onChange = '' - #!/bin/sh - DOOM="$HOME/.emacs.d" - if [ ! -d "$DOOM" ]; then - git clone https://github.com/hlissner/doom-emacs.git "$DOOM" - "$DOOM/bin/doom" -y install - fi + #!/bin/sh + DOOM="$HOME/.emacs.d" + if [ ! -d "$DOOM" ]; then + git clone https://github.com/hlissner/doom-emacs.git "$DOOM" + "$DOOM/bin/doom" -y install + fi - "$DOOM/bin/doom" sync - ''; + "$DOOM/bin/doom" sync + ''; }; }; }; home.packages = with pkgs; [ ## Emacs itself - binutils # native-comp needs 'as', provided by this + binutils # native-comp needs 'as', provided by this # emacsPgtkGcc # 28 + pgtk + native-comp # ((emacsPackagesNgGen emacsPgtkGcc).emacsWithPackages (epkgs: [ # epkgs.vterm @@ -37,18 +37,21 @@ let ## Doom dependencies git - (ripgrep.override {withPCRE2 = true;}) - gnutls # for TLS connectivity + (ripgrep.override { withPCRE2 = true; }) + gnutls # for TLS connectivity ## Optional dependencies - fd # faster projectile indexing - imagemagick # for image-dired - zstd # for undo-fu-session/undo-tree compression + fd # faster projectile indexing + imagemagick # for image-dired + zstd # for undo-fu-session/undo-tree compression ## Module dependencies # :checkers spell (aspellWithDicts (ds: with ds; [ - en en-computers en-science de + en + en-computers + en-science + de ])) # :checkers grammar languagetool @@ -64,5 +67,5 @@ in fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; - home-manager.users.moritz = {...}: (base); + home-manager.users.moritz = { ... }: (base); } diff --git a/modules/services/picom.nix b/modules/services/picom.nix index cdd6f88..dc33ea0 100644 --- a/modules/services/picom.nix +++ b/modules/services/picom.nix @@ -13,40 +13,40 @@ let # inactiveDim = "0.1"; experimentalBackends = true; extraOptions = '' - corner-radius = 10; - rounded-cornes-exclude = [ - "class_g = 'Polybar'", - "class_g = 'Rofi'" - ] - round-borders = 1; + corner-radius = 10; + rounded-cornes-exclude = [ + "class_g = 'Polybar'", + "class_g = 'Rofi'" + ] + round-borders = 1; - # improve performance - glx-no-rebind-pixmap = true; - glx-no-stencil = true; + # improve performance + glx-no-rebind-pixmap = true; + glx-no-stencil = true; - # fastest swap method - glx-swap-method = 1; + # fastest swap method + glx-swap-method = 1; - # dual kawase blur - blur-background-fixed = false; - blur-method = "dual_kawase"; - blur-strength = 5; - use-ewmh-active-win = true; - detect-rounded-corners = true; + # dual kawase blur + blur-background-fixed = false; + blur-method = "dual_kawase"; + blur-strength = 5; + use-ewmh-active-win = true; + detect-rounded-corners = true; - # stop compositing if there's a fullscreen program - unredir-if-possible = true; + # stop compositing if there's a fullscreen program + unredir-if-possible = true; - # group wintypes and don't focus a menu (Telegram) - detect-transient = true; - detect-client-leader = true; + # group wintypes and don't focus a menu (Telegram) + detect-transient = true; + detect-client-leader = true; - # needed for nvidia with glx backend - xrender-sync-fence = true; - ''; - }; + # needed for nvidia with glx backend + xrender-sync-fence = true; + ''; }; + }; in { - home-manager.users.moritz = {...}: (base); + home-manager.users.moritz = { ... }: (base); } diff --git a/overlays/default.nix b/overlays/default.nix index 429161f..641651b 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -8,4 +8,7 @@ final: prev: { system = prev.system; config.allowUnfree = true; }; + nur = import inputs.nur { + system = prev.system; + }; }