diff --git a/Satori/Hardware/power.nix b/Satori/Hardware/power.nix deleted file mode 100644 index 06edd0b..0000000 --- a/Satori/Hardware/power.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, ... }: - -{ - powerManagement = { - enable = true; - cpuFreqGovernor = "ondemand"; - }; -} diff --git a/Satori/boot.nix b/Satori/boot.nix index 6f83c0c..13d762f 100644 --- a/Satori/boot.nix +++ b/Satori/boot.nix @@ -26,7 +26,7 @@ # useOSProber = true; efiSupport = true; device = "nodev"; - splashImage = "/etc/cirno.png"; #hehe + splashImage = ../modules/cirno.png; splashMode = "stretch"; configurationName = "nixbruh"; }; diff --git a/Satori/configuration.nix b/Satori/configuration.nix deleted file mode 100644 index 6961c66..0000000 --- a/Satori/configuration.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ lib, config, ...}: - -{ - imports = - [ - ./hardware.nix - ./stuff.nix - ./pkgs.nix - ./networking.nix - ./boot.nix - ]; - system.stateVersion = "20.09"; -} diff --git a/Satori/hardware.nix b/Satori/hardware.nix index ee34a33..14bcfd3 100644 --- a/Satori/hardware.nix +++ b/Satori/hardware.nix @@ -4,14 +4,12 @@ imports = [ (modulesPath + "/installer/scan/not-detected.nix") - ./Hardware/power.nix - ./Hardware/graphicshit.nix ]; fileSystems."/" = { device = "/dev/disk/by-uuid/4c02ddf5-d00e-4d84-856f-c327ae44d047"; fsType = "btrfs"; - options = ["compress=zstd:9"]; + options = ["compress=zstd:15"]; }; fileSystems."/boot/efi" = @@ -46,4 +44,8 @@ }; swapDevices = [ {device = "/dev/nvme0n1p7";} ]; + powerManagement = { + enable = true; + cpuFreqGovernor = "powersave"; + }; } diff --git a/Satori/stuff.nix b/Satori/stuff.nix index d82cafa..7591cf7 100644 --- a/Satori/stuff.nix +++ b/Satori/stuff.nix @@ -1,17 +1,16 @@ -{lib, config, agenix, ... }: +{lib, config, agenix, pkgs, ... }: { imports = [ - ./Stuff/sound.nix ./Stuff/fonts.nix ./Stuff/users.nix ./Stuff/services.nix - ./Stuff/xorg.nix ]; time.timeZone = "Asia/Kolkata"; environment = { sessionVariables = { QT_X11_NO_MITSHM="1"; EDITOR = "nvim"; + QT_QPA_PLATFORMTHEME = "gtk3"; }; }; security={ @@ -31,6 +30,8 @@ automatic = false; dates = "20:15"; }; - nixpkgs.config.allowUnfree = true; - nixpkgs.config.allowBroken = true; + nixpkgs.config = { + allowUnfree = true; + allowBroken = true; + }; } diff --git a/flake.nix b/flake.nix index f5f1558..9746ea1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,4 @@ { - inputs = { stable.url = github:nixos/nixpkgs/nixos-20.09; nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; @@ -14,11 +13,11 @@ agenix.url = github:ryantm/agenix; }; - outputs = {self, nixpkgs, stable, home-manager, nur, agenix, ... }: + outputs = inputs@{self, nixpkgs, ... }: let system = "x86_64-linux"; - ov = (builtins.attrValues self.overlays) ++ [ nur.overlay ]; + ov = (builtins.attrValues self.overlays) ++ [ inputs.nur.overlay ]; in { overlays = { @@ -27,7 +26,7 @@ }; hm-configs = { - natto = home-manager.lib.homeManagerConfiguration { + natto = inputs.home-manager.lib.homeManagerConfiguration { configuration = { pkgs, lib, ... }: { imports = [ ./home/natto.nix @@ -43,14 +42,14 @@ nixosConfigurations.Satori = nixpkgs.lib.nixosSystem { system = "${system}"; modules = [ - ./Satori/configuration.nix - agenix.nixosModules.age - home-manager.nixosModules.home-manager + ./satori.nix + inputs.agenix.nixosModules.age + inputs.home-manager.nixosModules.home-manager { nixpkgs.overlays = ov; + #environment.systemPackages = with inputs; [ claudius ]; } ]; }; - }; } diff --git a/home/config/mpd/mpd.conf b/home/config/mpd/mpd.conf deleted file mode 100644 index 77fd87c..0000000 --- a/home/config/mpd/mpd.conf +++ /dev/null @@ -1,24 +0,0 @@ -music_directory "~/Music" -playlist_directory "~/.config/mpd/playlists" -db_file "~/.config/mpd/database" -log_file "~/.config/mpd/log" -pid_file "~/.config/mpd/pid" -state_file "~/.config/mpd/state" -bind_to_address "~/.config/mpd/socket" -bind_to_address "localhost" -port "6600" -restore_paused "yes" -input { - plugin "curl" -} -audio_output { - type "pulse" - name "pulse audio" -} -audio_output { - type "fifo" - name "Visualizer feed" - path "/tmp/g.fifo" - format "44100:16:2" -} -filesystem_charset "UTF-8" diff --git a/home/config/ncmpcpp/config b/home/config/ncmpcpp/config deleted file mode 100644 index 483fd98..0000000 --- a/home/config/ncmpcpp/config +++ /dev/null @@ -1,62 +0,0 @@ -autocenter_mode = "yes" -follow_now_playing_lyrics = "yes" -lyrics_directory = "~/.lyrics" -mpd_music_dir="~/Music" -fetch_lyrics_for_current_song_in_background = "yes" -#store_lyrics_in_song_dir = yes -browser_sort_mode=mtime - -colors_enabled = "yes" -main_window_color = "white" -header_window_color = "180" -volume_color = "215" -progressbar_color = "180" -progressbar_elapsed_color = "16" -statusbar_color = "43" -active_window_border = "blue" -user_interface = "alternative" -#song_list_format="(4)[230]{l}" -song_columns_list_format = "(4)[230]{l} (30)[219]{t} (15)[180]{a} (15)[215]{b}" -song_list_format = "{$(219)%a} - {$(230)%t}" -#song_list_format = "{$7%a - $9}{$5%t$9}|{$5%f$9}$R{$6%b $9}{$3%l$9}" -song_status_format = " $6%a $7⟫⟫ $3%t $7⟫⟫ $4%b " - -visualizer_data_source = "/tmp/g.fifo" -#visualizer_output_name = "my_fifo" -visualizer_type = "spectrum" -#visualizer_type = "ellipse" -visualizer_fps = 144 -visualizer_in_stereo = "yes" -visualizer_look = "◆▋" -visualizer_spectrum_smooth_look="yes" -playlist_editor_display_mode = "classic" -playlist_display_mode = "columns" -cyclic_scrolling = "yes" -lines_scrolled = "2" - -system_encoding = "utf-8" -regular_expressions = "extended" - -#selected_item_prefix = "* " -#discard_colors_if_item_is_selected = "no" - -#incremental_seeking = "yes" -#seek_time = "1" - -## Visibility ## -header_visibility = "yes" -statusbar_visibility = "yes" -titles_visibility = "yes" - -## Progress Bar ## -progressbar_look = "▃▃▃" - -## Now Playing ## -now_playing_prefix = "> " -centered_cursor = "yes" - -# Misc -display_bitrate = "yes" -enable_window_title = "yes" -empty_tag_marker = "" -#execute_on_song_change="~/.config/ncmpcpp/cover_obs.sh" diff --git a/home/config/zathura/zathurarc b/home/config/zathura/zathurarc index 9cfc162..94968e9 100644 --- a/home/config/zathura/zathurarc +++ b/home/config/zathura/zathurarc @@ -8,7 +8,7 @@ map S rotate map f zoom in map q zoom out map p follow link -map m left -map i right -map n down -map e up +map m scroll left +map i scroll right +map n scroll down +map e scroll up diff --git a/home/natto.nix b/home/natto.nix index bf8feac..c3c173f 100644 --- a/home/natto.nix +++ b/home/natto.nix @@ -37,13 +37,14 @@ in curl pamixer mpdas - mpd dunst pavucontrol anup proxychains cmake xfce.thunar + xfce.xfconf + xfce.tumbler discord customscripts mpd_discord_richpresence @@ -60,14 +61,6 @@ in ]; file = { - ncmpcpp = { - source = ./config/ncmpcpp/config; - target = "${home}/.config/ncmpcpp/config"; - }; - mpd = { - source = ./config/mpd/mpd.conf; - target = "${home}/.config/mpd/mpd.conf"; - }; dwm-autostart = { source = ./config/dwm/autostart.sh; target = "${home}/.dwm/autostart.sh"; diff --git a/home/secrets/fish_variables.age b/home/secrets/fish_variables.age index b2aa3cd..4bb1902 100644 Binary files a/home/secrets/fish_variables.age and b/home/secrets/fish_variables.age differ diff --git a/home/stuff/gtk.nix b/home/stuff/gtk.nix index 9ad11ef..a40e931 100644 --- a/home/stuff/gtk.nix +++ b/home/stuff/gtk.nix @@ -2,9 +2,18 @@ { gtk = { enable = true; - iconTheme.name = "Gruvbox-Material-Dark"; - iconTheme.package = pkgs.gruvbox-icons; - theme.name = "Equilux"; - theme.package = pkgs.equilux-theme; + iconTheme = { + name = "Gruvbox-Material-Dark"; + package = pkgs.gruvbox-icons; + }; + theme = { + name = "Equilux"; + package = pkgs.equilux-theme; + }; + /* gtk3 = { + bookmarks = [ + "folder:///mnt/Stuff/Memes/Discord" + ]; + };*/ }; } diff --git a/home/stuff/programs.nix b/home/stuff/programs.nix index 912a741..3961821 100644 --- a/home/stuff/programs.nix +++ b/home/stuff/programs.nix @@ -2,6 +2,7 @@ { imports = [ ./programs/nvim.nix + ./programs/ncmpcpp.nix ]; programs = { firefox = { @@ -19,12 +20,9 @@ options = { recolor = true; recolor-lightcolor = "rgba(0,0,0,0)"; - default-bg = "rgba(0,0,0,0.7)"; + default-bg = "rgba(0,0,0,0.8)"; }; }; - ncmpcpp = { - enable = true; - }; mpv = { enable = true; config = { @@ -33,5 +31,8 @@ save-position-on-quit = "yes"; }; }; + emacs = { + enable = true; + }; }; } diff --git a/home/stuff/programs/ncmpcpp.nix b/home/stuff/programs/ncmpcpp.nix new file mode 100644 index 0000000..ebc1204 --- /dev/null +++ b/home/stuff/programs/ncmpcpp.nix @@ -0,0 +1,57 @@ +{config, ...}: +{ + programs.ncmpcpp = { + enable = true; + mpdMusicDir = ~/Music; + settings = { + autocenter_mode = "yes"; + follow_now_playing_lyrics = "yes"; + lyrics_directory = "~/.lyrics"; + fetch_lyrics_for_current_song_in_background = "yes"; + #store_lyrics_in_song_dir = yes; + browser_sort_mode="mtime"; + colors_enabled = "yes"; + main_window_color = "white"; + header_window_color = "180"; + volume_color = "215"; + progressbar_color = "180"; + progressbar_elapsed_color = "16"; + statusbar_color = "43"; + active_window_border = "blue"; + user_interface = "alternative"; + #song_list_format="(4)[230]{l}"; + song_columns_list_format = "(4)[230]{l} (20)[219]{t} (12)[180]{a} (16)[215]{b}"; + song_list_format = "{$(219)%a} - {$(230)%t}"; + #song_list_format = "{$7%a - $9}{$5%t$9}|{$5%f$9}$R{$6%b $9}{$3%l$9}"; + song_status_format = " $6%a $7⟫⟫ $3%t $7⟫⟫ $4%b "; + visualizer_data_source = "/tmp/g.fifo"; + #visualizer_output_name = "my_fifo"; + visualizer_type = "spectrum"; + #visualizer_type = "ellipse"; + visualizer_fps = "144"; + visualizer_in_stereo = "yes"; + visualizer_look = "◆▋"; + visualizer_spectrum_smooth_look="yes"; + playlist_editor_display_mode = "classic"; + playlist_display_mode = "columns"; + cyclic_scrolling = "yes"; + lines_scrolled = "2"; + system_encoding = "utf-8"; + regular_expressions = "extended"; + #selected_item_prefix = "* " + #discard_colors_if_item_is_selected = "no" + #incremental_seeking = "yes" + #seek_time = "1" + header_visibility = "yes"; + statusbar_visibility = "yes"; + titles_visibility = "yes"; + progressbar_look = "▃▃▃"; + now_playing_prefix = "> "; + centered_cursor = "yes"; + display_bitrate = "yes"; + enable_window_title = "yes"; + empty_tag_marker = ""; + execute_on_song_change="${config.home.homeDirectory}/.config/ncmpcpp/ncmpcpp-ueberzug/ncmpcpp_cover_art.sh"; + }; + }; +} diff --git a/home/stuff/services.nix b/home/stuff/services.nix index fabfe8d..a3e7c90 100644 --- a/home/stuff/services.nix +++ b/home/stuff/services.nix @@ -44,5 +44,36 @@ in enable = false; extraConfig = builtins.readFile ./config/sxhkd/sxhkdrc; }; + + mpd = { + enable = true; + musicDirectory = "${config.home.homeDirectory}/Music"; + extraConfig = '' + playlist_directory "~/.config/mpd/playlists" + db_file "~/.config/mpd/database" + log_file "~/.config/mpd/log" + pid_file "~/.config/mpd/pid" + state_file "~/.config/mpd/state" + bind_to_address "~/.config/mpd/socket" + bind_to_address "localhost" + port "6600" + restore_paused "yes" + input { + plugin "curl" + } + audio_output { + type "pulse" + name "pulse audio" + } + audio_output { + type "fifo" + name "Visualizer feed" + path "/tmp/g.fifo" + format "44100:16:2" + } + filesystem_charset "UTF-8" + ''; + network.startWhenNeeded = true; + }; }; } diff --git a/home/stuff/xsession.nix b/home/stuff/xsession.nix index 3caf616..544942f 100644 --- a/home/stuff/xsession.nix +++ b/home/stuff/xsession.nix @@ -5,5 +5,9 @@ enable = false; extraConfig = builtins.readFile ./config/bspwm/bspwmrc; }; + pointerCursor = { + package = pkgs.numix-cursor-theme; + name = "Numix"; + }; }; } diff --git a/modules/cirno.png b/modules/cirno.png new file mode 100644 index 0000000..2cfcadd Binary files /dev/null and b/modules/cirno.png differ diff --git a/Satori/Stuff/colemak-dh.xkb b/modules/colemak-dh.xkb similarity index 100% rename from Satori/Stuff/colemak-dh.xkb rename to modules/colemak-dh.xkb diff --git a/Satori/Hardware/graphicshit.nix b/modules/nvidia-offload.nix similarity index 100% rename from Satori/Hardware/graphicshit.nix rename to modules/nvidia-offload.nix diff --git a/Satori/Stuff/sound.nix b/modules/pipewire.nix similarity index 100% rename from Satori/Stuff/sound.nix rename to modules/pipewire.nix diff --git a/Satori/Stuff/xorg.nix b/modules/xorg.nix similarity index 100% rename from Satori/Stuff/xorg.nix rename to modules/xorg.nix diff --git a/overlays/customscripts/src/killmpd b/overlays/customscripts/src/killmpd index ca4ee98..bb7e97b 100644 --- a/overlays/customscripts/src/killmpd +++ b/overlays/customscripts/src/killmpd @@ -1,4 +1,5 @@ -#!/usr/bin/env bash -killall mpd -killall mpd_discord_richpresence +#!/usr/bin/env sh killall mpdas +killall mpd_discord_richpresence +systemctl stop mpd.socket --user +systemctl stop mpd.service --user diff --git a/overlays/customscripts/src/mpdp b/overlays/customscripts/src/mpdp index 54a154a..192f720 100644 --- a/overlays/customscripts/src/mpdp +++ b/overlays/customscripts/src/mpdp @@ -1,4 +1,5 @@ -#!/usr/bin/env bash -mpd +#!/usr/bin/env sh +systemctl start mpd.service --user +#systemctl start mpd.socket --user mpdas & mpd_discord_richpresence & diff --git a/overlays/customscripts/src/ncm b/overlays/customscripts/src/ncm new file mode 100644 index 0000000..96516e8 --- /dev/null +++ b/overlays/customscripts/src/ncm @@ -0,0 +1,19 @@ +#!/usr/bin/env sh +#credits: https://github.com/alnj/ncmpcpp-ueberzug +export FIFO_UEBERZUG="/tmp/mpd-ueberzug-${PPID}" + +cleanup() { + rm "$FIFO_UEBERZUG" 2>/dev/null + rm /tmp/mpd_cover.jpg 2>/dev/null + pkill -P $$ 2>/dev/null + pkill ncmpcpp_cover_art.sh +} + +pkill -P $$ 2>/dev/null +rm "$FIFO_UEBERZUG" 2>/dev/null +mkfifo "$FIFO_UEBERZUG" >/dev/null +trap cleanup EXIT 2>/dev/null +tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser simple >/dev/null 2>&1 & + +ncmpcpp +cleanup diff --git a/satori.nix b/satori.nix new file mode 100644 index 0000000..441353f --- /dev/null +++ b/satori.nix @@ -0,0 +1,16 @@ +{ lib, config, ...}: + +{ + imports = + [ + ./Satori/hardware.nix + ./Satori/stuff.nix + ./Satori/pkgs.nix + ./Satori/networking.nix + ./Satori/boot.nix +# ./modules/nvidia-offload.nix + ./modules/pipewire.nix + ./modules/xorg.nix + ]; + system.stateVersion = "20.09"; +}