Compare commits
8 commits
a1ca221025
...
dbb0d71b2b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dbb0d71b2b | ||
![]() |
8198028612 | ||
![]() |
dc411c006e | ||
![]() |
7f094b80c5 | ||
![]() |
ae7517e994 | ||
![]() |
9f91bd342e | ||
![]() |
85399a53b5 | ||
![]() |
67bde45674 |
11 changed files with 135 additions and 121 deletions
30
flake.lock
generated
30
flake.lock
generated
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1744117652,
|
||||
"narHash": "sha256-t7dFCDl4vIOOUMhEZnJF15aAzkpaup9x4ZRGToDFYWI=",
|
||||
"lastModified": 1744743431,
|
||||
"narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "b4e98224ad1336751a2ac7493967a4c9f6d9cb3f",
|
||||
"rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -23,11 +23,11 @@
|
|||
},
|
||||
"nix-flatpak": {
|
||||
"locked": {
|
||||
"lastModified": 1741903049,
|
||||
"narHash": "sha256-8Y8brH04JjSLrCLvBEbhK9vOu7lhQhqUBW4kI3tifdI=",
|
||||
"lastModified": 1744659587,
|
||||
"narHash": "sha256-xJnbmRVte13akgn+Prg06IaRHJ5OX3uVltwsCP/mxoc=",
|
||||
"owner": "gmodena",
|
||||
"repo": "nix-flatpak",
|
||||
"rev": "42c7fb2702219b86a8f5969c3475ce594c28f5d0",
|
||||
"rev": "928d868a9141b48f152d3b2b00c433e688d4b106",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -74,11 +74,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1743420942,
|
||||
"narHash": "sha256-b/exDDQSLmENZZgbAEI3qi9yHkuXAXCPbormD8CSJXo=",
|
||||
"lastModified": 1744633460,
|
||||
"narHash": "sha256-fbWE4Xpw6eH0Q6in+ymNuDwTkqmFmtxcQEmtRuKDTTk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "de6fc5551121c59c01e2a3d45b277a6d05077bc4",
|
||||
"rev": "9a049b4a421076d27fee3eec664a18b2066824cb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -90,11 +90,11 @@
|
|||
},
|
||||
"nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1743964447,
|
||||
"narHash": "sha256-nEo1t3Q0F+0jQ36HJfbJtiRU4OI+/0jX/iITURKe3EE=",
|
||||
"lastModified": 1744463964,
|
||||
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "063dece00c5a77e4a0ea24e5e5a5bd75232806f8",
|
||||
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -106,11 +106,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1743975612,
|
||||
"narHash": "sha256-o4FjFOUmjSRMK7dn0TFdAT0RRWUWD+WsspPHa+qEQT8=",
|
||||
"lastModified": 1744440957,
|
||||
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a880f49904d68b5e53338d1e8c7bf80f59903928",
|
||||
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
100
flake.nix
100
flake.nix
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
######
|
||||
inputs = {
|
||||
######
|
||||
#nixpkgs-old.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
|
||||
# Main nix package repository
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
|
||||
|
@ -28,99 +24,5 @@
|
|||
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||
};
|
||||
|
||||
#######
|
||||
outputs =
|
||||
#######
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixos-hardware,
|
||||
nixos-unstable,
|
||||
nix-flatpak,
|
||||
home-manager,
|
||||
nixos-generators,
|
||||
...
|
||||
} @ inputs: let
|
||||
# Supported systems for your flake packages, shell, etc.
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
# This is a function that generates an attribute by calling a function you
|
||||
# pass to it, with each system as an argument
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
|
||||
host_helper = hostname: {
|
||||
${hostname} = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;} // {inherit nixos-unstable;};
|
||||
modules = [
|
||||
./hosts/${hostname}/${hostname}.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
in {
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', etc
|
||||
#packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
# Formatter for your nix files, available through 'nix fmt'
|
||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
#nixosModules = import ./modules/nixos;
|
||||
# Reusable home-manager modules you might want to export
|
||||
# These are usually stuff you would upstream into home-manager
|
||||
#homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
nixosConfigurations =
|
||||
host_helper "crocoite"; # // (host_helper example);
|
||||
|
||||
## Standalone home-manager configuration entrypoint
|
||||
## Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
#homeConfigurations = {
|
||||
# # FIXME replace with your username@hostname
|
||||
# "your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
# extraSpecialArgs = {inherit inputs;};
|
||||
# modules = [
|
||||
# # > Our main home-manager configuration file <
|
||||
# ./home-manager/home.nix
|
||||
# ];
|
||||
# };
|
||||
#};
|
||||
|
||||
packages.x86_64-linux = {
|
||||
factorio = nixos-generators.nixosGenerate {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
# you can include your own nixos configuration here, i.e.
|
||||
./hosts/factorio/factorio.nix
|
||||
];
|
||||
|
||||
customFormats = {
|
||||
"myFormat" = {
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
"${toString modulesPath}/virtualisation/proxmox-lxc.nix"
|
||||
];
|
||||
boot.loader.grub.enable = lib.mkForce false;
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
formatAttr = "tarball";
|
||||
fileExtension = "asd.tar.xz";
|
||||
};
|
||||
};
|
||||
format = "myFormat";
|
||||
#format = "vmware";
|
||||
};
|
||||
};
|
||||
};
|
||||
outputs = {...}@inArgs: import ./outputs.nix inArgs;
|
||||
}
|
||||
|
|
9
hostHelper.nix
Normal file
9
hostHelper.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
inArgs: hostname: {
|
||||
${hostname} = inArgs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inArgs;};
|
||||
modules = [
|
||||
{networking.hostName = hostname;}
|
||||
(./hosts/${hostname})
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
inArgs,
|
||||
modulesPath,
|
||||
nixos-unstable,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = "crocoite"; # Define your hostname.
|
||||
#networking.hostName = "crocoite"; # Define your hostname.
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
@ -18,7 +18,7 @@
|
|||
#nixpkgs.overlays = [ overlays.unstable-packages ];
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = with inputs.self.overlays; [
|
||||
overlays = with inArgs.self.overlays; [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
#additions
|
||||
#modifications
|
||||
|
@ -56,7 +56,7 @@
|
|||
# steam and other stuff seems to depend on perl
|
||||
#"${modulesPath}/profiles/perlless.nix"
|
||||
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
inArgs.nix-flatpak.nixosModules.nix-flatpak
|
||||
|
||||
#nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||
./hardware-configuration.nix
|
55
hosts/jitsi/default.nix
Normal file
55
hosts/jitsi/default.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
#networking.hostName = "jitsi"; # Define your hostname.
|
||||
# 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 = "24.11"; # 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
|
||||
|
||||
(modulesPath + "/profiles/perlless.nix")
|
||||
(modulesPath + "/profiles/minimal.nix")
|
||||
{
|
||||
environment.defaultPackages = [];
|
||||
boot.kernel.enable = false;
|
||||
boot.isContainer = true;
|
||||
nixpkgs.overlays = [(self: super: {})];
|
||||
}
|
||||
{
|
||||
# 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;
|
||||
}
|
||||
];
|
||||
disabledModules = [
|
||||
(modulesPath + "/profiles/all-hardware.nix")
|
||||
(modulesPath + "/profiles/base.nix")
|
||||
# <nixpkgs/nixos/modules/profiles/all-hardware.nix>
|
||||
# <nixpkgs/nixos/modules/profiles/base.nix>
|
||||
];
|
||||
}
|
6
hosts/jitsi/hardware-configuration.nix
Normal file
6
hosts/jitsi/hardware-configuration.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
|
@ -25,6 +25,10 @@
|
|||
origin = "flathub";
|
||||
appId = "md.obsidian.Obsidian";
|
||||
} # note taking and brain organising
|
||||
{
|
||||
origin = "flathub";
|
||||
appId = "com.parsecgaming.parsec";
|
||||
} # remote dekstop
|
||||
|
||||
# messenger
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nix-index
|
||||
comma
|
||||
];
|
||||
|
||||
programs.nix-index = {
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
home-manager
|
||||
dfc
|
||||
p7zip
|
||||
sops
|
||||
|
||||
# move to homemanager?
|
||||
unstable.mumble
|
||||
|
@ -58,6 +59,6 @@
|
|||
element-desktop
|
||||
rustdesk-flutter
|
||||
timer
|
||||
prusa-slicer
|
||||
unstable.prusa-slicer
|
||||
];
|
||||
}
|
||||
|
|
36
outputs.nix
Normal file
36
outputs.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
inArgs: let
|
||||
# Supported systems for your flake packages, shell, etc.
|
||||
systems = [
|
||||
#"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
# This is a function that generates an attribute by calling a function you
|
||||
# pass to it, with each system as an argument
|
||||
forAllSystems = inArgs.nixpkgs.lib.genAttrs systems;
|
||||
|
||||
hostHelper = import ./hostHelper.nix inArgs;
|
||||
|
||||
in {
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
# to add more append // (host_helper example);
|
||||
|
||||
nixosConfigurations =
|
||||
(hostHelper "crocoite"); #// (host_helper2 "jitsi");
|
||||
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', etc
|
||||
#packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays {inherit inArgs;};
|
||||
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
#nixosModules = import ./modules/nixos;
|
||||
|
||||
# Formatter for your nix files, available through 'nix fmt'
|
||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||
formatter = forAllSystems (system: inArgs.nixpkgs.legacyPackages.${system}.alejandra);
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
# This file defines overlays
|
||||
{inputs, ...}: {
|
||||
{inArgs, ...}: {
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev: import ../pkgs final.pkgs;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
|||
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||
# be accessible through 'pkgs.unstable'
|
||||
unstable-packages = final: _prev: {
|
||||
unstable = import inputs.nixos-unstable {
|
||||
unstable = import inArgs.nixos-unstable {
|
||||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue