mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2025-12-15 23:00:06 +05:30
Compare commits
4 Commits
25.11.2025
...
6a7decf5be
| Author | SHA1 | Date | |
|---|---|---|---|
|
6a7decf5be
|
|||
|
820e69f53c
|
|||
|
892f30dabe
|
|||
|
572ae61b3a
|
107
README.md
107
README.md
@@ -36,34 +36,117 @@
|
||||
|
||||
## Installation
|
||||
|
||||
Boot into NixOS bootable USB and then enter the following commands
|
||||
> **Note:** This will get your base system ready, but keep in mind that many things might not work correctly — such as monitor resolution, font size, and more.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Boot into the NixOS bootable USB before proceeding with the installation steps.
|
||||
|
||||
### Installation Steps
|
||||
|
||||
#### 1. Clone the repository
|
||||
|
||||
```bash
|
||||
git clone https://github.com/tuxdotrs/nix-config.git
|
||||
cd nix-config
|
||||
```
|
||||
|
||||
#### 2. Gain root privileges
|
||||
|
||||
```bash
|
||||
sudo su
|
||||
|
||||
```
|
||||
# Clone this repositry
|
||||
git clone https://github.com/tuxdotrs/nix-config.git
|
||||
|
||||
# Navigate to the repository directory
|
||||
cd nix-config
|
||||
#### 3. Set up disk partitioning
|
||||
|
||||
# Install disko for disk partitioning
|
||||
nix-shell -p disko
|
||||
Install the required tools:
|
||||
|
||||
# Partition the disk and make sure to replace DISK_PATH (eg. /dev/vda)
|
||||
```bash
|
||||
nix-shell -p disko neovim
|
||||
```
|
||||
|
||||
Partition your disk using disko. **This will wipe your drive.** Replace `DISK_PATH` with your actual disk path (e.g., `/dev/vda` or `/dev/nvme0n1`):
|
||||
|
||||
```bash
|
||||
disko --mode disko ./hosts/canopus/disko.nix --arg device '"DISK_PATH"'
|
||||
```
|
||||
|
||||
# Generate the hardware.nix file for your system
|
||||
#### 4. Configure your disk
|
||||
|
||||
Edit the configuration file:
|
||||
|
||||
```bash
|
||||
nvim ./hosts/canopus/default.nix
|
||||
```
|
||||
|
||||
In the imports statement, replace:
|
||||
|
||||
```nix
|
||||
(import ./disko.nix {device = "/dev/nvme0n1";})
|
||||
```
|
||||
|
||||
with:
|
||||
|
||||
```nix
|
||||
(import ./disko.nix {device = "DISK_PATH";})
|
||||
```
|
||||
|
||||
Make sure to replace `DISK_PATH` with your actual disk path.
|
||||
|
||||
#### 5. Generate hardware configuration
|
||||
|
||||
```bash
|
||||
nixos-generate-config --no-filesystems --root /mnt
|
||||
```
|
||||
|
||||
# Replace the hardware.nix with generated one
|
||||
Copy the generated hardware configuration to the repository:
|
||||
|
||||
```bash
|
||||
cp /mnt/etc/nixos/hardware-configuration.nix ./hosts/canopus/hardware.nix
|
||||
```
|
||||
|
||||
# Install
|
||||
#### 6. Install NixOS
|
||||
|
||||
```bash
|
||||
nixos-install --root /mnt --flake .#canopus
|
||||
```
|
||||
|
||||
# Reboot to your beautiful DE
|
||||
#### 7. Enter into the new system
|
||||
|
||||
```bash
|
||||
nixos-enter --root /mnt
|
||||
```
|
||||
|
||||
#### 8. Set up directories and permissions
|
||||
|
||||
```bash
|
||||
mkdir -p /persist/home
|
||||
chown -R tux:users /persist/home
|
||||
```
|
||||
|
||||
#### 9. Set passwords
|
||||
|
||||
Set the root password:
|
||||
|
||||
```bash
|
||||
passwd root
|
||||
```
|
||||
|
||||
Set the user password:
|
||||
|
||||
```bash
|
||||
passwd tux
|
||||
```
|
||||
|
||||
#### 10. Reboot
|
||||
|
||||
```bash
|
||||
reboot
|
||||
```
|
||||
|
||||
Your NixOS system should now boot into a beautiful DE.
|
||||
|
||||
## Components
|
||||
|
||||
| | Wayland | Xorg |
|
||||
|
||||
145
flake.lock
generated
145
flake.lock
generated
@@ -139,7 +139,7 @@
|
||||
},
|
||||
"emacs": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"nixpkgs": "nixpkgs_8",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
@@ -783,6 +783,25 @@
|
||||
"url": "https://codeberg.org/amjoseph/infuse.nix.git"
|
||||
}
|
||||
},
|
||||
"lan-mouse": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759962506,
|
||||
"narHash": "sha256-/XmiS79TBaR+V5zMUQ/XWXbCaDxsxwoYDPO3D+OuDlg=",
|
||||
"owner": "feschber",
|
||||
"repo": "lan-mouse",
|
||||
"rev": "39b79d88a5b05fd357d6397e795ed518d459309a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "feschber",
|
||||
"repo": "lan-mouse",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"libpng": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -917,7 +936,7 @@
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_4",
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
"nixpkgs": "nixpkgs_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758071854,
|
||||
@@ -1005,7 +1024,7 @@
|
||||
"inputs": {
|
||||
"emacs": "emacs",
|
||||
"infuse": "infuse",
|
||||
"nixpkgs": "nixpkgs_8",
|
||||
"nixpkgs": "nixpkgs_9",
|
||||
"nixpkgs-fmt": "nixpkgs-fmt",
|
||||
"parts": "parts"
|
||||
},
|
||||
@@ -1125,6 +1144,22 @@
|
||||
}
|
||||
},
|
||||
"nixpkgs_10": {
|
||||
"locked": {
|
||||
"lastModified": 1757745802,
|
||||
"narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_11": {
|
||||
"locked": {
|
||||
"lastModified": 1757746433,
|
||||
"narHash": "sha256-fEvTiU4s9lWgW7mYEU/1QUPirgkn+odUBTaindgiziY=",
|
||||
@@ -1183,6 +1218,22 @@
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1752687322,
|
||||
"narHash": "sha256-RKwfXA4OZROjBTQAl9WOZQFm7L8Bo93FQwSJpAiSRvo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6e987485eb2c77e5dcc5af4e3c70843711ef9251",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1754028485,
|
||||
"narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=",
|
||||
@@ -1198,39 +1249,39 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1757745802,
|
||||
"narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1757745802,
|
||||
"narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=",
|
||||
"owner": "NixOS",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1757745802,
|
||||
"narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_9": {
|
||||
"locked": {
|
||||
"lastModified": 1758077456,
|
||||
"narHash": "sha256-BdoMXWGHPmciPf4pt0mVoHYV5s2DaHl+o/qW4g8SMHY=",
|
||||
@@ -1246,22 +1297,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_9": {
|
||||
"locked": {
|
||||
"lastModified": 1757745802,
|
||||
"narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nmd": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -1319,7 +1354,7 @@
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs_9"
|
||||
"nixpkgs": "nixpkgs_10"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758109308,
|
||||
@@ -1386,6 +1421,7 @@
|
||||
"hyprland": "hyprland",
|
||||
"hyprland-plugins": "hyprland-plugins",
|
||||
"impermanence": "impermanence",
|
||||
"lan-mouse": "lan-mouse",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nix-on-droid": "nix-on-droid",
|
||||
"nix-secrets": "nix-secrets",
|
||||
@@ -1393,7 +1429,7 @@
|
||||
"nixcord": "nixcord",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixos-wsl": "nixos-wsl",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"nixpkgs-f2k": "nixpkgs-f2k",
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"nur": "nur",
|
||||
@@ -1424,6 +1460,27 @@
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"lan-mouse",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752806774,
|
||||
"narHash": "sha256-4cHeoR2roN7d/3J6gT+l6o7J2hTrBIUiCwVdDNMeXzE=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "3c90219b3ba1c9790c45a078eae121de48a39c55",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rust-overlay_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"wezterm-flake",
|
||||
@@ -1462,7 +1519,7 @@
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_10"
|
||||
"nixpkgs": "nixpkgs_11"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758007585,
|
||||
@@ -1621,11 +1678,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759787748,
|
||||
"narHash": "sha256-88M9+hiXY+C+C9xVLOWcRw1lbuv9bogltFQpYDnHDGo=",
|
||||
"lastModified": 1760229755,
|
||||
"narHash": "sha256-g9R4PzkfPY9+Va92iUWRoTRYVrhyl72a6O5dehUHWIM=",
|
||||
"owner": "tuxdotrs",
|
||||
"repo": "tpanel",
|
||||
"rev": "98203af3e4a034501f0f8dfa7218cfe8a0371e4f",
|
||||
"rev": "4b7ae63bc8b0f4cddd5485f923668a089d450c4d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1681,7 +1738,7 @@
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": "rust-overlay",
|
||||
"rust-overlay": "rust-overlay_2",
|
||||
"zlib": "zlib"
|
||||
},
|
||||
"locked": {
|
||||
|
||||
@@ -166,5 +166,6 @@
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
nixcord.url = "github:kaylorben/nixcord";
|
||||
lan-mouse.url = "github:feschber/lan-mouse";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
];
|
||||
|
||||
# Facilitate firewall punching
|
||||
allowedUDPPorts = [41641];
|
||||
allowedUDPPorts = [41641 4242];
|
||||
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
../../modules/home/wezterm
|
||||
../../modules/home/ghostty
|
||||
../../modules/home/desktop/rofi
|
||||
../../modules/home/lan-mouse
|
||||
../../modules/home/barrier
|
||||
../../modules/home/firefox
|
||||
../../modules/home/brave
|
||||
@@ -28,6 +29,7 @@
|
||||
home.pointerCursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Ice";
|
||||
size = 28;
|
||||
};
|
||||
|
||||
qt = {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
home.pointerCursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Ice";
|
||||
size = 28;
|
||||
};
|
||||
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
19
modules/home/lan-mouse/default.nix
Normal file
19
modules/home/lan-mouse/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
inputs.lan-mouse.homeManagerModules.default
|
||||
];
|
||||
|
||||
programs.lan-mouse = {
|
||||
enable = true;
|
||||
systemd = true;
|
||||
settings = {
|
||||
# release_bind = ["KeyA" "KeyS" "KeyD" "KeyF"];
|
||||
|
||||
port = 4242;
|
||||
|
||||
authorized_fingerprints = {
|
||||
"30:66:b3:95:dc:6b:55:a4:9f:30:31:9c:3e:4d:70:03:33:c3:f0:6f:df:31:35:58:36:6e:80:2f:32:b2:ce:48" = "pc";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user