diff --git a/config/base.nix b/config/base.nix index 3eefc6a..b1d8fcb 100644 --- a/config/base.nix +++ b/config/base.nix @@ -21,6 +21,7 @@ nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); nix.nixPath = ["/etc/nix/path"]; users.defaultUserShell = pkgs.bash; + documentation.man.generateCaches = false; # environment.systemPackages = with pkgs; [ # ]; systemd.services.NetworkManager-wait-online.enable = lib.mkForce false; @@ -57,6 +58,11 @@ bluetooth = { enable = true; powerOnBoot = true; + settings = { + General = { + Disable="Headset"; + }; + }; }; }; @@ -96,6 +102,9 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + # boot.extraModulePackages = [ + # config.boot.kernelPackages.wireguard + # ]; console.keyMap = "sv-latin1"; # systemd.services.vdirsyncer = { @@ -116,7 +125,15 @@ # }; # }; - environment.systemPackages = with pkgs; [( + environment.systemPackages = with pkgs; [ + # wireguard-go + pulsemixer + openssh + pinentry-curses + spotify-qt + wireguard-tools + (firefox.override { nativeMessagingHosts = [passff-host]; }) + ( catppuccin-sddm.override { flavor = "mocha"; font = "FiraCode Nerd Font Bold"; @@ -124,7 +141,8 @@ background = "${../wallpapers/inverted.png}"; loginBackground = true; } - )]; + ) + ]; services = { @@ -134,6 +152,7 @@ via ]; }; + picom.enable = true; openssh = { enable = true; }; diff --git a/config/home.nix b/config/home.nix index d8c9702..97d493c 100644 --- a/config/home.nix +++ b/config/home.nix @@ -22,16 +22,19 @@ ../shared/firefox.nix ../shared/zathura.nix ../shared/lazygit.nix - ../shared/spotifyd.nix + # ../shared/spotifyd.nix ../shared/ssh.nix ../shared/aerc.nix ../shared/rbw.nix ../shared/oh-my-posh.nix + ../shared/mpv.nix ]; nixpkgs = { overlays = []; config = { + # allowUnfree = false; + # allowUnfreePredicate = _: false; allowUnfree = true; allowUnfreePredicate = _: true; permittedInsecurePackages = [ @@ -50,7 +53,6 @@ alsa-utils killall upower - mpv gcc gnumake htop @@ -71,7 +73,6 @@ pavucontrol fd bat - steam-run appimage-run bluez bluez-tools @@ -85,33 +86,21 @@ go ghorg libsixel - kompose + valgrind + soulseekqt #Terminal - weechat - jira-cli-go jq - vscode - - sc-im gnuplot - bison - tesseract qrencode - texliveMedium + texliveFull - vdirsyncer - todoist - todoman - calcure python311Packages.urwid - signal-cli - scli + python311Packages.numpy + python311Packages.matplotlib sysz betterlockscreen - pyradio - haskellPackages.patat gh git tmux @@ -119,7 +108,6 @@ yt-dlp fzf ripgrep - fw-pkgs.spotify-player alsa-lib libdbusmenu xorg.libxcb @@ -132,42 +120,39 @@ rustup openssl pkg-config - azure-cli - azuredatastudio - adrs - opentofu lazydocker + #Unfree + # obsidian + # discord + # slack + + #Alternatives + slack-cli + spotify + unstable.spotifyd + librespot + discordo + #Desktop - openvpn3 + libreoffice-qt6-fresh + fluent-reader aerc firefox - chromium vial thunderbird - spotify - signal-desktop - darktable - discord - discordo - slack + signal-desktop-beta kitty alacritty - neovim + unstable.neovim fastfetch - obsidian lazygit - betterdiscordctl pdfarranger byzanz drawio xdotool pinentry remmina - rofi - rbw - rofi-rbw - teams-for-linux #Dev python3 @@ -175,6 +160,8 @@ ranger python311Packages.pynvim ueberzugpp + jdk + maven #LSP nil diff --git a/config/users.nix b/config/users.nix index b851d80..6cabc08 100644 --- a/config/users.nix +++ b/config/users.nix @@ -18,6 +18,7 @@ "wheel" "audio" "docker" + "input" ]; openssh.authorizedKeys = { keys = [ diff --git a/flake.lock b/flake.lock index 9e24919..6835ee4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,39 @@ { "nodes": { + "base64-src": { + "flake": false, + "locked": { + "lastModified": 1705041416, + "narHash": "sha256-fi1/gozIXtVAhJr/TOM5cu1hJ7BKgz4KaDtkbYNKYR0=", + "ref": "refs/heads/master", + "rev": "dceb7af2f73afb7aae20322cca04f27331d2e16a", + "revCount": 3, + "type": "git", + "url": "https://gist.github.com/tomykaira/f0fd86b6c73063283afe550bc5d77594" + }, + "original": { + "type": "git", + "url": "https://gist.github.com/tomykaira/f0fd86b6c73063283afe550bc5d77594" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "ref": "refs/heads/main", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "revCount": 92, + "type": "git", + "url": "https://github.com/numtide/flake-utils" + }, + "original": { + "type": "git", + "url": "https://github.com/numtide/flake-utils" + } + }, "fw-pkgs": { "locked": { "lastModified": 1717322328, @@ -16,6 +50,22 @@ "type": "github" } }, + "gourou-src": { + "flake": false, + "locked": { + "lastModified": 1713159448, + "narHash": "sha256-z/hMvFPDd3CXo4iUiZPfkUVQPPcJe+Tk6By+cibAtE0=", + "ref": "refs/heads/master", + "rev": "81faf1f9bef4d27d8659f2f16b9c65df227ee3d7", + "revCount": 141, + "type": "git", + "url": "https://forge.soutade.fr/soutade/libgourou" + }, + "original": { + "type": "git", + "url": "https://forge.soutade.fr/soutade/libgourou" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -37,36 +87,42 @@ "type": "github" } }, - "nixpkgs": { + "knock": { + "inputs": { + "base64-src": "base64-src", + "flake-utils": "flake-utils", + "gourou-src": "gourou-src", + "nixpkgs": "nixpkgs", + "pugixml-src": "pugixml-src", + "updfparser-src": "updfparser-src" + }, "locked": { - "lastModified": 1718208800, - "narHash": "sha256-US1tAChvPxT52RV8GksWZS415tTS7PV42KTc2PNDBmc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "cc54fb41d13736e92229c21627ea4f22199fee6b", + "lastModified": 1721181121, + "narHash": "sha256-181wtuVI4l6mWUMwDe0HkvoqKWrDF+UVL0E83YEztks=", + "owner": "BentonEdmondson", + "repo": "knock", + "rev": "0aa4005fd4f2ee1b41c20643017c8f0a2bdf6262", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", + "owner": "BentonEdmondson", + "repo": "knock", "type": "github" } }, - "nixpkgs-stable": { + "nixpkgs": { "locked": { - "lastModified": 1713638189, - "narHash": "sha256-q7APLfB6FmmSMI1Su5ihW9IwntBsk2hWNXh8XtSdSIk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "74574c38577914733b4f7a775dd77d24245081dd", - "type": "github" + "lastModified": 1720928027, + "narHash": "sha256-Ze8frbrRJAuEJWVWf9bExMoFshPYhAmp1Nq5VYkzlVU=", + "ref": "refs/heads/master", + "rev": "048f85c494ef4fcd90889537f78e8548f5abcaf0", + "revCount": 652811, + "type": "git", + "url": "https://github.com/nixos/nixpkgs" }, "original": { - "owner": "NixOS", - "ref": "release-23.11", - "repo": "nixpkgs", - "type": "github" + "type": "git", + "url": "https://github.com/nixos/nixpkgs" } }, "nixpkgs-unstable": { @@ -87,44 +143,74 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1713596654, - "narHash": "sha256-LJbHQQ5aX1LVth2ST+Kkse/DRzgxlVhTL1rxthvyhZc=", + "lastModified": 1718208800, + "narHash": "sha256-US1tAChvPxT52RV8GksWZS415tTS7PV42KTc2PNDBmc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fd16bb6d3bcca96039b11aa52038fafeb6e4f4be", + "rev": "cc54fb41d13736e92229c21627ea4f22199fee6b", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, + "pugixml-src": { + "flake": false, + "locked": { + "lastModified": 1720456557, + "narHash": "sha256-0KZgn1PASbEb+Xl9XDZI+uifWwKPL6pVC1Lgbnjbet0=", + "ref": "refs/heads/master", + "rev": "30cc354fe37114ec7a0a4ed2192951690357c2ed", + "revCount": 1799, + "type": "git", + "url": "https://github.com/zeux/pugixml" + }, + "original": { + "type": "git", + "url": "https://github.com/zeux/pugixml" + } + }, "root": { "inputs": { "fw-pkgs": "fw-pkgs", "home-manager": "home-manager", - "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable", - "sops-nix": "sops-nix" + "knock": "knock", + "nixpkgs": "nixpkgs_2", + "nixpkgs-unstable": "nixpkgs-unstable" } }, - "sops-nix": { - "inputs": { - "nixpkgs": "nixpkgs_2", - "nixpkgs-stable": "nixpkgs-stable" - }, + "systems": { "locked": { - "lastModified": 1713892811, - "narHash": "sha256-uIGmA2xq41vVFETCF1WW4fFWFT2tqBln+aXnWrvjGRE=", - "path": "/nix/store/d0lnnw00mxa025i7dz4g4qcdfixxmg1s-source", - "rev": "f1b0adc27265274e3b0c9b872a8f476a098679bd", - "type": "path" + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" }, "original": { - "id": "sops-nix", - "type": "indirect" + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "updfparser-src": { + "flake": false, + "locked": { + "lastModified": 1711214903, + "narHash": "sha256-HD73WGZ4e/3T7vQmwU/lRADtvsInFG62uqvJmF773Rk=", + "ref": "refs/heads/master", + "rev": "6060d123441a06df699eb275ae5ffdd50409b8f3", + "revCount": 33, + "type": "git", + "url": "https://forge.soutade.fr/soutade/updfparser" + }, + "original": { + "type": "git", + "url": "https://forge.soutade.fr/soutade/updfparser" } } }, diff --git a/flake.nix b/flake.nix index eff313b..7d81f70 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,7 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; fw-pkgs.url = "github:fwastring/fwpkgs/main"; + knock.url = "github:BentonEdmondson/knock"; # Home manager home-manager.url = "github:nix-community/home-manager/release-24.05"; @@ -18,7 +19,7 @@ home-manager, nixpkgs-unstable, fw-pkgs, - sops-nix, + knock, ... } @ inputs: let inherit (self) outputs; @@ -26,13 +27,19 @@ overlay-unstable = final: prev: { unstable = import nixpkgs-unstable { inherit system; - config.allowUnfree = true; + config.allowUnfree = false; }; }; overlay-fw-pkgs = final: prev: { fw-pkgs = import fw-pkgs { inherit system; - config.allowUnfree = true; + config.allowUnfree = false; + }; + }; + overlay-knock = final: prev: { + knock = import knock { + inherit system; + config.allowUnfree = false; }; }; in { @@ -46,7 +53,6 @@ }; modules = [ ./maskiner/laptop/configuration.nix - sops-nix.nixosModules.sops ]; }; desktop = nixpkgs.lib.nixosSystem { @@ -57,6 +63,7 @@ modules = [ ({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) ./maskiner/desktop/configuration.nix + knock ]; }; jobb = nixpkgs.lib.nixosSystem { @@ -79,8 +86,7 @@ }; modules = [ ./config/home.nix - ({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) - ({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; }) + ({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable overlay-knock overlay-fw-pkgs ]; }) ]; }; "fw@desktop" = home-manager.lib.homeManagerConfiguration { diff --git a/maskiner/laptop/configuration.nix b/maskiner/laptop/configuration.nix index 46cd0c1..76150a2 100644 --- a/maskiner/laptop/configuration.nix +++ b/maskiner/laptop/configuration.nix @@ -23,7 +23,20 @@ services.xserver.dpi = 140; + services = { + openssh = { + enable = true; + ports = [55504]; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + X11Forwarding = true; + }; + extraConfig = '' + AllowUsers fw + ''; + }; syncthing = { enable = true; user = "fw"; diff --git a/shared/dwm.nix b/shared/dwm.nix index f9157ea..0e8305f 100644 --- a/shared/dwm.nix +++ b/shared/dwm.nix @@ -3,7 +3,7 @@ let dwm = pkgs.dwm.overrideAttrs (old: { src = builtins.fetchGit { url = "https://github.com/FredzyW/dwm-conf.git"; - rev = "964a3b9c94e780636a1a4ef01afb90ab8de4bb6d"; + rev = "696050185fa48575e53157e83d46ae0613733446"; }; nativeBuildInputs = with pkgs; [ xorg.libX11.dev diff --git a/shared/fish.nix b/shared/fish.nix index e0665b4..48e1eee 100644 --- a/shared/fish.nix +++ b/shared/fish.nix @@ -39,7 +39,7 @@ ]; shellAbbrs = { homec="nvim ~/nix/config/home.nix"; - ls="exa -lag --header"; + ls="exa -l --no-time --no-permissions --no-user"; dev="nix develop --command fish"; spot="steam-run ~/program/spotify_player"; sc="sc-im"; @@ -48,6 +48,8 @@ home="home-manager switch --flake $HM_DIR"; reb="sudo nixos-rebuild switch --flake $SYSTEM_DIR"; cam="jira issue create && jira issue assign && jira issue move"; + vpnup="sudo VPN_PROTOCOL=wireguard DISABLE_IPV6=yes DIP_TOKEN=no AUTOCONNECT=true PIA_PF=false PIA_DNS=true PIA_USER=p4558499 PIA_PASS=vUZA6Nfzci ~/program/manual-connections/run_setup.sh"; + vpndown="wg-quick down pia"; }; interactiveShellInit = '' set fish_greeting # Disable greeting diff --git a/shared/mpv.nix b/shared/mpv.nix new file mode 100644 index 0000000..b4dbd37 --- /dev/null +++ b/shared/mpv.nix @@ -0,0 +1,24 @@ +{ pkgs, lib, myhostname, ... }: +{ + programs.mpv = { + enable = true; + + package = ( + pkgs.mpv-unwrapped.wrapper { + scripts = with pkgs.mpvScripts; [ + uosc + sponsorblock + ]; + + mpv = pkgs.mpv-unwrapped.override { + }; + } + ); + + config = { + profile = "high-quality"; + ytdl-format = "bestvideo+bestaudio"; + cache-default = 4000000; + }; + }; +} diff --git a/shared/ssh.nix b/shared/ssh.nix index 6a2757d..d85680e 100644 --- a/shared/ssh.nix +++ b/shared/ssh.nix @@ -79,6 +79,17 @@ port = 22; user = "ifacts"; identityFile = "/home/fw/.ssh/ifacts-ssh-key"; + }; + "kobo" = { + hostname = "192.168.1.192"; + port = 22; + user = "root"; + }; + "disa" = { + hostname = "192.168.1.242"; + port = 22; + user = "disah"; + identityFile = "/home/fw/.ssh/id_rsa"; }; }; }; diff --git a/shared/zathura.nix b/shared/zathura.nix index 9281315..9362129 100644 --- a/shared/zathura.nix +++ b/shared/zathura.nix @@ -4,6 +4,10 @@ enable = true; options = { selection-clipboard = "clipboard"; + font = "FiraCodeNerdFont Normal 12"; }; + extraConfig = '' + include catppuccin-latte + ''; }; }