mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-22 12:49:32 -08:00
trying to add a second user on one machine
This commit is contained in:
parent
6e1a140903
commit
4349ad8a1f
6 changed files with 162 additions and 4 deletions
25
flake.nix
25
flake.nix
|
@ -7,17 +7,38 @@
|
|||
url = github:nix-community/home-manager;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
kmonad.url = "github:kmonad/kmonad?dir=nix";
|
||||
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, kmonad }:
|
||||
let
|
||||
user = "nixolas";
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = import ./hosts {
|
||||
nixosConfigurations = {
|
||||
inherit (nixpkgs) lib;
|
||||
inherit inputs nixpkgs home-manager user kmonad ;
|
||||
|
||||
NicksNixLaptop = {
|
||||
inherit system;
|
||||
specialArgs = inputs;
|
||||
|
||||
modules = [
|
||||
{
|
||||
networking.hostName = "NicksNixLaptop";
|
||||
}
|
||||
kmonad.nixosModules.default
|
||||
./hosts/laptop
|
||||
./hosts/configuration.nix
|
||||
./modules/kmonad.nix
|
||||
./hosts/laptop/home.nix
|
||||
];
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ in {
|
|||
extraSpecialArgs = { inherit user; };
|
||||
users.${user} = {
|
||||
imports = [
|
||||
./home.nix
|
||||
../users/${user}.nix
|
||||
../modules/emacs.nix
|
||||
../modules/git.nix
|
||||
../modules/fusuma.nix
|
||||
|
@ -37,6 +37,18 @@ in {
|
|||
../modules/zsh.nix
|
||||
];
|
||||
};
|
||||
users.nicholix = {
|
||||
imports = [
|
||||
../users/nicholix.nix
|
||||
../modules/emacs.nix
|
||||
../modules/git.nix
|
||||
../modules/fusuma.nix
|
||||
../modules/vim.nix
|
||||
../modules/wezterm.nix
|
||||
../modules/xdg.nix
|
||||
../modules/zsh.nix
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ (import ./hardware-configuration.nix) ];
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
|
|
35
hosts/laptop/home.nix
Normal file
35
hosts/laptop/home.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ config, lib, pkgs, user, home-manager, ... }:
|
||||
|
||||
{
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit user; };
|
||||
users.${user} = {
|
||||
imports = [
|
||||
../../users/${user}.nix
|
||||
../../modules/emacs.nix
|
||||
../../../modules/git.nix
|
||||
../../modules/fusuma.nix
|
||||
../../modules/vim.nix
|
||||
../../modules/wezterm.nix
|
||||
../../modules/xdg.nix
|
||||
../../modules/zsh.nix
|
||||
];
|
||||
};
|
||||
users.nicholix = {
|
||||
imports = [
|
||||
../../users/nicholix.nix
|
||||
../../modules/emacs.nix
|
||||
../../modules/git.nix
|
||||
../../modules/fusuma.nix
|
||||
../../modules/vim.nix
|
||||
../../modules/wezterm.nix
|
||||
../../modules/xdg.nix
|
||||
../../modules/zsh.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
88
users/nicholix.nix
Normal file
88
users/nicholix.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
|
||||
nixpkgs = import <nixpkgs> {
|
||||
overlays = [ moz_overlay ];
|
||||
};
|
||||
ruststable = (nixpkgs.latest.rustChannels.stable.rust.override {
|
||||
extensions = [ "rust-src" "rust-analysis" ];}
|
||||
);
|
||||
|
||||
user = "nicholix";
|
||||
in
|
||||
{
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.direnv.enable = true;
|
||||
programs.direnv.nix-direnv.enable = true;
|
||||
|
||||
home = {
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
username = user;
|
||||
homeDirectory = "/home/${user}";
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new Home Manager release introduces backwards
|
||||
# incompatible changes.
|
||||
#
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
stateVersion = "22.11";
|
||||
|
||||
packages = with pkgs; [
|
||||
# utilities
|
||||
ffmpeg-full
|
||||
frei0r # kdenlive video plugins
|
||||
pandoc
|
||||
fontpreview
|
||||
|
||||
texlive.combined.scheme-medium
|
||||
|
||||
# commandline utils
|
||||
pfetch
|
||||
fortune
|
||||
rmtrash
|
||||
ripgrep
|
||||
fd
|
||||
neofetch
|
||||
ranger
|
||||
exa
|
||||
xdotool
|
||||
vhs
|
||||
|
||||
nodejs # required for coc-nvim
|
||||
|
||||
# Gui application
|
||||
darktable # RAW processing
|
||||
firefox # Internet access
|
||||
inkscape # Vector drawing
|
||||
jellyfin-media-player # plex-like media player client
|
||||
kicad # PCB design
|
||||
krita # Raster drawing
|
||||
libreoffice # Office editing
|
||||
obsidian # Markdown and notes
|
||||
qalculate-gtk # unit-friendly calculator
|
||||
vscodium # when vim isn't enough
|
||||
|
||||
libsForQt5.kate # kate/kwrite
|
||||
libsForQt5.ark # kde archive manager
|
||||
|
||||
# Kdenlive and deps
|
||||
libsForQt5.kdenlive
|
||||
mediainfo
|
||||
mlt
|
||||
|
||||
# Drawing tablet driver
|
||||
opentabletdriver
|
||||
];
|
||||
|
||||
sessionVariables = {
|
||||
NIX_SHELL_PRESERVE_PROMPT = 1;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue