From ec9057a3dcd4afa87a9c54fe4ff8db42f53fd6fb Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Sun, 26 Dec 2021 12:38:23 +0000 Subject: [PATCH] update a lot of things but meh --- flake.lock | 74 ++++++++++++++++++++++++++++++-- flake.nix | 2 + home/network_manager/nm.nix | 2 +- home/sway/mako.nix | 6 +++ home/sway/sway.nix | 41 +++++++++++++----- hosts/lappy.nix | 1 + profiles/bluetooth/bluetooth.nix | 4 ++ profiles/dev/archives.nix | 11 +++++ profiles/dev/extra.nix | 1 - profiles/dev/reversing.nix | 9 ++++ profiles/network_manager/nm.nix | 1 + profiles/pulse/default.nix | 16 ++++++- profiles/sway/sway.nix | 6 ++- 13 files changed, 156 insertions(+), 18 deletions(-) create mode 100644 home/sway/mako.nix create mode 100644 profiles/bluetooth/bluetooth.nix create mode 100644 profiles/dev/reversing.nix diff --git a/flake.lock b/flake.lock index 60be71e..8d640d8 100644 --- a/flake.lock +++ b/flake.lock @@ -1,8 +1,44 @@ { "nodes": { + "deploy-rs": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs", + "utils": "utils" + }, + "locked": { + "lastModified": 1638665590, + "narHash": "sha256-nhtfL3z4TizWHemyZvgLvq11FhYX5Ya4ke+t6Np5PKQ=", + "owner": "serokell", + "repo": "deploy-rs", + "rev": "715e92a13018bc1745fb680b5860af0c5641026a", + "type": "github" + }, + "original": { + "owner": "serokell", + "repo": "deploy-rs", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1627913399, + "narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "home-manager": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1640417317, @@ -19,6 +55,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1632086102, + "narHash": "sha256-wVTcf0UclFS+zHtfPToB13jIO7n0U9N50MuRbPjQViE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e0ce3c683ae677cf5aab597d645520cddd13392b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1640418986, "narHash": "sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=", @@ -32,7 +84,7 @@ "type": "indirect" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1640319671, "narHash": "sha256-ZkKmakwaOaLiZOpIZWbeJZwap5CzJ30s4UJTfydYIYc=", @@ -50,8 +102,24 @@ }, "root": { "inputs": { + "deploy-rs": "deploy-rs", "home-manager": "home-manager", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" + } + }, + "utils": { + "locked": { + "lastModified": 1631561581, + "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 3b3bd90..fce426b 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,9 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager"; + deploy-rs.url = "github:serokell/deploy-rs"; }; + outputs = { ... }@inputs: import ./outputs.nix inputs; } diff --git a/home/network_manager/nm.nix b/home/network_manager/nm.nix index bb8fe29..48be58d 100644 --- a/home/network_manager/nm.nix +++ b/home/network_manager/nm.nix @@ -1,4 +1,4 @@ { config, ... }: { xsession.preferStatusNotifierItems = true; - services = { network-manager-applet.enable = true; }; + services.network-manager-applet.enable = true; } diff --git a/home/sway/mako.nix b/home/sway/mako.nix new file mode 100644 index 0000000..44bb984 --- /dev/null +++ b/home/sway/mako.nix @@ -0,0 +1,6 @@ +{ config, pkgs, lib, ... }: { + programs.mako = { + enable = true; + defaultTimeout = 3000; + }; +} diff --git a/home/sway/sway.nix b/home/sway/sway.nix index 16aea58..2546182 100644 --- a/home/sway/sway.nix +++ b/home/sway/sway.nix @@ -19,6 +19,7 @@ libnotify light gobar + libdbusmenu-gtk3 ]; programs.zsh.profileExtra = '' @@ -34,17 +35,33 @@ GPG_TTY \ NIX_PATH \ SHLVL + systemctl --user import-environment + #exec systemctl --user start sway.service exec env --unset=SHLVL systemd-cat -t sway -- sway fi ''; - programs.mako = { - enable = true; - defaultTimeout = 3000; - }; + +programs.waybar = { + enable = true; + # style = '' + # * { + # font-family: Iosevka; + # } + # ''; + settings = [{ + position = "bottom"; + + modules-left = [ ]; + modules-center = [ ]; + modules-right = [ "tray" ]; + }]; + }; wayland.windowManager.sway = { enable = true; + wrapperFeatures.base = true; + wrapperFeatures.gtk = true; config = let terminal = "${pkgs.kitty}/bin/kitty"; @@ -52,6 +69,9 @@ cfg = config.wayland.windowManager.sway.config; in { + + + bars = [ { position = "top"; @@ -64,6 +84,10 @@ "${pkgs.gobar}/bin/gobar" "cpu\\|mem\\|weather\\(Leighton\\ Buzzard\\)\\|bat\\(BAT0\\)\\|time" ]; + + } + { + command = "${pkgs.waybar}/bin/waybar"; } ]; @@ -82,7 +106,9 @@ terminal = "${pkgs.kitty}/bin/kitty"; startup = [ - { command = "systemctl --user restart mako"; always = true; } + # gets blueman applet working for some reason + { command = "dbus-update-activation-environment DISPLAY"; always = true; } + { command = "nm-applet"; always = true; } ]; seat = { @@ -144,11 +170,6 @@ "${cfg.modifier}+Shift+${workspace}" = "move container to workspace ${workspace}"; }) [ "1" "2" "3" "4" "5" "6" "7" "8" "9" ])); }; - wrapperFeatures.gtk = true; - extraConfig = '' - bindswitch --reload --locked lid:on output eDP-1 disable - bindswitch --reload --locked lid:off output eDP-1 enable - ''; }; } diff --git a/hosts/lappy.nix b/hosts/lappy.nix index 927312c..5845a44 100644 --- a/hosts/lappy.nix +++ b/hosts/lappy.nix @@ -5,6 +5,7 @@ profiles.dev profiles.gui profiles.laptop + profiles.bluetooth profiles.pulse profiles.network_manager profiles.sway diff --git a/profiles/bluetooth/bluetooth.nix b/profiles/bluetooth/bluetooth.nix new file mode 100644 index 0000000..f3d21b1 --- /dev/null +++ b/profiles/bluetooth/bluetooth.nix @@ -0,0 +1,4 @@ +{ ... }: { + hardware.bluetooth.enable = true; + services.blueman.enable = true; +} diff --git a/profiles/dev/archives.nix b/profiles/dev/archives.nix index f4dbf75..18e5373 100644 --- a/profiles/dev/archives.nix +++ b/profiles/dev/archives.nix @@ -1,6 +1,17 @@ { pkgs, ... }: { environment.systemPackages = with pkgs; [ + zip unzip + p7zip + cabextract + cramfsprogs zstd + zlib + xz + gzip + bzip2 + squashfsTools + cpio + lz4 ]; } diff --git a/profiles/dev/extra.nix b/profiles/dev/extra.nix index 70e72e8..327a768 100644 --- a/profiles/dev/extra.nix +++ b/profiles/dev/extra.nix @@ -4,7 +4,6 @@ ripgrep fd pv - file tmux socat ]; diff --git a/profiles/dev/reversing.nix b/profiles/dev/reversing.nix new file mode 100644 index 0000000..a70a9ad --- /dev/null +++ b/profiles/dev/reversing.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: { + environment.systemPackages = with pkgs; [ + binwalk + file + binutils # strings + diffoscope + ]; + +} diff --git a/profiles/network_manager/nm.nix b/profiles/network_manager/nm.nix index 5294b58..d6e7372 100644 --- a/profiles/network_manager/nm.nix +++ b/profiles/network_manager/nm.nix @@ -7,4 +7,5 @@ }; }; }; + programs.nm-applet.enable = true; } diff --git a/profiles/pulse/default.nix b/profiles/pulse/default.nix index 5de6875..9c0a32d 100644 --- a/profiles/pulse/default.nix +++ b/profiles/pulse/default.nix @@ -1,4 +1,16 @@ -{ config, ... }: { +{ config, pkgs, ... }: { sound.enable = true; - hardware.pulseaudio.enable = true; + nixpkgs.config.pulseaudio = true; + hardware.pulseaudio = { + enable = true; + support32Bit = true; + extraModules = with pkgs; [ pkgs.pulseaudio-modules-bt ]; + package = pkgs.pulseaudioFull; + extraConfig = " + load-module module-switch-on-connect + "; + }; + environment.systemPackages = with pkgs; [ + pavucontrol + ]; } diff --git a/profiles/sway/sway.nix b/profiles/sway/sway.nix index b5703f3..16eb932 100644 --- a/profiles/sway/sway.nix +++ b/profiles/sway/sway.nix @@ -1,3 +1,7 @@ -{ config, ... }: { +{ config, pkgs, ... }: { programs.sway.enable = true; + programs.xwayland.enable = true; + services.xserver.enable = true; + systemd.services.display-manager.enable = true; + services.xserver.displayManager.sddm.enable = true; }