summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-08-29 15:35:30 -0700
committerFuwn <[email protected]>2024-08-29 15:35:30 -0700
commitfa16bf82075a2cc58e605017d0217ec5eff5ff77 (patch)
tree5eeed79ba692ac58beacbe97502b7ff7d57d1c12
parenthi (diff)
downloadnixos-config-fa16bf82075a2cc58e605017d0217ec5eff5ff77.tar.xz
nixos-config-fa16bf82075a2cc58e605017d0217ec5eff5ff77.zip
hi
-rw-r--r--home/ebisu/home.nix13
-rw-r--r--home/ebisu/meta/desktop/wayland/hyprland/hyprlock.nix21
-rw-r--r--home/ebisu/meta/system/default.nix2
-rw-r--r--home/ebisu/meta/system/shell/fish/default.nix11
-rw-r--r--home/ebisu/meta/system/variables.nix5
-rw-r--r--home/ebisu/meta/system/xdg.nix9
-rw-r--r--justfile2
-rw-r--r--modules/boot/default.nix58
-rw-r--r--modules/environment/system-packages.nix1
-rw-r--r--modules/services/default.nix1
10 files changed, 104 insertions, 19 deletions
diff --git a/home/ebisu/home.nix b/home/ebisu/home.nix
index 1c73aa2..a136bbd 100644
--- a/home/ebisu/home.nix
+++ b/home/ebisu/home.nix
@@ -6,18 +6,12 @@
...
}:
{
+ imports = [ ./meta ];
+
home = {
username = "ebisu";
homeDirectory = "/home/ebisu";
-
- # This value determines the Home Manager release that your configuration is
- # compatible with. This helps avoid breakage when a new Home Manager release
- # introduces backwards incompatible changes.
- #
- # You should not change this value, even if you update Home Manager. If you do
- # want to update the value, then make sure to first check the Home Manager
- # release notes.
- stateVersion = "24.05"; # Please read the comment before changing.
+ stateVersion = "24.05";
packages = [
# # It is sometimes useful to fine-tune packages, for example, by applying
@@ -42,7 +36,6 @@
};
programs.home-manager.enable = true;
- imports = [ ./meta ];
nixpkgs.overlays = [ inputs.nur.overlay ];
nixpkgs = {
diff --git a/home/ebisu/meta/desktop/wayland/hyprland/hyprlock.nix b/home/ebisu/meta/desktop/wayland/hyprland/hyprlock.nix
index 2577702..51dddd9 100644
--- a/home/ebisu/meta/desktop/wayland/hyprland/hyprlock.nix
+++ b/home/ebisu/meta/desktop/wayland/hyprland/hyprlock.nix
@@ -1,4 +1,4 @@
-{ config, ... }:
+{ pkgs, config, ... }:
let
colourScheme = builtins.fromJSON (
builtins.readFile "${config.home.homeDirectory}/.cache/wal/colors.json"
@@ -9,6 +9,21 @@ in
programs.hyprlock = {
enable = true;
+ # https://github.com/hyprwm/hyprlock/issues/128#issuecomment-2063629880
+ package = pkgs.hyprlock.overrideAttrs (old: {
+ version = "git";
+ src = pkgs.fetchFromGitHub {
+ owner = "hyprwm";
+ repo = "hyprlock";
+ rev = "2bce52f";
+ sha256 = "36qa6MOhCBd39YPC0FgapwGRHZXjstw8BQuKdFzwQ4k=";
+ };
+ patchPhase = ''
+ substituteInPlace src/core/hyprlock.cpp \
+ --replace "5000" "16"
+ '';
+ });
+
settings = {
general = {
disable_loading_bar = false;
@@ -17,7 +32,9 @@ in
grace = 10;
};
- background = [ { path = "${config.home.homeDirectory}/.local/share/bg"; } ];
+ background = [
+ { path = "${config.home.homeDirectory}/nixos-config/home/${config.home.username}/wallpaper.png"; }
+ ];
input-field = [
{
diff --git a/home/ebisu/meta/system/default.nix b/home/ebisu/meta/system/default.nix
index 1110382..c8ae875 100644
--- a/home/ebisu/meta/system/default.nix
+++ b/home/ebisu/meta/system/default.nix
@@ -9,11 +9,11 @@
./terminal
./virtualisation
./variables.nix
+ ./xdg.nix
];
home.packages = with pkgs; [
# bpftrace
- xdg-utils
libsForQt5.ksshaskpass
];
diff --git a/home/ebisu/meta/system/shell/fish/default.nix b/home/ebisu/meta/system/shell/fish/default.nix
index 2d8590e..94270e7 100644
--- a/home/ebisu/meta/system/shell/fish/default.nix
+++ b/home/ebisu/meta/system/shell/fish/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ pkgs, config, ... }:
{
programs.fish = {
enable = true;
@@ -18,6 +18,14 @@
function vpn
env BIND_INTERFACE=wgpia0 LD_PRELOAD=/usr/lib/bindToInterface.so $argv
end
+
+ function nh
+ if test "$argv[1]" = "home" -a "$argv[2]" = "switch"
+ command nh $argv -- --impure
+ else
+ command nh $argv
+ end
+ end
end
set -l config_home (set -q XDG_CONFIG_HOME; and echo $XDG_CONFIG_HOME; or echo $HOME/.config)
@@ -103,6 +111,7 @@
wdic = "wdic --homophones --kanji --color --pager";
hakuneko = "hakuneko-desktop --no-sandbox";
fastfetch = "clear && /usr/bin/env fastfetch";
+ wget = "wget --hsts-file=${config.xdg.dataHome}/wget-hsts";
# Modern Alternatives & Alias Rewrites
sxiv = "nsxiv";
diff --git a/home/ebisu/meta/system/variables.nix b/home/ebisu/meta/system/variables.nix
index f562292..40964e0 100644
--- a/home/ebisu/meta/system/variables.nix
+++ b/home/ebisu/meta/system/variables.nix
@@ -12,6 +12,11 @@
BROWSER = "zen";
# Home directory clean-up
+ # https://github.com/NixOS/nixpkgs/issues/224525#issuecomment-1945290961
+ XDG_DATA_HOME = "${config.xdg.dataHome}";
+ XDG_CONFIG_HOME = "${config.xdg.configHome}";
+ XDG_STATE_HOME = "${config.xdg.stateHome}";
+ XDG_CACHE_HOME = "${config.xdg.cacheHome}";
NOTMUCH_CONFIG = "${config.xdg.configHome}/notmuch-config";
# GTK2_RC_FILES = "${config.xdg.configHome}/gtk-2.0/gtkrc-2.0";
WGETRC = "${config.xdg.configHome}/wget/wgetrc";
diff --git a/home/ebisu/meta/system/xdg.nix b/home/ebisu/meta/system/xdg.nix
new file mode 100644
index 0000000..dde487b
--- /dev/null
+++ b/home/ebisu/meta/system/xdg.nix
@@ -0,0 +1,9 @@
+{ pkgs, ... }:
+{
+ home.packages = with pkgs; [
+ xdg-utils
+ xdg-ninja
+ ];
+
+ xdg.enable = true;
+}
diff --git a/justfile b/justfile
index 005b107..8ad31b0 100644
--- a/justfile
+++ b/justfile
@@ -5,4 +5,4 @@ host hostname='kansai':
doas nixos-rebuild switch --flake .#{{hostname}}
home user='ebisu':
- home-manager switch --flake .#{{user}} --impure \ No newline at end of file
+ home-manager switch --flake .#{{user}} --impure
diff --git a/modules/boot/default.nix b/modules/boot/default.nix
index 4f37c41..d0f5852 100644
--- a/modules/boot/default.nix
+++ b/modules/boot/default.nix
@@ -1,12 +1,62 @@
-{ pkgs, ... }:
+{ pkgs, config, ... }:
+let
+ configurationLimit = 10;
+in
{
boot = {
loader = {
- systemd-boot.enable = true;
- efi.canTouchEfiVariables = true;
+ timeout = 5;
+
+ efi = {
+ canTouchEfiVariables = true;
+ efiSysMountPoint = "/boot";
+ };
+
+ systemd-boot = {
+ enable = false;
+ editor = true;
+ consoleMode = "max";
+ memtest86.enable = true;
+ netbootxyz.enable = true;
+ configurationLimit = configurationLimit;
+ };
+
+ grub = {
+ enable = true;
+ device = "nodev";
+ efiSupport = true;
+ useOSProber = true;
+ configurationLimit = configurationLimit;
+ memtest86.enable = true;
+ gfxmodeEfi = "1920x1080";
+ gfxmodeBios = "1920x1080";
+ splashMode = "normal";
+
+ extraEntries = ''
+ menuentry "Arch Linux (linux-clear)" {
+ linux /vmlinuz-linux-clear
+ initrd /amd-ucode.img
+ initrd /booster-linux-clear.img
+ options root=PARTUUID=f510f35d-76a0-4469-aad5-da449541ecd2 rootflags=subvol=@ rw rootfstype=btrfs psi=1 nvidia_drm.modeset=1
+ }
+ '';
+
+ theme = pkgs.fetchFromGitHub {
+ owner = "Lxtharia";
+ repo = "minegrub-theme";
+ rev = "193b3a7c3d432f8c6af10adfb465b781091f56b3";
+ sha256 = "1bvkfmjzbk7pfisvmyw5gjmcqj9dab7gwd5nmvi8gs4vk72bl2ap";
+ };
+ };
};
kernelPackages = pkgs.linuxPackages_zen;
- kernelParams = [ "nvidia-drm.fbdev=1" ];
+ kernelModules = [ "v4l2loopback" ];
+ extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
+
+ kernelParams = [
+ "nvidia-drm.fbdev=1"
+ "nvidia.NVreg_PreserveVideoMemoryAllocations=1"
+ ];
};
}
diff --git a/modules/environment/system-packages.nix b/modules/environment/system-packages.nix
index 2432ba7..6f480d7 100644
--- a/modules/environment/system-packages.nix
+++ b/modules/environment/system-packages.nix
@@ -8,5 +8,6 @@
gtk3
gtk4
mediastreamer-openh264
+ usbutils
];
}
diff --git a/modules/services/default.nix b/modules/services/default.nix
index 48de7b2..1caaa15 100644
--- a/modules/services/default.nix
+++ b/modules/services/default.nix
@@ -11,5 +11,6 @@
# printing.enable = true;
gnome.gnome-keyring.enable = true;
fstrim.enable = true;
+ gvfs.enable = true;
};
}