Watch
1
0
Fork
You've already forked chitin
0

Compare commits

..
Author SHA1 Message Date
fec3b97c9d
moved systemConstants out of flake-parts namespace
also added `systemConstants` as module argument
2026-10-28 00:43:28 +07:00
14 changed files with 22 additions and 88 deletions

19
flake.lock generated
View file

@ -173,24 +173,7 @@
"nixpkgs-unstable" "nixpkgs-unstable"
], ],
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nvf": "nvf", "nvf": "nvf"
"xcursor-plan9": "xcursor-plan9"
}
},
"xcursor-plan9": {
"flake": false,
"locked": {
"lastModified": 1714831058,
"narHash": "sha256-74ykNDuknGdP6j+cS4ePtGTkGGLqQdpu54TuG7262QI=",
"owner": "wintermute-cell",
"repo": "xcursor-plan9",
"rev": "e0a605c16aff63f8eb958a8415441bf82de09245",
"type": "github"
},
"original": {
"owner": "wintermute-cell",
"repo": "xcursor-plan9",
"type": "github"
} }
} }
}, },

View file

@ -18,9 +18,5 @@
url = "github:NotAShelf/nvf"; url = "github:NotAShelf/nvf";
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
xcursor-plan9 = {
url = "github:wintermute-cell/xcursor-plan9";
flake = false;
};
}; };
} }

View file

@ -1,8 +1,4 @@
{ {inputs, ...}: {
inputs,
systemConstants,
...
}: {
flake-file.inputs = { flake-file.inputs = {
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
}; };
@ -12,5 +8,5 @@
inputs.flake-parts.flakeModules.easyOverlay inputs.flake-parts.flakeModules.easyOverlay
]; ];
systems = systemConstants.infraSystems; systems = ["x86_64-linux"];
} }

View file

@ -28,7 +28,7 @@
(bottles.override {removeWarningPopup = true;}) (bottles.override {removeWarningPopup = true;})
# development # development
emacs emacs
unstable.guile unstable.racket
]; ];
}; };
} }

View file

@ -14,7 +14,7 @@
includes = [ includes = [
{ {
condition = "gitdir:${systemConstants.primaryUserInfraDirectory}"; condition = "gitdir:${systemConstants.primaryUserHomeDirectory}/nixos/";
contents.core.sshCommand = "ssh -i ${systemConstants.primaryUserHomeDirectory}/.ssh/id_ed25519"; contents.core.sshCommand = "ssh -i ${systemConstants.primaryUserHomeDirectory}/.ssh/id_ed25519";
} }
]; ];

View file

@ -35,10 +35,6 @@
}; };
}; };
visuals = {
rainbow-delimiters.enable = true;
};
clipboard = { clipboard = {
enable = true; enable = true;
registers = "unnamedplus"; registers = "unnamedplus";
@ -108,7 +104,7 @@
mode = "i"; mode = "i";
key = "<C-l>"; key = "<C-l>";
action = "λ"; action = "λ";
desc = "inserts lowercase lambda"; desc = "inserts lambda";
} }
]; ];

View file

@ -1,10 +1,6 @@
{ {inputs, ...}: {
inputs,
systemConstants,
...
}: {
flake-file.inputs.home-manager = { flake-file.inputs.home-manager = {
url = "github:nix-community/home-manager/release-${systemConstants.homeManagerStateVersion}"; url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };

View file

@ -1,5 +0,0 @@
{
flake.modules.nixos.base = {
programs.nh.enable = true;
};
}

View file

@ -1,6 +1,9 @@
{ {
flake.modules.nixos.base = {pkgs, ...}: { flake.modules.nixos.base = {pkgs, ...}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nh
alejandra
git
python315 python315
# system utils # system utils
file file

View file

@ -12,7 +12,11 @@ in {
nixpkgs-lib.follows = "nixpkgs-unstable"; nixpkgs-lib.follows = "nixpkgs-unstable";
}; };
perSystem = {system, ...}: { perSystem = {
final,
system,
...
}: {
_module.args.pkgs = import inputs.nixpkgs {inherit system overlays config;}; _module.args.pkgs = import inputs.nixpkgs {inherit system overlays config;};
overlayAttrs.unstable = import inputs.nixpkgs-unstable {inherit system config;}; overlayAttrs.unstable = import inputs.nixpkgs-unstable {inherit system config;};
}; };

View file

@ -1,20 +0,0 @@
{inputs, ...}: {
flake-file.inputs = {
xcursor-plan9 = {
url = "github:wintermute-cell/xcursor-plan9";
flake = false;
};
};
perSystem = {
config,
pkgs,
...
}: {
packages.xcursor-plan9 =
(pkgs.callPackage (inputs.xcursor-plan9 + "/default.nix") {} )
.overrideAttrs (_: {src = inputs.xcursor-plan9;});
overlayAttrs = {inherit (config.packages) xcursor-plan9;};
};
}

View file

@ -1,5 +0,0 @@
{
perSystem = {pkgs, ...}: {
formatter = pkgs.alejandra;
};
}

View file

@ -1,8 +0,0 @@
{
flake.modules.nixos.base = {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
};
}

View file

@ -11,27 +11,25 @@
config.systemConstants = rec { config.systemConstants = rec {
infraName = "chitin"; infraName = "chitin";
infraSystems = ["x86_64-linux"];
repositoryOwnerUsername = "asnev"; repositoryOwnerUsername = "asnev";
repositoryOwnerEmail = "notasnev@proton.me"; repositoryOwnerEmail = "notasnev@proton.me";
nixpkgsStableVersion = "26.05"; nixpkgsStableVersion = "26.05";
nixpkgsAllowUnfree = true; nixpkgsAllowUnfree = true;
nixpkgsOverlays = [self.overlays.default]; nixpkgsOverlays = [
self.overlays.default
];
phostronHostname = "phostron"; phostronHostname = "phostron";
phostronHostPlatform = lib.elemAt infraSystems 0; phostronHostPlatform = "x86_64-linux";
phostronStateVersion = nixpkgsStableVersion; phostronStateVersion = nixpkgsStableVersion;
homeManagerStateVersion = nixpkgsStableVersion; homeManagerStateVersion = nixpkgsStableVersion;
primaryUserUsername = "coyote"; primaryUserUsername = "coyote";
primaryUserHomeDirectory = primaryUserHomeDirectory = "/home/${primaryUserUsername}";
if lib.hasSuffix "linux" phostronHostPlatform primaryUserInfraDirectory = "${primaryUserHomeDirectory}/${infraName}";
then "/home/${primaryUserUsername}"
else throw "Unsupported platform. See `modules/system-constants.nix`.";
primaryUserInfraDirectory = "${primaryUserHomeDirectory}/code/${infraName}";
primaryUserId = 1000; primaryUserId = 1000;
}; };