This commit is contained in:
iofq 2024-08-10 02:17:24 -05:00
parent a897205c77
commit 0d9458d7cf
10 changed files with 112 additions and 110 deletions

6
flake.lock generated
View file

@ -326,11 +326,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723272683, "lastModified": 1723274093,
"narHash": "sha256-a/12MxX9f49zkjTEo0RayjvUuwB+l6kApmuQklZ0ip8=", "narHash": "sha256-vCVVcRHRvSTlOMfA8yupoMrO91JVIvdsSpA1fvlOxtw=",
"owner": "iofq", "owner": "iofq",
"repo": "nvim.nix", "repo": "nvim.nix",
"rev": "adef2193d6fcae7b1e5678ea46cf466e5cad5456", "rev": "b25deb86c142b675351a34c37add06cef9b25b2b",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -2,17 +2,17 @@
description = "Home Manager && NixOS configuration"; description = "Home Manager && NixOS configuration";
inputs = { inputs = {
nix-index-database.url = "github:nix-community/nix-index-database"; nix-index-database.url = "github:nix-community/nix-index-database";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/24.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
tfa.url = "github:iofq/2fa"; tfa.url = "github:iofq/2fa";
treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nvim = { nvim = {
url = "github:iofq/nvim.nix"; url = "github:iofq/nvim.nix";
@ -37,9 +37,9 @@
steam = pkgs.writeShellScriptBin "steam" '' steam = pkgs.writeShellScriptBin "steam" ''
flatpak run com.valvesoftware.Steam -pipewire "$@" flatpak run com.valvesoftware.Steam -pipewire "$@"
''; '';
inherit (inputs.nvim.packages.${final.system}) full;
inherit (inputs.tfa.packages.${final.system}) twofa; inherit (inputs.tfa.packages.${final.system}) twofa;
}) })
inputs.nvim.overlays.default
]; ];
}; };
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});

View file

@ -1,5 +1,6 @@
{...}: { {...}: {
imports = [ imports = [
./shell ./shell
./nvim
]; ];
} }

View file

@ -1,5 +1,5 @@
{pkgs, ...}: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
neovim nvim-pkg
]; ];
} }

View file

@ -10,6 +10,7 @@
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
tree tree
eza
]; ];
}; };
programs.bash = { programs.bash = {
@ -21,11 +22,10 @@
"exit" "exit"
]; ];
shellAliases = { shellAliases = {
la = "ls -lahrt --color=auto"; la = "eza -lahrt";
ll = "la"; ll = "la";
":q" = "exit"; ":q" = "exit";
mpv = "mpv --no-keepaspect-window"; mpv = "mpv --no-keepaspect-window";
sus = "systemctl suspend";
hms = "home-manager switch --flake $NIX_FLAKE#${host.username}"; hms = "home-manager switch --flake $NIX_FLAKE#${host.username}";
rbs = "sudo nixos-rebuild switch --flake $NIX_FLAKE#${host.hostName}"; rbs = "sudo nixos-rebuild switch --flake $NIX_FLAKE#${host.hostName}";
update = "nix flake update $NIX_FLAKE && rbs && hms"; update = "nix flake update $NIX_FLAKE && rbs && hms";
@ -69,7 +69,7 @@
bind '"\C-k": previous-history' bind '"\C-k": previous-history'
bind '"\C-j": next-history' bind '"\C-j": next-history'
function cd { function cd {
cmd="ls --color=auto" cmd="eza"
builtin cd "$@" && $cmd builtin cd "$@" && $cmd
} }
exists "kubectl" && source <(kubectl completion bash) exists "kubectl" && source <(kubectl completion bash)

View file

@ -27,31 +27,46 @@ _: {
style = "Block"; style = "Block";
unfocused_hollow = true; unfocused_hollow = true;
}; };
# https://github.com/EdenEast/nightfox.nvim/blob/main/extra/terafox/alacritty.toml
colors = { colors = {
draw_bold_text_with_bright_colors = true; draw_bold_text_with_bright_colors = true;
primary = { primary = {
background = "#090410"; background = "#152528";
foreground = "#bababd"; foreground = "#e6eaea";
};
cursor = {
text = "#e6eaea";
cursor = "#cbd9d8";
}; };
normal = { normal = {
black = "#090410"; black = "#2f3239";
red = "#b02f30"; red = "#e85c51";
green = "#037538"; green = "#7aa4a1";
yellow = "#c59820"; yellow = "#fda47f";
blue = "#2e528c"; blue = "#5a93aa";
magenta = "#764783"; magenta = "#ad5c7c";
cyan = "#277c8a"; cyan = "#a1cdd8";
white = "#bababd"; white = "#ebebeb";
}; };
bright = { bright = {
black = "#95A5A6"; black = "#4e5157";
red = "#b02f30"; red = "#eb746b";
green = "#00853e"; green = "#8eb2af";
yellow = "#c59820"; yellow = "#fdb292";
blue = "#2e528c"; blue = "#73a3b7";
magenta = "#764783"; magenta = "#b97490";
cyan = "#277c8a"; cyan = "#afd4de";
white = "#ECF0F1"; white = "#eeeeee";
};
dim = {
black = "#282a30";
red = "#c54e45";
green = "#688b89";
yellow = "#d78b6c";
blue = "#4d7d90";
magenta = "#934e69";
cyan = "#89aeb8";
white = "#c8c8c8";
}; };
vi_mode_cursor = { vi_mode_cursor = {
text = "CellBackground"; text = "CellBackground";

View file

@ -1,8 +1,11 @@
{pkgs, ...}: { {
pkgs,
config,
...
}: {
imports = [ imports = [
./librewolf ./librewolf
./alacritty ./alacritty
./sway
./hyprland ./hyprland
./xdg ./xdg
./audio ./audio
@ -14,6 +17,9 @@
gammastep gammastep
sway-contrib.grimshot sway-contrib.grimshot
]; ];
home.sessionVariables = {
MOZ_DBUS_REMOTE = 1;
};
programs.bemenu = { programs.bemenu = {
enable = true; enable = true;
settings = { settings = {
@ -22,4 +28,36 @@
prompt = "open"; prompt = "open";
}; };
}; };
services.gammastep = {
enable = true;
dawnTime = "6:00-8:00";
duskTime = "20:00-22:00";
latitude = 43.0;
longitude = -89.0;
temperature.day = 6000;
temperature.night = 3500;
};
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
color = "#152528";
daemonize = true;
clock = true;
ignore-empty-password = true;
};
};
services.swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
{
event = "lock";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
];
};
} }

View file

@ -33,7 +33,7 @@
]; ];
}; };
master = { master = {
new_is_master = "no"; new_status = "slave";
no_gaps_when_only = 1; no_gaps_when_only = 1;
}; };
input = { input = {
@ -113,7 +113,7 @@
10) 10)
); );
windowrulev2 = [ windowrulev2 = [
"workspace 9, class:^(WebCord|webcord|Webcord)$" "workspace 9, class:^(Discord|discord)$"
"workspace 9, class:^(Signal|signal)$" "workspace 9, class:^(Signal|signal)$"
"tile, class:^(Minecraft|minecraft)$" "tile, class:^(Minecraft|minecraft)$"
"opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$" "opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$"
@ -124,6 +124,15 @@
]; ];
}; };
}; };
services.hyprpaper = {
enable = true;
settings = {
preload = ["/home/pape"];
wallpaper = ",/home/pape";
ipc = "off";
splash = false;
};
};
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;
@ -200,7 +209,7 @@
} }
window#waybar { window#waybar {
background: #090410; background: #152528;
color: #bababd; color: #bababd;
} }
@ -215,7 +224,7 @@
margin: 2px; margin: 2px;
padding-left: 8px; padding-left: 8px;
padding-right: 8px; padding-right: 8px;
background-color: #090410; background-color: #152528;
} }
button { button {
@ -230,12 +239,12 @@
#workspaces button { #workspaces button {
padding: 0 4px; padding: 0 4px;
background-color: #090410; background-color: #152528;
color: #666666; color: #666666;
} }
#workspaces button.active { #workspaces button.active {
background-color: #090410; background-color: #152528;
color:#bababd; color:#bababd;
border-top: 2px solid #bababd; border-top: 2px solid #bababd;
} }
@ -254,7 +263,7 @@
#tray #tray
{ {
padding: 2px; padding: 2px;
background-color: #090410; background-color: #152528;
border-top: 2px solid #666666; border-top: 2px solid #666666;
color: #bababd; color: #bababd;
} }
@ -287,7 +296,7 @@
} }
label:focus { label:focus {
background-color: #090410; background-color: #152528;
} }
#temperature.critical { #temperature.critical {

