Compare commits
6 commits
dbb0d71b2b
...
4880ce65ae
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4880ce65ae | ||
![]() |
ad59ee55cc | ||
![]() |
8191d1be67 | ||
![]() |
a5040dcc1b | ||
![]() |
52bb01cc79 | ||
![]() |
b871c2c50b |
14 changed files with 116 additions and 26 deletions
24
flake.lock
generated
24
flake.lock
generated
|
@ -7,11 +7,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744743431,
|
"lastModified": 1745557122,
|
||||||
"narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=",
|
"narHash": "sha256-eqSo9ugzsqhFgaDFYUZj943nurlX4L6f+AW0skJ4W+M=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387",
|
"rev": "dd26f75fb4ec1c731d4b1396eaf4439ce40a91c1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -74,11 +74,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744633460,
|
"lastModified": 1745955289,
|
||||||
"narHash": "sha256-fbWE4Xpw6eH0Q6in+ymNuDwTkqmFmtxcQEmtRuKDTTk=",
|
"narHash": "sha256-mmV2oPhQN+YF2wmnJzXX8tqgYmUYXUj3uUUBSTmYN5o=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "9a049b4a421076d27fee3eec664a18b2066824cb",
|
"rev": "72081c9fbbef63765ae82bff9727ea79cc86bd5b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -90,11 +90,11 @@
|
||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744463964,
|
"lastModified": 1745930157,
|
||||||
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
|
"narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
|
"rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -106,11 +106,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744440957,
|
"lastModified": 1745921652,
|
||||||
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
|
"narHash": "sha256-hEAvEN+y/OQ7wA7+u3bFJwXSe8yoSf2QaOMH3hyTJTQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
|
"rev": "b000159bba69b0106a42f65e52dbf27f77aca9d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -24,5 +24,5 @@
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {...}@inArgs: import ./outputs.nix inArgs;
|
outputs = inArgs: import ./outputs.nix inArgs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
inArgs: hostname: {
|
inArgs: hostname: hostOptions:
|
||||||
${hostname} = inArgs.nixpkgs.lib.nixosSystem {
|
let
|
||||||
|
nixosSystem =
|
||||||
|
if (hostOptions ? unstable && hostOptions.unstable)
|
||||||
|
then inArgs.nixos-unstable.lib.nixosSystem
|
||||||
|
else inArgs.nixpkgs.lib.nixosSystem;
|
||||||
|
in
|
||||||
|
nixosSystem {
|
||||||
specialArgs = {inherit inArgs;};
|
specialArgs = {inherit inArgs;};
|
||||||
modules = [
|
modules = [
|
||||||
{networking.hostName = hostname;}
|
{networking.hostName = hostname;}
|
||||||
(./hosts/${hostname})
|
(./hosts/${hostname})
|
||||||
];
|
];
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
nixos-unstable,
|
nixos-unstable,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
#networking.hostName = "crocoite"; # Define your hostname.
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
@ -34,9 +32,9 @@
|
||||||
# });
|
# });
|
||||||
# })
|
# })
|
||||||
];
|
];
|
||||||
|
|
||||||
# Configure your nixpkgs instance
|
# Configure your nixpkgs instance
|
||||||
config = {
|
config = {
|
||||||
# Disable if you don't want unfree packages
|
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
41
hosts/game-luanti/default.nix
Normal file
41
hosts/game-luanti/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "25.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
nixpkgs.config = {
|
||||||
|
# Disable if you don't want unfree packages
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
|
# https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager,
|
||||||
|
# focused on correctness, usability, and growth –
|
||||||
|
# and committed to doing right by its community.
|
||||||
|
nix.package = pkgs.lix;
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
../../modules/locale.nix
|
||||||
|
|
||||||
|
../../system_profiles/mini.nix
|
||||||
|
{
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
6
hosts/game-luanti/hardware-configuration.nix
Normal file
6
hosts/game-luanti/hardware-configuration.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
5
modules/game/server/luanti/default.nix
Normal file
5
modules/game/server/luanti/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{...}: {
|
||||||
|
services.minetest = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -10,7 +10,6 @@
|
||||||
./obs-studio.nix
|
./obs-studio.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./programs.nix
|
./programs.nix
|
||||||
./shell.nix
|
|
||||||
./virt.nix
|
./virt.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./zsh.nix
|
|
||||||
./fish.nix
|
./fish.nix
|
||||||
|
./shell.nix
|
||||||
|
./zsh.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,5 +11,4 @@
|
||||||
direnv.enableFishIntegration = true;
|
direnv.enableFishIntegration = true;
|
||||||
foot.enableFishIntegration = true;
|
foot.enableFishIntegration = true;
|
||||||
};
|
};
|
||||||
environment.systemPackages = [pkgs.starship];
|
|
||||||
}
|
}
|
||||||
|
|
11
outputs.nix
11
outputs.nix
|
@ -9,15 +9,18 @@ inArgs: let
|
||||||
# pass to it, with each system as an argument
|
# pass to it, with each system as an argument
|
||||||
forAllSystems = inArgs.nixpkgs.lib.genAttrs systems;
|
forAllSystems = inArgs.nixpkgs.lib.genAttrs systems;
|
||||||
|
|
||||||
|
lib = inArgs.nixpkgs.lib;
|
||||||
|
|
||||||
hostHelper = import ./hostHelper.nix inArgs;
|
hostHelper = import ./hostHelper.nix inArgs;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
# to add more append // (host_helper example);
|
# to add more append // (host_helper example);
|
||||||
|
nixosConfigurations = builtins.mapAttrs (hostName: hostOptions: (hostHelper hostName hostOptions)) {
|
||||||
nixosConfigurations =
|
crocoite = {};
|
||||||
(hostHelper "crocoite"); #// (host_helper2 "jitsi");
|
game-luanti = {unstable = true;};
|
||||||
|
};
|
||||||
|
|
||||||
# Your custom packages
|
# Your custom packages
|
||||||
# Accessible through 'nix build', 'nix shell', etc
|
# Accessible through 'nix build', 'nix shell', etc
|
||||||
|
@ -33,4 +36,6 @@ in {
|
||||||
# Formatter for your nix files, available through 'nix fmt'
|
# Formatter for your nix files, available through 'nix fmt'
|
||||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||||
formatter = forAllSystems (system: inArgs.nixpkgs.legacyPackages.${system}.alejandra);
|
formatter = forAllSystems (system: inArgs.nixpkgs.legacyPackages.${system}.alejandra);
|
||||||
|
|
||||||
|
#checks = forAllSystems (system: inArgs(hostHelper "crocoite").system.build.toplevel);
|
||||||
}
|
}
|
||||||
|
|
10
system_profiles/mini-container.nix
Normal file
10
system_profiles/mini-container.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./mini.nix
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.isContainer = true;
|
||||||
|
boot.kernel.enable = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
21
system_profiles/mini.nix
Normal file
21
system_profiles/mini.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/minimal.nix")
|
||||||
|
(modulesPath + "/profiles/perlless.nix")
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.isContainer = true;
|
||||||
|
boot.kernel.enable = false;
|
||||||
|
environment.defaultPackages = [];
|
||||||
|
nixpkgs.overlays = [(self: super: {})];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
disabledModules = [
|
||||||
|
(modulesPath + "/profiles/all-hardware.nix")
|
||||||
|
(modulesPath + "/profiles/base.nix")
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue