restructured again
This commit is contained in:
25
README.md
25
README.md
@@ -2,22 +2,33 @@
|
||||
|
||||
## TODO
|
||||
1. Add user specific traditional dotfiles.
|
||||
2. ~~Try home-manager for nix~~ (Still in the middle of updating)
|
||||
2. ~~Try home-manager~~
|
||||
3. ~~Try nix flakes~~
|
||||
|
||||
## How install workey
|
||||
either do
|
||||
```
|
||||
git clone https://github.com/natto1784/dotfiles
|
||||
cd dotfiles
|
||||
nixos-rebuild switch --flake .
|
||||
nixos-rebuild switch --flake .#Satori
|
||||
```
|
||||
or
|
||||
`nixos-rebuild switch --flake github:natto1784/dotfiles#Satori`
|
||||
Replace Satori with whatever system you want or replace to whatever hostname you want in the config
|
||||
|
||||
## How home-manager workey
|
||||
Either clone repo and do `./hm-switch` inside it (ofc change the username in the flake to yours dum dum)\
|
||||
Either clone repo and do `./hm-switch` inside it (login as the user you want to change config as!!!)
|
||||
or
|
||||
```
|
||||
nix build github:natto1784/dotfiles#hm-configs.{USER}.activationPackage -o allah
|
||||
./allah/activate
|
||||
nix build github:natto1784/dotfiles#hm-configs.{USER}.activationPackage -o hm-result
|
||||
./hm-result/activate
|
||||
```
|
||||
You can unlink allah afterwards
|
||||
(replace {USER} with 'natto' or whatever username there is in flake.nix, retard)
|
||||
You can unlink "hm-result" after that
|
||||
replace {USER} with 'natto' or whatever is availabe (or change it in the config)
|
||||
|
||||
Following are the people whose configs I took inspiration from and learned stuff from
|
||||
- @fufexan
|
||||
- @NobbZ
|
||||
- @dramforever
|
||||
|
||||
I'm thankful to all of them
|
||||
|
45
configs/emacs.el
Normal file
45
configs/emacs.el
Normal file
@@ -0,0 +1,45 @@
|
||||
;;definitions
|
||||
(defun install (a) (unless (package-installed-p a) (package-install a)))
|
||||
|
||||
|
||||
;;settings
|
||||
(global-display-line-numbers-mode 0)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
(setq inhibit-startup-screen t)
|
||||
(scroll-bar-mode 0)
|
||||
(tool-bar-mode 0)
|
||||
(menu-bar-mode 0)
|
||||
;;(fringe-mode 0)
|
||||
(set-face-attribute 'default nil :font "Fira Mono for Powerline" :height 120)
|
||||
;;(set-face-background 'line-number-current-line nil :background t)
|
||||
|
||||
|
||||
;;packages
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
|
||||
(package-initialize)
|
||||
|
||||
(install 'use-package)
|
||||
(setq use-package-always-ensure t)
|
||||
(require 'use-package)
|
||||
|
||||
;;install shit
|
||||
(use-package elcord
|
||||
:config
|
||||
(elcord-mode 1))
|
||||
(use-package gruvbox-theme
|
||||
:config
|
||||
(load-theme 'gruvbox-dark-hard t))
|
||||
(use-package ivy
|
||||
:bind (:map ivy-minibuffer-map
|
||||
("C-n" . ivy-next-line)
|
||||
("C-e" . ivy-previous-line)
|
||||
("C-i" . ivy-done))
|
||||
:config
|
||||
(ivy-mode 1))
|
||||
|
||||
;;keybinds
|
||||
;;ivy
|
||||
;(define-key ivy-minibuffer-map (kbd "C-n") 'ivy-next-line)
|
||||
;(define-key ivy-minibuffer-map (kbd "C-e") 'ivy-previous-line)
|
||||
;(define-key ivy-minibuffer-map (kbd "C-i") 'ivy-done)
|
34
flake.lock
generated
34
flake.lock
generated
@@ -19,6 +19,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"emacs": {
|
||||
"locked": {
|
||||
"lastModified": 1621045111,
|
||||
"narHash": "sha256-W76OW/gjCJQRV49PC5++vHucI0w3LmxELfvbjX6xM7c=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "7639cddd28b8ac0c9b5427f5e13c775534170428",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1600209923,
|
||||
@@ -102,10 +117,12 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"emacs": "emacs",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nur": "nur",
|
||||
"stable": "stable"
|
||||
"stable": "stable",
|
||||
"utils": "utils"
|
||||
}
|
||||
},
|
||||
"stable": {
|
||||
@@ -123,6 +140,21 @@
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1620759905,
|
||||
"narHash": "sha256-WiyWawrgmyN0EdmiHyG2V+fqReiVi8bM9cRdMaKQOFg=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b543720b25df6ffdfcf9227afafc5b8c1fabfae8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
41
flake.nix
41
flake.nix
@@ -11,45 +11,52 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
agenix.url = github:ryantm/agenix;
|
||||
emacs = {
|
||||
url = github:nix-community/emacs-overlay;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
utils.url = github:numtide/flake-utils;
|
||||
};
|
||||
|
||||
outputs = inputs@{self, nixpkgs, ... }:
|
||||
|
||||
inputs.utils.lib.eachDefaultSystem (system: {
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = self.overlays ++ [ inputs.nur.overlay inputs.emacs.overlay ];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}) //
|
||||
(
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
ov = (builtins.attrValues self.overlays) ++ [ inputs.nur.overlay ];
|
||||
in
|
||||
{
|
||||
overlays = {
|
||||
overridesandshit = import ./overlays/overridesandshit.nix;
|
||||
packages = import ./overlays/packages.nix;
|
||||
};
|
||||
|
||||
overlays = [
|
||||
(import ./overlays/overridesandshit.nix)
|
||||
(import ./overlays/packages.nix)
|
||||
];
|
||||
hm-configs = {
|
||||
natto = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
configuration = { pkgs, lib, ... }: {
|
||||
system = "x86_64-linux";
|
||||
configuration = { lib, ... }: {
|
||||
imports = [
|
||||
./home/natto.nix
|
||||
];
|
||||
nixpkgs.overlays = ov;
|
||||
nixpkgs.overlays = self.pkgs.x86_64-linux.overlays;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
};
|
||||
system = "${system}";
|
||||
homeDirectory = "/home/natto";
|
||||
username = "natto";
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations.Satori = nixpkgs.lib.nixosSystem {
|
||||
system = "${system}";
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./satori.nix
|
||||
inputs.agenix.nixosModules.age
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
nixpkgs.overlays = ov;
|
||||
#environment.systemPackages = with inputs; [ claudius ];
|
||||
}
|
||||
{ nixpkgs.pkgs = self.pkgs.x86_64-linux; }
|
||||
];
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@@ -37,7 +37,6 @@ in
|
||||
curl
|
||||
pamixer
|
||||
mpdas
|
||||
dunst
|
||||
pavucontrol
|
||||
anup
|
||||
proxychains
|
||||
@@ -52,11 +51,12 @@ in
|
||||
qbittorrent
|
||||
tor-browser-bundle-bin
|
||||
mpc_cli
|
||||
flameshot
|
||||
hexchat
|
||||
luajit
|
||||
mpv
|
||||
jmtpfs
|
||||
dunst
|
||||
flameshot
|
||||
youtube-dl
|
||||
];
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{lib, config, pkgs, ... }:
|
||||
{config, pkgs, ... }:
|
||||
let
|
||||
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
@@ -27,4 +27,5 @@ in
|
||||
modesetting = { enable = true; };
|
||||
};
|
||||
};
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
}
|
||||
|
@@ -35,7 +35,6 @@
|
||||
# symbolsFile = ./colemak-dh;
|
||||
# };
|
||||
# };
|
||||
videoDrivers = [ "nvidia" ];
|
||||
layout = "us";
|
||||
xkbVariant = "colemak";
|
||||
};
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{lib, stdenv, fetchFromGitHub, rage, curl, sox, ffmpeg}:
|
||||
{lib, stdenv, fetchFromGitHub}:
|
||||
stdenv.mkDerivation rec{
|
||||
name = "customscripts";
|
||||
src = ./src;
|
||||
@@ -8,7 +8,6 @@ stdenv.mkDerivation rec{
|
||||
rev = "a996a52831316cc2c282904352654bd20c82f7bd";
|
||||
sha256 = "sha256-nw21YmcmQMF8NADnuHOc7eF2Yaj/r/1mYBn77fYK7s8=";
|
||||
};*/
|
||||
buildInputs = [ rage curl sox ffmpeg ];
|
||||
unpackPhase = ":";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p rage
|
||||
if [ $# -eq 0 ]; then echo "bruh"; exit 1; fi
|
||||
FILE=$1
|
||||
if [ $# -eq 2 ]; then
|
||||
|
@@ -1,2 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p ffmpeg sox
|
||||
mkdir spectrals; cd spectrals; for x in ../*$1;do sox "$x" -n spectrogram -o "$(echo $(ffprobe -loglevel error -show_entries format_tags=track -of default=noprint_wrappers=1:nokey=1 "$x") - $(ffprobe -loglevel error -show_entries format_tags=TITLE -of default=noprint_wrappers=1:nokey=1 "$x")).png"; done
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p sox ffmpeg curl jq
|
||||
mkdir spectrals
|
||||
cd spectrals
|
||||
for x in ../*$1
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p ffmpeg sox
|
||||
IFS=$'\n'
|
||||
for i in $(ls *$3)
|
||||
do
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p flac
|
||||
if [ $1 == "flac" ]; then
|
||||
for x in *.flac; do
|
||||
flac "$x" --compression-level-8 -o "bruh.$x"
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p ffmpeg
|
||||
|
||||
target_video_size_KB="$2"
|
||||
origin_duration_s=$(ffprobe -v error -show_streams -select_streams a "$1" | grep -Po "(?<=^duration\=)\d*\.\d*")
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p mono
|
||||
#Script to control fans via nbfc in /opt/nbfc
|
||||
if [[ $1 = "a" ]]; then
|
||||
mono /opt/nbfc/nbfc.exe set -f 0 -a
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
killall mpdas
|
||||
killall mpd_discord_richpresence
|
||||
systemctl stop mpd.socket --user
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p ffmpeg
|
||||
for x in *$1;do echo $(ffprobe -loglevel error -show_entries format_tags=track -of default=noprint_wrappers=1:nokey=1 "$x") - $(ffprobe -loglevel error -show_entries format_tags=TITLE -of default=noprint_wrappers=1:nokey=1 "$x"); done
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i sh -p ncmpcpp python39Packages.ueberzug
|
||||
#credits: https://github.com/alnj/ncmpcpp-ueberzug
|
||||
export FIFO_UEBERZUG="/tmp/mpd-ueberzug-${PPID}"
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p curl
|
||||
for x in $@; do
|
||||
curl -F "file=@\"$x\"" https://x0.at/
|
||||
echo " "
|
||||
|
@@ -1,7 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p ffmpeg youtube-dl
|
||||
youtube-dl -f bestaudio -o "ytmp3.%(title)s.%(ext)s" "$1"
|
||||
file=$(echo ytmp3.*.*)
|
||||
newfile=$(echo $file | cut -c 7-)
|
||||
mv "$file" "$newfile"
|
||||
ffmpeg -i "$newfile" -c:a mp3 "${newfile%.*}.mp3"
|
||||
rm "$newfile"
|
||||
#trust me ive a reason for lossy->lossy transcoding
|
||||
|
12
satori.nix
12
satori.nix
@@ -3,12 +3,12 @@
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./Satori/hardware.nix
|
||||
./Satori/stuff.nix
|
||||
./Satori/pkgs.nix
|
||||
./Satori/networking.nix
|
||||
./Satori/boot.nix
|
||||
# ./modules/nvidia-offload.nix
|
||||
./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
|
||||
];
|
||||
|
@@ -23,7 +23,7 @@
|
||||
};
|
||||
grub = {
|
||||
enable = true;
|
||||
# useOSProber = true;
|
||||
useOSProber = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
splashImage = ../modules/cirno.png;
|
@@ -9,7 +9,7 @@
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/4c02ddf5-d00e-4d84-856f-c327ae44d047";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd:15"];
|
||||
options = ["compress=zstd:10"];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" =
|
@@ -9,8 +9,6 @@
|
||||
git
|
||||
glxinfo
|
||||
sxiv
|
||||
jq
|
||||
mono
|
||||
vim
|
||||
wineWowPackages.staging
|
||||
neofetch
|
||||
@@ -19,7 +17,7 @@
|
||||
pciutils
|
||||
jdk
|
||||
ntfs3g
|
||||
python38
|
||||
python3
|
||||
htop
|
||||
nodejs
|
||||
wget
|
@@ -1,9 +1,9 @@
|
||||
{lib, config, agenix, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./Stuff/fonts.nix
|
||||
./Stuff/users.nix
|
||||
./Stuff/services.nix
|
||||
./stuff/fonts.nix
|
||||
./stuff/users.nix
|
||||
./stuff/services.nix
|
||||
];
|
||||
time.timeZone = "Asia/Kolkata";
|
||||
environment = {
|
@@ -6,5 +6,7 @@
|
||||
font-awesome-ttf
|
||||
powerline-fonts
|
||||
vistafonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
];
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
{lib, config, pkgs, ... }:
|
||||
{config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.natto = {
|
Reference in New Issue
Block a user