From de74a239702ceee90a71eeeefe576af6815b15cc Mon Sep 17 00:00:00 2001 From: Martin Benonisen Date: Fri, 22 Nov 2024 16:11:43 +0100 Subject: [PATCH] lol --- flake.lock | 20 ++++++++++---------- hosts/zedd/configuration.nix | 9 +++++++-- hosts/zedd/hardware-configuration.nix | 1 + system/hardware.nix | 10 ++-------- system/services.nix | 17 +++++++++++++++-- user/programs/vscode/default.nix | 4 ++++ 6 files changed, 39 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index d54afc2..8ad8e89 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1731604581, - "narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=", + "lastModified": 1732025103, + "narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=", "owner": "nix-community", "repo": "home-manager", - "rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10", + "rev": "a46e702093a5c46e192243edbd977d5749e7f294", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1731319897, - "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=", + "lastModified": 1732014248, + "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", "owner": "nixos", "repo": "nixpkgs", - "rev": "dc460ec76cbff0e66e269457d7b728432263166c", + "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", "type": "github" }, "original": { @@ -52,11 +52,11 @@ }, "locked": { "dir": "packaging/nix", - "lastModified": 1731556042, - "narHash": "sha256-eUFmLbf06Dph//IbB9KsJio3dJNADt+EhcfNFXjiJjU=", + "lastModified": 1731893168, + "narHash": "sha256-nijDZdYKT9UWF+kMgM3lq1OkbFKvDs6JXKRXI8cpprE=", "ref": "refs/heads/main", - "rev": "66a1088194bb13c2d86d2c0af316b280a7235640", - "revCount": 839, + "rev": "9f580b251ca66950bb436c09afd2b9585eed74ba", + "revCount": 840, "submodules": true, "type": "git", "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" diff --git a/hosts/zedd/configuration.nix b/hosts/zedd/configuration.nix index 5a071fc..2b1d33e 100644 --- a/hosts/zedd/configuration.nix +++ b/hosts/zedd/configuration.nix @@ -1,11 +1,16 @@ -{ config, pkgs, ... }: +{ config, pkgs,lib, ... }: { # Enable OpenGL # Load nvidia driver for Xorg and Wayland environment.pathsToLink = [ "/libexec" ]; users.users.mbeno.extraGroups = [ "adbusers" ]; programs.adb.enable = true; - system.autoUpgrade.enable = true; + system.autoUpgrade = { + enable = true; + dates = "03:00"; + flake = "/home/mbeno/git/nixos"; + + }; # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/hosts/zedd/hardware-configuration.nix b/hosts/zedd/hardware-configuration.nix index da0b2c0..86b2bb8 100644 --- a/hosts/zedd/hardware-configuration.nix +++ b/hosts/zedd/hardware-configuration.nix @@ -33,6 +33,7 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; + swapDevices = lib.mkForce [ ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/system/hardware.nix b/system/hardware.nix index 9bd9fe3..8edba80 100644 --- a/system/hardware.nix +++ b/system/hardware.nix @@ -1,13 +1,5 @@ { config, pkgs, ... }: { - networking.wireless = { - enable = true; - networks = { - "benny" = { - psk = "loloplop"; - }; - }; - }; environment.sessionVariables = { LIBVA_DRIVER_NAME = "nvidia"; }; nixpkgs.config.packageOverrides = pkgs: { @@ -22,12 +14,14 @@ enable32Bit = true; extraPackages = with pkgs; [ vaapiVdpau + mangohud nvidia-vaapi-driver intel-media-driver intel-vaapi-driver libvdpau-va-gl ]; extraPackages32 = with pkgs.pkgsi686Linux; [ + mangohud intel-media-driver intel-vaapi-driver ]; diff --git a/system/services.nix b/system/services.nix index 23bd736..8cbb030 100644 --- a/system/services.nix +++ b/system/services.nix @@ -2,11 +2,24 @@ security.rtkit.enable = true; services.fwupd.enable = true; - networking.firewall = { + networking = { + wireless = { + enable = false; + networks = { + # "bennynet" = { + # pskRaw = "85e8f17e02f4b4df5ddc9b95d1a4256b3c2608fcc8dfa1860b693d06c2a0bf1f"; + # }; + }; + }; + firewall = { enable = true; allowedTCPPorts = [ 22 ]; + extraCommands = '' + iptables -A INPUT --source 192.168.0.0/16 -j ACCEPT + ''; + + }; }; - networking.nftables.enable = true; programs.dconf.enable = true; services.gnome.gnome-keyring.enable = true; security.pam.services.i3.enableGnomeKeyring = true; diff --git a/user/programs/vscode/default.nix b/user/programs/vscode/default.nix index cf2ae9a..a69c165 100644 --- a/user/programs/vscode/default.nix +++ b/user/programs/vscode/default.nix @@ -13,10 +13,14 @@ bbenoist.nix github.copilot github.copilot-chat + arrterian.nix-env-selector + ms-python.python + ]; userSettings = { "window.titleBarStyle" = "custom"; "editor.formatOnSave" = true; + "nix.enableLanguageServer" = true; }; }; }