Compare commits
14 Commits
5571ac8657
...
sway
| Author | SHA1 | Date | |
|---|---|---|---|
| 692cebc839 | |||
| f22ff0e286 | |||
| 811b61e9e2 | |||
| 2390d55782 | |||
| 609e5f4548 | |||
| bc5d69e4cf | |||
| 637c0cca2b | |||
| c82a85a630 | |||
| 3b40ecbad1 | |||
| 8b311d4ed0 | |||
| 23639bee01 | |||
| 5d101928f6 | |||
| 4ba82961cd | |||
| c61ee69500 |
264
flake.lock
generated
264
flake.lock
generated
@@ -1,38 +1,5 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"aquamarine": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprutils": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprutils"
|
|
||||||
],
|
|
||||||
"hyprwayland-scanner": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprwayland-scanner"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1725199881,
|
|
||||||
"narHash": "sha256-jsmipf/u1GFZE5tBUkr56CHMN6VpUWCAjfLIhvQijU0=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "aquamarine",
|
|
||||||
"rev": "f8a687dd29ff019657498f1bd14da2fbbf0e604b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "aquamarine",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -53,190 +20,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hy3": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprland": [
|
|
||||||
"hyprland"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1725573970,
|
|
||||||
"narHash": "sha256-KJKO4b5Gl+7t3hF+X56Y0W/Lxf2OxWl/aLgzbiN3+hI=",
|
|
||||||
"owner": "outfoxxed",
|
|
||||||
"repo": "hy3",
|
|
||||||
"rev": "e91460d63627cdad417cac2c09897be58094e2e0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "outfoxxed",
|
|
||||||
"repo": "hy3",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprcursor": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprlang": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprlang"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1722623071,
|
|
||||||
"narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprcursor",
|
|
||||||
"rev": "912d56025f03d41b1ad29510c423757b4379eb1c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprcursor",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprland": {
|
|
||||||
"inputs": {
|
|
||||||
"aquamarine": "aquamarine",
|
|
||||||
"hyprcursor": "hyprcursor",
|
|
||||||
"hyprlang": "hyprlang",
|
|
||||||
"hyprutils": "hyprutils",
|
|
||||||
"hyprwayland-scanner": "hyprwayland-scanner",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": "systems",
|
|
||||||
"xdph": "xdph"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1725738873,
|
|
||||||
"narHash": "sha256-8OT3XRoPoAhiYHMT/hQ6uKE4o7Z99a1Y+711oEPV+dg=",
|
|
||||||
"ref": "refs/heads/main",
|
|
||||||
"rev": "70add904c40924a761059e4009a8c0f1e43d76a3",
|
|
||||||
"revCount": 5194,
|
|
||||||
"submodules": true,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/hyprwm/Hyprland"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"submodules": true,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/hyprwm/Hyprland"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprland-protocols": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"xdph",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"xdph",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1721326555,
|
|
||||||
"narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprland-protocols",
|
|
||||||
"rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprland-protocols",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprlang": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprutils": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprutils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1725188252,
|
|
||||||
"narHash": "sha256-yBH8c4GDaEAtBrh+BqIlrx5vp6gG/Gu8fQQK63KAQgs=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprlang",
|
|
||||||
"rev": "c12ab785ce1982f82594aff03b3104c598186ddd",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprlang",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprutils": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1724966483,
|
|
||||||
"narHash": "sha256-WXDgKIbzjYKczxSZOsJplCS1i1yrTUpsDPuJV/xpYLo=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprutils",
|
|
||||||
"rev": "8976e3f6a5357da953a09511d0c7f6a890fb6ec2",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprutils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprwayland-scanner": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1721324119,
|
|
||||||
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprwayland-scanner",
|
|
||||||
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprwayland-scanner",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725634671,
|
"lastModified": 1725634671,
|
||||||
@@ -256,55 +39,8 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"hy3": "hy3",
|
|
||||||
"hyprland": "hyprland",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xdph": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprland-protocols": "hyprland-protocols",
|
|
||||||
"hyprlang": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprlang"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"systems": [
|
|
||||||
"hyprland",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1725203932,
|
|
||||||
"narHash": "sha256-VLULC/OnI+6R9KEP2OIGk+uLJJsfRlaLouZ5gyFd2+Y=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
|
||||||
"rev": "2425e8f541525fa7409d9f26a8ffaf92a3767251",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
35
flake.nix
35
flake.nix
@@ -8,17 +8,6 @@
|
|||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland = {
|
|
||||||
type = "git";
|
|
||||||
url = "https://github.com/hyprwm/Hyprland";
|
|
||||||
submodules = true;
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
hy3 = {
|
|
||||||
url = "github:outfoxxed/hy3";
|
|
||||||
inputs.hyprland.follows = "hyprland";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... } @ inputs: {
|
outputs = { self, nixpkgs, ... } @ inputs: {
|
||||||
@@ -39,14 +28,30 @@
|
|||||||
|
|
||||||
nixosConfigurations.nix-book = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.nix-book = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs; };
|
|
||||||
modules = [
|
modules = [
|
||||||
|
./roles
|
||||||
./machines/nix-book/configuration.nix
|
./machines/nix-book/configuration.nix
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
inputs.home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
inputs.home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
inputs.home-manager.extraSpecialArgs = { inherit inputs; };
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
home-manager.users.johno = import ./home/home-nix-book.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nixosConfigurations.boxy = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./machines/boxy/configuration.nix
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
home-manager.users.johno = import ./home/home-default.nix;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
with import <nixpkgs> {};
|
|
||||||
let
|
let
|
||||||
nextcloudTalkDesktop = pkgs.callPackage ./modules/applications/nextcloud-talk-desktop/package.nix {};
|
nextcloudTalkDesktop = pkgs.callPackage ./modules/applications/nextcloud-talk-desktop/package.nix {};
|
||||||
in
|
in
|
||||||
@@ -109,7 +108,6 @@ in
|
|||||||
imports = [
|
imports = [
|
||||||
./modules/applications/emacs/default.nix
|
./modules/applications/emacs/default.nix
|
||||||
./modules/games/lutris/default.nix
|
./modules/games/lutris/default.nix
|
||||||
./modules/window_managers/hyprland/default.nix
|
|
||||||
./modules/window_managers/i3/default.nix
|
./modules/window_managers/i3/default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
45
machines/boxy/configuration.nix
Normal file
45
machines/boxy/configuration.nix
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../roles/common/default.nix
|
||||||
|
../../roles/nix/default.nix
|
||||||
|
(import ../../roles/kodi/default.nix { autologin = true; wayland = true; inherit lib; inherit pkgs; })
|
||||||
|
(import ../../roles/users/default.nix { extraGroups = []; })
|
||||||
|
];
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "boxy"; # Define your hostname.
|
||||||
|
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
|
||||||
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
#
|
||||||
|
# Most users should NEVER change this value after the initial install, for any reason,
|
||||||
|
# even if you've upgraded your system to a new NixOS release.
|
||||||
|
#
|
||||||
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||||
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||||
|
# to actually do that.
|
||||||
|
#
|
||||||
|
# This value being lower than the current NixOS release does NOT mean your system is
|
||||||
|
# out of date, out of support, or vulnerable.
|
||||||
|
#
|
||||||
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||||
|
# and migrated your data accordingly.
|
||||||
|
#
|
||||||
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
|
system.stateVersion = "24.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
39
machines/boxy/hardware-configuration.nix
Normal file
39
machines/boxy/hardware-configuration.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/5b0e8428-c9ef-41f9-8beb-a8ccb65ab573";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/59A7-C2A3";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# 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.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
@@ -2,43 +2,22 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, inputs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
roles = {
|
||||||
package = pkgs.nixFlakes;
|
desktop.enable = true;
|
||||||
|
nfs-mounts.enable = true;
|
||||||
distributedBuilds = true;
|
printing.enable = true;
|
||||||
buildMachines = [{
|
users = {
|
||||||
hostName = "z790prors.oglehome";
|
enable = true;
|
||||||
system = "x86_64-linux";
|
extraGroups = [ "video" ];
|
||||||
protocol = "ssh-ng";
|
|
||||||
sshUser = "johno";
|
|
||||||
sshKey = "/root/.ssh/id_ed25519";
|
|
||||||
maxJobs = 3;
|
|
||||||
speedFactor = 2;
|
|
||||||
}];
|
|
||||||
settings = {
|
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
|
|
||||||
substituters = [
|
|
||||||
"https://hyprland.cachix.org"
|
|
||||||
#"ssh://johno@z790prors.oglehome"
|
|
||||||
];
|
|
||||||
|
|
||||||
builders-use-substitutes = true;
|
|
||||||
|
|
||||||
trusted-public-keys = [
|
|
||||||
"arch-store:lBSsckiRVH+A2ZyZWIzPwpSFstAGXcf/d7H1lSmiFo8="
|
|
||||||
"z790prors:2zFp1rh6cS+2aAHwmcKKkkg13LV+x2YVuAh7TCWSckw="
|
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
virtualisation.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
@@ -51,38 +30,9 @@
|
|||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Los_Angeles";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_US.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
|
||||||
LC_MEASUREMENT = "en_US.UTF-8";
|
|
||||||
LC_MONETARY = "en_US.UTF-8";
|
|
||||||
LC_NAME = "en_US.UTF-8";
|
|
||||||
LC_NUMERIC = "en_US.UTF-8";
|
|
||||||
LC_PAPER = "en_US.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_US.UTF-8";
|
|
||||||
LC_TIME = "en_US.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "";
|
|
||||||
options = "caps:escape";
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
@@ -92,52 +42,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.pulseaudio.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.johno = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "John Ogle";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" "audio" ];
|
|
||||||
packages = with pkgs; [];
|
|
||||||
};
|
|
||||||
inputs.home-manager.users.johno = import ./home/home-nix-book.nix;
|
|
||||||
|
|
||||||
# Enable automatic login for the user.
|
|
||||||
services.getty.autologinUser = "johno";
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
||||||
# wget
|
|
||||||
];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
programs.gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSSHSupport = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
users.extraGroups.docker.members = [ "johno" ];
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# 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
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
@@ -145,21 +49,4 @@
|
|||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "24.05"; # Did you read the comment?
|
system.stateVersion = "24.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
|
||||||
# Desktop
|
|
||||||
|
|
||||||
programs.steam.enable = true;
|
|
||||||
|
|
||||||
#services.xserver.enable = true;
|
|
||||||
services.displayManager = {
|
|
||||||
sddm.enable = true;
|
|
||||||
sddm.wayland.enable = true;
|
|
||||||
#defaultSession = "plasmax11";
|
|
||||||
};
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,19 +2,21 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ inputs, config, pkgs, ... }:
|
{ inputs, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
kidsPackages = with pkgs; [
|
|
||||||
firefox
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../roles/virtualisation/default.nix
|
../../roles/common/default.nix
|
||||||
|
(import ../../roles/desktop/default.nix { x11Only = true; inherit inputs; inherit pkgs; })
|
||||||
|
../../roles/kids/default.nix
|
||||||
|
(import ../../roles/kodi/default.nix { autologin = false; wayland = false; inherit lib; inherit pkgs; })
|
||||||
../../roles/nfs-mounts/default.nix
|
../../roles/nfs-mounts/default.nix
|
||||||
|
../../roles/nix/default.nix
|
||||||
|
../../roles/printing/default.nix
|
||||||
|
(import ../../roles/users/default.nix { extraGroups = ["input" "libvirtd"]; })
|
||||||
|
../../roles/virtualisation/default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
@@ -22,11 +24,6 @@ in
|
|||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.grub.useOSProber = true;
|
boot.loader.grub.useOSProber = true;
|
||||||
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Los_Angeles";
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "z790prors-nix"; # Define your hostname.
|
hostName = "z790prors-nix"; # Define your hostname.
|
||||||
domain = "oglehome";
|
domain = "oglehome";
|
||||||
@@ -44,159 +41,8 @@ in
|
|||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
# TODO: Figure out something with this
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
# console = {
|
|
||||||
# font = "Lat2-Terminus16";
|
|
||||||
# keyMap = "us";
|
|
||||||
# };
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
nix.settings.secret-key-files = /root/cache-priv-key.pem;
|
nix.settings.secret-key-files = /root/cache-priv-key.pem;
|
||||||
nix.settings.max-jobs = "auto";
|
|
||||||
nix.settings.trusted-users = [ "johno" ];
|
|
||||||
nix.settings.substituters = [
|
|
||||||
"https://hyprland.cachix.org"
|
|
||||||
];
|
|
||||||
nix.settings.trusted-public-keys = [
|
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
services.xserver.enable = true;
|
|
||||||
hardware.graphics.enable = true;
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
hardware.nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement.enable = false;
|
|
||||||
powerManagement.finegrained = false;
|
|
||||||
open = false;
|
|
||||||
nvidiaSettings = true;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.production;
|
|
||||||
};
|
|
||||||
boot.initrd.kernelModules = [
|
|
||||||
"nvidia"
|
|
||||||
"nvidia_modeset"
|
|
||||||
"nvidia_uvm"
|
|
||||||
"nvidia_drm"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
# services.xserver.layout = "us";
|
|
||||||
# services.xserver.xkbOptions = "eurosign:e";
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
# services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound.
|
|
||||||
# TODO: Something is enabling pipewire (sunshine/moonlight maybe?) which is incompatible with pulseaudio
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.johno = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "John Ogle";
|
|
||||||
extraGroups = [ "wheel" "networkmanager" "audio" "libvirtd" "input" ]; # Enable ‘sudo’ for the user.
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.eli = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Eli";
|
|
||||||
home = "/arch/@home/eli";
|
|
||||||
packages = kidsPackages;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.andrew = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Andrew";
|
|
||||||
home = "/arch/@home/andrew";
|
|
||||||
packages = kidsPackages;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.jules = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Jules";
|
|
||||||
home = "/arch/@home/jules";
|
|
||||||
packages = kidsPackages;
|
|
||||||
};
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
||||||
git
|
|
||||||
];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
services.displayManager = {
|
|
||||||
sddm.enable = true;
|
|
||||||
sddm.wayland.enable = false;
|
|
||||||
#defaultSession = "plasmax11";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
|
|
||||||
services.xserver.windowManager.i3 = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
dmenu
|
|
||||||
i3status
|
|
||||||
i3lock
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# Helps with i3. Not sure what dconf is though honestly
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
programs.kdeconnect.enable = true;
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.java.enable = true;
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
localNetworkGameTransfers.openFirewall = true;
|
|
||||||
#package = pkgs.steam.override {
|
|
||||||
#withJava = true;
|
|
||||||
#withPrimus = true;
|
|
||||||
#extraPkgs = pkgs: [ bumblebee glxinfo ];
|
|
||||||
#};
|
|
||||||
};
|
|
||||||
services.sunshine = {
|
|
||||||
enable = true;
|
|
||||||
autoStart = true;
|
|
||||||
capSysAdmin = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# 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
|
||||||
@@ -205,6 +51,4 @@ in
|
|||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "21.11"; # Did you read the comment?
|
system.stateVersion = "21.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
@@ -9,10 +9,26 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [
|
||||||
|
"nvidia"
|
||||||
|
"nvidia_modeset"
|
||||||
|
"nvidia_uvm"
|
||||||
|
"nvidia_drm"
|
||||||
|
];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
open = false;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/8d996d13-6d55-4524-83a2-6f6fb47a09ea";
|
{ device = "/dev/disk/by-uuid/8d996d13-6d55-4524-83a2-6f6fb47a09ea";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
|
|||||||
77
roles/default.nix
Normal file
77
roles/default.nix
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./desktop
|
||||||
|
./kodi
|
||||||
|
./nfs-mounts
|
||||||
|
./printing
|
||||||
|
./users
|
||||||
|
./virtualisation
|
||||||
|
];
|
||||||
|
|
||||||
|
options.roles = {
|
||||||
|
enable = mkEnableOption "Enable roles";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
|
git
|
||||||
|
];
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nixFlakes;
|
||||||
|
distributedBuilds = true;
|
||||||
|
buildMachines = [{
|
||||||
|
hostName = "z790prors.oglehome";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
sshUser = "johno";
|
||||||
|
sshKey = "/root/.ssh/id_ed25519";
|
||||||
|
maxJobs = 3;
|
||||||
|
speedFactor = 2;
|
||||||
|
}];
|
||||||
|
settings = {
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
max-jobs = "auto";
|
||||||
|
trusted-users = [ "johno" ];
|
||||||
|
substituters = [
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
76
roles/desktop/default.nix
Normal file
76
roles/desktop/default.nix
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.roles.desktop = {
|
||||||
|
enable = mkEnableOption "Enable the desktop role";
|
||||||
|
x11Only = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config =
|
||||||
|
{
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
options = "caps:escape";
|
||||||
|
};
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.displayManager = {
|
||||||
|
lightdm.enable = true;
|
||||||
|
};
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
|
services.xserver.windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
dmenu
|
||||||
|
i3status
|
||||||
|
i3lock
|
||||||
|
];
|
||||||
|
};
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; mkIf (!cfg.x11Only) [
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
|
mako
|
||||||
|
];
|
||||||
|
programs.sway = mkIf (!cfg.x11Only) {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
};
|
||||||
|
programs.light.enable = mkIf (!cfg.x11Only) true;
|
||||||
|
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
programs.java.enable = true;
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
|
#package = pkgs.steam.override {
|
||||||
|
#withJava = true;
|
||||||
|
#withPrimus = true;
|
||||||
|
#extraPkgs = pkgs: [ bumblebee glxinfo ];
|
||||||
|
#};
|
||||||
|
};
|
||||||
|
services.sunshine = {
|
||||||
|
enable = true;
|
||||||
|
autoStart = true;
|
||||||
|
capSysAdmin = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
users.extraGroups.docker.members = [ "johno" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
62
roles/kodi/default.nix
Normal file
62
roles/kodi/default.nix
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.kodi;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.roles.kodi = {
|
||||||
|
enable = mkEnableOption "Enable Kodi";
|
||||||
|
autologin = mkOption {
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
wayland = mkOption {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
config = let
|
||||||
|
kodiBasePkg = if cfg.wayland then pkgs.kodi-wayland else pkgs.kodi;
|
||||||
|
kodiPkg = kodiBasePkg.withPackages (pkgs: with pkgs; [
|
||||||
|
jellyfin
|
||||||
|
steam-launcher
|
||||||
|
steam-library
|
||||||
|
youtube
|
||||||
|
]);
|
||||||
|
in {
|
||||||
|
users.extraUsers.kodi.isNormalUser = true;
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [ 8080 ];
|
||||||
|
allowedUDPPorts = [ 8080 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services = mkIf cfg.autologin {
|
||||||
|
cage = mkIf cfg.wayland {
|
||||||
|
user = "kodi";
|
||||||
|
program = "${kodiPkg}/bin/kodi-standalone";
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xserver = mkIf (!cfg.wayland) {
|
||||||
|
enable = true;
|
||||||
|
desktopManager.kodi = {
|
||||||
|
enable = true;
|
||||||
|
package = kodiPkg;
|
||||||
|
};
|
||||||
|
displayManager.lightdm = {
|
||||||
|
enable = true;
|
||||||
|
greeter.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
displayManager = mkIf (!cfg.wayland) {
|
||||||
|
autoLogin.enable = true;
|
||||||
|
autoLogin.user = "kodi";
|
||||||
|
defaultSession = "kodi";
|
||||||
|
sessionData.autologinSession = "kodi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,13 +1,30 @@
|
|||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.nfs-mounts;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
fileSystems."/media" = {
|
options.roles.nfs-mounts = {
|
||||||
device = "10.0.0.43:/media";
|
enable = mkEnableOption "Enable default NFS mounts";
|
||||||
fsType = "nfs";
|
# TODO: implement requireMount
|
||||||
options = [
|
requireMount = mkOption {
|
||||||
"defaults"
|
type = types.bool;
|
||||||
"nofail"
|
description = "Hard fail if the NFS mounts are not available";
|
||||||
"softreval"
|
default = false;
|
||||||
];
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
fileSystems."/media" = {
|
||||||
|
device = "10.0.0.43:/media";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"defaults"
|
||||||
|
"nofail"
|
||||||
|
"softreval"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
15
roles/printing/default.nix
Normal file
15
roles/printing/default.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
options.roles.printing = {
|
||||||
|
enable = mkEnableOption "Enable default printing setup";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# TODO: Add actual printer setup config here...
|
||||||
|
};
|
||||||
|
}
|
||||||
52
roles/users/default.nix
Normal file
52
roles/users/default.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.roles.users;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.roles.users = {
|
||||||
|
enable = mkEnableOption "Enable default users";
|
||||||
|
extraGroups = mkOption {
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
kids = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
kidsPackages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
users.users.johno = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "John Ogle";
|
||||||
|
extraGroups = [ "wheel" "networkmanager" "audio" ] ++ cfg.extraGroups;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.eli = mkIf cfg.kids {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Eli";
|
||||||
|
home = "/home/eli";
|
||||||
|
packages = kidsPackages;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.andrew = mkIf cfg.kids {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Andrew";
|
||||||
|
home = "/home/andrew";
|
||||||
|
packages = kidsPackages;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.jules = mkIf cfg.kids {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Jules";
|
||||||
|
home = "/home/jules";
|
||||||
|
packages = kidsPackages;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,6 +1,14 @@
|
|||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
virtualisation.libvirtd.enable = true;
|
options.roles.virtualisation = {
|
||||||
programs.virt-manager.enable = true;
|
enable = mkEnableOption "Enable virtualisation";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
virtualisation.libvirtd.enable = true;
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user