switch to nixpkgs-fmt

This commit is contained in:
Adithya 2023-03-29 21:48:55 +05:30
parent 7cb7479433
commit 85645f37f9
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
43 changed files with 291 additions and 278 deletions

View file

@ -21,37 +21,40 @@
};
};
outputs = {
self,
nixpkgs,
home-manager,
impermanence,
lanzaboote,
} @ inputs: let
system = "x86_64-linux";
lib = nixpkgs.lib;
in {
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
nixosConfigurations = {
Skipper = lib.nixosSystem {
specialArgs = inputs;
modules = [
./system/nix.nix
outputs =
{ self
, nixpkgs
, home-manager
, impermanence
, lanzaboote
,
} @ inputs:
let
system = "x86_64-linux";
lib = nixpkgs.lib;
in
{
formatter.${system} = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
nixosConfigurations = {
Skipper = lib.nixosSystem {
specialArgs = inputs;
modules = [
./system/nix.nix
{
nixpkgs.overlays = [(import ./packages)];
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
}
{
nixpkgs.overlays = [ (import ./packages) ];
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
}
home-manager.nixosModules.home-manager
impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote
home-manager.nixosModules.home-manager
impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote
./system
./users
./home
];
./system
./users
./home
];
};
};
};
};
}

View file

@ -1,21 +1,22 @@
{
impermanence,
pkgs,
...
}: let
{ impermanence
, pkgs
, ...
}:
let
user = import ../users/user.nix;
in {
in
{
programs.fuse.userAllowOther = true;
fileSystems."/home/${user.primary.userName}" = {
device = "tmpfs";
fsType = "tmpfs";
options = ["mode=0755" "uid=1000" "gid=100"];
options = [ "mode=0755" "uid=1000" "gid=100" ];
};
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.${user.primary.userName} = {pkgs, ...}: {
home-manager.users.${user.primary.userName} = { pkgs, ... }: {
imports = [
impermanence.nixosModules.home-manager.impermanence

View file

@ -1,6 +1,8 @@
{pkgs, ...}: let
{ pkgs, ... }:
let
user = import ../users/user.nix;
in {
in
{
imports = [
./nvim.nix
];
@ -14,7 +16,7 @@ in {
gh = {
enable = true;
settings.git_protocol = "ssh";
extensions = [pkgs.gh-dash];
extensions = [ pkgs.gh-dash ];
};
git = {
enable = true;
@ -31,7 +33,7 @@ in {
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
ignores = ["/.nix" "/.direnv"];
ignores = [ "/.nix" "/.direnv" ];
};
lazygit = {
enable = true;

View file

@ -1,4 +1,4 @@
{...}: {
{ ... }: {
programs = {
aria2 = {
enable = true;

View file

@ -1,7 +1,6 @@
{
pkgs,
osConfig,
...
{ pkgs
, osConfig
, ...
}: {
programs = {
firefox = {

View file

@ -1,14 +1,16 @@
{pkgs, ...}: let
{ pkgs, ... }:
let
dracula = pkgs.fetchFromGitHub {
owner = "dracula";
repo = "kitty";
rev = "87717a3f00e3dff0fc10c93f5ff535ea4092de70";
hash = "sha256-78PTH9wE6ktuxeIxrPp0ZgRI8ST+eZ3Ok2vW6BCIZkc=";
};
in {
in
{
programs.kitty = {
enable = true;
font.package = pkgs.nerdfonts.override {fonts = ["FiraCode"];};
font.package = pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; };
font.name = "FiraCode Nerd Font";
extraConfig = ''
font_size 14

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
xdg.desktopEntries."mpv".name = "mpv Media Player";
xdg.desktopEntries."mpv".exec = "mpv --player-operation-mode=pseudo-gui -- %U";
xdg.desktopEntries."mpv".noDisplay = true;
@ -14,13 +14,13 @@
];
programs.mpv = {
enable = true;
package = pkgs.mpv.override {youtubeSupport = true;};
package = pkgs.mpv.override { youtubeSupport = true; };
config = {
hwdec = "auto-safe";
gpu-context = "wayland";
};
defaultProfiles = ["gpu-hq"];
scripts = with pkgs.mpvScripts; [mpris];
defaultProfiles = [ "gpu-hq" ];
scripts = with pkgs.mpvScripts; [ mpris ];
};
services = {
spotifyd = {

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
xdg.desktopEntries."nvim".name = "Neovim wrapper";
xdg.desktopEntries."nvim".exec = "nvim %F";
xdg.desktopEntries."nvim".noDisplay = true;
@ -23,7 +23,7 @@
];
plugins = with pkgs.vimPlugins; [
dracula-nvim
(nvim-treesitter.withPlugins (plugins: with plugins; [bash dockerfile gitcommit gitignore git_rebase go markdown markdown_inline nix rust toml yaml]))
(nvim-treesitter.withPlugins (plugins: with plugins; [ bash dockerfile gitcommit gitignore git_rebase go markdown markdown_inline nix rust toml yaml ]))
nvim-treesitter-context
nvim-treesitter-refactor
telescope-nvim

View file

@ -1,4 +1,4 @@
{...}: {
{ ... }: {
home.persistence."/persist/home" = {
allowOther = true;
directories = [

View file

@ -1,11 +1,12 @@
{
osConfig,
pkgs,
...
}: let
{ osConfig
, pkgs
, ...
}:
let
notify-send = "${pkgs.libnotify}/bin/notify-send";
dmenu = "${pkgs.rofi-wayland}/bin/rofi -dmenu";
in {
in
{
xdg.configFile = {
"scripts/power_menu.sh" = {
executable = true;
@ -42,82 +43,88 @@ in {
'';
};
"scripts/volume_up.sh" = let
wpctl = "${pkgs.wireplumber}/bin/wpctl";
in {
executable = true;
text = ''
#!/bin/sh
"scripts/volume_up.sh" =
let
wpctl = "${pkgs.wireplumber}/bin/wpctl";
in
{
executable = true;
text = ''
#!/bin/sh
set -eu
set -eu
${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 0
[ $(${wpctl} get-volume @DEFAULT_AUDIO_SINK@ | awk -F': ' '{print $2}' | sed 's/\.//') -lt 100 ] && ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+
'';
};
${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 0
[ $(${wpctl} get-volume @DEFAULT_AUDIO_SINK@ | awk -F': ' '{print $2}' | sed 's/\.//') -lt 100 ] && ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+
'';
};
"scripts/tmux_sessions.sh" = let
kitty = "${pkgs.kitty}/bin/kitty";
tmux = "${pkgs.tmux}/bin/tmux";
in {
executable = true;
text = ''
#!/bin/sh
"scripts/tmux_sessions.sh" =
let
kitty = "${pkgs.kitty}/bin/kitty";
tmux = "${pkgs.tmux}/bin/tmux";
in
{
executable = true;
text = ''
#!/bin/sh
set -eu
set -eu
SESSION="$(${tmux} list-sessions -F "(#{session_attached}) #S [#{pane_current_command} in #{pane_current_path}] #{pane_title}" | sort | ${dmenu} -p "Running TMUX Sessions" | awk '{print $2}')"
case "$SESSION" in
"")
SESSION="$(${tmux} list-sessions -F "(#{session_attached}) #S [#{pane_current_command} in #{pane_current_path}] #{pane_title}" | sort | ${dmenu} -p "Running TMUX Sessions" | awk '{print $2}')"
case "$SESSION" in
"")
;;
*)
${kitty} ${tmux} -u attach-session -dEt "$SESSION"
;;
esac'';
};
"scripts/power_profile.sh" =
let
sudo = "/run/wrappers/bin/sudo";
cpupower = "${osConfig.boot.kernelPackages.cpupower}/bin/cpupower";
powerprofilesctl = "${pkgs.power-profiles-daemon}/bin/powerprofilesctl";
in
{
executable = true;
text = ''
#!/bin/sh
set -eu
POWER_PROFILE_FILE="$HOME/.cache/power_profile"
POWER_PROFILE="powersave"
if [ -f "$POWER_PROFILE_FILE" ]; then
POWER_PROFILE="$(<$POWER_PROFILE_FILE)"
fi
case "$1" in
"toggle")
if [ "$POWER_PROFILE" == "powersave" ]; then
${sudo} ${cpupower} frequency-set --governor performance > /dev/null
${powerprofilesctl} set performance
POWER_PROFILE="performance"
elif [ "$POWER_PROFILE" == "performance" ]; then
${sudo} ${cpupower} frequency-set --governor powersave > /dev/null
${powerprofilesctl} set power-saver
POWER_PROFILE="powersave"
fi
echo $POWER_PROFILE > $POWER_PROFILE_FILE
${notify-send} -u normal "Power Profile" "Switched to $POWER_PROFILE mode."
;;
*)
${kitty} ${tmux} -u attach-session -dEt "$SESSION"
"icon")
if [ "$POWER_PROFILE" == "powersave" ]; then
echo "󰌪"
elif [ "$POWER_PROFILE" == "performance" ]; then
echo "󰓅"
fi
;;
esac'';
};
"scripts/power_profile.sh" = let
sudo = "/run/wrappers/bin/sudo";
cpupower = "${osConfig.boot.kernelPackages.cpupower}/bin/cpupower";
powerprofilesctl = "${pkgs.power-profiles-daemon}/bin/powerprofilesctl";
in {
executable = true;
text = ''
#!/bin/sh
set -eu
POWER_PROFILE_FILE="$HOME/.cache/power_profile"
POWER_PROFILE="powersave"
if [ -f "$POWER_PROFILE_FILE" ]; then
POWER_PROFILE="$(<$POWER_PROFILE_FILE)"
fi
case "$1" in
"toggle")
if [ "$POWER_PROFILE" == "powersave" ]; then
${sudo} ${cpupower} frequency-set --governor performance > /dev/null
${powerprofilesctl} set performance
POWER_PROFILE="performance"
elif [ "$POWER_PROFILE" == "performance" ]; then
${sudo} ${cpupower} frequency-set --governor powersave > /dev/null
${powerprofilesctl} set power-saver
POWER_PROFILE="powersave"
fi
echo $POWER_PROFILE > $POWER_PROFILE_FILE
${notify-send} -u normal "Power Profile" "Switched to $POWER_PROFILE mode."
;;
"icon")
if [ "$POWER_PROFILE" == "powersave" ]; then
echo "󰌪"
elif [ "$POWER_PROFILE" == "performance" ]; then
echo "󰓅"
fi
;;
*)
;;
esac
'';
};
*)
;;
esac
'';
};
};
}

View file

@ -1,8 +1,7 @@
{
config,
lib,
pkgs,
...
{ config
, lib
, pkgs
, ...
}: {
imports = [
./gnome-keyring.nix
@ -22,10 +21,10 @@
wayland.windowManager.sway.enable = true;
wayland.windowManager.sway.package = pkgs.sway;
wayland.windowManager.sway.config.modifier = "Mod4";
wayland.windowManager.sway.config.bars = [];
wayland.windowManager.sway.config.bars = [ ];
wayland.windowManager.sway.xwayland = true;
wayland.windowManager.sway.config.fonts = {
names = ["FiraCode Nerd Font"];
names = [ "FiraCode Nerd Font" ];
size = 11.0;
};
wayland.windowManager.sway.config.input = {
@ -85,9 +84,10 @@
};
};
wayland.windowManager.sway.config.keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
in
wayland.windowManager.sway.config.keybindings =
let
modifier = config.wayland.windowManager.sway.config.modifier;
in
lib.mkOptionDefault {
"${modifier}+Return" = "exec ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux new";
"${modifier}+Shift+Return" = "exec ${pkgs.kitty}/bin/kitty";
@ -114,7 +114,7 @@
};
wayland.windowManager.sway.config.startup = [
{command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";}
{ command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; }
{
command = "~/.config/scripts/chpaper.sh";
always = true;

View file

@ -1,11 +1,12 @@
{
config,
pkgs,
...
}: let
{ config
, pkgs
, ...
}:
let
dmenu = "${config.programs.rofi.package}/bin/rofi -dmenu";
firefox = "${config.programs.firefox.package}/bin/firefox";
in {
in
{
services.dunst = {
enable = true;
iconTheme.name = config.gtk.iconTheme.name;

View file

@ -1,3 +1,3 @@
{pkgs, ...}: {
{ pkgs, ... }: {
services.gnome-keyring.enable = true;
}

View file

@ -1,8 +1,8 @@
{
lib,
pkgs,
...
}: let
{ lib
, pkgs
, ...
}:
let
gtkTheme = {
name = "Dracula";
package = pkgs.dracula-gtk;
@ -20,7 +20,8 @@
name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors;
};
in {
in
{
gtk.enable = true;
gtk.theme = gtkTheme;
home.sessionVariables.GTK_THEME = gtkTheme.name;

View file

@ -1,4 +1,4 @@
{...}: {
{ ... }: {
services.kanshi.enable = true;
services.kanshi.profiles = {
undocked = {

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
xdg.desktopEntries."rofi".name = "Rofi";
xdg.desktopEntries."rofi".exec = "rofi -show";
xdg.desktopEntries."rofi".noDisplay = true;

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
services.swayidle.enable = true;
services.swayidle.events = [
{

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
xdg.dataFile."wallpapers/catppuccin".source = "${pkgs.catppuccin-wallpapers}/share/wallpapers";
xdg.configFile."scripts/chpaper.sh" = {
text = ''

View file

@ -1,7 +1,6 @@
{
config,
pkgs,
...
{ config
, pkgs
, ...
}: {
programs.waybar.enable = true;
programs.waybar.systemd.enable = true;
@ -12,9 +11,9 @@
layer = "top";
position = "top";
height = 28;
modules-left = ["sway/workspaces" "sway/window" "sway/mode"];
modules-center = [];
modules-right = ["tray" "custom/power_profile" "idle_inhibitor" "network" "bluetooth" "pulseaudio" "backlight" "battery" "clock"];
modules-left = [ "sway/workspaces" "sway/window" "sway/mode" ];
modules-center = [ ];
modules-right = [ "tray" "custom/power_profile" "idle_inhibitor" "network" "bluetooth" "pulseaudio" "backlight" "battery" "clock" ];
"sway/mode" = {
"format" = "{}";
};
@ -37,7 +36,7 @@
};
"backlight" = {
"format" = "{icon}";
"format-icons" = ["" "" "" ""];
"format-icons" = [ "" "" "" "" ];
};
"battery" = {
"states" = {
@ -49,7 +48,7 @@
"format-alt" = "{icon} {capacity}% ({time})";
"format-charging" = " {capacity}%";
"format-plugged" = " {capacity}%";
"format-icons" = ["" "" "" "" "" "" "" "" "" "" ""];
"format-icons" = [ "" "" "" "" "" "" "" "" "" "" "" ];
"tooltip" = false;
};
"network" = {
@ -75,7 +74,7 @@
"phone" = "";
"portable" = "";
"car" = "";
"default" = ["" "奔" ""];
"default" = [ "" "奔" "" ];
};
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
};
@ -90,15 +89,17 @@
"tray" = {
"spacing" = 4;
};
"custom/power_profile" = let
script = "${config.xdg.configHome}/scripts/power_profile.sh";
in {
exec = "${script} icon";
on-click = "${script} toggle";
format = "{}";
tooltip = false;
interval = "10";
};
"custom/power_profile" =
let
script = "${config.xdg.configHome}/scripts/power_profile.sh";
in
{
exec = "${script} icon";
on-click = "${script} toggle";
format = "{}";
tooltip = false;
interval = "10";
};
};
};
}

View file

@ -1,7 +1,6 @@
{
config,
pkgs,
...
{ config
, pkgs
, ...
}: {
imports = [
./kitty.nix
@ -34,7 +33,7 @@
exa = {
enable = true;
enableAliases = true;
extraOptions = ["--group-directories-first" "--group"];
extraOptions = [ "--group-directories-first" "--group" ];
git = true;
icons = true;
};

View file

@ -1,7 +1,6 @@
{pkgs, ...}: {
{ pkgs, ... }: {
programs.tmux = {
enable = true;
shell = "${pkgs.zsh}/bin/zsh";
escapeTime = 0;
plugins = with pkgs; [
{

View file

@ -1,18 +1,18 @@
{pkgs, ...}: {
home.packages = [pkgs.virt-manager];
{ pkgs, ... }: {
home.packages = [ pkgs.virt-manager ];
dconf.settings = {
"org/virt-manager/virt-manager/confirm" = {
"forcepoweroff" = false;
};
"org/virt-manager/virt-manager/connections" = {
"autoconnect" = ["qemu:///system"];
"uris" = ["qemu:///system"];
"autoconnect" = [ "qemu:///system" ];
"uris" = [ "qemu:///system" ];
};
"org/virt-manager/virt-manager/new-vm" = {"firmware" = "uefi";};
"org/virt-manager/virt-manager/new-vm" = { "firmware" = "uefi"; };
"org/virt-manager/virt-manager/stats" = {
"enable-disk-poll" = true;
"enable-net-poll" = true;
};
"org/virt-manager/virt-manager/vmlist-fields" = {"network-traffic" = true;};
"org/virt-manager/virt-manager/vmlist-fields" = { "network-traffic" = true; };
};
}

View file

@ -1,9 +1,9 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
pack ? "pack_1",
theme ? "cuts",
{ lib
, stdenvNoCC
, fetchFromGitHub
, pack ? "pack_1"
, theme ? "cuts"
,
}:
stdenvNoCC.mkDerivation {
pname = "adi1090x-plymouth";

View file

@ -1,7 +1,7 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
{ lib
, stdenvNoCC
, fetchFromGitHub
,
}:
stdenvNoCC.mkDerivation {
pname = "catppuccin-wallpapers";

View file

@ -1,6 +1,6 @@
self: super: {
adi1090x-plymouth = super.callPackage ./adi1090x-plymouth {};
catppuccin-wallpapers = super.callPackage ./catppuccin-wallpapers {};
dracula-gtk = super.callPackage ./dracula-gtk {};
newaita-icon-theme = super.callPackage ./newaita-icon-theme {};
adi1090x-plymouth = super.callPackage ./adi1090x-plymouth { };
catppuccin-wallpapers = super.callPackage ./catppuccin-wallpapers { };
dracula-gtk = super.callPackage ./dracula-gtk { };
newaita-icon-theme = super.callPackage ./newaita-icon-theme { };
}

View file

@ -1,10 +1,10 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
gtk3,
gnome-themes-extra,
gtk-engine-murrine,
{ lib
, stdenvNoCC
, fetchFromGitHub
, gtk3
, gnome-themes-extra
, gtk-engine-murrine
,
}:
stdenvNoCC.mkDerivation {
pname = "dracula-gtk";
@ -17,13 +17,13 @@ stdenvNoCC.mkDerivation {
hash = "sha256-2lmpEPYxdbRnKgcJ792cuzyOBmOIWhja18q+F3Pxgjs=";
};
nativeBuildInputs = [gtk3];
nativeBuildInputs = [ gtk3 ];
buildInputs = [
gnome-themes-extra
];
propagatedUserEnvPkgs = [gtk-engine-murrine];
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
installPhase = ''
runHook preInstall

View file

@ -1,13 +1,13 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
gtk3,
gnome,
gnome-icon-theme,
hicolor-icon-theme,
panel ? "dark",
folder ? "default",
{ lib
, stdenvNoCC
, fetchFromGitHub
, gtk3
, gnome
, gnome-icon-theme
, hicolor-icon-theme
, panel ? "dark"
, folder ? "default"
,
}:
stdenvNoCC.mkDerivation {
pname = "newaita-icon-theme";
@ -20,7 +20,7 @@ stdenvNoCC.mkDerivation {
hash = "sha256-tqtjUy8RjvOu0NaK+iE0R1g7/eqCpmhbdxuNGd/YfSI=";
};
nativeBuildInputs = [gtk3];
nativeBuildInputs = [ gtk3 ];
propagatedBuildInputs = [
gnome.adwaita-icon-theme

View file

@ -1,8 +1,7 @@
{
config,
lib,
pkgs,
...
{ config
, lib
, pkgs
, ...
}: {
imports = [
./filesystem.nix
@ -45,7 +44,7 @@
LC_TIME = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
};
supportedLocales = ["en_US.UTF-8/UTF-8"];
supportedLocales = [ "en_US.UTF-8/UTF-8" ];
};
networking = {
@ -87,7 +86,7 @@
tctiEnvironment.enable = true;
};
sudo = {
package = pkgs.sudo.override {withInsults = true;};
package = pkgs.sudo.override { withInsults = true; };
extraConfig = ''
Defaults lecture="never"
@ -105,7 +104,7 @@
portal = {
enable = true;
wlr.enable = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
};

View file

@ -1,4 +1,4 @@
{...}: {
{ ... }: {
boot = {
resumeDevice = "/dev/vg0/swap";
initrd.luks.devices = {
@ -11,5 +11,5 @@
};
};
swapDevices = [{device = "/dev/vg0/swap";}];
swapDevices = [{ device = "/dev/vg0/swap"; }];
}

View file

@ -1,28 +1,28 @@
{...}: {
{ ... }: {
boot.tmpOnTmpfs = true;
fileSystems = {
"/" = {
device = "tmpfs";
fsType = "tmpfs";
options = ["defaults" "uid=0" "gid=0" "mode=0755"];
options = [ "defaults" "uid=0" "gid=0" "mode=0755" ];
neededForBoot = true;
};
"/nix" = {
device = "/dev/vg0/system";
fsType = "btrfs";
options = ["subvol=/@nix" "compress-force=zstd"];
options = [ "subvol=/@nix" "compress-force=zstd" ];
neededForBoot = true;
};
"/persist" = {
device = "/dev/vg0/system";
fsType = "btrfs";
options = ["subvol=/@persist" "compress-force=zstd"];
options = [ "subvol=/@persist" "compress-force=zstd" ];
neededForBoot = true;
};
"/mnt/system" = {
device = "/dev/vg0/system";
fsType = "btrfs";
options = ["subvol=/" "compress-force=zstd"];
options = [ "subvol=/" "compress-force=zstd" ];
};
"/boot" = {
device = "/dev/disk/by-partlabel/ESP";

View file

@ -1,4 +1,4 @@
{...}: {
{ ... }: {
programs.seahorse.enable = true;
services.gnome.gnome-keyring.enable = true;
security.pam.services.passwd.enableGnomeKeyring = true;

View file

@ -1,3 +1,3 @@
{...}: {
{ ... }: {
programs.dconf.enable = true;
}

View file

@ -1,16 +1,15 @@
{
lib,
pkgs,
config,
...
{ lib
, pkgs
, config
, ...
}: {
imports = [./disk.nix ./kernel.nix];
imports = [ ./disk.nix ./kernel.nix ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.opengl = {
enable = true;
extraPackages = [pkgs.intel-media-driver];
extraPackages = [ pkgs.intel-media-driver ];
driSupport = true;
};
@ -23,7 +22,7 @@
hardware.sensor.hddtemp = {
enable = true;
drives = ["/dev/disk/by-path/pci-0000:01:00.0-nvme-1"];
drives = [ "/dev/disk/by-path/pci-0000:01:00.0-nvme-1" ];
};
boot.loader = {

View file

@ -1,7 +1,6 @@
{
lib,
pkgs,
...
{ lib
, pkgs
, ...
}: {
boot = {
initrd = {
@ -14,9 +13,9 @@
"sd_mod"
"rtsx_pci_sdmmc"
];
kernelModules = ["i915"];
kernelModules = [ "i915" ];
};
kernelModules = ["kvm-intel"];
kernelModules = [ "kvm-intel" ];
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
};

View file

@ -1,4 +1,4 @@
{...}: {
{ ... }: {
nix.settings = {
substituters = [
"https://nix-community.cachix.org/"
@ -7,7 +7,7 @@
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"];
experimental-features = [ "nix-command" "flakes" ];
};
nixpkgs.config.allowUnfree = true;
}

View file

@ -1,11 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }: {
fonts = {
enableDefaultFonts = true;
fontDir.enable = true;
fonts = with pkgs; [
cantarell-fonts
liberation_ttf
(nerdfonts.override {fonts = ["FiraCode"];})
(nerdfonts.override { fonts = [ "FiraCode" ]; })
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
@ -30,5 +30,5 @@
xwayland.enable = true;
zsh.enable = true;
};
environment.pathsToLink = ["/share/zsh"];
environment.pathsToLink = [ "/share/zsh" ];
}

View file

@ -1,4 +1,4 @@
{...}: {
{ ... }: {
environment.persistence."/persist/system" = {
hideMounts = true;
directories = [

View file

@ -1,6 +1,6 @@
{pkgs, ...}: {
{ pkgs, ... }: {
boot.consoleLogLevel = 3;
boot.kernelParams = ["quiet"];
boot.kernelParams = [ "quiet" ];
boot.plymouth = {
enable = true;
themePackages = [

View file

@ -1,7 +1,6 @@
{
lib,
pkgs,
...
{ lib
, pkgs
, ...
}: {
boot.bootspec.enable = true;
boot.loader.systemd-boot.enable = lib.mkForce false;

View file

@ -1,10 +1,10 @@
{pkgs, ...}: {
{ pkgs, ... }: {
services = {
blueman.enable = true;
dbus = {
enable = true;
apparmor = "enabled";
packages = [pkgs.gcr pkgs.gcr_4];
packages = [ pkgs.gcr pkgs.gcr_4 ];
};
fstrim.enable = true;
fwupd.enable = true;
@ -20,7 +20,7 @@
power-profiles-daemon.enable = true;
resolved.enable = true;
thermald.enable = true;
udev.packages = [pkgs.yubikey-personalization];
udev.packages = [ pkgs.yubikey-personalization ];
udisks2.enable = true;
};
}

View file

@ -1,3 +1,3 @@
{...}: {
security.pam.services.swaylock = {};
{ ... }: {
security.pam.services.swaylock = { };
}

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
virtualisation = {
docker = {
enable = true;
@ -9,7 +9,7 @@
enable = true;
qemu.ovmf = {
enable = true;
packages = [pkgs.OVMFFull.fd];
packages = [ pkgs.OVMFFull.fd ];
};
};
};

View file

@ -1,6 +1,8 @@
{pkgs, ...}: let
{ pkgs, ... }:
let
user = import ./user.nix;
in {
in
{
services.getty.autologinUser = user.primary.userName;
users.mutableUsers = false;
users.users = {
@ -10,7 +12,7 @@ in {
hashedPassword = user.primary.hashedPassword;
description = user.primary.realName;
isNormalUser = true;
extraGroups = ["docker" "libvirtd" "networkmanager" "tss" "wheel"];
extraGroups = [ "docker" "libvirtd" "networkmanager" "tss" "wheel" ];
shell = pkgs.zsh;
};
};