From 0df93e912e8644f2a93be0119296dbcb5ae06093 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 17 Jan 2023 15:49:32 +0100 Subject: Add zfs, unify home manager --- nixpkgs/Makefile | 4 ++-- nixpkgs/common.nix | 46 ++++++++++++++++++++++++++++++++++++++++++++++ nixpkgs/home.nix | 49 ------------------------------------------------- nixpkgs/kusanagi.nix | 9 +++++++++ nixpkgs/lindy.nix | 7 +++++++ 5 files changed, 64 insertions(+), 51 deletions(-) create mode 100644 nixpkgs/common.nix delete mode 100644 nixpkgs/home.nix create mode 100644 nixpkgs/kusanagi.nix create mode 100644 nixpkgs/lindy.nix (limited to 'nixpkgs') diff --git a/nixpkgs/Makefile b/nixpkgs/Makefile index e99f6c2..4b3becf 100644 --- a/nixpkgs/Makefile +++ b/nixpkgs/Makefile @@ -1,3 +1,3 @@ all: - nixfmt home.nix - home-manager switch -f home.nix + nixfmt `hostname`.nix + home-manager switch -f `hostname`.nix diff --git a/nixpkgs/common.nix b/nixpkgs/common.nix new file mode 100644 index 0000000..7ecdb89 --- /dev/null +++ b/nixpkgs/common.nix @@ -0,0 +1,46 @@ +{ pkgs, ... }: { + home.username = "lx"; + + programs.bash = { + enable = true; + shellAliases = { + ll = "ls -lah"; + irc = "ssh -t adnab.me /usr/local/bin/irc"; + }; + }; + programs.keychain = { + enable = true; + enableBashIntegration = true; + keys = [ "~/.ssh/id_ed25519" ]; + }; + programs.vim = { + enable = true; + extraConfig = (builtins.readFile ../vim/vimrc); + plugins = with pkgs.vimPlugins; [ vim-nix fzf-vim nerdtree ]; + }; + + programs.git.enable = true; + programs.git.userName = "Alex Auvolat"; + programs.git.userEmail = "alex@adnab.me"; + + home.file = { ".config/tmux/tmux.conf".source = ../tmux/tmux.conf; }; + + xsession.enable = true; + + xdg.enable = true; + xdg.userDirs = { + desktop = null; + documents = null; + pictures = null; + music = null; + publicShare = null; + templates = null; + videos = null; + }; + + services.syncthing.enable = true; + + nixpkgs.config.allowUnfree = true; + + home.stateVersion = "22.11"; +} diff --git a/nixpkgs/home.nix b/nixpkgs/home.nix deleted file mode 100644 index ae8bc5d..0000000 --- a/nixpkgs/home.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ pkgs, ... }: { - home.username = "lx"; - home.homeDirectory = "/home/lx"; - - programs.bash = { - enable = true; - shellAliases = { - ll = "ls -lah"; - irc = "ssh -t adnab.me /usr/local/bin/irc"; - }; - }; - programs.keychain = { - enable = true; - enableBashIntegration = true; - keys = [ "/home/lx/.ssh/id_ed25519" ]; - }; - programs.vim = { - enable = true; - extraConfig = (builtins.readFile ../vim/vimrc); - plugins = with pkgs.vimPlugins; [ vim-nix fzf-vim nerdtree ]; - }; - - programs.git.enable = true; - programs.git.userName = "Alex Auvolat"; - programs.git.userEmail = "alex@adnab.me"; - - home.file = { ".config/tmux/tmux.conf".source = ../tmux/tmux.conf; }; - - xsession.enable = true; - - xdg.enable = true; - xdg.userDirs = { - download = "/home/lx/Downloads"; - desktop = null; - documents = null; - pictures = null; - music = null; - publicShare = null; - templates = null; - videos = null; - }; - - services.syncthing.enable = true; - - nixpkgs.config.allowUnfree = true; - - home.stateVersion = "22.11"; -} - diff --git a/nixpkgs/kusanagi.nix b/nixpkgs/kusanagi.nix new file mode 100644 index 0000000..6757886 --- /dev/null +++ b/nixpkgs/kusanagi.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: { + imports = [ + ./common.nix + ]; + + home.homeDirectory = "/home/lx"; + xdg.userDirs.download = "/home/lx/Downloads"; +} + diff --git a/nixpkgs/lindy.nix b/nixpkgs/lindy.nix new file mode 100644 index 0000000..1dbc65f --- /dev/null +++ b/nixpkgs/lindy.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: { + imports = [ ./common.nix ]; + + home.homeDirectory = "/home/lx.nix"; + xdg.userDirs.download = "/home/lx.nix/Downloads"; +} + -- cgit v1.2.3