Skip to content

Commit

Permalink
flake/home: use haumea
Browse files Browse the repository at this point in the history
  • Loading branch information
ocfox committed Apr 22, 2023
1 parent dd179aa commit 188d6d3
Show file tree
Hide file tree
Showing 44 changed files with 716 additions and 796 deletions.
57 changes: 39 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "ocfox's nixos-config";
description = "ocfox's flake";

outputs =
{ self
Expand Down Expand Up @@ -33,6 +33,10 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
grub2-themes.url = "github:vinceliuice/grub2-themes";
nur.url = "github:nix-community/NUR";
haumea = {
url = "github:nix-community/haumea";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down
16 changes: 16 additions & 0 deletions home/gtk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ pkgs }:
{
enable = true;
theme = {
package = pkgs.materia-theme;
name = "Materia";
};
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
gtk3.extraConfig = {
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
};
}
12 changes: 12 additions & 0 deletions home/home/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ pkgs }:
{
pointerCursor = {
size = 24;
gtk.enable = true;
x11.enable = true;
package = pkgs.apple-cursor;
name = "macOS-Monterey";
};

stateVersion = "23.05";
}
91 changes: 91 additions & 0 deletions home/home/packages.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{ pkgs }:
with pkgs;
[
nil
nixpkgs-fmt
texlab

bitwarden
waybar
foot
wl-clipboard
swayidle
showmethekey
gh
nixpkgs-review

lolcat
tree
element-desktop
qbittorrent
tdesktop

firefox-wayland
qutebrowser

# factorio-experimental

ncspot
sptlrx
playerctl
cava
vlc
wf-recorder

nur.repos.linyinfeng.wemeet
nur.repos.linyinfeng.icalingua-plus-plus
nur.repos.xddxdd.qq

texlive.combined.scheme-medium

(
pkgs.writeShellScriptBin "record-status" ''
#!/usr/bin/env bash
pid=`pgrep wf-recorder`
status=$?
if [ $status != 0 ]
then
echo '';
else
echo '';
fi;
''
)

(
pkgs.writeShellScriptBin "screen-recorder-toggle" ''
#!/usr/bin/env bash
pid=`${pkgs.procps}/bin/pgrep wf-recorder`
status=$?
if [ $status != 0 ]
then
${lib.getExe pkgs.wf-recorder} -g "$(${lib.getExe pkgs.slurp})" -f $HOME/Videos/record/$(date +'recording_%Y-%m-%d-%H%M%S.mp4');
else
${pkgs.procps}/bin/pkill --signal SIGINT wf-recorder
fi;
''
)

(
pkgs.writeShellScriptBin "power-menu" ''
#!/usr/bin/env bash
options="shutdown\nreboot\nsuspend\nexit sway"
selection="$(${pkgs.coreutils}/bin/echo -e $options | \
${lib.getExe pkgs.bemenu} -i -l 4 -c -W 0.3)"
case $selection in
shutdown) ${pkgs.systemd}/bin/systemctl poweroff
exit 0
;;
reboot) ${pkgs.systemd}/bin/systemctl reboot
exit 0
;;
suspend) ${pkgs.systemd}/bin/systemctl suspend
exit 0
;;
esac''
)
]
49 changes: 49 additions & 0 deletions home/programs/alacritty.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{ ... }:
{
enable = true;
settings = {
window = {
opacity = 0.8;
};
font = {
normal = {
family = "JetBrainsMono Nerd Font";
style = "Regular";
};
size = 16.5;
};

colors = {
primary = {
background = "0x2b3339";
foreground = "0xd8caac";
};

normal = {
black = "0x090618";
red = "0xc34043";
green = "0x76946a";
yellow = "0xc0a36e";
blue = "0x7e9cd8";
magenta = "0x957fb8";
cyan = "0x6a9589";
white = "0xc8c093";
};
bright = {
black = "0x727169";
red = "0xe82424";
green = "0x98bb6c";
yellow = "0xe6c384";
blue = "0x7fb4ca";
magenta = "0x938aa9";
cyan = "0x7aa89f";
white = "0xdcd7ba";
};

selection = {
background = "0x2d4f67";
foreground = "0xc8c093";
};
};
};
}
26 changes: 26 additions & 0 deletions home/programs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ pkgs }:
{
chromium = {
enable = true;
commandLineArgs = [ "--enable-features=UseOzonePlatform" "-ozone-platform=wayland" "--gtk-version=4" ];
};
exa = {
enable = true;
enableAliases = true;
};
direnv = {
enable = true;
nix-direnv.enable = true;
};

home-manager.enable = true;

obs-studio = {
enable = true;
plugins = with pkgs; [ obs-studio-plugins.wlrobs ];
};

bash.enable = true;

man.enable = true;
}
49 changes: 49 additions & 0 deletions home/programs/fish.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{ pkgs
, ...
}: {
enable = true;
shellAliases = {
vinix = "vim ~/nixos";
};

plugins = [
{
name = "tide";
src = pkgs.fishPlugins.tide.src;
}
{
name = "forgit";
src = pkgs.fishPlugins.forgit.src;
}
];

interactiveShellInit = ''
if test (id --user $USER) = 1000 && test (tty) = "/dev/tty1"
exec Hyprland
end
'';

functions = {
fish_greeting = "w";

rebuild = ''
if test (uname) = "Linux"
set os "nixos"
else
set os "darwin"
end
$os-rebuild switch --use-remote-sudo --flake $HOME/nixos#$hostname
'';

post = ''curl -F "c=@$argv" https://pastb.in'';

poststd = ''curl -F "c=@-" https://pastb.in'';

ns = ''nix shell nixpkgs#{ $argv }'';


haskellEnv = ''
nix-shell -p haskell-language-server "haskellPackages.ghcWithPackages (pkgs: with pkgs; [ $argv ])"
'';
};
}
Loading

0 comments on commit 188d6d3

Please sign in to comment.