From da8e3f16a2391394343b529c2592089d69c5886a Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Wed, 7 Dec 2022 00:52:15 +1000 Subject: [PATCH] able to get a dry run to compile --- flake.lock | 16 ++++++++++++++++ flake.nix | 25 ++++++++++++------------- home/core/default.nix | 4 ++-- home/gui/default.nix | 2 +- home/profiles/cli/default.nix | 4 +--- home/profiles/firefox/default.nix | 1 + hosts/curve/default.nix | 14 ++++++++------ hosts/profiles/desktop/default.nix | 4 ++-- hosts/profiles/music/default.nix | 6 +++--- overlays/default.nix | 1 - shell.nix | 2 +- 11 files changed, 47 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index f8b8dd09..ad110739 100644 --- a/flake.lock +++ b/flake.lock @@ -291,6 +291,21 @@ "type": "github" } }, + "nur": { + "locked": { + "lastModified": 1670315682, + "narHash": "sha256-/v0RgZZIjvsFuJbJLUlzRbzSlYFXq3olgJTuJBNtcoY=", + "owner": "nix-community", + "repo": "NUR", + "rev": "af814db16c89385c65e758608296440555f61ccc", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "poonam": { "inputs": { "nixpkgs": "nixpkgs_2", @@ -321,6 +336,7 @@ "hardware": "hardware", "home-manager": "home-manager", "nixpkgs": "nixpkgs", + "nur": "nur", "poonam": "poonam", "rust-overlay": "rust-overlay", "tidalcycles": "tidalcycles", diff --git a/flake.nix b/flake.nix index b3dda651..a4d72c10 100644 --- a/flake.nix +++ b/flake.nix @@ -30,8 +30,7 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.rust-overlay.follows = "rust-overlay"; }; - # eww follows rust nightly - # eww.inputs.nixpkgs.follows = "unstable"; + nur.url = "github:nix-community/NUR"; grasp.url = "git+ssh://gitea@git.sealight.xyz/aynish/grasp.git?ref=main"; grasp.inputs.nixpkgs.follows = "nixpkgs"; tidalcycles.url = "github:mitchmindtree/tidalcycles.nix"; @@ -54,13 +53,13 @@ , agenix , basant , grasp + , nur , tidalcycles , rust-overlay , eww , ... }@inputs: let - inherit (self) outputs; forAllSystems = nixpkgs.lib.genAttrs [ "aarch64-linux" "i686-linux" @@ -76,6 +75,7 @@ deploy.overlay tidalcycles.overlays.default agenix.overlay + nur.overlay # unstable.overlay # self.overlays ]; @@ -107,21 +107,19 @@ # NixOS configuration entrypoint nixosConfigurations = { curve = nixpkgs.lib.nixosSystem rec { - specialArgs = { inherit self inputs outputs; }; + specialArgs = { inherit inputs self; }; system = "x86_64-linux"; pkgs = nixpkgsFor.${system}; modules = [ ./hosts/curve - home-manager.nixosModules.home-manager - self.nixosModules.wallabag - self.nixosModules.gonic + agenix.nixosModules.age self.nixosModules.backup self.nixosModules.wireguard - agenix.nixosModules.age + home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - # home-manager.users.anish = import ./home/gui; + home-manager.users.anish = import ./home/gui; } ]; }; @@ -180,19 +178,20 @@ homeConfigurations = { "anish@work" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance - extraSpecialArgs = { inherit inputs outputs; }; + extraSpecialArgs = { inherit inputs; }; modules = [ ./home/core.nix ]; }; }; + deploy.nodes = { - box.profiles.system = { + curve.profiles.system = { user = "root"; - path = deploy.lib.x86_64-linux.activate.nixos self.nixosConfigurations.box; + path = deploy.lib.x86_64-linux.activate.nixos self.nixosConfigurations.curve; }; }; - checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy.lib; + # checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy.lib; }; } diff --git a/home/core/default.nix b/home/core/default.nix index 987f76ff..e826d856 100644 --- a/home/core/default.nix +++ b/home/core/default.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: +{ self, pkgs, ... }: { - import = [ + imports = [ ../profiles/nvim ../profiles/cli ../profiles/direnv diff --git a/home/gui/default.nix b/home/gui/default.nix index 8f9febb4..8f150bda 100644 --- a/home/gui/default.nix +++ b/home/gui/default.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - import = [ + imports = [ ../core ../profiles/firefox ../profiles/desktop diff --git a/home/profiles/cli/default.nix b/home/profiles/cli/default.nix index ec9bafad..0dee1b3e 100644 --- a/home/profiles/cli/default.nix +++ b/home/profiles/cli/default.nix @@ -1,4 +1,4 @@ -{ self, lib, pkgs, config, ... }: +{ lib, pkgs, config, ... }: { home.packages = with pkgs; [ binutils @@ -240,8 +240,6 @@ mn = '' manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix ''; - # fix nixos-option - nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; # sudo s = "sudo -E "; diff --git a/home/profiles/firefox/default.nix b/home/profiles/firefox/default.nix index 37410245..7baa7a11 100644 --- a/home/profiles/firefox/default.nix +++ b/home/profiles/firefox/default.nix @@ -7,6 +7,7 @@ # - Import css for sidebery from sidebery.css # - Configure wallabagger, shaarli, grasp + programs.browserpass.enable = true; programs.browserpass.browsers = [ "firefox" ]; #env.XDG_DEXSTOP_DIR = "$HOME/"; diff --git a/hosts/curve/default.nix b/hosts/curve/default.nix index 3321db03..583b59da 100644 --- a/hosts/curve/default.nix +++ b/hosts/curve/default.nix @@ -1,4 +1,4 @@ -{ self, pkgs, ... }: +{ self, inputs, pkgs, ... }: { imports = [ ./configuration.nix @@ -16,6 +16,8 @@ ../profiles/mossnet-hosts ]; + # home-manager.users.anish = import ../../home/gui; + # Speed up boot by removing dependency on network systemd = { targets.network-online.wantedBy = pkgs.lib.mkForce [ ]; # Normally ["multi-user.target"] @@ -45,11 +47,11 @@ boot.supportedFilesystems = [ "ntfs" ]; # https://github.com/NixOS/nixpkgs/issues/26722 # boot.initrd.systemd.enable = true; - boot.plymouth = { - enable = true; - themePackages = [ pkgs.plymouth-themes ]; - theme = "motion"; - }; + # boot.plymouth = { + # enable = true; + # themePackages = [ pkgs.plymouth-themes ]; + # theme = "motion"; + # }; # lazy enable of ports necessary for KDE connect which is installed via cli home profile (for some reason?) networking.firewall = { diff --git a/hosts/profiles/desktop/default.nix b/hosts/profiles/desktop/default.nix index 735393f9..c31f5770 100644 --- a/hosts/profiles/desktop/default.nix +++ b/hosts/profiles/desktop/default.nix @@ -53,12 +53,12 @@ in environment.systemPackages = with pkgs; [ signal-desktop # bridge to sealight? scrot - ripcord + # ripcord feh sxiv xkblayout-state sublime-music - vcv-rack + # vcv-rack zathura calibre nheko diff --git a/hosts/profiles/music/default.nix b/hosts/profiles/music/default.nix index 350df3ae..c3eeea9a 100644 --- a/hosts/profiles/music/default.nix +++ b/hosts/profiles/music/default.nix @@ -16,8 +16,8 @@ orca-c supercollider dirt - sunvox - vcv-rack + # sunvox + # vcv-rack lmms bespokesynth lsp-plugins @@ -27,7 +27,7 @@ # DAWs # ardour # reaper - renoise + # renoise ]; hardware.pulseaudio.enable = lib.mkForce false; diff --git a/overlays/default.nix b/overlays/default.nix index 92390331..b2653c9d 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -7,7 +7,6 @@ # You can change versions, add patches, set compilation flags, anything really. # https://nixos.wiki/wiki/Overlays modifications = final: prev: { - plymouth-themes = prev.callPackage ./plymouth.nix { }; # example = prev.example.overrideAttrs (oldAttrs: rec { # ... # }); diff --git a/shell.nix b/shell.nix index 8d0d78de..aabba15a 100644 --- a/shell.nix +++ b/shell.nix @@ -5,6 +5,6 @@ default = pkgs.mkShell { # Enable experimental features without having to specify the argument NIX_CONFIG = "experimental-features = nix-command flakes"; - nativeBuildInputs = with pkgs; [ nix home-manager git agenix deploy-rs ]; + nativeBuildInputs = with pkgs; [ nix home-manager git ]; }; }