mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 19:27:17 +00:00
Add flake parts to flake and fix some shortcuts.
This commit is contained in:
parent
1a7c9f0b54
commit
bb9ffd0c5b
4 changed files with 48 additions and 8 deletions
37
flake.lock
generated
37
flake.lock
generated
|
@ -20,6 +20,24 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1675933616,
|
||||
"narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "47478a4a003e745402acf63be7f9a092d51b83d7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1676283394,
|
||||
|
@ -124,6 +142,24 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1675183161,
|
||||
"narHash": "sha256-Zq8sNgAxDckpn7tJo7V1afRSk2eoVbu3OjI1QklGLNg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e1e1b192c1a5aab2960bf0a0bd53a2e8124fa18e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1676973346,
|
||||
|
@ -174,6 +210,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager",
|
||||
"mach-nix": "mach-nix",
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{
|
||||
description = "Willem's Darwin configuration";
|
||||
description = "Willem's Nix configurations";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
darwin.url = "github:lnl7/nix-darwin";
|
||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
@ -34,9 +34,10 @@ rec {
|
|||
ctype = "en_US.UTF-8";
|
||||
};
|
||||
sessionVariables = rec {
|
||||
DOTDIR = "${config.home.homeDirectory}/.config/dotfiles.nix";
|
||||
EDITOR = emacsCommand;
|
||||
VISUAL = emacsCommand;
|
||||
ORGDIR = "~/Documents/org";
|
||||
ORGDIR = "${config.home.homeDirectory}/Documents/org";
|
||||
UBCDIR = "${ORGDIR}/ubc";
|
||||
};
|
||||
stateVersion = "22.11";
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
enableAliases = true;
|
||||
};
|
||||
|
||||
|
||||
fzf = {
|
||||
enable = true;
|
||||
defaultCommand = "${pkgs.fd}/bin/fd . ${config.home.homeDirectory}";
|
||||
|
@ -171,19 +170,21 @@
|
|||
shellAliases = rec {
|
||||
cd = "z";
|
||||
discord = "${web} https://discord.com/channels/@me";
|
||||
dotd = "cd ${config.home.sessionVariables.DOTDIR} ";
|
||||
e = "emacsclient -c -nw";
|
||||
em = "emacs -nw";
|
||||
emw = "emacs";
|
||||
ew = "emacsclient -c";
|
||||
l = "ls -1";
|
||||
nbs = lib.mkIf pkgs.stdenv.isLinux "sudo nixos-rebuild build --flake ${config.home.homeDirectory}/.config/dotfiles.nix#";
|
||||
np = "nix-shell -p";
|
||||
nrs = lib.mkIf pkgs.stdenv.isLinux "sudo nixos-rebuild switch --flake ${config.home.homeDirectory}/.config/dotfiles.nix#";
|
||||
org = "z ${config.home.sessionVariables.ORGDIR}";
|
||||
org = "cd ${config.home.sessionVariables.ORGDIR} ";
|
||||
spotify = "${web} https://open.spotify.com/";
|
||||
ubc = "z ${config.home.sessionVariables.UBCDIR}";
|
||||
ubc = "cd ${config.home.sessionVariables.UBCDIR} ";
|
||||
web = "${config.programs.firefox.package}/bin/firefox";
|
||||
};
|
||||
}; #// lib.optionals pkgs.stdenv.isLinux {
|
||||
#nbs = "sudo nixos-rebuild build --flake ${config.home.sessionVariables.DOTDIR}#";
|
||||
# nrs = "sudo nixos-rebuild switch --flake ${config.home.sessionVariables.DOTDIR}#";
|
||||
#};
|
||||
};
|
||||
|
||||
home-manager.enable = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue