-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
101 lines (94 loc) · 2.87 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
description = "Sims' nix config root flake";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
binfiles = {
url = "git+ssh://gitea@kouti:22/simas/binfiles?ref=master";
flake = false;
}; #binfiles
# ipu6-softisp = {
# url = "git+ssh://code.tvl.fyi/depot.git:/users/flokli/ipu6-softisp.git";
# flake = false;
# }; #ipu6-softisp
};
outputs = { self, ... }@inputs:
let
system = "x86_64-linux";
pkgs = import inputs.nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
unstable = import inputs.nixpkgs-unstable {
inherit system;
config = { allowUnfree = true; };
};
args = inputs;
mkHost = host: inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules = [
{ _module.args = args; }
./hosts/${host}/configuration.nix
];
};
mkHome = user: host: type: inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
{ _module.args = args; }
./hosts/${host}/home.nix
./hm/base.nix
./hm/${type}.nix
./modules/settings.nix
{
home = {
username = user;
homeDirectory = "/home/${user}";
stateVersion = "24.11";
};
}
];
};
in
{
homeConfigurations = {
gnosis = mkHome "snarbutas" "gnosis" "workstation";
lavirinthos = mkHome "simonas" "lavirinthos" "workstation";
siMONSTER = mkHome "simas" "siMONSTER" "workstation";
backute = mkHome "simas" "backute" "headless";
polyphemus = mkHome "simas" "polyphemus" "headless";
kouti = mkHome "simas" "kouti" "headless";
devops = mkHome "simonas" "devops" "headless";
};
gnosis = self.homeConfigurations.gnosis.activationPackage;
nixosConfigurations = {
gnosis = mkHost "gnosis";
backute = mkHost "backute";
siMONSTER = mkHost "siMONSTER";
lavirinthos = mkHost "lavirinthos";
polyphemus = mkHost "polyphemus";
kouti = mkHost "kouti";
}; #nixosConfigurations
devShell.x86_64-linux = pkgs.mkShell {
buildInputs = with pkgs; [
nmap
stdenv
openssl
pkg-config
nodejs_20
];
shellHook = ''
user_shell=$(getent passwd "$(whoami)" |cut -d: -f 7)
exec "$user_shell"
'';
}; # devShell
templates = {
rust = {
path = ./templates/rust;
description = "Rust template, using buildRustPackage";
};
};
defaultTemplate = self.templates.rust;
}; #outputs
}