feat(flake): Switch to flake-parts & nixos-unified
This commit is contained in:
parent
c72836206c
commit
291e7226f8
5 changed files with 106 additions and 40 deletions
51
flake.lock
51
flake.lock
|
@ -1,5 +1,23 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730504689,
|
||||||
|
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -20,6 +38,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-unified": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1729697921,
|
||||||
|
"narHash": "sha256-gqcmWE+4Vr5/l6AoQc2jIbJHCAXAY+qWPC0ruoAHV1Q=",
|
||||||
|
"owner": "srid",
|
||||||
|
"repo": "nixos-unified",
|
||||||
|
"rev": "e60e64841e74c777799624531dcb2f311f95f639",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "srid",
|
||||||
|
"repo": "nixos-unified",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730785428,
|
"lastModified": 1730785428,
|
||||||
|
@ -36,9 +69,23 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730504152,
|
||||||
|
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nixos-unified": "nixos-unified",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"rose-pine": "rose-pine",
|
"rose-pine": "rose-pine",
|
||||||
"rose-pine-amfora": "rose-pine-amfora",
|
"rose-pine-amfora": "rose-pine-amfora",
|
||||||
|
@ -53,11 +100,11 @@
|
||||||
"rev": "14b2e2c3f3e1721adb6e8e44f1385b1e9b0d0453",
|
"rev": "14b2e2c3f3e1721adb6e8e44f1385b1e9b0d0453",
|
||||||
"revCount": 382,
|
"revCount": 382,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.punkfairie.net/punkfairie/rose-pine-nix"
|
"url": "https://codewith.babesonthe.net/punkfairie/rose-pine-nix"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.punkfairie.net/punkfairie/rose-pine-nix"
|
"url": "https://codewith.babesonthe.net/punkfairie/rose-pine-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rose-pine-amfora": {
|
"rose-pine-amfora": {
|
||||||
|
|
77
flake.nix
77
flake.nix
|
@ -1,7 +1,56 @@
|
||||||
{
|
{
|
||||||
description = "marleyOS";
|
description = "marleyOS";
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ self, ... }@inputs:
|
||||||
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.nixos-unified.flakeModules.default
|
||||||
|
];
|
||||||
|
|
||||||
|
flake = {
|
||||||
|
homeModules.marley =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.rose-pine.homeManagerModules.rose-pine
|
||||||
|
./modules/home/iconTheme.nix
|
||||||
|
./modules/home/shellAbbrs.nix
|
||||||
|
./home
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
perSystem =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
me = "marley";
|
||||||
|
home = if pkgs.stdenv.isDarwin then "Users" else "home";
|
||||||
|
inherit (self.nixos-unified.lib) mkHomeConfiguration;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
legacyPackages.homeConfigurations."${me}" = mkHomeConfiguration pkgs (
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [ self.homeModules."${me}" ];
|
||||||
|
home.username = me;
|
||||||
|
home.homeDirectory = "/${home}/${me}";
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
formatter = pkgs.nixfmt-rfc-style;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
nixos-unified.url = "github:srid/nixos-unified";
|
||||||
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
@ -22,32 +71,4 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
|
||||||
{
|
|
||||||
nixpkgs,
|
|
||||||
home-manager,
|
|
||||||
...
|
|
||||||
}@inputs:
|
|
||||||
{
|
|
||||||
homeConfigurations."marley" =
|
|
||||||
let
|
|
||||||
system = "x86_64-linux";
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
in
|
|
||||||
home-manager.lib.homeManagerConfiguration {
|
|
||||||
inherit pkgs;
|
|
||||||
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
};
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
inputs.rose-pine.homeManagerModules.rose-pine
|
|
||||||
./modules/home/shellAbbrs.nix
|
|
||||||
./modules/home/iconTheme.nix
|
|
||||||
./home
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ inputs, ... }:
|
{ flake, ... }:
|
||||||
{
|
{
|
||||||
xdg.configFile."qt5ct/colors/rose-pine.conf".source = "${inputs.rose-pine-qt5ct}/rose-pine.conf";
|
xdg.configFile."qt5ct/colors/rose-pine.conf".source = "${flake.inputs.rose-pine-qt5ct}/rose-pine.conf";
|
||||||
|
|
||||||
qt = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
# nixgl,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
home.username = "marley";
|
targets.genericLinux.enable = lib.mkIf pkgs.stdenv.isLinux true;
|
||||||
home.homeDirectory = "/home/marley";
|
|
||||||
|
|
||||||
targets.genericLinux.enable = true;
|
|
||||||
|
|
||||||
home.language.base = "en_US.UTF-8";
|
home.language.base = "en_US.UTF-8";
|
||||||
|
|
||||||
|
@ -56,7 +53,8 @@
|
||||||
# You should not change this value, even if you update Home Manager. If you do
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
# want to update the value, then make sure to first check the Home Manager
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
# release notes.
|
# release notes.
|
||||||
home.stateVersion = "24.05"; # Please read the comment before changing.
|
# home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||||
|
# ((this is set in flake.nix but I wanted to keep the explanation here.))
|
||||||
|
|
||||||
# Let home Manager install and manage itself.
|
# Let home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, inputs, ... }:
|
{ pkgs, flake, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
amfora
|
amfora
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
# Possibly set this in rose-pine-nix as well?
|
# Possibly set this in rose-pine-nix as well?
|
||||||
# There is no programs.amfora so it would require adding attl opts to base
|
# There is no programs.amfora so it would require adding attl opts to base
|
||||||
# rose-pine.
|
# rose-pine.
|
||||||
xdg.configFile."amfora/theme.toml".source = "${inputs.rose-pine-amfora}/themes/rose-pine.toml";
|
xdg.configFile."amfora/theme.toml".source = "${flake.inputs.rose-pine-amfora}/themes/rose-pine.toml";
|
||||||
|
|
||||||
# https://github.com/makeworld-the-better-one/amfora/blob/master/default-config.toml
|
# https://github.com/makeworld-the-better-one/amfora/blob/master/default-config.toml
|
||||||
# Amfora requires a number of options to run - omitting everything didn't care
|
# Amfora requires a number of options to run - omitting everything didn't care
|
||||||
|
|
Loading…
Reference in a new issue