View file

@ -10,7 +10,6 @@
home.sessionVariables = { home.sessionVariables = {
# needed for Sway and Firefox to play nice # needed for Sway and Firefox to play nice
XDG_CURRENT_DESKTOP = "sway"; XDG_CURRENT_DESKTOP = "sway";
MOZ_DBUS_REMOTE = 1;
}; };
systemd.user.services.autotiling = { systemd.user.services.autotiling = {
Install = { Install = {
@ -23,15 +22,6 @@
RestartSec = 5; RestartSec = 5;
}; };
}; };
services.gammastep = {
enable = true;
dawnTime = "6:00-8:00";
duskTime = "20:00-22:00";
latitude = 43.0;
longitude = -89.0;
temperature.day = 6000;
temperature.night = 3500;
};
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
@ -199,64 +189,4 @@
}; };
}; };
}; };
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
color = "#764783";
daemonize = true;
clock = true;
ignore-empty-password = true;
};
};
services.swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
{
event = "lock";
command = "${config.programs.swaylock.package}/bin/swaylock";
}
];
};
services.kanshi = {
enable = true;
profiles = {
nodock = {
outputs = [
{
criteria = "eDP-1";
}
];
};
dock = {
outputs = [
{
criteria = "HDMI-A-1";
status = "enable";
mode = "1920x1080@60Hz";
position = "0,0";
}
];
};
bothdock = {
outputs = [
{
criteria = "eDP-1";
status = "enable";
position = "0,1080";
}
{
criteria = "HDMI-A-1";
status = "enable";
mode = "1920x1080@60Hz";
position = "0,0";
}
];
};
};
};
} }

View file

@ -29,6 +29,7 @@ in {
# Networking # Networking
networking = { networking = {
hostId = "1185c58e"; hostId = "1185c58e";
nameservers = ["1.1.1.1#one.one.one.one"];
networkmanager = { networkmanager = {
enable = true; enable = true;
dns = "systemd-resolved"; dns = "systemd-resolved";
@ -108,6 +109,13 @@ in {
}; };
}; };
# workaround for wait-online killing nixos build
systemd.services.NetworkManager-wait-online = {
serviceConfig = {
ExecStart = ["" "${pkgs.networkmanager}/bin/nm-online -q"];
};
};
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
setLdLibraryPath = true; setLdLibraryPath = true;
@ -116,6 +124,7 @@ in {
pkgs.libGL pkgs.libGL
]; ];
}; };
# Set a sane system-wide default font # Set a sane system-wide default font
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["UbuntuMono"];}) (nerdfonts.override {fonts = ["UbuntuMono"];})