Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { config, pkgs, lib, ... }:
- let
- home-manager = builtins.fetchTarball
- "https://github.com/nix-community/home-manager/archive/master.tar.gz";
- user = "YourUserName";
- extraUserGroups = [ "networkmanager" "wheel" "audio" "jackaudio" ];
- hostname = "YourHostName";
- gitUser = "YourGitUsername";
- email = "YourGitEmail";
- timezone = "YourRegion/YourCity";
- defaultLocale = "en_US.UTF-8";
- bookmarks = [
- "file:///home/${user}/Downloads"
- ];
- cursorTheme = {
- name = "Bibata-Modern-TokyoNight";
- package = pkgs.nur.repos.ataraxiasjel.bibata-cursors-tokyonight;
- };
- cursorSize = "24";
- gtk-theme = {
- name = "Tokyonight-Dark-BL";
- package = pkgs.tokyo-night-gtk;
- };
- iconTheme = {
- name = "Adwaita";
- package = pkgs.gnome.adwaita-icon-theme;
- };
- font = {
- name = "JetBrainsMono Nerd Font";
- package = pkgs.nerdfonts;
- };
- patched_waybar = pkgs.waybar.overrideAttrs (oldAttrs: {
- mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
- });
- in {
- imports = [ ./hardware-configuration.nix (import "${home-manager}/nixos") ];
- home-manager = {
- useGlobalPkgs = true;
- users.${user} = {
- # TODO ADD MIME TYPES
- # Disable auto generation of home user folders ex. Documents, Music, Public, Downloads
- xdg.userDirs = {
- enable = false;
- createDirectories = false;
- };
- home = {
- # For ssh connection using kitty term
- sessionVariables = {
- TERM="xterm";
- };
- file = {
- # Ranger
- "/home/${user}/.config/ranger/rc.conf".text = ''
- set preview_images true
- set preview_images_method kitty
- '';
- };
- # Set your version (check your configuration,nix file) and do not change later
- stateVersion = "23.05";
- };
- # Librewolf, but need to manually install theme, extensions
- # Extensions: ublock, keepassxc, darkreader, xbrowsersync, tempmail, ISDCAC, unpaywall, libredirect
- programs.librewolf = {
- enable = true;
- package = pkgs.librewolf-wayland;
- settings = {
- "webgl.disabled" = false;
- "privacy.resistFingerprinting" = false;
- "privacy.clearOnShutdown.history" = false;
- "privacy.clearOnShutdown.cookies" = false;
- "privacy.clearOnShutdown.openWindows" = false;
- "privacy.clearOnShutdown.sessions" = false;
- "privacy.clearOnShutdown.downloads" = false;
- "network.cookie.lifetimePolicy" = 0;
- "browser.startup.page" = 3;
- "browser.download.useDownloadDir" = true;
- "browser.fullscreen.autohide" = false;
- "browser.toolbars.bookmarks.visibility" = "always";
- "browser.quitShortcut.disabled" = true;
- "ui.use_activity_cursor" = true;
- "findbar.highlightAll" = true;
- # Don't allow websites to prevent use of right-click, clipboard
- "dom.event.contextmenu.enabled" = true;
- "dom.event.clipboardevents.enabled" = true;
- # Perf
- "gfx.webrender.all" = true;
- "media.ffmpeg.vaapi.enabled" = true;
- "media.ffvpx.enabled" = false;
- "media.rdd-vpx.enabled" = false;
- };
- };
- # Neovim
- programs.neovim = {
- enable = true;
- defaultEditor = true;
- plugins = with pkgs.vimPlugins; [ vim-nix vim-be-good neo-tree-nvim ];
- extraConfig = ''
- set number relativenumber
- set autoindent smartindent
- set clipboard=unnamedplus
- '';
- };
- # Wofi
- programs.wofi = {
- enable = true;
- settings = {
- show = "drun";
- allow_images = true;
- image_size = 40;
- term = "kitty";
- insensitive = true;
- location = "center";
- no_actions = true;
- promt = "Search...";
- width = 400; # 600
- height = 500; # 500
- filter_rate = 100;
- allow_markup = true;
- halign = "fill";
- orientation = "vertical";
- content_halign = "fill";
- gtk_dark = true;
- };
- style = ''
- * {
- font-family: ${font.name};
- font-size: "17px";
- border-radius: 10px;
- border: none;
- }
- window {
- border: 3px solid #90cdfa;
- background: #1e2030;
- border-radius: 15px;
- }
- #input {
- margin: 1.5em;
- margin-bottom: 0em;
- padding: 1em;
- border: none;
- font-weight: bold;
- background: #1e2030;
- color: #c4d3da;
- border-radius: 15px;
- }
- #input:focus {
- border: 1px solid #90cdfa;
- }
- #inner-box {
- margin: 1.5em;
- margin-top: 0.5em;
- }
- #outer-box {
- margin-bottom: 0.5em;
- }
- #scroll {
- margin-top: 5px 0;
- display: none;
- }
- #text {
- margin-left: 0.5em;
- color: #c4d3da;
- }
- #text:selected {
- color: #16161e;
- }
- #entry {
- margin-top: 0.5em;
- border-radius: 15px;
- }
- #entry:selected {
- background: linear-gradient(90deg, #90cdfa 0%, #b69bf1 80%);
- }
- '';
- };
- # Waybar
- programs.waybar = {
- enable = true;
- package = patched_waybar;
- settings = {
- mainBar = {
- layer = "top";
- height = 10;
- modules-left = [ "custom/launcher" "hyprland/workspaces" ];
- clock = {
- format = "<b>{:%I:%M}</b>";
- format-alt = "<b>{:%a.%d,%b}</b>";
- tooltip-format = ''
- <big>{:%B %Y}</big>
- <tt><small>{calendar}</small></tt>'';
- };
- modules-right =
- [ "tray" "backlight" "pulseaudio" "battery" "clock" ];
- "custom/launcher" = {
- format = "";
- on-click = "wofi";
- on-click-right = "nwg-bar";
- tooltip = false;
- };
- "hyprland/workspaces" = {
- format = "{icon}";
- on-click = "activate";
- on-scroll-up = "hyprctl dispatch workspace e+1";
- on-scroll-down = "hyprctl dispatch workspace e-1";
- all-outputs = false;
- };
- backlight = {
- device = "amdgpu_b10";
- format = "<span color='#d9b172'>{icon}</span> {percent}%";
- format-icons = [ "" "" "" "" "" "" "" "" "" ];
- tooltip = false;
- };
- battery = {
- "interval" = 5;
- "states" = {
- "warning" = 20;
- "critical" = 10;
- };
- "format" = " {capacity}%";
- "format-charging" = " {capacity}%";
- "max-length" = 25;
- "tooltip" = false;
- };
- pulseaudio = {
- on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
- format = "<span color='#f7768e'></span> {volume}%";
- format-muted = "<span color='#f7768e'>ﱝ</span>";
- format-bluetooth = " {volume}";
- format-bluetooth-muted = " ";
- format-icons = {
- headphone = "";
- hands-free = "";
- headset = "";
- phone = "";
- portable = "";
- car = "";
- default = [ "奔" "墳" ];
- };
- on-click-right = "pavucontrol";
- };
- tray = {
- icon-size = 20;
- reverse-direction = true;
- spacing = 6;
- };
- };
- };
- style = ''
- * {
- border: 0;
- font-family: 'JetBrainsMono Nerd Font';
- font-size: 15.5px;
- font-feature-settings: '"zero", "ss01", "ss02", "ss03", "ss04", "ss05", "cv31"';
- min-height: 27px;
- /* height: 30px; */
- }
- window#waybar {
- background: transparent;
- }
- #custom-launcher, #workspaces {
- border-radius: 10px;
- background-color: #191a24;
- color: #c0caf5;
- margin-top: 15px;
- margin-right: 15px;
- padding-top: 1px;
- padding-left: 10px;
- padding-right: 10px;
- }
- #custom-launcher {
- font-size: 20px;
- margin-left: 15px;
- padding-right: 20px;
- }
- #workspaces button {
- background: #191a24;
- color: #c0caf5;
- }
- #workspaces button.active {
- color: #2ac3de;
- }
- #clock, #backlight, #custom-cava,#temperature, #cpu, #pulseaudio, #network, #battery , #tray, #memory ,#custom-playerctl, #bluetooth{
- border-radius: 10px;
- background-color: #191a24;
- color: #c0caf5;
- margin-top: 15px;
- padding-left: 9px;
- padding-right: 9px;
- margin-right: 15px;
- }
- @keyframes blink {
- to {
- background-color: #ffffff;
- color: black;
- }
- }
- #battery.warning:not(.charging) {
- background: #f38ba8;
- color: white;
- animation-name: blink;
- animation-duration: 0.5s;
- animation-timing-function: linear;
- animation-iteration-count: infinite;
- animation-direction: alternate;
- }
- #tray{
- padding-right: 8px;
- padding-left: 10px;
- }
- '';
- };
- # Notifications
- services.mako = {
- enable = true;
- anchor = "top-right";
- textColor = "#ebdbb8ff";
- backgroundColor = "#282828bb";
- borderColor = "#6699ff";
- borderRadius = 6;
- borderSize = 1;
- defaultTimeout = 10000;
- icons = true;
- margin = "5";
- padding = "8";
- progressColor = "source #383838ff";
- extraConfig =
- # Notification sound
- "on-notify=exec ${pkgs.mpv}/bin/mpv ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/message.oga --volume=150";
- };
- # Set dark or your theme for gnome apps
- dconf.settings."org/gnome/desktop/interface" = {
- color-scheme = "prefer-dark";
- gtk-theme = gtk-theme.name;
- };
- gtk = {
- enable = true;
- iconTheme = iconTheme;
- theme = gtk-theme;
- cursorTheme = cursorTheme;
- font = font;
- gtk3 = {
- bookmarks = bookmarks;
- extraConfig = { gtk-application-prefer-dark-theme = 1; };
- };
- gtk4.extraConfig = { gtk-application-prefer-dark-theme = 1; };
- };
- # Hyprland
- wayland.windowManager.hyprland = {
- enable = true;
- extraConfig = ''
- # Main panel & notifications
- exec-once = waybar & mako
- # Wallpapers
- exec-once = swaybg -i ~/Sync/archive/background
- # Cursor styling
- exec-once = hyprctl setcursor "Bibata-Modern-TokyoNight" 24
- # Polkit
- exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1
- # NetworkManager & Blueman applets
- exec-once = blueman-applet
- exec-once = nm-applet
- # Auto-lock & auto-suspend
- exec-once = swayidle timeout 600 'swaylock -f -c 000000'
- exec-once = swayidle timeout 1200 'systemctl suspend'
- # Social
- exec-once = cinny
- # Window rules
- windowrulev2 = stayfocused, title:^()$,class:^(steam)$
- windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
- windowrulev2=float,title:(kitty-float)
- windowrulev2=size 374 458,move onscreen cursor, title:(kitty-float)
- windowrulev2=move onscreen cursor -20% -20%, title:(kitty-float)
- windowrule=float,^(pavucontrol)$
- windowrule=float,^(blueberry)$
- windowrule=float,^(KeePassXC - Browser Access Request)$
- windowrule=float,class:^(unison)$
- windowrule=float,class:^(org.rncbc.qjackctl)$
- #MONITORS
- #pc main
- monitor=HDMI-A-1,1920x1080@75,-1920x0,1
- #laptop
- monitor=eDP-1,1920x1080@60,auto,1
- input {
- kb_layout = us,ru
- kb_options = grp:win_space_toggle
- numlock_by_default=true
- follow_mouse=1
- touchpad {
- disable_while_typing = yes
- natural_scroll=no
- }
- }
- animations {
- enabled=0
- }
- xwayland {
- force_zero_scaling = true
- }
- general {
- sensitivity=1.0
- gaps_in = 5
- gaps_out = 10
- border_size = 3
- col.active_border= 0xffa3e49f 0xff63b2b8 0xff82599c 45deg # ORRRR #rgba(cba6f7ff) rgba(89b4faff) rgba(94e2d5ff) 10deg
- col.inactive_border= 0xff6e738d # OR 0xff45475a
- apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
- }
- decoration {
- drop_shadow = true
- shadow_range=100
- shadow_render_power=5
- col.shadow= 0x33000000
- col.shadow_inactive=0x22000000
- rounding=15
- }
- dwindle {
- pseudotile = 1
- preserve_split = 1
- force_split= 0
- }
- misc {
- disable_hyprland_logo = true
- animate_manual_resizes = true
- }
- gestures {
- workspace_swipe = yes
- workspace_swipe_fingers = 3
- }
- bind = SUPER, C, killactive,
- bind = SUPER, M, exit,
- bind = SUPER, V, togglefloating,
- bind = SUPER SHIFT, F, fullscreen
- bind = SUPER, P, pseudo, # dwindle
- bind = SUPER, J, togglesplit, # dwindle
- bind = Alt,Tab,cyclenext,
- bind = Alt,Tab,bringactivetotop,
- bind = SUPER SHIFT, H, movewindow, l
- bind = SUPER SHIFT, L, movewindow, r
- bind = SUPER SHIFT, K, movewindow, u
- bind = SUPER SHIFT, J, movewindow, d
- bind = SUPER, Q, exec, kitty -1
- bind = SUPER, T, exec, kitty -1 -T kitty-float
- bindr= SUPER, R, exec, pkill wofi || wofi -S drun
- #bind = SUPER, SPACE, notify-send "System Locale: $(localectl status)"
- bind = SUPER, E, exec, nautilus --new-window
- bind = SUPER, F, exec, librewolf
- bind = SUPER, B, exec, keepassxc
- bind = SUPER, W, exec, librewolf --new-window https://iv.datura.network/feed/subscriptions
- bind = SUPER, S, exec, com.github.KRTirtho.Spotube
- bind = SUPER, X, exec, zim
- bind = SUPER, D, exec, codium
- bind = SUPER, Z, exec, unison
- bind = ,Print, exec, grim -g "$(slurp)" - | wl-copy && notify-send "Screenshot copied to clipboard" -a "ss"
- #shotman -c region
- bind = SUPER, L, exec, swaylock -f -c 000000
- bind = SUPER, ESCAPE, exec, nwg-bar
- bind = SUPER, left, movefocus, l
- bind = SUPER, right, movefocus, r
- bind = SUPER, up, movefocus, u
- bind = SUPER, down, movefocus, d
- bind = SUPER, 1, workspace, 1
- bind = SUPER, 2, workspace, 2
- bind = SUPER, 3, workspace, 3
- bind = SUPER, 4, workspace, 4
- bind = SUPER, 5, workspace, 5
- bind = SUPER, 6, workspace, 6
- bind = SUPER, 7, workspace, 7
- bind = SUPER, 8, workspace, 8
- bind = SUPER, 9, workspace, 9
- bind = SUPER, 0, workspace, 10
- bind = SUPER SHIFT, 1, movetoworkspace, 1
- bind = SUPER SHIFT, 2, movetoworkspace, 2
- bind = SUPER SHIFT, 3, movetoworkspace, 3
- bind = SUPER SHIFT, 4, movetoworkspace, 4
- bind = SUPER SHIFT, 5, movetoworkspace, 5
- bind = SUPER SHIFT, 6, movetoworkspace, 6
- bind = SUPER SHIFT, 7, movetoworkspace, 7
- bind = SUPER SHIFT, 8, movetoworkspace, 8
- bind = SUPER SHIFT, 9, movetoworkspace, 9
- bind = SUPER SHIFT, 0, movetoworkspace, 10
- bind = SUPER, mouse_down, workspace, e+1
- bind = SUPER, mouse_up, workspace, e-1
- bindm = SUPER, mouse:272, movewindow
- bindm = SUPER, mouse:273, resizewindow
- bind=SUPER,g,togglegroup
- # Volume and Media Control
- bind = , XF86AudioRaiseVolume, exec, pamixer -i 5
- bind = , XF86AudioLowerVolume, exec, pamixer -d 5
- bind = , XF86AudioMicMute, exec, pamixer --default-source -m
- bind = , XF86AudioMute, exec, pamixer -t
- bind = , XF86AudioPlay, exec, playerctl play-pause
- bind = , XF86AudioPause, exec, playerctl play-pause
- bind = , XF86AudioNext, exec, playerctl next
- bind = , XF86AudioPrev, exec, playerctl previous
- # Screen brightness
- bind = , XF86MonBrightnessUp, exec, brightnessctl s +5%
- bind = , XF86MonBrightnessDown, exec, brightnessctl s 5%-
- '';
- };
- # Kitty terminal
- programs.kitty = {
- enable = true;
- theme = "Tokyo Night"; # see: kitten themes
- font = font;
- shellIntegration.enableFishIntegration = true;
- settings = {
- confirm_os_window_close = 0;
- shell = "fish";
- window_padding_width = 15;
- };
- };
- # Fish shell
- programs.fish = {
- enable = true;
- interactiveShellInit = ''
- set fish_greeting
- fish_config prompt choose pythonista
- ssh-add ~/.ssh/id_ed25519
- clear
- '';
- shellAliases = {
- la = "ls -la";
- cls = "clear";
- cfg = "vim /etc/nixos/configuration.nix";
- upd = ''
- cd /etc/nixos/ && sudo git pull && sudo git push && sudo git commit -a -m "Update" && sudo git push && cd ~'';
- bld = "clear && sudo nixos-rebuild switch --upgrade";
- opt =
- "nixfmt /etc/nixos/configuration.nix && upd && cln && bld && updatewallpapers";
- cln = "sudo nix-collect-garbage -d && sudo nix-store --optimise";
- vpnon = "sudo protonvpn c";
- vpnoff = "sudo protonvpn d";
- updwallpapers = "pkill swaybg && swaybg -i ~/Sync/archive/background & disown";
- gcp = ''git commit -a -m "Update" && git push'';
- gps = "git push";
- gpl = "git pull";
- gs = "git status";
- gl = "git log";
- gd = "git diff origin/HEAD";
- vi = "nvim";
- vim = "nvim";
- xo = "xdg-open";
- ra = "ranger";
- monitor2on = "hyprctl keyword monitor DVI-D-1, preferred,auto,1";
- monitor2off = "hyprctl keyword monitor DVI-D-1, disable";
- uni-laptop = "unison laptop -text";
- uni-ssd = "unison ssd -text";
- };
- plugins = [
- {
- name = "done";
- src = pkgs.fishPlugins.done.src;
- }
- {
- name = "fishPlugins.puffer";
- src = pkgs.fishPlugins.puffer;
- }
- ];
- };
- # Git
- programs.git = {
- enable = true;
- userName = gitUser;
- userEmail = email;
- ignores = [
- "out/"
- "target/"
- "!.mvn/wrapper/maven-wrapper.jar"
- "!**/src/main/**/target/"
- "!**/src/test/**/target"
- ".idea/"
- "*.iws"
- "*.iml"
- "*.ipr"
- ".vscode/"
- ];
- aliases = {
- lg =
- "log --graph --pretty=format:'%C(auto)%h -%d %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
- br =
- "branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate";
- };
- extraConfig = {
- color.ui = true;
- core.editor = "vim";
- push.autoSetupRemote = true;
- init.defaultBranch = "main";
- credential.helper = "${
- pkgs.git.override { withLibsecret = true; }
- }/bin/git-credential-libsecret";
- safe.directory = "/etc/nixos";
- };
- };
- };
- };
- # Packages
- environment.systemPackages = with pkgs; [
- # CLI tools
- uwufetch
- fastfetch
- nitch
- tldr
- ncdu
- btop
- nvtop-amd
- fzf
- nixfmt
- patool
- bc
- feh
- mpv
- cryptsetup
- # GUI apps
- keepassxc
- transmission-gtk
- unison
- zim
- gnome.nautilus # or pcmanfm, thunar, nnn, ranger, yazi, fff, lf
- # Games
- osu-lazer-bin
- bottles
- #steam
- #gamemode
- # Social
- cinny-desktop
- # Development
- vscodium-fhs
- # For vim
- wl-clipboard # allows copying to system clipboard
- # Other DE Specific
- networkmanagerapplet
- swaybg
- swayidle
- swaylock
- nwg-bar # replace with wofi?
- polkit_gnome # switch to lxsession?
- pavucontrol
- brightnessctl
- libnotify # for notifications
- xdg-utils
- sound-theme-freedesktop
- # volume control + previous/next song via FN keys
- pamixer
- playerctl
- # Screenshot
- grim
- slurp
- ];
- programs = {
- seahorse.enable = true;
- dconf.enable = true;
- ssh.startAgent = true;
- # sets JAVA_HOME
- java = {
- enable = true;
- package = pkgs.jdk17;
- };
- hyprland = {
- enable = true;
- xwayland.enable = true;
- };
- };
- nixpkgs.config = {
- #pulseaudio = true;
- allowUnfree = true;
- permittedInsecurePackages = [ "electron-25.9.0" ];
- packageOverrides = pkgs: {
- nur = import (builtins.fetchTarball
- "https://github.com/nix-community/NUR/archive/master.tar.gz") {
- inherit pkgs;
- };
- };
- };
- # Fonts
- fonts = {
- fontDir.enable = true;
- packages = with pkgs; [ nerdfonts ];
- };
- # Session variables
- environment.sessionVariables = {
- MOZ_ENABLE_WAYLAND = "1";
- _JAVA_AWT_WM_NONEREPARENTING = "1";
- TERM = "xterm";
- XCURSOR_THEME = cursorTheme.name;
- XCURSOR_SIZE = cursorSize;
- GTK_THEME = gtk-theme.name;
- GDK_BACKEND = "wayland,x11";
- CLUTTER_BACKEND = "wayland";
- SDL_VIDEODRIVER = "wayland";
- EGL_PLATFORM = "wayland";
- WLR_NO_HARDWARE_CURSORS = "1";
- XDG_SESSION_TYPE = "wayland";
- XDG_SESSION_DESKTOP = "Hyprland";
- XDG_CURRENT_DESKTOP = "Hyprland";
- };
- # Docker
- virtualisation.docker.enable = true;
- security = {
- polkit.enable = true;
- rtkit.enable = true;
- pam.services = {
- # Auto unlock gnome keyring
- greetd.enableGnomeKeyring = true;
- # Fix swaylock not accepting user password
- swaylock = { };
- };
- };
- # Services
- services = {
- flatpak.enable = true;
- gvfs.enable = true;
- dbus.enable = true;
- blueman.enable = true;
- system76-scheduler.settings.cfsProfiles.enable = true;
- gnome.gnome-keyring.enable = true;
- pipewire = {
- enable = true;
- alsa.enable = true;
- alsa.support32Bit = true;
- pulse.enable = true;
- jack.enable = true;
- };
- # SSH server
- openssh = {
- enable = true;
- settings.PasswordAuthentication = false;
- settings.KbdInteractiveAuthentication = false;
- settings.PermitRootLogin = "yes";
- };
- # PostgreSQL
- postgresql = {
- enable = true;
- enableTCPIP = true; # default port = 5432
- authentication = pkgs.lib.mkOverride 10 ''
- #type database DBuser auth-method
- local all all trust
- host all all 127.0.0.1/32 md5
- '';
- settings.listen_addresses = pkgs.lib.mkForce "*";
- };
- # Display manager
- greetd = {
- enable = true;
- settings = rec {
- initial_session = {
- user = user;
- command = "Hyprland";
- };
- default_session = initial_session;
- };
- };
- # Battery usage optimisation
- 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;
- CPU_BOOST_ON_AC = 1; # ???
- CPU_BOOST_ON_BAT = 0; # ???
- USB_AUTOSUSPEND = 0;
- RUNTIME_PM_BLACKLIST = "06:00.3 06:00.4";
- };
- };
- };
- # XDG Portals
- xdg.portal = {
- enable = true;
- extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
- };
- # Sound
- sound.enable = true;
- # Hardware
- hardware = {
- pulseaudio = {
- enable = false;
- # support32Bit = true;
- };
- bluetooth = {
- enable = true;
- powerOnBoot = true;
- /* # bluetooth fix
- settings = {
- General = {
- Name = "Hello";
- ControllerMode = "dual";
- FastConnectable = "true";
- Experimental = "true";
- };
- Policy = { AutoEnable = "true"; };
- };
- */
- };
- opengl = {
- enable = true;
- driSupport32Bit = true;
- };
- };
- # Boot
- boot = {
- supportedFilesystems = [ "ntfs" ];
- loader = {
- systemd-boot.enable = true;
- efi.canTouchEfiVariables = true;
- };
- };
- # Network
- networking = {
- hostName = hostname;
- networkmanager.enable = true;
- };
- # Timezone
- time.timeZone = timezone;
- # Locale
- i18n.defaultLocale = defaultLocale;
- # User
- users.users.${user} = {
- isNormalUser = true;
- extraGroups = extraUserGroups;
- };
- # Auto upgrades
- system.autoUpgrade = {
- enable = true;
- channel = "https://channels.nixos.org/nixos-unstable";
- dates = "weekly";
- };
- nix = {
- optimise.automatic = true;
- # Garbage collection
- gc = {
- automatic = true;
- dates = "weekly";
- options = "--delete-older-than 7d";
- };
- };
- system.stateVersion = "23.05"; # initial build version
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement