flake migration (again)

This commit is contained in:
2024-04-28 13:24:54 -06:00
parent 71184851d8
commit 39d2219bb1
9 changed files with 249 additions and 159 deletions

View File

@@ -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
View 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
View 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; };
};
};
};
}

View File

@@ -1,15 +1,12 @@
{ 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 = { programs.bash = {
enable = true; enable = true;
historyFile = "\${XDG_STATE_HOME}/bash/history"; historyFile = "\${XDG_STATE_HOME}/bash/history";
@@ -19,8 +16,7 @@ in {
ls = "eza --icons --group-directories-first"; ls = "eza --icons --group-directories-first";
edit = "emacsclient -t"; edit = "emacsclient -t";
comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"''; comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"'';
gallery = gallery = ''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
cp = "cp -i"; cp = "cp -i";
mv = "mv -i"; mv = "mv -i";
mkdir = "mkdir -p"; mkdir = "mkdir -p";
@@ -132,6 +128,4 @@ in {
}; };
}; };
services = { lorri.enable = true; }; services = { lorri.enable = true; };
};
};
} }

View File

@@ -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 = {

View File

@@ -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;

View File

@@ -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
[ ]); [ ]);
}; };

View File

@@ -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 = {

View File

@@ -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