added home manager
This commit is contained in:
parent
045f346d3c
commit
48fb5e798c
7 changed files with 203 additions and 175 deletions
4
README
4
README
|
|
@ -39,7 +39,9 @@ Font:
|
|||
Iosevka nerd font set as default/prefered font
|
||||
Terminal uses IosevkaTerm nerd font
|
||||
|
||||
|
||||
Home-Manager:
|
||||
I just to use home-manager standalone and not as a NixOS module, thus allowing
|
||||
my dotfiles to also work on non-NixOS systems.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
2
deploy
Executable file
2
deploy
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
sudo nixos-rebuild switch --flake .
|
||||
|
|
@ -1 +0,0 @@
|
|||
sudo nixos-rebuild switch --flake ./
|
||||
31
flake.nix
31
flake.nix
|
|
@ -9,6 +9,7 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# is this necessary? (aren't I enabling it in `configuration.nix` anyways?)
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
};
|
||||
|
||||
|
|
@ -38,28 +39,34 @@
|
|||
nixosConfigurations = {
|
||||
# i be on my puter fr
|
||||
myputer = nixpkgs.lib.nixosSystem {
|
||||
# nix passes these to every single module above
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
./hosts/myputer
|
||||
#home-manager.nixosModules.default
|
||||
];
|
||||
specialArgs = {
|
||||
inherit inputs system; # inherit inputs outputs;
|
||||
};
|
||||
};
|
||||
|
||||
# my laptop 0w0
|
||||
#lolcathost = nixpkgs.lib.nixosSystem {
|
||||
# modules = [
|
||||
# ./hosts/lolcathost
|
||||
# ];
|
||||
# specialArgs = {
|
||||
# inherit system; # inherit inputs outputs;
|
||||
# };
|
||||
#};
|
||||
lolcathost = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
./hosts/lolcathost
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
me = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
./home/me
|
||||
|
|
|
|||
|
|
@ -0,0 +1,123 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
#imports = [
|
||||
# ./nvim.nix
|
||||
#];
|
||||
|
||||
nixpkgs = {
|
||||
config.allowUnfree = false;
|
||||
};
|
||||
|
||||
home = {
|
||||
username = "me";
|
||||
homeDirectory = "/home/me";
|
||||
};
|
||||
|
||||
programs = {
|
||||
# these are both required for home-manager to work
|
||||
home-manager.enable = true;
|
||||
git.enable = true;
|
||||
|
||||
# The terminal I use
|
||||
# TODO: this is dependent on nvim being installed
|
||||
# TODO: make this into a module with a configurable editor option
|
||||
rio = {
|
||||
enable = true;
|
||||
# Rio Config Docs: https://raphamorim.io/rio/docs/config
|
||||
settings = {
|
||||
theme = "dracula";
|
||||
hide-mouse-cursor-when-typing = true;
|
||||
|
||||
use-fork = true; # fork (dont spawn) Rio
|
||||
|
||||
fonts = {
|
||||
size = 18;
|
||||
features = [];
|
||||
|
||||
regular = {
|
||||
family = "IosevkaTerm Nerd Font";
|
||||
style = "Normal";
|
||||
weight = 400;
|
||||
};
|
||||
|
||||
bold = {
|
||||
family = "IosevkaTerm Nerd Font";
|
||||
style = "Normal";
|
||||
weight = 800;
|
||||
};
|
||||
|
||||
italic = {
|
||||
family = "IosevkaTerm Nerd Font";
|
||||
style = "Italic";
|
||||
weight = 400;
|
||||
};
|
||||
|
||||
bold-italic = {
|
||||
family = "IosevkaTerm Nerd Font";
|
||||
style = "Italic";
|
||||
weight = 800;
|
||||
};
|
||||
};
|
||||
|
||||
# Run when the `OpenConfigEditor` keybinding is triggered
|
||||
editor = {
|
||||
program = "nvim";
|
||||
args = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
home.stateVersion = "24.05"; # don't change this
|
||||
|
||||
/*
|
||||
services = {
|
||||
# Change monitor positions
|
||||
# TODO: find a way to make this modular (ie put something different for my laptop)
|
||||
# my idea is to have a "monitors" module and use kanshi for wayland
|
||||
kanshi = {
|
||||
enable = true;
|
||||
systemdTarget = "hyprland-session.target";
|
||||
# You can find your monitors in hyprland by using `hyprctl monitors all`
|
||||
settings = [
|
||||
{ # 1920x1080@144 gaming monitor
|
||||
output.criteria = "HDMI-A-1";
|
||||
output.mode = "1920x1080@119.98Hz";
|
||||
output.scale = 1.0;
|
||||
output.adaptiveSync = false; # Variable Refresh Rate (this can be changed for gaming)
|
||||
}
|
||||
{ # 4k side monitor
|
||||
output.criteria = "DP-2";
|
||||
output.mode = "3840x2160@60.00Hz";
|
||||
output.scale = 2.0;
|
||||
}
|
||||
|
||||
{ # This is my default setup
|
||||
profile.name = "default";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "DP-2";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "HDMI-A-1";
|
||||
position = "3840,0";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
*/
|
||||
}
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# ./nvim.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
config.allowUnfree = false;
|
||||
};
|
||||
|
||||
home = {
|
||||
username = "me";
|
||||
homeDirectory = "/home/me";
|
||||
};
|
||||
|
||||
programs = {
|
||||
# Required for home-manager
|
||||
home-manager.enable = true;
|
||||
git.enable = true;
|
||||
|
||||
# The terminal I use
|
||||
# TODO: this is dependent on nvim being installed
|
||||
# TODO: make this into a module with a configurable editor option
|
||||
rio = {
|
||||
enable = true;
|
||||
# Rio Config Docs: https://raphamorim.io/rio/docs/config
|
||||
settings = {
|
||||
theme = "dracula";
|
||||
hide-mouse-cursor-when-typing = true;
|
||||
|
||||
use-fork = true; # fork (dont spawn) Rio
|
||||
|
||||
fonts = {
|
||||
size = 18;
|
||||
features = [];
|
||||
|
||||
regular = {
|
||||
family = "IosevkaTerm";
|
||||
style = "normal";
|
||||
weight = 400;
|
||||
};
|
||||
|
||||
bold = {
|
||||
family = "IosevkaTerm";
|
||||
style = "normal";
|
||||
weight = 800;
|
||||
};
|
||||
|
||||
italic = {
|
||||
family = "IosevkaTerm";
|
||||
style = "italic";
|
||||
weight = 400;
|
||||
};
|
||||
|
||||
bold-italic = {
|
||||
family = "IosevkaTerm";
|
||||
style = "italic";
|
||||
weight = 800;
|
||||
};
|
||||
};
|
||||
|
||||
# Run when the `OpenConfigEditor` keybinding is triggered
|
||||
editor = {
|
||||
program = "nvim";
|
||||
args = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
home.stateVersion = "24.05"; # don't change this
|
||||
|
||||
/*
|
||||
services = {
|
||||
# Change monitor positions
|
||||
# TODO: find a way to make this modular (ie put something different for my laptop)
|
||||
# my idea is to have a "monitors" module and use kanshi for wayland
|
||||
kanshi = {
|
||||
enable = true;
|
||||
systemdTarget = "hyprland-session.target";
|
||||
# You can find your monitors in hyprland by using `hyprctl monitors all`
|
||||
settings = [
|
||||
{ # 1920x1080@144 gaming monitor
|
||||
output.criteria = "HDMI-A-1";
|
||||
output.mode = "1920x1080@119.98Hz";
|
||||
output.scale = 1.0;
|
||||
output.adaptiveSync = false; # Variable Refresh Rate (this can be changed for gaming)
|
||||
}
|
||||
{ # 4k side monitor
|
||||
output.criteria = "DP-2";
|
||||
output.mode = "3840x2160@60.00Hz";
|
||||
output.scale = 2.0;
|
||||
}
|
||||
|
||||
{ # This is my default setup
|
||||
profile.name = "default";
|
||||
profile.outputs = [
|
||||
{
|
||||
criteria = "DP-2";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "HDMI-A-1";
|
||||
position = "3840,0";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
*/
|
||||
}
|
||||
|
|
@ -2,10 +2,19 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
|
||||
let
|
||||
home-manager = builtins.fetchTarball {
|
||||
url = "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
||||
sha256 = "0kg9iaixqygpncw7avgh1grwyjgnfc9i7k9pk8hc4xrvr8jv2l3c";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
./hardware-configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
# TODO: use GRUB2 instead
|
||||
|
|
@ -69,41 +78,45 @@
|
|||
};
|
||||
};
|
||||
|
||||
users.users = {
|
||||
# just me fr (personal account)
|
||||
me = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
nitch
|
||||
starfetch
|
||||
tldr
|
||||
];
|
||||
};
|
||||
|
||||
# programming/development account
|
||||
dev = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
|
||||
# user for my professional jobs and stuff
|
||||
pro = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
};
|
||||
# new users will use zsh by default
|
||||
users.defaultUserShell = pkgs.bash;
|
||||
users = {
|
||||
defaultUserShell = pkgs.bash;
|
||||
|
||||
users = {
|
||||
# just me fr (personal account)
|
||||
me = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
nitch
|
||||
starfetch
|
||||
tldr
|
||||
];
|
||||
};
|
||||
|
||||
# programming/development account
|
||||
dev = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
|
||||
# user for my professional jobs and stuff
|
||||
ae = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.me = import ../../homes/me;
|
||||
|
||||
# ---- SYSTEM PACKAGES -----
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Personally I think these
|
||||
|
|
@ -125,6 +138,8 @@
|
|||
fish.enable = true;
|
||||
zsh.enable = true;
|
||||
|
||||
git.enable = true;
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
|
@ -141,11 +156,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
# ----- FONTS -----
|
||||
fonts = {
|
||||
enableDefaultPackages = true; # no clue what this line does tbh
|
||||
fonts = with pkgs; [
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "Cousine" "Iosevka" "IosevkaTerm" ]; })
|
||||
|
||||
# texlive maintains a noto-emoji flake
|
||||
|
|
@ -163,6 +179,8 @@
|
|||
};
|
||||
|
||||
|
||||
|
||||
|
||||
# Enable the new CLI commands and the flakes as experimental features
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue