Initial Commit
This commit is contained in:
1195
flake.lock
generated
Normal file
1195
flake.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
51
flake.nix
Normal file
51
flake.nix
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
description = "Build Entire System";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
|
||||||
|
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
nathan.url = "path:/home/nathan/.nixos/home";
|
||||||
|
|
||||||
|
root.url = "path:/root/.nixos";
|
||||||
|
|
||||||
|
system.url = "path:/home/nathan/.nixos/system";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, ... }@inputs:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
in {
|
||||||
|
inputs.home-manager.useGlobalPkgs = true;
|
||||||
|
|
||||||
|
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
|
inherit system;
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
inputs.system.nixosModule
|
||||||
|
inputs.nathan.nixosModule
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
homeConfigurations."nathan" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
|
||||||
|
modules = [ inputs.nathan.homeManagerModule ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
61
home/flake.nix
Normal file
61
home/flake.nix
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
description = "Nathan user settings";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
prgms.url = "/home/nathan/.nixos/programs";
|
||||||
|
|
||||||
|
srvcs.url = "/home/nathan/.nixos/services";
|
||||||
|
|
||||||
|
packages.url = "/home/nathan/.nixos/packages";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: {
|
||||||
|
|
||||||
|
nixosModule = { config, lib, pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.prgms.module
|
||||||
|
inputs.srvcs.module
|
||||||
|
inputs.packages.module
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
homeManagerModule = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.prgms.hmModule
|
||||||
|
inputs.srvcs.hmModule
|
||||||
|
inputs.packages.hmModule
|
||||||
|
];
|
||||||
|
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
|
home.username = "nathan";
|
||||||
|
|
||||||
|
home.homeDirectory = "/home/nathan";
|
||||||
|
|
||||||
|
|
||||||
|
home.pointerCursor = {
|
||||||
|
gtk.enable = true;
|
||||||
|
package = pkgs.bibata-cursors;
|
||||||
|
name = "Bibata-Modern-Classic";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme.name = "Tokyonight-Dark-B";
|
||||||
|
theme.package = pkgs.tokyonight-gtk-theme;
|
||||||
|
iconTheme.name = "Tokyonight-Dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.mpris-proxy.enable = true;
|
||||||
|
|
||||||
|
programs.ssh.enable = true;
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
209
packages/external/flake.lock
generated
vendored
Normal file
209
packages/external/flake.lock
generated
vendored
Normal file
@@ -0,0 +1,209 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"digital": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725393562,
|
||||||
|
"narHash": "sha256-xukWBh9LuxlfHcmlScEY49j/M+rhJoEaoWPXT4bWfSM=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lobster": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726728133,
|
||||||
|
"narHash": "sha256-6UNJxOcFKZCE20yVdeXi3hhsNdo82o0WdI52bjw/Zx0=",
|
||||||
|
"owner": "justchokingaround",
|
||||||
|
"repo": "lobster",
|
||||||
|
"rev": "3cfac574621d0ffc3c44df053fb8df94b4c2480a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "justchokingaround",
|
||||||
|
"repo": "lobster",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1703961334,
|
||||||
|
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1727264057,
|
||||||
|
"narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "759537f06e6999e141588ff1c9be7f3a5c060106",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-24.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1724819573,
|
||||||
|
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 0,
|
||||||
|
"narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=",
|
||||||
|
"path": "/nix/store/mvz96grv31nxq69ldw5a5pn2qh1s6ca6-source",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"digital": "digital",
|
||||||
|
"lobster": "lobster",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"swww": "swww",
|
||||||
|
"waveforms": "waveforms"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"swww": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"utils": "utils"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726747651,
|
||||||
|
"narHash": "sha256-Yg7c0XUgn82aNftvzSXTKMtZT1gdskun710aO5Dnd9M=",
|
||||||
|
"owner": "LGFae",
|
||||||
|
"repo": "swww",
|
||||||
|
"rev": "ddb0d5dbc83960d0c834d2a4dcb7f541474cb854",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "LGFae",
|
||||||
|
"repo": "swww",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"waveforms": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_4"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726518634,
|
||||||
|
"narHash": "sha256-VsEAoGNO21d6irv6TyFd/m75o/+XoHz9ggRp4Nx583Y=",
|
||||||
|
"owner": "liff",
|
||||||
|
"repo": "waveforms-flake",
|
||||||
|
"rev": "eeb5438261394f3d0e35b7e20b511d6b865400c8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "liff",
|
||||||
|
"repo": "waveforms-flake",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
62
packages/external/flake.nix
vendored
Normal file
62
packages/external/flake.nix
vendored
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
description = "External Flakes";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
lobster.url = "github:justchokingaround/lobster";
|
||||||
|
|
||||||
|
swww.url = "github:LGFae/swww";
|
||||||
|
|
||||||
|
waveforms.url = "github:liff/waveforms-flake";
|
||||||
|
|
||||||
|
digital = {
|
||||||
|
url = "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
_pkgs = import inputs.nixpkgs { inherit system; };
|
||||||
|
in rec {
|
||||||
|
|
||||||
|
packages.${system}.digital = _pkgs.stdenv.mkDerivation {
|
||||||
|
|
||||||
|
name = "digital";
|
||||||
|
|
||||||
|
src = inputs.digital;
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
echo "${_pkgs.zulu}/bin/java -jar $src/Digital.jar" > $out/bin/$name
|
||||||
|
chmod +x $out/bin/digital
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
module = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.waveforms.nixosModule
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
|
||||||
|
inputs.lobster.packages.${pkgs.system}.lobster
|
||||||
|
inputs.swww.packages.${pkgs.system}.swww
|
||||||
|
packages.${pkgs.system}.digital
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
1
packages/external/result
vendored
Symbolic link
1
packages/external/result
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/nix/store/b7f8lzhzksy3rhhzma1r5iascqahhzzz-digital
|
||||||
122
packages/flake.nix
Normal file
122
packages/flake.nix
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
{
|
||||||
|
description = "Nathan user packages";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs-old.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||||
|
nixpkgs-us.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
scripts.url = "./scripts";
|
||||||
|
|
||||||
|
external.url = "./external";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
pkgs-old = import inputs.nixpkgs-old {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
pkgs-us = import inputs.nixpkgs-us {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
module = { config, lib, pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.external.module
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.scripts.hmModule
|
||||||
|
inputs.external.hmModule
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
home.packages = with pkgs; let
|
||||||
|
pypkgs = ps: with ps; [
|
||||||
|
numpy
|
||||||
|
pandas
|
||||||
|
torch
|
||||||
|
torchvision
|
||||||
|
torchaudio
|
||||||
|
transformers
|
||||||
|
datasets
|
||||||
|
pyaudio
|
||||||
|
faster-whisper
|
||||||
|
pyusb
|
||||||
|
];
|
||||||
|
|
||||||
|
in [
|
||||||
|
|
||||||
|
cava
|
||||||
|
gcc
|
||||||
|
android-tools
|
||||||
|
|
||||||
|
(pkgs.python311.withPackages pypkgs)
|
||||||
|
|
||||||
|
brightnessctl
|
||||||
|
libdbusmenu-gtk3
|
||||||
|
zulu
|
||||||
|
lmms
|
||||||
|
killall
|
||||||
|
youtube-music
|
||||||
|
#unfree {
|
||||||
|
geogebra
|
||||||
|
#}
|
||||||
|
blueberry
|
||||||
|
wl-clipboard
|
||||||
|
firefox-wayland
|
||||||
|
swaylock-effects
|
||||||
|
|
||||||
|
neofetch
|
||||||
|
pkgs-us.mpv
|
||||||
|
(ncmpcpp.override { visualizerSupport = true; clockSupport = true; })
|
||||||
|
playerctl
|
||||||
|
mpc-cli
|
||||||
|
xfce.thunar
|
||||||
|
vlc
|
||||||
|
zip
|
||||||
|
unzip
|
||||||
|
pavucontrol
|
||||||
|
yewtube
|
||||||
|
ytmdl
|
||||||
|
ffmpeg_5
|
||||||
|
lxqt.lxqt-policykit
|
||||||
|
rpi-imager
|
||||||
|
rsync
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
tigervnc
|
||||||
|
keepassxc
|
||||||
|
httplz
|
||||||
|
|
||||||
|
#school?
|
||||||
|
#pkgs-us.digital
|
||||||
|
|
||||||
|
#3D modeling/printing
|
||||||
|
kicad
|
||||||
|
blender
|
||||||
|
freecad
|
||||||
|
cura
|
||||||
|
|
||||||
|
#productivity
|
||||||
|
libreoffice
|
||||||
|
super-productivity
|
||||||
|
|
||||||
|
#games
|
||||||
|
prismlauncher
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
110
packages/scripts/flake.nix
Normal file
110
packages/scripts/flake.nix
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
{
|
||||||
|
description = "Nathan user scripts";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }: {
|
||||||
|
|
||||||
|
module = { config, lib, pkgs, ... }: {};
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
|
||||||
|
#scripts
|
||||||
|
(pkgs.writeShellScriptBin "_systemRebuild" ''
|
||||||
|
sudo nix flake lock /home/nathan/.nixos --update-input nathan --update-input root --update-input system
|
||||||
|
${pkgs.nh}/bin/nh os switch --ask /home/nathan/.nixos
|
||||||
|
echo //////Enter to close//////
|
||||||
|
read
|
||||||
|
'')
|
||||||
|
(pkgs.writeShellScriptBin "_homeRebuild" ''
|
||||||
|
sudo nix flake lock /home/nathan/.nixos --update-input nathan --update-input root
|
||||||
|
${pkgs.nh}/bin/nh home switch --ask /home/nathan/.nixos
|
||||||
|
echo //////Enter to close//////
|
||||||
|
read
|
||||||
|
'')
|
||||||
|
(pkgs.writeShellScriptBin "addCoverArtMP3" ''
|
||||||
|
if [[ $# != 2 ]]
|
||||||
|
then echo "usage: addCoverArtMP3 song.mp3 image.jpg"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
mv $1 copyof$1
|
||||||
|
ffmpeg -i copyof$1 -i $2 -map_metadata 0 -map 0 -map 1 -acodec copy $1
|
||||||
|
'')
|
||||||
|
|
||||||
|
(pkgs.writeShellScriptBin "randWallpaper" ''
|
||||||
|
file=$(ls /home/nathan/Pictures/Wallpaper/ | shuf -n 1)
|
||||||
|
setWallpaper /home/nathan/Pictures/Wallpaper/$file
|
||||||
|
'')
|
||||||
|
|
||||||
|
(pkgs.writeShellScriptBin "setWallpaper" ''
|
||||||
|
|
||||||
|
img=''$(realpath ''${1:-~/.cache/bg})
|
||||||
|
|
||||||
|
if [[ ''${1:-~/.cache/bg} != ~/.cache/bg ]]; then
|
||||||
|
swww img $img --transition-step 10 --transition-fps 30 --transition-type center && changeColors $img $2
|
||||||
|
else
|
||||||
|
changeColors $img $2
|
||||||
|
fi
|
||||||
|
'')
|
||||||
|
|
||||||
|
(pkgs.writeShellScriptBin "changeColors" ''
|
||||||
|
|
||||||
|
if [[ $(ls ~/.cache/ | grep bga) != bga ]]; then
|
||||||
|
echo 100 > ~/.cache/bga
|
||||||
|
fi
|
||||||
|
|
||||||
|
alpha=''${2:-`cat ~/.cache/bga`}
|
||||||
|
|
||||||
|
img=''$(realpath ''${1:-~/.cache/bg})
|
||||||
|
|
||||||
|
if [[ $alpha -lt 0 ]]; then
|
||||||
|
$alpha=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $alpha -gt 100 ]]; then
|
||||||
|
$alpha=100
|
||||||
|
fi
|
||||||
|
|
||||||
|
wal -i $img -a $alpha --cols16 -n
|
||||||
|
|
||||||
|
echo $alpha > ~/.cache/bga
|
||||||
|
|
||||||
|
rm ~/.cache/bg
|
||||||
|
ln -s $img ~/.cache/bg
|
||||||
|
|
||||||
|
sleep 0.4
|
||||||
|
|
||||||
|
pywalfox update &
|
||||||
|
|
||||||
|
themecord > ~/.cache/_.txt && rm ~/.cache/_.txt
|
||||||
|
|
||||||
|
[[ $(pidof cava) != "" ]] && pkill -USR1 cava &
|
||||||
|
|
||||||
|
for i in $(ls /run/user/1000 | grep nvim); do nvr -s --servername /run/user/1000/$i --remote-send '<cmd>colorscheme pywal<CR>'; done
|
||||||
|
|
||||||
|
pkill -USR1 kitty
|
||||||
|
'')
|
||||||
|
|
||||||
|
(pkgs.writeShellScriptBin "onSystemStart" ''
|
||||||
|
ags &
|
||||||
|
swww-daemon &
|
||||||
|
pypr &
|
||||||
|
setWallpaper &
|
||||||
|
lxqt-policykit-agent &
|
||||||
|
nmcli device wifi connect EagleNet password '~?C#@ZiH' &
|
||||||
|
hyprctl setcursor Bibata-Modern-Classic 16 &
|
||||||
|
'')
|
||||||
|
|
||||||
|
(pkgs.writeShellScriptBin "colorPrefix" ''
|
||||||
|
exec -a "$0" "$@" &
|
||||||
|
sleep 0.4 && changeColors &
|
||||||
|
'')
|
||||||
|
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
54
programs/ags/flake.nix
Normal file
54
programs/ags/flake.nix
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
description = "ags config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
ags.url = "github:Aylur/ags";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: {
|
||||||
|
|
||||||
|
module = { config, lib, pkgs, ... }: {
|
||||||
|
services = {
|
||||||
|
upower.enable = true;
|
||||||
|
gvfs.enable = true;
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [ inputs.ags.homeManagerModules.default ];
|
||||||
|
|
||||||
|
programs.ags = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
gtksourceview
|
||||||
|
webkitgtk
|
||||||
|
accountsservice
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/ags/launcher.js".text = ''
|
||||||
|
function Launcher() {
|
||||||
|
return Widget.EventBox({
|
||||||
|
class_name: "launcher",
|
||||||
|
hpack: "center",
|
||||||
|
child: Widget.Icon({
|
||||||
|
icon: '${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake.png',
|
||||||
|
css: 'font-size: 24px;'
|
||||||
|
}),
|
||||||
|
on_primary_click: () => {Utils.execAsync('rofi -show drun')},
|
||||||
|
margin_left: 10,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Launcher
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
7
programs/calcurse/default.nix
Normal file
7
programs/calcurse/default.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
calcurse
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
}
|
||||||
44
programs/flake.nix
Normal file
44
programs/flake.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
description = "Nathan user program config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
ags.url = "./ags";
|
||||||
|
|
||||||
|
neovim.url = "./neovim";
|
||||||
|
|
||||||
|
terminal.url = "./terminal"; #home manager only
|
||||||
|
|
||||||
|
rofi.url = "./rofi";
|
||||||
|
|
||||||
|
pywal.url = "./pywal";
|
||||||
|
|
||||||
|
hyprland.url = "./hyprland";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: {
|
||||||
|
|
||||||
|
module = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.hyprland.module
|
||||||
|
inputs.ags.module
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.ags.hmModule
|
||||||
|
inputs.neovim.hmModule
|
||||||
|
inputs.hyprland.hmModule
|
||||||
|
inputs.terminal.hmModule
|
||||||
|
inputs.rofi.hmModule
|
||||||
|
inputs.pywal.hmModule
|
||||||
|
./calcurse
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
353
programs/hyprland/flake.nix
Normal file
353
programs/hyprland/flake.nix
Normal file
@@ -0,0 +1,353 @@
|
|||||||
|
{
|
||||||
|
description = "Hyprland Config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: {
|
||||||
|
|
||||||
|
module = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
xwayland.enable = true;
|
||||||
|
|
||||||
|
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||||
|
|
||||||
|
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
home.sessionVariables.NIX_OZONE_WL = "1";
|
||||||
|
|
||||||
|
programs.kitty.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
pyprland
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file.".config/hypr/pyprland.toml".text = ''
|
||||||
|
[pyprland]
|
||||||
|
plugins = [
|
||||||
|
"scratchpads"
|
||||||
|
]
|
||||||
|
|
||||||
|
[scratchpads.nvim]
|
||||||
|
animation = "fromTop"
|
||||||
|
command = "kitty --class scratchpad-nvim -e nvim ~"
|
||||||
|
lazy = false
|
||||||
|
class = "scratchpad-nvim"
|
||||||
|
margin = 100
|
||||||
|
multi = true
|
||||||
|
excludes = "*"
|
||||||
|
|
||||||
|
[scratchpads.free]
|
||||||
|
animation = "fromBottom"
|
||||||
|
command = "kitty --class scratchpad"
|
||||||
|
class = "scratchpad"
|
||||||
|
lazy = false
|
||||||
|
margin = 100
|
||||||
|
multi = true
|
||||||
|
excludes = "*"
|
||||||
|
'';
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
systemd.variables = [ "--all" ];
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
|
||||||
|
#------------------------------------------------#
|
||||||
|
# _ _ _ _ #
|
||||||
|
#| | | | | | | | #
|
||||||
|
#| |___| |_ _ ____ _ _| | __ _.-.___ ___| | #
|
||||||
|
#| ___ | | | | _ \| |/ | |/ _` | _ \/ _ | #
|
||||||
|
#| | | | |_| | |_) | /| | (_| | | | | (_| | #
|
||||||
|
#|_| |_|\__, | __/|__| |_|\__,_|_| |_|\___/_| #
|
||||||
|
# |___/|_| #
|
||||||
|
# #
|
||||||
|
#------------------------------------------------#
|
||||||
|
|
||||||
|
monitor=eDP-1,1920x1080@300,0x0,1
|
||||||
|
#monitor=eDP-1, addreserved, 0, 0, 45, 0
|
||||||
|
|
||||||
|
exec-once=onSystemStart
|
||||||
|
|
||||||
|
# Some default env vars.
|
||||||
|
env = XCURSOR_SIZE,16
|
||||||
|
|
||||||
|
source = ./otf.conf
|
||||||
|
source = ~/.cache/wal/colors-hypr.conf
|
||||||
|
|
||||||
|
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||||
|
input {
|
||||||
|
kb_layout = us
|
||||||
|
kb_variant =
|
||||||
|
kb_model =
|
||||||
|
kb_options =
|
||||||
|
kb_rules =
|
||||||
|
|
||||||
|
follow_mouse = 1
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = yes
|
||||||
|
}
|
||||||
|
|
||||||
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||||
|
}
|
||||||
|
|
||||||
|
cursor {
|
||||||
|
no_hardware_cursors = true
|
||||||
|
}
|
||||||
|
|
||||||
|
general {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
|
||||||
|
gaps_in = 5
|
||||||
|
gaps_out = 4
|
||||||
|
border_size = 2
|
||||||
|
col.active_border = $color1 $color5 100deg
|
||||||
|
col.inactive_border = $color0
|
||||||
|
|
||||||
|
layout = dwindle
|
||||||
|
}
|
||||||
|
decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
|
||||||
|
rounding = 2
|
||||||
|
|
||||||
|
blur {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
drop_shadow = yes
|
||||||
|
shadow_range = 4
|
||||||
|
shadow_render_power = 3
|
||||||
|
col.shadow = rgba(1a1a1aee)
|
||||||
|
}
|
||||||
|
|
||||||
|
animations {
|
||||||
|
enabled = yes
|
||||||
|
|
||||||
|
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||||
|
|
||||||
|
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||||
|
|
||||||
|
animation = windows, 1, 7, myBezier
|
||||||
|
animation = windowsOut, 1, 7, default, popin 80%
|
||||||
|
animation = border, 1, 10, default
|
||||||
|
animation = borderangle, 1, 8, default
|
||||||
|
animation = fade, 1, 7, default
|
||||||
|
animation = workspaces, 1, 6, default
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dwindle {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||||
|
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||||
|
preserve_split = yes # you probably want this
|
||||||
|
}
|
||||||
|
|
||||||
|
master {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||||
|
new_status = "master"
|
||||||
|
}
|
||||||
|
|
||||||
|
gestures {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
workspace_swipe = off
|
||||||
|
}
|
||||||
|
|
||||||
|
misc {
|
||||||
|
disable_hyprland_logo = false
|
||||||
|
disable_splash_rendering = true
|
||||||
|
force_default_wallpaper = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
# Binds
|
||||||
|
$mainMod = ALT
|
||||||
|
|
||||||
|
bind = $mainMod, E, exec, colorPrefix kitty
|
||||||
|
|
||||||
|
bind = $mainMod, B, exec, firefox
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, B, exec, firefox --private-window
|
||||||
|
|
||||||
|
bind = $mainMod, Q, killactive,
|
||||||
|
|
||||||
|
bind = $mainMod, R, exec, colorPrefix kitty -e _systemRebuild
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, R, exec, colorPrefix kitty -e _homeRebuild
|
||||||
|
|
||||||
|
bind = $mainMod, C, exec, colorPrefix kitty -e bash -c "cd ~/.nixos; nvim /home/nathan/.nixos/flake.nix"
|
||||||
|
|
||||||
|
bind = $mainMod, F, exec, thunar
|
||||||
|
bind = $mainMod SHIFT, F, fullscreen
|
||||||
|
|
||||||
|
bind = $mainMod, semicolon, exec, colorPrefix kitty -e nvim ~
|
||||||
|
|
||||||
|
bind = $mainMod, Insert, exec, libreoffice &
|
||||||
|
|
||||||
|
bind = $mainMod, H, exec, bluetoothctl connect 88:D0:39:F9:83:CE
|
||||||
|
|
||||||
|
bind = $mainMod, V, togglefloating,
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, V, exec, vlc &
|
||||||
|
|
||||||
|
bind = , Menu, exec, rofi -show drun
|
||||||
|
|
||||||
|
bind = $mainMod, Menu, exec, killall .ags-wrapped; ags &
|
||||||
|
|
||||||
|
bind = $mainMod, P, pseudo, # dwindle
|
||||||
|
|
||||||
|
bind = $mainMod, Z, togglesplit, # dwindle
|
||||||
|
|
||||||
|
bind = $mainMod, M, exec, spotify
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, M, exec, firefox --new-window soundcloud.com/you/library
|
||||||
|
|
||||||
|
bind = $mainMod CTRL, M, exec, colorPrefix kitty -e ncmpcpp -s browser
|
||||||
|
|
||||||
|
bind = $mainMod, XF86AudioPlay, exec, mpc load casual
|
||||||
|
|
||||||
|
bind = , XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause
|
||||||
|
|
||||||
|
bind = , XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl pause
|
||||||
|
bind = $mainMod, F9, exec, ${pkgs.playerctl}/bin/playerctl pause
|
||||||
|
|
||||||
|
bind = , XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next
|
||||||
|
|
||||||
|
bind = , XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous
|
||||||
|
|
||||||
|
bind = , XF86Launch2, exec, steam &
|
||||||
|
bind = $mainMod, XF86Launch2, exec, prismlauncher
|
||||||
|
|
||||||
|
bind = , XF86Calculator, exec, geogebra
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, Print, exec, firefox --new-window localhost:631
|
||||||
|
bind = , Print, exec, grim -g "$(slurp)"
|
||||||
|
|
||||||
|
bind = $mainMod, Return, exec, ${pkgs.vesktop}/bin/vesktop --enable-features=UseOzonePlatform --ozone-platform=wayland &
|
||||||
|
|
||||||
|
bind = $mainMod CTRL, Return, exec, firefox --new-window https://discord.com/app
|
||||||
|
|
||||||
|
# Move focus with mainMod + arrow keys
|
||||||
|
bind = $mainMod, A, movefocus, l
|
||||||
|
bind = $mainMod, D, movefocus, r
|
||||||
|
bind = $mainMod, W, movefocus, u
|
||||||
|
bind = $mainMod, S, movefocus, d
|
||||||
|
# Switch workspaces with mainMod + [0-9]
|
||||||
|
bind = $mainMod, 1, workspace, 1
|
||||||
|
bind = $mainMod, 2, workspace, 2
|
||||||
|
bind = $mainMod, 3, workspace, 3
|
||||||
|
bind = $mainMod, 4, workspace, 4
|
||||||
|
bind = $mainMod, 5, workspace, 5
|
||||||
|
bind = $mainMod, 6, workspace, 6
|
||||||
|
bind = $mainMod, 7, workspace, 7
|
||||||
|
bind = $mainMod, 8, workspace, 8
|
||||||
|
bind = $mainMod, 9, workspace, 9
|
||||||
|
bind = $mainMod, 0, workspace, 10
|
||||||
|
|
||||||
|
bind = $mainMod, Home, workspace, 11
|
||||||
|
|
||||||
|
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
|
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||||
|
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||||
|
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||||
|
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||||
|
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||||
|
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||||
|
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||||
|
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||||
|
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, Home, movetoworkspace, 11
|
||||||
|
|
||||||
|
# Scroll through existing workspaces with mainMod + scroll
|
||||||
|
bind = $mainMod, right, workspace, e+1
|
||||||
|
bind = $mainMod, left, workspace, e-1
|
||||||
|
|
||||||
|
#switch network connections
|
||||||
|
bind = CTRL SHIFT, Escape, exec, nmcli device down wlo1
|
||||||
|
bind = CTRL SHIFT, 0, exec, nmcli device down wlo1; nmcli connection up Hotspot
|
||||||
|
bind = CTRL SHIFT, 1, exec, nmcli device wifi connect EagleNet password ~?C##@ZiH
|
||||||
|
bind = CTRL SHIFT, 2, exec, nmcli device down wlo1; nmcli device wifi connect CXNK00813829 password a8d859c8cfb420ab
|
||||||
|
bind = CTRL SHIFT, 3, exec, nmcli device down wlo1; nmcli device wifi connect ATT9MhT2ql password 325qxr89u?3t
|
||||||
|
|
||||||
|
#brightness keys
|
||||||
|
bind = , XF86MonBrightnessUp, exec, brightnessctl set +10%
|
||||||
|
bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
|
||||||
|
|
||||||
|
#volume keys
|
||||||
|
binde = , XF86AudioRaiseVolume, exec, amixer -D default sset Master 10%+
|
||||||
|
binde = , XF86AudioLowerVolume, exec, amixer -D default sset Master 10%-
|
||||||
|
bind = , XF86AudioMute, exec, amixer -D default sset Master toggle
|
||||||
|
|
||||||
|
|
||||||
|
#screen lock key
|
||||||
|
bind = $mainMod, F12, exec, swaylock
|
||||||
|
|
||||||
|
#logout shortcut
|
||||||
|
bind = CTRL ALT, Delete, exec, loginctl kill-session self
|
||||||
|
|
||||||
|
|
||||||
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
bind = $mainMod SHIFT, W, movewindow, u
|
||||||
|
bind = $mainMod SHIFT, S, movewindow, d
|
||||||
|
bind = $mainMod SHIFT, A, movewindow, l
|
||||||
|
bind = $mainMod SHIFT, D, movewindow, r
|
||||||
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
|
bindm = $mainMod SHIFT, mouse:272, resizewindow
|
||||||
|
|
||||||
|
$scratchpadsize = size 60% 80%
|
||||||
|
$scratchpad = class:^(scratchpad)$
|
||||||
|
|
||||||
|
windowrulev2 = float, $scratchpad
|
||||||
|
windowrulev2 = $scratchpadsize, $scratchpad
|
||||||
|
windowrulev2 = workspace special silent, $scratchpad
|
||||||
|
|
||||||
|
$kitty = class:^(scratchpad-kitty)$
|
||||||
|
|
||||||
|
windowrulev2 = float, $kitty
|
||||||
|
windowrulev2 = $scratchpadsize, $kitty
|
||||||
|
windowrulev2 = workspace special silent, $kitty
|
||||||
|
$nvim = class:^(scratchpad-nvim)$
|
||||||
|
|
||||||
|
windowrulev2 = float, $nvim
|
||||||
|
windowrulev2 = $scratchpadsize, $nvim
|
||||||
|
windowrulev2 = workspace special silent, $nvim
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, N, exec, colorPrefix pypr toggle nvim
|
||||||
|
bind = $mainMod SHIFT, E, exec, colorPrefix pypr toggle free
|
||||||
|
|
||||||
|
|
||||||
|
bind = CTRL SHIFT, Home, exec, ssh -i ~/.ssh/key nathan@69.150.99.129 -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen
|
||||||
|
bind = CTRL SHIFT, Home, submap, clean
|
||||||
|
|
||||||
|
|
||||||
|
bind = $mainMod CTRL, Home, submap, clean
|
||||||
|
|
||||||
|
submap = clean
|
||||||
|
|
||||||
|
bind = $mainMod CTRL, Home, submap, reset
|
||||||
|
|
||||||
|
submap = reset
|
||||||
|
|
||||||
|
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
271
programs/neovim/flake.nix
Normal file
271
programs/neovim/flake.nix
Normal file
@@ -0,0 +1,271 @@
|
|||||||
|
{
|
||||||
|
description = "neovim config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: {
|
||||||
|
|
||||||
|
module = {}: {};
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
neovim-remote
|
||||||
|
];
|
||||||
|
|
||||||
|
home.sessionVariables.SUDO_EDITOR = "kitten edit-in-kitty";
|
||||||
|
|
||||||
|
programs.neovim = with pkgs; {
|
||||||
|
enable = true;
|
||||||
|
#package = neovim;
|
||||||
|
defaultEditor = true;
|
||||||
|
extraLuaConfig = ''
|
||||||
|
vim.g.mapleader = ' '
|
||||||
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
|
vim.opt.nu = true
|
||||||
|
vim.opt.rnu = true
|
||||||
|
|
||||||
|
vim.opt.scrolloff = 12
|
||||||
|
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
|
||||||
|
vim.opt.wrap = false
|
||||||
|
|
||||||
|
vim.opt.hlsearch = false
|
||||||
|
vim.opt.incsearch = true
|
||||||
|
|
||||||
|
vim.filetype.add({
|
||||||
|
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
||||||
|
})
|
||||||
|
-- vim.opt.termguicolors = true
|
||||||
|
require("nvim-tree").setup()
|
||||||
|
|
||||||
|
local lsp_zero = require('lsp-zero')
|
||||||
|
|
||||||
|
-- lsp_attach is where you enable features that only work
|
||||||
|
-- if there is a language server active in the file
|
||||||
|
local lsp_attach = function(client, bufnr)
|
||||||
|
local opts = {buffer = bufnr}
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
|
||||||
|
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
|
||||||
|
vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
|
||||||
|
vim.keymap.set({'n', 'x'}, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
|
||||||
|
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
lsp_zero.extend_lspconfig({
|
||||||
|
sign_text = true,
|
||||||
|
lsp_attach = lsp_attach,
|
||||||
|
capabilities = require('cmp_nvim_lsp').default_capabilities(),
|
||||||
|
})
|
||||||
|
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
lspconfig.ccls.setup{}
|
||||||
|
lspconfig.nil_ls.setup{}
|
||||||
|
lspconfig.statix.setup{}
|
||||||
|
lspconfig.pyright.setup{}
|
||||||
|
lspconfig.gopls.setup{}
|
||||||
|
|
||||||
|
-- local llm = require('llm')
|
||||||
|
|
||||||
|
-- llm.setup({
|
||||||
|
-- api_token = nil, -- cf Install paragraph
|
||||||
|
-- model = "codellama:7b", -- the model ID, behavior depends on backend
|
||||||
|
-- backend = "ollama", -- backend ID, "huggingface" | "ollama" | "openai" | "tgi"
|
||||||
|
-- url = "http://localhost:11434", -- the http url of the backend
|
||||||
|
-- tokens_to_clear = { "<|endoftext|>" }, -- tokens to remove from the model's output
|
||||||
|
-- parameters that are added to the request body, values are arbitrary, you can set any field:value pair here it will be passed as is to the backend
|
||||||
|
-- request_body = {
|
||||||
|
-- parameters = {
|
||||||
|
-- temperature = 0.2,
|
||||||
|
-- top_p = 0.95,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- set this if the model supports fill in the middle
|
||||||
|
-- fim = {
|
||||||
|
-- enabled = true,
|
||||||
|
-- prefix = "<fim_prefix>",
|
||||||
|
-- middle = "<fim_middle>",
|
||||||
|
-- suffix = "<fim_suffix>",
|
||||||
|
-- },
|
||||||
|
-- debounce_ms = 150,
|
||||||
|
-- accept_keymap = "<Tab>",
|
||||||
|
-- dismiss_keymap = "<S-Tab>",
|
||||||
|
-- tls_skip_verify_insecure = false,
|
||||||
|
-- llm-ls configuration, cf llm-ls section
|
||||||
|
-- lsp = {
|
||||||
|
-- bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "${pkgs.llm-ls}/bin/llm-ls",
|
||||||
|
-- host = nil,
|
||||||
|
-- port = nil,
|
||||||
|
-- cmd_env = nil, -- or { LLM_LOG_LEVEL = "DEBUG" } to set the log level of llm-ls
|
||||||
|
-- version = "0.5.3",
|
||||||
|
-- },
|
||||||
|
-- tokenizer = nil, -- cf Tokenizer paragraph
|
||||||
|
-- context_window = 1024, -- max number of tokens for the context window
|
||||||
|
-- enable_suggestions_on_startup = true,
|
||||||
|
-- enable_suggestions_on_files = "*", -- pattern matching syntax to enable suggestions on specific files, either a string or a list of strings
|
||||||
|
-- disable_url_path_completion = false, -- cf Backend
|
||||||
|
-- })
|
||||||
|
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
|
|
||||||
|
-- nvim-cmp setup
|
||||||
|
local cmp = require("cmp")
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
['<C-u>'] = cmp.mapping.scroll_docs(-4), -- Up
|
||||||
|
['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down
|
||||||
|
-- C-b (back) C-f (forward) for snippet placeholder navigation.
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
['<CR>'] = cmp.mapping.confirm {
|
||||||
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = true,
|
||||||
|
},
|
||||||
|
['<Tab>'] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif luasnip.expand_or_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif luasnip.jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
}),
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
require("noice").setup()
|
||||||
|
require("barbar").setup()
|
||||||
|
require("pywal").setup()
|
||||||
|
require("lualine").setup({
|
||||||
|
options = {
|
||||||
|
theme = 'pywal-nvim',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
vim.cmd[[colorscheme pywal]]
|
||||||
|
vim.notify = require("notify")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<CR>", {desc = "find files"})
|
||||||
|
vim.keymap.set("n", "<leader>fa", "<cmd>Telescope find_files no_ignore=true hidden=true<CR>", {desc = "find files"})
|
||||||
|
vim.keymap.set("n", "<leader>fc", "<cmd>Telescope treesitter<CR>", {desc = "find code"})
|
||||||
|
vim.keymap.set("n", "<leader>t", "<cmd>NvimTreeToggle<CR>", {desc = "toggle tree"})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-.>", "<cmd>BufferNext<CR>", {desc = "move to next tab"})
|
||||||
|
vim.keymap.set("n", "<C-,>", "<cmd>BufferPrevious<CR>", {desc = "move to previous tab"})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-h>", "<cmd>wincmd h<CR>", {desc = "move to left window"})
|
||||||
|
vim.keymap.set("n", "<C-j>", "<cmd>wincmd j<CR>", {desc = "move to below window"})
|
||||||
|
vim.keymap.set("n", "<C-k>", "<cmd>wincmd k<CR>", {desc = "move to above window"})
|
||||||
|
vim.keymap.set("n", "<C-l>", "<cmd>wincmd l<CR>", {desc = "move to right window"})
|
||||||
|
|
||||||
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", {desc = "move selected down"})
|
||||||
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", {desc = "move selected up"})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "J", "mzJ`z", {desc = "cursor still when appending next line"})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-d>", "<C-d>zz", {desc = "cursor mid when page down"})
|
||||||
|
vim.keymap.set("n", "<C-u>", "<C-u>zz", {desc = "cursor mid when page up"})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "n", "nzzzv", {desc = "search term mid"})
|
||||||
|
vim.keymap.set("n", "N", "Nzzzv", {desc = "search term mid"})
|
||||||
|
|
||||||
|
vim.keymap.set("x", "<leader>p", "\"_dP", {desc = "no overwrite paste buffer"})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>y", "\"+y", {desc = "yank to system clipboard"})
|
||||||
|
vim.keymap.set("v", "<leader>y", "\"+y", {desc = "^"})
|
||||||
|
vim.keymap.set("n", "<leader>Y", "\"+Y", {desc = "^"})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "Q", "<nop>", {desc = "unmap Q"})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], {desc = "replace current word entire file"})
|
||||||
|
vim.keymap.set("n", "<leader>F", function() vim.lsp.buf.format() end, {desc = "format buffer?"})
|
||||||
|
'';
|
||||||
|
plugins = with vimPlugins; [
|
||||||
|
telescope-nvim
|
||||||
|
nvim-tree-lua
|
||||||
|
nvim-web-devicons
|
||||||
|
mini-nvim
|
||||||
|
noice-nvim
|
||||||
|
nvim-notify
|
||||||
|
barbar-nvim
|
||||||
|
pywal-nvim
|
||||||
|
lualine-nvim
|
||||||
|
tokyonight-nvim
|
||||||
|
llm-nvim
|
||||||
|
|
||||||
|
cmp-buffer
|
||||||
|
cmp-nvim-lsp
|
||||||
|
cmp_luasnip
|
||||||
|
luasnip
|
||||||
|
cmp-path
|
||||||
|
cmp-cmdline
|
||||||
|
nvim-cmp
|
||||||
|
nvim-lspconfig
|
||||||
|
|
||||||
|
lsp-zero-nvim
|
||||||
|
|
||||||
|
nvim-treesitter
|
||||||
|
nvim-treesitter-parsers.cpp
|
||||||
|
nvim-treesitter-parsers.nix
|
||||||
|
nvim-treesitter-parsers.bash
|
||||||
|
nvim-treesitter-parsers.python
|
||||||
|
nvim-treesitter-parsers.lua
|
||||||
|
nvim-treesitter-parsers.vim
|
||||||
|
nvim-treesitter-parsers.javascript
|
||||||
|
nvim-treesitter-parsers.css
|
||||||
|
nvim-treesitter-parsers.hyprlang
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
nil
|
||||||
|
statix # Lints and suggestions for the nix programming language
|
||||||
|
pyright
|
||||||
|
gopls
|
||||||
|
ccls
|
||||||
|
];
|
||||||
|
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
vimdiffAlias = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
17
programs/nixvim/README.md
Normal file
17
programs/nixvim/README.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Nixvim template
|
||||||
|
|
||||||
|
This template gives you a good starting point for configuring nixvim standalone.
|
||||||
|
|
||||||
|
## Configuring
|
||||||
|
|
||||||
|
To start configuring, just add or modify the nix files in `./config`.
|
||||||
|
If you add a new configuration file, remember to add it to the
|
||||||
|
[`config/default.nix`](./config/default.nix) file
|
||||||
|
|
||||||
|
## Testing your new configuration
|
||||||
|
|
||||||
|
To test your configuration simply run the following command
|
||||||
|
|
||||||
|
```
|
||||||
|
nix run .
|
||||||
|
```
|
||||||
6
programs/nixvim/config/bufferline.nix
Normal file
6
programs/nixvim/config/bufferline.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
bufferline.enable = true;
|
||||||
|
web-devicons.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
176
programs/nixvim/config/default.nix
Normal file
176
programs/nixvim/config/default.nix
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
# Import all your configuration modules here
|
||||||
|
imports = [ ./bufferline.nix ];
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
|
||||||
|
lualine.enable = true;
|
||||||
|
|
||||||
|
luasnip.enable = true;
|
||||||
|
|
||||||
|
barbar.enable = true;
|
||||||
|
|
||||||
|
nvim-tree.enable = true;
|
||||||
|
|
||||||
|
noice.enable = true;
|
||||||
|
|
||||||
|
mini.enable = true;
|
||||||
|
|
||||||
|
notify.enable = true;
|
||||||
|
|
||||||
|
telescope.enable = true;
|
||||||
|
|
||||||
|
treesitter.enable = true;
|
||||||
|
|
||||||
|
web-devicons.enable = true;
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
servers = {
|
||||||
|
#js/typescript
|
||||||
|
ts-ls.enable = true;
|
||||||
|
#c/c++
|
||||||
|
ccls.enable = true;
|
||||||
|
#nix
|
||||||
|
nil-ls.enable = true;
|
||||||
|
#python
|
||||||
|
pyright.enable = true;
|
||||||
|
#bash
|
||||||
|
bashls.enable = true;
|
||||||
|
#css
|
||||||
|
cssls.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cmp = {
|
||||||
|
enable = true;
|
||||||
|
autoEnableSources = true;
|
||||||
|
settings = {
|
||||||
|
sources = [
|
||||||
|
{ name = "nvim_lsp"; }
|
||||||
|
{ name = "path"; }
|
||||||
|
{ name = "buffer"; }
|
||||||
|
{ name = "luasnip"; }
|
||||||
|
{ name = "cmdline"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
mapleader = " ";
|
||||||
|
maplocalleader = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
nu = true;
|
||||||
|
rnu = true;
|
||||||
|
|
||||||
|
scrolloff = 12;
|
||||||
|
|
||||||
|
tabstop = 4;
|
||||||
|
softtabstop = 4;
|
||||||
|
shiftwidth = 4;
|
||||||
|
expandtab = true;
|
||||||
|
|
||||||
|
smartindent = true;
|
||||||
|
|
||||||
|
wrap = false;
|
||||||
|
|
||||||
|
hlsearch = false;
|
||||||
|
incsearch = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ff";
|
||||||
|
action = "<cmd>Telescope find_files hidden=true<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>fc";
|
||||||
|
action = "<cmd>Telescope treesitter<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>t";
|
||||||
|
action = "<cmd>NvimTreeToggle<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-.>";
|
||||||
|
action = "<cmd>BufferNext<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-,>";
|
||||||
|
action = "<cmd>BufferPrevious<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-h>";
|
||||||
|
action = "<cmd>wincmd h<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-j>";
|
||||||
|
action = "<cmd>wincmd j<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-k>";
|
||||||
|
action = "<cmd>wincmd k<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-l>";
|
||||||
|
action = "<cmd>wincmd l<CR>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "Q";
|
||||||
|
action = "<nop>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = "J";
|
||||||
|
action = ":m '>+1<CR>gv=gv";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = "K";
|
||||||
|
action = ":m '<-2<CR>gv=gv";
|
||||||
|
}
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfigLua = ''
|
||||||
|
vim.filetype.add({
|
||||||
|
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
pywal-nvim
|
||||||
|
tokyonight-nvim
|
||||||
|
llm-nvim
|
||||||
|
|
||||||
|
nvim-lspconfig
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
colorscheme = "pywal";
|
||||||
|
}
|
||||||
327
programs/nixvim/flake.lock
generated
Normal file
327
programs/nixvim/flake.lock
generated
Normal file
@@ -0,0 +1,327 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"devshell": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722113426,
|
||||||
|
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"revCount": 57,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726153070,
|
||||||
|
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726153070,
|
||||||
|
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"git-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": [
|
||||||
|
"nixvim",
|
||||||
|
"flake-compat"
|
||||||
|
],
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs-stable": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726745158,
|
||||||
|
"narHash": "sha256-D5AegvGoEjt4rkKedmxlSEmC+nNLMBPWFxvmYnVLhjk=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "4e743a6920eab45e8ba0fbe49dc459f1423a4b74",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"git-hooks",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726902823,
|
||||||
|
"narHash": "sha256-Gkc7pwTVLKj4HSvRt8tXNvosl8RS9hrBAEhOjAE0Tt4=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "14929f7089268481d86b83ed31ffd88713dcd415",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726742753,
|
||||||
|
"narHash": "sha256-QclpWrIFIg/yvWRiOUaMp1WR+TGUE9tb7RE31xHlxWc=",
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "c03f85fa42d68d1056ca1740f3113b04f3addff2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726937504,
|
||||||
|
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725233747,
|
||||||
|
"narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726755586,
|
||||||
|
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixvim": {
|
||||||
|
"inputs": {
|
||||||
|
"devshell": "devshell",
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-parts": "flake-parts_2",
|
||||||
|
"git-hooks": "git-hooks",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nix-darwin": "nix-darwin",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nuschtosSearch": "nuschtosSearch",
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1727118532,
|
||||||
|
"narHash": "sha256-nRzlwdPaSb1UCoqndT52AUNpx9e8wLCEjY28eAkCHIg=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "47364df49645e89d8aa03aa61c893e12ecbac366",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nuschtosSearch": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726816132,
|
||||||
|
"narHash": "sha256-AbB0lgc0IbzLIxj1O3cosiMNAVQak4KJtvq9q8MjHhs=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"rev": "7733a39a1321057172d87e6251ded7cdeb67171e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixvim": "nixvim"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726734507,
|
||||||
|
"narHash": "sha256-VUH5O5AcOSxb0uL/m34dDkxFKP6WLQ6y4I1B4+N3L2w=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "ee41a466c2255a3abe6bc50fc6be927cdee57a9f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
47
programs/nixvim/flake.nix
Normal file
47
programs/nixvim/flake.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
description = "A nixvim configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ nixvim, flake-parts, ... }@inputs:
|
||||||
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
|
||||||
|
perSystem =
|
||||||
|
{ pkgs, system, ... }:
|
||||||
|
let
|
||||||
|
nixvimLib = nixvim.lib.${system};
|
||||||
|
nixvim' = nixvim.legacyPackages.${system};
|
||||||
|
nixvimModule = {
|
||||||
|
inherit pkgs;
|
||||||
|
module = import ./config; # import the module directly
|
||||||
|
# You can use `extraSpecialArgs` to pass additional arguments to your module files
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit pkgs;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nvim = nixvim'.makeNixvimWithModule nixvimModule;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
checks = {
|
||||||
|
# Run `nix flake check .` to verify that your config is not broken
|
||||||
|
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
|
||||||
|
};
|
||||||
|
|
||||||
|
packages = {
|
||||||
|
# Lets you run `nix run .` to start nixvim
|
||||||
|
default = nvim;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
81
programs/pywal/flake.nix
Normal file
81
programs/pywal/flake.nix
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
description = "Pywal Config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
themecord = {
|
||||||
|
url = "github:danihek/themecord";
|
||||||
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
spicetify-nix = {
|
||||||
|
url = "github:Gerg-L/spicetify-nix";
|
||||||
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
spicetify-ext = {
|
||||||
|
url = "github:rxri/spicetify-extensions";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs-us.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs-us = import inputs.nixpkgs-us {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: let
|
||||||
|
pywalfox-wrapper = pkgs.writeShellScriptBin "pywalfox-wrapper" ''
|
||||||
|
${pkgs.pywalfox-native}/bin/pywalfox start
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.spicetify-nix.homeManagerModules.default
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.spicetify = let
|
||||||
|
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||||
|
in {
|
||||||
|
enable = true;
|
||||||
|
spotifyPackage = pkgs-us.spotify;
|
||||||
|
theme = spicePkgs.themes.default;
|
||||||
|
enabledExtensions = with spicePkgs.extensions; [
|
||||||
|
({
|
||||||
|
src = "${inputs.spicetify-ext}/adblock";
|
||||||
|
name = "adblock.js";
|
||||||
|
})
|
||||||
|
copyToClipboard
|
||||||
|
oneko
|
||||||
|
#randomBadToTheBoneRiff #this could be hilarious
|
||||||
|
];
|
||||||
|
enabledCustomApps = with spicePkgs.apps; [
|
||||||
|
ncsVisualizer
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
|
||||||
|
inputs.themecord.packages.${pkgs.system}.default
|
||||||
|
vesktop
|
||||||
|
|
||||||
|
pkgs-us.pywal16
|
||||||
|
pywalfox-native
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file.".mozilla/native-messaging-hosts/pywalfox.json".text = lib.replaceStrings [ "<path>" ] [
|
||||||
|
"${pywalfox-wrapper}/bin/pywalfox-wrapper"
|
||||||
|
]
|
||||||
|
(lib.readFile "${pkgs.pywalfox-native}/lib/python3.11/site-packages/pywalfox/assets/manifest.json");
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
23
programs/rofi/flake.nix
Normal file
23
programs/rofi/flake.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
description = "Rofi Config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }: {
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
programs.rofi = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.rofi-wayland;
|
||||||
|
|
||||||
|
cycle = true;
|
||||||
|
|
||||||
|
theme = "/home/nathan/.cache/wal/colors-rofi-dark.rasi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
18
programs/terminal/bat/bat.nix
Normal file
18
programs/terminal/bat/bat.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
programs.bat = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extraPackages = with pkgs.bat-extras; [
|
||||||
|
batman
|
||||||
|
batpipe
|
||||||
|
batgrep
|
||||||
|
batdiff
|
||||||
|
batwatch
|
||||||
|
prettybat
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
11
programs/terminal/bat/flake.nix
Normal file
11
programs/terminal/bat/flake.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
description = "bat config";
|
||||||
|
|
||||||
|
inputs = {};
|
||||||
|
|
||||||
|
outputs = { self, ... }: {
|
||||||
|
|
||||||
|
hmModule = import ./bat.nix;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
17
programs/terminal/eza/eza.nix
Normal file
17
programs/terminal/eza/eza.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
programs.eza = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
enableZshIntegration = true;
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
"--color=auto"
|
||||||
|
];
|
||||||
|
|
||||||
|
git = true;
|
||||||
|
|
||||||
|
icons = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
11
programs/terminal/eza/flake.nix
Normal file
11
programs/terminal/eza/flake.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
description = "eza config";
|
||||||
|
|
||||||
|
inputs = {};
|
||||||
|
|
||||||
|
outputs = { self, ... }: {
|
||||||
|
|
||||||
|
hmModule = import ./eza.nix;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
29
programs/terminal/flake.nix
Normal file
29
programs/terminal/flake.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
description = "terminal config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
eza.url = "./eza";
|
||||||
|
bat.url = "./bat";
|
||||||
|
fzf.url = "./fzf";
|
||||||
|
zoxide.url = "./zoxide";
|
||||||
|
kitty.url = "./kitty";
|
||||||
|
tmux.url = "./tmux";
|
||||||
|
zsh.url = "./zsh";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: {
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.eza.hmModule
|
||||||
|
inputs.bat.hmModule
|
||||||
|
inputs.fzf.hmModule
|
||||||
|
inputs.zoxide.hmModule
|
||||||
|
inputs.kitty.hmModule
|
||||||
|
inputs.tmux.hmModule
|
||||||
|
inputs.zsh.hmModule
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
11
programs/terminal/fzf/flake.nix
Normal file
11
programs/terminal/fzf/flake.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
description = "fzf config";
|
||||||
|
|
||||||
|
inputs = {};
|
||||||
|
|
||||||
|
outputs = { self, ... }: {
|
||||||
|
|
||||||
|
hmModule = import ./fzf.nix;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
15
programs/terminal/fzf/fzf.nix
Normal file
15
programs/terminal/fzf/fzf.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
programs.fzf = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
enableZshIntegration = true;
|
||||||
|
|
||||||
|
tmux = {
|
||||||
|
#enableShellIntegration = true;
|
||||||
|
|
||||||
|
#shellIntegrationOptions = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
programs/terminal/kitty/flake.nix
Normal file
13
programs/terminal/kitty/flake.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
description = "Kitty Config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }: {
|
||||||
|
|
||||||
|
hmModule = import ./kitty.nix;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
33
programs/terminal/kitty/kitty.nix
Normal file
33
programs/terminal/kitty/kitty.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
programs.kitty = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
font = {
|
||||||
|
name = "FiraCode Nerd Font";
|
||||||
|
size = 12;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
|
||||||
|
confirm_os_window_close 0
|
||||||
|
|
||||||
|
include ${config.home.homeDirectory}/.cache/wal/colors-kitty.conf
|
||||||
|
|
||||||
|
disable_ligatures never
|
||||||
|
|
||||||
|
dynamic_background_opacity yes
|
||||||
|
|
||||||
|
tab_bar_edge top
|
||||||
|
|
||||||
|
map ctrl+shift+t new_tab
|
||||||
|
map ctrl+shift+w close_tab
|
||||||
|
|
||||||
|
map ctrl+tab next_tab
|
||||||
|
map ctrl+shift+tab previous_tab
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
11
programs/terminal/tmux/flake.nix
Normal file
11
programs/terminal/tmux/flake.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
description = "Tmux config";
|
||||||
|
|
||||||
|
inputs = {};
|
||||||
|
|
||||||
|
outputs = { self, ... }: {
|
||||||
|
|
||||||
|
hmModule = import ./tmux.nix;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
23
programs/terminal/tmux/tmux.nix
Normal file
23
programs/terminal/tmux/tmux.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
programs.tmux = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
clock24 = true;
|
||||||
|
|
||||||
|
mouse = true;
|
||||||
|
|
||||||
|
baseIndex = 1;
|
||||||
|
|
||||||
|
keyMode = "vi";
|
||||||
|
|
||||||
|
prefix = "C-b";
|
||||||
|
|
||||||
|
shell = "${pkgs.zsh}/bin/zsh";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
11
programs/terminal/zoxide/flake.nix
Normal file
11
programs/terminal/zoxide/flake.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
description = "Zoxide config";
|
||||||
|
|
||||||
|
inputs = {};
|
||||||
|
|
||||||
|
outputs = { self, ... }: {
|
||||||
|
|
||||||
|
hmModule = import ./zoxide.nix;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
13
programs/terminal/zoxide/zoxide.nix
Normal file
13
programs/terminal/zoxide/zoxide.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
programs.zoxide = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
enableZshIntegration = true;
|
||||||
|
|
||||||
|
options = [
|
||||||
|
"--cmd cd"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
11
programs/terminal/zsh/flake.nix
Normal file
11
programs/terminal/zsh/flake.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
description = "zsh config";
|
||||||
|
|
||||||
|
inputs = {};
|
||||||
|
|
||||||
|
outputs = { self, ... }: {
|
||||||
|
|
||||||
|
hmModule = import ./zsh.nix;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
153
programs/terminal/zsh/zsh.nix
Normal file
153
programs/terminal/zsh/zsh.nix
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
oh-my-posh
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.zsh = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
enableCompletion = true;
|
||||||
|
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
ls = "eza";
|
||||||
|
ll = "ls -l";
|
||||||
|
|
||||||
|
ksh = "kitten ssh";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
history = {
|
||||||
|
size = 5000;
|
||||||
|
ignoreAllDups = true;
|
||||||
|
ignoreSpace = true;
|
||||||
|
share = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
initExtraFirst = ''
|
||||||
|
cat ${config.home.homeDirectory}/.cache/wal/sequences
|
||||||
|
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/wal/templates/ohmyposh.toml".text = ''
|
||||||
|
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
|
||||||
|
|
||||||
|
version = 2
|
||||||
|
final_space = true
|
||||||
|
console_title_template = '{{{{ .Shell }}}} in {{{{ .Folder }}}}'
|
||||||
|
|
||||||
|
[[blocks]]
|
||||||
|
type = 'prompt'
|
||||||
|
alignment = 'left'
|
||||||
|
newline = true
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'os'
|
||||||
|
style = 'diamond'
|
||||||
|
trailing_diamond = ''
|
||||||
|
background = 'p:c1'
|
||||||
|
foreground = 'p:c12'
|
||||||
|
template = ' {{{{ .Icon }}}} '
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'session'
|
||||||
|
style = 'diamond'
|
||||||
|
trailing_diamond = ''
|
||||||
|
background = 'p:c2'
|
||||||
|
foreground = 'p:c14'
|
||||||
|
template = '{{{{ .UserName }}}}@{{{{ .HostName }}}}'
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'path'
|
||||||
|
style = 'diamond'
|
||||||
|
trailing_diamond = ''
|
||||||
|
background = 'p:c4'
|
||||||
|
foreground = 'p:c13'
|
||||||
|
template = '{{{{ .Path }}}}'
|
||||||
|
|
||||||
|
[blocks.segments.properties]
|
||||||
|
style = 'full'
|
||||||
|
|
||||||
|
[[blocks]]
|
||||||
|
type = 'prompt'
|
||||||
|
overflow = 'hidden'
|
||||||
|
alignment = 'right'
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'executiontime'
|
||||||
|
style = 'diamond'
|
||||||
|
leading_diamond = ''
|
||||||
|
background = 'p:c4'
|
||||||
|
foreground = 'p:c13'
|
||||||
|
template = '{{{{ .FormattedMs }}}}'
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'time'
|
||||||
|
style = 'diamond'
|
||||||
|
leading_diamond = ''
|
||||||
|
background = 'p:c2'
|
||||||
|
foreground = 'p:c14'
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'shell'
|
||||||
|
style = 'diamond'
|
||||||
|
leading_diamond = ''
|
||||||
|
background = 'p:c1'
|
||||||
|
foreground = 'p:c12'
|
||||||
|
|
||||||
|
[[blocks]]
|
||||||
|
type = 'prompt'
|
||||||
|
alignment = 'left'
|
||||||
|
newline = true
|
||||||
|
|
||||||
|
[[blocks.segments]]
|
||||||
|
type = 'text'
|
||||||
|
style = 'plain'
|
||||||
|
background = 'transparent'
|
||||||
|
foreground_templates = [
|
||||||
|
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
|
||||||
|
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
|
||||||
|
]
|
||||||
|
template = "{{{{ if gt .Code 0 }}}}!❭ {{{{else}}}}❭ {{{{end}}}}"
|
||||||
|
|
||||||
|
[transient_prompt]
|
||||||
|
foreground_templates = [
|
||||||
|
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
|
||||||
|
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
|
||||||
|
]
|
||||||
|
background = 'transparent'
|
||||||
|
template = "{{{{ if gt .Code 0 }}}}!❭ {{{{else}}}}❭ {{{{end}}}}"
|
||||||
|
|
||||||
|
[secondary_prompt]
|
||||||
|
background = 'transparent'
|
||||||
|
forground = 'p:c14'
|
||||||
|
template = "❭❭ "
|
||||||
|
|
||||||
|
|
||||||
|
[palette]
|
||||||
|
|
||||||
|
c0 = "{color0}"
|
||||||
|
c1 = "{color1}"
|
||||||
|
c2 = "{color2}"
|
||||||
|
c3 = "{color3}"
|
||||||
|
c4 = "{color4}"
|
||||||
|
c5 = "{color5}"
|
||||||
|
c6 = "{color6}"
|
||||||
|
c7 = "{color7}"
|
||||||
|
c8 = "{color8}"
|
||||||
|
c9 = "{color9}"
|
||||||
|
c10 = "{color10}"
|
||||||
|
c11 = "{color11}"
|
||||||
|
c12 = "{color12}"
|
||||||
|
c13 = "{color13}"
|
||||||
|
c14 = "{color14}"
|
||||||
|
c15 = "{color15}"
|
||||||
|
'';
|
||||||
|
}
|
||||||
29
services/flake.nix
Normal file
29
services/flake.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
description = "Nathan user service config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
mpdris.url = "./mpdris";
|
||||||
|
|
||||||
|
ollama.url = "./ollama";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: {
|
||||||
|
|
||||||
|
module = { config, lib, pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.ollama.module
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.mpdris.hmModule
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
28
services/mpdris/flake.nix
Normal file
28
services/mpdris/flake.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
description = "mpdris config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: {
|
||||||
|
|
||||||
|
module = {}: {};
|
||||||
|
|
||||||
|
hmModule = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [];
|
||||||
|
|
||||||
|
services.mpdris2 = {
|
||||||
|
enable = true;
|
||||||
|
mpd.host = "127.0.0.1";
|
||||||
|
mpd.port = 6600;
|
||||||
|
package = pkgs.mpdris2;
|
||||||
|
mpd.musicDirectory = "/home/nathan/Music";
|
||||||
|
notifications = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
12
services/ollama/flake.nix
Normal file
12
services/ollama/flake.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
description = "ollama config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }: {
|
||||||
|
|
||||||
|
module = import ./ollama.nix;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
7
services/ollama/ollama.nix
Normal file
7
services/ollama/ollama.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
services.ollama = {
|
||||||
|
enable = true;
|
||||||
|
acceleration = "cuda";
|
||||||
|
};
|
||||||
|
}
|
||||||
297
system/configuration/configuration.nix
Normal file
297
system/configuration/configuration.nix
Normal file
@@ -0,0 +1,297 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
#graphics.enable = true;
|
||||||
|
|
||||||
|
opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
open = true;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
|
|
||||||
|
prime = {
|
||||||
|
# Make sure to use the correct Bus ID values for your system!
|
||||||
|
intelBusId = "PCI:0:2:0";
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
# WARNING: sync and offload are mutually exclusive.
|
||||||
|
# You can only pick one!!
|
||||||
|
#sync.enable = true;
|
||||||
|
offload = {
|
||||||
|
enable = true;
|
||||||
|
enableOffloadCmd = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
#enable bluetooth
|
||||||
|
bluetooth.enable = true;
|
||||||
|
|
||||||
|
pulseaudio.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
services.displayManager.enable = true;
|
||||||
|
|
||||||
|
services.avahi = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
ipv4 = true;
|
||||||
|
ipv6 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
wideArea = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#networking
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "laptop";
|
||||||
|
|
||||||
|
nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
|
||||||
|
|
||||||
|
networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# nix experimental features
|
||||||
|
nix.settings = {
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
substituters = ["https://hyprland.cachix.org"];
|
||||||
|
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
user = {
|
||||||
|
name = "blacknull";
|
||||||
|
email = "nathanblunkall5@gmail.com";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.shells = with pkgs; [ zsh ];
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
config.common.default = "*";
|
||||||
|
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
sound.enable = true;
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.pipewire;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
extraConfig.pipewire-pulse."92-low-latency" = {
|
||||||
|
context.modules = [
|
||||||
|
{
|
||||||
|
name = "libpipewire-module-protocol-pulse";
|
||||||
|
args = {
|
||||||
|
pulse.min.req = "32/48000";
|
||||||
|
pulse.default.req = "32/48000";
|
||||||
|
pulse.max.req = "32/48000";
|
||||||
|
pulse.min.quantum = "32/48000";
|
||||||
|
pulse.max.quantum = "32/48000";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
stream.properties = {
|
||||||
|
node.latency = "32/48000";
|
||||||
|
resample.quality = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
#jack.enable = true;
|
||||||
|
|
||||||
|
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||||
|
# no need to redefine it in your config for now)
|
||||||
|
wireplumber.enable = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
services.mpd = {
|
||||||
|
enable = true;
|
||||||
|
startWhenNeeded = true;
|
||||||
|
network.port = 6600;
|
||||||
|
network.listenAddress = "127.0.0.1";
|
||||||
|
user = "nathan";
|
||||||
|
musicDirectory = "/home/nathan/Music";
|
||||||
|
extraConfig = ''
|
||||||
|
audio_output {
|
||||||
|
type "pipewire"
|
||||||
|
name "Audio1"
|
||||||
|
}
|
||||||
|
audio_output {
|
||||||
|
type "fifo"
|
||||||
|
name "visualizer"
|
||||||
|
path "/tmp/mpd.fifo"
|
||||||
|
format "44100:16:1"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.mpd.environment = {
|
||||||
|
XDG_RUNTIME_DIR = "/run/user/1000";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
programs.adb.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.nathan = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Nathan";
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"adbusers"
|
||||||
|
#school?
|
||||||
|
"plugdev"
|
||||||
|
];
|
||||||
|
# packages supplied by home-manager
|
||||||
|
};
|
||||||
|
|
||||||
|
users.defaultUserShell = pkgs.zsh;
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
home-manager.backupFileExtension = ".backup";
|
||||||
|
home-manager.users = {
|
||||||
|
root = inputs.root.homeManagerModule;
|
||||||
|
# nathan = inputs.nathan.homeManagerModule;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.nh = {
|
||||||
|
enable = true;
|
||||||
|
flake = "/home/nathan/.nixos";
|
||||||
|
|
||||||
|
clean = {
|
||||||
|
enable = true;
|
||||||
|
dates = "weekly";
|
||||||
|
extraArgs = "--keep 5 --keep-since 3d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
|
# gstreamer
|
||||||
|
gst_all_1.gstreamer
|
||||||
|
gst_all_1.gst-plugins-base
|
||||||
|
gst_all_1.gst-plugins-good
|
||||||
|
gst_all_1.gst-plugins-bad
|
||||||
|
gst_all_1.gst-plugins-ugly
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerdfonts
|
||||||
|
];
|
||||||
|
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# programs.mtr.enable = true;
|
||||||
|
# programs.gnupg.agent = {
|
||||||
|
# enable = true;
|
||||||
|
# enableSSHSupport = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
#networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
#networking.firewall.enable = false;
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
}
|
||||||
39
system/configuration/hardware-configuration.nix
Normal file
39
system/configuration/hardware-configuration.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/78c0964d-c09e-4e31-8a73-eb719d79917a";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/AE5E-AC86";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
20
system/flake.nix
Executable file
20
system/flake.nix
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
description = "Unified System Configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
sddm.url = "./sddm";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, sddm, ... }@inputs: {
|
||||||
|
|
||||||
|
nixosModule = { config, lib, pkgs, inputs, ... }: {
|
||||||
|
imports = [
|
||||||
|
./configuration/configuration.nix
|
||||||
|
sddm.module
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
33
system/sddm/flake.nix
Normal file
33
system/sddm/flake.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
description = "sddm config";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
theme.url = "./themes/tokyo-night";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, ... }@inputs: {
|
||||||
|
|
||||||
|
module = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [];
|
||||||
|
|
||||||
|
qt.enable = true;
|
||||||
|
|
||||||
|
services.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
autoNumlock = true;
|
||||||
|
theme = "${inputs.theme.theme { inherit pkgs; }}";
|
||||||
|
enableHidpi = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
libsForQt5.qtsvg
|
||||||
|
libsForQt5.qtquickcontrols2
|
||||||
|
libsForQt5.qtgraphicaleffects
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
29
system/sddm/themes/sugar-dark/flake.nix
Normal file
29
system/sddm/themes/sugar-dark/flake.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
description = "Package Sugar Dark SDDM theme";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
repo = {
|
||||||
|
url = "github:MarianArlt/sddm-sugar-dark";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, repo, ... }: {
|
||||||
|
|
||||||
|
theme = { pkgs }: pkgs.stdenv.mkDerivation {
|
||||||
|
|
||||||
|
name = "sugar-dark";
|
||||||
|
|
||||||
|
src = repo;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -R $src/* $out/
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
29
system/sddm/themes/tokyo-night/flake.nix
Normal file
29
system/sddm/themes/tokyo-night/flake.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
description = "Package Tokyo Night SDDM theme";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
|
||||||
|
repo = {
|
||||||
|
url = "github:siddrs/tokyo-night-sddm";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, repo, ... }: {
|
||||||
|
|
||||||
|
theme = { pkgs }: pkgs.stdenv.mkDerivation {
|
||||||
|
|
||||||
|
name = "tokyo-night";
|
||||||
|
|
||||||
|
src = repo;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -R $src/* $out/
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user