Remove Rubble, update flake and such
This commit is contained in:
parent
933e51557d
commit
0b125f96f4
15 changed files with 34 additions and 162 deletions
|
@ -4,13 +4,13 @@ Thanks for taking a look at my Nix* flake!
|
||||||
While this is primarily organized for my own use, you may find each individual service or config useful to read, reference, learn from, and adapt for your own systems.
|
While this is primarily organized for my own use, you may find each individual service or config useful to read, reference, learn from, and adapt for your own systems.
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
Installing this flake is best done from an existing system. A minimal install is fastest, but is up to you. After installing NixOS, backup your hardware-config.nix file, and adapt it to fit the format of ``/hosts``, adjusting for your specific system.
|
You can install this flake from any system with Nix installed, including any ISO.
|
||||||
|
|
||||||
An initial install will can be done with ``nixos-rebuild switch --flake /etc/nixos/.#host``, where ``host`` is a hostname defined in this flake. You may also have to enable "experimental" features with a flag, such as nix-command and flakes.
|
An initial install will can be done with ``nixos-rebuild switch --flake /etc/nixos/.#host``, where ``host`` is a hostname defined in this flake. You may also have to enable "experimental" features with a flag, such as nix-command and flakes.
|
||||||
|
You will want to generate a hardware-config.nix file using ``nixos-generate-config --root ./ --no-filesystems``, and adapt it to fit the format of ``/hosts``, adjusting for your specific system.
|
||||||
Home-Manager is handled with the system, but can be used on other systems with Nix without root. A rebuild of a user's home is done with ``home-manager switch --flake /etc/nixos/.#user``, as defined under ``homeConfigurations`` in the flake.
|
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
Home-Manager is handled with the system, but can be used on other systems with Nix without root. A rebuild of a user's home is done with ``home-manager switch --flake /etc/nixos/.#user``, as defined under ``homeConfigurations`` in the flake.
|
||||||
|
|
||||||
My config uses these tools:
|
My config uses these tools:
|
||||||
``Sway`` - Window manager / Desktop
|
``Sway`` - Window manager / Desktop
|
||||||
``ZSH`` - Primary shell
|
``ZSH`` - Primary shell
|
||||||
|
|
30
flake.lock
generated
30
flake.lock
generated
|
@ -314,11 +314,11 @@
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740880473,
|
"lastModified": 1741312303,
|
||||||
"narHash": "sha256-qS5cbZantakWcCjVjWAPilGOaV04ZN8dVXcsbsDhaYc=",
|
"narHash": "sha256-IdyQAirUjIcEDcfZbzoVKc983wJxMN4hbTPnjyU1vFY=",
|
||||||
"owner": "Infinidoge",
|
"owner": "Infinidoge",
|
||||||
"repo": "nix-minecraft",
|
"repo": "nix-minecraft",
|
||||||
"rev": "2143797cb223af6441d2085552da930f7430e3d3",
|
"rev": "e8797eabd0a0835bf6dacd0087c2cbfb0bad8f9d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -406,11 +406,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740743217,
|
"lastModified": 1741332913,
|
||||||
"narHash": "sha256-brsCRzLqimpyhORma84c3W2xPbIidZlIc3JGIuQVSNI=",
|
"narHash": "sha256-ri1e8ZliWS3Jnp9yqpKApHaOo7KBN33W8ECAKA4teAQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b27ba4eb322d9d2bf2dc9ada9fd59442f50c8d7c",
|
"rev": "20755fa05115c84be00b04690630cb38f0a203ad",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -421,11 +421,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740695751,
|
"lastModified": 1741246872,
|
||||||
"narHash": "sha256-D+R+kFxy1KsheiIzkkx/6L63wEHBYX21OIwlFV8JvDs=",
|
"narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6313551cd05425cd5b3e63fe47dbc324eabb15e4",
|
"rev": "10069ef4cf863633f57238f179a0297de84bd8d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -442,11 +442,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740905231,
|
"lastModified": 1741383898,
|
||||||
"narHash": "sha256-L0f/pwKTkXLojuYJKNV3bYBTvZ8leOcKRNpnrD3k9YY=",
|
"narHash": "sha256-hIiLfvj0qZjBLhk5eBhIv8SZJ+bI8d06Hxp480mJ1aI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "e48029b67f41c929589353ee08b84c02906f5756",
|
"rev": "54352c3c3110f34e71a2ae9a0210aa6955555760",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -574,11 +574,11 @@
|
||||||
},
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740695751,
|
"lastModified": 1741246872,
|
||||||
"narHash": "sha256-D+R+kFxy1KsheiIzkkx/6L63wEHBYX21OIwlFV8JvDs=",
|
"narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6313551cd05425cd5b3e63fe47dbc324eabb15e4",
|
"rev": "10069ef4cf863633f57238f179a0297de84bd8d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -65,7 +65,6 @@
|
||||||
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010
|
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010
|
||||||
midas = mkNix [ ./hosts/midas ]; # Dell Optiplex 5040
|
midas = mkNix [ ./hosts/midas ]; # Dell Optiplex 5040
|
||||||
prophet = mkNix [ ./hosts/prophet ]; # Oracle Neoverse-N1
|
prophet = mkNix [ ./hosts/prophet ]; # Oracle Neoverse-N1
|
||||||
rubble = mkNix [ ./hosts/rubble ]; # ROCKPro64 SBC
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# home-manager switch --flake /etc/nixos#arch
|
# home-manager switch --flake /etc/nixos#arch
|
||||||
|
|
4
hosts/envy/boot/default.nix
Normal file
4
hosts/envy/boot/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./boot
|
||||||
./disko
|
./disko
|
||||||
./filesystems
|
./filesystems
|
||||||
./hardware
|
./hardware
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
boot.kernelParams = [
|
boot = {
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
kernelParams = [
|
||||||
"radeon.cik_support=0"
|
"radeon.cik_support=0"
|
||||||
"amdgpu.cik_support=1"
|
"amdgpu.cik_support=1"
|
||||||
];
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# nixos-generate-config --root ./ --no-filesystems
|
|
||||||
{ config, lib, modulesPath, ... }:
|
{ config, lib, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./disko
|
|
||||||
./hardware
|
|
||||||
./users
|
|
||||||
../../modules/system
|
|
||||||
];
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "rubble";
|
|
||||||
hostId = "e0b1fcef";
|
|
||||||
wg-quick.interfaces.wgc.address = [ "10.100.0.28/24" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
system = {
|
|
||||||
desktop.enable = true;
|
|
||||||
extlinux.enable = true;
|
|
||||||
wireless.enable = true;
|
|
||||||
wireguard.client.enable = true;
|
|
||||||
stateVersion = "24.11";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,90 +0,0 @@
|
||||||
{ config, disko, ... }:
|
|
||||||
{
|
|
||||||
imports = [ disko.nixosModules.disko ];
|
|
||||||
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
"${config.networking.hostName}" = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/mmcblk1";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
ESP = {
|
|
||||||
priority = 1;
|
|
||||||
size = "2G";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
mountOptions = [ "umask=0077" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
luks = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "luks";
|
|
||||||
name = "${config.networking.hostName}-disk";
|
|
||||||
settings.allowDiscards = true;
|
|
||||||
passwordFile = "/tmp/secret.key";
|
|
||||||
content = {
|
|
||||||
type = "lvm_pv";
|
|
||||||
vg = "${config.networking.hostName}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
lvm_vg = {
|
|
||||||
"${config.networking.hostName}" = {
|
|
||||||
type = "lvm_vg";
|
|
||||||
lvs = {
|
|
||||||
root = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "btrfs";
|
|
||||||
extraArgs = [ "-f" ];
|
|
||||||
subvolumes = {
|
|
||||||
"/root" = {
|
|
||||||
mountpoint = "/";
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
|
||||||
};
|
|
||||||
"/prev" = {
|
|
||||||
mountpoint = "/prev";
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" "ssd" "noexec" ];
|
|
||||||
};
|
|
||||||
"/nix" = {
|
|
||||||
mountpoint = "/nix";
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Impermanence
|
|
||||||
"/persist" = {
|
|
||||||
mountpoint = "/persist";
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
|
||||||
};
|
|
||||||
"/persist/.snapshots" = { };
|
|
||||||
"/persist/home/${config.sysusers.main}" = { };
|
|
||||||
"/persist/home/${config.sysusers.main}/.snapshots" = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
swap = {
|
|
||||||
size = "4G";
|
|
||||||
content = {
|
|
||||||
type = "swap";
|
|
||||||
discardPolicy = "both";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Needed for impermanence
|
|
||||||
fileSystems."/persist".neededForBoot = true;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ config, lib, modulesPath, ... }:
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "ahci" "dm-snapshot" "mmc_core" "pcie_rockchip_host" "phy_rockchip_pcie" "rockchip_dfi" "rockchip_thermal" "rtc_rk808" "rockchip_saradc" "uas" "fusb302" ];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF4oyz5yAvmVZDdr3NL2AmlnCA6Z17b2Vj0FXj07DFiv
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [ ./main ];
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
{
|
|
||||||
home-manager.users."${config.sysusers.main}".home = {
|
|
||||||
desktop.enable = true;
|
|
||||||
stateVersion = lib.mkForce config.system.stateVersion;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -20,7 +20,6 @@
|
||||||
../../../../../../hosts/kitty/id_ed25519.pub
|
../../../../../../hosts/kitty/id_ed25519.pub
|
||||||
../../../../../../hosts/midas/id_ed25519.pub
|
../../../../../../hosts/midas/id_ed25519.pub
|
||||||
../../../../../../hosts/prophet/id_ed25519.pub
|
../../../../../../hosts/prophet/id_ed25519.pub
|
||||||
../../../../../../hosts/rubble/id_ed25519.pub
|
|
||||||
];
|
];
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJahAoF74BY6GCTsFkt1ADKaraFgJJozW1Y1aBTLK0j9 Pixel9"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJahAoF74BY6GCTsFkt1ADKaraFgJJozW1Y1aBTLK0j9 Pixel9"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{ pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
boot.supportedFilesystems = {
|
boot.supportedFilesystems = {
|
||||||
btrfs = true;
|
btrfs = true;
|
||||||
ntfs = true;
|
ntfs = true;
|
||||||
zfs = true;
|
zfs = lib.mkIf config.system.server.enable true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue