From 6dc1eeb377e620af83668ea1c4aae1d346c7a123 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Tue, 16 Jul 2024 16:22:19 +0200 Subject: [PATCH] feat: add rofi-obsidian as dep --- flake.lock | 92 +++++++++++++++++++++++++++++++++++- flake.nix | 7 ++- home/fish/default.nix | 3 +- home/rofi/default.nix | 2 +- hosts/default.nix | 2 +- hosts/marr/configuration.nix | 2 +- modules/default.nix | 1 + modules/nix/nixpkgs.nix | 2 + modules/printing.nix | 2 +- modules/programs/ssh.nix | 7 +++ 10 files changed, 113 insertions(+), 7 deletions(-) create mode 100644 modules/programs/ssh.nix diff --git a/flake.lock b/flake.lock index 9315533..6e6994c 100644 --- a/flake.lock +++ b/flake.lock @@ -40,6 +40,24 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -92,13 +110,85 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1718428119, + "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "rofi-obsidian": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1720405179, + "narHash": "sha256-GccZ3CxmS3MDzkCfFNWb/F3eGoVxaoAiHcmWzbq5Z1o=", + "owner": "nydragon", + "repo": "rofi-obsidian", + "rev": "898cb1cb5b52e9b6ab13650ef48b873eebc9581f", + "type": "github" + }, + "original": { + "owner": "nydragon", + "repo": "rofi-obsidian", + "type": "github" + } + }, "root": { "inputs": { "disko": "disko", "flake-parts": "flake-parts", "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "rofi-obsidian": "rofi-obsidian" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1720318855, + "narHash": "sha256-w3CCVK9LJ5aznXGkO1IyAlbvMNJfyA+dBF7Z1Zwx1LA=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "3eed08a074cd2000884a69d448d70da2843f7103", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 26794ac..b8fcca0 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,11 @@ url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; + + rofi-obsidian = { + url = "github:nydragon/rofi-obsidian"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -51,7 +56,7 @@ }; }; - flake = rec { + flake = { templates = import ./templates; # TODO: move that somewhere else lib = inputs.nixpkgs.lib.extend ( diff --git a/home/fish/default.nix b/home/fish/default.nix index b01ff65..b37d775 100644 --- a/home/fish/default.nix +++ b/home/fish/default.nix @@ -13,9 +13,10 @@ cp = "cp -i"; mv = "mv -i"; }; - functions = { + functions = rec { gitignore = "curl -sL https://www.gitignore.io/api/$argv"; nrun = "nix run nixpkgs#$argv[1] -- $argv[2..]"; + nrunb = "${nrun} & disown"; mv-bad-creation-date = '' ${lib.my.checkPath pkgs.exiftool "exiftool"} -if 'not $CreateDate' -p '$FileName' "$PWD/$argv[1]" | xargs -I {} mv -i "$PWD/$argv[1]/{}" "$argv[2]" ''; diff --git a/home/rofi/default.nix b/home/rofi/default.nix index 7a98b52..6b37d74 100644 --- a/home/rofi/default.nix +++ b/home/rofi/default.nix @@ -25,7 +25,7 @@ # WARNING: ABI version mismatch # "calc" "clipboard:${lib.my.checkPath pkgs.cliphist "cliphist-rofi-img"}" - "obsidian:${lib.my.checkPath pkgs.rofi-obsidian "rofi-obsidian"}" + "obsidian:${lib.my.checkPath pkgs.custom.rofi-obsidian "rofi-obsidian"}" ]; matching = "fuzzy"; sort = true; diff --git a/hosts/default.nix b/hosts/default.nix index 26225f8..5c63499 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -15,7 +15,7 @@ in brontes = lib.my.mkSystem { hostname = "brontes"; system = "x86_64-linux"; - extraModules = [ inputs.agenix.nixosModules.default ]; + extraModules = [ ]; }; styrak = lib.my.mkSystem { diff --git a/hosts/marr/configuration.nix b/hosts/marr/configuration.nix index 5a56372..1ac1167 100644 --- a/hosts/marr/configuration.nix +++ b/hosts/marr/configuration.nix @@ -49,7 +49,7 @@ #: Virtualisation {{{ virtualisation.docker = { - enable = true; + enable = false; enableOnBoot = false; rootless = { enable = true; diff --git a/modules/default.nix b/modules/default.nix index 69a0764..14d0394 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -11,6 +11,7 @@ ./programs/lazygit.nix ./programs/steam.nix ./programs/hyprland.nix + ./programs/ssh.nix ./home-manager.nix ./system/mime.nix ./env.nix diff --git a/modules/nix/nixpkgs.nix b/modules/nix/nixpkgs.nix index 234e367..b11b638 100644 --- a/modules/nix/nixpkgs.nix +++ b/modules/nix/nixpkgs.nix @@ -1,9 +1,11 @@ +{ inputs, ... }: { nixpkgs.config = { allowUnfree = true; packageOverrides = pkgs: { custom = { scripts = import ../../home/scripts { inherit pkgs; }; + rofi-obsidian = inputs.rofi-obsidian.outputs.packages.${pkgs.system}.rofi-obsidian; }; }; }; diff --git a/modules/printing.nix b/modules/printing.nix index 2351c49..f40938e 100644 --- a/modules/printing.nix +++ b/modules/printing.nix @@ -7,7 +7,7 @@ lib.mkIf config.services.printing.enable { services.avahi = { enable = true; - nssmdns = true; + nssmdns4 = true; openFirewall = true; }; diff --git a/modules/programs/ssh.nix b/modules/programs/ssh.nix new file mode 100644 index 0000000..a174fc4 --- /dev/null +++ b/modules/programs/ssh.nix @@ -0,0 +1,7 @@ +{ + programs.ssh = { + knownHosts = { + "github.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl"; + }; + }; +}