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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { { pkgs, ... }: {
xdg.desktopEntries."nvim".name = "Neovim wrapper"; xdg.desktopEntries."nvim".name = "Neovim wrapper";
xdg.desktopEntries."nvim".exec = "nvim %F"; xdg.desktopEntries."nvim".exec = "nvim %F";
xdg.desktopEntries."nvim".noDisplay = true; xdg.desktopEntries."nvim".noDisplay = true;
@ -23,7 +23,7 @@
]; ];
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
dracula-nvim 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-context
nvim-treesitter-refactor nvim-treesitter-refactor
telescope-nvim telescope-nvim

View file

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

View file

@ -1,11 +1,12 @@
{ { osConfig
osConfig, , pkgs
pkgs, , ...
... }:
}: let let
notify-send = "${pkgs.libnotify}/bin/notify-send"; notify-send = "${pkgs.libnotify}/bin/notify-send";
dmenu = "${pkgs.rofi-wayland}/bin/rofi -dmenu"; dmenu = "${pkgs.rofi-wayland}/bin/rofi -dmenu";
in { in
{
xdg.configFile = { xdg.configFile = {
"scripts/power_menu.sh" = { "scripts/power_menu.sh" = {
executable = true; executable = true;
@ -42,82 +43,88 @@ in {
''; '';
}; };
"scripts/volume_up.sh" = let "scripts/volume_up.sh" =
wpctl = "${pkgs.wireplumber}/bin/wpctl"; let
in { wpctl = "${pkgs.wireplumber}/bin/wpctl";
executable = true; in
text = '' {
#!/bin/sh executable = true;
text = ''
#!/bin/sh
set -eu set -eu
${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 0 ${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} 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 "scripts/tmux_sessions.sh" =
kitty = "${pkgs.kitty}/bin/kitty"; let
tmux = "${pkgs.tmux}/bin/tmux"; kitty = "${pkgs.kitty}/bin/kitty";
in { tmux = "${pkgs.tmux}/bin/tmux";
executable = true; in
text = '' {
#!/bin/sh 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}')" 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 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."
;; ;;
*) "icon")
${kitty} ${tmux} -u attach-session -dEt "$SESSION" if [ "$POWER_PROFILE" == "powersave" ]; then
echo "󰌪"
elif [ "$POWER_PROFILE" == "performance" ]; then
echo "󰓅"
fi
;; ;;
esac''; *)
}; ;;
"scripts/power_profile.sh" = let esac
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
'';
};
}; };
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,18 +1,18 @@
{pkgs, ...}: { { pkgs, ... }: {
home.packages = [pkgs.virt-manager]; home.packages = [ pkgs.virt-manager ];
dconf.settings = { dconf.settings = {
"org/virt-manager/virt-manager/confirm" = { "org/virt-manager/virt-manager/confirm" = {
"forcepoweroff" = false; "forcepoweroff" = false;
}; };
"org/virt-manager/virt-manager/connections" = { "org/virt-manager/virt-manager/connections" = {
"autoconnect" = ["qemu:///system"]; "autoconnect" = [ "qemu:///system" ];
"uris" = ["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" = { "org/virt-manager/virt-manager/stats" = {
"enable-disk-poll" = true; "enable-disk-poll" = true;
"enable-net-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
lib, , stdenvNoCC
stdenvNoCC, , fetchFromGitHub
fetchFromGitHub, , pack ? "pack_1"
pack ? "pack_1", , theme ? "cuts"
theme ? "cuts", ,
}: }:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
pname = "adi1090x-plymouth"; pname = "adi1090x-plymouth";

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{...}: { { ... }: {
boot = { boot = {
resumeDevice = "/dev/vg0/swap"; resumeDevice = "/dev/vg0/swap";
initrd.luks.devices = { 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; boot.tmpOnTmpfs = true;
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "tmpfs"; device = "tmpfs";
fsType = "tmpfs"; fsType = "tmpfs";
options = ["defaults" "uid=0" "gid=0" "mode=0755"]; options = [ "defaults" "uid=0" "gid=0" "mode=0755" ];
neededForBoot = true; neededForBoot = true;
}; };
"/nix" = { "/nix" = {
device = "/dev/vg0/system"; device = "/dev/vg0/system";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=/@nix" "compress-force=zstd"]; options = [ "subvol=/@nix" "compress-force=zstd" ];
neededForBoot = true; neededForBoot = true;
}; };
"/persist" = { "/persist" = {
device = "/dev/vg0/system"; device = "/dev/vg0/system";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=/@persist" "compress-force=zstd"]; options = [ "subvol=/@persist" "compress-force=zstd" ];
neededForBoot = true; neededForBoot = true;
}; };
"/mnt/system" = { "/mnt/system" = {
device = "/dev/vg0/system"; device = "/dev/vg0/system";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=/" "compress-force=zstd"]; options = [ "subvol=/" "compress-force=zstd" ];
}; };
"/boot" = { "/boot" = {
device = "/dev/disk/by-partlabel/ESP"; device = "/dev/disk/by-partlabel/ESP";

View file

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

View file

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

View file

@ -1,16 +1,15 @@
{ { lib
lib, , pkgs
pkgs, , config
config, , ...
...
}: { }: {
imports = [./disk.nix ./kernel.nix]; imports = [ ./disk.nix ./kernel.nix ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
extraPackages = [pkgs.intel-media-driver]; extraPackages = [ pkgs.intel-media-driver ];
driSupport = true; driSupport = true;
}; };
@ -23,7 +22,7 @@
hardware.sensor.hddtemp = { hardware.sensor.hddtemp = {
enable = true; 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 = { boot.loader = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,10 +1,10 @@
{pkgs, ...}: { { pkgs, ... }: {
services = { services = {
blueman.enable = true; blueman.enable = true;
dbus = { dbus = {
enable = true; enable = true;
apparmor = "enabled"; apparmor = "enabled";
packages = [pkgs.gcr pkgs.gcr_4]; packages = [ pkgs.gcr pkgs.gcr_4 ];
}; };
fstrim.enable = true; fstrim.enable = true;
fwupd.enable = true; fwupd.enable = true;
@ -20,7 +20,7 @@
power-profiles-daemon.enable = true; power-profiles-daemon.enable = true;
resolved.enable = true; resolved.enable = true;
thermald.enable = true; thermald.enable = true;
udev.packages = [pkgs.yubikey-personalization]; udev.packages = [ pkgs.yubikey-personalization ];
udisks2.enable = true; 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 = { virtualisation = {
docker = { docker = {
enable = true; enable = true;
@ -9,7 +9,7 @@
enable = true; enable = true;
qemu.ovmf = { qemu.ovmf = {
enable = true; enable = true;
packages = [pkgs.OVMFFull.fd]; packages = [ pkgs.OVMFFull.fd ];
}; };
}; };
}; };

View file

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