diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index c4eed5f..7ed0bdd 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -9,18 +9,15 @@ self.nixosModules.desktop self.nixosModules.system ./hardware-conf.nix - ./users.nix ./programs.nix ./stylix.nix + ./users.nix ]; + desktop = { niri.enable = true; plasma.enable = true; }; - services.logind = { - lidSwitch = "ignore"; - powerKey = "suspend"; - }; nix.settings.experimental-features = ["nix-command" "flakes"]; system.stateVersion = "unstable"; @@ -28,13 +25,14 @@ time.timeZone = "Europe/Kyiv"; locale.ukrainian.enable = true; - networking.hostName = "dunamis"; - networking.networkmanager.enable = true; - - # required for syncthing - networking.firewall = { - allowedTCPPorts = [22000]; - allowedUDPPorts = [21027 22000]; + networking = { + networkmanager.enable = true; + hostName = "dunamis"; + # required for syncthing + firewall = { + allowedTCPPorts = [22000]; + allowedUDPPorts = [21027 22000]; + }; }; boot = { diff --git a/hosts/dunamis/hardware-conf.nix b/hosts/dunamis/hardware-conf.nix index 2e73177..b819ee0 100644 --- a/hosts/dunamis/hardware-conf.nix +++ b/hosts/dunamis/hardware-conf.nix @@ -11,21 +11,24 @@ wireless.bluetooth.enable = true; - boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"]; - boot.initrd.kernelModules = [ - "i915" - ]; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; - boot.initrd.systemd.enable = true; - hardware.graphics = { - enable = true; - extraPackages = with pkgs; [ - vpl-gpu-rt - ]; + services.logind = { + lidSwitch = "ignore"; + powerKey = "suspend"; + }; + + boot = { + kernelModules = ["kvm-amd"]; + extraModulePackages = []; + initrd = { + luks.devices."luks-fe586da4-b164-4362-bcdf-9c5dd6c69a2b".device = "/dev/disk/by-uuid/fe586da4-b164-4362-bcdf-9c5dd6c69a2b"; + availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"]; + kernelModules = [ + "i915" + ]; + systemd.enable = true; + }; }; - boot.initrd.luks.devices."luks-fe586da4-b164-4362-bcdf-9c5dd6c69a2b".device = "/dev/disk/by-uuid/fe586da4-b164-4362-bcdf-9c5dd6c69a2b"; fileSystems = { "/" = { device = "/dev/disk/by-uuid/79ce18b8-3a9e-4cd0-be62-60972686f44a"; @@ -51,6 +54,13 @@ swapDevices = []; + hardware.graphics = { + enable = true; + extraPackages = with pkgs; [ + vpl-gpu-rt + ]; + }; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/dunamis/users/user/home-configuration.nix b/hosts/dunamis/users/user/home-configuration.nix index 9ab0c91..5172d22 100644 --- a/hosts/dunamis/users/user/home-configuration.nix +++ b/hosts/dunamis/users/user/home-configuration.nix @@ -5,12 +5,11 @@ ./programs.nix ./flatpak.nix ]; + desktop.niri.enable = true; home = { stateVersion = "25.05"; sessionPath = [ "$HOME/.local/bin" ]; }; - desktop.niri.enable = true; - # stylix.image = "${config.xdg.userDirs.pictures}/wallpapers/wallhaven-2evrxy.png"; } diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index fa1c9d8..a307e00 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -9,18 +9,13 @@ self.nixosModules.desktop self.nixosModules.system ./hardware-conf.nix - ./users.nix ./programs.nix ./stylix.nix + ./users.nix ]; + desktop = { hyprland.enable = true; - # niri.enable = true; - # plasma.enable = true; - }; - services.logind = { - lidSwitch = "ignore"; - powerKey = "suspend"; }; nix.settings.experimental-features = ["nix-command" "flakes"]; @@ -29,13 +24,14 @@ time.timeZone = "Europe/Kyiv"; locale.ukrainian.enable = true; - networking.hostName = "vylxae"; - networking.networkmanager.enable = true; - - # required for syncthing - networking.firewall = { - allowedTCPPorts = [22000]; - allowedUDPPorts = [21027 22000]; + networking = { + networkmanager.enable = true; + hostName = "vylxae"; + # required for syncthing + firewall = { + allowedTCPPorts = [22000]; + allowedUDPPorts = [21027 22000]; + }; }; boot = { @@ -57,10 +53,8 @@ services = { power-profiles-daemon.enable = true; - hardware.openrgb.enable = true; flatpak.enable = true; fstrim.enable = true; - fwupd.enable = true; openssh.enable = true; }; services.scx = { diff --git a/hosts/sarien/hardware-conf.nix b/hosts/sarien/hardware-conf.nix index 9aa83b8..5029b02 100644 --- a/hosts/sarien/hardware-conf.nix +++ b/hosts/sarien/hardware-conf.nix @@ -17,56 +17,57 @@ bluetooth.enable = true; }; - boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" "rtsx_pci_sdmmc"]; - boot.initrd.kernelModules = ["i915"]; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; - boot.kernelParams = [ - "i915.enable_guc=2" - "i915.enable_fbc=1" - "i915.enable_psr=2" - ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; - fsType = "btrfs"; - options = ["subvol=@nixos,compress=zstd"]; + services.logind = { + lidSwitch = "ignore"; + powerKey = "suspend"; }; - boot.initrd.luks.devices."luks-149371a0-a41f-4c43-8935-cb199508c66a".device = "/dev/disk/by-uuid/149371a0-a41f-4c43-8935-cb199508c66a"; - - fileSystems."/home" = { - device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; - fsType = "btrfs"; - options = ["subvol=home,compress=zstd"]; + boot = { + kernelModules = ["kvm-intel"]; + extraModulePackages = []; + kernelParams = [ + "i915.enable_guc=2" + "i915.enable_fbc=1" + "i915.enable_psr=2" + ]; + initrd = { + luks.devices."luks-149371a0-a41f-4c43-8935-cb199508c66a".device = "/dev/disk/by-uuid/149371a0-a41f-4c43-8935-cb199508c66a"; + availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" "rtsx_pci_sdmmc"]; + kernelModules = ["i915"]; + }; }; - fileSystems."/storage" = { - device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; - fsType = "btrfs"; - options = ["subvol=@storage,compress=zstd"]; - }; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; + fsType = "btrfs"; + options = ["subvol=@nixos,compress=zstd"]; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/F195-F7C0"; - fsType = "vfat"; - options = ["umask=0077"]; + "/home" = { + device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; + fsType = "btrfs"; + options = ["subvol=home,compress=zstd"]; + }; + + "/storage" = { + device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf"; + fsType = "btrfs"; + options = ["subvol=@storage,compress=zstd"]; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/F195-F7C0"; + fsType = "vfat"; + options = ["umask=0077"]; + }; }; 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..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s20f0u1u2.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - # hardware.intelgpu.vaapiDriver = "intel-media-driver"; services.udev.extraHwdb = '' evdev:input:b0011v0001p0001eAB83* diff --git a/hosts/sarien/stylix.nix b/hosts/sarien/stylix.nix index 7371105..6704708 100644 --- a/hosts/sarien/stylix.nix +++ b/hosts/sarien/stylix.nix @@ -16,10 +16,10 @@ cursor = { package = pkgs.bibata-cursors; name = "Bibata-Modern-Ice"; - size = 32; + size = 24; }; image = ../../wallpapers/wallhaven-p966oj.jpg; - opacity.terminal = 0.9; + opacity.terminal = 0.7; fonts = { sizes = { applications = 14; diff --git a/hosts/sarien/users/user/home-configuration.nix b/hosts/sarien/users/user/home-configuration.nix index 83fccc0..0811d9d 100644 --- a/hosts/sarien/users/user/home-configuration.nix +++ b/hosts/sarien/users/user/home-configuration.nix @@ -5,12 +5,11 @@ ./programs.nix ./flatpak.nix ]; + desktop.hyprland.enable = true; home = { stateVersion = "25.05"; sessionPath = [ "$HOME/.local/bin" ]; }; - desktop.hyprland.enable = true; - # stylix.image = "${config.xdg.userDirs.pictures}/wallpapers/wallhaven-2evrxy.png"; } diff --git a/modules/home/desktop/hyprland/default.nix b/modules/home/desktop/hyprland/default.nix index ea7f0cd..1b59a8a 100644 --- a/modules/home/desktop/hyprland/default.nix +++ b/modules/home/desktop/hyprland/default.nix @@ -18,6 +18,12 @@ in { config = lib.mkIf cfg.enable { wayland.windowManager.hyprland = { enable = true; + systemd = { + enable = true; + variables = [ + "--all" + ]; + }; package = pkgs.hyprland; plugins = with pkgs.hyprlandPlugins; [ hyprexpo @@ -52,14 +58,11 @@ in { xwayland.force_zero_scaling = true; monitor = [ ", preferred, auto, 1" - # "desc:AOC 27V2G5 0x0000026C, highrr, -1920x0, 1" # , bitdepth, 10" "desc:AOC 27V2G5 0x0000026C, addreserved, 0, 300, 0, 0" - # "HDMI-A-1, addreserved, 0, 300, 0, 0" "desc:Samsung Electric Company S24R65x H4TMA03291, preferred, 0x0, 1, bitdepth, 10, vrr, 1" "desc:Philips Consumer Electronics Company 27M2N5500 UK02418033254, 2560x1440@180.00Hz, 0x0, 1.3333333, bitdepth, 10, vrr, 1" "desc:BOE 0x08E8, preferred, 1920x0, 1.2, bitdepth, 10" - # "desc:Samsung Electric Company S24R65x H4TMA03291, preferred, 0x0, 1, bitdepth, 10" - "desc:BOE 0x08E8, preferred, 1920x0, 1.2" + "desc:LG Display 0x068B, preferred, 1920x0, 1.2, bitdepth, 10" "desc:Chimei Innolux Corporation 0x1406, preferred, 1920x0, 1.2" ]; env = [ @@ -410,24 +413,14 @@ in { }; }; - services.playerctld.enable = true; services.gnome-keyring = { enable = true; components = ["secrets" "ssh"]; }; - services.ssh-agent.enable = true; - programs.keychain = { - enable = false; - keys = ["id_ed25519"]; - enableNushellIntegration = true; - extraFlags = [ - "--quiet" - "--noask" - ]; - }; services = { network-manager-applet.enable = true; blueman-applet.enable = true; + playerctld.enable = true; copyq.enable = true; }; gtk = { diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 68db3ed..57795b9 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -1,7 +1,6 @@ { osConfig, config, - inputs, pkgs, lib, ... @@ -19,7 +18,6 @@ in { hyprlock.enable = false; }; services = { - ssh-agent.enable = true; playerctld.enable = true; network-manager-applet.enable = true; copyq.enable = true; @@ -1278,16 +1276,6 @@ in { }; programs.wpaperd.enable = true; - programs.keychain = { - enable = true; - keys = ["gitea-local"]; - enableNushellIntegration = true; - extraFlags = [ - "--quiet" - "--noask" - ]; - }; - home.packages = with pkgs; [ niri nautilus diff --git a/modules/home/programs/shell/nushell.nix b/modules/home/programs/shell/nushell.nix index 73ad8f5..1a26856 100644 --- a/modules/home/programs/shell/nushell.nix +++ b/modules/home/programs/shell/nushell.nix @@ -12,89 +12,101 @@ in { mkEnableOption "enable nushell"; }; config = mkIf cfg.enable { - programs.oh-my-posh.enableNushellIntegration = true; - programs.zoxide = { - enable = true; - enableNushellIntegration = true; - }; - programs.carapace = { - enable = true; - enableNushellIntegration = true; - }; - programs.atuin = { - enable = true; - enableNushellIntegration = true; - flags = [ - "--disable-up-arrow" - ]; - }; - programs.nushell = { - enable = true; - environmentVariables = { - CARAPACE_BRIDGES = "zsh,fish,bash,inshellisense"; - CARAPACE_MATCH = 1; - EDITOR = "hx"; + programs = { + atuin = { + enable = true; + enableNushellIntegration = true; + flags = [ + "--disable-up-arrow" + ]; }; - shellAliases = { - cd = "z"; - cat = "bat"; - l = "ls -l"; - nix-shell = "nix-shell --command nu"; + carapace = { + enable = true; + enableNushellIntegration = true; }; - extraConfig = '' - $env.config = { - show_banner: false - shell_integration: { - # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title - osc2: true - # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory - osc7: true - # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8 - osc8: true - # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal - osc9_9: false - # osc133 is several escapes invented by Final Term which include the supported ones below. - # 133;A - Mark prompt start - # 133;B - Mark prompt end - # 133;C - Mark pre-execution - # 133;D;exit - Mark execution finished with exit code - # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is - osc133: true - # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features - # 633;A - Mark prompt start - # 633;B - Mark prompt end - # 633;C - Mark pre-execution - # 633;D;exit - Mark execution finished with exit code - # 633;E - Explicitly set the command line with an optional nonce - # 633;P;Cwd= - Mark the current working directory and communicate it to the terminal - # and also helps with the run recent menu in vscode - osc633: true - # reset_application_mode is escape \x1b[?1l and was added to help ssh work better - reset_application_mode: true - } + zoxide = { + enable = true; + enableNushellIntegration = true; + }; + oh-my-posh.enableNushellIntegration = true; + keychain = { + enable = true; + keys = ["id_ed25519"]; + enableNushellIntegration = true; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + nushell = { + enable = true; + environmentVariables = { + CARAPACE_BRIDGES = "zsh,fish,bash,inshellisense"; + CARAPACE_MATCH = 1; + EDITOR = "hx"; + }; + shellAliases = { + cd = "z"; + cat = "bat"; + la = "ls -a"; + l = "ls -la"; + nix-shell = "nix-shell --command nu"; + }; + extraConfig = '' + $env.config = { + show_banner: false + shell_integration: { + # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title + osc2: true + # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory + osc7: true + # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8 + osc8: true + # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal + osc9_9: false + # osc133 is several escapes invented by Final Term which include the supported ones below. + # 133;A - Mark prompt start + # 133;B - Mark prompt end + # 133;C - Mark pre-execution + # 133;D;exit - Mark execution finished with exit code + # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is + osc133: true + # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features + # 633;A - Mark prompt start + # 633;B - Mark prompt end + # 633;C - Mark pre-execution + # 633;D;exit - Mark execution finished with exit code + # 633;E - Explicitly set the command line with an optional nonce + # 633;P;Cwd= - Mark the current working directory and communicate it to the terminal + # and also helps with the run recent menu in vscode + osc633: true + # reset_application_mode is escape \x1b[?1l and was added to help ssh work better + reset_application_mode: true + } - ls: { - use_ls_colors: true - clickable_links: true - } + ls: { + use_ls_colors: true + clickable_links: true + } - rm: { - always_trash: true - } - edit_mode: 'vi' - completions: { - case_sensitive: false - quick: true - partial: true - algorithm: "fuzzy" - external: { - enable: true - # max_results: 100 - # completer: $carapace_completer # check 'carapace_completer' + rm: { + always_trash: true + } + edit_mode: 'vi' + completions: { + case_sensitive: false + quick: true + partial: true + algorithm: "fuzzy" + external: { + enable: true + # max_results: 100 + # completer: $carapace_completer # check 'carapace_completer' + } } } - } - ''; + ''; + }; }; }; } diff --git a/modules/nixos/desktop/common/pipewire.nix b/modules/nixos/desktop/common/pipewire.nix index e5fdaec..4b32b64 100644 --- a/modules/nixos/desktop/common/pipewire.nix +++ b/modules/nixos/desktop/common/pipewire.nix @@ -6,11 +6,11 @@ alsa.enable = true; pulse.enable = true; extraConfig.pipewire."92-low-latency" = { - context.properties = { - default.clock.rate = 48000; - default.clock.quantum = 32; - default.clock.min-quantum = 32; - default.clock.max-quantum = 32; + context.properties.default.clock = { + rate = 48000; + quantum = 32; + min-quantum = 32; + max-quantum = 32; }; }; };