mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-13 19:57:19 +00:00
reorganize system stuff
This commit is contained in:
parent
285f2a61fd
commit
0e7342401f
9 changed files with 195 additions and 103 deletions
38
flake.lock
generated
38
flake.lock
generated
|
@ -41,6 +41,27 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-apple-silicon": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1675215747,
|
||||||
|
"narHash": "sha256-O7vwx67l2PNnkNpPXnp7D0oBW+OfFetxdrlwUtaweY4=",
|
||||||
|
"owner": "tpwrules",
|
||||||
|
"repo": "nixos-apple-silicon",
|
||||||
|
"rev": "0086dd0e401f9dde826e6c170d312a87564aa6a4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tpwrules",
|
||||||
|
"repo": "nixos-apple-silicon",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675454231,
|
"lastModified": 1675454231,
|
||||||
|
@ -76,10 +97,27 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nixos-apple-silicon": "nixos-apple-silicon",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nur": "nur"
|
"nur": "nur"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1675132198,
|
||||||
|
"narHash": "sha256-izOVjdIfdv0OzcfO9rXX0lfGkQn4tdJ0eNm3P3LYo/o=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "48b1403150c3f5a9aeee8bc4c77c8926f29c6501",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1667395993,
|
||||||
|
|
54
flake.nix
54
flake.nix
|
@ -7,23 +7,23 @@
|
||||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
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";
|
||||||
|
nixos-apple-silicon.url = "github:tpwrules/nixos-apple-silicon";
|
||||||
|
nixos-apple-silicon.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, home-manager, darwin, nur, ... }:
|
outputs = inputs@{ self, nixpkgs, home-manager, darwin, nixos-apple-silicon, nur, ... }:
|
||||||
let
|
let
|
||||||
pkgsfunc = (system: import nixpkgs {
|
pkgsfunc = ({ system, overlays ? [ ] }: import nixpkgs
|
||||||
inherit system;
|
{
|
||||||
overlays = [
|
inherit system overlays;
|
||||||
(import ./overlays)
|
config = {
|
||||||
];
|
allowUnfree = true;
|
||||||
config = {
|
packageOverrides = pkgs: {
|
||||||
allowUnfree = true;
|
nur = import nur { inherit pkgs; nurpkgs = pkgs; };
|
||||||
packageOverrides = pkgs: {
|
};
|
||||||
nur = import nur { inherit pkgs; nurpkgs = pkgs; };
|
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
});
|
|
||||||
|
|
||||||
user-config = (pkgs: {
|
user-config = (pkgs: {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
@ -46,28 +46,46 @@
|
||||||
|
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
|
|
||||||
pkgs = pkgsfunc system;
|
pkgs = pkgsfunc { inherit system; overlays = [ (import ./overlays) ]; };
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
./modules/nix.nix
|
./modules/nix.nix
|
||||||
./system/darwin.nix
|
./system/zeus.darwin.nix
|
||||||
|
./system/common.nix
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
(user-config pkgs)
|
(user-config pkgs)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nixosConfigurations.zeus-utm-vm = nixpkgs.lib.nixosSystem rec {
|
|
||||||
|
nixosConfigurations.zeus-utmvm = nixpkgs.lib.nixosSystem rec {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
|
|
||||||
pkgs = pkgsfunc system;
|
pkgs = pkgsfunc { inherit system; };
|
||||||
|
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
./modules/nix.nix
|
|
||||||
./system/utm-arm-vm.nix
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
(user-config pkgs)
|
(user-config pkgs)
|
||||||
|
./modules/nix.nix
|
||||||
|
./system/zeus.utmvm.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nixosConfigurations.zeus-asahi = nixpkgs.lib.nixosSystem rec {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
|
||||||
|
pkgs = pkgsfunc { inherit system; overlays = [ nixos-apple-silicon.overlays ]; };
|
||||||
|
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
nixos-apple-silicon.nixosModules.apple-silicon-support
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
(user-config pkgs)
|
||||||
|
./modules/nix.nix
|
||||||
|
./system/zeus.asahi.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
28
system/nixos.common.nix
Normal file
28
system/nixos.common.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./common.nix ];
|
||||||
|
|
||||||
|
console.keyMap = "colemak";
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
programs.command-not-found.enable = false;
|
||||||
|
|
||||||
|
programs.zsh.loginShellInit = ''
|
||||||
|
reexec() {
|
||||||
|
unset __NIX_OS_SET_ENVIRONMENT_DONE
|
||||||
|
unset __ETC_ZPROFILE_SOURCED __ETC_ZSHENV_SOURCED __ETC_ZSHRC_SOURCED
|
||||||
|
exec $SHELL -c 'echo >&2 "reexecuting shell: $SHELL" && exec $SHELL -l'
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
services.udev.enable = true;
|
||||||
|
|
||||||
|
system.stateVersion = "22.11";
|
||||||
|
|
||||||
|
users.users.willem = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
|
};
|
||||||
|
}
|
32
system/nixos.desktop.nix
Normal file
32
system/nixos.desktop.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
freecad
|
||||||
|
qbittorrent
|
||||||
|
vlc
|
||||||
|
];
|
||||||
|
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
layout = "us";
|
||||||
|
libinput.mouse.naturalScrolling = true;
|
||||||
|
libinput.touchpad.naturalScrolling = true;
|
||||||
|
xkbVariant = "colemak";
|
||||||
|
};
|
||||||
|
|
||||||
|
sound.enable = true;
|
||||||
|
}
|
34
system/nixos.gnome.nix
Normal file
34
system/nixos.gnome.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./nixos.desktop.nix ];
|
||||||
|
|
||||||
|
environment.gnome.excludePackages = (with pkgs; [
|
||||||
|
gnome-photos
|
||||||
|
gnome-tour
|
||||||
|
]) ++ (with pkgs.gnome; [
|
||||||
|
cheese # webcam tool
|
||||||
|
gnome-music
|
||||||
|
gedit # text editor
|
||||||
|
epiphany # web browser
|
||||||
|
geary # email reader
|
||||||
|
evince # document viewer
|
||||||
|
gnome-characters
|
||||||
|
totem # video player
|
||||||
|
tali # poker game
|
||||||
|
iagno # go game
|
||||||
|
hitori # sudoku game
|
||||||
|
atomix # puzzle game
|
||||||
|
]);
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
pinentry-gnome
|
||||||
|
];
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
desktopManager.gnome.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
sound.enable = true;
|
||||||
|
}
|
|
@ -1,80 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ./common.nix ];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
|
|
||||||
console.keyMap = "colemak";
|
|
||||||
|
|
||||||
environment.gnome.excludePackages = (with pkgs; [
|
|
||||||
gnome-photos
|
|
||||||
gnome-tour
|
|
||||||
]) ++ (with pkgs.gnome; [
|
|
||||||
cheese # webcam tool
|
|
||||||
gnome-music
|
|
||||||
gedit # text editor
|
|
||||||
epiphany # web browser
|
|
||||||
geary # email reader
|
|
||||||
evince # document viewer
|
|
||||||
gnome-characters
|
|
||||||
totem # video player
|
|
||||||
tali # poker game
|
|
||||||
iagno # go game
|
|
||||||
hitori # sudoku game
|
|
||||||
atomix # puzzle game
|
|
||||||
]);
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
freecad
|
|
||||||
pinentry-gnome
|
|
||||||
qbittorrent
|
|
||||||
vlc
|
|
||||||
];
|
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
programs.command-not-found.enable = false;
|
|
||||||
|
|
||||||
programs.zsh.loginShellInit = ''
|
|
||||||
reexec() {
|
|
||||||
unset __NIX_OS_SET_ENVIRONMENT_DONE
|
|
||||||
unset __ETC_ZPROFILE_SOURCED __ETC_ZSHENV_SOURCED __ETC_ZSHRC_SOURCED
|
|
||||||
exec $SHELL -c 'echo >&2 "reexecuting shell: $SHELL" && exec $SHELL -l'
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
displayManager.gdm.enable = true;
|
|
||||||
desktopManager.gnome.enable = true;
|
|
||||||
layout = "us";
|
|
||||||
libinput.mouse.naturalScrolling = true;
|
|
||||||
libinput.touchpad.naturalScrolling = true;
|
|
||||||
xkbVariant = "colemak";
|
|
||||||
};
|
|
||||||
|
|
||||||
sound.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "22.11";
|
|
||||||
|
|
||||||
users.users.willem = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
};
|
|
||||||
}
|
|
15
system/zeus.asahi.nix
Normal file
15
system/zeus.asahi.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./nixos.common.nix ./nixos.gnome.nix ];
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = false;
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostName = "zeus-asahi";
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./common.nix ];
|
imports = [ ./common.nix ];
|
||||||
|
|
||||||
environment.etc."nix/user-sandbox.sb".text = ''
|
environment.etc."nix/user-sandbox.sb".text = ''
|
||||||
(version 1)
|
(version 1)
|
||||||
(allow default)
|
(allow default)
|
|
@ -1,22 +1,29 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./nixos.nix ];
|
imports = [ ./nixos.common.nix ./nixos.gnome.nix ];
|
||||||
|
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" "usb_storage" "sr_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" "usb_storage" "sr_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/10c8feb5-8fbb-490a-b144-dff00e82f3e9";
|
device = "/dev/disk/by-label/nixos";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot/efi" = {
|
fileSystems."/boot/efi" = {
|
||||||
device = "/dev/disk/by-uuid/3D0E-803C";
|
device = "/dev/disk/by-label/BOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.hostName = "zeus-utmvm";
|
||||||
|
|
||||||
services.spice-vdagentd.enable = true;
|
services.spice-vdagentd.enable = true;
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
Loading…
Add table
Reference in a new issue