flake migration (again)
This commit is contained in:
parent
71184851d8
commit
39d2219bb1
12
base.nix
12
base.nix
@ -1,15 +1,19 @@
|
|||||||
{ config, lib, pkgs, options, ... }: {
|
{ config, lib, pkgs, inputs, outputs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
./modules/apps.nix
|
./modules/apps.nix
|
||||||
./modules/dev.nix
|
./modules/dev.nix
|
||||||
./modules/shell.nix
|
./modules/shell.nix
|
||||||
./modules/services.nix
|
./modules/services.nix
|
||||||
./jawz.nix
|
./jawz.nix
|
||||||
];
|
];
|
||||||
system = {
|
home-manager = {
|
||||||
copySystemConfiguration = true;
|
useUserPackages = true;
|
||||||
stateVersion = "23.11";
|
useGlobalPkgs = true;
|
||||||
|
extraSpecialArgs = { inherit inputs outputs; };
|
||||||
|
users.jawz = import ./home-manager/default.nix;
|
||||||
};
|
};
|
||||||
|
system.stateVersion = "23.11";
|
||||||
time = {
|
time = {
|
||||||
timeZone = "America/Mexico_City";
|
timeZone = "America/Mexico_City";
|
||||||
hardwareClockInLocalTime = true;
|
hardwareClockInLocalTime = true;
|
||||||
|
|||||||
66
flake.lock
generated
Normal file
66
flake.lock
generated
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1714043624,
|
||||||
|
"narHash": "sha256-Xn2r0Jv95TswvPlvamCC46wwNo8ALjRCMBJbGykdhcM=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "86853e31dc1b62c6eeed11c667e8cdd0285d4411",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-23.11",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1714272655,
|
||||||
|
"narHash": "sha256-3/ghIWCve93ngkx5eNPdHIKJP/pMzSr5Wc4rNKE1wOc=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "12430e43bd9b81a6b4e79e64f87c624ade701eaf",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-23.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1714253743,
|
||||||
|
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
44
flake.nix
Normal file
44
flake.nix
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
description = "A very basic flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11";
|
||||||
|
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
|
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs:
|
||||||
|
let
|
||||||
|
inherit (self) outputs;
|
||||||
|
lib = nixpkgs.lib // home-manager.lib;
|
||||||
|
system = "x86_64-linux";
|
||||||
|
makePkgs = repo:
|
||||||
|
import repo {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
pkgs = makePkgs nixpkgs;
|
||||||
|
pkgsU = makePkgs nixpkgs-unstable;
|
||||||
|
in {
|
||||||
|
inherit lib pkgs;
|
||||||
|
formatter = pkgs.alejandra;
|
||||||
|
nixosConfigurations = {
|
||||||
|
workstation = lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./hosts/workstation/configuration.nix
|
||||||
|
({ pkgs, ... }: {
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
|
planify = pkgsU.planify;
|
||||||
|
gdtoolkit = pkgsU.gdtoolkit;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -1,137 +1,131 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, inputs, outputs, ... }: {
|
||||||
let
|
# let
|
||||||
version = "23.11";
|
# version = "23.11";
|
||||||
home-manager = builtins.fetchTarball
|
# home-manager = builtins.fetchTarball
|
||||||
"https://github.com/nix-community/home-manager/archive/release-${version}.tar.gz";
|
# "https://github.com/nix-community/home-manager/archive/release-${version}.tar.gz";
|
||||||
in {
|
# in {
|
||||||
imports = [ (import "${home-manager}/nixos") ];
|
# imports = [ (import "${home-manager}/nixos") ];
|
||||||
home-manager = {
|
home.stateVersion = "23.11";
|
||||||
useUserPackages = true;
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
users.jawz = { config, pkgs, ... }: {
|
|
||||||
home.stateVersion = version;
|
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
|
||||||
historyFile = "\${XDG_STATE_HOME}/bash/history";
|
|
||||||
historyControl = [ "erasedups" "ignorespace" "ignoredups" ];
|
|
||||||
shellAliases = {
|
|
||||||
hh = "hstr";
|
|
||||||
ls = "eza --icons --group-directories-first";
|
|
||||||
edit = "emacsclient -t";
|
|
||||||
comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"'';
|
|
||||||
gallery =
|
|
||||||
''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
|
|
||||||
cp = "cp -i";
|
|
||||||
mv = "mv -i";
|
|
||||||
mkdir = "mkdir -p";
|
|
||||||
rm = "trash";
|
|
||||||
".." = "cd ..";
|
|
||||||
"..." = "cd ../..";
|
|
||||||
".3" = "cd ../../..";
|
|
||||||
".4" = "cd ../../../..";
|
|
||||||
".5" = "cd ../../../../..";
|
|
||||||
dl = "download -u jawz -i";
|
|
||||||
e = "edit";
|
|
||||||
c = "cat";
|
|
||||||
b = "bat";
|
|
||||||
f = "fzf --multi --exact -i";
|
|
||||||
sc = "systemctl --user";
|
|
||||||
jc = "journalctl --user -xefu";
|
|
||||||
open-gallery = ''
|
|
||||||
cd /mnt/pool/scrapping/JawZ/gallery-dl &&
|
|
||||||
xdg-open "$(fd . ./ Husbands -tdirectory -d 1 | fzf -i)"'';
|
|
||||||
unique-extensions = ''
|
|
||||||
fd -tf | rev | cut -d. -f1 | rev |
|
|
||||||
tr '[:upper:]' '[:lower:]' | sort |
|
|
||||||
uniq --count | sort -rn'';
|
|
||||||
};
|
|
||||||
enableVteIntegration = true;
|
|
||||||
initExtra = ''
|
|
||||||
$HOME/.local/bin/pokemon-colorscripts -r --no-title
|
|
||||||
|
|
||||||
list_root="${config.xdg.configHome}"/jawz/lists/jawz
|
programs.bash = {
|
||||||
export LW=$list_root/watch.txt
|
enable = true;
|
||||||
export LI=$list_root/instant.txt
|
historyFile = "\${XDG_STATE_HOME}/bash/history";
|
||||||
export LC=$list_root/comic.txt
|
historyControl = [ "erasedups" "ignorespace" "ignoredups" ];
|
||||||
export command_timeout=60
|
shellAliases = {
|
||||||
|
hh = "hstr";
|
||||||
|
ls = "eza --icons --group-directories-first";
|
||||||
|
edit = "emacsclient -t";
|
||||||
|
comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"'';
|
||||||
|
gallery = ''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
|
||||||
|
cp = "cp -i";
|
||||||
|
mv = "mv -i";
|
||||||
|
mkdir = "mkdir -p";
|
||||||
|
rm = "trash";
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
".3" = "cd ../../..";
|
||||||
|
".4" = "cd ../../../..";
|
||||||
|
".5" = "cd ../../../../..";
|
||||||
|
dl = "download -u jawz -i";
|
||||||
|
e = "edit";
|
||||||
|
c = "cat";
|
||||||
|
b = "bat";
|
||||||
|
f = "fzf --multi --exact -i";
|
||||||
|
sc = "systemctl --user";
|
||||||
|
jc = "journalctl --user -xefu";
|
||||||
|
open-gallery = ''
|
||||||
|
cd /mnt/pool/scrapping/JawZ/gallery-dl &&
|
||||||
|
xdg-open "$(fd . ./ Husbands -tdirectory -d 1 | fzf -i)"'';
|
||||||
|
unique-extensions = ''
|
||||||
|
fd -tf | rev | cut -d. -f1 | rev |
|
||||||
|
tr '[:upper:]' '[:lower:]' | sort |
|
||||||
|
uniq --count | sort -rn'';
|
||||||
|
};
|
||||||
|
enableVteIntegration = true;
|
||||||
|
initExtra = ''
|
||||||
|
$HOME/.local/bin/pokemon-colorscripts -r --no-title
|
||||||
|
|
||||||
if command -v fzf-share >/dev/null; then
|
list_root="${config.xdg.configHome}"/jawz/lists/jawz
|
||||||
source "$(fzf-share)/key-bindings.bash"
|
export LW=$list_root/watch.txt
|
||||||
source "$(fzf-share)/completion.bash"
|
export LI=$list_root/instant.txt
|
||||||
fi
|
export LC=$list_root/comic.txt
|
||||||
|
export command_timeout=60
|
||||||
|
|
||||||
nixos-reload () {
|
if command -v fzf-share >/dev/null; then
|
||||||
NIXOSDIR=/home/jawz/Development/NixOS
|
source "$(fzf-share)/key-bindings.bash"
|
||||||
# nix-store --add-fixed sha256 \
|
source "$(fzf-share)/completion.bash"
|
||||||
# $NIXOSDIR/PureRef-1.11.1_x64.Appimage
|
fi
|
||||||
fd --full-path $NIXOSDIR -e nix -x nixfmt \;
|
|
||||||
sudo unbuffer nixos-rebuild switch -I \
|
nixos-reload () {
|
||||||
nixos-config="$NIXOSDIR/hosts/$HOSTNAME/configuration.nix" \
|
NIXOSDIR=/home/jawz/Development/NixOS
|
||||||
|& nom
|
# nix-store --add-fixed sha256 \
|
||||||
}
|
# $NIXOSDIR/PureRef-1.11.1_x64.Appimage
|
||||||
'';
|
fd --full-path $NIXOSDIR -e nix -x nixfmt \;
|
||||||
};
|
sudo unbuffer nixos-rebuild switch -I \
|
||||||
xdg = {
|
nixos-config="$NIXOSDIR/hosts/$HOSTNAME/configuration.nix" \
|
||||||
enable = true;
|
|& nom
|
||||||
userDirs = {
|
}
|
||||||
enable = true;
|
'';
|
||||||
createDirectories = false;
|
};
|
||||||
desktop = "${config.home.homeDirectory}";
|
xdg = {
|
||||||
documents = "${config.home.homeDirectory}/Documents";
|
enable = true;
|
||||||
download = "${config.home.homeDirectory}/Downloads";
|
userDirs = {
|
||||||
music = "${config.home.homeDirectory}/Music";
|
enable = true;
|
||||||
pictures = "${config.home.homeDirectory}/Pictures";
|
createDirectories = false;
|
||||||
templates = "${config.xdg.dataHome}/Templates";
|
desktop = "${config.home.homeDirectory}";
|
||||||
videos = "${config.home.homeDirectory}/Videos";
|
documents = "${config.home.homeDirectory}/Documents";
|
||||||
};
|
download = "${config.home.homeDirectory}/Downloads";
|
||||||
configFile = {
|
music = "${config.home.homeDirectory}/Music";
|
||||||
"wgetrc".source = ../dotfiles/wget/wgetrc;
|
pictures = "${config.home.homeDirectory}/Pictures";
|
||||||
"configstore/update-notifier-npm-check.json".source =
|
templates = "${config.xdg.dataHome}/Templates";
|
||||||
../dotfiles/npm/update-notifier-npm-check.json;
|
videos = "${config.home.homeDirectory}/Videos";
|
||||||
"npm/npmrc".source = ../dotfiles/npm/npmrc;
|
};
|
||||||
"gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json;
|
configFile = {
|
||||||
"htop/htoprc".source = ../dotfiles/htop/htoprc;
|
"wgetrc".source = ../dotfiles/wget/wgetrc;
|
||||||
"python/pythonrc".source = ../dotfiles/pythonrc;
|
"configstore/update-notifier-npm-check.json".source =
|
||||||
};
|
../dotfiles/npm/update-notifier-npm-check.json;
|
||||||
};
|
"npm/npmrc".source = ../dotfiles/npm/npmrc;
|
||||||
programs = {
|
"gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json;
|
||||||
helix = { enable = true; };
|
"htop/htoprc".source = ../dotfiles/htop/htoprc;
|
||||||
hstr.enable = true;
|
"python/pythonrc".source = ../dotfiles/pythonrc;
|
||||||
zoxide = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
};
|
|
||||||
direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
};
|
|
||||||
bat = {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
pager = "less -FR";
|
|
||||||
theme = "base16";
|
|
||||||
};
|
|
||||||
extraPackages = with pkgs.bat-extras; [
|
|
||||||
batman # man pages
|
|
||||||
batpipe # piping
|
|
||||||
batgrep # ripgrep
|
|
||||||
batdiff # this is getting crazy!
|
|
||||||
batwatch # probably my next best friend
|
|
||||||
prettybat # trans your sourcecode!
|
|
||||||
];
|
|
||||||
};
|
|
||||||
git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "Danilo Reyes";
|
|
||||||
userEmail = "CaptainJawZ@protonmail.com";
|
|
||||||
};
|
|
||||||
htop = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.htop-vim;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = { lorri.enable = true; };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
programs = {
|
||||||
|
helix = { enable = true; };
|
||||||
|
hstr.enable = true;
|
||||||
|
zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
};
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
bat = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
pager = "less -FR";
|
||||||
|
theme = "base16";
|
||||||
|
};
|
||||||
|
extraPackages = with pkgs.bat-extras; [
|
||||||
|
batman # man pages
|
||||||
|
batpipe # piping
|
||||||
|
batgrep # ripgrep
|
||||||
|
batdiff # this is getting crazy!
|
||||||
|
batwatch # probably my next best friend
|
||||||
|
prettybat # trans your sourcecode!
|
||||||
|
];
|
||||||
|
};
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "Danilo Reyes";
|
||||||
|
userEmail = "CaptainJawZ@protonmail.com";
|
||||||
|
};
|
||||||
|
htop = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.htop-vim;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services = { lorri.enable = true; };
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,6 @@ in {
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../base.nix
|
../../base.nix
|
||||||
../../gnome.nix
|
../../gnome.nix
|
||||||
../../home-manager/default.nix
|
|
||||||
# ../../services/systemd-user/tasks.nix
|
# ../../services/systemd-user/tasks.nix
|
||||||
];
|
];
|
||||||
my = {
|
my = {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
{ config, pkgs, modulesPath, lib, ... }: {
|
{ config, pkgs, modulesPath, lib, ... }: {
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
hardware = {
|
hardware = {
|
||||||
cpu.amd.updateMicrocode =
|
cpu.amd.updateMicrocode =
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|||||||
@ -1,10 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }: {
|
||||||
let
|
|
||||||
unstable = import
|
|
||||||
(builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") {
|
|
||||||
config = config.nixpkgs.config;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
options.my = {
|
options.my = {
|
||||||
apps.art.enable = lib.mkEnableOption "enable";
|
apps.art.enable = lib.mkEnableOption "enable";
|
||||||
dev.gameDev.enable = lib.mkEnableOption "enable";
|
dev.gameDev.enable = lib.mkEnableOption "enable";
|
||||||
@ -22,7 +16,7 @@ in {
|
|||||||
blender # cgi animation and sculpting
|
blender # cgi animation and sculpting
|
||||||
]) ++ (if config.my.dev.gameDev.enable then [
|
]) ++ (if config.my.dev.gameDev.enable then [
|
||||||
godot_4 # game development
|
godot_4 # game development
|
||||||
unstable.gdtoolkit # gdscript language server
|
gdtoolkit # gdscript language server
|
||||||
] else
|
] else
|
||||||
[ ]);
|
[ ]);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,10 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }: {
|
||||||
let
|
|
||||||
unstable = import
|
|
||||||
(builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") {
|
|
||||||
config = config.nixpkgs.config;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
options.my.apps.gaming.enable = lib.mkEnableOption "enable";
|
options.my.apps.gaming.enable = lib.mkEnableOption "enable";
|
||||||
config = lib.mkIf config.my.apps.gaming.enable {
|
config = lib.mkIf config.my.apps.gaming.enable {
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
|
|||||||
@ -1,10 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }: {
|
||||||
let
|
|
||||||
unstable = import
|
|
||||||
(builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") {
|
|
||||||
config = config.nixpkgs.config;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
options.my.apps.office.enable = lib.mkEnableOption "enable";
|
options.my.apps.office.enable = lib.mkEnableOption "enable";
|
||||||
config = lib.mkIf config.my.apps.office.enable {
|
config = lib.mkIf config.my.apps.office.enable {
|
||||||
users.users.jawz.packages = with pkgs; ([
|
users.users.jawz.packages = with pkgs; ([
|
||||||
@ -12,7 +6,7 @@ in {
|
|||||||
calibre # ugly af eBook library manager
|
calibre # ugly af eBook library manager
|
||||||
newsflash # feed reader, syncs with nextcloud
|
newsflash # feed reader, syncs with nextcloud
|
||||||
furtherance # I packaged this one tehee track time utility
|
furtherance # I packaged this one tehee track time utility
|
||||||
unstable.planify # let's pretend I will organize my tasks
|
planify # let's pretend I will organize my tasks
|
||||||
# foliate # gtk eBook reader
|
# foliate # gtk eBook reader
|
||||||
# wike # gtk wikipedia wow!
|
# wike # gtk wikipedia wow!
|
||||||
# denaro # manage your finances
|
# denaro # manage your finances
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user