Compare commits

...

6 Commits

Author SHA1 Message Date
35590ce3ed Update dotfiles 2024-08-12 18:13:06 -05:00
e6cf90004c Add start of readme. 2024-08-12 18:03:51 -05:00
0d7b5f8a0d Remove sound config as its no longer used. 2024-08-12 17:18:08 -05:00
ce1fca104f Fix config script 2024-08-12 17:14:36 -05:00
aa49e29bd2 Fix config script 2024-08-12 17:11:58 -05:00
0addff6c7d Add media-pc, and update 2024-08-12 17:07:50 -05:00
16 changed files with 80 additions and 40 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "dotfiles"]
path = dotfiles
url = https://github.com/GRMrGecko/dotfiles.git

18
README.md Normal file
View File

@ -0,0 +1,18 @@
# nixos
These are my configurations for nixos. You are free to use it, however it may be best for you to fork and make your own.
## Installing
In my experience, you need a larger disk size for the nix store on the installer than is created. As such, I use a NFS mount with a swap file. If you are installing using an USB stick, you can probably place a swap file there.
```bash
nix-shell -p git nfs-utils
mkdir /mnt/merged
mount.nfs 10.0.0.5:/mnt/merged /mnt/merged
mkdir /mnt/merged/nixos-tmp
fallocate -l 30G /mnt/merged/nixos-tmp/swap
chmod 600 /mnt/merged/nixos-tmp/swap
mkswap /mnt/merged/nixos-tmp/swap
swapon /mnt/merged/nixos-tmp/swap
mount -o remount,size=20G,noatime /nix/.rw-store
git clone --recursive https://github.com/GRMrGecko/nixos.git
```

View File

@ -133,8 +133,10 @@ if [[ "$CHOICE" == "y" ]]; then
while true; do
echo -n "Enter your luks encryption passphrase: "
read -r -s luksPasswd
echo
echo -n "Confirm your luks encryption passphrase: "
read -r -s confirmLuksPasswd
echo
if [[ "$luksPasswd" == "$confirmLuksPasswd" ]]; then
break
fi
@ -147,7 +149,7 @@ fi
# Get username for the main user.
echo -n "Main user name [$defaultName]: "
read -r name
[[ -z $name ]] && name=$defaultName me
[[ -z $name ]] && name=$defaultName
# Get description for the main user.
echo -n "Main user description [$defaultDescription]: "
@ -158,8 +160,10 @@ read -r description
while true; do
echo -n "Enter password for main user: "
read -r -s mainPasswd
echo
echo -n "Confirm your password for main user: "
read -r -s confirmMainPasswd
echo
if [[ "$mainPasswd" == "$confirmMainPasswd" ]]; then
break
fi
@ -211,7 +215,7 @@ fi
# Get git name.
echo -n "Git name [$defaultGitName]: "
read -r gitName
[[ -z $gitName ]] && gitName=$defaultGitName me
[[ -z $gitName ]] && gitName=$defaultGitName
# Get git email.
echo -n "Git email [$defaultGitEmail]: "

@ -1 +1 @@
Subproject commit 3c006855689bcaeb401e2b52c979ce4c57cd8fd5
Subproject commit 8ae344b2caa2ede57a0fd1a937ecc05f784f5d9a

