Compare commits
6 Commits
0323133501
...
35590ce3ed
Author | SHA1 | Date | |
---|---|---|---|
35590ce3ed | |||
e6cf90004c | |||
0d7b5f8a0d | |||
ce1fca104f | |||
aa49e29bd2 | |||
0addff6c7d |
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "dotfiles"]
|
||||||
|
path = dotfiles
|
||||||
|
url = https://github.com/GRMrGecko/dotfiles.git
|
18
README.md
Normal file
18
README.md
Normal 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
|
||||||
|
```
|
@ -133,8 +133,10 @@ if [[ "$CHOICE" == "y" ]]; then
|
|||||||
while true; do
|
while true; do
|
||||||
echo -n "Enter your luks encryption passphrase: "
|
echo -n "Enter your luks encryption passphrase: "
|
||||||
read -r -s luksPasswd
|
read -r -s luksPasswd
|
||||||
|
echo
|
||||||
echo -n "Confirm your luks encryption passphrase: "
|
echo -n "Confirm your luks encryption passphrase: "
|
||||||
read -r -s confirmLuksPasswd
|
read -r -s confirmLuksPasswd
|
||||||
|
echo
|
||||||
if [[ "$luksPasswd" == "$confirmLuksPasswd" ]]; then
|
if [[ "$luksPasswd" == "$confirmLuksPasswd" ]]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@ -147,7 +149,7 @@ fi
|
|||||||
# Get username for the main user.
|
# Get username for the main user.
|
||||||
echo -n "Main user name [$defaultName]: "
|
echo -n "Main user name [$defaultName]: "
|
||||||
read -r name
|
read -r name
|
||||||
[[ -z $name ]] && name=$defaultName me
|
[[ -z $name ]] && name=$defaultName
|
||||||
|
|
||||||
# Get description for the main user.
|
# Get description for the main user.
|
||||||
echo -n "Main user description [$defaultDescription]: "
|
echo -n "Main user description [$defaultDescription]: "
|
||||||
@ -158,8 +160,10 @@ read -r description
|
|||||||
while true; do
|
while true; do
|
||||||
echo -n "Enter password for main user: "
|
echo -n "Enter password for main user: "
|
||||||
read -r -s mainPasswd
|
read -r -s mainPasswd
|
||||||
|
echo
|
||||||
echo -n "Confirm your password for main user: "
|
echo -n "Confirm your password for main user: "
|
||||||
read -r -s confirmMainPasswd
|
read -r -s confirmMainPasswd
|
||||||
|
echo
|
||||||
if [[ "$mainPasswd" == "$confirmMainPasswd" ]]; then
|
if [[ "$mainPasswd" == "$confirmMainPasswd" ]]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@ -211,7 +215,7 @@ fi
|
|||||||
# Get git name.
|
# Get git name.
|
||||||
echo -n "Git name [$defaultGitName]: "
|
echo -n "Git name [$defaultGitName]: "
|
||||||
read -r gitName
|
read -r gitName
|
||||||
[[ -z $gitName ]] && gitName=$defaultGitName me
|
[[ -z $gitName ]] && gitName=$defaultGitName
|
||||||
|
|
||||||
# Get git email.
|
# Get git email.
|
||||||
echo -n "Git email [$defaultGitEmail]: "
|
echo -n "Git email [$defaultGitEmail]: "
|
||||||
|
2
dotfiles
2
dotfiles
@ -1 +1 @@
|
|||||||
Subproject commit 3c006855689bcaeb401e2b52c979ce4c57cd8fd5
|
Subproject commit 8ae344b2caa2ede57a0fd1a937ecc05f784f5d9a
|
42
flake.lock
42
flake.lock
@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720056646,
|
"lastModified": 1723080788,
|
||||||
"narHash": "sha256-BymcV4HWtx2VFuabDCM4/nEJcfivCx0S02wUCz11mAY=",
|
"narHash": "sha256-C5LbM5VMdcolt9zHeLQ0bYMRjUL+N+AL5pK7/tVTdes=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "64679cd7f318c9b6595902b47d4585b1d51d5f9e",
|
"rev": "ffc1f95f6c28e1c6d1e587b51a2147027a3e45ed",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -26,11 +26,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707326266,
|
"lastModified": 1722178161,
|
||||||
"narHash": "sha256-vRVih6iltuyLdj305Pj236BfhzFaOkAbHg3r5VsFdxs=",
|
"narHash": "sha256-9Nmg+1ngRCsKMJXN4JWFzg4SLTj1iJfakxiOsF48rZw=",
|
||||||
"owner": "GermanBread",
|
"owner": "GermanBread",
|
||||||
"repo": "declarative-flatpak",
|
"repo": "declarative-flatpak",
|
||||||
"rev": "efe7897ddcfbca085fba0690b3094e7f8e8911dd",
|
"rev": "cbabea429cd7d659041e5338e869a8e70f59fa74",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -68,11 +68,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720327769,
|
"lastModified": 1723015306,
|
||||||
"narHash": "sha256-kAsg3Lg4YKKpGw+f1W2s5hzjP8B0y/juowvjK8utIag=",
|
"narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "6b7ce96f34b324e4e104abc30d06955d216bac71",
|
"rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -83,11 +83,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706098335,
|
"lastModified": 1720535198,
|
||||||
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
|
"narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
|
"rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -99,11 +99,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720031269,
|
"lastModified": 1722813957,
|
||||||
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=",
|
"narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6",
|
"rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -115,11 +115,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720244366,
|
"lastModified": 1722987190,
|
||||||
"narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=",
|
"narHash": "sha256-68hmex5efCiM2aZlAAEcQgmFI4ZwWt8a80vOeB/5w3A=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
|
"rev": "21cc704b5e918c5fbf4f9fff22b4ac2681706d90",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -159,11 +159,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1710146030,
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -15,6 +15,11 @@
|
|||||||
../../modules/nixos/zfs.nix
|
../../modules/nixos/zfs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Fix AMD SATA bug?
|
||||||
|
boot.kernelParams = [
|
||||||
|
"iommu=soft"
|
||||||
|
];
|
||||||
|
|
||||||
# Enable NFS export for kvm storage.
|
# Enable NFS export for kvm storage.
|
||||||
services.nfs.server.enable = true;
|
services.nfs.server.enable = true;
|
||||||
services.nfs.server.exports = ''
|
services.nfs.server.exports = ''
|
||||||
|
@ -17,4 +17,4 @@ fi
|
|||||||
|
|
||||||
# Install NixOS.
|
# Install NixOS.
|
||||||
# shellcheck disable=SC2068
|
# 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" $@
|
||||||
|
@ -7,15 +7,11 @@
|
|||||||
"flathub" = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
"flathub" = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||||
};
|
};
|
||||||
services.flatpak.packages = [
|
services.flatpak.packages = [
|
||||||
"flathub:app/org.kde.kdenlive/x86_64/stable"
|
|
||||||
"flathub:app/org.libreoffice.LibreOffice/x86_64/stable"
|
"flathub:app/org.libreoffice.LibreOffice/x86_64/stable"
|
||||||
"flathub:app/org.onlyoffice.desktopeditors/x86_64/stable"
|
"flathub:app/org.onlyoffice.desktopeditors/x86_64/stable"
|
||||||
"flathub:app/md.obsidian.Obsidian/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.gimp.GIMP/x86_64/stable"
|
||||||
"flathub:app/org.kde.krita/x86_64/stable"
|
"flathub:app/org.kde.krita/x86_64/stable"
|
||||||
"flathub:app/org.inkscape.Inkscape/x86_64/stable"
|
"flathub:app/org.inkscape.Inkscape/x86_64/stable"
|
||||||
"flathub:app/org.blender.Blender/x86_64/stable"
|
|
||||||
];
|
];
|
||||||
}
|
}
|
@ -4,4 +4,10 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./desktop.nix
|
./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"
|
||||||
|
];
|
||||||
}
|
}
|
7
modules/home/profiles/media-pc.nix
Normal file
7
modules/home/profiles/media-pc.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{pkgs, settings, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./desktop.nix
|
||||||
|
];
|
||||||
|
}
|
@ -25,7 +25,6 @@
|
|||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
|
@ -2,10 +2,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
# Display drivers.
|
# Display drivers.
|
||||||
hardware.opengl = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
};
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
@ -2,10 +2,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
# Display drivers.
|
# Display drivers.
|
||||||
hardware.opengl = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
};
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
|
@ -2,10 +2,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
# Display drivers.
|
# Display drivers.
|
||||||
hardware.opengl = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
};
|
||||||
services.xserver.videoDrivers = [ "qxl" ];
|
services.xserver.videoDrivers = [ "qxl" ];
|
||||||
# services.qemuGuest.enable = true;
|
# services.qemuGuest.enable = true;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
boot.supportedFilesystems = [ "zfs" ];
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
|
|
||||||
# Set kernel to latest compatible version with 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; [
|
environment.systemPackages = with pkgs; [
|
||||||
zfs
|
zfs
|
||||||
|
8
profiles/media-pc.nix
Normal file
8
profiles/media-pc.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, pkgs, settings, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Import modules.
|
||||||
|
imports = [
|
||||||
|
./desktop.nix
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user