diff --git a/files/keyboard.kbd b/files/keyboard.kbd new file mode 100644 index 0000000..0d3a65c --- /dev/null +++ b/files/keyboard.kbd @@ -0,0 +1,71 @@ +(defcfg + ;; For Linux + input (device-file "/dev/input/event0") + output (uinput-sink "My KMonad output") + fallthrough true + allow-cmd true +) + +(defsrc + esc mute vold volu prnt slck pause ins del home pgup + f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 end pgdn + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + tab q w e r t y u i o p [ ] ret + caps a s d f g h j k l ; ' \ + lsft 102d z x c v b n m , . / rsft + wkup lctl lmet lalt spc ralt cmps rctl back up fwd + left down rght +) +(deflayer base + caps mute vold volu prnt slck pause ins del home pgup + f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 end pgdn + $ + [ { \( & = \) } ] + ! | bspc + tab ; , . p y f g c r l / ] ret + esc @a @o @e @u i d @h @t @n @s - \ + lsft 102d ' q j k x b m w v z rsft + wkup lctl lmet @tab @spc @bspc ret rctl back up fwd + left down rght +) +(deflayer num + caps mute vold volu prnt slck pause ins del home pgup + f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 end pgdn + $ + [ { \( & = \) } ] + ! | bspc + tab ; 7 8 9 y f g c r l / ] ret + esc a 4 5 6 0 d h t n s - \ + lsft 102d ' 1 2 3 x b m w v z rsft + wkup lctl lmet tab spc bspc ret rctl back up fwd + left down rght +) +(deflayer symbol + caps mute vold volu prnt slck pause ins del home pgup + f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 end pgdn + $ + [ { \( & = \) } ] + ! | bspc + ~ * ! % @ ^ f g c r l / ] ret + $ + [ { \( = d h t n s - \ + # 102d ` ] } \) & b m w v z rsft + wkup lctl lmet tab spc bspc ret rctl back up fwd + left down rght +) +(deflayer arrow + caps mute vold volu prnt slck pause ins del home pgup + f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 end pgdn + $ + [ { \( & = \) } ] + ! | bspc + tab ; , . p y f g c r l / ] ret + esc @a @o @e @u i d @h @t @n @s - \ + lsft 102d ' q j k x b left down up right rsft + wkup lctl lmet tab @spc @bspc ret rctl back up fwd + left down rght +) +(defalias +a (tap-hold 200 a lalt) +o (tap-hold 200 o lmet) +e (tap-hold 200 e lsft) +u (tap-hold 200 u lctl) +h (tap-hold 200 h lctl) +t (tap-hold 200 t lsft) +n (tap-hold 200 n lmet) +s (tap-hold 200 s lalt) +spc (tap-hold 200 spc (layer-toggle num)) +bspc (tap-hold 200 bspc (layer-toggle symbol)) +tab (tap-hold 200 tab (layer-toggle arrow)) +) diff --git a/files/scripts/brightness-down.sh b/files/scripts/brightness-down.sh new file mode 100755 index 0000000..1f01021 --- /dev/null +++ b/files/scripts/brightness-down.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec brightnessctl set 5%- diff --git a/files/scripts/brightness-up.sh b/files/scripts/brightness-up.sh new file mode 100755 index 0000000..b01b496 --- /dev/null +++ b/files/scripts/brightness-up.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec brightnessctl set +5% diff --git a/files/scripts/gopass.sh b/files/scripts/gopass.sh new file mode 100755 index 0000000..9e27839 --- /dev/null +++ b/files/scripts/gopass.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +selection=$(gopass list -f | wmenu -p "Search:" -l 10) +if [ -n "$selection" ]; then + gopass show -c "$selection" +fi diff --git a/files/scripts/volume-down.sh b/files/scripts/volume-down.sh new file mode 100755 index 0000000..4b3dd55 --- /dev/null +++ b/files/scripts/volume-down.sh @@ -0,0 +1,5 @@ +#!/bin/sh +echo "Running volume-down.sh at $(date)" >> /tmp/dwl-script.log +echo "USER=$USER" >> /tmp/dwl-script.log +echo "PATH=$PATH" >> /tmp/dwl-script.log +exec pactl set-sink-volume @DEFAULT_SINK@ -5% diff --git a/files/scripts/volume-mute.sh b/files/scripts/volume-mute.sh new file mode 100755 index 0000000..cf4ecb2 --- /dev/null +++ b/files/scripts/volume-mute.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec pactl set-sink-mute @DEFAULT_SINK@ toggle diff --git a/files/scripts/volume-up.sh b/files/scripts/volume-up.sh new file mode 100755 index 0000000..75aaec2 --- /dev/null +++ b/files/scripts/volume-up.sh @@ -0,0 +1,5 @@ +#!/bin/sh +echo "Running volume-up.sh at $(date)" >> /tmp/dwl-script.log +echo "USER=$USER" >> /tmp/dwl-script.log +echo "PATH=$PATH" >> /tmp/dwl-script.log +exec pactl set-sink-volume @DEFAULT_SINK@ +5% diff --git a/flake.lock b/flake.lock index 316e409..e3bffa0 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "fabric-dwl": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1754939243, + "narHash": "sha256-5fHK2rNNiz1VHxv6ogUyOIlxGWQ0p8YaGYngjTJTFEs=", + "ref": "refs/heads/main", + "rev": "d54aabb31ae9697656862f7abeefccc0ef00b8ba", + "revCount": 1339, + "type": "git", + "url": "https://codeberg.org/FabricSoul/dwl" + }, + "original": { + "type": "git", + "url": "https://codeberg.org/FabricSoul/dwl" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -30,11 +48,11 @@ ] }, "locked": { - "lastModified": 1751413152, - "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", + "lastModified": 1754487366, + "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", + "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "type": "github" }, "original": { @@ -86,11 +104,11 @@ ] }, "locked": { - "lastModified": 1753294394, - "narHash": "sha256-1Dfgq09lHZ8AdYB2Deu/mYP1pMNpob8CgqT5Mzo44eI=", + "lastModified": 1754924470, + "narHash": "sha256-asI/or9AcUMydwzodCgpHGytnMSNUlciw3uaycpXm4E=", "owner": "nix-community", "repo": "home-manager", - "rev": "1fde6fb1be6cd5dc513dc1c287d69e4eb2de973e", + "rev": "67393957c27b4e4c6c48a60108a201413ced7800", "type": "github" }, "original": { @@ -100,27 +118,6 @@ "type": "github" } }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "zen-browser", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1752603129, - "narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "ixx": { "inputs": { "flake-utils": [ @@ -151,11 +148,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1753151930, - "narHash": "sha256-XSQy6wRKHhRe//iVY5lS/ZpI/Jn6crWI8fQzl647wCg=", + "lastModified": 1753694789, + "narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "dc9637876d0dcc8c9e5e22986b857632effeb727", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1754800730, + "narHash": "sha256-HfVZCXic9XLBgybP0318ym3cDnGwBs/+H5MgxFVYF4I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "83e677f31c84212343f4cc553bab85c2efcad60a", + "rev": "641d909c4a7538f1539da9240dedb1755c907e40", "type": "github" }, "original": { @@ -165,7 +178,7 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1710272261, "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", @@ -191,11 +204,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1752976861, - "narHash": "sha256-59HcrqHfbSJUdmpzrAa9x8fW1PoS+ZGhCjL5k5HbyV8=", + "lastModified": 1754921951, + "narHash": "sha256-KY+/livAp6l3fI8SdNa+CLN/AA4Z038yL/pQL2PaW7g=", "owner": "nix-community", "repo": "nixvim", - "rev": "0c50ed9349199219583cb1ed1a972d71e06039ec", + "rev": "7b53322d75a1c66f84fb145e4b5f0f411d9edc6b", "type": "github" }, "original": { @@ -215,11 +228,11 @@ ] }, "locked": { - "lastModified": 1749730855, - "narHash": "sha256-L3x2nSlFkXkM6tQPLJP3oCBMIsRifhIDPMQQdHO5xWo=", + "lastModified": 1754301638, + "narHash": "sha256-aRgzcPDd2axHFOuMlPLuzmDptUM2JU8mUL3jfgbBeyc=", "owner": "NuschtOS", "repo": "search", - "rev": "8dfe5879dd009ff4742b668d9c699bc4b9761742", + "rev": "a60091045273484c040a91f5c229ba298f8ecc27", "type": "github" }, "original": { @@ -232,7 +245,7 @@ "inputs": { "fenix": "fenix", "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "systems": "systems_4" }, "locked": { @@ -251,11 +264,11 @@ }, "root": { "inputs": { + "fabric-dwl": "fabric-dwl", "home-manager": "home-manager", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixvim": "nixvim", - "openapi-tui": "openapi-tui", - "zen-browser": "zen-browser" + "openapi-tui": "openapi-tui" } }, "rust-analyzer-src": { @@ -334,27 +347,6 @@ "repo": "default-linux", "type": "github" } - }, - "zen-browser": { - "inputs": { - "home-manager": "home-manager_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1753069499, - "narHash": "sha256-YtgY0ueqKNrBma4Euu8WH23BhUkBujirJDMDE1KujnU=", - "owner": "0xc000022070", - "repo": "zen-browser-flake", - "rev": "c64b94235ae24e3b9e01a08f0331d8bb0e5b037a", - "type": "github" - }, - "original": { - "owner": "0xc000022070", - "repo": "zen-browser-flake", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index b9ac030..a8dce29 100644 --- a/flake.nix +++ b/flake.nix @@ -17,11 +17,10 @@ openapi-tui = { url = "github:zaghaghi/openapi-tui"; }; - zen-browser = { - url = "github:0xc000022070/zen-browser-flake"; - # IMPORTANT: we're using "libgbm" and is only available in unstable so ensure - # to have it up-to-date or simply don't specify the nixpkgs input - inputs.nixpkgs.follows = "nixpkgs"; + + fabric-dwl = { + url = "git+https://codeberg.org/FabricSoul/dwl"; + flake = true; }; }; @@ -30,9 +29,9 @@ nixpkgs, # nvidiaPkgs, home-manager, - zen-browser, nixvim, openapi-tui, + fabric-dwl, ... }: let lib = nixpkgs.lib; @@ -46,6 +45,12 @@ # }; in { nixosConfigurations = { + solaris = lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/solaris/default.nix + ]; + }; tatara = lib.nixosSystem { system = "x86_64-linux"; modules = [ @@ -66,12 +71,16 @@ homeConfigurations.fabric = home-manager.lib.homeManagerConfiguration { inherit pkgs; extraSpecialArgs = { - inherit nixvim openapi-tui zen-browser; # deleted hyprpanel + inherit nixvim openapi-tui; }; modules = [ ./home/fabric/default.nix - nixvim.homeManagerModules.nixvim - # hyprpanel.homeManagerModules.hyprpanel + nixvim.homeModules.nixvim + ({pkgs, ...}: { + home.packages = [ + fabric-dwl.packages.${pkgs.system}.default + ]; + }) ]; }; }; diff --git a/home/fabric/default.nix b/home/fabric/default.nix index 5a1dd39..ca57b6c 100644 --- a/home/fabric/default.nix +++ b/home/fabric/default.nix @@ -1,6 +1,5 @@ { nixvim, - zen-browser, # hyprpanel, pkgs, pkgsUnstable, @@ -10,20 +9,25 @@ imports = [ # Import program configurations ./programs/git.nix - ./programs/kitty.nix + # ./programs/kitty.nix + ./programs/foot.nix ./programs/nixvim.nix ./programs/tmux.nix ./programs/zsh.nix ./programs/ssh.nix ./programs/yazi.nix + ./programs/neomutt.nix + ./programs/gpg.nix # Import desktop configurations ./desktop/hyprland.nix - ./desktop/hyprpanel.nix - ./desktop/hyprpaper.nix - ./desktop/hypridle.nix - ./desktop/desktop.nix - zen-browser.homeModules.beta + # ./desktop/hyprpanel.nix + # ./desktop/river.nix + # ./desktop/hyprpaper.nix + # ./desktop/hypridle.nix + # ./desktop/desktop.nix + ./desktop/waybar.nix + ./desktop/mako.nix ]; # Home Manager needs a bit of information about you and the paths it should manage @@ -41,102 +45,45 @@ nixpkgs.config = { allowUnfree = true; }; - programs.zen-browser.enable = true; # Common packages used across your system home.packages = with pkgs; [ git lazygit - kitty - firefox - zen-browser + # kitty + # firefox mpv grim slurp wlsunset newsraft ghostty + wlr-randr + wmenu + foot + qutebrowser + ffmpeg + android-tools + wbg + emacs + ripgrep + fd + lsd + brightnessctl + neomutt - nerd-fonts.dejavu-sans-mono - nerd-fonts.daddy-time-mono - nerd-fonts.d2coding - nerd-fonts.cousine - nerd-fonts.commit-mono - nerd-fonts.comic-shanns-mono - nerd-fonts.code-new-roman - nerd-fonts.caskaydia-mono - nerd-fonts.caskaydia-cove - nerd-fonts.blex-mono - nerd-fonts.bitstream-vera-sans-mono - nerd-fonts.bigblue-terminal - nerd-fonts.aurulent-sans-mono - nerd-fonts.arimo - nerd-fonts.anonymice - nerd-fonts.agave - nerd-fonts._3270 - nerd-fonts._0xproto - nerd-fonts.zed-mono - nerd-fonts.victor-mono - nerd-fonts.ubuntu-sans - nerd-fonts.ubuntu-mono - nerd-fonts.ubuntu - nerd-fonts.tinos - nerd-fonts.terminess-ttf - nerd-fonts.symbols-only - nerd-fonts.space-mono - nerd-fonts.shure-tech-mono - nerd-fonts.sauce-code-pro - nerd-fonts.roboto-mono - nerd-fonts.recursive-mono - nerd-fonts.proggy-clean-tt - nerd-fonts.profont - nerd-fonts.overpass - nerd-fonts.open-dyslexic - nerd-fonts.noto - nerd-fonts.mononoki - nerd-fonts.monoid - nerd-fonts.monofur - nerd-fonts.monaspace - nerd-fonts.meslo-lg - nerd-fonts.martian-mono - nerd-fonts.lilex - nerd-fonts.liberation - nerd-fonts.lekton - nerd-fonts.jetbrains-mono - nerd-fonts.iosevka-term-slab - nerd-fonts.iosevka-term - nerd-fonts.iosevka - nerd-fonts.intone-mono - nerd-fonts.inconsolata-lgc - nerd-fonts.inconsolata-go - nerd-fonts.inconsolata - nerd-fonts.im-writing - nerd-fonts.hurmit - nerd-fonts.heavy-data - nerd-fonts.hasklug - nerd-fonts.hack - nerd-fonts.gohufont - nerd-fonts.go-mono - nerd-fonts.geist-mono nerd-fonts.fira-mono - nerd-fonts.fira-code - nerd-fonts.fantasque-sans-mono - nerd-fonts.envy-code-r - nerd-fonts.droid-sans-mono - nerd-fonts.departure-mono - font-awesome wl-clipboard tmux - discord fzf zsh pavucontrol wofi - # hyprpanel alejandra rustup + zig tmuxPlugins.sensible tmuxPlugins.vim-tmux-navigator tmuxPlugins.onedark-theme @@ -145,13 +92,10 @@ go go-blueprint gccgo14 - hypridle dprint - code-cursor delve ldtk libresprite - gh btop leetgo gnumake @@ -164,23 +108,20 @@ zola unzip hugo - sass sshfs tree-sitter - heroic - gimp3 p7zip rar nodePackages.localtunnel typst - pnpm - nodejs_24 openssl psmisc air - pyfa - - google-chrome + w3m + gopass + pinentry + gnupg + dig ]; # Enable home-manager diff --git a/home/fabric/desktop/mako.nix b/home/fabric/desktop/mako.nix new file mode 100644 index 0000000..377f93c --- /dev/null +++ b/home/fabric/desktop/mako.nix @@ -0,0 +1,30 @@ +{...}: { + services.mako = { + enable = true; + settings = { + "actionable=true" = { + anchor = "top-left"; + }; + actions = true; + anchor = "top-right"; + background-color = "#393552"; + text-color = "#e0def4"; + border-color = "#56526e"; + border-radius = 0; + default-timeout = 10000; + # font = "monospace 10"; + height = 100; + icons = true; + ignore-timeout = false; + layer = "top"; + margin = 10; + markup = true; + width = 300; + }; + extraConfig = '' + progress-color=over #3e8fb0 + [urgency=high] + border-color=#eb6f92 + ''; + }; +} diff --git a/home/fabric/desktop/river.nix b/home/fabric/desktop/river.nix new file mode 100644 index 0000000..d9bbee5 --- /dev/null +++ b/home/fabric/desktop/river.nix @@ -0,0 +1,136 @@ +{...}: { + wayland.windowManager.river = { + enable = true; + extraConfig = '' + # This file is executed by river at startup + + # Set rivertile as the default layout generator + riverctl default-layout rivertile + # Start the rivertile layout generator process + rivertile -view-padding 0 -outer-padding 0 & + + # Set gaps similar to your Hyprland config + # Your config: gaps_out = "0, 440, 0, 440" (top, right, bottom, left) + # This command sets the padding around the edge of the layout area. + # rivertile has -outer-padding-top, -outer-padding-right, etc. + riverctl send-layout-cmd rivertile "outer-padding-right 440" + riverctl send-layout-cmd rivertile "outer-padding-left 440" + # Your config: gaps_in = 0 + riverctl send-layout-cmd rivertile "view-padding 0" + + # --- Autostart Applications (exec-once) --- + riverctl spawn "fcitx5" + riverctl spawn "wlsunset -l 43.6 -L -79.3" + + # --- Input Settings --- + # repeat_delay = 300; repeat_rate = 50; + riverctl set-repeat 50 300 + + # --- Variables --- + # River does not have shell-like variables in its config, + # so we define them here for clarity if this were a script. + # In this Nix string, we will just use the values directly. + # mainMod="Mod4" (Super key) + # terminal="kitty" + # browser="firefox" + # fileManager="dolphin" + # menu="wofi --show drun" + + # --- Key Mappings (bind) --- + # $mainMod, T, exec, $terminal + riverctl map normal Mod4 T spawn 'kitty' + + # $mainMod, B, exec, $browser + riverctl map normal Mod4 B spawn 'firefox' + + # $mainMod, S, exec, sh -c "grim -g '$(slurp -d)' - | wl-copy" + riverctl map normal Mod4 S spawn 'grim -g "$(slurp -d)" - | wl-copy' + + # $mainMod, Q, killactive + riverctl map normal Mod4 Q close + + # $mainMod, M, exit + riverctl map normal Mod4 M exit + + # $mainMod, E, exec, $fileManager + riverctl map normal Mod4 E spawn 'dolphin' + + # $mainMod, V, togglefloating + riverctl map normal Mod4 V toggle-float + + # $mainMod, SPACE, exec, $menu + riverctl map normal Mod4 Space spawn 'wofi --show drun' + + # --- Focus Movement --- + # $mainMod, H, movefocus, l + riverctl map normal Mod4 H focus-view left + # $mainMod, L, movefocus, r + riverctl map normal Mod4 L focus-view right + # $mainMod, K, movefocus, u + riverctl map normal Mod4 K focus-view up + # $mainMod, J, movefocus, d + riverctl map normal Mod4 J focus-view down + + # --- Switch Tags (Workspaces) --- + # Tags are a bitmask: tag 1 = 1, tag 2 = 2, tag 3 = 4, tag n = 1 << (n-1) + riverctl map normal Mod4 1 set-focused-tags 1 + riverctl map normal Mod4 2 set-focused-tags 2 + riverctl map normal Mod4 3 set-focused-tags 4 + riverctl map normal Mod4 4 set-focused-tags 8 + riverctl map normal Mod4 5 set-focused-tags 16 + riverctl map normal Mod4 6 set-focused-tags 32 + riverctl map normal Mod4 7 set-focused-tags 64 + riverctl map normal Mod4 8 set-focused-tags 128 + riverctl map normal Mod4 9 set-focused-tags 256 + riverctl map normal Mod4 0 set-focused-tags 512 + + # --- Move Window to Tag (movetoworkspace) --- + riverctl map normal Mod4+Shift 1 set-view-tags 1 + riverctl map normal Mod4+Shift 2 set-view-tags 2 + riverctl map normal Mod4+Shift 3 set-view-tags 4 + riverctl map normal Mod4+Shift 4 set-view-tags 8 + riverctl map normal Mod4+Shift 5 set-view-tags 16 + riverctl map normal Mod4+Shift 6 set-view-tags 32 + riverctl map normal Mod4+Shift 7 set-view-tags 64 + riverctl map normal Mod4+Shift 8 set-view-tags 128 + riverctl map normal Mod4+Shift 9 set-view-tags 256 + riverctl map normal Mod4+Shift 0 set-view-tags 512 + + # --- Mouse Bindings (bindm) --- + # Super + Left Mouse to move + riverctl map-pointer normal Mod4 BTN_LEFT move-view + # Super + Right Mouse to resize + riverctl map-pointer normal Mod4 BTN_RIGHT resize-view + + # --- Window Rules (windowrule) --- + # River uses app-id (for class) and title. Tags are set with a bitmask. + # workspace 1 silent,initialTitle:^EVE$ -> tags 1 + riverctl rule-add -title 'EVE' tags 1 + # tile, initialTitle:^EVE$ -> This is default, but we can be explicit with no-float + riverctl rule-add -title 'EVE' no-float + + # workspace 6 silent,class:^QQ$ -> tags 32 + riverctl rule-add -app-id 'QQ' tags 32 + + # float, title:^图片查看器$ + riverctl rule-add -title '图片查看器' float + + # workspace 6 silent,class:^(discord)$ -> tags 32 + riverctl rule-add -app-id 'discord' tags 32 + + # workspace 4 silent,class:^(kitty)$ -> tags 8 + riverctl rule-add -app-id 'kitty' tags 8 + + # workspace 5 silent,class:^(firefox)$ -> tags 16 + riverctl rule-add -app-id 'firefox' tags 16 + + # Note on Monitor config: + # River itself doesn't manage output resolutions and refresh rates. + # This should be handled by another utility like kanshi, or by manually + # running wlr-randr commands in your startup script. Your NixOS setup + # might already handle this through services.wayland.wdisplays.enable or similar. + riverctl spawn "wlr-randr --output DP-3 --mode 3440x1440@144Hz" + riverctl spawn "wlr-randr --output DP-5 --mode 3440x1440@144Hz" + ''; + }; +} diff --git a/home/fabric/desktop/waybar.nix b/home/fabric/desktop/waybar.nix new file mode 100644 index 0000000..e345e46 --- /dev/null +++ b/home/fabric/desktop/waybar.nix @@ -0,0 +1,125 @@ +{pkgs, ...}: { + programs.waybar = { + enable = true; + package = pkgs.waybar; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 24; + modules-left = ["custom/wmenu"]; + modules-right = ["cpu" "custom/cputemp" "temperature" "memory" "custom/gputemp" "battery" "network" "pulseaudio" "clock" "tray"]; + + temperature = { + format = "{temperature}°C"; + }; + + battery = { + format = "󰁹 {capacity}%"; + }; + + "custom/wmenu" = { + format = ""; + on-click = "wmenu"; + tooltip = false; + }; + + # "custom/fcitx" = { + # format = ""; # Nerd Font keyboard symbol + # tooltip = false; + # }; + + cpu = { + format = " CPU {usage}%"; + }; + + memory = { + format = " RAM {used}Gib"; + }; + + "custom/cputemp" = { + interval = 5; + exec = '' + # This script finds the line with "Tctl:" or "Package id 0:", + # prints the last field on that line (which is the temperature), + # and removes the extra characters. This is very reliable. + temp_str=$(sensors | grep -E 'Tctl:|Package id 0:' | awk '{print $NF}') + temp_val=$(echo "$temp_str" | tr -d '+°C') + + if [ -n "$temp_val" ]; then + printf '{"text": "%.0f°C", "tooltip": "CPU Temperature: %.0f°C"}' "$temp_val" "$temp_val" + else + echo '{"text": "N/A"}' + fi + ''; + "return-type" = "json"; + format = "{}"; # The {} will be replaced by the "text" field + }; + + "custom/gputemp" = { + exec = "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader"; + interval = 5; + format = "󰢮 GPU Temp {}°C"; + }; + + network = { + format-wifi = "󰤨 {signalStrength}%"; # nf-md-wifi + format-ethernet = "󰈀 Connected"; # nf-md-ethernet + format-disconnected = "󰤮 Disconnected"; # nf-md-wifi_off + tooltip-format = "{ifname} via {gwaddr} "; # nf-fa-server + on-click = "nm-connection-editor"; # Opens network manager on click + }; + + pulseaudio = { + format = "{icon} {volume}%"; + format-muted = "󰸈 Muted"; # Using a dedicated mute icon (nf-md-volume_mute) + format-icons = { + headphone = ""; + headset = ""; + # A specific icon for when the audio is muted + muted = "󰸈"; + # Icons for different volume levels (0-33%, 34-66%, 67-100%) + default = ["" "" ""]; # Low, Medium, High + }; + tooltip-format = "{desc} | {volume}%"; + on-click = "pavucontrol"; + on-click-middle = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; # Middle-click to mute/unmute + on-scroll-up = "pactl set-sink-volume @DEFAULT_SINK@ +5%"; + on-scroll-down = "pactl set-sink-volume @DEFAULT_SINK@ -5%"; + }; + + clock = { + format = "{:%H:%M}"; + tooltip-format = "{:%A, %B %d, %Y}"; + }; + + tray = { + spacing = 10; + }; + }; + }; + + style = '' + * { + font-family: monospace; + font-size: 12px; + padding: 0; + margin: 0; + } + window#waybar { + background: #232136; + color: #e0def4; + } + #custom-wmenu, #cpu, #memory, #custom-cputemp, #custom-gputemp, #clock, #pulseaudio, #network, #tray { + padding: 0 10px; + } + ''; + }; + + # Ensure dependencies for Waybar and temperature scripts + home.packages = with pkgs; [ + libappindicator-gtk3 # For systray support + lm_sensors # For CPU temperature + wmenu # Ensure wmenu is available + ]; +} diff --git a/home/fabric/programs/foot.nix b/home/fabric/programs/foot.nix new file mode 100644 index 0000000..43a3922 --- /dev/null +++ b/home/fabric/programs/foot.nix @@ -0,0 +1,51 @@ +{...}: { + programs.foot = { + enable = true; + settings = { + # This is the main section, equivalent to [main] in foot.ini + main = { + font = "FiraMono Nerd Font Mono:size=12"; + term = "foot"; + dpi-aware = "yes"; # Use "yes" or "no", or boolean true/false + }; + + # Set scrollback buffer size + scrollback = { + lines = 5000; + }; + + # Hide the mouse cursor when typing + mouse = { + hide-when-typing = "yes"; + }; + + # Color scheme (Catppuccin Macchiato from your kitty config) + # Equivalent to the [colors] section + colors = { + alpha = 0.80; # Set background opacity + background = "1E1E2E"; + foreground = "CDD6F4"; + + ## Normal/regular colors + regular0 = "45475A"; # black + regular1 = "F38BA8"; # red + regular2 = "A6E3A1"; # green + regular3 = "F9E2AF"; # yellow + regular4 = "89B4FA"; # blue + regular5 = "F5C2E7"; # magenta + regular6 = "94E2D5"; # cyan + regular7 = "BAC2DE"; # white + + ## Bright colors + bright0 = "585B70"; # bright black + bright1 = "F38BA8"; # bright red + bright2 = "A6E3A1"; # bright green + bright3 = "F9E2AF"; # bright yellow + bright4 = "89B4FA"; # bright blue + bright5 = "F5C2E7"; # bright magenta + bright6 = "94E2D5"; # bright cyan + bright7 = "A6ADC8"; # bright white + }; + }; + }; +} diff --git a/home/fabric/programs/gpg.nix b/home/fabric/programs/gpg.nix new file mode 100644 index 0000000..a35d7dc --- /dev/null +++ b/home/fabric/programs/gpg.nix @@ -0,0 +1,12 @@ +{...}: { + services.gpg-agent = { + enable = true; + enableZshIntegration = true; + extraConfig = '' + pinentry-program /home/fabric/.nix-profile/bin/pinentry-curses + allow-loopback-pinentry + default-cache-ttl 86400 + max-cache-ttl 31536000 + ''; + }; +} diff --git a/home/fabric/programs/neomutt.nix b/home/fabric/programs/neomutt.nix new file mode 100644 index 0000000..f6959fd --- /dev/null +++ b/home/fabric/programs/neomutt.nix @@ -0,0 +1,10 @@ +{pkgs, ...}: { + programs = { + neomutt = { + enable = true; + }; + }; + home.packages = with pkgs; [ + msmtp + ]; +} diff --git a/home/fabric/programs/nixvim.nix b/home/fabric/programs/nixvim.nix index cf76ffe..9ead0ba 100644 --- a/home/fabric/programs/nixvim.nix +++ b/home/fabric/programs/nixvim.nix @@ -7,7 +7,6 @@ update_in_insert = true; severity_sort = true; - # NOTE: Opt-in with 0.11 virtual_text = { enable = true; severity.min = "warn"; @@ -111,7 +110,9 @@ web-devicons.enable = true; nix.enable = true; bufferline.enable = false; - lualine.enable = true; + lualine = { + enable = false; + }; luasnip.enable = true; yanky = { enable = true; @@ -338,6 +339,7 @@ }; servers = { + clangd.enable = true; ts_ls.enable = true; eslint.enable = true; templ.enable = true; @@ -375,6 +377,9 @@ }; }; }; + elixirls = { + enable = true; + }; rust_analyzer = { enable = true; installCargo = true; @@ -389,6 +394,9 @@ }; }; }; + zls = { + enable = true; + }; }; }; cmp = { @@ -422,31 +430,56 @@ extraPlugins = [ ]; extraConfigLua = '' - vim.filetype.add({ - extension = { - ldtk = "json", - }, - }) - vim.lsp.inlay_hint.enable(true) - vim.filetype.add({ - extension = { - cob = "cobweb", - cobweb = "cobweb", - }, - }) - local parser_config = require "nvim-treesitter.parsers".get_parser_configs() - parser_config.cobweb = { - install_info = { - url = "~/tree-sitter-cobweb", -- local path or git repo - files = {"src/parser.c"}, - generate_requires_npm = false, - requires_generate_from_grammar = false, - }, - filetype = "cobweb", - } + vim.cmd [[ + highlight Normal guibg=none + highlight Normal ctermbg=none + highlight NonText guibg=none + highlight NonText ctermbg=none + highlight NormalFloat guibg=none + highlight NormalFloat ctermbg=none + highlight FloatBorder guibg=none + highlight FloatBorder ctermbg=none + highlight Pmenu guibg=none + highlight Pmenu ctermbg=none + highlight PmenuSel guibg=none + highlight PmenuSel ctermbg=none + highlight TelescopeNormal guibg=none + highlight TelescopeNormal ctermbg=none + highlight TelescopeBorder guibg=none + highlight TelescopeBorder ctermbg=none + highlight TermNormal guibg=none + highlight TermNormal ctermbg=none + highlight TermFloat guibg=none + highlight TermFloat ctermbg=none + highlight SignColumn guibg=none + ]] + + vim.filetype.add({ + extension = { + ldtk = "json", + }, + }) + vim.lsp.inlay_hint.enable(true) + vim.filetype.add({ + extension = { + cob = "cobweb", + cobweb = "cobweb", + }, + }) + local parser_config = require "nvim-treesitter.parsers".get_parser_configs() + parser_config.cobweb = { + install_info = { + url = "~/tree-sitter-cobweb", -- local path or git repo + files = {"src/parser.c"}, + generate_requires_npm = false, + requires_generate_from_grammar = false, + }, + filetype = "cobweb", + } ''; globals.mapleader = " "; opts = { + laststatus = 0; relativenumber = true; number = true; tabstop = 2; @@ -612,6 +645,11 @@ key = "p"; action = "\"_dP"; } + { + action = "LspStop"; + key = "ls"; + mode = ["n"]; + } ]; colorschemes.rose-pine.enable = true; }; diff --git a/home/fabric/programs/tmux.nix b/home/fabric/programs/tmux.nix index 8c13bbb..c2524e8 100644 --- a/home/fabric/programs/tmux.nix +++ b/home/fabric/programs/tmux.nix @@ -1,14 +1,9 @@ # home/fabric/programs/tmux.nix -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { programs.tmux = { enable = true; plugins = with pkgs.tmuxPlugins; [ sensible - onedark-theme vim-tmux-navigator ]; @@ -19,14 +14,46 @@ # Custom key bindings extraConfig = '' - # Set pane base index setw -g pane-base-index 1 + # Vi copy mode bindings bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy" bind-key P paste-buffer bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "wl-copy" + set-option -g status-position top + + set -g status-style 'fg=#CDD6F4,bg=default' + set -g status-justify centre # Center the window list + + # Remove anything from the left side + set -g status-left ' ' + + + # --- WINDOW LIST (CENTERED) --- + # Set the style for the active window + # We use a bright blue from your theme and make it bold + setw -g window-status-current-style 'fg=#89B4FA,bold' + # Format for the active window, using a Nerd Font icon + setw -g window-status-current-format '  #I-#W ' + + # Set the style for inactive windows + # We use a muted gray color from your theme + setw -g window-status-style 'fg=#585B70' + # Format for inactive windows, using a different Nerd Font icon + setw -g window-status-format '  #I-#W ' + + + # --- RIGHT SIDE --- + # Set the content for the right side of the status bar + # 󰒋 is a Nerd Font icon for a computer/host + # #H is the placeholder for the hostname + set -g status-right ' 󰒋 #H ' + # Set the max length for the right status bar + set -g status-right-length 40 + + ''; }; } diff --git a/home/fabric/programs/zsh.nix b/home/fabric/programs/zsh.nix index 1fc3d27..e33c0d2 100644 --- a/home/fabric/programs/zsh.nix +++ b/home/fabric/programs/zsh.nix @@ -22,6 +22,10 @@ export PATH="/home/fabric/.local/lib/bin:$PATH" export PATH=$PATH:(go env GOPATH)/bin export PATH="/home/fabric/.cargo/bin:$PATH" + export PATH="/home/fabric/.config/emacs/bin:$PATH" + export GPG_TTY=$(tty) + export GPG_AGENT_INFO= + export GPGPINENTRYMODE=loopback GOPATH=$HOME/go PATH=$PATH:/usr/local/go/bin:$GOPATH/bin PATH="$HOME/.govm/shim:$PATH" @@ -32,6 +36,9 @@ alias gmt="go mod tidy" alias gmi="go mod init" alias flake="nix flake" + alias ls="lsd" + alias ll="lsd -l" + alias emacs="emacs -nw" function y() { local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd yazi "$@" --cwd-file="$tmp" @@ -40,6 +47,7 @@ fi rm -f -- "$tmp" } + gpg --quiet --decrypt /home/fabric/.local/share/gopass/stores/root/websites/codeberg.org/FabricSoul.gpg >/dev/null ''; prezto = { tmux = { @@ -50,10 +58,206 @@ }; }; - oh-my-posh = { + starship = { enable = true; enableZshIntegration = true; - useTheme = "easy-term"; + settings = { + format = '' + $username$hostname$locali$shlvl$singularity$kubernetes$directory$vcsh$fossil_branch$fossil_metrics$git_branch$git_commit$git_state$git_metrics$git_status$hg_branch$pijul_channel$docker_context$package$c$cmake$cobol$daml$dart$deno$dotnet$elixir$elm$erlang$fennel$gleam$golang$guix_shell$haskell$haxe$helm$java$julia$kotlin$gradle$lua$nim$nodejs$ocaml$opa$perl$php$pulumi$purescript$python$quarto$raku$rlang$red$ruby$rust$scala$solidity$swift$terraform$typst$vlang$vagrant$zig$buf$nix_shell$conda$meson$spack$memory_usage$aws$gcloud$openstack$azure$nats$direnv$env_var$mise$crystal$custom$sudo$cmd_duration$line_break$jobs$battery$time$status$os$container$netns$shell$character + ''; + + aws = { + symbol = " "; + }; + buf = { + symbol = " "; + }; + bun = { + symbol = " "; + }; + c = { + symbol = " "; + }; + cpp = { + symbol = " "; + }; + cmake = { + symbol = " "; + }; + conda = { + symbol = " "; + }; + crystal = { + symbol = " "; + }; + dart = { + symbol = " "; + }; + deno = { + symbol = " "; + }; + directory = { + read_only = " 󰌾"; + }; + docker_context = { + symbol = " "; + }; + elixir = { + symbol = " "; + }; + elm = { + symbol = " "; + }; + fennel = { + symbol = " "; + }; + fossil_branch = { + symbol = " "; + }; + gcloud = { + symbol = " "; + }; + git_branch = { + symbol = " "; + }; + git_commit = { + tag_symbol = "  "; + }; + golang = { + symbol = " "; + }; + guix_shell = { + symbol = " "; + }; + haskell = { + symbol = " "; + }; + haxe = { + symbol = " "; + }; + hg_branch = { + symbol = " "; + }; + hostname = { + ssh_symbol = " "; + }; + java = { + symbol = " "; + }; + julia = { + symbol = " "; + }; + kotlin = { + symbol = " "; + }; + lua = { + symbol = " "; + }; + memory_usage = { + symbol = "󰍛 "; + }; + meson = { + symbol = "󰔷 "; + }; + nim = { + symbol = "󰆥 "; + }; + nix_shell = { + symbol = " "; + }; + nodejs = { + symbol = " "; + }; + ocaml = { + symbol = " "; + }; + os.symbols = { + Alpaquita = " "; + Alpine = " "; + AlmaLinux = " "; + Amazon = " "; + Android = " "; + Arch = " "; + Artix = " "; + CachyOS = " "; + CentOS = " "; + Debian = " "; + DragonFly = " "; + Emscripten = " "; + EndeavourOS = " "; + Fedora = " "; + FreeBSD = " "; + Garuda = "󰛓 "; + Gentoo = " "; + HardenedBSD = "󰞌 "; + Illumos = "󰈸 "; + Kali = " "; + Linux = " "; + Mabox = " "; + Macos = " "; + Manjaro = " "; + Mariner = " "; + MidnightBSD = " "; + Mint = " "; + NetBSD = " "; + NixOS = " "; + Nobara = " "; + OpenBSD = "󰈺 "; + openSUSE = " "; + OracleLinux = "󰌷 "; + Pop = " "; + Raspbian = " "; + Redhat = " "; + RedHatEnterprise = " "; + RockyLinux = " "; + Redox = "󰀘 "; + Solus = "󰠳 "; + SUSE = " "; + Ubuntu = " "; + Unknown = " "; + Void = " "; + Windows = "󰍲 "; + }; + package = { + symbol = "󰏗 "; + }; + perl = { + symbol = " "; + }; + php = { + symbol = " "; + }; + pijul_channel = { + symbol = " "; + }; + pixi = { + symbol = "󰏗 "; + }; + python = { + symbol = " "; + }; + rlang = { + symbol = "󰟔 "; + }; + ruby = { + symbol = " "; + }; + rust = { + symbol = "󱘗 "; + }; + scala = { + symbol = " "; + }; + swift = { + symbol = " "; + }; + zig = { + symbol = " "; + }; + gradle = { + symbol = " "; + }; + }; }; }; } diff --git a/hosts/common/global/default.nix b/hosts/common/global/default.nix index 5f99ed7..298c0d6 100644 --- a/hosts/common/global/default.nix +++ b/hosts/common/global/default.nix @@ -22,11 +22,12 @@ environment.systemPackages = with pkgs; [ vim git - greetd.greetd - greetd.tuigreet + greetd + tuigreet zsh home-manager findutils + pulseaudio ]; # Enable the OpenSSH daemon @@ -37,7 +38,7 @@ enable = true; settings = { default_session = { - command = "''${pkgs.greetd.tuigreet}/bin/tuigreet --time "; + command = "''${pkgs.tuigreet}/bin/tuigreet --time"; user = "fabric"; }; }; @@ -51,4 +52,12 @@ # This value determines the NixOS release version system.stateVersion = "25.05"; + + security.rtkit.enable = true; + services.pulseaudio.enable = false; + services.pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + }; } diff --git a/hosts/common/optional/auto-cpufreq.nix b/hosts/common/optional/auto-cpufreq.nix new file mode 100644 index 0000000..32d4695 --- /dev/null +++ b/hosts/common/optional/auto-cpufreq.nix @@ -0,0 +1,32 @@ +{...}: { + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 20; + + # Optional helps save long term battery health + START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge + STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging + }; + }; + # services.auto-cpufreq.enable = true; + # services.auto-cpufreq.settings = { + # battery = { + # governor = "powersave"; + # turbo = "never"; + # }; + # charger = { + # governor = "performance"; + # turbo = "auto"; + # }; + # }; +} diff --git a/hosts/common/optional/kmonad.nix b/hosts/common/optional/kmonad.nix new file mode 100644 index 0000000..c320609 --- /dev/null +++ b/hosts/common/optional/kmonad.nix @@ -0,0 +1,11 @@ +{...}: { + services.kmonad = { + enable = true; + keyboards = { + myKMonadOutput = { + device = "/dev/input/event0"; + config = builtins.readFile ../../../files/keyboard.kbd; + }; + }; + }; +} diff --git a/hosts/solaris/default.nix b/hosts/solaris/default.nix new file mode 100644 index 0000000..b842a86 --- /dev/null +++ b/hosts/solaris/default.nix @@ -0,0 +1,74 @@ +# hosts/solaris/default.nix +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + # Hardware configuration + ./hardware-configuration.nix + + # Common configurations + ../common/global + ../common/optional/fcitx5.nix + ../common/optional/bluetooth.nix + + ../common/optional/kmonad.nix + ../common/optional/auto-cpufreq.nix + ]; + + # Bootloader + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.supportedFilesystems = ["nfs"]; + + # Networking + networking = { + hostName = "solaris"; + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + }; + + # User configuration + users.users.fabric = { + isNormalUser = true; + description = "fabric"; + extraGroups = ["networkmanager" "wheel" "video"]; + shell = pkgs.zsh; + }; + + services.rpcbind.enable = true; + + fileSystems."/home/fabric/nas" = { + device = "tatara:/nas"; + fsType = "nfs"; + options = [ + "x-systemd.automount" + "noauto" + "x-systemd.idle-timeout=60" + "x-systemd.device-timeout=5" + "x-systemd.mount-timeout=5" + "nfsvers=4" # Use NFSv4 + "hard" # Hard mount (recommended) + "intr" # Allow interruption + "rsize=8192" # Read size + "wsize=8192" # Write size + ]; + }; + + # Display manager configuration + services.displayManager.defaultSession = "dwl"; + + # Basic system packages + environment.systemPackages = with pkgs; [ + libinput + libnotify + foot + usbutils + ntfs3g + powertop + ]; + + powerManagement.powertop.enable = true; +} diff --git a/hosts/solaris/hardware-configuration.nix b/hosts/solaris/hardware-configuration.nix new file mode 100644 index 0000000..a39645b --- /dev/null +++ b/hosts/solaris/hardware-configuration.nix @@ -0,0 +1,45 @@ +# 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" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["acpi_cpufreq"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/cd452eaf-7765-4bc2-b5dd-a846c47701e8"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/6026-C63E"; + fsType = "vfat"; + options = ["fmask=0077" "dmask=0077"]; + }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/1cc175bd-0071-4d76-a8a6-ae483ca56aac";} + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/zion/default.nix b/hosts/zion/default.nix index 15c9d6c..6f4c535 100644 --- a/hosts/zion/default.nix +++ b/hosts/zion/default.nix @@ -10,12 +10,12 @@ ./hardware-configuration.nix # Common configurations - ../common/optional/plasma.nix + # ../common/optional/plasma.nix ../common/global ../common/optional/nvidia.nix ../common/optional/docker.nix ../common/optional/steam.nix - ../common/optional/flatpak.nix + # ../common/optional/flatpak.nix ../common/optional/fcitx5.nix ../common/optional/bluetooth.nix ../common/optional/sunshine.nix @@ -37,7 +37,7 @@ users.users.fabric = { isNormalUser = true; description = "fabric"; - extraGroups = ["networkmanager" "wheel" "docker"]; + extraGroups = ["networkmanager" "wheel" "docker" "video"]; shell = pkgs.zsh; }; @@ -68,9 +68,7 @@ }; # Display manager configuration - services.displayManager.defaultSession = "hyprland"; - - programs.hyprland.enable = true; + services.displayManager.defaultSession = "dwl"; # Basic system packages environment.systemPackages = with pkgs; [ diff --git a/hosts/zion/hardware-configuration.nix b/hosts/zion/hardware-configuration.nix index add8519..5ed5034 100644 --- a/hosts/zion/hardware-configuration.nix +++ b/hosts/zion/hardware-configuration.nix @@ -14,7 +14,11 @@ boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "thunderbolt" "usb_storage" "usbhid" "sd_mod"]; boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; + boot.kernelModules = ["kvm-amd" "v4l2loopback"]; + + boot.extraModulePackages = with config.boot.kernelPackages; [ + v4l2loopback + ]; hardware.enableRedistributableFirmware = true;