View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1720056646,
"narHash": "sha256-BymcV4HWtx2VFuabDCM4/nEJcfivCx0S02wUCz11mAY=",
"lastModified": 1723080788,
"narHash": "sha256-C5LbM5VMdcolt9zHeLQ0bYMRjUL+N+AL5pK7/tVTdes=",
"owner": "nix-community",
"repo": "disko",
"rev": "64679cd7f318c9b6595902b47d4585b1d51d5f9e",
"rev": "ffc1f95f6c28e1c6d1e587b51a2147027a3e45ed",
"type": "github"
},
"original": {
@ -26,11 +26,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1707326266,
"narHash": "sha256-vRVih6iltuyLdj305Pj236BfhzFaOkAbHg3r5VsFdxs=",
"lastModified": 1722178161,
"narHash": "sha256-9Nmg+1ngRCsKMJXN4JWFzg4SLTj1iJfakxiOsF48rZw=",
"owner": "GermanBread",
"repo": "declarative-flatpak",
"rev": "efe7897ddcfbca085fba0690b3094e7f8e8911dd",
"rev": "cbabea429cd7d659041e5338e869a8e70f59fa74",
"type": "github"
},
"original": {
@ -68,11 +68,11 @@
]
},
"locked": {
"lastModified": 1720327769,
"narHash": "sha256-kAsg3Lg4YKKpGw+f1W2s5hzjP8B0y/juowvjK8utIag=",
"lastModified": 1723015306,
"narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6b7ce96f34b324e4e104abc30d06955d216bac71",
"rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e",
"type": "github"
},
"original": {
@ -83,11 +83,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1706098335,
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
"lastModified": 1720535198,
"narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
"rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
"type": "github"
},
"original": {
@ -99,11 +99,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1720031269,
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=",
"lastModified": 1722813957,
"narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6",
"rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa",
"type": "github"
},
"original": {
@ -115,11 +115,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1720244366,
"narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=",
"lastModified": 1722987190,
"narHash": "sha256-68hmex5efCiM2aZlAAEcQgmFI4ZwWt8a80vOeB/5w3A=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"rev": "21cc704b5e918c5fbf4f9fff22b4ac2681706d90",
"type": "github"
},
"original": {
@ -159,11 +159,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {

View File

@ -15,6 +15,11 @@
../../modules/nixos/zfs.nix
];
# Fix AMD SATA bug?
boot.kernelParams = [
"iommu=soft"
];
# Enable NFS export for kvm storage.
services.nfs.server.enable = true;
services.nfs.server.exports = ''

View File

@ -17,4 +17,4 @@ fi
# Install NixOS.
# shellcheck disable=SC2068
nix --extra-experimental-features 'nix-command flakes' run 'github:nix-community/disko#disko-install' -- --impure --flake "path:$nixosDir/#$host" $@
nix --extra-experimental-features 'nix-command flakes' run 'github:nix-community/disko#disko-install' -- --flake "path:$nixosDir/#$host" $@

View File

@ -7,15 +7,11 @@
"flathub" = "https://dl.flathub.org/repo/flathub.flatpakrepo";
};
services.flatpak.packages = [
"flathub:app/org.kde.kdenlive/x86_64/stable"
"flathub:app/org.libreoffice.LibreOffice/x86_64/stable"
"flathub:app/org.onlyoffice.desktopeditors/x86_64/stable"
"flathub:app/md.obsidian.Obsidian/x86_64/stable"
"flathub:app/org.mozilla.Thunderbird/x86_64/stable"
"flathub:app/com.calibre_ebook.calibre/x86_64/stable"
"flathub:app/org.gimp.GIMP/x86_64/stable"
"flathub:app/org.kde.krita/x86_64/stable"
"flathub:app/org.inkscape.Inkscape/x86_64/stable"
"flathub:app/org.blender.Blender/x86_64/stable"
];
}

View File

@ -4,4 +4,10 @@
imports = [
./desktop.nix
];
services.flatpak.packages = [
"flathub:app/org.kde.kdenlive/x86_64/stable"
"flathub:app/org.mozilla.Thunderbird/x86_64/stable"
"flathub:app/com.calibre_ebook.calibre/x86_64/stable"
"flathub:app/org.blender.Blender/x86_64/stable"
];
}

View File

@ -0,0 +1,7 @@
{pkgs, settings, ...}:
{
imports = [
./desktop.nix
];
}

View File

@ -25,7 +25,6 @@
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {

View File

@ -2,10 +2,8 @@
{
# Display drivers.
hardware.opengl = {
hardware.graphics = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];

View File

@ -2,10 +2,8 @@
{
# Display drivers.
hardware.opengl = {
hardware.graphics = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.xserver.videoDrivers = [ "nvidia" ];

View File

@ -2,10 +2,8 @@
{
# Display drivers.
hardware.opengl = {
hardware.graphics = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.xserver.videoDrivers = [ "qxl" ];
# services.qemuGuest.enable = true;

View File

@ -4,7 +4,7 @@
boot.supportedFilesystems = [ "zfs" ];
# Set kernel to latest compatible version with ZFS.
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
#boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
environment.systemPackages = with pkgs; [
zfs

8
profiles/media-pc.nix Normal file
View File

@ -0,0 +1,8 @@
{ config, lib, pkgs, settings, ... }:
{
# Import modules.
imports = [
./desktop.nix
];
}