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": {
|
"locked": {
|
||||||
"lastModified": 1744117652,
|
"lastModified": 1744743431,
|
||||||
"narHash": "sha256-t7dFCDl4vIOOUMhEZnJF15aAzkpaup9x4ZRGToDFYWI=",
|
"narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "b4e98224ad1336751a2ac7493967a4c9f6d9cb3f",
|
"rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -23,11 +23,11 @@
|
||||||
},
|
},
|
||||||
"nix-flatpak": {
|
"nix-flatpak": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741903049,
|
"lastModified": 1744659587,
|
||||||
"narHash": "sha256-8Y8brH04JjSLrCLvBEbhK9vOu7lhQhqUBW4kI3tifdI=",
|
"narHash": "sha256-xJnbmRVte13akgn+Prg06IaRHJ5OX3uVltwsCP/mxoc=",
|
||||||
"owner": "gmodena",
|
"owner": "gmodena",
|
||||||
"repo": "nix-flatpak",
|
"repo": "nix-flatpak",
|
||||||
"rev": "42c7fb2702219b86a8f5969c3475ce594c28f5d0",
|
"rev": "928d868a9141b48f152d3b2b00c433e688d4b106",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -74,11 +74,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743420942,
|
"lastModified": 1744633460,
|
||||||
"narHash": "sha256-b/exDDQSLmENZZgbAEI3qi9yHkuXAXCPbormD8CSJXo=",
|
"narHash": "sha256-fbWE4Xpw6eH0Q6in+ymNuDwTkqmFmtxcQEmtRuKDTTk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "de6fc5551121c59c01e2a3d45b277a6d05077bc4",
|
"rev": "9a049b4a421076d27fee3eec664a18b2066824cb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -90,11 +90,11 @@
|
||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743964447,
|
"lastModified": 1744463964,
|
||||||
"narHash": "sha256-nEo1t3Q0F+0jQ36HJfbJtiRU4OI+/0jX/iITURKe3EE=",
|
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "063dece00c5a77e4a0ea24e5e5a5bd75232806f8",
|
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -106,11 +106,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743975612,
|
"lastModified": 1744440957,
|
||||||
"narHash": "sha256-o4FjFOUmjSRMK7dn0TFdAT0RRWUWD+WsspPHa+qEQT8=",
|
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a880f49904d68b5e53338d1e8c7bf80f59903928",
|
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
100
flake.nix
100
flake.nix
|
@ -1,9 +1,5 @@
|
||||||
{
|
{
|
||||||
######
|
|
||||||
inputs = {
|
inputs = {
|
||||||
######
|
|
||||||
#nixpkgs-old.url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
||||||
|
|
||||||
# Main nix package repository
|
# Main nix package repository
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
|
||||||
|
@ -28,99 +24,5 @@
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||||
};
|
};
|
||||||
|
|
||||||
#######
|
outputs = {...}@inArgs: import ./outputs.nix inArgs;
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
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,
|
pkgs,
|
||||||
inputs,
|
inArgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
nixos-unstable,
|
nixos-unstable,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
networking.hostName = "crocoite"; # Define your hostname.
|
#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
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
#nixpkgs.overlays = [ overlays.unstable-packages ];
|
#nixpkgs.overlays = [ overlays.unstable-packages ];
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
# You can add overlays here
|
# 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):
|
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||||
#additions
|
#additions
|
||||||
#modifications
|
#modifications
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
# steam and other stuff seems to depend on perl
|
# steam and other stuff seems to depend on perl
|
||||||
#"${modulesPath}/profiles/perlless.nix"
|
#"${modulesPath}/profiles/perlless.nix"
|
||||||
|
|
||||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
inArgs.nix-flatpak.nixosModules.nix-flatpak
|
||||||
|
|
||||||
#nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
#nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||||
./hardware-configuration.nix
|
./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";
|
origin = "flathub";
|
||||||
appId = "md.obsidian.Obsidian";
|
appId = "md.obsidian.Obsidian";
|
||||||
} # note taking and brain organising
|
} # note taking and brain organising
|
||||||
|
{
|
||||||
|
origin = "flathub";
|
||||||
|
appId = "com.parsecgaming.parsec";
|
||||||
|
} # remote dekstop
|
||||||
|
|
||||||
# messenger
|
# messenger
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nix-index
|
nix-index
|
||||||
|
comma
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nix-index = {
|
programs.nix-index = {
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
home-manager
|
home-manager
|
||||||
dfc
|
dfc
|
||||||
p7zip
|
p7zip
|
||||||
|
sops
|
||||||
|
|
||||||
# move to homemanager?
|
# move to homemanager?
|
||||||
unstable.mumble
|
unstable.mumble
|
||||||
|
@ -58,6 +59,6 @@
|
||||||
element-desktop
|
element-desktop
|
||||||
rustdesk-flutter
|
rustdesk-flutter
|
||||||
timer
|
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
|
# This file defines overlays
|
||||||
{inputs, ...}: {
|
{inArgs, ...}: {
|
||||||
# This one brings our custom packages from the 'pkgs' directory
|
# This one brings our custom packages from the 'pkgs' directory
|
||||||
additions = final: _prev: import ../pkgs final.pkgs;
|
additions = final: _prev: import ../pkgs final.pkgs;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||||
# be accessible through 'pkgs.unstable'
|
# be accessible through 'pkgs.unstable'
|
||||||
unstable-packages = final: _prev: {
|
unstable-packages = final: _prev: {
|
||||||
unstable = import inputs.nixos-unstable {
|
unstable = import inArgs.nixos-unstable {
|
||||||
system = final.system;
|
system = final.system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue