From ed3bf181efb35c9e84b4c124ad9f9abb4e6138f5 Mon Sep 17 00:00:00 2001 From: natto1784 Date: Tue, 15 Mar 2022 10:42:50 +0530 Subject: [PATCH] home: major restructuring needs more work --- flake.lock | 173 +++++++----------- flake.nix | 29 +-- home/{stuff => modules}/secret.nix | 0 home/natto.nix | 128 ------------- home/{ => natto}/config/bspwm/bspwmrc | 0 home/{ => natto}/config/dunst/dunstrc | 0 home/{ => natto}/config/dwm/autostart.sh | 0 home/{ => natto}/config/dwm/bruhstatus.sh | 0 home/{ => natto}/config/emacs/init.el | 0 home/{ => natto}/config/firefox/README.md | 0 .../{ => natto}/config/firefox/userChrome.css | 0 .../config/firefox/userContent.css | 0 home/{ => natto}/config/sxhkd/sxhkdrc | 0 home/{ => natto}/config/xmonad/nixos.xpm | 0 .../{ => natto}/config/xmonad/padding-icon.sh | 0 home/{ => natto}/config/xmonad/xmobar.hs | 0 home/{ => natto}/config/xmonad/xmonad.hs | 0 home/{ => natto}/config/zathura/zathurarc | 0 home/natto/default.nix | 13 ++ home/natto/pkgs.nix | 76 ++++++++ home/natto/programs.nix | 92 ++++++++++ home/{ => natto}/secrets/.zshrc.age | Bin home/natto/secrets/default.nix | 20 ++ home/{ => natto}/secrets/fish_variables.age | Bin home/{ => natto}/secrets/mpdasrc.age | Bin home/{stuff => natto}/services.nix | 0 home/natto/stuff.nix | 17 ++ home/{stuff => natto}/xsession.nix | 10 +- home/stuff/programs.nix | 42 ----- home/stuff/programs/emacs.nix | 64 ------- home/stuff/programs/ncmpcpp.nix | 57 ------ hosts/satori/pkgs.nix | 4 +- hosts/satori/services.nix | 1 + hosts/satori/stuff.nix | 24 +-- modules/emacs/default.nix | 11 +- 35 files changed, 326 insertions(+), 435 deletions(-) rename home/{stuff => modules}/secret.nix (100%) delete mode 100644 home/natto.nix rename home/{ => natto}/config/bspwm/bspwmrc (100%) rename home/{ => natto}/config/dunst/dunstrc (100%) rename home/{ => natto}/config/dwm/autostart.sh (100%) rename home/{ => natto}/config/dwm/bruhstatus.sh (100%) rename home/{ => natto}/config/emacs/init.el (100%) rename home/{ => natto}/config/firefox/README.md (100%) rename home/{ => natto}/config/firefox/userChrome.css (100%) rename home/{ => natto}/config/firefox/userContent.css (100%) rename home/{ => natto}/config/sxhkd/sxhkdrc (100%) rename home/{ => natto}/config/xmonad/nixos.xpm (100%) rename home/{ => natto}/config/xmonad/padding-icon.sh (100%) rename home/{ => natto}/config/xmonad/xmobar.hs (100%) rename home/{ => natto}/config/xmonad/xmonad.hs (100%) rename home/{ => natto}/config/zathura/zathurarc (100%) create mode 100644 home/natto/default.nix create mode 100644 home/natto/pkgs.nix create mode 100644 home/natto/programs.nix rename home/{ => natto}/secrets/.zshrc.age (100%) create mode 100644 home/natto/secrets/default.nix rename home/{ => natto}/secrets/fish_variables.age (100%) rename home/{ => natto}/secrets/mpdasrc.age (100%) rename home/{stuff => natto}/services.nix (100%) create mode 100644 home/natto/stuff.nix rename home/{stuff => natto}/xsession.nix (64%) delete mode 100644 home/stuff/programs.nix delete mode 100644 home/stuff/programs/emacs.nix delete mode 100644 home/stuff/programs/ncmpcpp.nix diff --git a/flake.lock b/flake.lock index d485de4..6b734b9 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,5 @@ { "nodes": { - "agenix": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1646800063, - "narHash": "sha256-4UDjnX0DAy9nniGKCX7JlVXi2YrdvCfflwEKfaZAOWU=", - "owner": "ryantm", - "repo": "agenix", - "rev": "25b5bcfce91f99bd9cad8680b3671da181e6ab85", - "type": "github" - }, - "original": { - "owner": "ryantm", - "repo": "agenix", - "type": "github" - } - }, "blobs": { "flake": false, "locked": { @@ -36,11 +18,11 @@ }, "emacs": { "locked": { - "lastModified": 1646791602, - "narHash": "sha256-w5joBHiZ+HATfSFaC9vhs4RKCDvM2t4az3r78zVHgzQ=", + "lastModified": 1647162387, + "narHash": "sha256-TK3jhGCsQkzlz43iKwUYk5c1xDZm2LkPn9LxpWczYs8=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "259a176c5a2e73ecfdaf1c31885a72b2a1fcdc1f", + "rev": "43fa2ef6dc8e0f9dbbbb26564b22b75478b7ef0b", "type": "github" }, "original": { @@ -112,14 +94,14 @@ }, "home-manager": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1646559628, - "narHash": "sha256-WDoqxH/IPTV8CkI15wwzvXYgXq9UPr8xd8WKziuaynw=", + "lastModified": 1647174789, + "narHash": "sha256-baXTzUZDx3KQ6PH5SvuiurgCnE417S+Za3q5FtSZiPo=", "owner": "nix-community", "repo": "home-manager", - "rev": "afe96e7433c513bf82375d41473c57d1f66b4e68", + "rev": "5d4327cff4a5e54be8ca33d7c8a8dce6bdb64b93", "type": "github" }, "original": { @@ -130,14 +112,14 @@ }, "home-manager-stable": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1643933536, - "narHash": "sha256-yRmsWAG4DnLxLIUtlaZsl0kH7rN5xSoyNRlf0YZrcH4=", + "lastModified": 1647175256, + "narHash": "sha256-7H+veXPM7IwdN1DoZqliwb9sghlN56koV5dnCu1kpsc=", "owner": "nix-community", "repo": "home-manager", - "rev": "2860d7e3bb350f18f7477858f3513f9798896831", + "rev": "a8d00f5c038cf7ec54e7dac9c57b171c1217f008", "type": "github" }, "original": { @@ -150,15 +132,15 @@ "mailserver": { "inputs": { "blobs": "blobs", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "utils": "utils" }, "locked": { - "lastModified": 1645895212, - "narHash": "sha256-SbR7HtHg7/UopLYLmMwwFZGF0BTmg0tLwIU/rQtRLfk=", + "lastModified": 1646481600, + "narHash": "sha256-TBJu0BjWpp9737sqC5E4Iz48t3AatDUcBtXKuVJEQVg=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "7de138037f62679e2fefa0549af543412dab0d1a", + "rev": "75728d2686dec5ef2a73cdf80174311587413392", "type": "gitlab" }, "original": { @@ -169,11 +151,11 @@ }, "master": { "locked": { - "lastModified": 1646804252, - "narHash": "sha256-oP1+exMOoXtWp4PmkfUmZ3qZjnmO2Hr0SobAhhpPOKo=", + "lastModified": 1647176932, + "narHash": "sha256-822tW7LLmC/eoR70szNeyvsHIje24brAgbfixp37iuk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "aee2b97688757216b64462b4470fb8992c067573", + "rev": "d853dc52d87692619412a074846144262d6a48b3", "type": "github" }, "original": { @@ -185,20 +167,19 @@ }, "nbfc": { "inputs": { - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "utils": "utils_2" }, "locked": { - "lastModified": 1631007119, - "narHash": "sha256-Q/HxFgwp71ZJ6tQnDKz1Wzl85orES3Gq3He+jrl6xFI=", - "owner": "natto1784", + "lastModified": 1646815880, + "narHash": "sha256-r/Ul0+LfoKWAYaIwEVR9WGsvMsJgg8M6Yz1fTazWGxc=", + "owner": "nbfc-linux", "repo": "nbfc-linux", - "rev": "f4137c8e6745faa3947116695bf46e413f446e57", + "rev": "5182dc0d4e66a67f976b291e122e007000ccc720", "type": "github" }, "original": { - "owner": "natto1784", - "ref": "yawr", + "owner": "nbfc-linux", "repo": "nbfc-linux", "type": "github" } @@ -213,11 +194,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1646712943, - "narHash": "sha256-FuYXH7g8OW8P+mAMLP/zx3zJOENtGIv5tLaOzKPP+is=", + "lastModified": 1647152497, + "narHash": "sha256-KNqAdyM0DQPSqb/low6Py9eUBQjfga0KAHAF6naMd7Y=", "owner": "neovim", "repo": "neovim", - "rev": "2783f4cc4a410cd3b73e8cdfbdf8c859c426c6c6", + "rev": "c9b94188d5f96349566372e8a0ce94e14fd6b549", "type": "github" }, "original": { @@ -229,7 +210,7 @@ }, "nix-gaming": { "inputs": { - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_5", "utils": "utils_3" }, "locked": { @@ -248,27 +229,25 @@ }, "nixpkgs": { "locked": { - "lastModified": 1638587357, - "narHash": "sha256-2ySMW3QARG8BsRPmwe7clTbdCuaObromOKewykP+UJc=", - "owner": "nixos", + "lastModified": 1646955661, + "narHash": "sha256-AYLta1PubJnrkv15+7G+6ErW5m9NcI9wSdJ+n7pKAe0=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "e34c5379866833f41e2a36f309912fa675d687c7", + "rev": "e9545762b032559c27d8ec9141ed63ceca1aa1ac", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-21.11", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "type": "indirect" } }, "nixpkgs_2": { "locked": { - "lastModified": 1646506091, - "narHash": "sha256-sWNAJE2m+HOh1jtXlHcnhxsj6/sXrHgbqVNcVRlveK4=", + "lastModified": 1646955661, + "narHash": "sha256-AYLta1PubJnrkv15+7G+6ErW5m9NcI9wSdJ+n7pKAe0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3e644bd62489b516292c816f70bf0052c693b3c7", + "rev": "e9545762b032559c27d8ec9141ed63ceca1aa1ac", "type": "github" }, "original": { @@ -277,20 +256,6 @@ } }, "nixpkgs_3": { - "locked": { - "lastModified": 1646506091, - "narHash": "sha256-sWNAJE2m+HOh1jtXlHcnhxsj6/sXrHgbqVNcVRlveK4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3e644bd62489b516292c816f70bf0052c693b3c7", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_4": { "locked": { "lastModified": 1642635915, "narHash": "sha256-vabPA32j81xBO5m3+qXndWp5aqepe+vu96Wkd9UnngM=", @@ -305,23 +270,22 @@ "type": "indirect" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1626852498, - "narHash": "sha256-lOXUJvi0FJUXHTVSiC5qsMRtEUgqM4mGZpMESLuGhmo=", - "owner": "nixos", + "lastModified": 1646811357, + "narHash": "sha256-JJdz8QJ8Gz9ZChGfl4P9Cm8C9mYJLRGVsXcY9gNPtuI=", + "owner": "nixOS", "repo": "nixpkgs", - "rev": "16105403bdd843540cbef9c63fc0f16c1c6eaa70", + "rev": "e1f52cabc3cf7e22015f6ef940d3fb31ef1f0d40", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", + "owner": "nixOS", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { "lastModified": 1645162597, "narHash": "sha256-S4sRtJBqVlBg4H7EPAv0NFofGNCayHEMpLnUzGNCCKM=", @@ -336,13 +300,13 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_6": { "locked": { - "lastModified": 1646506091, - "narHash": "sha256-sWNAJE2m+HOh1jtXlHcnhxsj6/sXrHgbqVNcVRlveK4=", + "lastModified": 1646955661, + "narHash": "sha256-AYLta1PubJnrkv15+7G+6ErW5m9NcI9wSdJ+n7pKAe0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3e644bd62489b516292c816f70bf0052c693b3c7", + "rev": "e9545762b032559c27d8ec9141ed63ceca1aa1ac", "type": "github" }, "original": { @@ -352,13 +316,13 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_7": { "locked": { - "lastModified": 1646497237, - "narHash": "sha256-Ccpot1h/rV8MgcngDp5OrdmLTMaUTbStZTR5/sI7zW0=", + "lastModified": 1646939531, + "narHash": "sha256-bxOjVqcsccCNm+jSmEh/bm0tqfE3SdjwS+p+FZja3ho=", "owner": "nixos", "repo": "nixpkgs", - "rev": "062a0c5437b68f950b081bbfc8a699d57a4ee026", + "rev": "fcd48a5a0693f016a5c370460d0c2a8243b882dc", "type": "github" }, "original": { @@ -368,7 +332,7 @@ "type": "github" } }, - "nixpkgs_9": { + "nixpkgs_8": { "locked": { "lastModified": 1637453606, "narHash": "sha256-Gy6cwUswft9xqsjWxFYEnx/63/qzaFUwatcbV5GF/GQ=", @@ -386,11 +350,11 @@ }, "nur": { "locked": { - "lastModified": 1646798858, - "narHash": "sha256-16HNEkAzf4F/DgPeIUHxql1WKuz33ut5avZ6OG9WOIA=", + "lastModified": 1647175668, + "narHash": "sha256-6AKGFi5BI6/u4Ux9a66hXTZ7jNmDdmlVZS71lL6EWL4=", "owner": "nix-community", "repo": "NUR", - "rev": "94da5e72a447a3131cef722a027841905e82cf96", + "rev": "528c18d44723070591ac643a2ad1885b86a48904", "type": "github" }, "original": { @@ -403,14 +367,14 @@ "inputs": { "flake-compat": "flake-compat", "neovim-flake": "neovim-flake", - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1646727299, - "narHash": "sha256-i18vMn+iXvPRAxPb96lEuEVkrQ75qKEZZomfo67JRJI=", + "lastModified": 1647159229, + "narHash": "sha256-aGawpstqvThlV5OWqCAFIFBc8apYvMT/Qwig111coSo=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "c26d33c2fbcf5f689a2592b2353f4f8765eea1da", + "rev": "4cf0e4a5738fb247f191a35c7c3900c4f06caca3", "type": "github" }, "original": { @@ -437,7 +401,6 @@ }, "root": { "inputs": { - "agenix": "agenix", "emacs": "emacs", "home-manager": "home-manager", "home-manager-stable": "home-manager-stable", @@ -445,7 +408,7 @@ "master": "master", "nbfc": "nbfc", "nix-gaming": "nix-gaming", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_6", "nur": "nur", "nvim": "nvim", "old": "old", @@ -457,14 +420,14 @@ "rust": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1646792695, - "narHash": "sha256-2drCXIKIQnJMlTZbcCfuHZAh+iPcdlRkCqtZnA6MHLY=", + "lastModified": 1647138040, + "narHash": "sha256-rG9G4ND7hoG7VVIe614s0s76jEcZjhFm1JO1m5EiSsI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7f599870402c8d2a5806086c8ee0f2d92b175c54", + "rev": "c984623eb0584a2aadeca505dd85ec68a3f5a576", "type": "github" }, "original": { @@ -475,11 +438,11 @@ }, "stable": { "locked": { - "lastModified": 1646588256, - "narHash": "sha256-ZHljmNlt19nSm0Mz8fx6QEhddKUkU4hhwFmfNmGn+EY=", + "lastModified": 1646933238, + "narHash": "sha256-RZJnLN0o4B35eTnUc2tEAD12X5TNeeJhhvH3Fd6Pmdo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2ebb6c1e5ae402ba35cca5eec58385e5f1adea04", + "rev": "bacbfd713b4781a4a82c1f390f8fe21ae3b8b95b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c9c1819..2d9d37c 100644 --- a/flake.nix +++ b/flake.nix @@ -7,11 +7,10 @@ home-manager.url = github:nix-community/home-manager; home-manager-stable.url = github:nix-community/home-manager/release-21.11; nur.url = github:nix-community/NUR; - agenix.url = github:ryantm/agenix; utils.url = github:numtide/flake-utils; nvim.url = github:nix-community/neovim-nightly-overlay; mailserver.url = gitlab:simple-nixos-mailserver/nixos-mailserver; - nbfc.url = github:natto1784/nbfc-linux/yawr; + nbfc.url = github:nbfc-linux/nbfc-linux; emacs.url = github:nix-community/emacs-overlay; nix-gaming.url = github:fufexan/nix-gaming; rust.url = github:oxalica/rust-overlay; @@ -46,7 +45,7 @@ inputs.emacs.overlay channels (_: _: { - nbfc-linux = inputs.nbfc.defaultPackage.${system}; + nbfc-linux = inputs.nbfc.packages.${system}.nbfc-client-c; games = inputs.nix-gaming.packages.${system}; }) ]; @@ -70,18 +69,21 @@ ./modules/min-pkgs.nix ./modules/min-stuff.nix ]; + homeModules = [ + ./home/modules/secret.nix + ]; builders = [ ./modules/x86builder.nix ]; in { hm-configs = { - natto = inputs.home-manager.lib.homeManagerConfiguration { + natto = inputs.home-manager.lib.homeManagerConfiguration rec { system = "x86_64-linux"; configuration = { lib, ... }: { imports = [ - ./home/natto.nix - ]; + ./home/natto + ] ++ homeModules; nixpkgs = { - overlays = self.legacyPackages.x86_64-linux.overlays; + overlays = self.legacyPackages.${system}.overlays; config.allowUnfree = true; config.allowBroken = true; config.permittedInsecurePackages = [ @@ -96,13 +98,12 @@ nixosConfigurations = { #Home laptop - Satori = nixpkgs.lib.nixosSystem { + Satori = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = [ ./hosts/satori - inputs.agenix.nixosModules.age { - nixpkgs.pkgs = self.legacyPackages.x86_64-linux; + nixpkgs.pkgs = self.legacyPackages.${system}; } ] ++ personalModules @@ -110,13 +111,13 @@ }; #Home server (RPi4) - Marisa = nixpkgs.lib.nixosSystem { + Marisa = nixpkgs.lib.nixosSystem rec { system = "aarch64-linux"; modules = [ ./hosts/marisa #inputs.mailserver.nixosModules.mailserver { - nixpkgs.pkgs = self.legacyPackages.aarch64-linux; + nixpkgs.pkgs = self.legacyPackages.${system}; } ] ++ commonModules @@ -124,13 +125,13 @@ }; #Oracle Cloud VM - Remilia = nixpkgs.lib.nixosSystem { + Remilia = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = [ ./hosts/remilia inputs.mailserver.nixosModules.mailserver { - nixpkgs.pkgs = self.legacyPackages.x86_64-linux; + nixpkgs.pkgs = self.legacyPackages.${system}; } ] ++ commonModules diff --git a/home/stuff/secret.nix b/home/modules/secret.nix similarity index 100% rename from home/stuff/secret.nix rename to home/modules/secret.nix diff --git a/home/natto.nix b/home/natto.nix deleted file mode 100644 index d14746c..0000000 --- a/home/natto.nix +++ /dev/null @@ -1,128 +0,0 @@ -{ config, pkgs, lib, ... }: -let - home = config.home.homeDirectory; -in -{ - imports = [ - ./stuff/programs.nix - ./stuff/xsession.nix - ./stuff/secret.nix - ./stuff/services.nix - ]; - nixpkgs = { - config = { - allowUnfree = true; - }; - }; - - age = { - sshKeyPaths = [ "${home}/.ssh/id_ed25519" ]; - secrets = { - /* fish_variables = { - file = ./secrets/fish_variables.age; - path = "${home}/.config/fish/fish_variables"; - mode = "660"; - }; - */ - mpdasrc = { - file = ./secrets/mpdasrc.age; - path = "${home}/.config/mpdasrc"; - }; - zshrc = { - file = ./secrets/.zshrc.age; - path = "${home}/.zshrc"; - mode = "660"; - }; - }; - }; - home = { - packages = with pkgs; [ - ffmpeg-full - sox - rage - curl - pamixer - mpdas - pavucontrol - unstable.anup - xfce.thunar - xfce.xfconf - xfce.tumbler - master.discord - mpd_discord_richpresence - sox - qbittorrent - #tor-browser-bundle-bin - mpc_cli - hexchat - luajit - mpv - jmtpfs - dunst - flameshot - yt-dlp - xclip - xorg.xkbcomp - xorg.xmodmap - p7zip - unrar - glxinfo - sxiv - vim - feh - dmenu - st - neofetch - xmobar - xdotool - arc-theme - arc-icon-theme - tor-browser-bundle-bin - wineWowPackages.stable - master.winetricks - games.wine-discord-ipc-bridge - (games.osu-stable.overrideAttrs (_: { - tricks = [ "gdiplus" "dotnet48" "meiryo" ]; - })) - pmidi - # dosbox - authy - unstable.premid - (master.tauon.override { withDiscordRPC = true; }) - nbfc-linux - pulseaudio - (texlive.combine { inherit (texlive) scheme-small babel lm graphics-def url; }) - # carla - # electrum - anki-bin - spotify - deluge - teams -# libreoffice - google-drive-ocamlfuse - customscripts - (qjackctl.override { jackSession = true; }) - stable.ardour - calf - # stable.blender - neomutt - mailcap - cantata - ]; - - file = { - /* dwm-autostart = { - source = ./config/dwm/autostart.sh; - target = "${home}/.dwm/autostart.sh"; - }; - dwm-status = { - source = ./config/dwm/bruhstatus.sh; - target = "${home}/.dwm/bruhstatus.sh"; - };*/ - dunstrc = { - source = ./config/dunst/dunstrc; - target = "${home}/.config/dunst/dunstrc"; - }; - }; - }; -} diff --git a/home/config/bspwm/bspwmrc b/home/natto/config/bspwm/bspwmrc similarity index 100% rename from home/config/bspwm/bspwmrc rename to home/natto/config/bspwm/bspwmrc diff --git a/home/config/dunst/dunstrc b/home/natto/config/dunst/dunstrc similarity index 100% rename from home/config/dunst/dunstrc rename to home/natto/config/dunst/dunstrc diff --git a/home/config/dwm/autostart.sh b/home/natto/config/dwm/autostart.sh similarity index 100% rename from home/config/dwm/autostart.sh rename to home/natto/config/dwm/autostart.sh diff --git a/home/config/dwm/bruhstatus.sh b/home/natto/config/dwm/bruhstatus.sh similarity index 100% rename from home/config/dwm/bruhstatus.sh rename to home/natto/config/dwm/bruhstatus.sh diff --git a/home/config/emacs/init.el b/home/natto/config/emacs/init.el similarity index 100% rename from home/config/emacs/init.el rename to home/natto/config/emacs/init.el diff --git a/home/config/firefox/README.md b/home/natto/config/firefox/README.md similarity index 100% rename from home/config/firefox/README.md rename to home/natto/config/firefox/README.md diff --git a/home/config/firefox/userChrome.css b/home/natto/config/firefox/userChrome.css similarity index 100% rename from home/config/firefox/userChrome.css rename to home/natto/config/firefox/userChrome.css diff --git a/home/config/firefox/userContent.css b/home/natto/config/firefox/userContent.css similarity index 100% rename from home/config/firefox/userContent.css rename to home/natto/config/firefox/userContent.css diff --git a/home/config/sxhkd/sxhkdrc b/home/natto/config/sxhkd/sxhkdrc similarity index 100% rename from home/config/sxhkd/sxhkdrc rename to home/natto/config/sxhkd/sxhkdrc diff --git a/home/config/xmonad/nixos.xpm b/home/natto/config/xmonad/nixos.xpm similarity index 100% rename from home/config/xmonad/nixos.xpm rename to home/natto/config/xmonad/nixos.xpm diff --git a/home/config/xmonad/padding-icon.sh b/home/natto/config/xmonad/padding-icon.sh similarity index 100% rename from home/config/xmonad/padding-icon.sh rename to home/natto/config/xmonad/padding-icon.sh diff --git a/home/config/xmonad/xmobar.hs b/home/natto/config/xmonad/xmobar.hs similarity index 100% rename from home/config/xmonad/xmobar.hs rename to home/natto/config/xmonad/xmobar.hs diff --git a/home/config/xmonad/xmonad.hs b/home/natto/config/xmonad/xmonad.hs similarity index 100% rename from home/config/xmonad/xmonad.hs rename to home/natto/config/xmonad/xmonad.hs diff --git a/home/config/zathura/zathurarc b/home/natto/config/zathura/zathurarc similarity index 100% rename from home/config/zathura/zathurarc rename to home/natto/config/zathura/zathurarc diff --git a/home/natto/default.nix b/home/natto/default.nix new file mode 100644 index 0000000..950ae0d --- /dev/null +++ b/home/natto/default.nix @@ -0,0 +1,13 @@ +{ config, pkgs, lib, ... }: +let +in +{ + imports = [ + ./secrets + ./programs.nix + ./xsession.nix + ./services.nix + ./pkgs.nix + ./stuff.nix + ]; +} diff --git a/home/natto/pkgs.nix b/home/natto/pkgs.nix new file mode 100644 index 0000000..698cff6 --- /dev/null +++ b/home/natto/pkgs.nix @@ -0,0 +1,76 @@ +{ config, pkgs, ... }: +{ + home.packages = with pkgs; [ + ffmpeg-full + sox + rage + curl + pamixer + mpdas + pavucontrol + unstable.anup + xfce.thunar + xfce.xfconf + xfce.tumbler + master.discord + mpd_discord_richpresence + sox + qbittorrent + #tor-browser-bundle-bin + mpc_cli + hexchat + luajit + mpv + jmtpfs + dunst + flameshot + yt-dlp + xclip + xorg.xkbcomp + xorg.xmodmap + p7zip + unrar + glxinfo + sxiv + vim + feh + dmenu + st + neofetch + xmobar + xdotool + arc-theme + arc-icon-theme + tor-browser-bundle-bin + wineWowPackages.stable + master.winetricks + games.wine-discord-ipc-bridge + (games.osu-stable.overrideAttrs (_: { + tricks = [ "gdiplus" "dotnet48" "meiryo" ]; + })) + pmidi + # dosbox + authy + unstable.premid + (master.tauon.override { withDiscordRPC = true; }) + nbfc-linux + pulseaudio + (texlive.combine { inherit (texlive) scheme-small babel lm graphics-def url mhchem wrapfig capt-of; }) + # carla + # electrum + anki-bin + spotify + deluge + teams + # libreoffice + google-drive-ocamlfuse + customscripts + (qjackctl.override { jackSession = true; }) + stable.lmms + # stable.blender + neomutt + mailcap + element-desktop + syncplay + ]; +} diff --git a/home/natto/programs.nix b/home/natto/programs.nix new file mode 100644 index 0000000..9d9c370 --- /dev/null +++ b/home/natto/programs.nix @@ -0,0 +1,92 @@ +{ pkgs, config, ... }: +{ + programs = { + firefox = { + enable = true; + package = pkgs.master.firefox-bin; + profiles.natto = { + name = "natto"; + # userChrome = builtins.readFile ./config/firefox/userChrome.css; + # userContent = builtins.readFile ./config/firefox/userContent.css; + }; + }; + /* chromium = { + enable = true; + package = pkgs.ungoogled-chromium; + }; */ + zathura = { + enable = true; + extraConfig = builtins.readFile ./config/zathura/zathurarc; + options = { + recolor = true; + recolor-lightcolor = "rgba(0,0,0,0)"; + default-bg = "rgba(0,0,0,0.8)"; + }; + }; + mpv = { + enable = true; + config = { + force-window = "yes"; + keep-open = "yes"; + save-position-on-quit = "yes"; + # autofit="100%"; + # no-keepaspect-window = "yes"; + }; + }; + go.enable = true; + ncmpcpp = { + enable = true; + mpdMusicDir = ~/Music; + settings = { + autocenter_mode = "yes"; + follow_now_playing_lyrics = "yes"; + lyrics_directory = "~/.lyrics"; + fetch_lyrics_for_current_song_in_background = "yes"; + #store_lyrics_in_song_dir = yes; + browser_sort_mode = "mtime"; + colors_enabled = "yes"; + main_window_color = "white"; + header_window_color = "143"; + volume_color = "222"; + progressbar_color = "143"; + # progressbar_elapsed_color = ""; + # statusbar_color = "43"; + active_window_border = "blue"; + user_interface = "alternative"; + #song_list_format="(4)[230]{l}"; + song_columns_list_format = "(4)[167]{l} (20)[109]{t} (12)[143]{a} (16)[139]{b}"; + song_list_format = "$(222){%a} - $(109){%t}"; + #song_list_format = "{$7%a - $9}{$5%t$9}|{$5%f$9}$R{$6%b $9}{$3%l$9}"; + song_status_format = " $6%a $7⟫⟫ $3%t $7⟫⟫ $4%b "; + visualizer_data_source = "/tmp/g.fifo"; + #visualizer_output_name = "my_fifo"; + visualizer_type = "spectrum"; + #visualizer_type = "ellipse"; + visualizer_fps = "144"; + visualizer_in_stereo = "yes"; + visualizer_look = "◆▋"; + visualizer_spectrum_smooth_look = "yes"; + playlist_editor_display_mode = "classic"; + playlist_display_mode = "columns"; + cyclic_scrolling = "yes"; + lines_scrolled = "2"; + system_encoding = "utf-8"; + regular_expressions = "extended"; + #selected_item_prefix = "* " + #discard_colors_if_item_is_selected = "no" + #incremental_seeking = "yes" + #seek_time = "1" + header_visibility = "yes"; + statusbar_visibility = "yes"; + titles_visibility = "yes"; + progressbar_look = "▃▃▃"; + now_playing_prefix = "> "; + centered_cursor = "yes"; + display_bitrate = "yes"; + enable_window_title = "yes"; + empty_tag_marker = ""; + execute_on_song_change = "${config.home.homeDirectory}/.config/ncmpcpp/ncmpcpp-ueberzug/ncmpcpp_cover_art.sh"; + }; + }; + }; +} diff --git a/home/secrets/.zshrc.age b/home/natto/secrets/.zshrc.age similarity index 100% rename from home/secrets/.zshrc.age rename to home/natto/secrets/.zshrc.age diff --git a/home/natto/secrets/default.nix b/home/natto/secrets/default.nix new file mode 100644 index 0000000..b273aca --- /dev/null +++ b/home/natto/secrets/default.nix @@ -0,0 +1,20 @@ +{ config, ... }: { + age = + let + home = config.home.homeDirectory; + in + { + sshKeyPaths = [ "${home}/.ssh/id_ed25519" ]; + secrets = { + mpdasrc = { + file = ./mpdasrc.age; + path = "${home}/.config/mpdasrc"; + }; + zshrc = { + file = ./.zshrc.age; + path = "${home}/.zshrc"; + mode = "660"; + }; + }; + }; +} diff --git a/home/secrets/fish_variables.age b/home/natto/secrets/fish_variables.age similarity index 100% rename from home/secrets/fish_variables.age rename to home/natto/secrets/fish_variables.age diff --git a/home/secrets/mpdasrc.age b/home/natto/secrets/mpdasrc.age similarity index 100% rename from home/secrets/mpdasrc.age rename to home/natto/secrets/mpdasrc.age diff --git a/home/stuff/services.nix b/home/natto/services.nix similarity index 100% rename from home/stuff/services.nix rename to home/natto/services.nix diff --git a/home/natto/stuff.nix b/home/natto/stuff.nix new file mode 100644 index 0000000..e1e2e50 --- /dev/null +++ b/home/natto/stuff.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: { + home = + let + home = config.home.homeDirectory; + in + { + sessionVariables = { + LV2_PATH = lib.makeSearchPath "lib/lv2" (with pkgs; [ calf ]); + }; + file = { + dunstrc = { + source = ./config/dunst/dunstrc; + target = "${home}/.config/dunst/dunstrc"; + }; + }; + }; +} diff --git a/home/stuff/xsession.nix b/home/natto/xsession.nix similarity index 64% rename from home/stuff/xsession.nix rename to home/natto/xsession.nix index e14e2b8..262edfb 100644 --- a/home/stuff/xsession.nix +++ b/home/natto/xsession.nix @@ -1,4 +1,4 @@ -{pkgs, config, ...}: +{ pkgs, config, ... }: { xsession = { pointerCursor = { @@ -14,11 +14,11 @@ enable = true; enableContribAndExtras = true; extraPackages = hs: [ hs.xmobar ]; - config = ../config/xmonad/xmonad.hs; + config = ./config/xmonad/xmonad.hs; libFiles = { - "xmobar.hs" = ../config/xmonad/xmobar.hs; - "padding-icon.sh" = ../config/xmonad/padding-icon.sh; - "nixos.xpm" = ../config/xmonad/nixos.xpm; + "xmobar.hs" = ./config/xmonad/xmobar.hs; + "padding-icon.sh" = ./config/xmonad/padding-icon.sh; + "nixos.xpm" = ./config/xmonad/nixos.xpm; }; }; }; diff --git a/home/stuff/programs.nix b/home/stuff/programs.nix deleted file mode 100644 index 8d033ca..0000000 --- a/home/stuff/programs.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ pkgs, config, ...}: -{ - imports = [ - ./programs/ncmpcpp.nix - ./programs/emacs.nix - ]; - programs = { - firefox = { - enable = true; - package = pkgs.firefox-bin; - profiles.natto = { - name = "natto"; - # userChrome = builtins.readFile ../config/firefox/userChrome.css; - # userContent = builtins.readFile ../config/firefox/userContent.css; - }; - }; - /* chromium = { - enable = true; - package = pkgs.ungoogled-chromium; - };*/ - zathura = { - enable = true; - extraConfig = builtins.readFile ../config/zathura/zathurarc; - options = { - recolor = true; - recolor-lightcolor = "rgba(0,0,0,0)"; - default-bg = "rgba(0,0,0,0.8)"; - }; - }; - mpv = { - enable = true; - config = { - force-window = "yes"; - keep-open = "yes"; - save-position-on-quit = "yes"; - # autofit="100%"; -# no-keepaspect-window = "yes"; - }; - }; - go.enable = true; - }; -} diff --git a/home/stuff/programs/emacs.nix b/home/stuff/programs/emacs.nix deleted file mode 100644 index c5072f1..0000000 --- a/home/stuff/programs/emacs.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ pkgs, config, ... }: -{ - programs.emacs = { - enable = false; - extraPackages = epkgs: with epkgs; [ - elcord - gruvbox-theme - ivy - rainbow-delimiters - evil - evil-colemak-basics - treemacs - treemacs-evil - lsp-mode - lsp-treemacs - lsp-ui - tree-sitter - tree-sitter-langs - tsc - ]; - overrides = self: super : { - tsc = super.tsc.overrideAttrs(oa: - let - tsc-dyn = version: pkgs.fetchurl { - url = "https://github.com/emacs-tree-sitter/elisp-tree-sitter/releases/download/${version}/tsc-dyn.so"; - sha256 = "sha256-oOq/TAooHRUo7JypCblrB/ztABowAHv2LRhFL/ZmVrg="; - }; - in { postInstall = oa.postInstall or "" + "cp ${tsc-dyn "0.15.2"} $out/share/emacs/site-lisp/elpa/tsc-${super.tsc.version}/tsc-dyn.so" ;}); - tree-sitter-langs = pkgs.symlinkJoin rec { - name = "tree-sitter-langs"; - paths = - let - tree-sitter-grammars = pkgs.stdenv.mkDerivation rec { - name = "tree-sitter-grammars"; - version = "0.10.4"; - src = pkgs.fetchzip { - url = "https://github.com/emacs-tree-sitter/tree-sitter-langs/releases/download/${version}/tree-sitter-grammars-linux-${version}.tar.gz"; - sha256 = "sha256-Z+JtuGLTCVhCJBR60cbcDgWtdKcoYGWoeI5u9GcfvUQ="; - stripRoot = false; - }; - installPhase = '' - install -d $out/langs/bin - install -m444 * $out/langs/bin - echo -n $version > $out/langs/bin/BUNDLE-VERSION - ''; - }; - in - [ - (super.tree-sitter-langs.overrideAttrs (oldAttrs: { - postPatch = oldAttrs.postPatch or "" + '' - substituteInPlace ./tree-sitter-langs-build.el \ - --replace "tree-sitter-langs-grammar-dir tree-sitter-langs--dir" "tree-sitter-langs-grammar-dir \"${tree-sitter-grammars}/langs\"" - ''; - })) - tree-sitter-grammars - ]; - }; - }; - }; - home.file.emacs = { - source = ../../config/emacs/init.el; - target = "${config.home.homeDirectory}/.emacs.d/init.el"; - }; -} diff --git a/home/stuff/programs/ncmpcpp.nix b/home/stuff/programs/ncmpcpp.nix deleted file mode 100644 index de0153a..0000000 --- a/home/stuff/programs/ncmpcpp.nix +++ /dev/null @@ -1,57 +0,0 @@ -{config, ...}: -{ - programs.ncmpcpp = { - enable = true; - mpdMusicDir = ~/Music; - settings = { - autocenter_mode = "yes"; - follow_now_playing_lyrics = "yes"; - lyrics_directory = "~/.lyrics"; - fetch_lyrics_for_current_song_in_background = "yes"; - #store_lyrics_in_song_dir = yes; - browser_sort_mode="mtime"; - colors_enabled = "yes"; - main_window_color = "white"; - header_window_color = "143"; - volume_color = "222"; - progressbar_color = "143"; - # progressbar_elapsed_color = ""; - # statusbar_color = "43"; - active_window_border = "blue"; - user_interface = "alternative"; - #song_list_format="(4)[230]{l}"; - song_columns_list_format = "(4)[167]{l} (20)[109]{t} (12)[143]{a} (16)[139]{b}"; - song_list_format = "$(222){%a} - $(109){%t}"; - #song_list_format = "{$7%a - $9}{$5%t$9}|{$5%f$9}$R{$6%b $9}{$3%l$9}"; - song_status_format = " $6%a $7⟫⟫ $3%t $7⟫⟫ $4%b "; - visualizer_data_source = "/tmp/g.fifo"; - #visualizer_output_name = "my_fifo"; - visualizer_type = "spectrum"; - #visualizer_type = "ellipse"; - visualizer_fps = "144"; - visualizer_in_stereo = "yes"; - visualizer_look = "◆▋"; - visualizer_spectrum_smooth_look="yes"; - playlist_editor_display_mode = "classic"; - playlist_display_mode = "columns"; - cyclic_scrolling = "yes"; - lines_scrolled = "2"; - system_encoding = "utf-8"; - regular_expressions = "extended"; - #selected_item_prefix = "* " - #discard_colors_if_item_is_selected = "no" - #incremental_seeking = "yes" - #seek_time = "1" - header_visibility = "yes"; - statusbar_visibility = "yes"; - titles_visibility = "yes"; - progressbar_look = "▃▃▃"; - now_playing_prefix = "> "; - centered_cursor = "yes"; - display_bitrate = "yes"; - enable_window_title = "yes"; - empty_tag_marker = ""; - execute_on_song_change="${config.home.homeDirectory}/.config/ncmpcpp/ncmpcpp-ueberzug/ncmpcpp_cover_art.sh"; - }; - }; -} diff --git a/hosts/satori/pkgs.nix b/hosts/satori/pkgs.nix index 70fc4d3..495a848 100644 --- a/hosts/satori/pkgs.nix +++ b/hosts/satori/pkgs.nix @@ -39,6 +39,7 @@ unset VK_ICD_FILENAMES export VK_ICD_FILENAMES=${config.hardware.nvidia.package}/share/vulkan/icd.d/nvidia_icd.json:${config.hardware.nvidia.package.lib32}/share/vulkan/icd.d/nvidia_icd32.json''; }) + igrep ]; programs = { @@ -51,9 +52,6 @@ }; zsh = { enable = true; - shellAliases = { - "ec" = "emacsclient"; - }; promptInit = '' RPROMPT='%B%F{cyan}%n%f@%F{red}%m%b' function preexec() { diff --git a/hosts/satori/services.nix b/hosts/satori/services.nix index c40caf6..2f3c031 100644 --- a/hosts/satori/services.nix +++ b/hosts/satori/services.nix @@ -13,6 +13,7 @@ ACTION=="add|change", KERNEL=="sda", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="bfq" ''; }; + systemd.services.tor.wantedBy = lib.mkForce []; systemd.enableUnifiedCgroupHierarchy = false; security.pki.certificateFiles = [ ../../cert.pem ]; virtualisation.libvirtd = { diff --git a/hosts/satori/stuff.nix b/hosts/satori/stuff.nix index e85580c..d9bbe49 100644 --- a/hosts/satori/stuff.nix +++ b/hosts/satori/stuff.nix @@ -1,21 +1,23 @@ -{lib, config, agenix, pkgs, ... }: +{ lib, config, agenix, pkgs, ... }: { time.timeZone = "Asia/Kolkata"; environment = { - etc."current-system-packages".text = - let - packages = builtins.map (p: "${p.name}") config.environment.systemPackages; - sortedUnique = builtins.sort builtins.lessThan (lib.unique packages); - formatted = builtins.concatStringsSep "\n" sortedUnique; - in - formatted; + etc."current-system-packages".text = + let + packages = builtins.map (p: "${p.name}") config.environment.systemPackages; + sortedUnique = builtins.sort builtins.lessThan (lib.unique packages); + formatted = builtins.concatStringsSep "\n" sortedUnique; + in + formatted; sessionVariables = { - QT_X11_NO_MITSHM="1"; + QT_X11_NO_MITSHM = "1"; QT_QPA_PLATFORMTHEME = "gtk3"; }; + localBinInPath = true; + }; - security={ + security = { sudo.enable = false; doas = { enable = true; @@ -24,7 +26,7 @@ users = [ "natto" ]; keepEnv = true; persist = true; - setEnv =[ "SSH_AUTH_SOCK" "PATH" "SHELL" "HOME" ]; + setEnv = [ "SSH_AUTH_SOCK" "PATH" "SHELL" "HOME" ]; } ]; }; diff --git a/modules/emacs/default.nix b/modules/emacs/default.nix index cf9eaec..3a7a632 100644 --- a/modules/emacs/default.nix +++ b/modules/emacs/default.nix @@ -10,15 +10,14 @@ use-package tsc ]; - #https://github.com/NixOS/nixpkgs/issues/108089 override = epkgs: epkgs // { tsc = epkgs.melpaPackages.tsc.overrideAttrs (oa: let - version = "0.16.1"; + version = "0.18.0"; tsc-dyn = fetchurl { url = "https://github.com/emacs-tree-sitter/elisp-tree-sitter/releases/download/${version}/tsc-dyn.so"; - sha256 = "sha256-l2mVxnnO43rzLWbOAnX5UZ0a7uk0EPE2x0Jl9rd2D1A="; + sha256 = "sha256-97KDzdYNJN4ceJeuQxZtQ/7iU0CYXEp6gcSM9rNwlyE="; }; in { @@ -29,13 +28,13 @@ }); tree-sitter-langs = epkgs.melpaPackages.tree-sitter-langs.overrideAttrs (oa: let - version = "0.10.14"; + version = "0.11.3"; tree-sitter-grammars = super.stdenv.mkDerivation rec { inherit version; name = "tree-sitter-grammars"; src = fetchzip { url = "https://github.com/emacs-tree-sitter/tree-sitter-langs/releases/download/${version}/tree-sitter-grammars-linux-${version}.tar.gz"; - sha256 = "sha256-J8VplZWhyWN8ur74Ep0CTl4nPtESzfs2Gh6MxfY5Zqc="; + sha256 = "sha256-85Yy6NuEVnibehmalz2qr0pCENYwmxsyyIf0TUYnDY8="; stripRoot = false; }; installPhase = '' @@ -50,7 +49,7 @@ owner = "emacs-tree-sitter"; repo = "tree-sitter-langs"; rev = version; - sha256 = "sha256-uKfkhcm1k2Ov4fSr7ALVnpQoX/l9ssEWMn761pa7Y/c="; + sha256 = "sha256-Br+ON7a8FWoU75ySPSP2DkiyHjj80TP5XvcMMJrU9+k="; }; postPatch = '' substituteInPlace ./tree-sitter-langs-build.el \