Big refactor WIP
12
flake.lock
generated
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1649887921,
|
||||
"narHash": "sha256-h2LZzn5LLwIFvVFLCdR8+VWluEP3U1I5y+0mDZjFjAk=",
|
||||
"lastModified": 1649984295,
|
||||
"narHash": "sha256-55dgKGs7W8eC3s9GYewll9y4IlP/KAlSinjQwshNpxM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "92f58b6728e7c631a7ea0ed68cd21bb29a4876ff",
|
||||
"rev": "d49d68f4196d32c5039cb9e91d730cee894f6f14",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -57,11 +57,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1649784051,
|
||||
"narHash": "sha256-XN6gEvLzUglWIClT1CyyriZfcAhdFj28krCtWLJ/UBI=",
|
||||
"lastModified": 1649986882,
|
||||
"narHash": "sha256-cNsInUFq1MbuvaEmv8x6jetWnmAU+osMpnwKumtjksI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e1118817a12dba39081d9e70ae52dd38aa184c2e",
|
||||
"rev": "5181d5945eda382ff6a9ca3e072ed6ea9b547fee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
57
flake.nix
@@ -16,64 +16,37 @@
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
hostSystem = { hostname }: lib.nixosSystem {
|
||||
hostSystem = { hostname, headless }: lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
modules = [
|
||||
./hosts/${hostname}/configuration.nix
|
||||
|
||||
({ pkgs, ... }: {
|
||||
nixpkgs.overlays = [ i3utils.overlay ];
|
||||
})
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
users = import ./users;
|
||||
extraSpecialArgs = {inherit hostname; inherit headless;};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
mkUserConf = { hostname, extraSauce ? [] }:
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
inherit system pkgs;
|
||||
|
||||
username = "daniel";
|
||||
homeDirectory = "/home/daniel";
|
||||
configuration = {
|
||||
imports = [
|
||||
./user/daniel/home.nix
|
||||
({ pkgs, ... }: {
|
||||
nixpkgs.overlays = [ i3utils.overlay ];
|
||||
})
|
||||
] ++ extraSauce;
|
||||
};
|
||||
stateVersion = "21.05";
|
||||
};
|
||||
|
||||
|
||||
in {
|
||||
homeConfigurations = {
|
||||
daniel-dingbox = mkUserConf {
|
||||
hostname = "dingbox";
|
||||
extraSauce = [ ./user/host-specific/dingbox ];
|
||||
};
|
||||
daniel-miniding = mkUserConf {
|
||||
hostname = "miniding";
|
||||
extraSauce = [ ./user/host-specific/miniding ];
|
||||
};
|
||||
daniel-pingbox = mkUserConf {
|
||||
hostname = "pingbox";
|
||||
extraSauce = [ ./user/host-specific/pingbox ];
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
dingbox = hostSystem { hostname = "dingbox"; };
|
||||
miniding = hostSystem { hostname = "miniding"; };
|
||||
pingbox = hostSystem { hostname = "pingbox"; };
|
||||
dingserver = hostSystem { hostname = "dingserver"; };
|
||||
dingbox = hostSystem { hostname = "dingbox"; headless = false; };
|
||||
miniding = hostSystem { hostname = "miniding"; headless = false; };
|
||||
pingbox = hostSystem { hostname = "pingbox"; headless = false; };
|
||||
dingserver = hostSystem { hostname = "dingserver"; headless = true; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ config, pkgs, lib, ...}:
|
||||
|
||||
{ config, pkgs, lib, ...}:
|
||||
{
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$UID" -ne 0 ]; then
|
||||
sudo true # Prompt user for password so it doesn't happen in the middle of the script
|
||||
fi
|
||||
pushd ~/.dotfiles
|
||||
nix flake update
|
||||
|
||||
hn=$(hostname)
|
||||
home-manager switch --flake .#daniel-$hn
|
||||
|
||||
sudo nixos-rebuild switch --flake .#
|
||||
popd
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$UID" -ne 0 ]; then
|
||||
sudo true # Prompt user for password so it doesn't happen in the middle of the script
|
||||
fi
|
||||
pushd ~/.dotfiles
|
||||
hn=$(hostname)
|
||||
home-manager switch --flake .#daniel-$hn
|
||||
|
||||
sudo nixos-rebuild switch --flake .#
|
||||
popd
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
pushd ~/.dotfiles
|
||||
hn=$(hostname)
|
||||
home-manager switch --flake .#daniel-$hn
|
||||
popd
|
||||
8
users/daniel/configs/desktop/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./i3
|
||||
./i3status-rust
|
||||
# ./polybar
|
||||
./rofi
|
||||
];
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
background-color: @drac-bgd;
|
||||
active-background: @drac-pnk;
|
||||
urgent-background: @drac-red;
|
||||
|
||||
|
||||
selected-background: @active-background;
|
||||
selected-urgent-background: @urgent-background;
|
||||
selected-active-background: @active-background;
|
||||
8
users/daniel/configs/system/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./alacritty
|
||||
./helix
|
||||
./kitty
|
||||
./neovim
|
||||
];
|
||||
}
|
||||
7
users/daniel/configs/system/helix/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{...}:
|
||||
{
|
||||
home.file.".config/helix" = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
@@ -1,21 +1,62 @@
|
||||
{ pkgs, fetchurl, ... }:
|
||||
{ pkgs, lib, fetchurl, hostname, headless, ... }:
|
||||
let
|
||||
cliPackages = with pkgs; [
|
||||
aerc
|
||||
entr
|
||||
go_1_18
|
||||
gomuks
|
||||
gopls
|
||||
oh-my-zsh
|
||||
(
|
||||
let
|
||||
my-python-packages = python-packages: with python-packages; [
|
||||
tkinter
|
||||
requests
|
||||
];
|
||||
python-with-my-packages = python3.withPackages my-python-packages;
|
||||
in
|
||||
python-with-my-packages
|
||||
)
|
||||
ranger
|
||||
restic
|
||||
rust-analyzer
|
||||
starship
|
||||
];
|
||||
|
||||
guiPackages = with pkgs; [
|
||||
_1password
|
||||
_1password-gui
|
||||
discord
|
||||
feh
|
||||
iosevka
|
||||
jetbrains.goland
|
||||
mpv
|
||||
nerdfonts
|
||||
pamixer
|
||||
pavucontrol
|
||||
playerctl
|
||||
spotify
|
||||
xclip
|
||||
];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../progs/alacritty
|
||||
../progs/i3
|
||||
../progs/i3status-rust
|
||||
../progs/kitty
|
||||
../progs/neovim
|
||||
../progs/rofi
|
||||
|
||||
./configs/system
|
||||
|
||||
] ++ lib.optionals (!headless) [
|
||||
|
||||
./configs/desktop
|
||||
|
||||
] ++ lib.optionals (builtins.pathExists ./host-specific/${hostname}) [
|
||||
|
||||
./host-specific/${hostname}
|
||||
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "daniel";
|
||||
homeDirectory = "/home/daniel";
|
||||
sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
};
|
||||
sessionPath = [
|
||||
"$HOME/go/bin"
|
||||
];
|
||||
@@ -23,23 +64,8 @@
|
||||
file = {
|
||||
".icons/default".source = "${pkgs.capitaine-cursors}/share/icons/capitaine-cursors";
|
||||
|
||||
".config/helix" = {
|
||||
source = ../progs/helix;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
"bin/aupdate" = {
|
||||
source = ../../scripts/aupdate;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
"bin/bupdate" = {
|
||||
source = ../../scripts/bupdate;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
"bin/hmupdate" = {
|
||||
source = ../../scripts/hmupdate;
|
||||
"bin/update" = {
|
||||
source = ../../scripts/update;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
@@ -47,48 +73,9 @@
|
||||
source = ../../scripts/supdate;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
"bin/update" = {
|
||||
source = ../../scripts/update;
|
||||
executable = true;
|
||||
};
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
_1password
|
||||
_1password-gui
|
||||
aerc
|
||||
discord
|
||||
entr
|
||||
feh
|
||||
go_1_18
|
||||
gomuks
|
||||
gopls
|
||||
helix
|
||||
iosevka
|
||||
mpv
|
||||
nerdfonts
|
||||
oh-my-zsh
|
||||
pamixer
|
||||
pavucontrol
|
||||
playerctl
|
||||
(
|
||||
let
|
||||
my-python-packages = python-packages: with python-packages; [
|
||||
tkinter
|
||||
requests
|
||||
];
|
||||
python-with-my-packages = python3.withPackages my-python-packages;
|
||||
in
|
||||
python-with-my-packages
|
||||
)
|
||||
ranger
|
||||
restic
|
||||
rust-analyzer
|
||||
spotify
|
||||
starship
|
||||
xclip
|
||||
];
|
||||
packages = cliPackages ++ lib.optionals (!headless) guiPackages;
|
||||
|
||||
keyboard = {
|
||||
layout = "gb";
|
||||
@@ -7,10 +7,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
jetbrains.goland
|
||||
];
|
||||
|
||||
programs.alacritty.settings.font.size = 13;
|
||||
programs.kitty.font.size = 22;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 835 KiB After Width: | Height: | Size: 835 KiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 411 KiB After Width: | Height: | Size: 411 KiB |
|
Before Width: | Height: | Size: 665 KiB After Width: | Height: | Size: 665 KiB |
@@ -7,10 +7,6 @@
|
||||
source = ./wallpapers;
|
||||
};
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
jetbrains.goland
|
||||
];
|
||||
};
|
||||
|
||||
programs.kitty.font.size = 19;
|
||||
|
Before Width: | Height: | Size: 523 KiB After Width: | Height: | Size: 523 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
@@ -1,50 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.i3status-rust = {
|
||||
enable = true;
|
||||
bars = {
|
||||
main = {
|
||||
theme = "dracula";
|
||||
icons = "awesome";
|
||||
blocks = [
|
||||
{
|
||||
block = "time";
|
||||
}
|
||||
{
|
||||
block = "battery";
|
||||
allow_missing = true;
|
||||
hide_missing = true;
|
||||
}
|
||||
{
|
||||
block = "backlight";
|
||||
device = "intel_backlight";
|
||||
step_width = 10;
|
||||
invert_icons = true;
|
||||
}
|
||||
{
|
||||
block = "networkmanager";
|
||||
on_click = "alacritty -e nmtui";
|
||||
primary_only = true;
|
||||
ap_format = "{ssid}";
|
||||
device_format = "{icon}{ap}";
|
||||
}
|
||||
{
|
||||
block = "keyboard_layout";
|
||||
}
|
||||
{
|
||||
block = "notify";
|
||||
}
|
||||
{
|
||||
block = "music";
|
||||
player = "spotify";
|
||||
buttons = [ "prev" "play" "next" ];
|
||||
}
|
||||
{
|
||||
block = "sound";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
3
users/default.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
daniel = import ./daniel;
|
||||
}
|
||||