mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-13 03:37:18 +00:00
Adds winbox system, cleans up nixos modules
This commit is contained in:
parent
a7c69788b0
commit
d5621f05ae
19 changed files with 273 additions and 173 deletions
|
@ -37,6 +37,13 @@
|
||||||
home.sessionVariables.NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
|
home.sessionVariables.NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
|
||||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hyprland = {
|
||||||
|
imports = [
|
||||||
|
inputs.hyprland.homeManagerModules.default
|
||||||
|
{wayland.windowManager.hyprland.enable = true;}
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
// modules;
|
// modules;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
self.homeManagerModules.nixpkgs-useFlakeNixpkgs
|
self.homeManagerModules.nixpkgs-useFlakeNixpkgs
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.emacs.enableOrgTex = true;
|
||||||
|
|
||||||
home.homeDirectory = "/Users/willem";
|
home.homeDirectory = "/Users/willem";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -31,6 +33,8 @@
|
||||||
self.homeManagerModules.linux
|
self.homeManagerModules.linux
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.emacs.enableOrgTex = false;
|
||||||
|
|
||||||
home.homeDirectory = "/home/willem";
|
home.homeDirectory = "/home/willem";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -51,6 +55,7 @@
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [self.homeManagerModules."user-willem-${systemType}" {nix.package = pkgs.nix;}];
|
modules = [self.homeManagerModules."user-willem-${systemType}" {nix.package = pkgs.nix;}];
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = let
|
packages = let
|
||||||
activationPackages = builtins.mapAttrs (_: lib.getAttr "activationPackage") homeConfigurations;
|
activationPackages = builtins.mapAttrs (_: lib.getAttr "activationPackage") homeConfigurations;
|
||||||
in
|
in
|
||||||
|
|
|
@ -9,12 +9,17 @@
|
||||||
../../nixos/profiles/common.nix
|
../../nixos/profiles/common.nix
|
||||||
../../nixos/profiles/linux/base.nix
|
../../nixos/profiles/linux/base.nix
|
||||||
self.nixosModules.useFlakeNixpkgs
|
self.nixosModules.useFlakeNixpkgs
|
||||||
|
self.nixosModules.users-willem
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = builtins.attrValues self.overlays;
|
nixpkgs.overlays = builtins.attrValues self.overlays;
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosModules.darwinArmVM = {...}: {
|
||||||
|
virtualisation.host.pkgs = inputs.nixpkgs.legacyPackages.aarch64-darwin;
|
||||||
|
};
|
||||||
|
|
||||||
nixosModules.willem-home = {...}: {
|
nixosModules.willem-home = {...}: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
@ -23,6 +28,14 @@
|
||||||
home-manager.users.willem = self.homeManagerModules.user-willem-linux;
|
home-manager.users.willem = self.homeManagerModules.user-willem-linux;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosModules.willem-hyprland = {...}: {
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
self.nixosModules.homeManagerIntegration
|
||||||
|
];
|
||||||
|
home-manager.users.willem = self.homeManagerModules.user-willem-linux // self.homeManagerModules.hyprland;
|
||||||
|
};
|
||||||
|
|
||||||
darwinModules.base = {...}: {
|
darwinModules.base = {...}: {
|
||||||
imports = [
|
imports = [
|
||||||
../../nixos/profiles/common.nix
|
../../nixos/profiles/common.nix
|
||||||
|
@ -34,33 +47,14 @@
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosConfigurations.zeusvm = inputs.nixpkgs.lib.nixosSystem {
|
nixosConfigurations.winbox = inputs.nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
self.nixosModules.willem-home
|
self.nixosModules.willem-hyprland
|
||||||
../../nixos/hosts/zeus.utmvm.nix
|
../../nixos/hosts/winbox.nix
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosConfigurations.zeusasahi = inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
modules = [
|
|
||||||
self.nixosModules.appleSilicon
|
|
||||||
self.nixosModules.base
|
|
||||||
self.nixosModules.willem-home
|
|
||||||
../../nixos/hosts/zeus.asahi.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosConfigurations.m1-installer-live = inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
modules = [
|
|
||||||
self.nixosModules.appleSilicon
|
|
||||||
self.nixosModules.base
|
|
||||||
../../nixos/hosts/live.nix
|
|
||||||
../../nixos/hosts/asahi-live.nix
|
|
||||||
];
|
];
|
||||||
|
specialArgs = {inherit inputs;};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosConfigurations.arm-live = inputs.nixpkgs.lib.nixosSystem {
|
nixosConfigurations.arm-live = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
@ -69,6 +63,18 @@
|
||||||
self.nixosModules.base
|
self.nixosModules.base
|
||||||
../../nixos/hosts/live.nix
|
../../nixos/hosts/live.nix
|
||||||
];
|
];
|
||||||
|
specialArgs = {inherit inputs;};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixosConfigurations.darwinArmMinimalVM = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
modules = [
|
||||||
|
self.nixosModules.users-willemVm
|
||||||
|
self.nixosModules.base
|
||||||
|
self.nixosModules.headlessVm
|
||||||
|
self.nixosModules.darwinArmVM
|
||||||
|
];
|
||||||
|
specialArgs = {inherit inputs;};
|
||||||
};
|
};
|
||||||
|
|
||||||
darwinConfigurations.zeus = inputs.darwin.lib.darwinSystem {
|
darwinConfigurations.zeus = inputs.darwin.lib.darwinSystem {
|
||||||
|
@ -79,5 +85,7 @@
|
||||||
];
|
];
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packages.aarch64-darwin.minimalVM = self.nixosConfigurations.darwinArmMinimalVM.config.system.build.vm;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
131
flake.lock
generated
131
flake.lock
generated
|
@ -130,7 +130,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_2"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685518550,
|
"lastModified": 1685518550,
|
||||||
|
@ -187,6 +187,53 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"hyprland": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprland-protocols": "hyprland-protocols",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"systems": "systems_2",
|
||||||
|
"wlroots": "wlroots",
|
||||||
|
"xdph": "xdph"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1699296543,
|
||||||
|
"narHash": "sha256-9MYwT+vVmitFIjPZhzn5ZsKNCwgKGU98SW1gAX5bvXs=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "Hyprland",
|
||||||
|
"rev": "29e0a7112ef5c412e4af640b9d80f80b81a26c94",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "Hyprland",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland-protocols": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1691753796,
|
||||||
|
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-protocols",
|
||||||
|
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-protocols",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixos-apple-silicon": {
|
"nixos-apple-silicon": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
|
@ -276,6 +323,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1698134075,
|
||||||
|
"narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1699099776,
|
"lastModified": 1699099776,
|
||||||
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
|
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
|
||||||
|
@ -322,8 +385,9 @@
|
||||||
"fenix": "fenix",
|
"fenix": "fenix",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"hyprland": "hyprland",
|
||||||
"nixos-apple-silicon": "nixos-apple-silicon",
|
"nixos-apple-silicon": "nixos-apple-silicon",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -376,6 +440,21 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_2": {
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
@ -389,6 +468,54 @@
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"wlroots": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"host": "gitlab.freedesktop.org",
|
||||||
|
"lastModified": 1697909146,
|
||||||
|
"narHash": "sha256-jU0I6FoCKnj4zIBL4daosFWh81U1fM719Z6cae8PxSY=",
|
||||||
|
"owner": "wlroots",
|
||||||
|
"repo": "wlroots",
|
||||||
|
"rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"host": "gitlab.freedesktop.org",
|
||||||
|
"owner": "wlroots",
|
||||||
|
"repo": "wlroots",
|
||||||
|
"rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xdph": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprland-protocols": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprland-protocols"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1697981233,
|
||||||
|
"narHash": "sha256-y8q4XUwx+gVK7i2eLjfR32lVo7TYvEslyzrmzYEaPZU=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
|
"rev": "22e7a65ff9633e1dedfa5317fdffc49f68de2ff2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
nixos-apple-silicon.url = "github:tpwrules/nixos-apple-silicon";
|
nixos-apple-silicon.url = "github:tpwrules/nixos-apple-silicon";
|
||||||
nixos-apple-silicon.inputs.nixpkgs.follows = "nixpkgs";
|
nixos-apple-silicon.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
home.file = {
|
|
||||||
".config/nixpkgs/config.nix".text = ''
|
|
||||||
# -*-nix-*-
|
|
||||||
{
|
|
||||||
nixpkgs.config.allowUnfreePredicate = (_: true);
|
|
||||||
allowUnfree = true;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -34,11 +34,10 @@ in {
|
||||||
clang-tools
|
clang-tools
|
||||||
cmake
|
cmake
|
||||||
comma
|
comma
|
||||||
coreutils-full
|
coreutils
|
||||||
curl
|
curl
|
||||||
docker
|
docker
|
||||||
docker-compose
|
docker-compose
|
||||||
elan
|
|
||||||
fd
|
fd
|
||||||
fenix-rust
|
fenix-rust
|
||||||
findutils
|
findutils
|
||||||
|
@ -46,10 +45,7 @@ in {
|
||||||
gnuplot
|
gnuplot
|
||||||
graphviz
|
graphviz
|
||||||
htop
|
htop
|
||||||
iaito
|
|
||||||
jq
|
jq
|
||||||
lua_p
|
|
||||||
lua-language-server
|
|
||||||
mu
|
mu
|
||||||
nix-zsh-completions
|
nix-zsh-completions
|
||||||
nixfmt
|
nixfmt
|
||||||
|
@ -61,23 +57,18 @@ in {
|
||||||
pass-git-helper
|
pass-git-helper
|
||||||
pinentry
|
pinentry
|
||||||
plantuml
|
plantuml
|
||||||
poppler
|
|
||||||
pv
|
pv
|
||||||
python-wp
|
python-wp
|
||||||
radare2
|
|
||||||
ripgrep
|
ripgrep
|
||||||
rnix-lsp
|
rnix-lsp
|
||||||
rsync
|
rsync
|
||||||
shellcheck
|
shellcheck
|
||||||
shfmt
|
shfmt
|
||||||
spotify-tui
|
|
||||||
spotifyd
|
|
||||||
sqlite
|
sqlite
|
||||||
stylua
|
stylua
|
||||||
texinfo
|
texinfo
|
||||||
tldr
|
tldr
|
||||||
units
|
units
|
||||||
unp
|
|
||||||
unrar
|
unrar
|
||||||
unzip
|
unzip
|
||||||
wget
|
wget
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
localVariables = {
|
localVariables = {
|
||||||
PROMPT = "\n%B%F{blue}%~\n%F{green}$ %f%b";
|
PROMPT = "\n%B%F{cyan}%m:%F{blue}%~\n%F{green}$ %f%b";
|
||||||
RPROMPT = "%B%F{red}%*%f%b";
|
RPROMPT = "%B%F{red}%*%f%b";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
boot.postBootCommands = let
|
|
||||||
inherit (config.hardware.asahi.pkgs) asahi-fwextract;
|
|
||||||
in ''
|
|
||||||
for o in $(</proc/cmdline); do
|
|
||||||
case "$o" in
|
|
||||||
live.nixos.passwd=*)
|
|
||||||
set -- $(IFS==; echo $o)
|
|
||||||
echo "nixos:$2" | ${pkgs.shadow}/bin/chpasswd
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
echo Extracting Asahi firmware...
|
|
||||||
mkdir -p /tmp/.fwsetup/{esp,extracted}
|
|
||||||
|
|
||||||
mount /dev/disk/by-partuuid/`cat /proc/device-tree/chosen/asahi,efi-system-partition` /tmp/.fwsetup/esp
|
|
||||||
${asahi-fwextract}/bin/asahi-fwextract /tmp/.fwsetup/esp/asahi /tmp/.fwsetup/extracted
|
|
||||||
umount /tmp/.fwsetup/esp
|
|
||||||
|
|
||||||
pushd /tmp/.fwsetup/
|
|
||||||
cat /tmp/.fwsetup/extracted/firmware.cpio | ${pkgs.cpio}/bin/cpio -id --quiet --no-absolute-filenames
|
|
||||||
mkdir -p /lib/firmware
|
|
||||||
mv vendorfw/* /lib/firmware
|
|
||||||
popd
|
|
||||||
rm -rf /tmp/.fwsetup
|
|
||||||
'';
|
|
||||||
|
|
||||||
hardware.asahi.extractPeripheralFirmware = false;
|
|
||||||
|
|
||||||
isoImage.squashfsCompression = "zstd -Xcompression-level 6";
|
|
||||||
|
|
||||||
networking.wireless.enable = false;
|
|
||||||
|
|
||||||
networking.wireless.iwd = {
|
|
||||||
enable = true;
|
|
||||||
settings.General.EnableNetworkConfiguration = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -12,8 +12,6 @@
|
||||||
];
|
];
|
||||||
networking.hostName = "nixos-live";
|
networking.hostName = "nixos-live";
|
||||||
|
|
||||||
isoImage.makeEfiBootable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
curl
|
curl
|
||||||
ddrescue
|
ddrescue
|
||||||
|
@ -39,7 +37,6 @@
|
||||||
wget
|
wget
|
||||||
w3m-nographics
|
w3m-nographics
|
||||||
zip
|
zip
|
||||||
mesa
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Include support for various filesystems and tools to create / manipulate them.
|
# Include support for various filesystems and tools to create / manipulate them.
|
||||||
|
@ -49,6 +46,11 @@
|
||||||
|
|
||||||
boot.enableContainers = false;
|
boot.enableContainers = false;
|
||||||
|
|
||||||
|
# get rid of mdadm warning
|
||||||
|
boot.swraid.mdadmConf = ''
|
||||||
|
PROGRAM ${pkgs.coreutils}/bin/true
|
||||||
|
'';
|
||||||
|
|
||||||
# Configure host id for ZFS to work
|
# Configure host id for ZFS to work
|
||||||
networking.hostId = lib.mkDefault "8425e349";
|
networking.hostId = lib.mkDefault "deadbeef";
|
||||||
}
|
}
|
||||||
|
|
40
nixos/hosts/winbox.nix
Normal file
40
nixos/hosts/winbox.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||||
|
boot.initrd.kernelModules = [];
|
||||||
|
boot.kernelModules = ["amdgpu"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
hardware.opengl.driSupport = true;
|
||||||
|
|
||||||
|
hardware.opengl.extraPackages = with pkgs; [
|
||||||
|
amdvlk
|
||||||
|
];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/9b616ca8-63fe-4d81-a13e-25c9a95a1a55";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot/efi" = {
|
||||||
|
device = "/dev/disk/by-uuid/4FEE-904E";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [];
|
||||||
|
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
|
@ -1,38 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [../profiles/linux/gnome.nix];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["usb_storage" "sdhci_pci"];
|
|
||||||
boot.initrd.kernelModules = [];
|
|
||||||
boot.kernelModules = [];
|
|
||||||
boot.extraModulePackages = [];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = false;
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/47408b5a-efcf-47b7-abd6-591b890fb1f3";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/315C-14F5";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.asahi.extractPeripheralFirmware = false;
|
|
||||||
|
|
||||||
swapDevices = [];
|
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
networking.hostName = "zeusasahi";
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
boot.extraModulePackages = [];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "virtio_pci" "usbhid" "usb_storage" "sr_mod"];
|
|
||||||
boot.initrd.kernelModules = [];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [mesa];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-label/nixos";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" = {
|
|
||||||
device = "/dev/disk/by-label/BOOT";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "zeus-utmvm";
|
|
||||||
|
|
||||||
services.spice-vdagentd.enable = true;
|
|
||||||
|
|
||||||
swapDevices = [];
|
|
||||||
}
|
|
5
nixos/modules/headlessVm.nix
Normal file
5
nixos/modules/headlessVm.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [./vm.nix];
|
||||||
|
virtualisation.vmVariant.virtualisation.graphics = false;
|
||||||
|
virtualisation.graphics = false;
|
||||||
|
}
|
5
nixos/modules/users/willem-vm.nix
Normal file
5
nixos/modules/users/willem-vm.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [./willem.nix];
|
||||||
|
users.users.willem.hashedPassword = "";
|
||||||
|
services.getty.autologinUser = "willem";
|
||||||
|
}
|
14
nixos/modules/users/willem.nix
Normal file
14
nixos/modules/users/willem.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
users.users.willem = {
|
||||||
|
shell = lib.mkDefault pkgs.zsh;
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = ["networkmanager" "wheel" "video" "udev"];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBx1z962nl87rmOk/vw3EBSgqU/VlCqON8zTeLHQcSBp willem@zeus"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
18
nixos/modules/vm.nix
Normal file
18
nixos/modules/vm.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
modulesPath,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
"${modulesPath}/virtualisation/qemu-vm.nix"
|
||||||
|
];
|
||||||
|
|
||||||
|
system.stateVersion = lib.mkDefault "23.05";
|
||||||
|
|
||||||
|
console.keyMap = lib.mkDefault "colemak";
|
||||||
|
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
boot.initrd.kernelModules = ["virtio_balloon" "virtio_console" "virtio_rng"];
|
||||||
|
boot.initrd.availableKernelModules = ["virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio"];
|
||||||
|
}
|
|
@ -1,7 +1,11 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
environment.pathsToLink = ["/share/zsh"];
|
environment.pathsToLink = ["/share/zsh"];
|
||||||
environment.shells = [pkgs.bashInteractive pkgs.zsh];
|
environment.shells = [pkgs.bashInteractive pkgs.zsh];
|
||||||
environment.systemPackages = [pkgs.coreutils-full pkgs.git];
|
environment.systemPackages = [pkgs.coreutils pkgs.git];
|
||||||
environment.variables.LANG = "en_US.UTF-8";
|
environment.variables.LANG = "en_US.UTF-8";
|
||||||
environment.variables.LANGUAGE = "en_US.UTF-8";
|
environment.variables.LANGUAGE = "en_US.UTF-8";
|
||||||
environment.variables.LC_ALL = "en_US.UTF-8";
|
environment.variables.LC_ALL = "en_US.UTF-8";
|
||||||
|
@ -25,10 +29,11 @@
|
||||||
documentation.man.enable = true;
|
documentation.man.enable = true;
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
programs.zsh.shellInit = lib.mkDefault "zsh-newuser-install() { :; }";
|
||||||
programs.zsh.enableBashCompletion = true;
|
programs.zsh.enableBashCompletion = true;
|
||||||
programs.zsh.promptInit = ''
|
programs.zsh.promptInit = lib.mkDefault ''
|
||||||
autoload -U promptinit && promptinit
|
autoload -U promptinit && promptinit
|
||||||
export PROMPT=$'\n'"%B%F{blue}%3~"$'\n'"%F{green}%(!.#.$) %f%b"
|
export PROMPT=$'\n'"%B%F{cyan}%m:%F{blue}%~"$'\n'"%F{green}%(!.#.$) %f%b"
|
||||||
export RPROMPT="%B%F{red}%*%f%b"
|
export RPROMPT="%B%F{red}%*%f%b"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,4 @@
|
||||||
services.udev.enable = true;
|
services.udev.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
||||||
users.users.willem = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = ["networkmanager" "wheel" "video" "udev"];
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBx1z962nl87rmOk/vw3EBSgqU/VlCqON8zTeLHQcSBp willem@zeus"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue