diff --git a/flake.lock b/flake.lock index c5d55f3..20643db 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1733045511, - "narHash": "sha256-n8AldXJRNVMm2UZ6yN0HwVxlARY2Cm/uhdOw76tQ0OI=", + "lastModified": 1733317578, + "narHash": "sha256-anN/LcP5IuqEARvhPETg1vnbyG3IQ0wdvSAYEJfIQzA=", "owner": "nix-community", "repo": "home-manager", - "rev": "4964f3c6fc17ae4578e762d3dc86b10fe890860e", + "rev": "ad48eb25cd0b00ce730da00fa1f8e6e6c27b397d", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1732837521, - "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=", + "lastModified": 1733212471, + "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370", + "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", "type": "github" }, "original": { diff --git a/system/default.nix b/system/default.nix index 8da58f5..2573605 100644 --- a/system/default.nix +++ b/system/default.nix @@ -1 +1 @@ -{ imports = [ ./users.nix ./services.nix ./hardware.nix ./fonts.nix ./security.nix ./programs.nix ]; } +{ imports = [ ./users.nix ./services ./hardware.nix ./fonts.nix ./security.nix ./programs.nix ]; } diff --git a/system/hardware.nix b/system/hardware.nix index 8edba80..4c30b36 100644 --- a/system/hardware.nix +++ b/system/hardware.nix @@ -8,6 +8,10 @@ hardware = { enableRedistributableFirmware = true; cpu.intel.updateMicrocode = true; + pulseaudio = { + enable =true; + support32Bit = true; + }; graphics = { enable = true; diff --git a/system/programs.nix b/system/programs.nix index 015003c..87d8e28 100644 --- a/system/programs.nix +++ b/system/programs.nix @@ -56,46 +56,7 @@ bottles vkd3d-proton vk-bootstrap - (lutris.override { - steamSupport = true; - extraLibraries = pkgs: [ - liboggz - libgudev - speex - libogg - flac - graphene - libvpx - - ]; - extraPkgs = pkgs: [ - libvpx - libogg - liboggz - flac - graphene - gst_all_1.gstreamer - # Common plugins like "filesrc" to combine within e.g. gst-launch - gst_all_1.gst-plugins-base - # Specialized plugins separated by quality - gst_all_1.gst-plugins-good - gst_all_1.gst-plugins-bad - gst_all_1.gst-plugins-ugly - # Plugins to reuse ffmpeg to play almost every video format - gst_all_1.gst-libav - # Support the Video Audio (Hardware) Acceleration API - gst_all_1.gst-vaapi - openssl - nghttp2 - libidn2 - rtmpdump - libpsl - curl - krb5 - keyutils - # List library dependencies here - ]; - }) + lutris sipcalc xdg-utils pass diff --git a/system/services.nix b/system/services.nix deleted file mode 100644 index ed39a99..0000000 --- a/system/services.nix +++ /dev/null @@ -1,139 +0,0 @@ -{ config, pkgs, ... }: { - - security.rtkit.enable = true; - services.fwupd.enable = true; - networking = { - wireless = { - enable = false; - networks = { - # "bennynet" = { - # pskRaw = "85e8f17e02f4b4df5ddc9b95d1a4256b3c2608fcc8dfa1860b693d06c2a0bf1f"; - # }; - }; - }; - firewall = { - enable = true; - allowedTCPPorts = [ 22 ]; - extraCommands = "iptables -A INPUT -s 192.168.0.0/16 -j ACCEPT"; - - }; - }; - programs.dconf.enable = true; - services.gnome.gnome-keyring.enable = true; - security.pam.services.i3.enableGnomeKeyring = true; - environment.extraInit = '' - xset s off -dpms - ''; - security.polkit.enable = true; - - services = { - # prometheus = { - # scrapeConfigs = [ - # { - # job_name = "chrysalis"; - # static_configs = [{ - # targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ]; - # }]; - # } - # ]; - # - # exporters = { - # node = { - # enable = true; - # enabledCollectors = [ "systemd" "processes" ]; - # port = 9002; - # }; - # }; - # - # enable = true; - # port = 9001; - # }; - # - # grafana = { - # enable = true; - # settings = { - # server = { - # # Listening Address - # http_addr = "127.0.0.1"; - # # and Port - # http_port = 3000; - # # Grafana needs to know on which domain and URL it's running - # serve_from_sub_path = true; - # }; - # }; - # }; - displayManager = - { - defaultSession = "none+i3"; - autoLogin.enable = true; - autoLogin.user = "mbeno"; - - }; - logind.extraConfig = "IdleAction=ignore"; - xserver = { - exportConfiguration = true; - enable = true; - xkb.layout = "us,no"; - xkb.variant = "qwerty"; - xkb.options = "grp:lalt_lshift_toggle"; - desktopManager = { - xterm.enable = false; - }; - videoDrivers = [ "nvidia" ]; - deviceSection = '' - Option "TearFree" "False" - Option "VariableRefresh" "true" - ''; - xrandrHeads = [ - { - output = "DP-2"; - primary = true; - monitorConfig = " - Option \"TargetRefresh\" \"144\" - Option \"Primary\" \"true\" - Option \"PreferredMode\" \"2560x1440\" - Option \"DPMS\" \"true\" - "; - } - { - output = "DP-0"; - primary = false; - monitorConfig = " - Option \"TargetRefresh\" \"144\" - Option \"Primary\" \"false\" - Option \"PreferredMode\" \"1920x1080\" - "; - } - ]; - screenSection = - '' - Option "metamodes" "DP-2: 2560x1440_144 +0+0, DP-0: 1920x1080_144 +2560+0" - ''; - windowManager.i3 = { - enable = true; - extraPackages = with pkgs; [ - dmenu #application launcher most people use - i3status # gives you the default i3 status bar - i3lock - # i3lock #default i3 screen locker - i3blocks #if you are planning on using i3blocks over i3status - polybar - rofi - nitrogen - ]; - }; - }; - }; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - services.pcscd.enable = true; - services.dbus.packages = [ pkgs.gcr ]; - services.openssh = { - enable = true; - settings.PasswordAuthentication = true; - }; -} diff --git a/system/services/audio.nix b/system/services/audio.nix new file mode 100644 index 0000000..6be98c1 --- /dev/null +++ b/system/services/audio.nix @@ -0,0 +1,12 @@ + +{ config, pkgs, ... }: { + security.rtkit.enable = true; +services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; +}; +} \ No newline at end of file diff --git a/system/services/default.nix b/system/services/default.nix new file mode 100644 index 0000000..0378f0a --- /dev/null +++ b/system/services/default.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: { + + services.fwupd.enable = true; + programs.dconf.enable = true; + services.gnome.gnome-keyring.enable = true; + security.pam.services.i3.enableGnomeKeyring = true; + environment.extraInit = '' + xset s off -dpms + ''; + security.polkit.enable = true; + + services.pcscd.enable = true; + services.dbus.packages = [ pkgs.gcr ]; + services.openssh = { + enable = true; + settings.PasswordAuthentication = true; + }; + imports = + [ ./networking.nix + ./audio.nix + ./xserver.nix + ./vscode.nix + ]; +} diff --git a/system/services/networking.nix b/system/services/networking.nix new file mode 100644 index 0000000..9d43949 --- /dev/null +++ b/system/services/networking.nix @@ -0,0 +1,19 @@ + +{ config, pkgs, ... }: { + networking = { + wireless = { + enable = false; + networks = { + # "bennynet" = { + # pskRaw = "85e8f17e02f4b4df5ddc9b95d1a4256b3c2608fcc8dfa1860b693d06c2a0bf1f"; + # }; + }; + }; + firewall = { + enable = true; + allowedTCPPorts = [ 22 ]; + extraCommands = "iptables -A INPUT -s 192.168.0.0/16 -j ACCEPT"; + + }; + }; +} \ No newline at end of file diff --git a/system/services/xserver.nix b/system/services/xserver.nix new file mode 100644 index 0000000..c00c2d2 --- /dev/null +++ b/system/services/xserver.nix @@ -0,0 +1,66 @@ + +{ config, pkgs, ... }: { + services = { + displayManager = + { + defaultSession = "none+i3"; + autoLogin.enable = true; + autoLogin.user = "mbeno"; + + }; + logind.extraConfig = "IdleAction=ignore"; + xserver = { + exportConfiguration = true; + enable = true; + xkb.layout = "us,no"; + xkb.variant = "qwerty"; + xkb.options = "grp:lalt_lshift_toggle"; + desktopManager = { + xterm.enable = false; + }; + videoDrivers = [ "nvidia" ]; + deviceSection = '' + Option "TearFree" "False" + Option "VariableRefresh" "true" + ''; + xrandrHeads = [ + { + output = "DP-2"; + primary = true; + monitorConfig = " + Option \"TargetRefresh\" \"144\" + Option \"Primary\" \"true\" + Option \"PreferredMode\" \"2560x1440\" + Option \"DPMS\" \"true\" + "; + } + { + output = "DP-0"; + primary = false; + monitorConfig = " + Option \"TargetRefresh\" \"144\" + Option \"Primary\" \"false\" + Option \"PreferredMode\" \"1920x1080\" + "; + } + ]; + screenSection = + '' + Option "metamodes" "DP-2: 2560x1440_144 +0+0, DP-0: 1920x1080_144 +2560+0" + ''; + windowManager.i3 = { + enable = true; + extraPackages = with pkgs; [ + dmenu #application launcher most people use + i3status # gives you the default i3 status bar + i3lock + # i3lock #default i3 screen locker + i3blocks #if you are planning on using i3blocks over i3status + polybar + rofi + nitrogen + ]; + }; + }; + }; +} \ No newline at end of file diff --git a/system/users.nix b/system/users.nix index c2d1fcd..33fe285 100644 --- a/system/users.nix +++ b/system/users.nix @@ -6,7 +6,7 @@ shell = pkgs.zsh; isNormalUser = true; description = "Martin"; - extraGroups = [ "networkmanager" "wheel" "docker" ]; + extraGroups = [ "networkmanager" "wheel" "docker" "audio" ]; packages = with pkgs; [ alacritty mumble diff --git a/user/programs/obs-studio/default.nix b/user/programs/obs-studio/default.nix index 2fa4e13..668efcb 100644 --- a/user/programs/obs-studio/default.nix +++ b/user/programs/obs-studio/default.nix @@ -18,7 +18,6 @@ plugins = with pkgs.obs-studio-plugins; [ wlrobs obs-backgroundremoval - # obs-pipewire-audio-capture obs-vkcapture obs-nvfbc diff --git a/user/programs/vscode/default.nix b/user/programs/vscode/default.nix index a69c165..236c2e5 100644 --- a/user/programs/vscode/default.nix +++ b/user/programs/vscode/default.nix @@ -21,6 +21,7 @@ "window.titleBarStyle" = "custom"; "editor.formatOnSave" = true; "nix.enableLanguageServer" = true; + "nix.serverPath" = "nil"; }; }; }